From c4e4acfc26773c75971f227c46c35e4eb0106a37 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 29 Jan 2023 09:54:07 +0100 Subject: [PATCH 01/15] Stop scheduler also on restart calibre-web --- cps/server.py | 8 ++++++++ cps/services/background_scheduler.py | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cps/server.py b/cps/server.py index fb70a723..6b5ac761 100644 --- a/cps/server.py +++ b/cps/server.py @@ -22,6 +22,7 @@ import errno import signal import socket import subprocess # nosec +from .services.background_scheduler import BackgroundScheduler try: from gevent.pywsgi import WSGIServer @@ -265,6 +266,12 @@ class WebServer(object): subprocess.call(args, close_fds=True) # nosec return True + @staticmethod + def shutdown_scheduler(): + scheduler = BackgroundScheduler() + if scheduler: + scheduler.scheduler.shutdown() + def _killServer(self, __, ___): self.stop() @@ -273,6 +280,7 @@ class WebServer(object): updater_thread.stop() log.info("webserver stop (restart=%s)", restart) + self.shutdown_scheduler() self.restart = restart if self.wsgiserver: if _GEVENT: diff --git a/cps/services/background_scheduler.py b/cps/services/background_scheduler.py index ec3555f0..72991559 100644 --- a/cps/services/background_scheduler.py +++ b/cps/services/background_scheduler.py @@ -45,8 +45,6 @@ class BackgroundScheduler: cls.scheduler = BScheduler() cls.scheduler.start() - atexit.register(lambda: cls.scheduler.shutdown()) - return cls._instance def schedule(self, func, trigger, name=None): From 1babb566fbf87984b52acd890112d896d607d242 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 29 Jan 2023 09:55:32 +0100 Subject: [PATCH 02/15] Update version --- cps/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/constants.py b/cps/constants.py index d0076067..376e1097 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -163,7 +163,7 @@ def selected_roles(dictionary): BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, ' 'series_id, languages, publisher, pubdate, identifiers') -STABLE_VERSION = {'version': '0.6.19'} +STABLE_VERSION = {'version': '0.6.20 Beta'} NIGHTLY_VERSION = dict() NIGHTLY_VERSION[0] = '$Format:%H$' From 0e6b7f96d316050f68cf3b4ecaf2be8785fafa1a Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 29 Jan 2023 10:01:30 +0100 Subject: [PATCH 03/15] Update flask requirement --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 04941f30..34c990fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ Flask-Babel>=0.11.1,<3.1.0 Flask-Login>=0.3.2,<0.6.3 Flask-Principal>=0.3.2,<0.5.1 backports_abc>=0.4 -Flask>=1.0.2,<2.2.0 +Flask>=1.0.2,<2.3.0 iso-639>=0.4.5,<0.5.0 PyPDF>=3.0.0,<3.3.0 pytz>=2016.10 From e71a3452e19e3631a492a143c3ddde60c10578bc Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 29 Jan 2023 14:14:18 +0100 Subject: [PATCH 04/15] Added empty database --- library/metadata.db | Bin 0 -> 413696 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 library/metadata.db diff --git a/library/metadata.db b/library/metadata.db new file mode 100644 index 0000000000000000000000000000000000000000..fc0d5d3156ccaf85108d9bb797433e688e1f2136 GIT binary patch literal 413696 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 p+lgEbwt&s9*bf Date: Sun, 29 Jan 2023 14:28:49 +0100 Subject: [PATCH 05/15] Updated readme to make and exclude library from getting zipped --- .gitattributes | 1 + README.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 92739fe9..8266c99a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ constants.py ident export-subst /test export-ignore +/library export-ignore cps/static/css/libs/* linguist-vendored cps/static/js/libs/* linguist-vendored diff --git a/README.md b/README.md index 0138e5a7..1f0eca71 100755 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ In the Wiki there are also examples for: a [manual installation](https://github. Point your browser to `http://localhost:8083` or `http://localhost:8083/opds` for the OPDS catalog \ Login with default admin login \ -Set `Location of Calibre database` to the path of the folder where your Calibre library (metadata.db) lives, push "submit" button \ +If you don't have a Calibre database already, this [database](https://github.com/janeczku/calibre-web/blob/master/library/metadata.db) can be used. **IMPORTATNT** Please move the database out of the calibre-web folder structure, as it will be overwritten during update. \ +Set `Location of Calibre database` to the path of the folder where your Calibre library (metadata.db) lives, push "submit" button. \ Optionally a Google Drive can be used to host the calibre library [-> Using Google Drive integration](https://github.com/janeczku/calibre-web/wiki/G-Drive-Setup#using-google-drive-integration) \ Afterwards you can configure your Calibre-Web instance ([Basic Configuration](https://github.com/janeczku/calibre-web/wiki/Configuration#basic-configuration) and [UI Configuration](https://github.com/janeczku/calibre-web/wiki/Configuration#ui-configuration) on admin page) From b9769a09752042bd5c949e4c5c45e09a608388dd Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 1 Feb 2023 18:46:23 +0100 Subject: [PATCH 06/15] Revert to latest syncronous jszip version to make comic reader work again --- cps/static/js/compress/jszip.min.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cps/static/js/compress/jszip.min.js b/cps/static/js/compress/jszip.min.js index ff4cfd5e..3b36cd8b 100644 --- a/cps/static/js/compress/jszip.min.js +++ b/cps/static/js/compress/jszip.min.js @@ -1,13 +1,14 @@ /*! -JSZip v3.10.1 - A JavaScript class for generating and reading zip files +JSZip - A Javascript class for generating and reading zip files -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. +(c) 2009-2014 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE +https://github.com/nodeca/pako/blob/master/LICENSE */ - -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e>2,s=(3&t)<<4|r>>4,a=1>6:64,o=2>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function A(e,t){var r,n="";for(r=0;r>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"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}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t)}).on("error",function(e){n=[],r(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){"use strict";var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){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 I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.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(e,t,r){(function(e){!function(r,n){"use strict";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f-this.zero;return-1},d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":6}],2:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a,b){for(var c,e,f,g,h,i,j,k="",l=0;l>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],3:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],4:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a,b){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":9}],5:[function(a,b,c){"use strict";var d=a("./utils"),e=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==d.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),f=e[g],b=b>>>8^f;return-1^b}},{"./utils":22}],6:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0,this.zero=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":22}],7:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],8:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":22}],9:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a,b){return e.deflateRaw(a,{level:b.level||-1})},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:25}],10:[function(a,b,c){"use strict";function d(a,b){return this instanceof d?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new d(a,b)}var e=a("./base64");d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./deprecatedPublicUtils"),d.base64={encode:function(a){return e.encode(a)},decode:function(a){return e.decode(a)}},d.compressions=a("./compressions"),b.exports=d},{"./base64":2,"./compressions":4,"./defaults":7,"./deprecatedPublicUtils":8,"./load":11,"./object":14,"./support":18}],11:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./utf8"),f=a("./utils"),g=a("./zipEntries");b.exports=function(a,b){var c,h,i,j;for(b=f.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:e.utf8decode}),b.base64&&(a=d.decode(a)),h=new g(a,b),c=h.files,i=0;ic;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=e.extend(a,h),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var d,f=e.getTypeOf(b);if(c=u(c),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(a=x(a)),c.createFolders&&(d=w(a))&&y.call(this,d,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null,f=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=e.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof k))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=e.transformTo("uint8array",b))}var g=new s(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a){return"/"!=a.slice(-1)&&(a+="/"),a},y=function(a,b){return b="undefined"!=typeof b?b:!1,a=x(a),this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},z=function(a,b,c){var d,g=new k;return a._data instanceof k?(g.uncompressedSize=a._data.uncompressedSize,g.crc32=a._data.crc32,0===g.uncompressedSize||a.dir?(b=j.STORE,g.compressedContent="",g.crc32=0):a._data.compressionMethod===b.magic?g.compressedContent=a._data.getCompressedContent():(d=a._data.getContent(),g.compressedContent=b.compress(e.transformTo(b.compressInputType,d),c))):(d=q(a),d&&0!==d.length&&!a.dir||(b=j.STORE,d=""),g.uncompressedSize=d.length,g.crc32=f(d),g.compressedContent=b.compress(e.transformTo(b.compressInputType,d),c)),g.compressedSize=g.compressedContent.length,g.compressionMethod=b.magic,g},A=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},B=function(a,b){return 63&(a||0)},C=function(a,b,c,d,h,i){var j,k,l,n,o=(c.compressedContent,i!==m.utf8encode),p=e.transformTo("string",i(b.name)),q=e.transformTo("string",m.utf8encode(b.name)),r=b.comment||"",s=e.transformTo("string",i(r)),u=e.transformTo("string",m.utf8encode(r)),v=q.length!==b.name.length,w=u.length!==r.length,x=b.options,y="",z="",C="";l=b._initialMetadata.dir!==b.dir?b.dir:x.dir,n=b._initialMetadata.date!==b.date?b.date:x.date;var D=0,E=0;l&&(D|=16),"UNIX"===h?(E=798,D|=A(b.unixPermissions,l)):(E=20,D|=B(b.dosPermissions,l)),j=n.getHours(),j<<=6,j|=n.getMinutes(),j<<=5,j|=n.getSeconds()/2,k=n.getFullYear()-1980,k<<=4,k|=n.getMonth()+1,k<<=5,k|=n.getDate(),v&&(z=t(1,1)+t(f(p),4)+q,y+="up"+t(z.length,2)+z),w&&(C=t(1,1)+t(this.crc32(s),4)+u,y+="uc"+t(C.length,2)+C);var F="";F+="\n\x00",F+=o||!v&&!w?"\x00\x00":"\x00\b",F+=c.compressionMethod,F+=t(j,2),F+=t(k,2),F+=t(c.crc32,4),F+=t(c.compressedSize,4),F+=t(c.uncompressedSize,4),F+=t(p.length,2),F+=t(y.length,2);var G=g.LOCAL_FILE_HEADER+F+p+y,H=g.CENTRAL_FILE_HEADER+t(E,2)+F+t(s.length,2)+"\x00\x00\x00\x00"+t(D,4)+t(d,4)+p+y+s;return{fileRecord:G,dirRecord:H,compressedObject:c}},D={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,f,g=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],f=new s(d.name,d._data,e.extend(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,f)&&g.push(f));return g},file:function(a,b,c){if(1===arguments.length){if(e.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.dir&&d.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(e.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=y.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;dh;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));e.uint8array?b.push(k(a.subarray(c,h))):b.push(k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":12,"./support":18,"./utils":22}],22:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)},c.extend=function(){var a,b,c={};for(a=0;ae;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;aa){var b=!this.isSignature(0,j.LOCAL_FILE_HEADER);throw b?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(a);var c=a;if(this.checkSignature(j.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(j.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(a),this.checkSignature(j.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,j.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(j.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(j.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var e=c-d;if(e>0)this.isSignature(c,j.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(0>e)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(a){var b=i.getTypeOf(a);if(i.checkSupport(b),"string"!==b||l.uint8array)if("nodebuffer"===b)this.reader=new f(a);else if(l.uint8array)this.reader=new g(i.transformTo("uint8array",a));else{if(!l.array)throw new Error("Unexpected error: unsupported type '"+b+"'");this.reader=new h(i.transformTo("array",a))}else this.reader=new e(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=d},{"./arrayReader":1,"./nodeBufferReader":13,"./object":14,"./signature":15,"./stringReader":16,"./support":18,"./uint8ArrayReader":19,"./utils":22,"./zipEntry":24}],24:[function(a,b,c){"use strict";function d(a,b){this.options=a,this.loadOptions=b}var e=a("./stringReader"),f=a("./utils"),g=a("./compressedObject"),h=a("./object"),i=a("./support"),j=0,k=3;d.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,e){return function(){var a=f.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==e)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=f.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");if(this.decompressed=new g,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=f.transformTo("string",this.decompressed.getContent()), +h.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readInt(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readData(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),a===j&&(this.dosPermissions=63&this.externalFileAttributes),a===k&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(a){if(this.extraFields[1]){var b=new e(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);b.header&&h.deflateSetHeader(this.strm,b.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d===r?(this.onEnd(p),e.avail_out=0,!0):!0},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":28,"./utils/strings":29,"./zlib/deflate":33,"./zlib/messages":38,"./zlib/zstream":40}],27:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l=this.strm,m=this.options.chunkSize,o=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?l.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?l.input=new Uint8Array(a):l.input=a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new h.Buf8(m),l.next_out=0,l.avail_out=m),c=g.inflate(l,j.Z_NO_FLUSH),c===j.Z_BUF_ERROR&&o===!0&&(c=j.Z_OK,o=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&c!==j.Z_STREAM_END&&(0!==l.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(l.output,l.next_out),f=l.next_out-e,k=i.buf2string(l.output,e),l.next_out=f,l.avail_out=m-f,f&&h.arraySet(l.output,l.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(o=!0)}while((l.avail_in>0||0===l.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d===j.Z_SYNC_FLUSH?(this.onEnd(j.Z_OK),l.avail_out=0,!0):!0},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":28,"./utils/strings":29,"./zlib/constants":31,"./zlib/gzheader":34,"./zlib/inflate":36,"./zlib/messages":38,"./zlib/zstream":40}],28:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],29:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":28}],30:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],31:[function(a,b,c){"use strict";b.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}},{}],32:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;g>h;h++)a=a>>>8^e[255&(a^b[h])];return-1^a}var f=d();b.exports=e},{}],33:[function(a,b,c){"use strict";function d(a,b){return a.msg=H[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(D.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){E._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,D.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=F(a.adler,b,e,c):2===a.state.wrap&&(a.adler=G(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ka?a.strstart-(a.w_size-ka):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ja,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ja-(m-f),f=m-ja,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ka)){D.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ia)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===I)return ta;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ta;if(a.strstart-a.block_start>=a.w_size-ka&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ta:ta}function o(a,b){for(var c,d;;){if(a.lookahead=ia&&(a.ins_h=(a.ins_h<=ia)if(d=E._tr_tally(a,a.strstart-a.match_start,a.match_length-ia),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ia){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=ia&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=ia-1)),a.prev_length>=ia&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ia,d=E._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ia),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=ia&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ja;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ja-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ia?(c=E._tr_tally(a,1,a.match_length-ia),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===I)return ta;break}if(a.match_length=0,c=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=C[a.level].max_lazy,a.good_match=C[a.level].good_length,a.nice_match=C[a.level].nice_length,a.max_chain_length=C[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ia-1,a.match_available=0,a.ins_h=0}function u(){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=Z,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 D.Buf16(2*ga),this.dyn_dtree=new D.Buf16(2*(2*ea+1)),this.bl_tree=new D.Buf16(2*(2*fa+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new D.Buf16(ha+1),this.heap=new D.Buf16(2*da+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new D.Buf16(2*da+1),f(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 v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Y,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?ma:ra,a.adler=2===b.wrap?0:1,b.last_flush=I,E._tr_init(b),N):d(a,P)}function w(a){var b=v(a);return b===N&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?P:(a.state.gzhead=b,N):P}function y(a,b,c,e,f,g){if(!a)return P;var h=1;if(b===S&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>$||c!==Z||8>e||e>15||0>b||b>9||0>g||g>W)return d(a,P);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,Z,_,aa,X)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>M||0>b)return a?d(a,P):P;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===sa&&b!==L)return d(a,0===a.avail_out?R:P);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===ma)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=U||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=G(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=na):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=U||h.level<2?4:0),i(h,xa),h.status=ra);else{var m=Z+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=U||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=la),m+=31-m%31,h.status=ra,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===na)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=qa)}else h.status=qa;if(h.status===qa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=ra)):h.status=ra),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,N}else if(0===a.avail_in&&e(b)<=e(c)&&b!==L)return d(a,R);if(h.status===sa&&0!==a.avail_in)return d(a,R);if(0!==a.avail_in||0!==h.lookahead||b!==I&&h.status!==sa){var o=h.strategy===U?r(h,b):h.strategy===V?q(h,b):C[h.level].func(h,b);if(o!==va&&o!==wa||(h.status=sa),o===ta||o===va)return 0===a.avail_out&&(h.last_flush=-1),N;if(o===ua&&(b===J?E._tr_align(h):b!==M&&(E._tr_stored_block(h,0,0,!1),b===K&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,N}return b!==L?N:h.wrap<=0?O:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?N:O)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa?d(a,P):(a.state=null,b===ra?d(a,Q):N)):P}var C,D=a("../utils/common"),E=a("./trees"),F=a("./adler32"),G=a("./crc32"),H=a("./messages"),I=0,J=1,K=3,L=4,M=5,N=0,O=1,P=-2,Q=-3,R=-5,S=-1,T=1,U=2,V=3,W=4,X=0,Y=2,Z=8,$=9,_=15,aa=8,ba=29,ca=256,da=ca+1+ba,ea=30,fa=19,ga=2*da+1,ha=15,ia=3,ja=258,ka=ja+ia+1,la=32,ma=42,na=69,oa=73,pa=91,qa=103,ra=113,sa=666,ta=1,ua=2,va=3,wa=4,xa=3;C=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":28,"./adler32":30,"./crc32":32,"./messages":38,"./trees":39}],34:[function(a,b,c){"use strict";function d(){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}b.exports=d},{}],35:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],36:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){ +if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":28}],38:[function(a,b,c){"use strict";b.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"}},{}],39:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return 256>a?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;W>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;V>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0;for(d=1;W>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;Q-1>d;d++)for(ka[d]=c,a=0;a<1<d;d++)for(la[d]=f,a=0;a<1<>=7;T>d;d++)for(la[d]=f<<7,a=0;a<1<=b;b++)g[b]=0;for(a=0;143>=a;)ga[2*a+1]=8,a++,g[8]++;for(;255>=a;)ga[2*a+1]=9,a++,g[9]++;for(;279>=a;)ga[2*a+1]=7,a++,g[7]++;for(;287>=a;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;T>a;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;S>b;b++)a.dyn_ltree[2*b]=0;for(b=0;T>b;b++)a.dyn_dtree[2*b]=0;for(b=0;U>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):10>=h?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;c>=d;d++)if(e=g,g=b[2*(d+1)+1],!(++hh){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):10>=h?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;d>e;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;R>b;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[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],ca=[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],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":28}],40:[function(a,b,c){"use strict";function d(){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}b.exports=d},{}]},{},[10])(10)}); \ No newline at end of file From ea9e8d43846b78e3d4c7a2b7515ce942fe50acef Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 3 Feb 2023 14:27:59 +0100 Subject: [PATCH 07/15] Delete .key --- .key | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .key diff --git a/.key b/.key deleted file mode 100644 index 905cf23a..00000000 --- a/.key +++ /dev/null @@ -1 +0,0 @@ -onLmA_LND5S8jNSvi8nNSGwevE13f7t8pW-wgWAXZgo= \ No newline at end of file From cf9a7d538fe39ea356138722f566dfd04bae8b54 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 3 Feb 2023 14:28:59 +0100 Subject: [PATCH 08/15] Add .key file to ignored files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 14da8a03..1d473adf 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ cps/cache .idea/ *.bak *.log.* +.key settings.yaml gdrive_credentials From 1dd638a78675a180755b5a842733371002a0129c Mon Sep 17 00:00:00 2001 From: mapi68 <41143572+mapi68@users.noreply.github.com> Date: Sat, 4 Feb 2023 20:39:36 +0100 Subject: [PATCH 09/15] Update messages.po --- cps/translations/it/LC_MESSAGES/messages.po | 903 +++++++++++--------- 1 file changed, 520 insertions(+), 383 deletions(-) diff --git a/cps/translations/it/LC_MESSAGES/messages.po b/cps/translations/it/LC_MESSAGES/messages.po index de3de48a..381e50b6 100644 --- a/cps/translations/it/LC_MESSAGES/messages.po +++ b/cps/translations/it/LC_MESSAGES/messages.po @@ -2,47 +2,46 @@ # Copyright (C) 2016 Smart Cities Community # This file is distributed under the same license as the Calibre-Web # Juan F. Villa , 2016. +# Massimo Pissarello , 2023. msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" "POT-Creation-Date: 2023-01-22 13:52+0100\n" -"PO-Revision-Date: 2017-04-04 15:09+0200\n" -"Last-Translator: ElQuimm \n" +"PO-Revision-Date: 2023-02-04 20:25+0100\n" +"Last-Translator: Massimo Pissarello \n" "Language: it\n" -"Language-Team: \n" +"Language-Team: Italian <>\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Lokalize 22.12.1\n" #: cps/about.py:84 msgid "Statistics" msgstr "Statistiche" #: cps/admin.py:148 -#, fuzzy msgid "Server restarted, please reload page." msgstr "Server riavviato, per favore ricarica la pagina" #: cps/admin.py:150 -#, fuzzy msgid "Performing Server shutdown, please close window." msgstr "Eseguo l'arresto del server, per favore chiudi la finestra" #: cps/admin.py:158 msgid "Success! Database Reconnected" -msgstr "" +msgstr "OK! Database riconnesso" #: cps/admin.py:161 msgid "Unknown command" msgstr "Comando sconosciuto" #: cps/admin.py:172 -#, fuzzy msgid "Success! Books queued for Metadata Backup" -msgstr "Libro accodato con successo per il backup dei metadati" +msgstr "OK! Libri in coda per il backup dei metadati" #: cps/admin.py:205 cps/editbooks.py:576 cps/editbooks.py:578 #: cps/editbooks.py:614 cps/editbooks.py:631 cps/editbooks.py:1238 @@ -77,12 +76,12 @@ msgstr "Utente non trovato" #: cps/admin.py:407 msgid "{} users deleted successfully" -msgstr "{} utente eliminato con successo" +msgstr "{} utenti eliminati con successo" #: cps/admin.py:430 cps/templates/config_view_edit.html:133 #: cps/templates/user_edit.html:45 cps/templates/user_table.html:81 msgid "Show All" -msgstr "tutte le lingue presenti" +msgstr "Mostra tutto" #: cps/admin.py:451 cps/admin.py:457 msgid "Malformed request" @@ -98,11 +97,13 @@ msgstr "L'utente Guest (ospite) non può avere questo ruolo" #: cps/admin.py:493 cps/admin.py:1953 msgid "No admin user remaining, can't remove admin role" -msgstr "Non rimarrebbe nessun utente amministratore, non posso rimuovere il ruolo di amministratore" +msgstr "" +"Non rimarrebbe nessun utente amministratore, non posso rimuovere il ruolo di" +" amministratore" #: cps/admin.py:497 cps/admin.py:511 msgid "Value has to be true or false" -msgstr "Il valore deve essere o vero o flaso" +msgstr "Il valore deve essere o vero o falso" #: cps/admin.py:499 msgid "Invalid role" @@ -110,15 +111,17 @@ msgstr "Ruolo non valido" #: cps/admin.py:503 msgid "Guest can't have this view" -msgstr "L'utente Guest (ospite) non può avere questa schermata" +msgstr "L'utente Guest (ospite) non può visualizzare questa schermata" #: cps/admin.py:513 msgid "Invalid view" -msgstr "Visualizzazione invalida" +msgstr "Visualizzazione non valida" #: cps/admin.py:516 msgid "Guest's Locale is determined automatically and can't be set" -msgstr "Le impostazioni locali dell'utente Guest (ospite) sono determinate automaticamente e non possono essere configurate" +msgstr "" +"Le impostazioni locali dell'utente Guest (ospite) sono determinate" +" automaticamente e non possono essere configurate" #: cps/admin.py:520 msgid "No Valid Locale Given" @@ -162,39 +165,66 @@ msgstr "Vuoi veramente eliminare questo scaffale?" #: cps/admin.py:616 msgid "Are you sure you want to change locales of selected user(s)?" -msgstr "Sei sicuro di voler modificare le impostazioni locali del/degli utente/i selezionato/i?" +msgstr "" +"Sei sicuro di voler modificare le impostazioni locali del/degli utente/i" +" selezionato/i?" #: cps/admin.py:618 -msgid "Are you sure you want to change visible book languages for selected user(s)?" -msgstr "Sei sicuro di voler modificare le impostazioni delle lingue visualizzabili del/degli utente/i selezionato/i?" +msgid "" +"Are you sure you want to change visible book languages for selected user(s)?" +msgstr "" +"Sei sicuro di voler modificare le impostazioni delle lingue visualizzabili" +" dall'/dagli utente/i selezionato/i?" #: cps/admin.py:620 -msgid "Are you sure you want to change the selected role for the selected user(s)?" -msgstr "Sei sicuro di voler modificare il ruolo evidenziato del/degli utente/i selezionato/i?" +msgid "" +"Are you sure you want to change the selected role for the selected user(s)?" +msgstr "" +"Sei sicuro di voler modificare il ruolo evidenziato del/degli utente/i" +" selezionato/i?" #: cps/admin.py:622 -msgid "Are you sure you want to change the selected restrictions for the selected user(s)?" -msgstr "Sei sicuro di voler modificare le restrizioni selezionate del/degli utente/i selezionato/i?" +msgid "" +"Are you sure you want to change the selected restrictions for the selected" +" user(s)?" +msgstr "" +"Sei sicuro di voler modificare le restrizioni selezionate del/degli utente/i" +" selezionato/i?" #: cps/admin.py:624 -msgid "Are you sure you want to change the selected visibility restrictions for the selected user(s)?" -msgstr "Sei sicuro di voler modificare le restrizioni di visualizzazione del/degli utente/i selezionato/i?" +msgid "" +"Are you sure you want to change the selected visibility restrictions for the" +" selected user(s)?" +msgstr "" +"Sei sicuro di voler modificare le restrizioni di visibilità selezionate per" +" l'utente(i) selezionato(i)?" #: cps/admin.py:627 -msgid "Are you sure you want to change shelf sync behavior for the selected user(s)?" -msgstr "Sei sicuro di voler modificare il comportamento di sincronizzazione dello scaffale per l'/gli utente/i selezionato/i?" +msgid "" +"Are you sure you want to change shelf sync behavior for the selected user(s)?" +msgstr "" +"Sei sicuro di voler modificare il comportamento di sincronizzazione dello" +" scaffale per l'/gli utente/i selezionato/i?" #: cps/admin.py:629 msgid "Are you sure you want to change Calibre library location?" msgstr "Sei sicuro di voler modificare la posizione della libreria di Calibre?" #: cps/admin.py:631 -msgid "Calibre-Web will search for updated Covers and update Cover Thumbnails, this may take a while?" -msgstr "Calibre-Web cercherà le copertine aggiornate e aggiornerà le miniature delle copertine, questo richiederà un po' di tempo." +msgid "" +"Calibre-Web will search for updated Covers and update Cover Thumbnails, this" +" may take a while?" +msgstr "" +"Calibre-Web cercherà le copertine aggiornate e aggiornerà le miniature delle" +" copertine, questo richiederà un po' di tempo." #: cps/admin.py:634 -msgid "Are you sure you want delete Calibre-Web's sync database to force a full sync with your Kobo Reader?" -msgstr "Sei sicuro di voler eliminare il database sincoronizzato di Calibre-Web e forzare una sincronizzazione completa con il tuo lettore Kobo?" +msgid "" +"Are you sure you want delete Calibre-Web's sync database to force a full sync" +" with your Kobo Reader?" +msgstr "" +"Sei sicuro di voler eliminare il database sincronizzato di Calibre-Web e" +" forzare una sincronizzazione completa con il tuo lettore Kobo?" #: cps/admin.py:877 cps/admin.py:883 cps/admin.py:893 cps/admin.py:903 #: cps/templates/modal_dialogs.html:29 cps/templates/user_table.html:41 @@ -210,7 +240,7 @@ msgstr "Permetti" #: cps/admin.py:920 msgid "{} sync entries deleted" -msgstr "{} eliminate voci di sincronizzazione" +msgstr "{} voci di sincronizzazione eliminate" #: cps/admin.py:968 msgid "Tag not found" @@ -226,11 +256,15 @@ msgstr "client_secrets.json non è configurato per Web Application" #: cps/admin.py:1154 msgid "Logfile Location is not Valid, Please Enter Correct Path" -msgstr "La posizione del Logfile non è valida, per favore indica il percorso corretto" +msgstr "" +"La posizione del file di log non è valida, per favore indica il percorso" +" corretto" #: cps/admin.py:1160 msgid "Access Logfile Location is not Valid, Please Enter Correct Path" -msgstr "La posizione dell'Access Logfile non è valida, per favore indica il percorso corretto" +msgstr "" +"La posizione del file di log di accesso non è valida, per favore indica il" +" percorso corretto" #: cps/admin.py:1190 msgid "Please Enter a LDAP Provider, Port, DN and User Object Identifier" @@ -251,7 +285,8 @@ msgstr "LDAP Group Object Filter deve avere un \"%s\" Format Identifier" #: cps/admin.py:1206 msgid "LDAP Group Object Filter Has Unmatched Parenthesis" -msgstr "LDAP Group Object Filter contiene una parentesi senza la corrispettiva" +msgstr "" +"LDAP Group Object Filter contiene una parentesi senza la corrispondenza" #: cps/admin.py:1210 #, python-format @@ -260,7 +295,7 @@ msgstr "LDAP User Object Filter deve avere un \"%s\" Format Identifier" #: cps/admin.py:1212 msgid "LDAP User Object Filter Has Unmatched Parenthesis" -msgstr "LDAP User Object Filter contiene una parentesi senza la corrispettiva" +msgstr "LDAP User Object Filter contiene una parentesi senza la corrispondenza" #: cps/admin.py:1219 #, python-format @@ -269,11 +304,15 @@ msgstr "LDAP Member User Filter deve avere un \"%s\" Format Identifier" #: cps/admin.py:1221 msgid "LDAP Member User Filter Has Unmatched Parenthesis" -msgstr "LDAP Member User Filter contiene una parentesi senza la corrispettiva" +msgstr "LDAP Member User Filter contiene una parentesi senza la corrispondenza" #: cps/admin.py:1228 -msgid "LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter Correct Path" -msgstr "LDAP CACertificate, il certificato o la posizione della chiave non sono corretti, per favore indica il percorso corretto" +msgid "" +"LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter" +" Correct Path" +msgstr "" +"LDAP CACertificate, il certificato o la posizione della chiave non sono" +" corretti, per favore indica il percorso corretto" #: cps/admin.py:1259 cps/templates/admin.html:53 msgid "Add New User" @@ -285,7 +324,7 @@ msgstr "Modifica le impostazioni del server e-mail" #: cps/admin.py:1287 msgid "Success! Gmail Account Verified." -msgstr "" +msgstr "OK! Account Gmail verificato." #: cps/admin.py:1306 cps/admin.py:1309 cps/admin.py:1690 cps/admin.py:1808 #: cps/admin.py:1906 cps/admin.py:2026 cps/editbooks.py:229 @@ -298,8 +337,11 @@ msgstr "Errore nel database: %(error)s." #: cps/admin.py:1316 #, python-format -msgid "Test e-mail queued for sending to %(email)s, please check Tasks for result" -msgstr "L'e-mail di test è stato accodato con successo per essere spedito a %(email)s, per favore verifica tramite il pulsante 'Compito' il risultato" +msgid "" +"Test e-mail queued for sending to %(email)s, please check Tasks for result" +msgstr "" +"L'e-mail di test è stato accodata con successo per essere spedita a " +"%(email)s, per favore verifica tramite il pulsante 'Attività' il risultato" #: cps/admin.py:1319 #, python-format @@ -312,7 +354,7 @@ msgstr "Per favore prima configura il tuo indirizzo e-mail..." #: cps/admin.py:1323 msgid "Email Server Settings updated" -msgstr "Configurazione del server e-mail aggiornata" +msgstr "Le impostazioni del server e-mail sono state aggiornate" #: cps/admin.py:1346 cps/templates/admin.html:191 msgid "Edit Scheduled Tasks Settings" @@ -345,34 +387,33 @@ msgid "Edit User %(nick)s" msgstr "Modifica l'utente %(nick)s" #: cps/admin.py:1428 -#, fuzzy, python-format +#, python-format msgid "Success! Password for user %(user)s reset" -msgstr "La password dell'utente %(user)s è stata resettata" +msgstr "OK! Reimpostazione della password per l'utente %(user)s" #: cps/admin.py:1434 -#, fuzzy msgid "Oops! Please configure the SMTP mail settings." -msgstr "Configura dapprima le impostazioni del server SMTP..." +msgstr "Configura prima le impostazioni del server SMTP." #: cps/admin.py:1445 msgid "Logfile viewer" -msgstr "Visualizzatore del Logfile" +msgstr "Visualizzatore del file di log" #: cps/admin.py:1511 msgid "Requesting update package" -msgstr "Richiedo il pacchetto di aggiornamento" +msgstr "Richiesta del pacchetto di aggiornamento" #: cps/admin.py:1512 msgid "Downloading update package" -msgstr "Scarico il pacchetto di aggiornamento" +msgstr "Download del pacchetto di aggiornamento" #: cps/admin.py:1513 msgid "Unzipping update package" -msgstr "Decomprimo il pacchetto di aggiornamento" +msgstr "Decompressione del pacchetto di aggiornamento" #: cps/admin.py:1514 msgid "Replacing files" -msgstr "Sostituisco i file" +msgstr "Sostituzione dei file" #: cps/admin.py:1515 msgid "Database connections are closed" @@ -380,7 +421,7 @@ msgstr "Le connessioni al database sono chiuse" #: cps/admin.py:1516 msgid "Stopping server" -msgstr "Arresto il server" +msgstr "Arresto del server" #: cps/admin.py:1517 msgid "Update finished, please press okay and reload page" @@ -409,7 +450,8 @@ msgstr "Errore generale" #: cps/admin.py:1522 msgid "Update file could not be saved in temp dir" -msgstr "Il file di aggiornamento non può essere salvato nella cartella temporanea" +msgstr "" +"Il file di aggiornamento non può essere salvato nella cartella temporanea" #: cps/admin.py:1523 msgid "Files could not be replaced during update" @@ -417,11 +459,11 @@ msgstr "Durante l'aggiornamento non è stato possibile sostituire alcuni file" #: cps/admin.py:1547 msgid "Failed to extract at least One LDAP User" -msgstr "Fallita l'estrazione di almeno un utente LDAP" +msgstr "Impossibile estrarre almeno un utente LDAP" #: cps/admin.py:1592 msgid "Failed to Create at Least One LDAP User" -msgstr "Fallita la creazione di almeno un utente LDAP" +msgstr "Impossibile creare almeno un utente LDAP" #: cps/admin.py:1605 #, python-format @@ -434,7 +476,7 @@ msgstr "Errore: nessun utente restituito in risposta dal server LDAP" #: cps/admin.py:1642 msgid "At Least One LDAP User Not Found in Database" -msgstr "Almeno un utente LDAP non è stato trovato nel database" +msgstr "Non è stato trovato nessun utente LDAP nel database" #: cps/admin.py:1644 msgid "{} User Successfully Imported" @@ -442,7 +484,8 @@ msgstr "{} utente importato con successo" #: cps/admin.py:1702 msgid "DB Location is not Valid, Please Enter Correct Path" -msgstr "La posizione del DB non è valida, per favore indica il percorso corretto" +msgstr "" +"La posizione del DB non è valida, per favore indica il percorso corretto" #: cps/admin.py:1722 msgid "DB is not Writeable" @@ -450,19 +493,21 @@ msgstr "Il DB non è scrivibile" #: cps/admin.py:1735 msgid "Keyfile Location is not Valid, Please Enter Correct Path" -msgstr "La posizione del Keyfile non è valida, per favore indica il percorso corretto" +msgstr "" +"La posizione del Keyfile non è valida, per favore indica il percorso corretto" #: cps/admin.py:1739 msgid "Certfile Location is not Valid, Please Enter Correct Path" -msgstr "La posizione del Certfile non è valida, per favore indica il percorso corretto" +msgstr "" +"La posizione del Certfile non è valida, per favore indica il percorso corretto" #: cps/admin.py:1847 msgid "Database Settings updated" -msgstr "Configurazione del Database aggiornata" +msgstr "Impostazioni database aggiornate" #: cps/admin.py:1855 msgid "Database Configuration" -msgstr "Configurazione del Database" +msgstr "Configurazione del database" #: cps/admin.py:1871 cps/web.py:1235 msgid "Oops! Please complete all fields." @@ -483,7 +528,7 @@ msgstr "L'utente '%(user)s' è stato creato" #: cps/admin.py:1902 msgid "Oops! An account already exists for this Email. or name." -msgstr "Trovato un account esistente con questo e-mail o nome di utente" +msgstr "Trovato un account esistente con questa e-mail o nome utente" #: cps/admin.py:1932 #, python-format @@ -496,11 +541,13 @@ msgstr "Non posso eliminare l'utente Guest (ospite)" #: cps/admin.py:1938 msgid "No admin user remaining, can't delete user" -msgstr "Non rimarrebbe nessun utente amministratore, non posso eliminare l'utente" +msgstr "" +"Non rimarrebbe nessun utente amministratore, non posso eliminare l'utente" #: cps/admin.py:1992 cps/web.py:1373 msgid "Email can't be empty and has to be a valid Email" -msgstr "L'indirizzo e-mail non può essere vuoto e deve essere un recapito valido" +msgstr "" +"L'indirizzo e-mail non può essere vuoto e deve essere un recapito valido" #: cps/admin.py:2018 #, python-format @@ -516,9 +563,10 @@ msgid "Execution permissions missing" msgstr "Mancano i permessi di esecuzione" #: cps/db.py:728 cps/search.py:137 cps/web.py:725 -#, fuzzy, python-format +#, python-format msgid "Custom Column No.%(column)d does not exist in calibre database" -msgstr "La colonna personalizzata no.%(column)d non esiste nel database di Calibre" +msgstr "" +"La colonna personalizzata no.%(column)d non esiste nel database di Calibre" #: cps/db.py:971 cps/templates/config_edit.html:204 #: cps/templates/config_view_edit.html:62 cps/templates/email_edit.html:41 @@ -529,8 +577,10 @@ msgstr "Nessuna" #: cps/editbooks.py:110 cps/editbooks.py:895 cps/web.py:519 cps/web.py:1464 #: cps/web.py:1506 cps/web.py:1551 -msgid "Oops! Selected book is unavailable. File does not exist or is not accessible" -msgstr "Errore durante l'apertura del libro selezionato. Il file non esiste o il file non è accessibile" +msgid "" +"Oops! Selected book is unavailable. File does not exist or is not accessible" +msgstr "" +"Il libro selezionato non è disponibile. Il file non esiste o non è accessibile" #: cps/editbooks.py:154 cps/editbooks.py:1221 msgid "User has no rights to upload cover" @@ -538,7 +588,9 @@ msgstr "L'utente non ha i permessi per caricare le copertine" #: cps/editbooks.py:174 cps/editbooks.py:716 msgid "Identifiers are not Case Sensitive, Overwriting Old Identifier" -msgstr "Gli identificatori non tengono conto delle lettere maiuscole o minuscole, sovrascrivo l'identificatore precedente" +msgstr "" +"Gli identificatori non fanno distinzione tra maiuscole e minuscole," +" sovrascrivendo il vecchio identificatore" #: cps/editbooks.py:216 msgid "Metadata successfully updated" @@ -555,7 +607,9 @@ msgstr "Il file %(file)s è stato caricato" #: cps/editbooks.py:318 msgid "Source or destination format for conversion missing" -msgstr "Mancano o il formato sorgente o quello di destinazione, entrambi necessari alla conversione" +msgstr "" +"Mancano o il formato sorgente o quello di destinazione, entrambi necessari" +" alla conversione" #: cps/editbooks.py:326 #, python-format @@ -568,8 +622,12 @@ msgid "There was an error converting this book: %(res)s" msgstr "Si è verificato un errore durante la conversione del libro: %(res)s" #: cps/editbooks.py:635 -msgid "Uploaded book probably exists in the library, consider to change before upload new: " -msgstr "Probabilmente il libro caricato esiste già nella libreria; considera di cambiarlo prima di sottoporlo nuovamente: " +msgid "" +"Uploaded book probably exists in the library, consider to change before" +" upload new: " +msgstr "" +"Probabilmente il libro caricato esiste già nella libreria, cambialo prima di" +" caricarlo nuovamente:" #: cps/editbooks.py:690 cps/editbooks.py:1015 #, python-format @@ -579,7 +637,8 @@ msgstr "%(langname)s non è una lingua valida" #: cps/editbooks.py:728 cps/editbooks.py:1162 #, python-format msgid "File extension '%(ext)s' is not allowed to be uploaded to this server" -msgstr "Non è consentito caricare file con l'estensione '%(ext)s' su questo server" +msgstr "" +"Non è consentito caricare file con l'estensione '%(ext)s' su questo server" #: cps/editbooks.py:732 cps/editbooks.py:1166 msgid "File to be uploaded must have an extension" @@ -601,11 +660,11 @@ msgstr "Il formato del libro è stato eliminato con successo" #: cps/editbooks.py:826 cps/editbooks.py:828 msgid "Book Successfully Deleted" -msgstr "Il libro é stato eliminato con successo" +msgstr "Il libro è stato eliminato con successo" #: cps/editbooks.py:880 msgid "You are missing permissions to delete books" -msgstr "Non disponi delle autorizzazioni per eliminare libri" +msgstr "Mancano le autorizzazioni per eliminare i libri" #: cps/editbooks.py:930 msgid "edit metadata" @@ -614,7 +673,7 @@ msgstr "modifica i metadati" #: cps/editbooks.py:979 #, python-format msgid "%(seriesindex)s is not a valid number, skipping" -msgstr "%(seriesindex)s non è un numero valido, vado oltre" +msgstr "%(seriesindex)s non è un numero valido, lo salto" #: cps/editbooks.py:1157 msgid "User has no rights to upload additional file formats" @@ -623,7 +682,7 @@ msgstr "L'utente non ha i permessi per caricare formati di file aggiuntivi" #: cps/editbooks.py:1178 #, python-format msgid "Failed to create path %(path)s (Permission denied)." -msgstr "Impossibile creare la cartella %(path)s (autorizzazione negata)." +msgstr "Impossibile creare il percorso %(path)s (autorizzazione negata)." #: cps/editbooks.py:1183 #, python-format @@ -636,12 +695,20 @@ msgid "File format %(ext)s added to %(book)s" msgstr "Ho aggiunto il formato %(ext)s al libro %(book)s" #: cps/gdrive.py:58 -msgid "Google Drive setup not completed, try to deactivate and activate Google Drive again" -msgstr "La configurazione di Google Drive non è stata completata correttamente. Prova a disattivare e riattivare nuovamente Google Drive" +msgid "" +"Google Drive setup not completed, try to deactivate and activate Google Drive" +" again" +msgstr "" +"La configurazione di Google Drive non è stata completata correttamente. Prova" +" a disattivare e riattivare nuovamente Google Drive" #: cps/gdrive.py:95 -msgid "Callback domain is not verified, please follow steps to verify domain in google developer console" -msgstr "Callback domain non è stato verificato. Per favore intraprendi il necessario per verificare il dominio nella developer console di Google" +msgid "" +"Callback domain is not verified, please follow steps to verify domain in" +" google developer console" +msgstr "" +"Il dominio di callback non è stato verificato. Per favore segui i passaggi" +" per verificare il dominio nella console per sviluppatori di Google" #: cps/helper.py:80 #, python-format @@ -661,46 +728,43 @@ msgstr "%(format)s non trovato: %(fn)s" #: cps/helper.py:97 cps/helper.py:226 cps/templates/detail.html:42 #: cps/templates/detail.html:46 msgid "Send to eReader" -msgstr "Invia al lettore elettronico" +msgstr "Invia all'eReader" #: cps/helper.py:98 cps/helper.py:116 cps/helper.py:228 -#, fuzzy msgid "This Email has been sent via Calibre-Web." -msgstr "Questo e-mail è stato spedito tramite Calibre-Web." +msgstr "Questa e-mail è stata inviata tramite Calibre-Web." #: cps/helper.py:114 -#, fuzzy msgid "Calibre-Web Test Email" -msgstr "E-mail di test da Calibre-Web" +msgstr "E-mail di prova di Calibre-Web" #: cps/helper.py:115 -#, fuzzy msgid "Test Email" -msgstr "E-mail di test" +msgstr "E-mail di prova" #: cps/helper.py:132 msgid "Get Started with Calibre-Web" msgstr "Inizia con Calibre-Web" #: cps/helper.py:137 -#, fuzzy, python-format +#, python-format msgid "Registration Email for user: %(name)s" -msgstr "E-mail di registrazione dell'utente: %(name)s" +msgstr "E-mail di registrazione per l'utente: %(name)s" #: cps/helper.py:148 cps/helper.py:154 -#, fuzzy, python-format +#, python-format msgid "Convert %(orig)s to %(format)s and send to eReader" -msgstr "Converti %(orig)s in %(format)s e al lettore elettronico" +msgstr "Converti %(orig)s in %(format)s e invia all'eReader" #: cps/helper.py:173 cps/helper.py:177 cps/helper.py:181 cps/helper.py:185 -#, fuzzy, python-format +#, python-format msgid "Send %(format)s to eReader" -msgstr "Invia %(format)s al lettore elettronico" +msgstr "Invia %(format)s all'eReader" #: cps/helper.py:225 -#, fuzzy, python-format +#, python-format msgid "%(book)s send to eReader" -msgstr "%(book)s inviato al lettore elettronico" +msgstr "%(libro)s inviato all'eReader" #: cps/helper.py:230 msgid "The requested file could not be read. Maybe wrong permissions?" @@ -712,8 +776,11 @@ msgstr "Impossibile impostare lo stato di lettura: {}" #: cps/helper.py:368 #, python-format -msgid "Deleting bookfolder for book %(id)s failed, path has subfolders: %(path)s" -msgstr "L'eliminazione della cartella del libro %(id)s non è riuscita, il percorso ha sottocartelle: %(path)s" +msgid "" +"Deleting bookfolder for book %(id)s failed, path has subfolders: %(path)s" +msgstr "" +"L'eliminazione della cartella del libro %(id)s non è riuscita, il percorso ha" +" delle sottocartelle: %(path)s" #: cps/helper.py:374 #, python-format @@ -722,13 +789,20 @@ msgstr "L'eliminazione del libro %(id)s non è riuscita: %(message)s" #: cps/helper.py:385 #, python-format -msgid "Deleting book %(id)s from database only, book path in database not valid: %(path)s" -msgstr "Eliminazione del libro %(id)s unicamente dal database. Il percorso del libro nel database non è valido: %(path)s" +msgid "" +"Deleting book %(id)s from database only, book path in database not valid: " +"%(path)s" +msgstr "" +"Eliminazione del libro %(id)s unicamente dal database. Il percorso del libro" +" nel database non è valido: %(path)s" #: cps/helper.py:450 -#, fuzzy, python-format -msgid "Rename author from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "La modifica del titolo da '%(src)s' a '%(dest)s' è terminata con l'errore: %(error)s" +#, python-format +msgid "" +"Rename author from: '%(src)s' to '%(dest)s' failed with error: %(error)s" +msgstr "" +"La modifica dell'autore da '%(src)s' a '%(dest)s' è terminata con l'errore: " +"%(error)s" #: cps/helper.py:522 cps/helper.py:531 #, python-format @@ -738,7 +812,9 @@ msgstr "File %(file)s non trovato su Google Drive" #: cps/helper.py:565 #, python-format msgid "Rename title from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "La modifica del titolo da '%(src)s' a '%(dest)s' è terminata con l'errore: %(error)s" +msgstr "" +"La modifica del titolo da '%(src)s' a '%(dest)s' è terminata con l'errore: " +"%(error)s" #: cps/helper.py:585 msgid "Error in rename file in path: {}" @@ -747,24 +823,26 @@ msgstr "Errore nel rinominare il file nel percorso: {}" #: cps/helper.py:603 #, python-format msgid "Book path %(path)s not found on Google Drive" -msgstr "Non ho trovato la cartella %(path)s del libro su Google Drive" +msgstr "Percorso del libro %(path)s non trovato su Google Drive" #: cps/helper.py:644 msgid "Found an existing account for this Email address" -msgstr "" +msgstr "Trovato un account esistente per questo indirizzo e-mail" #: cps/helper.py:652 msgid "This username is already taken" msgstr "Questo nome di utente è già utilizzato" #: cps/helper.py:664 -#, fuzzy msgid "Invalid Email address format" -msgstr "L'e-mail non è scritto in un formato valido" +msgstr "Formato dell'indirizzo e-mail non valido" #: cps/helper.py:815 -msgid "Python module 'advocate' is not installed but is needed for cover uploads" -msgstr "Il modulo Python 'advocate' non è installato, ma è necessario per caricare le copertine" +msgid "" +"Python module 'advocate' is not installed but is needed for cover uploads" +msgstr "" +"Il modulo Python 'advocate' non è installato, ma è necessario per caricare le" +" copertine" #: cps/helper.py:825 msgid "Error Downloading Cover" @@ -772,23 +850,30 @@ msgstr "Errore nello scaricare la copertina" #: cps/helper.py:828 msgid "Cover Format Error" -msgstr "Errore di formato della copertina" +msgstr "Errore nel formato della copertina" #: cps/helper.py:831 -msgid "You are not allowed to access localhost or the local network for cover uploads" -msgstr "Non sei autorizzato ad accedere a localhost o alla rete locale per caricare le copertine" +msgid "" +"You are not allowed to access localhost or the local network for cover uploads" +msgstr "" +"Non sei autorizzato ad accedere a localhost o alla rete locale per caricare" +" le copertine" #: cps/helper.py:841 msgid "Failed to create path for cover" -msgstr "Errore nel creare la cartella per la copertina" +msgstr "Errore nel creare il percorso per la copertina" #: cps/helper.py:857 msgid "Cover-file is not a valid image file, or could not be stored" -msgstr "Il file della copertina non è in un formato immagine valido o non può essere salvato" +msgstr "" +"Il file della copertina non è in un formato immagine valido o non può essere" +" salvato" #: cps/helper.py:868 msgid "Only jpg/jpeg/png/webp/bmp files are supported as coverfile" -msgstr "Solamente i file nei formati jpg/jpeg/png/webp/bmp sono supportati per le copertine" +msgstr "" +"Solamente i file nei formati jpg/jpeg/png/webp/bmp sono supportati per le" +" copertine" #: cps/helper.py:880 msgid "Invalid cover file content" @@ -815,8 +900,12 @@ msgid "Queue all books for metadata backup" msgstr "Metti in coda tutti i libri per il backup dei metadati" #: cps/kobo_auth.py:89 -msgid "Please access Calibre-Web from non localhost to get valid api_endpoint for kobo device" -msgstr "Per favore accedi a Calibe-Web non da localhost per ottenere un api-endpoint valido per il lettore kobo" +msgid "" +"Please access Calibre-Web from non localhost to get valid api_endpoint for" +" kobo device" +msgstr "" +"Per favore accedi a Calibe-Web non da localhost per ottenere un api-endpoint" +" valido per il lettore kobo" #: cps/kobo_auth.py:115 msgid "Kobo Setup" @@ -830,7 +919,7 @@ msgstr "Registra con %(provider)s" #: cps/oauth_bb.py:138 cps/remotelogin.py:130 cps/web.py:1293 cps/web.py:1331 #, python-format msgid "Success! You are now logged in as: %(nickname)s" -msgstr "ora sei connesso come: '%(nickname)s'" +msgstr "OK! Ora sei connesso come: %(nickname)s" #: cps/oauth_bb.py:148 #, python-format @@ -839,17 +928,18 @@ msgstr "Collegamento a %(oauth)s avvenuto con successo" #: cps/oauth_bb.py:155 msgid "Login failed, No User Linked With OAuth Account" -msgstr "Accesso non riuscito, non c'è un utente collegato all'account OAuth" +msgstr "" +"Accesso non riuscito, non c'è nessun utente collegato all'account OAuth" #: cps/oauth_bb.py:197 #, python-format msgid "Unlink to %(oauth)s Succeeded" -msgstr "Scollegamento da %(oauth)s avvenuto con successo" +msgstr "Scollegamento da %(oauth)s riuscito" #: cps/oauth_bb.py:202 #, python-format msgid "Unlink to %(oauth)s Failed" -msgstr "Scollegamento da %(oauth)s non riuscito" +msgstr "Scollegamento da %(oauth)s non riuscito" #: cps/oauth_bb.py:205 #, python-format @@ -858,19 +948,19 @@ msgstr "Non collegato a %(oauth)s" #: cps/oauth_bb.py:261 msgid "Failed to log in with GitHub." -msgstr "Accesso con GitHub non è riuscito." +msgstr "Impossibile accedere con GitHub." #: cps/oauth_bb.py:267 msgid "Failed to fetch user info from GitHub." -msgstr "Il recupero delle informazioni dell'utente da GitHub non è riuscito." +msgstr "Impossibile recuperare le informazioni utente da GitHub." #: cps/oauth_bb.py:279 msgid "Failed to log in with Google." -msgstr "L'accesso con Google non è riuscito." +msgstr "Impossibile accedere con Google." #: cps/oauth_bb.py:285 msgid "Failed to fetch user info from Google." -msgstr "Il recupero delle informazioni dell'utente da Google non è riuscito." +msgstr "Impossibile recuperare le informazioni utente da Google." #: cps/oauth_bb.py:332 msgid "GitHub Oauth error, please retry later." @@ -908,7 +998,7 @@ msgstr "Il token è scaduto" #: cps/remotelogin.py:92 msgid "Success! Please return to your device" -msgstr "Riuscito! Torna al tuo dispositivo" +msgstr "OK! Torna al tuo dispositivo" #: cps/render_template.py:40 cps/web.py:408 msgid "Books" @@ -916,15 +1006,15 @@ msgstr "Libri" #: cps/render_template.py:42 msgid "Show recent books" -msgstr "Mostra l'opzione per la selezione dei libri più recenti" +msgstr "Mostra i libri recenti" #: cps/render_template.py:43 cps/templates/index.xml:25 msgid "Hot Books" -msgstr "Libri popolari" +msgstr "Libri hot" #: cps/render_template.py:45 msgid "Show Hot Books" -msgstr "Mostra l'opzione per la selezione dei libri più popolari" +msgstr "Mostra i libri hot" #: cps/render_template.py:47 cps/render_template.py:52 msgid "Downloaded Books" @@ -933,15 +1023,15 @@ msgstr "Libri scaricati" #: cps/render_template.py:49 cps/render_template.py:54 #: cps/templates/user_table.html:167 msgid "Show Downloaded Books" -msgstr "Mostra l'opzione per la visualizzazione dei libri scaricati" +msgstr "Mostra i libri scaricati" #: cps/render_template.py:57 cps/templates/index.xml:32 cps/web.py:423 msgid "Top Rated Books" -msgstr "Libri meglio valutati" +msgstr "Libri più votati" #: cps/render_template.py:59 cps/templates/user_table.html:161 msgid "Show Top Rated Books" -msgstr "Mostra l'opzione per la selezione dei libri meglio valutati" +msgstr "Mostra i libri più votati" #: cps/render_template.py:60 cps/templates/index.xml:54 #: cps/templates/index.xml:58 cps/web.py:744 @@ -949,27 +1039,26 @@ msgid "Read Books" msgstr "Libri letti" #: cps/render_template.py:62 -#, fuzzy msgid "Show Read and Unread" -msgstr "Mostra l'opzione per la selezione letto e non letto" +msgstr "Mostra i libri letti e da leggere" #: cps/render_template.py:64 cps/templates/index.xml:61 #: cps/templates/index.xml:65 cps/web.py:747 msgid "Unread Books" -msgstr "Libri non letti" +msgstr "Libri da leggere" #: cps/render_template.py:66 msgid "Show unread" -msgstr "Mostra l'opzione per la selezione dei libri non letti" +msgstr "Mostra da leggere" #: cps/render_template.py:67 msgid "Discover" -msgstr "Per scoprire" +msgstr "Da scoprire" #: cps/render_template.py:69 cps/templates/index.xml:50 #: cps/templates/user_table.html:159 cps/templates/user_table.html:162 msgid "Show Random Books" -msgstr "Mostra libri casualmente" +msgstr "Mostra i libri casualmente" #: cps/render_template.py:70 cps/templates/book_table.html:67 #: cps/templates/index.xml:83 cps/web.py:1104 @@ -977,9 +1066,8 @@ msgid "Categories" msgstr "Categorie" #: cps/render_template.py:72 cps/templates/user_table.html:158 -#, fuzzy msgid "Show Category Section" -msgstr "Mostra l'opzione per la selezione delle categorie" +msgstr "Mostra la sezione delle categorie" #: cps/render_template.py:73 cps/templates/book_edit.html:91 #: cps/templates/book_table.html:68 cps/templates/index.xml:90 @@ -988,9 +1076,8 @@ msgid "Series" msgstr "Serie" #: cps/render_template.py:75 cps/templates/user_table.html:157 -#, fuzzy msgid "Show Series Section" -msgstr "Mostra l'opzione per la selezione delle serie" +msgstr "Mostra la sezione delle serie" #: cps/render_template.py:76 cps/templates/book_table.html:66 #: cps/templates/index.xml:69 @@ -998,9 +1085,8 @@ msgid "Authors" msgstr "Autori" #: cps/render_template.py:78 cps/templates/user_table.html:160 -#, fuzzy msgid "Show Author Section" -msgstr "Mostra l'opzione per la selezione degli autori" +msgstr "Mostra la sezione degli autori" #: cps/render_template.py:80 cps/templates/book_table.html:72 #: cps/templates/index.xml:76 cps/web.py:971 @@ -1008,9 +1094,8 @@ msgid "Publishers" msgstr "Editori" #: cps/render_template.py:82 cps/templates/user_table.html:163 -#, fuzzy msgid "Show Publisher Section" -msgstr "Mostra l'opzione per la selezione degli editori" +msgstr "Mostra la sezione degli editori" #: cps/render_template.py:83 cps/templates/book_table.html:70 #: cps/templates/index.xml:97 cps/templates/search_form.html:107 @@ -1019,36 +1104,32 @@ msgid "Languages" msgstr "Lingue" #: cps/render_template.py:86 cps/templates/user_table.html:155 -#, fuzzy msgid "Show Language Section" -msgstr "Mostra l'opzione per la selezione delle lingue" +msgstr "Mostra la sezione delle lingue" #: cps/render_template.py:87 cps/templates/index.xml:104 msgid "Ratings" msgstr "Valutazioni" #: cps/render_template.py:89 cps/templates/user_table.html:164 -#, fuzzy msgid "Show Ratings Section" -msgstr "Mostra l'opzione per la selezione delle valutazioni" +msgstr "Mostra la sezione delle valutazioni" #: cps/render_template.py:90 cps/templates/index.xml:112 msgid "File formats" msgstr "Formati file" #: cps/render_template.py:92 cps/templates/user_table.html:165 -#, fuzzy msgid "Show File Formats Section" -msgstr "Mostra l'opzione per la selezione del formato dei file" +msgstr "Mostra la sezione dei formati dei file" #: cps/render_template.py:94 cps/web.py:770 msgid "Archived Books" msgstr "Libri archiviati" #: cps/render_template.py:96 cps/templates/user_table.html:166 -#, fuzzy msgid "Show Archived Books" -msgstr "Mostra l'opzione per la selezione dei libri archiviati" +msgstr "Mostra i libri archiviati" #: cps/render_template.py:99 cps/web.py:801 msgid "Books List" @@ -1056,7 +1137,7 @@ msgstr "Elenco libri" #: cps/render_template.py:101 cps/templates/user_table.html:168 msgid "Show Books List" -msgstr "Mostra l'opzione per visualizzare i libri sottoforma di elenco" +msgstr "Mostra l'elenco dei libri" #: cps/search.py:48 cps/search.py:392 cps/templates/book_edit.html:236 #: cps/templates/feed.xml:33 cps/templates/index.xml:11 @@ -1090,7 +1171,8 @@ msgstr "Stato di lettura = %(status)s" #: cps/search.py:323 msgid "Error on search for custom columns, please restart Calibre-Web" -msgstr "Errore di ricerca nelle colonne personalizzate. Per favore riavvia Calibre-Web" +msgstr "" +"Errore di ricerca nelle colonne personalizzate. Per favore riavvia Calibre-Web" #: cps/search.py:342 cps/search.py:374 cps/templates/layout.html:57 msgid "Advanced Search" @@ -1102,7 +1184,8 @@ msgstr "Lo scaffale specificato non è valido" #: cps/shelf.py:55 msgid "Sorry you are not allowed to add a book to that shelf" -msgstr "Mi spiace, ma non sei autorizzato ad aggiungere libri a questo scaffale" +msgstr "" +"Mi spiace, ma non sei autorizzato ad aggiungere libri a questo scaffale" #: cps/shelf.py:64 #, python-format @@ -1140,7 +1223,7 @@ msgstr "Il libro è stato rimosso dallo scaffale: %(sname)s" #: cps/shelf.py:200 msgid "Sorry you are not allowed to remove a book from this shelf" -msgstr "Spiacente, ma non sei autorizzato a togliere libri da questo scaffale" +msgstr "Spiacente, ma non sei autorizzato a rimuovere libri da questo scaffale" #: cps/shelf.py:210 cps/templates/layout.html:157 msgid "Create a Shelf" @@ -1183,17 +1266,17 @@ msgstr "Lo scaffale %(title)s è stato modificato" #: cps/shelf.py:347 msgid "There was an error" -msgstr "C'era un errore" +msgstr "C'è stato un errore" #: cps/shelf.py:369 #, python-format msgid "A public shelf with the name '%(title)s' already exists." -msgstr "Esiste già uno scaffale pubblico denominato '%(title)s'." +msgstr "Esiste già uno scaffale pubblico con il nome '%(title)s'." #: cps/shelf.py:380 #, python-format msgid "A private shelf with the name '%(title)s' already exists." -msgstr "Esiste già uno scaffale privato denominato '%(title)s'." +msgstr "Esiste già uno scaffale privato con il nome '%(title)s'." #: cps/shelf.py:462 #, python-format @@ -1202,12 +1285,14 @@ msgstr "Scaffale: '%(name)s'" #: cps/shelf.py:466 msgid "Error opening shelf. Shelf does not exist or is not accessible" -msgstr "Errore durante l'apertura dello scaffale. Lo scaffale non esiste o non è accessibile" +msgstr "" +"Errore durante l'apertura dello scaffale. Lo scaffale non esiste o non è" +" accessibile" #: cps/tasks_status.py:48 cps/templates/layout.html:88 #: cps/templates/tasks.html:7 msgid "Tasks" -msgstr "Compito" +msgstr "Attività" #: cps/tasks_status.py:64 msgid "Waiting" @@ -1231,7 +1316,7 @@ msgstr "Terminato" #: cps/tasks_status.py:74 msgid "Cancelled" -msgstr "Cancellato" +msgstr "Annullato" #: cps/tasks_status.py:76 msgid "Unknown Status" @@ -1239,32 +1324,43 @@ msgstr "Stato sconosciuto" #: cps/updater.py:431 cps/updater.py:442 cps/updater.py:543 cps/updater.py:558 msgid "Unexpected data while reading update information" -msgstr "Dati inattesi durante il processo di aggiornamento" +msgstr "Dati imprevisti durante la lettura delle informazioni di aggiornamento" #: cps/updater.py:438 cps/updater.py:550 msgid "No update available. You already have the latest version installed" -msgstr "Nessun aggiornamento disponibile. Hai già installata l'ultima versione" +msgstr "Nessun aggiornamento disponibile. Hai già l'ultima versione installata" #: cps/updater.py:456 -msgid "A new update is available. Click on the button below to update to the latest version." -msgstr "Nuovo aggiornamento disponibile. Clicca sul pulsante sottostante per aggiornare all'ultima versione." +msgid "" +"A new update is available. Click on the button below to update to the latest" +" version." +msgstr "" +"È disponibile un nuovo aggiornamento. Fare clic sul pulsante in basso per" +" aggiornare all'ultima versione" #: cps/updater.py:474 msgid "Could not fetch update information" -msgstr "Impossibile recuperare le informazioni di aggiornamento" +msgstr "Impossibile recuperare le informazioni sull'aggiornamento" #: cps/updater.py:484 msgid "Click on the button below to update to the latest stable version." -msgstr "Clicca sul pulsante per aggiornare all'ultima versione stabile." +msgstr "" +"Fare clic sul pulsante in basso per eseguire l'aggiornamento all'ultima" +" versione stabile." #: cps/updater.py:493 cps/updater.py:507 cps/updater.py:518 #, python-format -msgid "A new update is available. Click on the button below to update to version: %(version)s" -msgstr "Nuovo aggiornamento disponibile. Clicca sul pulsante sottostante per aggiornare alla versione: %(version)s" +msgid "" +"A new update is available. Click on the button below to update to version: " +"%(version)s" +msgstr "" +"È disponibile un nuovo aggiornamento. Fare clic sul pulsante in basso per" +" aggiornare alla versione:" +"%(versione)s" #: cps/updater.py:536 msgid "No release information available" -msgstr "Non sono disponibili informazioni sulla versione" +msgstr "Nessuna informazione disponibile sulla versione" #: cps/templates/index.html:6 cps/web.py:435 msgid "Discover (Random Books)" @@ -1272,12 +1368,12 @@ msgstr "Scopri (libri casuali)" #: cps/web.py:471 msgid "Hot Books (Most Downloaded)" -msgstr "I libri più richiesti" +msgstr "Libri hot (i più scaricati)" #: cps/web.py:502 #, python-format msgid "Downloaded books by %(user)s" -msgstr "I libri scaricati da %(user)s" +msgstr "Libri scaricati da %(user)s" #: cps/web.py:535 #, python-format @@ -1320,7 +1416,7 @@ msgstr "Lingua: %(name)s" #: cps/templates/admin.html:16 cps/web.py:943 msgid "Downloads" -msgstr "Downloads" +msgstr "Scaricati" #: cps/web.py:1036 msgid "Ratings list" @@ -1332,41 +1428,42 @@ msgstr "Elenco dei formati" #: cps/web.py:1200 msgid "Please configure the SMTP mail settings first." -msgstr "Configura dapprima le impostazioni del server SMTP..." +msgstr "Configura prima le impostazioni del server SMTP." #: cps/web.py:1205 #, python-format msgid "Success! Book queued for sending to %(eReadermail)s" -msgstr "Libro accodato con successo per essere spedito a %(eReadermail)s" +msgstr "OK! Libro in coda per l'invio a %(eReadermail)s" #: cps/web.py:1209 #, python-format msgid "Oops! There was an error sending book: %(res)s" -msgstr "Oops! Si è verificato un errore durante l'invio di questo libro: %(res)s" +msgstr "Si è verificato un errore durante l'invio del libro: %(res)s" #: cps/web.py:1211 -#, fuzzy msgid "Oops! Please update your profile with a valid eReader Email." -msgstr "Per favore aggiorna il tuo profilo con un indirizzo e-mail Kindle a cui inviare i libri." +msgstr "Per favore aggiorna il tuo profilo con un'e-mail eReader valida." #: cps/web.py:1228 -msgid "Oops! Email server is not configured, please contact your administrator." -msgstr "Il server e-mail non è configurato, per favore contatta l'amministratore" +msgid "" +"Oops! Email server is not configured, please contact your administrator." +msgstr "" +"Il server e-mail non è configurato, per favore contatta l'amministratore" #: cps/templates/layout.html:68 cps/templates/layout.html:102 #: cps/templates/login.html:27 cps/templates/register.html:17 cps/web.py:1229 #: cps/web.py:1236 cps/web.py:1242 cps/web.py:1262 cps/web.py:1267 #: cps/web.py:1273 msgid "Register" -msgstr "Registra" +msgstr "Registrati" #: cps/web.py:1264 msgid "Oops! Your Email is not allowed." -msgstr "Il tuo e-mail non è autorizzato alla registrazione" +msgstr "La tua e-mail non è consentita." #: cps/web.py:1268 msgid "Success! Confirmation Email has been sent." -msgstr "Un messaggio di conferma è stato inviato al tuo recapito e-mail." +msgstr "OK! L'e-mail di conferma è stata inviata." #: cps/web.py:1282 msgid "Oops! Cannot activate LDAP authentication" @@ -1374,8 +1471,11 @@ msgstr "Non posso attivare l'autenticazione LDAP" #: cps/web.py:1301 #, python-format -msgid "Fallback Login as: %(nickname)s, LDAP Server not reachable, or user not known" -msgstr "Fallback login come: '%(nickname)s', il server LDAP non è raggiungibile o l'utente è sconosciuto" +msgid "" +"Fallback Login as: %(nickname)s, LDAP Server not reachable, or user not known" +msgstr "" +"Accesso di riserva come: '%(nickname)s', il server LDAP non è raggiungibile o" +" l'utente è sconosciuto" #: cps/web.py:1307 #, python-format @@ -1384,15 +1484,15 @@ msgstr "Non posso accedere: %(message)s" #: cps/web.py:1311 cps/web.py:1336 msgid "Oops! Invalid Username or Password." -msgstr "Nome utente o password errati" +msgstr "Nome utente o password errati." #: cps/web.py:1318 msgid "Success! New Password was sent to your Email." -msgstr "Una nuova password è stata inviata al tuo recapito e-mail" +msgstr "OK! La nuova password è stata inviata alla tua e-mail." #: cps/web.py:1324 msgid "Oops! Please enter a valid username to reset password" -msgstr "Per favore digita un nome di utente valido per resettare la password" +msgstr "Inserisci un nome utente valido per reimpostare la password" #: cps/web.py:1398 cps/web.py:1447 #, python-format @@ -1400,13 +1500,12 @@ msgid "%(name)s's Profile" msgstr "Profilo di %(name)s" #: cps/web.py:1414 -#, fuzzy msgid "Success! Profile Updated" -msgstr "Profilo aggiornato" +msgstr "OK! Profilo aggiornato" #: cps/web.py:1418 msgid "Oops! An account already exists for this Email." -msgstr "Ho trovato un account creato in precedenza con questo indirizzo e-mail." +msgstr "Esiste già un account per questa e-mail." #: cps/services/gmail.py:58 msgid "Found no valid gmail.json file with OAuth information" @@ -1415,7 +1514,7 @@ msgstr "Ho trovato un gmail.json file senza informazione OAuth" #: cps/tasks/convert.py:92 #, python-format msgid "%(book)s send to E-Reader" -msgstr "%(book)s inviato al lettore elettronico" +msgstr "%(libro)s inviato all'E-Reader" #: cps/tasks/convert.py:153 #, python-format @@ -1439,7 +1538,9 @@ msgstr "Si è verificato un errore con il convertitore Kepubify: %(error)s" #: cps/tasks/convert.py:224 #, python-format msgid "Converted file not found or more than one file in folder %(folder)s" -msgstr "Non ho trovato il file convertito o ci sono più di un file nella cartella %(folder)s" +msgstr "" +"Non ho trovato il file convertito o c'è più di un file nella cartella " +"%(folder)s" #: cps/tasks/convert.py:247 #, python-format @@ -1470,7 +1571,7 @@ msgstr "Backup dei metadati" #: cps/tasks/thumbnail.py:95 #, python-format msgid "Generated %(count)s cover thumbnails" -msgstr "Generate %(count)s miniature di copertine" +msgstr "Sono state generate %(count)s miniature delle copertine" #: cps/tasks/thumbnail.py:222 cps/tasks/thumbnail.py:435 #: cps/tasks/thumbnail.py:503 @@ -1479,40 +1580,40 @@ msgstr "Miniature delle copertine" #: cps/tasks/thumbnail.py:281 msgid "Generated {0} series thumbnails" -msgstr "Generate {0} miniature di serie" +msgstr "Sono state generate {0} miniature delle serie" #: cps/tasks/thumbnail.py:446 msgid "Clearing cover thumbnail cache" -msgstr "Pulire la cache delle miniature di copertine" +msgstr "Cancellazione della cache delle miniature delle copertine" #: cps/tasks/upload.py:38 cps/templates/admin.html:20 #: cps/templates/layout.html:81 cps/templates/user_table.html:145 msgid "Upload" -msgstr "Upload" +msgstr "Caricamento" #: cps/templates/admin.html:9 msgid "Users" -msgstr "Elenco utenti" +msgstr "Utenti" #: cps/templates/admin.html:13 cps/templates/login.html:9 #: cps/templates/login.html:10 cps/templates/register.html:9 #: cps/templates/user_edit.html:10 cps/templates/user_table.html:134 msgid "Username" -msgstr "Utente" +msgstr "Nome utente" #: cps/templates/admin.html:14 cps/templates/register.html:14 #: cps/templates/user_edit.html:15 cps/templates/user_table.html:135 msgid "Email" -msgstr "Indirizzo e-mail" +msgstr "E-mail" #: cps/templates/admin.html:15 cps/templates/user_edit.html:28 msgid "Send to eReader Email" -msgstr "Invia all'indirizzo e-mail del lettore elettronico" +msgstr "E-mail dell'eReader" #: cps/templates/admin.html:17 cps/templates/layout.html:91 #: cps/templates/user_table.html:143 msgid "Admin" -msgstr "Amministrazione" +msgstr "Amministratore" #: cps/templates/admin.html:18 cps/templates/login.html:13 #: cps/templates/login.html:14 cps/templates/user_edit.html:23 @@ -1527,7 +1628,7 @@ msgstr "Download" #: cps/templates/admin.html:23 msgid "View Books" -msgstr "Vedi libri" +msgstr "Visualizza libri" #: cps/templates/admin.html:24 cps/templates/user_table.html:131 #: cps/templates/user_table.html:148 @@ -1551,7 +1652,7 @@ msgstr "Importa gli utenti LDAP" #: cps/templates/admin.html:62 msgid "Email Server Settings" -msgstr "Configurazione server e-mail" +msgstr "Impostazioni server e-mail" #: cps/templates/admin.html:67 cps/templates/email_edit.html:31 msgid "SMTP Hostname" @@ -1567,7 +1668,7 @@ msgstr "Crittografia" #: cps/templates/admin.html:79 cps/templates/email_edit.html:47 msgid "SMTP Login" -msgstr "Login SMTP" +msgstr "Accesso SMTP" #: cps/templates/admin.html:83 cps/templates/admin.html:94 #: cps/templates/email_edit.html:55 @@ -1575,7 +1676,6 @@ msgid "From Email" msgstr "E-mail da" #: cps/templates/admin.html:90 -#, fuzzy msgid "Email Service" msgstr "Servizio e-mail" @@ -1609,7 +1709,7 @@ msgstr "Libri per pagina" #: cps/templates/admin.html:133 msgid "Uploads" -msgstr "Uploads" +msgstr "Caricamenti" #: cps/templates/admin.html:137 msgid "Anonymous Browsing" @@ -1621,19 +1721,19 @@ msgstr "Registrazione pubblica" #: cps/templates/admin.html:145 msgid "Magic Link Remote Login" -msgstr "Magic Link Login remoto" +msgstr "Accesso remoto con Magic Link" #: cps/templates/admin.html:149 msgid "Reverse Proxy Login" -msgstr "Login reverse proxy" +msgstr "Accesso reverse proxy" #: cps/templates/admin.html:154 cps/templates/config_edit.html:173 msgid "Reverse Proxy Header Name" -msgstr "Nome dell'intestazione Reverse Proxy" +msgstr "Nome dell'intestazione reverse proxy" #: cps/templates/admin.html:159 msgid "Edit Calibre Database Configuration" -msgstr "Modifica la configurazione del Database di Calibre" +msgstr "Modifica la configurazione del database di Calibre" #: cps/templates/admin.html:160 msgid "Edit Basic Configuration" @@ -1650,28 +1750,28 @@ msgstr "Attività pianificate" #: cps/templates/admin.html:170 cps/templates/schedule_edit.html:12 #: cps/templates/tasks.html:18 msgid "Start Time" -msgstr "Ora in cui le attività sono avviate" +msgstr "Ora di inizio" #: cps/templates/admin.html:174 cps/templates/schedule_edit.html:20 msgid "Maximum Duration" -msgstr "Massima durata delle attività" +msgstr "Durata massima" #: cps/templates/admin.html:178 cps/templates/schedule_edit.html:29 msgid "Generate Thumbnails" -msgstr "Generazione delle miniature delle copertine" +msgstr "Genera miniature" #: cps/templates/admin.html:182 msgid "Generate series cover thumbnails" -msgstr "Generazione delle miniature delle serie" +msgstr "Genera miniature delle copertine delle serie" #: cps/templates/admin.html:186 cps/templates/admin.html:204 #: cps/templates/schedule_edit.html:37 msgid "Reconnect Calibre Database" -msgstr "Ricollegare alla libreria di Calibre" +msgstr "Ricollega il database di Calibre" #: cps/templates/admin.html:193 msgid "Refresh Thumbnail Cache" -msgstr "Aggiornare la cache delle miniature delle copertine" +msgstr "Aggiorna la cache delle miniature" #: cps/templates/admin.html:199 msgid "Administration" @@ -1679,11 +1779,11 @@ msgstr "Amministrazione" #: cps/templates/admin.html:200 msgid "Download Debug Package" -msgstr "Scarica Debug Package" +msgstr "Scarica il pacchetto di debug" #: cps/templates/admin.html:201 msgid "View Logs" -msgstr "Visualizza Logfile" +msgstr "Visualizza log" #: cps/templates/admin.html:207 msgid "Restart" @@ -1724,7 +1824,7 @@ msgstr "Vuoi veramente riavviare Calibre-Web?" #: cps/templates/admin.html:253 cps/templates/admin.html:267 #: cps/templates/admin.html:287 cps/templates/config_db.html:70 msgid "OK" -msgstr "Ok" +msgstr "OK" #: cps/templates/admin.html:254 cps/templates/admin.html:268 #: cps/templates/book_edit.html:214 cps/templates/book_table.html:127 @@ -1791,7 +1891,7 @@ msgstr "riduci" #: cps/templates/author.html:99 msgid "More by" -msgstr "Altro da" +msgstr "Altri di" #: cps/templates/book_edit.html:11 msgid "Delete Book" @@ -1811,7 +1911,7 @@ msgstr "Converti da:" #: cps/templates/book_edit.html:32 cps/templates/book_edit.html:39 msgid "select an option" -msgstr "seleziona un formato" +msgstr "seleziona un'opzione" #: cps/templates/book_edit.html:37 msgid "Convert to:" @@ -1858,7 +1958,7 @@ msgstr "Aggiungi un identificatore" #: cps/templates/book_edit.html:87 cps/templates/search_form.html:51 msgid "Tags" -msgstr "Categorie" +msgstr "Etichetta" #: cps/templates/book_edit.html:95 msgid "Series ID" @@ -1869,8 +1969,11 @@ msgid "Rating" msgstr "Valutazione" #: cps/templates/book_edit.html:104 -msgid "Fetch Cover from URL (JPEG - Image will be downloaded and stored in database)" -msgstr "Carica la copertina da URL (jpeg - l'immagine della copertina viene scaricata e salvata nel database)" +msgid "" +"Fetch Cover from URL (JPEG - Image will be downloaded and stored in database)" +msgstr "" +"Carica la copertina da URL (jpeg - l'immagine della copertina viene scaricata" +" e salvata nel database)" #: cps/templates/book_edit.html:108 msgid "Upload Cover from Local Disk" @@ -1907,11 +2010,11 @@ msgstr "Carica formato" #: cps/templates/book_edit.html:209 msgid "View Book on Save" -msgstr "Visualizza il libro dopo la modifica" +msgstr "Visualizza il libro dopo averlo salvato" #: cps/templates/book_edit.html:212 cps/templates/book_edit.html:230 msgid "Fetch Metadata" -msgstr "Ottieni metadati" +msgstr "Recupera i metadati" #: cps/templates/book_edit.html:213 cps/templates/config_db.html:53 #: cps/templates/config_edit.html:358 cps/templates/config_view_edit.html:174 @@ -1953,7 +2056,7 @@ msgstr "Errore nella ricerca!" #: cps/templates/book_edit.html:288 msgid "No Result(s) found! Please try another keyword." -msgstr "Nessun risultato! Prova con un altro criterio di ricerca." +msgstr "Nessun risultato trovato! Prova con un'altra parola chiave." #: cps/templates/book_table.html:12 cps/templates/book_table.html:69 #: cps/templates/user_table.html:14 cps/templates/user_table.html:77 @@ -1975,15 +2078,15 @@ msgstr "Inverti autore e titolo" #: cps/templates/book_table.html:47 msgid "Update Title Sort automatically" -msgstr "Aggiorna automaticamente l'ordinamento dei titoli" +msgstr "Aggiorna automaticamente l'ordinamento per titolo" #: cps/templates/book_table.html:51 msgid "Update Author Sort automatically" -msgstr "Aggiorna automaticamente l'ordinamento degli autori" +msgstr "Aggiorna automaticamente l'ordinamento per autore" #: cps/templates/book_table.html:63 cps/templates/book_table.html:69 msgid "Enter Title" -msgstr "Indica il titolo" +msgstr "Inserisci il titolo" #: cps/templates/book_table.html:63 cps/templates/config_view_edit.html:24 #: cps/templates/shelf_edit.html:8 @@ -1992,23 +2095,23 @@ msgstr "Titolo" #: cps/templates/book_table.html:64 msgid "Enter Title Sort" -msgstr "Indica l'ordinamento del titolo" +msgstr "Inserisci l'ordinamento per titolo" #: cps/templates/book_table.html:64 msgid "Title Sort" -msgstr "Ordinamento del titolo" +msgstr "Ordina per titolo" #: cps/templates/book_table.html:65 msgid "Enter Author Sort" -msgstr "Indica l'ordinamento dell'autore" +msgstr "Inserisci l'ordinamento per autore" #: cps/templates/book_table.html:65 msgid "Author Sort" -msgstr "Ordinamento dell'autore" +msgstr "Ordina per autore" #: cps/templates/book_table.html:66 msgid "Enter Authors" -msgstr "Indica gli autori" +msgstr "Inserisci gli autori" #: cps/templates/book_table.html:67 msgid "Enter Categories" @@ -2016,15 +2119,15 @@ msgstr "Indica le categorie" #: cps/templates/book_table.html:68 msgid "Enter Series" -msgstr "Indica le serie" +msgstr "Inserisci le serie" #: cps/templates/book_table.html:69 msgid "Series Index" -msgstr "Indice delle serie" +msgstr "Numero serie" #: cps/templates/book_table.html:70 msgid "Enter Languages" -msgstr "Indica le lingue" +msgstr "Inserisci le lingue" #: cps/templates/book_table.html:71 msgid "Publishing Date" @@ -2032,11 +2135,11 @@ msgstr "Data di pubblicazione" #: cps/templates/book_table.html:72 msgid "Enter Publishers" -msgstr "Indica gli editori" +msgstr "Inserisci gli editori" #: cps/templates/book_table.html:73 msgid "Enter comments" -msgstr "Digita un commento" +msgstr "Inserisci un commento" #: cps/templates/book_table.html:73 msgid "Comments" @@ -2044,18 +2147,18 @@ msgstr "Commento" #: cps/templates/book_table.html:75 msgid "Archive Status" -msgstr "Stato dell'archivio" +msgstr "Archiviato" #: cps/templates/book_table.html:77 cps/templates/search_form.html:42 msgid "Read Status" -msgstr "Stato di lettura" +msgstr "Letto" #: cps/templates/book_table.html:80 cps/templates/book_table.html:82 #: cps/templates/book_table.html:84 cps/templates/book_table.html:86 #: cps/templates/book_table.html:90 cps/templates/book_table.html:92 #: cps/templates/book_table.html:96 msgid "Enter " -msgstr "Conferma " +msgstr "Inserisci" #: cps/templates/book_table.html:113 cps/templates/modal_dialogs.html:46 #: cps/templates/tasks.html:36 @@ -2080,7 +2183,7 @@ msgstr "Posizione del database di Calibre" #: cps/templates/config_db.html:22 msgid "Use Google Drive?" -msgstr "Utilizza Google Drive" +msgstr "Usa Google Drive" #: cps/templates/config_db.html:27 msgid "Authenticate Google Drive" @@ -2092,7 +2195,7 @@ msgstr "Cartella di Calibre in Google Drive" #: cps/templates/config_db.html:40 msgid "Metadata Watch Channel ID" -msgstr "ID canale Watch Metadata" +msgstr "ID del canale di visualizzazione dei metadati" #: cps/templates/config_db.html:43 msgid "Revoke" @@ -2100,7 +2203,8 @@ msgstr "Revoca" #: cps/templates/config_db.html:68 msgid "New db location is invalid, please enter valid path" -msgstr "La nuova posizione del DB non è valida, per favore indica un percorso corretto" +msgstr "" +"La nuova posizione del database non è valida, inserisci un percorso valido" #: cps/templates/config_edit.html:18 msgid "Server Configuration" @@ -2112,11 +2216,16 @@ msgstr "Porta del server" #: cps/templates/config_edit.html:28 msgid "SSL certfile location (leave it empty for non-SSL Servers)" -msgstr "Percorso del file del certificato SSL (lascia vuoto per una configurazione del server senza SSL)" +msgstr "" +"Posizione del file del certificato SSL (lascia vuoto per una configurazione" +" del" +" server senza SSL)" #: cps/templates/config_edit.html:35 msgid "SSL Keyfile location (leave it empty for non-SSL Servers)" -msgstr "Percorso del file della chiave SSL (lascia vuoto per una configurazione del server senza SSL)" +msgstr "" +"Posizione del file della chiave SSL (lascia vuoto per una configurazione del" +" server senza SSL)" #: cps/templates/config_edit.html:43 msgid "Update Channel" @@ -2132,23 +2241,26 @@ msgstr "Nightly" #: cps/templates/config_edit.html:50 msgid "Trusted Hosts (Comma Separated)" -msgstr "Hosts fidati (separati da virgola)" +msgstr "Host attendibili (separati da virgole)" #: cps/templates/config_edit.html:61 msgid "Logfile Configuration" -msgstr "Configurazione del Logfile" +msgstr "Configurazione del file di log" #: cps/templates/config_edit.html:77 msgid "Location and name of logfile (calibre-web.log for no entry)" -msgstr "Percorso e nome del Logfile (senza indicazioni sarà calibre-web.log)" +msgstr "" +"Posizione e nome del file di log (se non specificato sarà calibre-web.log)" #: cps/templates/config_edit.html:82 msgid "Enable Access Log" -msgstr "Abilita l'Access Log" +msgstr "Abilita il log degli accessi" #: cps/templates/config_edit.html:85 msgid "Location and name of access logfile (access.log for no entry)" -msgstr "Percorso e nome del Logfile di accesso (senza indicazioni sarà access.log)" +msgstr "" +"Posizione e nome del file di log degli accessi (se non specificato sarà" +" access.log)" #: cps/templates/config_edit.html:96 msgid "Feature Configuration" @@ -2156,7 +2268,9 @@ msgstr "Ulteriori opzioni" #: cps/templates/config_edit.html:104 msgid "Convert non-English characters in title and author while saving to disk" -msgstr "Converti caratteri non inglesi del titolo e dell'autore durante il salvataggio su disco" +msgstr "" +"Converti caratteri non inglesi del titolo e dell'autore durante il" +" salvataggio su disco" #: cps/templates/config_edit.html:108 msgid "Enable Uploads" @@ -2164,7 +2278,9 @@ msgstr "Abilita il caricamento" #: cps/templates/config_edit.html:108 msgid "(Please ensure users having also upload rights)" -msgstr "(Per favore assicurati che gli utenti abbiano anche i diritti di upload)" +msgstr "" +"(per favore assicurati che gli utenti abbiano anche i permessi per caricare i" +" file)" #: cps/templates/config_edit.html:112 msgid "Allowed Upload Fileformats" @@ -2180,19 +2296,19 @@ msgstr "Abilita la registrazione pubblica" #: cps/templates/config_edit.html:127 msgid "Use Email as Username" -msgstr "Utilizza l'e-mail quale nome di utente" +msgstr "Usa l'e-mail come nome utente" #: cps/templates/config_edit.html:132 msgid "Enable Magic Link Remote Login" -msgstr "Attiva login remoto Magic Link" +msgstr "Abilita l'accesso remoto con Magic Link" #: cps/templates/config_edit.html:137 msgid "Enable Kobo sync" -msgstr "Abilita la sincronia per Kobo" +msgstr "Abilita la sincronizzazione Kobo" #: cps/templates/config_edit.html:142 msgid "Proxy unknown requests to Kobo Store" -msgstr "Richieste proxy sconosciute allo store di Kobo" +msgstr "Inoltra le richieste sconosciute al Kobo Store" #: cps/templates/config_edit.html:145 msgid "Server External Port (for port forwarded API calls)" @@ -2200,43 +2316,43 @@ msgstr "Porta esterna del server (per chiamate API alle porte inoltrate)" #: cps/templates/config_edit.html:153 msgid "Use Goodreads" -msgstr "Utilizza Goodreads" +msgstr "Usa Goodreads" #: cps/templates/config_edit.html:154 msgid "Create an API Key" -msgstr "Otteni una chiave API" +msgstr "Crea una chiave API" #: cps/templates/config_edit.html:158 msgid "Goodreads API Key" -msgstr "API di Goodreads" +msgstr "Chiave API di Goodreads" #: cps/templates/config_edit.html:162 msgid "Goodreads API Secret" -msgstr "Goodreads API Secret" +msgstr "API segreta di Goodreads" #: cps/templates/config_edit.html:169 msgid "Allow Reverse Proxy Authentication" -msgstr "Permetti l'autenticazione Reverse Proxy" +msgstr "Consenti autenticazione con reverse proxy" #: cps/templates/config_edit.html:180 msgid "Login type" -msgstr "Tipo di login" +msgstr "Tipo di accesso" #: cps/templates/config_edit.html:182 msgid "Use Standard Authentication" -msgstr "Utilizza l'autenticazione standard" +msgstr "Usa l'autenticazione standard" #: cps/templates/config_edit.html:184 msgid "Use LDAP Authentication" -msgstr "Utilizza l'autenticazione LDAP" +msgstr "Usa l'autenticazione LDAP" #: cps/templates/config_edit.html:187 msgid "Use OAuth" -msgstr "Utilizza OAuth" +msgstr "Usa OAuth" #: cps/templates/config_edit.html:194 msgid "LDAP Server Host Name or IP Address" -msgstr "Nome o indirizzo IP del server LDAP" +msgstr "Nome host o indirizzo IP del server LDAP" #: cps/templates/config_edit.html:198 msgid "LDAP Server Port" @@ -2255,16 +2371,24 @@ msgid "SSL" msgstr "SSL" #: cps/templates/config_edit.html:210 -msgid "LDAP CACertificate Path (Only needed for Client Certificate Authentication)" -msgstr "Percorso del CACertificate LDAP (necessario unicamente in caso di Client Certificate Authentication)" +msgid "" +"LDAP CACertificate Path (Only needed for Client Certificate Authentication)" +msgstr "" +"Percorso del CACertificate LDAP (necessario unicamente in caso di Client" +" Certificate Authentication)" #: cps/templates/config_edit.html:217 -msgid "LDAP Certificate Path (Only needed for Client Certificate Authentication)" -msgstr "Percorso del certificato LDAP (necessario unicamente in caso di Client Certificate Authentication)" +msgid "" +"LDAP Certificate Path (Only needed for Client Certificate Authentication)" +msgstr "" +"Percorso del certificato LDAP (necessario unicamente in caso di Client" +" Certificate Authentication)" #: cps/templates/config_edit.html:224 msgid "LDAP Keyfile Path (Only needed for Client Certificate Authentication)" -msgstr "Percorso della chiave LDAP (necessario unicamente in caso di Client Certificate Authentication)" +msgstr "" +"Percorso della chiave LDAP (necessario unicamente in caso di Client" +" Certificate Authentication)" #: cps/templates/config_edit.html:233 msgid "LDAP Authentication" @@ -2284,11 +2408,11 @@ msgstr "Semplice" #: cps/templates/config_edit.html:242 msgid "LDAP Administrator Username" -msgstr "Nome di utente dell'amministratore LDAP" +msgstr "Nome utente amministratore LDAP" #: cps/templates/config_edit.html:248 msgid "LDAP Administrator Password" -msgstr "Password dell'amministratore LDAP" +msgstr "Password amministratore LDAP" #: cps/templates/config_edit.html:253 msgid "LDAP Distinguished Name (DN)" @@ -2296,35 +2420,36 @@ msgstr "LDAP Distinguished Name (DN)" #: cps/templates/config_edit.html:257 msgid "LDAP User Object Filter" -msgstr "LDAP User Object Filter" +msgstr "Object Filter utente LDAP" #: cps/templates/config_edit.html:262 msgid "LDAP Server is OpenLDAP?" -msgstr "Il server LDAP è un server OpenLDAP." +msgstr "Il server LDAP è OpenLDAP?" #: cps/templates/config_edit.html:264 msgid "Following Settings are Needed For User Import" -msgstr "I seguenti parametri sono necessari per importare utenti" +msgstr "" +"Le seguenti impostazioni sono necessarie per l'importazione degli utenti" #: cps/templates/config_edit.html:266 msgid "LDAP Group Object Filter" -msgstr "LDAP Group Object Filter" +msgstr "Object Filter gruppo LDAP" #: cps/templates/config_edit.html:270 msgid "LDAP Group Name" -msgstr "LDAP Group Name" +msgstr "Nome gruppo LDAP" #: cps/templates/config_edit.html:274 msgid "LDAP Group Members Field" -msgstr "LDAP Group Members Field" +msgstr "Campo membri del gruppo LDAP" #: cps/templates/config_edit.html:278 msgid "LDAP Member User Filter Detection" -msgstr "LDAP Member User Filter Detection" +msgstr "Rilevamento filtro utente membro LDAP" #: cps/templates/config_edit.html:280 msgid "Autodetect" -msgstr "Autodetect" +msgstr "Trova automaticamente" #: cps/templates/config_edit.html:281 msgid "Custom Filter" @@ -2332,7 +2457,7 @@ msgstr "Filtro personalizzato" #: cps/templates/config_edit.html:286 msgid "LDAP Member User Filter" -msgstr "LDAP Member User Filter" +msgstr "Filtro utente membro LDAP" #: cps/templates/config_edit.html:297 #, python-format @@ -2342,16 +2467,16 @@ msgstr "Ottieni le credenziali OAuth di %(provider)s" #: cps/templates/config_edit.html:300 #, python-format msgid "%(provider)s OAuth Client Id" -msgstr "%(provider)s OAuth Client Id" +msgstr "%(provider)s ID client OAuth" #: cps/templates/config_edit.html:304 #, python-format msgid "%(provider)s OAuth Client Secret" -msgstr "%(provider)s OAuth Client Secret" +msgstr "Secret client OAuth %(provider)s" #: cps/templates/config_edit.html:320 msgid "External binaries" -msgstr "Files binari esterni" +msgstr "File binari esterni" #: cps/templates/config_edit.html:326 msgid "Path to Calibre E-Book Converter" @@ -2359,7 +2484,7 @@ msgstr "Percorso del convertitore di libri di Calibre" #: cps/templates/config_edit.html:334 msgid "Calibre E-Book Converter Settings" -msgstr "Configurazione del convertitore di libri di Calibre" +msgstr "Impostazioni del convertitore di libri di Calibre" #: cps/templates/config_edit.html:337 msgid "Path to Kepubify E-Book Converter" @@ -2371,7 +2496,7 @@ msgstr "Percorso del file binario di UnRar" #: cps/templates/config_view_edit.html:17 msgid "View Configuration" -msgstr "Configurazione aspetto biblioteca" +msgstr "Visualizza configurazione" #: cps/templates/config_view_edit.html:32 msgid "No. of Random Books to Display" @@ -2379,7 +2504,8 @@ msgstr "Numero di libri casuali da mostrare" #: cps/templates/config_view_edit.html:36 msgid "No. of Authors to Display Before Hiding (0=Disable Hiding)" -msgstr "Numero di autori da mostrare prima di nascondere (0=disabilita mascheramento)" +msgstr "" +"Numero di autori da mostrare prima di nascondere (0=disabilita nascondere)" #: cps/templates/config_view_edit.html:40 cps/templates/readcbr.html:116 msgid "Theme" @@ -2391,7 +2517,7 @@ msgstr "Tema standard" #: cps/templates/config_view_edit.html:43 msgid "caliBlur! Dark Theme" -msgstr "Tema caliBlur! Dark" +msgstr "Tema caliBlur! scuro" #: cps/templates/config_view_edit.html:47 msgid "Regular Expression for Ignoring Columns" @@ -2399,7 +2525,7 @@ msgstr "Espressione regolare per ignorare le colonne" #: cps/templates/config_view_edit.html:51 msgid "Link Read/Unread Status to Calibre Column" -msgstr "Collega lo stato letto/non letto nella colonna di Calibre" +msgstr "Collega lo stato letto/da leggere nella colonna di Calibre" #: cps/templates/config_view_edit.html:60 msgid "View Restrictions based on Calibre column" @@ -2419,31 +2545,31 @@ msgstr "Utente amministratore" #: cps/templates/config_view_edit.html:92 cps/templates/user_edit.html:101 msgid "Allow Downloads" -msgstr "Permetti il download" +msgstr "Consenti download" #: cps/templates/config_view_edit.html:96 cps/templates/user_edit.html:105 msgid "Allow eBook Viewer" -msgstr "Permetti l'utilizzo del visualizzatore di libri" +msgstr "Consenti l'utilizzo del visualizzatore di libri" #: cps/templates/config_view_edit.html:101 cps/templates/user_edit.html:110 msgid "Allow Uploads" -msgstr "Permetti l'upload" +msgstr "Consenti caricamenti" #: cps/templates/config_view_edit.html:106 cps/templates/user_edit.html:115 msgid "Allow Edit" -msgstr "Permetti la modifica" +msgstr "Consenti modifiche" #: cps/templates/config_view_edit.html:111 cps/templates/user_edit.html:120 msgid "Allow Delete Books" -msgstr "Permetti l'eliminazione di libri" +msgstr "Consenti l'eliminazione di libri" #: cps/templates/config_view_edit.html:116 cps/templates/user_edit.html:126 msgid "Allow Changing Password" -msgstr "Permetti la modifica della password" +msgstr "Consenti la modifica della password" #: cps/templates/config_view_edit.html:120 cps/templates/user_edit.html:130 msgid "Allow Editing Public Shelves" -msgstr "Permetti la modifica degli scaffali pubblici" +msgstr "Consenti la modifica degli scaffali pubblici" #: cps/templates/config_view_edit.html:123 msgid "Default Language" @@ -2460,23 +2586,23 @@ msgstr "Visibilità predefinita per i nuovi utenti" #: cps/templates/config_view_edit.html:163 cps/templates/user_edit.html:84 #: cps/templates/user_table.html:154 msgid "Show Random Books in Detail View" -msgstr "Mostra libri scelti aleatoriamente nella vista dettagliata" +msgstr "Mostra i libri casuali nella visualizzazione dettagliata" #: cps/templates/config_view_edit.html:166 cps/templates/user_edit.html:87 msgid "Add Allowed/Denied Tags" -msgstr "Aggiungi categorie permesse/negate" +msgstr "Aggiungi etichetta consentiti/negati" #: cps/templates/config_view_edit.html:167 msgid "Add Allowed/Denied custom column values" -msgstr "Aggiungi valori personali permetti/nega nelle colonne" +msgstr "Aggiungi valori di colonna personalizzati consentiti/negati" #: cps/templates/detail.html:61 cps/templates/detail.html:70 msgid "Read in Browser" -msgstr "Leggi nel navigatore" +msgstr "Leggi nel browser" #: cps/templates/detail.html:78 cps/templates/detail.html:95 msgid "Listen in Browser" -msgstr "Ascolta nel navigatore" +msgstr "Ascolta nel browser" #: cps/templates/detail.html:125 cps/templates/listenmp3.html:62 #, python-format @@ -2489,11 +2615,11 @@ msgstr "Pubblicato" #: cps/templates/detail.html:222 cps/templates/listenmp3.html:158 msgid "Mark As Unread" -msgstr "Marca come non letto" +msgstr "Contrassegna come da leggere" #: cps/templates/detail.html:222 cps/templates/listenmp3.html:158 msgid "Mark As Read" -msgstr "Marca come letto" +msgstr "Contrassegna come letto" #: cps/templates/detail.html:223 cps/templates/listenmp3.html:159 msgid "Read" @@ -2533,25 +2659,23 @@ msgstr "Modifica metadati" #: cps/templates/email_edit.html:13 msgid "Email Account Type" -msgstr "Scegli il tipo di server" +msgstr "Tipo di account e-mail" #: cps/templates/email_edit.html:15 -#, fuzzy msgid "Standard Email Account" -msgstr "Utilizza un account e-mail standard" +msgstr "Account e-mail standard" #: cps/templates/email_edit.html:16 -#, fuzzy msgid "Gmail Account" -msgstr "Scegli il tipo di server" +msgstr "Account Gmail" #: cps/templates/email_edit.html:22 msgid "Setup Gmail Account" -msgstr "" +msgstr "Configura l'account Gmail" #: cps/templates/email_edit.html:24 msgid "Revoke Gmail Access" -msgstr "Revoca l'accesso Gmail" +msgstr "Revoca l'accesso a Gmail" #: cps/templates/email_edit.html:42 msgid "STARTTLS" @@ -2570,9 +2694,8 @@ msgid "Attachment Size Limit" msgstr "Dimensione massima dell'allegato" #: cps/templates/email_edit.html:66 -#, fuzzy msgid "Save and Send Test Email" -msgstr "Salva le impostazioni e invia e-mail di test" +msgstr "Salva e invia e-mail di prova" #: cps/templates/email_edit.html:70 cps/templates/layout.html:26 #: cps/templates/shelf_order.html:42 cps/templates/user_table.html:174 @@ -2581,7 +2704,7 @@ msgstr "Indietro" #: cps/templates/email_edit.html:74 msgid "Allowed Domains (Whitelist)" -msgstr "Dominii autorizzati alla registrazione (Whitelist)" +msgstr "Domini consentiti (lista bianca)" #: cps/templates/email_edit.html:78 cps/templates/email_edit.html:105 msgid "Add Domain" @@ -2594,19 +2717,22 @@ msgstr "Aggiungi" #: cps/templates/email_edit.html:86 cps/templates/email_edit.html:96 msgid "Enter domainname" -msgstr "Digita il nome di dominio" +msgstr "Inserisci il nome del dominio" #: cps/templates/email_edit.html:92 msgid "Denied Domains (Blacklist)" -msgstr "Dominii bloccati per la registrazione (Blacklist)" +msgstr "Domini bloccati (lista nera)" #: cps/templates/feed.xml:21 cps/templates/layout.html:187 msgid "Next" msgstr "Prossimo" #: cps/templates/generate_kobo_auth_url.html:6 -msgid "Open the .kobo/Kobo/Kobo eReader.conf file in a text editor and add (or edit):" -msgstr "Apri il file .kobo/Kobo/Kobo eReader.conf in un editore di testi e aggiungi (o edita):" +msgid "" +"Open the .kobo/Kobo/Kobo eReader.conf file in a text editor and add (or edit):" +msgstr "" +"Apri il file .kobo/Kobo/Kobo eReader.conf in un editor di testo e aggiungi (o" +" modifica):" #: cps/templates/generate_kobo_auth_url.html:11 msgid "Kobo Token:" @@ -2618,7 +2744,8 @@ msgstr "Elenco" #: cps/templates/http_error.html:34 msgid "Calibre-Web Instance is unconfigured, please contact your administrator" -msgstr "L'istanza Calibre-Web non è configurata, per favore contatta l'amministratore" +msgstr "" +"L'istanza Calibre-Web non è configurata, per favore contatta l'amministratore" #: cps/templates/http_error.html:44 msgid "Create Issue" @@ -2630,7 +2757,7 @@ msgstr "Ritorna alla pagina principale" #: cps/templates/http_error.html:53 msgid "Logout User" -msgstr "Disconnetti l'utente" +msgstr "Disconnetti utente" #: cps/templates/index.html:71 msgid "Sort ascending according to download count" @@ -2652,11 +2779,11 @@ msgstr "Ordina gli autori in ordine alfabetico inverso" #: cps/templates/index.html:83 msgid "Sort ascending according to series index" -msgstr "Ordina in ordine ascendente secondo l'indice della serie" +msgstr "Ordina in ordine ascendente secondo il numero della serie" #: cps/templates/index.html:84 msgid "Sort descending according to series index" -msgstr "Ordina in ordine discendente secondo l'indice della serie" +msgstr "Ordina in ordine discendente secondo il numero della serie" #: cps/templates/index.xml:6 msgid "Start" @@ -2688,7 +2815,7 @@ msgstr "Gli ultimi libri" #: cps/templates/index.xml:46 msgid "Random Books" -msgstr "Libri presentati aleatoriamente" +msgstr "Libri casuali" #: cps/templates/index.xml:73 msgid "Books ordered by Author" @@ -2733,7 +2860,7 @@ msgstr "Home" #: cps/templates/layout.html:32 msgid "Toggle Navigation" -msgstr "Alterna navigazione" +msgstr "Attiva/disattiva navigazione" #: cps/templates/layout.html:47 msgid "Search Library" @@ -2745,11 +2872,11 @@ msgstr "Account" #: cps/templates/layout.html:71 cps/templates/layout.html:96 msgid "Logout" -msgstr "Logout" +msgstr "Disconnettersi" #: cps/templates/layout.html:78 cps/templates/layout.html:134 msgid "Uploading..." -msgstr "Uploading..." +msgstr "Caricamento in corso..." #: cps/templates/layout.html:78 msgid "Error" @@ -2757,12 +2884,12 @@ msgstr "Errore" #: cps/templates/layout.html:78 msgid "Upload done, processing, please wait..." -msgstr "Caricamento riuscito, sto elaborando, per favore aspetta..." +msgstr "Caricamento riuscito, elaborazione in corso, attendi per favore..." #: cps/templates/layout.html:91 cps/templates/read.html:76 #: cps/templates/readcbr.html:87 cps/templates/readcbr.html:111 msgid "Settings" -msgstr "Configurazione" +msgstr "Impostazioni" #: cps/templates/layout.html:135 msgid "Please do not refresh the page" @@ -2826,7 +2953,7 @@ msgstr "Scarica il log di accesso" #: cps/templates/modal_dialogs.html:6 msgid "Select Allowed/Denied Tags" -msgstr "Seleziona le categorie consentite/negate" +msgstr "Seleziona le etchette consentite/negate" #: cps/templates/modal_dialogs.html:7 msgid "Select Allowed/Denied Custom Column Values" @@ -2838,11 +2965,12 @@ msgstr "Seleziona le categorie consentite/negate per l'utente" #: cps/templates/modal_dialogs.html:9 msgid "Select Allowed/Denied Custom Column Values of User" -msgstr "Seleziona i valori personali consentiti/negati per le colonne dell'utente" +msgstr "" +"Seleziona i valori personali consentiti/negati per le colonne dell'utente" #: cps/templates/modal_dialogs.html:15 msgid "Enter Tag" -msgstr "Indica le categorie" +msgstr "Inserisci etichetta" #: cps/templates/modal_dialogs.html:24 msgid "Add View Restriction" @@ -2850,23 +2978,30 @@ msgstr "Aggiungi restrizioni di visualizzazione" #: cps/templates/modal_dialogs.html:50 msgid "This book format will be permanently erased from database" -msgstr "Questo formato di libro viene rimosso definitivamente dal database" +msgstr "Questo formato di libro verrà definitivamente cancellato dal database" #: cps/templates/modal_dialogs.html:51 msgid "This book will be permanently erased from database" -msgstr "Il libro verrà cancellato dal database di Calibre" +msgstr "Questo libro verrà definitivamente cancellato dal database" #: cps/templates/modal_dialogs.html:52 msgid "and hard disk" msgstr "e dal disco rigido" #: cps/templates/modal_dialogs.html:56 -msgid "Important Kobo Note: deleted books will remain on any paired Kobo device." -msgstr "Osservazione importante riguardo Kobo: i libri eliminati, rimarranno in ogni lettore Kobo accoppiato." +msgid "" +"Important Kobo Note: deleted books will remain on any paired Kobo device." +msgstr "" +"Osservazione importante riguardo Kobo: i libri eliminati, rimarranno in ogni" +" lettore Kobo accoppiato." #: cps/templates/modal_dialogs.html:57 -msgid "Books must first be archived and the device synced before a book can safely be deleted." -msgstr "Prima di poter eliminare in sicurezza un libro, occorre che il libro venga archiviato e che l'apparecchio venga sincronizzato." +msgid "" +"Books must first be archived and the device synced before a book can safely" +" be deleted." +msgstr "" +"Prima di poter eliminare in sicurezza un libro, occorre che il libro venga" +" archiviato e che l'apparecchio venga sincronizzato." #: cps/templates/modal_dialogs.html:76 msgid "Choose File Location" @@ -2894,7 +3029,7 @@ msgstr "Seleziona" #: cps/templates/modal_dialogs.html:134 cps/templates/tasks.html:45 msgid "Ok" -msgstr "Ok" +msgstr "OK" #: cps/templates/osd.xml:5 msgid "Calibre-Web eBook Catalog" @@ -2926,7 +3061,7 @@ msgstr "Adatta il testo quando le barre laterali sono aperte." #: cps/templates/read.html:93 msgid "Font Sizes" -msgstr "" +msgstr "Dimensioni dei caratteri" #: cps/templates/readcbr.html:7 msgid "Comic Reader" @@ -2958,7 +3093,7 @@ msgstr "Adatta all'altezza" #: cps/templates/readcbr.html:100 msgid "Scale to Native" -msgstr "Scala alla dimensione originale" +msgstr "Adatta alla dimensione originale" #: cps/templates/readcbr.html:101 msgid "Rotate Right" @@ -3066,19 +3201,19 @@ msgstr "Il tuo indirizzo e-mail" #: cps/templates/remote_login.html:5 msgid "Magic Link - Authorise New Device" -msgstr "Magic Link - Autorizza un nuovo apparecchio" +msgstr "Magic Link - Autorizza nuovo dispositivo" #: cps/templates/remote_login.html:7 msgid "On another device, login and visit:" -msgstr "Utilizza il tuo altro apparecchio, accedi e visita" +msgstr "Su un altro dispositivo, accedi e visita:" #: cps/templates/remote_login.html:11 msgid "Once verified, you will automatically be logged in on this device." -msgstr "Una volta completato, verrai automaticamente connesso con questo dispositivo." +msgstr "Una volta verificato, accederai automaticamente a questo dispositivo." #: cps/templates/remote_login.html:14 msgid "This verification link will expire in 10 minutes." -msgstr "Il link scadrà tra 10 minuti." +msgstr "Questo link di verifica scadrà tra 10 minuti." #: cps/templates/schedule_edit.html:33 msgid "Generate Series Cover Thumbnails" @@ -3098,15 +3233,15 @@ msgstr "Risultati per:" #: cps/templates/search_form.html:21 msgid "Published Date From" -msgstr "Data di pubblicazione da" +msgstr "Data di pubblicazione dal" #: cps/templates/search_form.html:31 msgid "Published Date To" -msgstr "Data di pubblicazione fino a" +msgstr "Data di pubblicazione fino al" #: cps/templates/search_form.html:59 msgid "Exclude Tags" -msgstr "Escludi categorie" +msgstr "Escludi etichette" #: cps/templates/search_form.html:77 msgid "Exclude Series" @@ -3218,7 +3353,7 @@ msgstr "Utente" #: cps/templates/tasks.html:14 msgid "Task" -msgstr "Operazione" +msgstr "Attività" #: cps/templates/tasks.html:15 msgid "Status" @@ -3237,12 +3372,18 @@ msgid "Actions" msgstr "Azioni" #: cps/templates/tasks.html:40 -msgid "This task will be cancelled. Any progress made by this task will be saved." -msgstr "Questa attività verrà annullata. Tutti i progressi compiuti da questa attività verranno salvati." +msgid "" +"This task will be cancelled. Any progress made by this task will be saved." +msgstr "" +"Questa attività verrà annullata. Tutti i progressi compiuti da questa" +" attività verranno salvati." #: cps/templates/tasks.html:41 -msgid "If this is a scheduled task, it will be re-ran during the next scheduled time." -msgstr "Se si tratta di un'attività pianificata, verrà eseguita nuovamente durante il prossimo orario pianificato." +msgid "" +"If this is a scheduled task, it will be re-ran during the next scheduled time." +msgstr "" +"Se si tratta di un'attività pianificata, verrà eseguita nuovamente durante il" +" prossimo orario pianificato." #: cps/templates/user_edit.html:20 msgid "Reset user Password" @@ -3250,11 +3391,11 @@ msgstr "Reimposta la password dell'utente" #: cps/templates/user_edit.html:43 msgid "Language of Books" -msgstr "Mostra libri in" +msgstr "Lingua dei libri" #: cps/templates/user_edit.html:54 msgid "OAuth Settings" -msgstr "Configurazione OAuth" +msgstr "Impostazioni OAuth" #: cps/templates/user_edit.html:56 msgid "Link" @@ -3266,7 +3407,7 @@ msgstr "Scollega" #: cps/templates/user_edit.html:64 msgid "Kobo Sync Token" -msgstr "Token Kobo Sync" +msgstr "Token di sincronizzazione Kobo" #: cps/templates/user_edit.html:66 msgid "Create/View" @@ -3278,7 +3419,7 @@ msgstr "Forza la sincronizzazione kobo completa" #: cps/templates/user_edit.html:88 msgid "Add allowed/Denied Custom Column Values" -msgstr "Aggiungi valori personali permessi/negati nelle colonne" +msgstr "Aggiungi valori personali consentiti/negati nelle colonne" #: cps/templates/user_edit.html:137 msgid "Sync only books in selected shelves with Kobo" @@ -3302,22 +3443,19 @@ msgstr "Modifica utente" #: cps/templates/user_table.html:134 msgid "Enter Username" -msgstr "Digita il nome utente" +msgstr "Inserisci nome utente" #: cps/templates/user_table.html:135 -#, fuzzy msgid "Enter Email" -msgstr "E-mail di test" +msgstr "Inserisci e-mail" #: cps/templates/user_table.html:136 -#, fuzzy msgid "Enter eReader Email" -msgstr "Invia all'indirizzo e-mail del lettore elettronico" +msgstr "Inserisci l'e-mail dell'eReader" #: cps/templates/user_table.html:136 -#, fuzzy msgid "eReader Email" -msgstr "E-mail del lettore elettronico" +msgstr "E-mail dell'eReader" #: cps/templates/user_table.html:137 msgid "Locale" @@ -3325,31 +3463,31 @@ msgstr "Locale" #: cps/templates/user_table.html:138 msgid "Visible Book Languages" -msgstr "Lingue dei libri visualizzabili" +msgstr "Lingue dei libri visibili" #: cps/templates/user_table.html:139 msgid "Edit Allowed Tags" -msgstr "Modifica le categorie permesse" +msgstr "Modifica le etichette consentite" #: cps/templates/user_table.html:139 msgid "Allowed Tags" -msgstr "Categorie permesse" +msgstr "Etichette consentite" #: cps/templates/user_table.html:140 msgid "Edit Denied Tags" -msgstr "Modifica le categorie negate" +msgstr "Modifica le etichette negate" #: cps/templates/user_table.html:140 msgid "Denied Tags" -msgstr "Categorie negate" +msgstr "Etichette negate" #: cps/templates/user_table.html:141 msgid "Edit Allowed Column Values" -msgstr "Modifica i valori delle colonne permesse" +msgstr "Modifica i valori delle colonne consentite" #: cps/templates/user_table.html:141 msgid "Allowed Column Values" -msgstr "Valori delle colonne permesse" +msgstr "Valori delle colonne consentite" #: cps/templates/user_table.html:142 msgid "Edit Denied Column Values" @@ -3357,11 +3495,11 @@ msgstr "Modifica i valori delle colonne negate" #: cps/templates/user_table.html:142 msgid "Denied Column Values" -msgstr "Valori negati per le colonne" +msgstr "Valori delle colonne negate" #: cps/templates/user_table.html:144 msgid "Change Password" -msgstr "Modifica la password" +msgstr "Cambia la password" #: cps/templates/user_table.html:147 msgid "View" @@ -3376,7 +3514,6 @@ msgid "Sync selected Shelves with Kobo" msgstr "Sincronizza con Kobo gli scaffali selezionati" #: cps/templates/user_table.html:156 -#, fuzzy msgid "Show Read/Unread Section" -msgstr "Mostra l'opzione per la selezione dello stato letto/non letto" +msgstr "Mostra la sezione letto/da leggere" From 1c3b69c7106d029bad21aca3b40deba919e96f38 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 4 Feb 2023 11:09:16 +0100 Subject: [PATCH 10/15] refactored login routines --- cps/admin.py | 12 +++--- cps/opds.py | 42 ++------------------ cps/static/css/style.css | 1 + cps/static/js/main.js | 6 --- cps/usermanagement.py | 86 +++++++++++++++++++++++++++++++--------- cps/web.py | 7 +++- 6 files changed, 83 insertions(+), 71 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 35388884..1d1bf4c2 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -102,10 +102,12 @@ def admin_required(f): @admi.before_app_request def before_request(): # make remember me function work - if current_user.is_authenticated: - confirm_login() - if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path: - logout_user() + #if current_user.is_authenticated: + # print("before request confirm request {}".format(request.path)) + # confirm_login() + #if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path: + # log.info("before logout {}".format(request.path)) + # logout_user() g.constants = constants g.user = current_user g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','') @@ -114,8 +116,6 @@ def before_request(): g.allow_upload = config.config_uploading g.current_theme = config.config_theme g.config_authors_max = config.config_authors_max - g.shelves_access = ub.session.query(ub.Shelf).filter( - or_(ub.Shelf.is_public == 1, ub.Shelf.user_id == current_user.id)).order_by(ub.Shelf.name).all() if '/static/' not in request.path and not config.db_configured and \ request.endpoint not in ('admin.ajax_db_config', 'admin.simulatedbchange', diff --git a/cps/opds.py b/cps/opds.py index 0c83fa70..bf50691a 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -22,16 +22,16 @@ import datetime from urllib.parse import unquote_plus -from functools import wraps -from flask import Blueprint, request, render_template, Response, g, make_response, abort + +from flask import Blueprint, request, render_template, g, make_response, abort from flask_login import current_user from flask_babel import get_locale from sqlalchemy.sql.expression import func, text, or_, and_, true from sqlalchemy.exc import InvalidRequestError, OperationalError -from werkzeug.security import check_password_hash -from . import constants, logger, config, db, calibre_db, ub, services, isoLanguages +from . import logger, config, db, calibre_db, ub, isoLanguages +from .usermanagement import requires_basic_auth_if_no_ano from .helper import get_download_link, get_book_cover from .pagination import Pagination from .web import render_read_books @@ -43,19 +43,6 @@ opds = Blueprint('opds', __name__) log = logger.create() -def requires_basic_auth_if_no_ano(f): - @wraps(f) - def decorated(*args, **kwargs): - auth = request.authorization - if config.config_anonbrowse != 1: - if not auth or auth.type != 'basic' or not check_auth(auth.username, auth.password): - return authenticate() - return f(*args, **kwargs) - if config.config_login_type == constants.LOGIN_LDAP and services.ldap and config.config_anonbrowse != 1: - return services.ldap.basic_auth_required(f) - return decorated - - @opds.route("/opds/") @opds.route("/opds") @requires_basic_auth_if_no_ano @@ -478,27 +465,6 @@ def feed_search(term): return render_xml_template('feed.xml', searchterm="") -def check_auth(username, password): - try: - username = username.encode('windows-1252') - except UnicodeEncodeError: - username = username.encode('utf-8') - user = ub.session.query(ub.User).filter(func.lower(ub.User.name) == - username.decode('utf-8').lower()).first() - if bool(user and check_password_hash(str(user.password), password)): - return True - else: - ip_address = request.headers.get('X-Forwarded-For', request.remote_addr) - log.warning('OPDS Login failed for user "%s" IP-address: %s', username.decode('utf-8'), ip_address) - return False - - -def authenticate(): - return Response( - 'Could not verify your access level for that URL.\n' - 'You have to login with proper credentials', 401, - {'WWW-Authenticate': 'Basic realm="Login Required"'}) - def render_xml_template(*args, **kwargs): # ToDo: return time in current timezone similar to %z diff --git a/cps/static/css/style.css b/cps/static/css/style.css index 6e6b0eae..59bcd2c0 100644 --- a/cps/static/css/style.css +++ b/cps/static/css/style.css @@ -140,6 +140,7 @@ table .bg-dark-danger a { color: #fff; } .container-fluid .book { margin-top: 20px; + max-width: 180px; display: flex; flex-direction: column; } diff --git a/cps/static/js/main.js b/cps/static/js/main.js index 73b90a0d..4ff73d72 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -364,12 +364,6 @@ $(function() { layoutMode : "fitRows" }); - $(".grid").isotope({ - // options - itemSelector : ".grid-item", - layoutMode : "fitColumns" - }); - if ($(".load-more").length && $(".next").length) { var $loadMore = $(".load-more .row").infiniteScroll({ debug: false, diff --git a/cps/usermanagement.py b/cps/usermanagement.py index 62fe6f77..6bf7af5a 100644 --- a/cps/usermanagement.py +++ b/cps/usermanagement.py @@ -23,9 +23,11 @@ from functools import wraps from sqlalchemy.sql.expression import func from werkzeug.security import check_password_hash from flask_login import login_required, login_user +from flask import request, Response -from . import lm, ub, config, constants, services +from . import lm, ub, config, constants, services, logger +log = logger.create() def login_required_if_no_ano(func): @wraps(func) @@ -36,6 +38,47 @@ def login_required_if_no_ano(func): return decorated_view +def requires_basic_auth_if_no_ano(f): + @wraps(f) + def decorated(*args, **kwargs): + auth = request.authorization + if config.config_anonbrowse != 1: + if not auth or auth.type != 'basic' or not check_auth(auth.username, auth.password): + return authenticate() + print("opds_requires_basic_auth") + user = load_user_from_auth_header(auth.username, auth.password) + if not user: + return None + login_user(user) + return f(*args, **kwargs) + if config.config_login_type == constants.LOGIN_LDAP and services.ldap and config.config_anonbrowse != 1: + return services.ldap.basic_auth_required(f) + + return decorated + + +def check_auth(username, password): + try: + username = username.encode('windows-1252') + except UnicodeEncodeError: + username = username.encode('utf-8') + user = ub.session.query(ub.User).filter(func.lower(ub.User.name) == + username.decode('utf-8').lower()).first() + if bool(user and check_password_hash(str(user.password), password)): + return True + else: + ip_address = request.headers.get('X-Forwarded-For', request.remote_addr) + log.warning('OPDS Login failed for user "%s" IP-address: %s', username.decode('utf-8'), ip_address) + return False + + +def authenticate(): + return Response( + 'Could not verify your access level for that URL.\n' + 'You have to login with proper credentials', 401, + {'WWW-Authenticate': 'Basic realm="Login Required"'}) + + def _fetch_user_by_name(username): return ub.session.query(ub.User).filter(func.lower(ub.User.name) == username.lower()).first() @@ -43,11 +86,13 @@ def _fetch_user_by_name(username): @lm.user_loader def load_user(user_id): + print("load_user: {}".format(user_id)) return ub.session.query(ub.User).filter(ub.User.id == int(user_id)).first() @lm.request_loader def load_user_from_request(request): + print("load_from_request") if config.config_allow_reverse_proxy_header_login: rp_header_name = config.config_reverse_proxy_login_header_name if rp_header_name: @@ -58,30 +103,33 @@ def load_user_from_request(request): login_user(user) return user - auth_header = request.headers.get("Authorization") - if auth_header: - user = load_user_from_auth_header(auth_header) - if user: - return user + #auth_header = request.headers.get("Authorization") + #if auth_header: + # user = load_user_from_auth_header(auth_header) + # if user: + # login_user(user) + # return user - return + return None -def load_user_from_auth_header(header_val): - if header_val.startswith('Basic '): - header_val = header_val.replace('Basic ', '', 1) - basic_username = basic_password = '' # nosec - try: - header_val = base64.b64decode(header_val).decode('utf-8') - # Users with colon are invalid: rfc7617 page 4 - basic_username = header_val.split(':', 1)[0] - basic_password = header_val.split(':', 1)[1] - except (TypeError, UnicodeDecodeError, binascii.Error): - pass +def load_user_from_auth_header(basic_username, basic_password): + #if header_val.startswith('Basic '): + # header_val = header_val.replace('Basic ', '', 1) + #basic_username = basic_password = '' # nosec + #try: + # header_val = base64.b64decode(header_val).decode('utf-8') + # # Users with colon are invalid: rfc7617 page 4 + # basic_username = header_val.split(':', 1)[0] + # basic_password = header_val.split(':', 1)[1] + #except (TypeError, UnicodeDecodeError, binascii.Error): + # pass user = _fetch_user_by_name(basic_username) if user and config.config_login_type == constants.LOGIN_LDAP and services.ldap: if services.ldap.bind_user(str(user.password), basic_password): + login_user(user) return user if user and check_password_hash(str(user.password), basic_password): + login_user(user) return user - return + return None diff --git a/cps/web.py b/cps/web.py index 3a575d9e..71d63678 100644 --- a/cps/web.py +++ b/cps/web.py @@ -24,7 +24,7 @@ import mimetypes import chardet # dependency of requests import copy -from flask import Blueprint, jsonify +from flask import Blueprint, jsonify, g from flask import request, redirect, send_from_directory, make_response, flash, abort, url_for from flask import session as flask_session from flask_babel import gettext as _ @@ -79,7 +79,7 @@ except ImportError: @app.after_request -def add_security_headers(resp): +def add_security_headers_and_shelves(resp): csp = "default-src 'self'" csp += ''.join([' ' + host for host in config.config_trustedhosts.strip().split(',')]) csp += " 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src 'self'" @@ -98,6 +98,9 @@ def add_security_headers(resp): resp.headers['X-Frame-Options'] = 'SAMEORIGIN' resp.headers['X-XSS-Protection'] = '1; mode=block' resp.headers['Strict-Transport-Security'] = 'max-age=31536000;' + + g.shelves_access = ub.session.query(ub.Shelf).filter( + or_(ub.Shelf.is_public == 1, ub.Shelf.user_id == current_user.id)).order_by(ub.Shelf.name).all() return resp From 98da7dd5b0cc95acf3935b1af3e8ab2a36135411 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 4 Feb 2023 11:18:43 +0100 Subject: [PATCH 11/15] remove g.user from before request --- cps/admin.py | 2 +- cps/babel.py | 11 ++++++----- cps/render_template.py | 14 ++++++------- cps/templates/book_edit.html | 12 +++++------ cps/templates/book_table.html | 30 ++++++++++++++-------------- cps/templates/detail.html | 22 ++++++++++----------- cps/templates/email_edit.html | 4 ++-- cps/templates/index.html | 2 +- cps/templates/layout.html | 34 ++++++++++++++++---------------- cps/templates/listenmp3.html | 14 ++++++------- cps/templates/modal_dialogs.html | 2 +- cps/templates/read.html | 2 +- cps/templates/readpdf.html | 4 ++-- cps/templates/search.html | 6 +++--- cps/templates/search_form.html | 10 +++++----- cps/templates/shelf.html | 6 +++--- cps/templates/shelf_edit.html | 2 +- cps/templates/shelfdown.html | 4 ++-- cps/templates/stats.html | 2 +- cps/templates/tasks.html | 8 ++++---- cps/templates/user_edit.html | 12 +++++------ cps/templates/user_table.html | 6 +++--- 22 files changed, 105 insertions(+), 104 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 1d1bf4c2..b3af0f8a 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -109,7 +109,7 @@ def before_request(): # log.info("before logout {}".format(request.path)) # logout_user() g.constants = constants - g.user = current_user + # g.user = current_user g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','') g.allow_registration = config.config_public_reg g.allow_anonymous = config.config_anonbrowse diff --git a/cps/babel.py b/cps/babel.py index 5a6136a5..e6c32806 100644 --- a/cps/babel.py +++ b/cps/babel.py @@ -1,7 +1,8 @@ from babel import negotiate_locale from flask_babel import Babel, Locale from babel.core import UnknownLocaleError -from flask import request, g +from flask import request +from flask_login import current_user from . import logger @@ -11,10 +12,10 @@ babel = Babel() def get_locale(): # if a user is logged in, use the locale from the user settings - user = getattr(g, 'user', None) - if user is not None and hasattr(user, "locale"): - if user.name != 'Guest': # if the account is the guest account bypass the config lang settings - return user.locale + if current_user is not None and hasattr(current_user, "locale"): + # if the account is the guest account bypass the config lang settings + if current_user.name != 'Guest': + return current_user.locale preferred = list() if request.accept_languages: diff --git a/cps/render_template.py b/cps/render_template.py index 74462f9f..70faaa13 100644 --- a/cps/render_template.py +++ b/cps/render_template.py @@ -45,12 +45,12 @@ def get_sidebar_config(kwargs=None): "show_text": _('Show Hot Books'), "config_show": True}) if current_user.role_admin(): sidebar.append({"glyph": "glyphicon-download", "text": _('Downloaded Books'), "link": 'web.download_list', - "id": "download", "visibility": constants.SIDEBAR_DOWNLOAD, 'public': (not g.user.is_anonymous), + "id": "download", "visibility": constants.SIDEBAR_DOWNLOAD, 'public': (not current_user.is_anonymous), "page": "download", "show_text": _('Show Downloaded Books'), "config_show": content}) else: sidebar.append({"glyph": "glyphicon-download", "text": _('Downloaded Books'), "link": 'web.books_list', - "id": "download", "visibility": constants.SIDEBAR_DOWNLOAD, 'public': (not g.user.is_anonymous), + "id": "download", "visibility": constants.SIDEBAR_DOWNLOAD, 'public': (not current_user.is_anonymous), "page": "download", "show_text": _('Show Downloaded Books'), "config_show": content}) sidebar.append( @@ -58,11 +58,11 @@ def get_sidebar_config(kwargs=None): "visibility": constants.SIDEBAR_BEST_RATED, 'public': True, "page": "rated", "show_text": _('Show Top Rated Books'), "config_show": True}) sidebar.append({"glyph": "glyphicon-eye-open", "text": _('Read Books'), "link": 'web.books_list', "id": "read", - "visibility": constants.SIDEBAR_READ_AND_UNREAD, 'public': (not g.user.is_anonymous), + "visibility": constants.SIDEBAR_READ_AND_UNREAD, 'public': (not current_user.is_anonymous), "page": "read", "show_text": _('Show Read and Unread'), "config_show": content}) sidebar.append( {"glyph": "glyphicon-eye-close", "text": _('Unread Books'), "link": 'web.books_list', "id": "unread", - "visibility": constants.SIDEBAR_READ_AND_UNREAD, 'public': (not g.user.is_anonymous), "page": "unread", + "visibility": constants.SIDEBAR_READ_AND_UNREAD, 'public': (not current_user.is_anonymous), "page": "unread", "show_text": _('Show unread'), "config_show": False}) sidebar.append({"glyph": "glyphicon-random", "text": _('Discover'), "link": 'web.books_list', "id": "rand", "visibility": constants.SIDEBAR_RANDOM, 'public': True, "page": "discover", @@ -81,7 +81,7 @@ def get_sidebar_config(kwargs=None): "visibility": constants.SIDEBAR_PUBLISHER, 'public': True, "page": "publisher", "show_text": _('Show Publisher Section'), "config_show":True}) sidebar.append({"glyph": "glyphicon-flag", "text": _('Languages'), "link": 'web.language_overview', "id": "lang", - "visibility": constants.SIDEBAR_LANGUAGE, 'public': (g.user.filter_language() == 'all'), + "visibility": constants.SIDEBAR_LANGUAGE, 'public': (current_user.filter_language() == 'all'), "page": "language", "show_text": _('Show Language Section'), "config_show": True}) sidebar.append({"glyph": "glyphicon-star-empty", "text": _('Ratings'), "link": 'web.ratings_list', "id": "rate", @@ -92,12 +92,12 @@ def get_sidebar_config(kwargs=None): "page": "format", "show_text": _('Show File Formats Section'), "config_show": True}) sidebar.append( {"glyph": "glyphicon-trash", "text": _('Archived Books'), "link": 'web.books_list', "id": "archived", - "visibility": constants.SIDEBAR_ARCHIVED, 'public': (not g.user.is_anonymous), "page": "archived", + "visibility": constants.SIDEBAR_ARCHIVED, 'public': (not current_user.is_anonymous), "page": "archived", "show_text": _('Show Archived Books'), "config_show": content}) if not simple: sidebar.append( {"glyph": "glyphicon-th-list", "text": _('Books List'), "link": 'web.books_table', "id": "list", - "visibility": constants.SIDEBAR_LIST, 'public': (not g.user.is_anonymous), "page": "list", + "visibility": constants.SIDEBAR_LIST, 'public': (not current_user.is_anonymous), "page": "list", "show_text": _('Show Books List'), "config_show": content}) return sidebar, simple diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 3ce1dbfa..bfb8efdd 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -6,7 +6,7 @@ -{% if g.user.role_delete_books() %} +{% if current_user.role_delete_books() %}
@@ -99,7 +99,7 @@ - {% if g.user.role_upload() and g.allow_upload %} + {% if current_user.role_upload() and g.allow_upload %}
@@ -196,7 +196,7 @@
{% endfor %} {% endif %} - {% if g.user.role_upload() and g.allow_upload %} + {% if current_user.role_upload() and g.allow_upload %}
@@ -291,7 +291,7 @@ 'description': {{_('Description')|safe|tojson}}, 'source': {{_('Source')|safe|tojson}}, }; - var language = '{{ g.user.locale }}'; + var language = '{{ current_user.locale }}'; $("#add-identifier-line").click(function() { // create a random identifier type to have a valid name in form. This will not be used when dealing with the form @@ -313,8 +313,8 @@ -{% if not g.user.locale == 'en' %} - +{% if not current_user.locale == 'en' %} + {% endif %} diff --git a/cps/templates/book_table.html b/cps/templates/book_table.html index 518b3227..ae32332b 100644 --- a/cps/templates/book_table.html +++ b/cps/templates/book_table.html @@ -4,7 +4,7 @@ {% if sort %}data-sortable="true" {% endif %} data-visible = "{{visiblility.get(parameter)}}" data-escape="true" - {% if g.user.role_edit() %} + {% if current_user.role_edit() %} data-editable-type="text" data-editable-url="{{ url_for('edit-book.edit_list_book', param=parameter)}}" data-editable-title="{{ edit_text }}" @@ -53,10 +53,10 @@
+ data-url="{{url_for('web.list_books')}}" data-locale="{{ current_user.locale }}"> - {% if g.user.role_edit() %} + {% if current_user.role_edit() %} {% endif %} @@ -66,37 +66,37 @@ {{ text_table_row('authors', _('Enter Authors'),_('Authors'), true, true) }} {{ text_table_row('tags', _('Enter Categories'),_('Categories'), false, true) }} {{ text_table_row('series', _('Enter Series'),_('Series'), false, true) }} - + {{ text_table_row('languages', _('Enter Languages'),_('Languages'), false, true) }} {{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false, true) }} - - {% if g.user.check_visibility(32768) %} + + {% if current_user.check_visibility(32768) %} {{ book_checkbox_row('is_archived', _('Archive Status'), false)}} {% endif %} {{ book_checkbox_row('read_status', _('Read Status'), false)}} {% for c in cc %} {% if c.datatype == "int" %} - + {% elif c.datatype == "rating" %} - + {% elif c.datatype == "float" %} - + {% elif c.datatype == "enumeration" %} - + {% elif c.datatype in ["datetime"] %} {% elif c.datatype == "text" %} {{ text_table_row('custom_column_' + c.id|string, _('Enter ') + c.name, c.name, false, false) }} {% elif c.datatype == "comments" %} - + {% elif c.datatype == "bool" %} {{ book_checkbox_row('custom_column_' + c.id|string, c.name, false)}} {% else %} {% endif %} {% endfor %} - {% if g.user.role_delete_books() and g.user.role_edit()%} + {% if current_user.role_delete_books() and current_user.role_edit()%} {% endif %} @@ -105,7 +105,7 @@ {% endblock %} {% block modal %} {{ delete_book() }} -{% if g.user.role_edit() %} +{% if current_user.role_edit() %}
{{_('Series Index')}}{{_('Series Index')}}{{_('Comments')}}{{_('Comments')}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{c.name}}{{_('Delete')}}
+
@@ -90,7 +90,7 @@

{{_('Denied Domains (Blacklist)')}}

- +
diff --git a/cps/templates/index.html b/cps/templates/index.html index 0bb3da72..464a1461 100644 --- a/cps/templates/index.html +++ b/cps/templates/index.html @@ -1,7 +1,7 @@ {% import 'image.html' as image %} {% extends "layout.html" %} {% block body %} -{% if g.user.show_detail_random() and page != "discover" %} +{% if current_user.show_detail_random() and page != "discover" %}

{{_('Discover (Random Books)')}}

diff --git a/cps/templates/layout.html b/cps/templates/layout.html index fc32bcd8..07adbabd 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -1,7 +1,7 @@ {% from 'modal_dialogs.html' import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %} {% import 'image.html' as image %} - + {{instance}} | {{title}} @@ -40,7 +40,7 @@
{% endif %} - {% if g.user.is_authenticated or g.allow_anonymous %} + {% if current_user.is_authenticated or g.allow_anonymous %}
@@ -52,28 +52,28 @@ {% endif %}
-{% if g.user.role_admin() %} +{% if current_user.role_admin() %}

{{_('System Statistics')}}

diff --git a/cps/templates/tasks.html b/cps/templates/tasks.html index 5cbc5f8b..386577a6 100644 --- a/cps/templates/tasks.html +++ b/cps/templates/tasks.html @@ -5,10 +5,10 @@ {% block body %}

{{_('Tasks')}}

-
+
- {% if g.user.role_admin() %} + {% if current_user.role_admin() %} {% endif %} @@ -16,7 +16,7 @@ - {% if g.user.role_admin() %} + {% if current_user.role_admin() %} {% endif %} @@ -28,7 +28,7 @@ {% endblock %} {% block modal %} {{ delete_book() }} -{% if g.user.role_admin() %} +{% if current_user.role_admin() %}
{{_('User')}}{{_('Task')}}{{_('Progress')}} {{_('Run Time')}} {{_('Start Time')}}{{_('Actions')}}
+ data-url="{{url_for('admin.list_users')}}" data-locale="{{ current_user.locale }}"> @@ -185,8 +185,8 @@ -{% if not g.user.locale == 'en' %} - +{% if not current_user.locale == 'en' %} + {% endif %} {% endblock %} From f8fbc807f1770cd78dc75effb66a3fa2ddbd443d Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 4 Feb 2023 14:51:41 +0100 Subject: [PATCH 12/15] further refactored user login --- cps/MyLoginManager.py | 22 ++++++-- cps/admin.py | 2 +- cps/opds.py | 16 +++--- cps/render_template.py | 7 ++- cps/services/simpleldap.py | 1 + cps/templates/book_edit.html | 2 +- cps/templates/book_table.html | 2 +- cps/templates/modal_dialogs.html | 4 +- cps/templates/tasks.html | 2 +- cps/usermanagement.py | 86 +++++++++++--------------------- cps/web.py | 9 ++-- 11 files changed, 71 insertions(+), 82 deletions(-) diff --git a/cps/MyLoginManager.py b/cps/MyLoginManager.py index 2f06be94..aa03ca52 100644 --- a/cps/MyLoginManager.py +++ b/cps/MyLoginManager.py @@ -21,9 +21,10 @@ # along with this program. If not, see . -from flask_login import LoginManager -from flask import session - +from flask_login import LoginManager, confirm_login +from flask import session, current_app +from flask_login.utils import decode_cookie +from flask_login.signals import user_loaded_from_cookie class MyLoginManager(LoginManager): def _session_protection_failed(self): @@ -33,3 +34,18 @@ class MyLoginManager(LoginManager): and _session.get('csrf_token', None))) and ident != _session.get('_id', None): return super(). _session_protection_failed() return False + + def _load_user_from_remember_cookie(self, cookie): + user_id = decode_cookie(cookie) + if user_id is not None: + session["_user_id"] = user_id + session["_fresh"] = False + user = None + if self._user_callback: + user = self._user_callback(user_id) + if user is not None: + app = current_app._get_current_object() + user_loaded_from_cookie.send(app, user=user) + confirm_login() + return user + return None diff --git a/cps/admin.py b/cps/admin.py index b3af0f8a..b0ac0fac 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -33,7 +33,7 @@ from datetime import time as datetime_time from functools import wraps from flask import Blueprint, flash, redirect, url_for, abort, request, make_response, send_from_directory, g, Response -from flask_login import login_required, current_user, logout_user, confirm_login +from flask_login import login_required, current_user, logout_user from flask_babel import gettext as _ from flask_babel import get_locale, format_time, format_datetime, format_timedelta from flask import session as flask_session diff --git a/cps/opds.py b/cps/opds.py index bf50691a..6b09a84d 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -23,10 +23,10 @@ import datetime from urllib.parse import unquote_plus - -from flask import Blueprint, request, render_template, g, make_response, abort +from flask import Blueprint, request, render_template, make_response, abort from flask_login import current_user from flask_babel import get_locale +from flask_babel import gettext as _ from sqlalchemy.sql.expression import func, text, or_, and_, true from sqlalchemy.exc import InvalidRequestError, OperationalError @@ -35,8 +35,7 @@ from .usermanagement import requires_basic_auth_if_no_ano from .helper import get_download_link, get_book_cover from .pagination import Pagination from .web import render_read_books -from .usermanagement import load_user_from_request -from flask_babel import gettext as _ + opds = Blueprint('opds', __name__) @@ -342,7 +341,8 @@ def feed_languages(book_id): @requires_basic_auth_if_no_ano def feed_shelfindex(): off = request.args.get("offset") or 0 - shelf = g.shelves_access + shelf = ub.session.query(ub.Shelf).filter( + or_(ub.Shelf.is_public == 1, ub.Shelf.user_id == current_user.id)).order_by(ub.Shelf.name).all() number = len(shelf) pagination = Pagination((int(off) / (int(config.config_books_per_page)) + 1), config.config_books_per_page, number) @@ -389,11 +389,7 @@ def feed_shelf(book_id): @opds.route("/opds/download///") @requires_basic_auth_if_no_ano def opds_download_link(book_id, book_format): - # I gave up with this: With enabled ldap login, the user doesn't get logged in, therefore it's always guest - # workaround, loading the user from the request and checking its download rights here - # in case of anonymous browsing user is None - user = load_user_from_request(request) or current_user - if not user.role_download(): + if not current_user.role_download(): return abort(403) if "Kobo" in request.headers.get('User-Agent'): client = "kobo" diff --git a/cps/render_template.py b/cps/render_template.py index 70faaa13..68b46459 100644 --- a/cps/render_template.py +++ b/cps/render_template.py @@ -20,11 +20,13 @@ from flask import render_template, g, abort, request from flask_babel import gettext as _ from werkzeug.local import LocalProxy from flask_login import current_user +from sqlalchemy.sql.expression import or_ -from . import config, constants, logger +from . import config, constants, logger, ub from .ub import User + log = logger.create() def get_sidebar_config(kwargs=None): @@ -99,6 +101,9 @@ def get_sidebar_config(kwargs=None): {"glyph": "glyphicon-th-list", "text": _('Books List'), "link": 'web.books_table', "id": "list", "visibility": constants.SIDEBAR_LIST, 'public': (not current_user.is_anonymous), "page": "list", "show_text": _('Show Books List'), "config_show": content}) + g.shelves_access = ub.session.query(ub.Shelf).filter( + or_(ub.Shelf.is_public == 1, ub.Shelf.user_id == current_user.id)).order_by(ub.Shelf.name).all() + return sidebar, simple diff --git a/cps/services/simpleldap.py b/cps/services/simpleldap.py index 1ca7e5bf..8f1606fc 100644 --- a/cps/services/simpleldap.py +++ b/cps/services/simpleldap.py @@ -89,6 +89,7 @@ def get_object_details(user=None,query_filter=None): def bind(): + print("bind") return _ldap.bind() diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index bfb8efdd..6552cd26 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -219,7 +219,7 @@ {% endblock %} {% block modal %} -{{ delete_book() }} +{{ delete_book(current_user.role_delete_books()) }} {{ delete_confirm_modal() }}
{{_('Edit')}}
{% endblock %} {% block modal %} -{{ delete_book() }} +{{ delete_book(current_user.role_delete_books()) }} {% if current_user.role_edit() %} {% endmacro %} -{% macro delete_book() %} -{% if current_user.role_delete_books() %} +{% macro delete_book(allow) %} +{% if allow %}