* large WARC loading optimizations (attempted to fix #67)
- use dedicated web worker for loading, remove when done - update to warcio 1.5.0 for faster loading of large WARCs - show WARC records loading for better progress update * fidelity: fix potentially invalid location redirect via wombat 3.3.5 (see: webrecorder/pywb#684) * dependencies: wabac.js 2.10.0-beta.0 (includes warcio 1.5.0, wombat 3.3.5) * bump to 1.5.6, update CHANGES
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
## CHANGES
|
## CHANGES
|
||||||
|
|
||||||
|
v1.5.6
|
||||||
|
- Fidelity: Fix assignment to local location causing invalid redirect (via wombat 3.3.5)
|
||||||
|
- Loading: Optimized loading for larger WARCs (via warcio 1.5.0)
|
||||||
|
- Loading: Show number of WARC records loaded (via wabac.js 2.10.0)
|
||||||
|
- Loading: Use separate web worker for loading, then remove for possible faster loading
|
||||||
|
|
||||||
v1.5.5
|
v1.5.5
|
||||||
- Fidelity: Only wrap JS globals if necessary (via wabac.js 2.9.5)
|
- Fidelity: Only wrap JS globals if necessary (via wabac.js 2.9.5)
|
||||||
- UI: Add download option from collection info and dropdown menu to download web archives from http.
|
- UI: Add download option from collection info and dropdown menu to download web archives from http.
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "replaywebpage",
|
"name": "replaywebpage",
|
||||||
"productName": "ReplayWeb.page",
|
"productName": "ReplayWeb.page",
|
||||||
"version": "1.5.5",
|
"version": "1.5.6",
|
||||||
"description": "Serverless Web Archive Replay",
|
"description": "Serverless Web Archive Replay",
|
||||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||||
"homepage": "https://replayweb.page/",
|
"homepage": "https://replayweb.page/",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"@webrecorder/wabac": "^2.9.5",
|
"@webrecorder/wabac": "^2.10.0-beta.0",
|
||||||
"bulma": "^0.9.3",
|
"bulma": "^0.9.3",
|
||||||
"electron-log": "^4.4.1",
|
"electron-log": "^4.4.1",
|
||||||
"electron-updater": "^4.3.9",
|
"electron-updater": "^4.3.9",
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "replaywebpage",
|
"name": "replaywebpage",
|
||||||
"productName": "ReplayWeb.page",
|
"productName": "ReplayWeb.page",
|
||||||
"version": "1.5.5",
|
"version": "1.5.6",
|
||||||
"description": "Serverless Web Archive Replay",
|
"description": "Serverless Web Archive Replay",
|
||||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||||
"homepage": "https://replayweb.page/",
|
"homepage": "https://replayweb.page/",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"@webrecorder/wabac": "^2.9.5",
|
"@webrecorder/wabac": "^2.10.0-beta.0",
|
||||||
"bulma": "^0.9.3",
|
"bulma": "^0.9.3",
|
||||||
"electron-log": "^4.4.1",
|
"electron-log": "^4.4.1",
|
||||||
"electron-updater": "^4.3.9",
|
"electron-updater": "^4.3.9",
|
||||||
|
|||||||
+30
-15
@@ -45,7 +45,8 @@ class Loader extends LitElement
|
|||||||
coll: { type: String },
|
coll: { type: String },
|
||||||
embed: { type: String },
|
embed: { type: String },
|
||||||
tryFileHandle: { type: Boolean },
|
tryFileHandle: { type: Boolean },
|
||||||
errorAllowRetry: { type: Boolean }
|
errorAllowRetry: { type: Boolean },
|
||||||
|
extraMsg: { type: String }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,11 +56,12 @@ class Loader extends LitElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
initMessages() {
|
initMessages() {
|
||||||
if (!navigator.serviceWorker) {
|
// if (!navigator.serviceWorker) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
this.worker = new Worker(__SW_NAME__);
|
||||||
|
|
||||||
navigator.serviceWorker.addEventListener("message", (event) => {
|
this.worker.addEventListener("message", (event) => {
|
||||||
switch (event.data.msg_type) {
|
switch (event.data.msg_type) {
|
||||||
case "collProgress":
|
case "collProgress":
|
||||||
if (event.data.name === this.coll) {
|
if (event.data.name === this.coll) {
|
||||||
@@ -80,6 +82,7 @@ class Loader extends LitElement
|
|||||||
this.currentSize = event.data.currentSize;
|
this.currentSize = event.data.currentSize;
|
||||||
this.totalSize = event.data.totalSize;
|
this.totalSize = event.data.totalSize;
|
||||||
}
|
}
|
||||||
|
this.extraMsg = event.data.extraMsg;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -94,6 +97,7 @@ class Loader extends LitElement
|
|||||||
clearInterval(this.pingInterval);
|
clearInterval(this.pingInterval);
|
||||||
}
|
}
|
||||||
this.dispatchEvent(new CustomEvent("coll-loaded", {detail: event.data}));
|
this.dispatchEvent(new CustomEvent("coll-loaded", {detail: event.data}));
|
||||||
|
this.worker.terminate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -182,13 +186,15 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
navigator.serviceWorker.controller.postMessage(msg);
|
this.worker.postMessage(msg);
|
||||||
|
|
||||||
|
//navigator.serviceWorker.controller.postMessage(msg);
|
||||||
|
|
||||||
// ping service worker with messages to avoid shutdown while loading
|
// ping service worker with messages to avoid shutdown while loading
|
||||||
// (mostly for Firefox)
|
// (mostly for Firefox)
|
||||||
this.pingInterval = setInterval(() => {
|
// this.pingInterval = setInterval(() => {
|
||||||
navigator.serviceWorker.controller.postMessage({"msg_type": "ping"});
|
// navigator.serviceWorker.controller.postMessage({"msg_type": "ping"});
|
||||||
}, 15000);
|
// }, 15000);
|
||||||
}
|
}
|
||||||
|
|
||||||
googledriveInit() {
|
googledriveInit() {
|
||||||
@@ -206,11 +212,12 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCancel() {
|
onCancel() {
|
||||||
if (navigator.serviceWorker && navigator.serviceWorker.controller) {
|
//if (navigator.serviceWorker && navigator.serviceWorker.controller) {
|
||||||
navigator.serviceWorker.controller.postMessage({"msg_type": "cancelLoad", "name": this.coll});
|
if (this.worker) {
|
||||||
if (this.pingInterval) {
|
this.worker.controller.postMessage({"msg_type": "cancelLoad", "name": this.coll});
|
||||||
clearInterval(this.pingInterval);
|
// if (this.pingInterval) {
|
||||||
}
|
// clearInterval(this.pingInterval);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,6 +267,10 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
|||||||
section.container {
|
section.container {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.extra-msg {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +305,11 @@ You can select a file to upload from the main page by clicking the 'Choose File.
|
|||||||
value="${this.percent}" max="100"></progress>
|
value="${this.percent}" max="100"></progress>
|
||||||
<label class="progress-label" for="progress">${this.percent}%</label>
|
<label class="progress-label" for="progress">${this.percent}%</label>
|
||||||
${this.currentSize && this.totalSize ? html`
|
${this.currentSize && this.totalSize ? html`
|
||||||
<p class="loaded-prog">Loaded <b>${prettyBytes(this.currentSize)}</b> of <b>${prettyBytes(this.totalSize)}</b></p>` : html``}
|
<div class="loaded-prog">Loaded <b>${prettyBytes(this.currentSize)}</b> of <b>${prettyBytes(this.totalSize)}</b>
|
||||||
|
${this.extraMsg && html`
|
||||||
|
<p class="extra-msg">(${this.extraMsg})</p>
|
||||||
|
`}
|
||||||
|
</div>` : html``}
|
||||||
|
|
||||||
${!this.embed ? html`
|
${!this.embed ? html`
|
||||||
<button @click="${this.onCancel}" class="button is-danger">Cancel</button>` : ""}
|
<button @click="${this.onCancel}" class="button is-danger">Cancel</button>` : ""}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import INDEX_HTML from "../index.html";
|
|||||||
|
|
||||||
import { SWReplay } from "@webrecorder/wabac/src/swmain";
|
import { SWReplay } from "@webrecorder/wabac/src/swmain";
|
||||||
|
|
||||||
|
import { WorkerLoader } from "@webrecorder/wabac/src/loaders";
|
||||||
|
|
||||||
|
|
||||||
|
if (self.registration) {
|
||||||
const staticData = new Map();
|
const staticData = new Map();
|
||||||
|
|
||||||
const prefix = self.registration.scope;
|
const prefix = self.registration.scope;
|
||||||
@@ -18,6 +22,9 @@ const defaultConfig = {
|
|||||||
|
|
||||||
self.ipfsCustomPreload = true;
|
self.ipfsCustomPreload = true;
|
||||||
self.sw = new SWReplay({staticData, defaultConfig});
|
self.sw = new SWReplay({staticData, defaultConfig});
|
||||||
|
} else {
|
||||||
|
new WorkerLoader(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class ie extends te{constructor(e){if(super(e),this.it=I,e.type!==X)throw Error(
|
|||||||
* Copyright 2017 Google LLC
|
* Copyright 2017 Google LLC
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
class re extends ie{}re.directiveName="unsafeSVG",re.resultType=2;const oe=ee(re),ne=ee(class extends te{constructor(e){var t;if(super(e),e.type!==Y||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const a=e[i];return null==a?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${a};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ut){this.ut=new Set;for(const e in t)this.ut.add(e);return this.render(t)}this.ut.forEach((e=>{null==t[e]&&(this.ut.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const a=t[e];null!=a&&(this.ut.add(e),e.includes("-")?i.setProperty(e,a):i[e]=a)}return T}});var se=__webpack_require__(6274),le=__webpack_require__(3029),ce=__webpack_require__.n(le);const de=r(se.Z);function ue(e){return[de,e]}const he=window.IS_APP||window.electron&&window.electron.IS_APP||window.matchMedia("(display-mode: standalone)").matches,fe="1.5.5";function be(e){" "==e.key&&(e.preventDefault(),e.target.click())}class pe extends J{constructor(){super(),this.size="1.1em",this.width=null,this.height=null}static get properties(){return{svg:{type:String},size:{type:String},width:{type:String},height:{type:String}}}static get styles(){return o`
|
class re extends ie{}re.directiveName="unsafeSVG",re.resultType=2;const oe=ee(re),ne=ee(class extends te{constructor(e){var t;if(super(e),e.type!==Y||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const a=e[i];return null==a?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${a};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ut){this.ut=new Set;for(const e in t)this.ut.add(e);return this.render(t)}this.ut.forEach((e=>{null==t[e]&&(this.ut.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const a=t[e];null!=a&&(this.ut.add(e),e.includes("-")?i.setProperty(e,a):i[e]=a)}return T}});var se=__webpack_require__(6274),le=__webpack_require__(3029),ce=__webpack_require__.n(le);const de=r(se.Z);function ue(e){return[de,e]}const he=window.IS_APP||window.electron&&window.electron.IS_APP||window.matchMedia("(display-mode: standalone)").matches,fe="1.5.6";function be(e){" "==e.key&&(e.preventDefault(),e.target.click())}class pe extends J{constructor(){super(),this.size="1.1em",this.width=null,this.height=null}static get properties(){return{svg:{type:String},size:{type:String},width:{type:String},height:{type:String}}}static get styles(){return o`
|
||||||
:host {
|
:host {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -1312,7 +1312,7 @@ class re extends ie{}re.directiveName="unsafeSVG",re.resultType=2;const oe=ee(re
|
|||||||
<span class="icon"><fa-icon .svg="${Mt()}"></fa-icon></span>
|
<span class="icon"><fa-icon .svg="${Mt()}"></fa-icon></span>
|
||||||
<span>Authorize Google Drive</span>
|
<span>Authorize Google Drive</span>
|
||||||
</button>
|
</button>
|
||||||
`}`}script(){if("trypublic"===this.state||this.scriptLoaded)return L``;const e=document.createElement("script");return e.onload=()=>this.onLoad(),e.src="https://apis.google.com/js/platform.js",e}gauth(e,t){self.gapi.load("auth2",(()=>{self.gapi.auth2.authorize({client_id:"160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.file",response_type:"token",prompt:e},t)}))}}customElements.define("wr-gdrive",jt);class Ht extends J{constructor(){super(),this.progress=0,this.total=0,this.percent=0,this.coll="",this.state="waiting",this.loadInfo=null,this.currentSize=0,this.totalSize=0,this.tryFileHandle=!!window.showOpenFilePicker,this.fileHandle=null,this.errorAllowRetry=!1,this.pingInterval=""}static get properties(){return{sourceUrl:{type:String},loadInfo:{type:Object},state:{type:String},progress:{type:Number},percent:{type:Number},currentSize:{type:Number},totalSize:{type:Number},error:{type:String},total:{type:Number},status:{type:String},coll:{type:String},embed:{type:String},tryFileHandle:{type:Boolean},errorAllowRetry:{type:Boolean}}}firstUpdated(){this.initMessages()}initMessages(){navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",(e=>{switch(e.data.msg_type){case"collProgress":if(e.data.name===this.coll){if(this.percent=e.data.percent,e.data.error)if(this.error=e.data.error,this.state="errored",this.errorAllowRetry=!0,this.fileHandle=e.data.fileHandle,"missing_local_file"===this.error)this.tryFileHandle=!1;else if("permission_needed"===this.error&&e.data.fileHandle){this.state="permission_needed";break}e.data.currentSize&&e.data.totalSize&&(this.currentSize=e.data.currentSize,this.totalSize=e.data.totalSize)}break;case"collAdded":e.data.name===this.coll&&(this.total||(this.total=100),this.progress=this.total,this.percent=100,this.pingInterval&&clearInterval(this.pingInterval),this.dispatchEvent(new CustomEvent("coll-loaded",{detail:e.data})))}}))}async doLoad(){let e=this.sourceUrl,t=null;if(this.percent=this.currentSize=this.totalSize=0,!navigator.serviceWorker)return this.state="errored","http:"===window.location.protocol?this.error=`Sorry, the ReplayWeb.page system must be loaded from an HTTPS URL, but was loaded from: ${window.location.host}.\nPlease try loading this page from an HTTPS URL`:this.error="Sorry, this browser is not supported. Please try a different browser\n(If you're using Firefox, try without Private Mode)",void(this.errorAllowRetry=!1);try{const{scheme:i,host:a,path:r}=function(e){let t=e.indexOf("://"),i=0,a="",r="",o="";return t>=0?(a=e.slice(0,t),t+=3):(t++,e.startsWith("//")&&(t+=2)),i=e.indexOf("/",t),i>0?(r=e.slice(t,i),o=e.slice(i)):(r=e.slice(t),o=""),{scheme:a,host:r,path:o}}(e);switch(i){case"googledrive":this.state="googledrive",t=await this.googledriveInit();break;case"s3":t={sourceUrl:e,loadUrl:`https://${a}.s3.amazonaws.com${r}`,name:this.sourceUrl};break;case"file":if(!this.loadInfo&&!this.tryFileHandle)return this.state="errored",this.error="File URLs can not be entered directly or shared.\nYou can select a file to upload from the main page by clicking the 'Choose File...' button.",void(this.errorAllowRetry=!1);t=this.loadInfo;break;case"ipfs":if(he){const i=new URL("http://files.replayweb.page/"),a=e.split("#",1)[0];i.searchParams.set("ipfs",a.slice("ipfs://".length)),t={sourceUrl:e,loadUrl:i.href}}}}catch(e){console.log(e)}t||(t={sourceUrl:e}),t.newFullImport=this.loadInfo&&this.loadInfo.newFullImport,this.state="started";const i={msg_type:"addColl",name:this.coll,skipExisting:!0,file:t};this.loadInfo&&this.loadInfo.extraConfig&&(i.extraConfig=this.loadInfo.extraConfig),navigator.serviceWorker.controller||await new Promise((e=>{navigator.serviceWorker.addEventListener("controllerchange",(()=>e()))})),navigator.serviceWorker.controller.postMessage(i),this.pingInterval=setInterval((()=>{navigator.serviceWorker.controller.postMessage({msg_type:"ping"})}),15e3)}googledriveInit(){return this._gdWait=new Promise((e=>this._gdResolve=e)),this._gdWait}async onLoadReady(e){this._gdResolve&&this._gdResolve(e.detail)}onCancel(){navigator.serviceWorker&&navigator.serviceWorker.controller&&(navigator.serviceWorker.controller.postMessage({msg_type:"cancelLoad",name:this.coll}),this.pingInterval&&clearInterval(this.pingInterval))}updated(e){(this.sourceUrl&&e.has("sourceUrl")||e.has("tryFileHandle"))&&this.doLoad()}static get styles(){return ue(o`
|
`}`}script(){if("trypublic"===this.state||this.scriptLoaded)return L``;const e=document.createElement("script");return e.onload=()=>this.onLoad(),e.src="https://apis.google.com/js/platform.js",e}gauth(e,t){self.gapi.load("auth2",(()=>{self.gapi.auth2.authorize({client_id:"160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.file",response_type:"token",prompt:e},t)}))}}customElements.define("wr-gdrive",jt);class Ht extends J{constructor(){super(),this.progress=0,this.total=0,this.percent=0,this.coll="",this.state="waiting",this.loadInfo=null,this.currentSize=0,this.totalSize=0,this.tryFileHandle=!!window.showOpenFilePicker,this.fileHandle=null,this.errorAllowRetry=!1,this.pingInterval=""}static get properties(){return{sourceUrl:{type:String},loadInfo:{type:Object},state:{type:String},progress:{type:Number},percent:{type:Number},currentSize:{type:Number},totalSize:{type:Number},error:{type:String},total:{type:Number},status:{type:String},coll:{type:String},embed:{type:String},tryFileHandle:{type:Boolean},errorAllowRetry:{type:Boolean},extraMsg:{type:String}}}firstUpdated(){this.initMessages()}initMessages(){this.worker=new Worker("sw.js"),this.worker.addEventListener("message",(e=>{switch(e.data.msg_type){case"collProgress":if(e.data.name===this.coll){if(this.percent=e.data.percent,e.data.error)if(this.error=e.data.error,this.state="errored",this.errorAllowRetry=!0,this.fileHandle=e.data.fileHandle,"missing_local_file"===this.error)this.tryFileHandle=!1;else if("permission_needed"===this.error&&e.data.fileHandle){this.state="permission_needed";break}e.data.currentSize&&e.data.totalSize&&(this.currentSize=e.data.currentSize,this.totalSize=e.data.totalSize),this.extraMsg=e.data.extraMsg}break;case"collAdded":e.data.name===this.coll&&(this.total||(this.total=100),this.progress=this.total,this.percent=100,this.pingInterval&&clearInterval(this.pingInterval),this.dispatchEvent(new CustomEvent("coll-loaded",{detail:e.data})),this.worker.terminate())}}))}async doLoad(){let e=this.sourceUrl,t=null;if(this.percent=this.currentSize=this.totalSize=0,!navigator.serviceWorker)return this.state="errored","http:"===window.location.protocol?this.error=`Sorry, the ReplayWeb.page system must be loaded from an HTTPS URL, but was loaded from: ${window.location.host}.\nPlease try loading this page from an HTTPS URL`:this.error="Sorry, this browser is not supported. Please try a different browser\n(If you're using Firefox, try without Private Mode)",void(this.errorAllowRetry=!1);try{const{scheme:i,host:a,path:r}=function(e){let t=e.indexOf("://"),i=0,a="",r="",o="";return t>=0?(a=e.slice(0,t),t+=3):(t++,e.startsWith("//")&&(t+=2)),i=e.indexOf("/",t),i>0?(r=e.slice(t,i),o=e.slice(i)):(r=e.slice(t),o=""),{scheme:a,host:r,path:o}}(e);switch(i){case"googledrive":this.state="googledrive",t=await this.googledriveInit();break;case"s3":t={sourceUrl:e,loadUrl:`https://${a}.s3.amazonaws.com${r}`,name:this.sourceUrl};break;case"file":if(!this.loadInfo&&!this.tryFileHandle)return this.state="errored",this.error="File URLs can not be entered directly or shared.\nYou can select a file to upload from the main page by clicking the 'Choose File...' button.",void(this.errorAllowRetry=!1);t=this.loadInfo;break;case"ipfs":if(he){const i=new URL("http://files.replayweb.page/"),a=e.split("#",1)[0];i.searchParams.set("ipfs",a.slice("ipfs://".length)),t={sourceUrl:e,loadUrl:i.href}}}}catch(e){console.log(e)}t||(t={sourceUrl:e}),t.newFullImport=this.loadInfo&&this.loadInfo.newFullImport,this.state="started";const i={msg_type:"addColl",name:this.coll,skipExisting:!0,file:t};this.loadInfo&&this.loadInfo.extraConfig&&(i.extraConfig=this.loadInfo.extraConfig),navigator.serviceWorker.controller||await new Promise((e=>{navigator.serviceWorker.addEventListener("controllerchange",(()=>e()))})),this.worker.postMessage(i)}googledriveInit(){return this._gdWait=new Promise((e=>this._gdResolve=e)),this._gdWait}async onLoadReady(e){this._gdResolve&&this._gdResolve(e.detail)}onCancel(){this.worker&&this.worker.controller.postMessage({msg_type:"cancelLoad",name:this.coll})}updated(e){(this.sourceUrl&&e.has("sourceUrl")||e.has("tryFileHandle"))&&this.doLoad()}static get styles(){return ue(o`
|
||||||
:host {
|
:host {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1351,6 +1351,10 @@ class re extends ie{}re.directiveName="unsafeSVG",re.resultType=2;const oe=ee(re
|
|||||||
section.container {
|
section.container {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.extra-msg {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
`)}render(){return L`
|
`)}render(){return L`
|
||||||
<section class="container">
|
<section class="container">
|
||||||
<div class="has-text-centered is-flex">
|
<div class="has-text-centered is-flex">
|
||||||
@@ -1372,7 +1376,11 @@ class re extends ie{}re.directiveName="unsafeSVG",re.resultType=2;const oe=ee(re
|
|||||||
value="${this.percent}" max="100"></progress>
|
value="${this.percent}" max="100"></progress>
|
||||||
<label class="progress-label" for="progress">${this.percent}%</label>
|
<label class="progress-label" for="progress">${this.percent}%</label>
|
||||||
${this.currentSize&&this.totalSize?L`
|
${this.currentSize&&this.totalSize?L`
|
||||||
<p class="loaded-prog">Loaded <b>${Ue()(this.currentSize)}</b> of <b>${Ue()(this.totalSize)}</b></p>`:L``}
|
<div class="loaded-prog">Loaded <b>${Ue()(this.currentSize)}</b> of <b>${Ue()(this.totalSize)}</b>
|
||||||
|
${this.extraMsg&&L`
|
||||||
|
<p class="extra-msg">(${this.extraMsg})</p>
|
||||||
|
`}
|
||||||
|
</div>`:L``}
|
||||||
|
|
||||||
${this.embed?"":L`
|
${this.embed?"":L`
|
||||||
<button @click="${this.onCancel}" class="button is-danger">Cancel</button>`}
|
<button @click="${this.onCancel}" class="button is-danger">Cancel</button>`}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const fallback = {
|
|||||||
"querystring": require.resolve("querystring-es3"),
|
"querystring": require.resolve("querystring-es3"),
|
||||||
"url": require.resolve("url/"),
|
"url": require.resolve("url/"),
|
||||||
"buffer": false,
|
"buffer": false,
|
||||||
|
"process": false
|
||||||
};
|
};
|
||||||
|
|
||||||
const optimization = {
|
const optimization = {
|
||||||
|
|||||||
@@ -962,12 +962,12 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec"
|
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec"
|
||||||
integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==
|
integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==
|
||||||
|
|
||||||
"@webrecorder/wabac@^2.9.5":
|
"@webrecorder/wabac@^2.10.0-beta.0":
|
||||||
version "2.9.5"
|
version "2.10.0-beta.0"
|
||||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.9.5.tgz#a69b9033ebb322f95fc6441a0b45ce70556c042c"
|
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.10.0-beta.0.tgz#ec63c4fd9a574ea49733e22626ed357a9b391e05"
|
||||||
integrity sha512-E6B9s+l+6a3wZt4sK6uU1j4X8Mm4nAJLKVr5U2GpqC9fwOiSllIYTKJ9eSvy6auettIvGlB9BNfYNiw9T5Xnsg==
|
integrity sha512-IFf0rmo/4gEmSKcEa9tU5RrOPqXEvAoor5MQEh22VkdbPKmMdHrGyPrGnws8L6hx8AyMqisCDb5SYuG+my2e4g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@webrecorder/wombat" "^3.3.4"
|
"@webrecorder/wombat" "^3.3.5"
|
||||||
brotli "github:foliojs/brotli.js"
|
brotli "github:foliojs/brotli.js"
|
||||||
buffer "^6.0.3"
|
buffer "^6.0.3"
|
||||||
fast-xml-parser "^3.19.0"
|
fast-xml-parser "^3.19.0"
|
||||||
@@ -983,12 +983,12 @@
|
|||||||
path-parser "^6.1.0"
|
path-parser "^6.1.0"
|
||||||
process "^0.11.10"
|
process "^0.11.10"
|
||||||
stream-browserify "^3.0.0"
|
stream-browserify "^3.0.0"
|
||||||
warcio "^1.4.8"
|
warcio "^1.5.0"
|
||||||
|
|
||||||
"@webrecorder/wombat@^3.3.4":
|
"@webrecorder/wombat@^3.3.5":
|
||||||
version "3.3.4"
|
version "3.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.3.4.tgz#1c8173db83cc1bb2ff09a17ab3bc4874c4bb39b1"
|
resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.3.5.tgz#89aa8e48c58ca3d18ae9ceb52d229c1c04a3d458"
|
||||||
integrity sha512-H+g+T5JCn6CYWvAS/N1mb8zCDKMEotNvlmTGOVZpF3AyBE9Q1U8GMuO6lX3a7grdHWRgtaMf0xgxa4LQFF6JEw==
|
integrity sha512-mj/TtahJjhRf/TSyO0Nr8nwCH373Fyd5mqtqkTlacMsSMZdAfp/t7bY2aVr1rFqEb7KC+U7xkVn6fmDUecLZng==
|
||||||
dependencies:
|
dependencies:
|
||||||
warcio "^1.4.6"
|
warcio "^1.4.6"
|
||||||
|
|
||||||
@@ -7595,7 +7595,7 @@ verror@1.10.0, verror@^1.10.0:
|
|||||||
core-util-is "1.0.2"
|
core-util-is "1.0.2"
|
||||||
extsprintf "^1.2.0"
|
extsprintf "^1.2.0"
|
||||||
|
|
||||||
warcio@^1.4.6, warcio@^1.4.8:
|
warcio@^1.4.6:
|
||||||
version "1.4.8"
|
version "1.4.8"
|
||||||
resolved "https://registry.yarnpkg.com/warcio/-/warcio-1.4.8.tgz#428cbebf80d2f4f69169b1f4a8f3aba7bda829ab"
|
resolved "https://registry.yarnpkg.com/warcio/-/warcio-1.4.8.tgz#428cbebf80d2f4f69169b1f4a8f3aba7bda829ab"
|
||||||
integrity sha512-k8mi2uYWO8KIJxqbwPGm4v7SOwweGewMECjzN1iPu0uIg6irl2i0tDCeJrFMD5NQqzhVrn1x7m8Dh62KmfpZhw==
|
integrity sha512-k8mi2uYWO8KIJxqbwPGm4v7SOwweGewMECjzN1iPu0uIg6irl2i0tDCeJrFMD5NQqzhVrn1x7m8Dh62KmfpZhw==
|
||||||
@@ -7608,6 +7608,19 @@ warcio@^1.4.6, warcio@^1.4.8:
|
|||||||
uuid-random "^1.3.0"
|
uuid-random "^1.3.0"
|
||||||
yargs "^15.3.1"
|
yargs "^15.3.1"
|
||||||
|
|
||||||
|
warcio@^1.5.0:
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/warcio/-/warcio-1.5.0.tgz#da80805f36b26c68c3b79e9d1d334f8df746df3e"
|
||||||
|
integrity sha512-80X3IJ0L5OZYRI/5gIjrLzivP/GVWtWrWsNexvSkfeSafoMsXxViywAuotMh4+WzjrcgDA9SGR1Gpg/uXl/9Fw==
|
||||||
|
dependencies:
|
||||||
|
"@peculiar/webcrypto" "^1.1.1"
|
||||||
|
esm "^3.2.25"
|
||||||
|
hi-base32 "^0.5.0"
|
||||||
|
node-fetch "^2.6.1"
|
||||||
|
pako "^1.0.11"
|
||||||
|
uuid-random "^1.3.0"
|
||||||
|
yargs "^15.3.1"
|
||||||
|
|
||||||
watchpack@^2.2.0:
|
watchpack@^2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce"
|
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce"
|
||||||
|
|||||||
Reference in New Issue
Block a user