chore: update webapp deps

This commit is contained in:
acgnhik 2023-03-19 15:21:02 +08:00
parent 8f6acea210
commit f8797de8e7
37 changed files with 12428 additions and 10972 deletions

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkblrec=self.webpackChunkblrec||[]).push([[103],{5103:(k,h,e)=>{e.r(h),e.d(h,{AboutModule:()=>c});var m=e(6895),f=e(6582),t=e(4650),A=e(4670),d=e(529),v=e(7930);class s{constructor(n,i){this.http=n,this.url=i}getLatestVerisonString(){const n=this.url.makeApiUrl("/api/v1/update/version/latest");return this.http.get(n)}}s.\u0275fac=function(n){return new(n||s)(t.LFG(d.eN),t.LFG(v.i))},s.\u0275prov=t.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"});class u{constructor(n){this.latestVesion$=n.getLatestVerisonString()}}u.\u0275fac=function(n){return new(n||u)(t.Y36(s))},u.\u0275cmp=t.Xpm({type:u,selectors:[["app-info-list"]],inputs:{appInfo:"appInfo"},decls:42,vars:4,consts:[[1,"info-list"],[1,"info-item"],[1,"label"],[1,"desc"],["href","https://github.com/acgnhiki/blrec","target","_blank"],["href","https://github.com/acgnhiki/blrec/issues","target","_blank"],["href","https://choosealicense.com/licenses/gpl-3.0","target","_blank"],["href","mailto:acgnhiki@outlook.com","target","_blank"],["href","https://afdian.net/@acgnhiki","target","_blank"]],template:function(n,i){1&n&&(t.TgZ(0,"ul",0)(1,"li",1)(2,"span",2),t._uU(3,"\u5f53\u524d\u7248\u672c"),t.qZA(),t.TgZ(4,"span",3),t._uU(5),t.qZA()(),t.TgZ(6,"li",1)(7,"span",2),t._uU(8,"\u6700\u65b0\u7248\u672c"),t.qZA(),t.TgZ(9,"span",3),t._uU(10),t.ALo(11,"async"),t.qZA()(),t.TgZ(12,"li",1)(13,"span",2),t._uU(14,"\u9879\u76ee\u4e3b\u9875"),t.qZA(),t.TgZ(15,"span",3)(16,"a",4),t._uU(17,"https://github.com/acgnhiki/blrec"),t.qZA()()(),t.TgZ(18,"li",1)(19,"span",2),t._uU(20,"\u95ee\u9898\u53cd\u9988"),t.qZA(),t.TgZ(21,"span",3)(22,"a",5),t._uU(23,"https://github.com/acgnhiki/blrec/issues"),t.qZA()()(),t.TgZ(24,"li",1)(25,"span",2),t._uU(26,"\u8bb8\u53ef\u534f\u8bae"),t.qZA(),t.TgZ(27,"span",3)(28,"a",6),t._uU(29,"GNU GPLv3"),t.qZA()()(),t.TgZ(30,"li",1)(31,"span",2),t._uU(32,"\u8054\u7cfb\u65b9\u5f0f"),t.qZA(),t.TgZ(33,"span",3)(34,"a",7),t._uU(35,"acgnhiki@outlook.com"),t.qZA()()(),t.TgZ(36,"li",1)(37,"span",2),t._uU(38,"\u6295\u5582\u8d5e\u52a9"),t.qZA(),t.TgZ(39,"span",3)(40,"a",8),t._uU(41,"https://afdian.net/@acgnhiki"),t.qZA()()()()),2&n&&(t.xp6(5),t.Oqu(i.appInfo.version),t.xp6(5),t.Oqu(t.lcZ(11,2,i.latestVesion$)))},dependencies:[m.Ov],styles:['@charset "UTF-8";.info-list[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;margin:0;padding:1em 2em;border-top:1px solid rgba(0,0,0,.06)}.info-list[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%]:first-child{border-top:none}.info-list[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]:after{content:"\\ff1a"}.info-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}'],changeDetection:0});class l{constructor(n,i){this.changeDetector=n,this.route=i}ngOnInit(){this.route.data.subscribe(n=>{this.appInfo=n.appInfo,this.changeDetector.markForCheck()})}}l.\u0275fac=function(n){return new(n||l)(t.Y36(t.sBO),t.Y36(f.gz))},l.\u0275cmp=t.Xpm({type:l,selectors:[["app-about"]],decls:4,vars:1,consts:[[1,"inner-content"],[1,"about-page"],[3,"appInfo"]],template:function(n,i){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"app-page-section"),t._UZ(3,"app-info-list",2),t.qZA()()()),2&n&&(t.xp6(3),t.Q6J("appInfo",i.appInfo))},dependencies:[A.g,u],styles:[".inner-content[_ngcontent-%COMP%]{height:100%;width:100%;position:relative;display:block;margin:0;padding:1rem;background:#f1f1f1;overflow:auto}.inner-content[_ngcontent-%COMP%] .about-page[_ngcontent-%COMP%]{max-width:680px;margin:0 auto}"]});var Z=e(262),b=e(4007),C=e(324),U=e(387);class r{constructor(n,i){this.http=n,this.url=i}getAppInfo(){const n=this.url.makeApiUrl("/api/v1/app/info");return this.http.get(n)}getAppStatus(){const n=this.url.makeApiUrl("/api/v1/app/status");return this.http.get(n)}restartApp(){const n=this.url.makeApiUrl("/api/v1/app/restart");return this.http.post(n,null)}exitApp(){const n=this.url.makeApiUrl("/api/v1/app/exit");return this.http.post(n,null)}}r.\u0275fac=function(n){return new(n||r)(t.LFG(d.eN),t.LFG(v.i))},r.\u0275prov=t.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"});class a{constructor(n,i,g){this.logger=n,this.notification=i,this.appService=g}resolve(n,i){return this.appService.getAppInfo().pipe((0,b.X)(3,300),(0,Z.K)(g=>{throw this.logger.error("Failed to get app info:",g),this.notification.error("\u83b7\u53d6\u540e\u7aef\u5e94\u7528\u4fe1\u606f\u51fa\u9519",g.message,{nzDuration:0}),g}))}}a.\u0275fac=function(n){return new(n||a)(t.LFG(C.Kf),t.LFG(U.zb),t.LFG(r))},a.\u0275prov=t.Yz7({token:a,factory:a.\u0275fac});const F=[{path:"",component:l,resolve:{appInfo:a}}];class p{}p.\u0275fac=function(n){return new(n||p)},p.\u0275mod=t.oAB({type:p}),p.\u0275inj=t.cJS({imports:[f.Bz.forChild(F),f.Bz]});var y=e(4466);class c{}c.\u0275fac=function(n){return new(n||c)},c.\u0275mod=t.oAB({type:c}),c.\u0275inj=t.cJS({providers:[a],imports:[m.ez,p,y.m]})}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ MIT
MIT
The MIT License
Copyright (c) 2022 Google LLC.
Copyright (c) 2023 Google LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -73,6 +73,32 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@ant-design/icons-angular
MIT
@babel/runtime
MIT
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@ctrl/tinycolor
MIT
Copyright (c) Scott Cooper <scttcper@gmail.com>
@ -312,7 +338,7 @@ See `/licenses/LICENSE-d3` for details of the license.
filesize
BSD-3-Clause
Copyright (c) 2021, Jason Mulligan
Copyright (c) 2022, Jason Mulligan
All rights reserved.
Redistribution and use in source and binary forms, with or without
@ -682,7 +708,7 @@ zone.js
MIT
The MIT License
Copyright (c) 2010-2020 Google LLC. https://angular.io/license
Copyright (c) 2010-2022 Google LLC. https://angular.io/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkblrec=self.webpackChunkblrec||[]).push([[592],{4670:(r,s,c)=>{c.d(s,{g:()=>n});var e=c(4650),i=c(6895);function p(t,o){if(1&t&&(e.TgZ(0,"div",2)(1,"h2",3),e._uU(2),e.qZA()()),2&t){const a=e.oxw();e.xp6(2),e.Oqu(a.name)}}class n{constructor(){this.name=""}}n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-page-section"]],inputs:{name:"name"},ngContentSelectors:["*"],decls:3,vars:1,consts:[["class","header",4,"ngIf"],[1,"card"],[1,"header"],[1,"title"]],template:function(o,a){1&o&&(e.F$t(),e.YNc(0,p,3,1,"div",0),e.TgZ(1,"div",1),e.Hsn(2),e.qZA()),2&o&&e.Q6J("ngIf",a.name)},dependencies:[i.O5],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#202124;font-size:108%;font-weight:400;letter-spacing:.25px;margin-bottom:1em;margin-top:1.5em}.card[_ngcontent-%COMP%]{flex:1;background-color:#fff;border-radius:4px;box-shadow:0 2px 2px #00000024,0 1px 5px #0000001f,0 3px 1px -2px #0003}"],changeDetection:0})}}]);

View File

@ -1 +0,0 @@
"use strict";(self.webpackChunkblrec=self.webpackChunkblrec||[]).push([[592],{4670:(g,a,o)=>{o.d(a,{g:()=>r});var e=o(5e3),s=o(9808);function i(n,c){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"h2",3),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.name)}}const p=["*"];let r=(()=>{class n{constructor(){this.name=""}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-page-section"]],inputs:{name:"name"},ngContentSelectors:p,decls:3,vars:1,consts:[["class","header",4,"ngIf"],[1,"card"],[1,"header"],[1,"title"]],template:function(t,l){1&t&&(e.F$t(),e.YNc(0,i,3,1,"div",0),e.TgZ(1,"div",1),e.Hsn(2),e.qZA()),2&t&&e.Q6J("ngIf",l.name)},directives:[s.O5],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#202124;font-size:108%;font-weight:400;letter-spacing:.25px;margin-bottom:1em;margin-top:1.5em}.card[_ngcontent-%COMP%]{flex:1;background-color:#fff;border-radius:4px;box-shadow:0 2px 2px #00000024,0 1px 5px #0000001f,0 3px 1px -2px #0003}"],changeDetection:0}),n})()}}]);

View File

@ -6,10 +6,10 @@
<link rel="icon" type="image/x-icon" href="assets/images/logo.png">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#1976d2">
<style>html,body{width:100%;height:100%}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum","tnum"}html{--antd-wave-shadow-color:#1890ff;--scroll-bar:0}</style><link rel="stylesheet" href="styles.2e152d608221c2ee.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.2e152d608221c2ee.css"></noscript></head>
<style>html,body{width:100%;height:100%}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum"}html{--antd-wave-shadow-color:#1890ff;--scroll-bar:0}</style><link rel="stylesheet" href="styles.ae81e04dfa5b2860.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.ae81e04dfa5b2860.css"></noscript></head>
<body>
<app-root></app-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
<script src="runtime.1db847619b50d96c.js" type="module"></script><script src="polyfills.4b08448aee19bb22.js" type="module"></script><script src="main.545d90ce6b1d69be.js" type="module"></script>
<script src="runtime.efa92fd1ab1d1de3.js" type="module"></script><script src="polyfills.4e5433063877ea34.js" type="module"></script><script src="main.f21b7d831ad9cafb.js" type="module"></script>
</body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/named-cache-storage.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/named-cache-storage.mjs
var NamedCacheStorage = class {
constructor(original, cacheNamePrefix) {
this.original = original;
@ -46,7 +46,7 @@
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/adapter.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/adapter.mjs
var Adapter = class {
constructor(scopeUrl, caches) {
this.scopeUrl = scopeUrl;
@ -84,7 +84,7 @@
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/database.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/database.mjs
var NotFound = class {
constructor(table, key) {
this.table = table;
@ -92,7 +92,7 @@
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/db-cache.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/db-cache.mjs
var CacheDatabase = class {
constructor(adapter2) {
this.adapter = adapter2;
@ -135,7 +135,7 @@
return this.cache.delete(this.request(key), this.cacheQueryOptions);
}
keys() {
return this.cache.keys().then((requests) => requests.map((req) => req.url.substr(1)));
return this.cache.keys().then((requests) => requests.map((req) => req.url.slice(1)));
}
read(key) {
return this.cache.match(this.request(key), this.cacheQueryOptions).then((res) => {
@ -150,7 +150,7 @@
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/api.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/api.mjs
var UpdateCacheStatus;
(function(UpdateCacheStatus2) {
UpdateCacheStatus2[UpdateCacheStatus2["NOT_CACHED"] = 0] = "NOT_CACHED";
@ -158,7 +158,7 @@
UpdateCacheStatus2[UpdateCacheStatus2["CACHED"] = 2] = "CACHED";
})(UpdateCacheStatus || (UpdateCacheStatus = {}));
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/error.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/error.mjs
var SwCriticalError = class extends Error {
constructor() {
super(...arguments);
@ -180,7 +180,7 @@ ${error.stack}`;
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/sha1.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/sha1.mjs
function sha1(str) {
const utf8 = str;
const words32 = stringToWords32(utf8, Endian.Big);
@ -295,7 +295,7 @@ ${error.stack}`;
return hex.toLowerCase();
}
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/assets.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/assets.mjs
var AssetGroup = class {
constructor(scope2, adapter2, idle, config, hashes, db, cacheNamePrefix) {
this.scope = scope2;
@ -354,7 +354,7 @@ ${error.stack}`;
return cachedResponse;
}
}
const res = await this.fetchAndCacheOnce(this.adapter.newRequest(req.url));
const res = await this.fetchAndCacheOnce(this.newRequestWithMetadata(req.url, req));
return res.clone();
} else {
return null;
@ -451,7 +451,7 @@ ${error.stack}`;
if (redirectLimit === 0) {
throw new SwCriticalError(`Response hit redirect limit (fetchFromNetwork): request redirected too many times, next is ${res.url}`);
}
return this.fetchFromNetwork(this.adapter.newRequest(res.url), redirectLimit - 1);
return this.fetchFromNetwork(this.newRequestWithMetadata(res.url, req), redirectLimit - 1);
}
return res;
}
@ -466,7 +466,7 @@ ${error.stack}`;
makeCacheBustedRequest = fetchedHash !== canonicalHash;
}
if (makeCacheBustedRequest) {
const cacheBustReq = this.adapter.newRequest(this.cacheBust(req.url));
const cacheBustReq = this.newRequestWithMetadata(this.cacheBust(req.url), req);
response = await this.safeFetch(cacheBustReq);
if (response.ok) {
const cacheBustedHash = sha1Binary(await response.clone().arrayBuffer());
@ -495,6 +495,9 @@ ${error.stack}`;
}
return false;
}
newRequestWithMetadata(url, options) {
return this.adapter.newRequest(url, { headers: options.headers });
}
cacheBust(url) {
return url + (url.indexOf("?") === -1 ? "?" : "&") + "ngsw-cache-bust=" + Math.random();
}
@ -568,7 +571,7 @@ ${error.stack}`;
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/data.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/data.mjs
var LruList = class {
constructor(state) {
if (state === void 0) {
@ -709,12 +712,14 @@ ${error.stack}`;
}
}
async handleFetchWithPerformance(req, event, lru) {
var _a;
const okToCacheOpaque = (_a = this.config.cacheOpaqueResponses) != null ? _a : false;
let res = null;
const fromCache = await this.loadFromCache(req, lru);
if (fromCache !== null) {
res = fromCache.res;
if (this.config.refreshAheadMs !== void 0 && fromCache.age >= this.config.refreshAheadMs) {
event.waitUntil(this.safeCacheResponse(req, this.safeFetch(req), lru));
event.waitUntil(this.safeCacheResponse(req, this.safeFetch(req), lru, okToCacheOpaque));
}
}
if (res !== null) {
@ -724,13 +729,15 @@ ${error.stack}`;
res = await timeoutFetch;
if (res === void 0) {
res = this.adapter.newResponse(null, { status: 504, statusText: "Gateway Timeout" });
event.waitUntil(this.safeCacheResponse(req, networkFetch, lru));
event.waitUntil(this.safeCacheResponse(req, networkFetch, lru, okToCacheOpaque));
} else {
await this.safeCacheResponse(req, res, lru);
await this.safeCacheResponse(req, res, lru, okToCacheOpaque);
}
return res;
}
async handleFetchWithFreshness(req, event, lru) {
var _a;
const okToCacheOpaque = (_a = this.config.cacheOpaqueResponses) != null ? _a : true;
const [timeoutFetch, networkFetch] = this.networkFetchWithTimeout(req);
let res;
try {
@ -739,11 +746,11 @@ ${error.stack}`;
res = void 0;
}
if (res === void 0) {
event.waitUntil(this.safeCacheResponse(req, networkFetch, lru, true));
event.waitUntil(this.safeCacheResponse(req, networkFetch, lru, okToCacheOpaque));
const fromCache = await this.loadFromCache(req, lru);
res = fromCache !== null ? fromCache.res : null;
} else {
await this.safeCacheResponse(req, res, lru, true);
await this.safeCacheResponse(req, res, lru, okToCacheOpaque);
}
if (res !== null) {
return res;
@ -858,13 +865,16 @@ ${error.stack}`;
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/app-version.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/app-version.mjs
var BACKWARDS_COMPATIBILITY_NAVIGATION_URLS = [
{ positive: true, regex: "^/.*$" },
{ positive: false, regex: "^/.*\\.[^/]*$" },
{ positive: false, regex: "^/.*__" }
];
var AppVersion = class {
get okay() {
return this._okay;
}
constructor(scope2, adapter2, database, idle, debugHandler, manifest, manifestHash) {
this.scope = scope2;
this.adapter = adapter2;
@ -896,9 +906,6 @@ ${error.stack}`;
exclude: excludeUrls.map((spec) => new RegExp(spec.regex))
};
}
get okay() {
return this._okay;
}
async initializeFully(updateFrom) {
try {
await this.assetGroups.reduce(async (previous, group) => {
@ -943,14 +950,14 @@ ${error.stack}`;
return null;
}
isNavigationRequest(req) {
if (req.mode !== "navigate") {
if (req.method !== "GET" || req.mode !== "navigate") {
return false;
}
if (!this.acceptsTextHtml(req)) {
return false;
}
const urlPrefix = this.scope.registration.scope.replace(/\/$/, "");
const url = req.url.startsWith(urlPrefix) ? req.url.substr(urlPrefix.length) : req.url;
const url = req.url.startsWith(urlPrefix) ? req.url.slice(urlPrefix.length) : req.url;
const urlWithoutQueryOrHash = url.replace(/[?#].*$/, "");
return this.navigationUrls.include.some((regex) => regex.test(urlWithoutQueryOrHash)) && !this.navigationUrls.exclude.some((regex) => regex.test(urlWithoutQueryOrHash));
}
@ -1009,8 +1016,8 @@ ${error.stack}`;
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/debug.mjs
var SW_VERSION = "13.1.3";
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/debug.mjs
var SW_VERSION = "15.2.0";
var DEBUG_LOG_BUFFER_SIZE = 100;
var DebugHandler = class {
constructor(driver, adapter2) {
@ -1083,7 +1090,7 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/idle.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/idle.mjs
var IdleScheduler = class {
constructor(adapter2, delay, maxDelay, debug) {
this.adapter = adapter2;
@ -1161,12 +1168,12 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/manifest.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/manifest.mjs
function hashManifest(manifest) {
return sha1(JSON.stringify(manifest));
}
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/msg.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/msg.mjs
function isMsgCheckForUpdates(msg) {
return msg.action === "CHECK_FOR_UPDATES";
}
@ -1174,7 +1181,7 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
return msg.action === "ACTIVATE_UPDATE";
}
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/driver.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/driver.mjs
var IDLE_DELAY = 5e3;
var MAX_IDLE_DELAY = 3e4;
var SUPPORTED_CONFIG_VERSION = 1;
@ -1366,6 +1373,10 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
}
break;
}
case "sendRequest": {
await this.scope.fetch(urlToOpen);
break;
}
default:
break;
}
@ -1628,6 +1639,7 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
}
hash = hashManifest(manifest);
if (this.versions.has(hash)) {
await this.notifyClientsAboutNoNewVersionDetected(manifest, hash);
return false;
}
await this.notifyClientsAboutVersionDetected(manifest, hash);
@ -1736,6 +1748,13 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
});
}));
}
async notifyClientsAboutNoNewVersionDetected(manifest, hash) {
await this.initialized;
const clients = await this.scope.clients.matchAll();
await Promise.all(clients.map(async (client) => {
client.postMessage({ type: "NO_NEW_VERSION_DETECTED", version: this.mergeHashWithAppData(manifest, hash) });
}));
}
async notifyClientsAboutVersionDetected(manifest, hash) {
await this.initialized;
const clients = await this.scope.clients.matchAll();
@ -1819,7 +1838,7 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
}
};
// bazel-out/darwin-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/main.mjs
// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/main.mjs
var scope = self;
var adapter = new Adapter(scope.registration.scope, self.caches);
new Driver(scope, adapter, new CacheDatabase(adapter));

View File

@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1677235187781,
"timestamp": 1677404856332,
"index": "/index.html",
"assetGroups": [
{
@ -11,19 +11,19 @@
"ignoreVary": true
},
"urls": [
"/103.bd702fba8239ab1e.js",
"/183.fd2e6a1f63815dbf.js",
"/237.44684bee585167eb.js",
"/45.c90c3cea2bf1a66e.js",
"/548.a9f0c3e1529d6713.js",
"/91.5d33ec6f665fb52d.js",
"/common.858f777e9296e6f2.js",
"/103.4a2aea63cc3bf42b.js",
"/287.bce56b4b2bd030eb.js",
"/386.2404f3bc252e1df3.js",
"/503.05156285886772b3.js",
"/548.b10ecff8d5cc6ecb.js",
"/688.7032fddba7983cf6.js",
"/common.1fc175bce139f4df.js",
"/index.html",
"/main.545d90ce6b1d69be.js",
"/main.f21b7d831ad9cafb.js",
"/manifest.webmanifest",
"/polyfills.4b08448aee19bb22.js",
"/runtime.1db847619b50d96c.js",
"/styles.2e152d608221c2ee.css"
"/polyfills.4e5433063877ea34.js",
"/runtime.efa92fd1ab1d1de3.js",
"/styles.ae81e04dfa5b2860.css"
],
"patterns": []
},
@ -1634,12 +1634,12 @@
],
"dataGroups": [],
"hashTable": {
"/103.bd702fba8239ab1e.js": "34fa616477a9a519bf0a8cba3013267c8e8c6410",
"/183.fd2e6a1f63815dbf.js": "01e46704e96688183d68029b1343c246f9872398",
"/237.44684bee585167eb.js": "c30482253a95da9216e9f4bb87abbd9197fa2c29",
"/45.c90c3cea2bf1a66e.js": "e5bfb8cf3803593e6b8ea14c90b3d3cb6a066764",
"/548.a9f0c3e1529d6713.js": "0ac4eecad93f3b8c93e8a3dc92e9f98b61df24d7",
"/91.5d33ec6f665fb52d.js": "f6df1e37381abdc03ad85398484e343636b3cef0",
"/103.4a2aea63cc3bf42b.js": "2711817f2977bfdc18c34fee4fe9385fe012bb22",
"/287.bce56b4b2bd030eb.js": "094898df47377213f62f6f207fa65111631fb85f",
"/386.2404f3bc252e1df3.js": "f937945645579b9651be2666f70cec2c5de4e367",
"/503.05156285886772b3.js": "0b1ab889ef8c2ed698daaea47b03f14da8c6d791",
"/548.b10ecff8d5cc6ecb.js": "cf3c34c2ab63adab39f7cffe571eb9559c7d6843",
"/688.7032fddba7983cf6.js": "eae55044529782a51b7e534365255bbfa5522b05",
"/assets/animal/panda.js": "fec2868bb3053dd2da45f96bbcb86d5116ed72b1",
"/assets/animal/panda.svg": "bebd302cdc601e0ead3a6d2710acf8753f3d83b1",
"/assets/fill/.gitkeep": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
@ -3233,13 +3233,13 @@
"/assets/twotone/wallet.svg": "11e915efff832b47aa4bd5885af72e55014f59e6",
"/assets/twotone/warning.js": "fb2d7ea232f3a99bf8f080dbc94c65699232ac01",
"/assets/twotone/warning.svg": "8c7a2d3e765a2e7dd58ac674870c6655cecb0068",
"/common.858f777e9296e6f2.js": "b68ca68e1e214a2537d96935c23410126cc564dd",
"/index.html": "f4610b8180c8e25908c57d40eb5c1a5d3ffa2771",
"/main.545d90ce6b1d69be.js": "abcd561449fbb227221a982f772e635d407b4400",
"/common.1fc175bce139f4df.js": "af1775164711ec49e5c3a91ee45bd77509c17c54",
"/index.html": "5c985e42821be95ca4903b9379c3bbef96ade102",
"/main.f21b7d831ad9cafb.js": "fc51efa446c2ac21ee17e165217dd3faeacc5290",
"/manifest.webmanifest": "62c1cb8c5ad2af551a956b97013ab55ce77dd586",
"/polyfills.4b08448aee19bb22.js": "8e73f2d42cc13ca353cea5c886d930bd6da08d0d",
"/runtime.1db847619b50d96c.js": "20d27b3ff34cae73b5645baa40cbaed4bb4e57f8",
"/styles.2e152d608221c2ee.css": "9830389a46daa5b4511e0dd343aad23ca9f9690f"
"/polyfills.4e5433063877ea34.js": "68159ab99e0608976404a17132f60b5ceb6f12d2",
"/runtime.efa92fd1ab1d1de3.js": "a985c977af6329e53de9687c7a3f6f7d447ba912",
"/styles.ae81e04dfa5b2860.css": "5933b4f1c4d8fcc1891b68940ee78af4091472b7"
},
"navigationUrls": [
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(()=>{"use strict";var e,v={},m={};function r(e){var i=m[e];if(void 0!==i)return i.exports;var t=m[e]={exports:{}};return v[e].call(t.exports,t,t.exports,r),t.exports}r.m=v,e=[],r.O=(i,t,f,o)=>{if(!t){var a=1/0;for(n=0;n<e.length;n++){for(var[t,f,o]=e[n],c=!0,l=0;l<t.length;l++)(!1&o||a>=o)&&Object.keys(r.O).every(p=>r.O[p](t[l]))?t.splice(l--,1):(c=!1,o<a&&(a=o));if(c){e.splice(n--,1);var d=f();void 0!==d&&(i=d)}}return i}o=o||0;for(var n=e.length;n>0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[t,f,o]},r.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return r.d(i,{a:i}),i},r.d=(e,i)=>{for(var t in i)r.o(i,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((i,t)=>(r.f[t](e,i),i),[])),r.u=e=>(592===e?"common":e)+"."+{45:"c90c3cea2bf1a66e",91:"5d33ec6f665fb52d",103:"bd702fba8239ab1e",183:"fd2e6a1f63815dbf",237:"44684bee585167eb",548:"a9f0c3e1529d6713",592:"858f777e9296e6f2"}[e]+".js",r.miniCssF=e=>{},r.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={},i="blrec:";r.l=(t,f,o,n)=>{if(e[t])e[t].push(f);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==i+o){a=u;break}}a||(c=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",i+o),a.src=r.tu(t)),e[t]=[f];var s=(g,p)=>{a.onerror=a.onload=null,clearTimeout(b);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(h=>h(p)),g)return g(p)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tu=i=>(void 0===e&&(e={createScriptURL:t=>t},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e.createScriptURL(i))})(),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var n=r.o(e,f)?e[f]:void 0;if(0!==n)if(n)o.push(n[2]);else if(666!=f){var a=new Promise((u,s)=>n=e[f]=[u,s]);o.push(n[2]=a);var c=r.p+r.u(f),l=new Error;r.l(c,u=>{if(r.o(e,f)&&(0!==(n=e[f])&&(e[f]=void 0),n)){var s=u&&("load"===u.type?"missing":u.type),b=u&&u.target&&u.target.src;l.message="Loading chunk "+f+" failed.\n("+s+": "+b+")",l.name="ChunkLoadError",l.type=s,l.request=b,n[1](l)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var i=(f,o)=>{var l,d,[n,a,c]=o,u=0;if(n.some(b=>0!==e[b])){for(l in a)r.o(a,l)&&(r.m[l]=a[l]);if(c)var s=c(r)}for(f&&f(o);u<n.length;u++)r.o(e,d=n[u])&&e[d]&&e[d][0](),e[n[u]]=0;return r.O(s)},t=self.webpackChunkblrec=self.webpackChunkblrec||[];t.forEach(i.bind(null,0)),t.push=i.bind(null,t.push.bind(t))})()})();

View File

@ -0,0 +1 @@
(()=>{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return v[e](t,t.exports,r),t.exports}r.m=v,e=[],r.O=(n,t,i,o)=>{if(!t){var a=1/0;for(f=0;f<e.length;f++){for(var[t,i,o]=e[f],c=!0,d=0;d<t.length;d++)(!1&o||a>=o)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(c=!1,o<a&&(a=o));if(c){e.splice(f--,1);var l=i();void 0!==l&&(n=l)}}return n}o=o||0;for(var f=e.length;f>0&&e[f-1][2]>o;f--)e[f]=e[f-1];e[f]=[t,i,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{103:"4a2aea63cc3bf42b",287:"bce56b4b2bd030eb",386:"2404f3bc252e1df3",503:"05156285886772b3",548:"b10ecff8d5cc6ecb",592:"1fc175bce139f4df",688:"7032fddba7983cf6"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="blrec:";r.l=(t,i,o,f)=>{if(e[t])e[t].push(i);else{var a,c;if(void 0!==o)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var u=d[l];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==n+o){a=u;break}}a||(c=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[i];var s=(g,b)=>{a.onerror=a.onload=null,clearTimeout(p);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(h=>h(b)),g)return g(b)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(i,o)=>{var f=r.o(e,i)?e[i]:void 0;if(0!==f)if(f)o.push(f[2]);else if(666!=i){var a=new Promise((u,s)=>f=e[i]=[u,s]);o.push(f[2]=a);var c=r.p+r.u(i),d=new Error;r.l(c,u=>{if(r.o(e,i)&&(0!==(f=e[i])&&(e[i]=void 0),f)){var s=u&&("load"===u.type?"missing":u.type),p=u&&u.target&&u.target.src;d.message="Loading chunk "+i+" failed.\n("+s+": "+p+")",d.name="ChunkLoadError",d.type=s,d.request=p,f[1](d)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,o)=>{var d,l,[f,a,c]=o,u=0;if(f.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(c)var s=c(r)}for(i&&i(o);u<f.length;u++)r.o(e,l=f[u])&&e[l]&&e[l][0](),e[l]=0;return r.O(s)},t=self.webpackChunkblrec=self.webpackChunkblrec||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,17 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

View File

@ -126,8 +126,18 @@
}
}
},
"defaultProject": "blrec",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": [
"@angular-eslint/schematics"
],
"analytics": false
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}

23042
webapp/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,48 +10,48 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^13.1.3",
"@angular/cdk": "~13.1.3",
"@angular/common": "~13.1.3",
"@angular/compiler": "^13.1.3",
"@angular/core": "^13.1.3",
"@angular/forms": "~13.1.3",
"@angular/platform-browser": "~13.1.3",
"@angular/platform-browser-dynamic": "^13.1.3",
"@angular/router": "^13.1.3",
"@angular/service-worker": "~13.1.3",
"@angular/animations": "^15.2.0",
"@angular/cdk": "^15.2.0",
"@angular/common": "^15.2.0",
"@angular/compiler": "^15.2.0",
"@angular/core": "^15.2.0",
"@angular/forms": "^15.2.0",
"@angular/platform-browser": "^15.2.0",
"@angular/platform-browser-dynamic": "^15.2.0",
"@angular/router": "^15.2.0",
"@angular/service-worker": "^15.2.0",
"ng-zorro-antd": "^15.0.3",
"ngx-logger": "^5.0.11",
"echarts": "^5.3.1",
"filesize": "^6.4.0",
"lodash-es": "^4.17.21",
"ng-zorro-antd": "^13.0.1",
"ngx-echarts": "^8.0.1",
"ngx-logger": "^4.2.2",
"rxjs": "~6.6.0",
"ngx-echarts": "^15.0.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
"zone.js": "~0.12.0",
"filesize": "^10.0.6",
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.1.4",
"@angular-eslint/builder": "13.0.1",
"@angular-eslint/eslint-plugin": "13.0.1",
"@angular-eslint/eslint-plugin-template": "13.0.1",
"@angular-eslint/schematics": "13.0.1",
"@angular-eslint/template-parser": "13.0.1",
"@angular/cli": "^13.1.4",
"@angular/compiler-cli": "^13.1.3",
"@types/jasmine": "~3.6.0",
"@angular-devkit/build-angular": "^15.2.0",
"@angular-eslint/builder": "15.2.1",
"@angular-eslint/eslint-plugin": "15.2.1",
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "^15.2.0",
"@angular/compiler-cli": "^15.2.0",
"@types/jasmine": "~4.3.1",
"@types/lodash-es": "^4.17.4",
"@types/node": "^12.20.19",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"eslint": "^7.32.0",
"jasmine-core": "~3.7.0",
"@types/node": "^18.14.1",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"eslint": "^8.28.0",
"jasmine-core": "~4.5.0",
"karma": "^6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"source-map-explorer": "^2.5.2",
"typescript": "~4.5.4"
"typescript": "~4.9.5"
}
}
}

View File

@ -2,7 +2,7 @@
import { ActivatedRoute, NavigationEnd, NavigationStart, Router } from "@angular/router";
import { Injectable, OnDestroy } from "@angular/core";
import { ViewportScroller } from "@angular/common";
import { filter, observeOn, scan } from "rxjs/operators";
import { filter, observeOn, scan, map } from "rxjs/operators";
import { asyncScheduler, Subscription } from "rxjs";
import {
IRouterScrollService,
@ -64,9 +64,10 @@ export class RouterScrollService implements IRouterScrollService, OnDestroy {
}
const scrollPositionRestore$ = this.router.events.pipe(
filter((event: any) => event instanceof NavigationStart || event instanceof NavigationEnd),
filter((event) => event instanceof NavigationStart || event instanceof NavigationEnd),
map((event) => event as NavigationStart | NavigationEnd),
// Accumulate the scroll positions
scan<NavigationEnd | NavigationStart, ScrollPositionRestore>((acc, event) => {
scan((acc, event) => {
if (environment.traceRouterScrolling) {
this.logger.trace(`${componentName}:: Updating the known scroll positions`);
}
@ -99,8 +100,12 @@ export class RouterScrollService implements IRouterScrollService, OnDestroy {
};
return retVal;
}),
filter((scrollPositionRestore: ScrollPositionRestore) => !!scrollPositionRestore.trigger),
}, {
event: {} as NavigationStart,
positions: {},
idToRestore: -1,
} as ScrollPositionRestore),
filter((scrollPositionRestore) => !!scrollPositionRestore.trigger),
observeOn(asyncScheduler),
);

View File

@ -1,12 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core';
import * as filesize from 'filesize';
import { filesize } from 'filesize';
@Pipe({
name: 'filesize',
})
export class FilesizePipe implements PipeTransform {
transform(size: number, options?: Parameters<typeof filesize>[1]): string {
return filesize(size, options);
return filesize(size, {
base: 2,
standard: 'jedec',
...options,
output: 'string',
}) as string;
}
}

View File

@ -1,5 +1,5 @@
import { transform, isEqual, isObject } from 'lodash-es';
import * as filesize from 'filesize';
import { filesize } from 'filesize';
// ref: https://gist.github.com/Yimiprod/7ee176597fef230d1451
export function difference(
@ -131,7 +131,11 @@ export function parseDuration(str: string): number | null {
}
export function formatFilesize(size: number): string {
return filesize(size);
return filesize(size, {
base: 2,
standard: 'jedec',
output: 'string',
}) as string;
}
export function parseFilesize(str: string): number | null {

View File

@ -16,13 +16,13 @@
<span class="label">视频信息</span>
<span class="value">
<span>
{{ profile.streams[0]?.codec_name }}
{{ profile.streams[0].codec_name }}
<!-- <ng-container *ngIf="profile.streams[0]?.profile">
({{ profile.streams[0]?.profile }})
</ng-container> -->
</span>
<span>
{{ profile.streams[0]?.width }}x{{ profile.streams[0]?.height }}
{{ profile.streams[0].width }}x{{ profile.streams[0].height }}
</span>
<span> {{ fps }} fps</span>
<!-- <span
@ -33,7 +33,7 @@
{{ profile.streams[0]?.bit_rate! | datarate: { bitrate: true } }}
</span> -->
<span>
{{ metadata.videodatarate * 1000 | datarate: { bitrate: true } }}
{{ metadata.videodatarate * 1000 | datarate : { bitrate: true } }}
</span>
</span>
</li>
@ -41,20 +41,20 @@
<span class="label">音频信息</span>
<span class="value">
<span>
{{ profile.streams[1]?.codec_name }}
{{ profile.streams[1].codec_name }}
<!-- <ng-container *ngIf="profile.streams[1]?.profile">
({{ profile.streams[1]?.profile }})
</ng-container> -->
</span>
<span> {{ profile.streams[1]?.sample_rate }} HZ</span>
<span> {{ profile.streams[1].sample_rate }} HZ</span>
<span>
{{ profile.streams[1]?.channel_layout }}
{{ profile.streams[1].channel_layout }}
</span>
<!-- <span *ngIf="profile.streams[1]?.bit_rate">
{{ profile.streams[1]?.bit_rate! | datarate: { bitrate: true } }}
</span> -->
<span>
{{ metadata.audiodatarate * 1000 | datarate: { bitrate: true } }}
{{ metadata.audiodatarate * 1000 | datarate : { bitrate: true } }}
</span>
</span>
</li>
@ -82,7 +82,7 @@
</li>
<li class="info-item" *ngIf="profile.streams[0]?.tags?.encoder">
<span class="label">流编码器</span>
<span class="value">{{ profile.streams[0]?.tags?.encoder }}</span>
<span class="value">{{ profile.streams[0].tags?.encoder }}</span>
</li>
<li class="info-item">
<span class="label">流主机名</span
@ -94,7 +94,7 @@
<span class="label">下载速度</span>
<app-wave-graph [value]="data.task_status.dl_rate"></app-wave-graph>
<span class="value">
{{ data.task_status.dl_rate * 8 | datarate: { bitrate: true } }}
{{ data.task_status.dl_rate * 8 | datarate : { bitrate: true } }}
</span>
</li>
<li class="info-item">

View File

@ -51,7 +51,7 @@ export class TaskSettingsDialogComponent implements OnChanges {
@Output() afterClose = new EventEmitter<undefined>();
@ViewChild(NgForm)
ngForm!: NgForm;
ngForm?: NgForm;
readonly warningTip =
'需要重启弹幕客户端才能生效,如果任务正在录制可能会丢失弹幕!';

View File

@ -7,19 +7,8 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -14,13 +14,14 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"target": "ES2022",
"module": "es2020",
"lib": [
"es2018",
"dom"
],
"skipLibCheck": true, // https://github.com/NG-ZORRO/ng-zorro-antd/issues/6696
"skipLibCheck": true,
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,