j?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o {
13 | const ws: Ref = ref(null)
14 | const connected = computed(() => !!ws.value && ws.value.readyState === WebSocket.OPEN)
15 |
16 | const roomStore = useRoomStore()
17 |
18 | function init() {
19 | return new Promise((resolve, reject) => {
20 | if (!ws.value || ws.value.readyState !== WebSocket.OPEN) {
21 | ws.value = new WebSocket(bliveEndpoint)
22 | ws.value.onopen = () => {
23 | resolve(true)
24 | }
25 | ws.value.onerror = (ev: Event) => {
26 | reject(new Error((ev as CloseEvent).reason))
27 | ws.value = null
28 | }
29 | ws.value.onclose = () => {
30 | ws.value = null
31 | }
32 | ws.value.onmessage = (evt: Event) => {
33 | const rawData = (evt as MessageEvent).data
34 | try {
35 | const data: MsgLog = JSON.parse(rawData)
36 | console.log(data)
37 | const targetRoom = roomStore.rooms.find(room => room.rid === data.rid)
38 | if (targetRoom) {
39 | targetRoom.logs.push(data)
40 | if (data.payload.cmd === 'authorized') {
41 | targetRoom.status = 'online'
42 | }
43 | }
44 | } catch (e) {}
45 | }
46 | } else {
47 | resolve(true)
48 | }
49 | })
50 | }
51 |
52 | return {
53 | ws,
54 | connected,
55 | init,
56 | }
57 | })
58 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 | *.lcov
24 |
25 | # nyc test coverage
26 | .nyc_output
27 |
28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 | .grunt
30 |
31 | # Bower dependency directory (https://bower.io/)
32 | bower_components
33 |
34 | # node-waf configuration
35 | .lock-wscript
36 |
37 | # Compiled binary addons (https://nodejs.org/api/addons.html)
38 | build/Release
39 |
40 | # Dependency directories
41 | node_modules/
42 | jspm_packages/
43 |
44 | # TypeScript v1 declaration files
45 | typings/
46 |
47 | # TypeScript cache
48 | *.tsbuildinfo
49 |
50 | # Optional npm cache directory
51 | .npm
52 |
53 | # Optional eslint cache
54 | .eslintcache
55 |
56 | # Microbundle cache
57 | .rpt2_cache/
58 | .rts2_cache_cjs/
59 | .rts2_cache_es/
60 | .rts2_cache_umd/
61 |
62 | # Optional REPL history
63 | .node_repl_history
64 |
65 | # Output of 'npm pack'
66 | *.tgz
67 |
68 | # Yarn Integrity file
69 | .yarn-integrity
70 |
71 | # dotenv environment variables file
72 | .env
73 | .env.test
74 |
75 | # parcel-bundler cache (https://parceljs.org/)
76 | .cache
77 |
78 | # Next.js build output
79 | .next
80 |
81 | # Nuxt.js build / generate output
82 | .nuxt
83 | dist
84 |
85 | # Gatsby files
86 | .cache/
87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
88 | # https://nextjs.org/blog/next-9-1#public-directory-support
89 | # public
90 |
91 | # vuepress build output
92 | .vuepress/dist
93 |
94 | # Serverless directories
95 | .serverless/
96 |
97 | # FuseBox cache
98 | .fusebox/
99 |
100 | # DynamoDB Local files
101 | .dynamodb/
102 |
103 | # TernJS port file
104 | .tern-port
105 |
106 | # editor directory
107 | .idea
108 |
109 | log.txt
110 | .env.local
111 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/H7b7.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: H7b7
3 | * path: ./switch-better-line
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e=this&&this.__classPrivateFieldGet||function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},t=this&&this.__classPrivateFieldSet||function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SwitchBetterLine=void 0;var n=5,i=8e3,r=6e4,a=1e4,o=5e3,s=0,f=function(){function f(v,m){var l=this;this.video=v,this.opts=m,c.set(this,!1),w.set(this,[]),h.set(this,0),u.set(this,0),p.set(this,[]),this.getNeedSwitchLine=function(){return e(l,c,"f")},this.destroy=function(){e(l,p,"f").forEach(function(e){return e()}),t(l,p,[],"f")},d.set(this,function(d){var v=0;s=performance.now();var m=function(){e(l,c,"f")?f.switchNum+=1:v=performance.now()},g=function(){if(!(s+a>performance.now()||0===v||e(l,u,"f")+o>=performance.now())){var f={duration:performance.now()-v,waitingStartTime:v};e(l,w,"f").push(f),t(l,w,e(l,w,"f").filter(function(n){return n.waitingStartTime+r=performance.now()}),"f"),t(l,h,e(l,w,"f").reduce(function(e,t){return e+t.duration},0),"f"),(e(l,h,"f")>i||e(l,w,"f").length>=n)&&t(l,c,!0,"f")}},E=function(){t(l,u,performance.now(),"f")};d.addEventListener("playing",g),d.addEventListener("seeking",E),d.addEventListener("waiting",m),e(l,p,"f").push(function(){d.removeEventListener("seeking",E),d.removeEventListener("playing",g),d.removeEventListener("waiting",m)})}),f.switchNum+1!==this.opts.lineNum&&e(this,d,"f").call(this,v)}var c,w,h,u,p,d;return c=new WeakMap,w=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,d=new WeakMap,f.switchNum=0,f.lastSwitchTime=0,f}();exports.SwitchBetterLine=f;
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/modules/MwY8.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: MwY8
3 | * path: ./video-utils
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function u(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,u)}c((r=r.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=200&&e.status<=299?[4,e.text()]:[3,3];case 2:if(o=t.sent(),(a=o.split("\n")).findIndex(function(e){return"#EXTM3U"===e})>-1&&a.findIndex(function(e){return"#EXT-X-VERSION:3"===e})>-1&&-1!==(i=a.findIndex(function(e){return e.startsWith("#EXT-X-STREAM-INF")})))return[2,null!==(r=a[i+1])&&void 0!==r?r:n];t.label=3;case 3:return[2,n]}})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.redirectHLSV3=exports.parseAudioChannel=void 0,exports.parseAudioChannel=n,exports.redirectHLSV3=r;
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/modules/jGuH.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: jGuH
3 | * path: ./exp
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExpUtils=void 0;var e=require("../utils");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r0?Math.max.apply(this,o(this,i,"f")):1,"f");try{n(this,a,o(this,e,"f")/(o(this,r,"f")-o(this,h,"f")),"f")}catch(w){f.logger.error(w)}for(var p=0,c=o(this,i,"f").length;p\n \n \n \n \n ')},p.prototype.destroy=function(){n(this,i,[],"f"),n(this,s,[],"f"),n(this,h,0,"f"),n(this,r,0,"f"),n(this,a,0,"f"),this.initGraph()},p.prototype.initGraph=function(){for(var h=0,r=o(this,t,"f")/2;h0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]
2 |
3 |
4 |
5 |
6 | 稳定性测试
7 |
8 |
9 |
10 | 稳定性测试
11 |
28 |
29 |
41 | {{room.danmuCount}}
42 |
43 |
44 |
48 |
49 |
68 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/SCHR.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: SCHR
3 | * path: ./dimension
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDimension=u,exports.IDimensionOS=exports.IDimensionNavigationType=exports.IDimensionNetworkType=void 0;var n,o,e,i=require("./timing");function r(){return"hidden"===document.visibilityState||document.hidden?0:1}function t(){var o,e,i;return"4g"===(null===(o=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===o?void 0:o.effectiveType)?n["4g"]:"3g"===(null===(e=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===e?void 0:e.effectiveType)?n["3g"]:"2g"===(null===(i=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===i?void 0:i.effectiveType)?n["2g"]:n.other}function a(){var n;try{var e=(null!==(n=null===performance||void 0===performance?void 0:performance.getEntriesByType("navigation")[0])&&void 0!==n?n:(0,i.getNavigationEntryFromPerformanceTiming)()).type;return"navigate"===e?o.navigate:"reload"===e?o.reload:"back_forward"===e?o.backForward:o.other}catch(r){return o.other}}function v(){var n;return null!=(null===(n=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===n?void 0:n.controller)?1:0}function c(){var n="Mac68K"===navigator.platform||"MacPPC"===navigator.platform||"Macintosh"===navigator.platform||"MacIntel"===navigator.platform,o="Win32"===navigator.platform||"Windows"===navigator.platform,i="X11"===navigator.platform&&!o&&!n,r=String(navigator.platform).includes("Linux");return n?e.Mac:o?e.Windows:i?e.Unix:r?e.Linux:e.Other}function d(){try{return"h2"===performance.getEntriesByType("navigation")[0].nextHopProtocol?1:0}catch(n){return 0}}function l(){var n;return null!=(null===(n=null===window||void 0===window?void 0:window.PerformanceObserver)||void 0===n?void 0:n.supportedEntryTypes)&&["largest-contentful-paint","paint"].every(function(n){return window.PerformanceObserver.supportedEntryTypes.includes(n)})?1:0}function u(){return{OS:c(),VisibilityState:r(),NavigationType:a(),NetworkType:t(),ServiceWorkerState:v(),NextHopProtocol:d(),SupportedEntryTypes:l()}}exports.IDimensionNetworkType=n,function(n){n[n.other=0]="other",n[n["2g"]=2]="2g",n[n["3g"]=3]="3g",n[n["4g"]=4]="4g"}(n||(exports.IDimensionNetworkType=n={})),exports.IDimensionNavigationType=o,function(n){n[n.navigate=0]="navigate",n[n.reload=1]="reload",n[n.backForward=2]="backForward",n[n.other=255]="other"}(o||(exports.IDimensionNavigationType=o={})),exports.IDimensionOS=e,function(n){n[n.Other=0]="Other",n[n.Mac=1]="Mac",n[n.Windows=2]="Windows",n[n.Unix=3]="Unix",n[n.Linux=4]="Linux"}(e||(exports.IDimensionOS=e={}));
8 | })()
--------------------------------------------------------------------------------
/src/frontend/public/weread/8.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/js/8.a6ca3e96.js
3 |
4 | (() => {
5 | function processStyles(styles, bookId) {
6 | return function (styles, bookId) {
7 | if (!styles || styles.length <= 0) {
8 | return ''
9 | }
10 |
11 | // 去掉 /* */ 注释
12 | styles = styles.trim().replace(/\/\*.*?\*\//gi, '');
13 | let re = new RegExp('[^{}]*?{[\x5cs\x5cS]+?}', 'gi'),
14 | matchArray = styles.match(re);
15 | if (!matchArray || 0 === matchArray.length) {
16 | return ''
17 | }
18 |
19 | // 把 epub 内联图片地址替换成绝对地址,方便 html 进行访问
20 | return matchArray.map((_) => {
21 | return '.readerChapterContent ' +
22 | (_ = _.trim()).split('\n').map((__) => {
23 | return -1 === (__ = __.trim()).indexOf('{') &&
24 | -1 === __.indexOf('}') && -1 === __.indexOf(';')
25 | ? __ + ';'
26 | : __;
27 | }).join('');
28 | }).join('').trim().replace(
29 | /\.\.\/images\/(.*?\.(png|jpg|jpeg|gif))/gi,
30 | 'https://res.weread.qq.com/wrepub/web/' + bookId + '/$1'
31 | );
32 | }(styles || '', bookId);
33 | }
34 | function processHtmls(sections, bookId) {
35 | return sections.map((section) => {
36 | return function (section, bookId) {
37 | if (!section || section.length <= 0) {
38 | return ''
39 | }
40 |
41 | let re1 = new RegExp('
]+?data-wr-co="([^"]+?)"[^>]+?alt="([^"]+?)"[^>]+?qqreader-footnote[^>]+?>', 'gi');
42 | section = section.replace(re1, '');
43 |
44 | let re2 = new RegExp('
]+?data-wr-co="([^"]+?)"[^>]+?qqreader-footnote[^>]+?alt="([^"]+?)"[^>]*?>', 'gi');
45 |
46 | section = section.replace(re2, '')
47 | section = section.replace(/\.\.\/video\/(.*?\.(mp4|wmv|3gp|rm|rmvb|mov|m4v|avi))/gi, 'https://res.weread.qq.com/wrepub/web/' + bookId + '/$1')
48 | section = section.replace(/\.\.\/images\/(.*?\.(png|jpg|jpeg|gif))/gi, 'https://res.weread.qq.com/wrepub/web/' + bookId + '/$1')
49 | return section.trim();
50 | }(section || '', bookId)
51 | });
52 | }
53 |
54 | window.weread.store = {
55 | processStyles: processStyles,
56 | processHtmls: processHtmls,
57 | }
58 | })()
59 |
--------------------------------------------------------------------------------
/src/backend/common/request.ts:
--------------------------------------------------------------------------------
1 | // deno-lint-ignore-file no-explicit-any
2 |
3 | import { UserAgent, Referer, Origin } from "../config.ts";
4 |
5 | function stringifyQuery(
6 | query: Record = {},
7 | ): Record {
8 | const data: Record = {};
9 | Object.keys(query).reduce((obj, key) => {
10 | obj[key] = query[key].toString();
11 | return obj;
12 | }, data);
13 | return data;
14 | }
15 |
16 | export function get(
17 | url: string,
18 | query: Record = {},
19 | header: Record = {},
20 | ) {
21 | if (Object.keys(query).length) {
22 | url += "?" + new URLSearchParams(stringifyQuery(query)).toString();
23 | }
24 | const headers: Record = {
25 | "User-Agent": UserAgent,
26 | "Referer": Referer,
27 | "Origin": Origin,
28 | ...header,
29 | };
30 | return fetch(url, {
31 | method: "GET",
32 | cache: "default",
33 | headers,
34 | });
35 | }
36 |
37 | function post(
38 | url: string,
39 | data: Record = {},
40 | format = "json",
41 | header: Record = {},
42 | ) {
43 | let body;
44 | const headers: Record | undefined = {
45 | "User-Agent": UserAgent,
46 | "Referer": Referer,
47 | "Origin": Origin,
48 | ...header,
49 | };
50 |
51 | if (format === "query" && Object.keys(data).length) {
52 | url += "?" + new URLSearchParams(stringifyQuery(data)).toString();
53 | body = undefined;
54 | } else if (format === "json") {
55 | body = JSON.stringify(data);
56 | headers["Content-Type"] = "application/json";
57 | } else if (format === "form-data") {
58 | const formData = new FormData();
59 | Object.keys(data).forEach((key) => {
60 | formData.append(key, data[key]);
61 | });
62 | body = formData;
63 | }
64 | return fetch(url, {
65 | method: "POST",
66 | cache: "no-store",
67 | body,
68 | headers,
69 | });
70 | }
71 |
72 | export function postJSON(
73 | url: string,
74 | data: Record = {},
75 | headers: Record = {},
76 | ) {
77 | return post(url, data, "json", headers);
78 | }
79 |
80 | export function postQuery(
81 | url: string,
82 | data: Record = {},
83 | headers: Record = {},
84 | ) {
85 | return post(url, data, "query", headers);
86 | }
87 |
88 | export function postFormData(
89 | url: string,
90 | data: Record = {},
91 | headers: Record = {},
92 | ) {
93 | return post(url, data, "form-data", headers);
94 | }
95 |
--------------------------------------------------------------------------------
/src/frontend/backup/css/main.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | body, p {
6 | margin: 0;
7 | }
8 | label {
9 | /*display: inline-block;*/
10 | /*width: 100%;*/
11 | }
12 |
13 | .section-app {
14 | position: relative;
15 | max-width: 800px;
16 | min-width: 580px;
17 | background-color: antiquewhite;
18 | margin: 10px auto;
19 | border-radius: 8px;
20 | }
21 |
22 | .section-app > header {
23 | border-bottom: 1px solid #dcdcdc;
24 | padding: 10px 20px;
25 | }
26 |
27 | .section-app > header > h1 {
28 | text-align: center;
29 | margin-bottom: 20px;
30 | }
31 |
32 | .section-app > footer {
33 | display: flex;
34 | justify-content: space-between;
35 | border-top: 1px solid #dcdcdc;
36 | padding: 10px 20px;
37 | }
38 |
39 | .section-app > footer {
40 | & > .notice {
41 | font-size: 14px;
42 | color: red;
43 | }
44 | & > a {
45 | font-size: 14px;
46 | }
47 | }
48 |
49 | .section-app > main {
50 | padding: 10px 20px;
51 | }
52 |
53 | .section-app > main > form {
54 | margin: 30px auto;
55 | display: flex;
56 | gap: 10px;
57 | }
58 |
59 | .section-app > main label,
60 | .section-app > main input {
61 | flex: 1;
62 | width: 100%;
63 | height: 36px;
64 | font-size: 16px;
65 | padding-left: .75em;
66 | }
67 |
68 | .section-app form > label {
69 | display: inline-flex;
70 | align-items: center;
71 | }
72 |
73 | label.required > span::before {
74 | content: "*";
75 | color: red;
76 | }
77 |
78 | .section-app > main > form button {
79 | height: 36px;
80 | width: 160px;
81 | }
82 |
83 | .rooms li {
84 | margin-bottom: 10px;
85 | }
86 |
87 | .rooms li > span {
88 | margin-right: 20px;
89 | }
90 |
91 | .rooms li > a {
92 | font-size: 14px;
93 | }
94 | .section-command {
95 | position: relative;
96 | max-width: 800px;
97 | min-width: 580px;
98 | margin: 10px auto;
99 | border-radius: 8px;
100 | }
101 | .section-command select {
102 | padding: 2px 5px;
103 | margin-right: 10px;
104 | }
105 | .section-command input {
106 | padding: 2px 5px;
107 | margin-right: 10px;
108 | }
109 | .section-command .result {
110 | margin-top: 20px;
111 | display: flex;
112 | flex-direction: column;
113 | }
114 | .section-command > .result textarea {
115 | resize: none;
116 | width: 100%;
117 | }
118 | .section-command > .result button {
119 | font-size: 18px;
120 | }
121 |
122 | .notify {
123 | position: fixed;
124 | top: 0;
125 | width: 100%;
126 | height: 40px;
127 | line-height: 40px;
128 | background-color: gainsboro;
129 | color: red;
130 | text-align: center;
131 | }
132 | [v-cloak] {
133 | display: none;
134 | }
135 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/E7iI.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: E7iI
3 | * path: ./panel
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var t,e,i,n,r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i label {
20 | display: flex;
21 | justify-content: center;
22 | align-items: center;
23 | margin: 0 auto;
24 |
25 | & > span {
26 | font-size: 18px;
27 | }
28 | }
29 |
30 | & input {
31 | min-width: 15em;
32 | padding: .5em;
33 | font-size: 16px;
34 | }
35 |
36 | & select {
37 | padding: .5em;
38 | font-size: 16px;
39 | margin-left: .5em;
40 | }
41 |
42 | & .actions {
43 | display: flex;
44 | justify-content: center;
45 | gap: 20px;
46 | margin-top: 20px;
47 |
48 | & > button {
49 | position: relative;
50 | font-size: 16px;
51 | }
52 | }
53 | }
54 |
55 | .container {
56 | margin: 40px auto;
57 | display: flex;
58 | flex-wrap: wrap;
59 | gap: 5px;
60 | width: 820px;
61 | }
62 |
63 | .room {
64 | display: flex;
65 | justify-content: center;
66 | align-items: center;
67 | width: 50px;
68 | height: 50px;
69 | fill: var(--color-calendar-graph-day-bg);
70 | shape-rendering: geometricPrecision;
71 | background-color: var(--color-calendar-graph-day-bg);
72 | border-radius: 2px;
73 | outline: 1px solid var(--color-calendar-graph-day-border);
74 | outline-offset: -1px;
75 |
76 | & > span {
77 | font-size: 16px;
78 | }
79 |
80 | &.dead {
81 | --color-calendar-graph-day-bg: rgba(252, 0, 0, 0.8);
82 | }
83 | &.low {
84 | --color-calendar-graph-day-bg: rgba(232, 238, 72, 0.8);
85 | }
86 | &.mid {
87 | --color-calendar-graph-day-bg: rgba(164, 199, 80, 0.8);
88 | }
89 | &.high {
90 | --color-calendar-graph-day-bg: rgb(64, 184, 32, 0.8);
91 | }
92 | }
93 |
94 | .statics {
95 | position: fixed;
96 | right: 0;
97 | top: 0;
98 | padding: 20px;
99 | background: cornsilk;
100 |
101 | & > p {
102 | width: 6em;
103 | }
104 | }
105 |
106 | .memory-usage {
107 | position: fixed;
108 | bottom: 30px;
109 | right: 10px;
110 | padding: 0;
111 |
112 | & > p {
113 | display: flex;
114 | justify-content: space-between;
115 | align-items: center;
116 | min-width: 140px;
117 | border-bottom: 1px solid #d5d5d5;
118 | height: 30px;
119 | padding: 0 1em;
120 |
121 | &:last-child {
122 | border-bottom: none;
123 | }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/blC7.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: blC7
3 | * path: ../common/connects
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.connectMirror=exports.connectVideoPip=exports.connectVideoLoading=exports.connectUIandVideo=void 0;var t=require("@bilibili-live/web-player-common"),n=require("@bilibili-live/web-player-video"),r=e(require("@bilibili-live/web-player-track"));function i(e,n){var r=e.getCtrlUI(),i=n.getVideoEl();if(null==i||null==r)return function(){};var o=t.userSetting.getVolume();null!=o&&(i.volume=o.value/100,i.muted=o.disabled,r.volume={disabled:i.muted,value:100*i.volume});var u=function(){r.playStatus=!0},a=function(){r.playStatus=!1},l=function(){n.getVideoEl().paused&&e.show()},c=function(e){null!=r.volume&&(r.volume={disabled:i.muted,value:100*i.volume})};i.addEventListener("playing",u),i.addEventListener("pause",a),i.addEventListener("loadeddata",l),i.addEventListener("volumechange",c);var d=e.onChange(function(e,n){if("playStatus"===e)n?i.play().catch(function(e){t.logger.error(e)}):i.pause();else if("volume"===e){var r=n,o=r.disabled,u=r.value;i.muted=o,i.volume=u/100}});return function(){d(),i.removeEventListener("playing",u),i.removeEventListener("pause",a),i.removeEventListener("loadeddata",l),i.removeEventListener("volumechange",c)}}function o(e,r,i){var o,u=function(){o=(0,t.loading)(r)},a=function(){null==o||o()},l=e.on(n.EventType.WaitStart,function(){u()}),c=e.on(n.EventType.WaitEnd,a);return e.once(n.EventType.FirstFrame,function(){a(),(0,t.coverImg)(null,r)}),null==i||""===i?(u(),(0,t.coverImg)(null,r)):(0,t.coverImg)(i,r),function(){l(),c(),a()}}function u(e,i){var o=function(){null!=document.pictureInPictureElement&&document.exitPictureInPicture().catch(function(e){t.logger.error(e)})},u=e.on(n.EventType.Destroyed,function(){o(),c.pipStatus=!1,u()}),a=i.onChange(function(n,r){if("pipStatus"===n&&document.pictureInPictureEnabled){if(r){var i=e.getVideoEl();return o(),void i.requestPictureInPicture().catch(t.logger.error)}o()}}),l=e.getVideoEl(),c=i.getCtrlUI(),d=0,v=function(){r.default.operation(r.default.OperationCode.PictureInPicture,Math.floor((performance.now()-d)/1e3),{sampleRate:1})},s=function(){c.pipStatus=!1,v()},p=function(){d=performance.now()},f=function(){null!=document.pictureInPictureElement&&v()};return l.addEventListener("leavepictureinpicture",s),l.addEventListener("enterpictureinpicture",p),window.addEventListener("beforeunload",f),function(){a(),l.removeEventListener("leavepictureinpicture",s),l.removeEventListener("enterpictureinpicture",p),window.removeEventListener("beforeunload",f),o()}}function a(e,t){!0===t.getCtrlUI().mirrorStatus&&(e.getVideoEl().style.transform="rotateY(180deg)");var n=t.onChange(function(t,n){if("mirrorStatus"===t){var r=e.getVideoEl();r.style.transform=!0!==n?"":"rotateY(180deg)"}});return function(){n()}}exports.connectUIandVideo=i,exports.connectVideoLoading=o,exports.connectVideoPip=u,exports.connectMirror=a;
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/parser.js:
--------------------------------------------------------------------------------
1 | const acorn = require('acorn')
2 | const path = require('path')
3 | const fs = require('fs')
4 | const fse = require('fs-extra')
5 |
6 | const source = fs.readFileSync(path.resolve(__dirname, '../raw/room-player-2023-09-21.min.js'), {
7 | encoding: 'utf-8'
8 | })
9 |
10 | const programAst = acorn.parse(source, {
11 | ecmaVersion: 2017,
12 | })
13 |
14 |
15 | /**
16 | * 获取节点的源码内容
17 | * @param node 节点
18 | * @param hint 类型提示
19 | * @return {string} 源码
20 | */
21 | function getNodeSource(node, hint = null) {
22 | let {start, end} = node
23 | switch (hint) {
24 | // 字符串字面量,去除前后引号
25 | case 'string-literal':
26 | start += 1
27 | end -= 1
28 | break
29 | }
30 |
31 | return source.substring(start, end)
32 | }
33 |
34 | const assignmentExpNode = programAst.body[0].expression
35 | const firstArgNode = assignmentExpNode.right.arguments[0]
36 | const thirdArgNode = assignmentExpNode.right.arguments[2]
37 |
38 | // const globalName = getNodeSource(assignmentExpNode.left)
39 | // const entry = getNodeSource(thirdArgNode)
40 |
41 | const graph = {}
42 | const map = {}
43 |
44 | for (const {key, value} of firstArgNode.properties) {
45 | const deps = value.elements[1].properties.reduce((obj, prop) => {
46 | const {key, value} = prop
47 | obj[getNodeSource(value, 'string-literal')] = getNodeSource(key, 'string-literal')
48 | map[getNodeSource(value, 'string-literal')] = getNodeSource(key, 'string-literal')
49 | return obj
50 | }, {})
51 |
52 | const impl = value.elements[0]
53 |
54 | graph[getNodeSource(key, 'string-literal')] = {
55 | id: getNodeSource(key, 'string-literal'),
56 | deps,
57 | impl: {
58 | start: impl.start,
59 | end: impl.end,
60 | },
61 | }
62 | }
63 | for (const module of Object.values(graph)) {
64 | if (module.id in map) {
65 | module.path = map[module.id]
66 | }
67 | }
68 |
69 | console.log(graph)
70 | console.log(map)
71 |
72 | // 拆分模块文件
73 | function writeGraph(graph) {
74 | fse.emptyDirSync(path.resolve(__dirname, 'modules'))
75 |
76 | for (const module of Object.values(graph)) {
77 | writeModule(module)
78 | }
79 | }
80 | function writeModule(module) {
81 | const fileName = `modules/${module.id}${module.path ? '' : '-entrypoint'}.js`
82 | const fileContent = `${generateFileComment(module)}\n(${getNodeSource(module.impl)})()`
83 |
84 | fs.writeFileSync(path.resolve(__dirname, fileName), fileContent, {
85 | encoding: 'utf-8',
86 | })
87 | }
88 |
89 | function generateFileComment(module) {
90 | let comment = '/**\n'
91 | if (module.id) {
92 | comment += ` * id: ${module.id}\n`
93 | }
94 | if (module.path) {
95 | comment += ` * path: ${module.path}\n`
96 | }
97 | comment += ' */\n'
98 | return comment
99 | }
100 |
101 | writeGraph(graph)
102 |
--------------------------------------------------------------------------------
/src/frontend/backup/style.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | style
6 |
57 |
58 |
59 |
60 |
1
61 |
2
62 |
130
63 |
0
64 |
0
65 |
2300
66 |
0
67 |
20
68 |
20
69 |
300
70 |
1300
71 |
0
72 |
20
73 |
20
74 |
20
75 |
20
76 |
200
77 |
20
78 |
3
79 |
80 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/ryqy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: ryqy
3 | * path: ./bili-p2p
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var t,r=1,i=arguments.length;r
2 | import {useRoomStore} from "@/stores/room";
3 | import type {Room} from '@/types'
4 |
5 | const roomStore = useRoomStore()
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
房间列表
15 |
16 |
请在上方输入直播间 url 进行连接
17 |
18 | -
24 | {{ index + 1 }}. {{ room.roomId }}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
126 |
--------------------------------------------------------------------------------
/src/frontend/backup/css/loading.css:
--------------------------------------------------------------------------------
1 | #init__loading__placeholder {
2 | pointer-events: none;
3 | position: fixed;
4 | top: 0;
5 | left: 0;
6 | opacity: 1;
7 | z-index: 999;
8 | width: 100%;
9 | height: 100%;
10 | background: rgba(255, 255, 255, 0.9);
11 | transition: opacity .5s linear;
12 | }
13 | .hidden {
14 | opacity: 0 !important;
15 | }
16 |
17 | #init__loading__placeholder .loading-title {
18 | position: absolute;
19 | top: 40%;
20 | left: 50%;
21 | margin-top: 40px;
22 | margin-left: -70px;
23 | color: #0299be;
24 | font-size: 14px;
25 | font-weight: 600;
26 | letter-spacing: 2px;
27 | }
28 |
29 | #init__loading__placeholder .loading-grid {
30 | position: absolute;
31 | top: 40%;
32 | left: 50%;
33 | width: 30px;
34 | height: 30px;
35 | margin: -15px 0 0 -15px;
36 | }
37 |
38 | #init__loading__placeholder .loading {
39 | width: 10px;
40 | height: 10px;
41 | background-color: #0299be;
42 | float: left;
43 | -webkit-animation: loading-grid-scale-delay 1.3s infinite ease-in-out;
44 | animation: loading-grid-scale-delay 1.3s infinite ease-in-out;
45 | }
46 |
47 | #init__loading__placeholder .loading1 {
48 | border-top-left-radius: 4px;
49 | -webkit-animation-delay: 0.2s;
50 | animation-delay: 0.2s;
51 | }
52 |
53 | #init__loading__placeholder .loading2 {
54 | -webkit-animation-delay: 0.3s;
55 | animation-delay: 0.3s;
56 | }
57 |
58 | #init__loading__placeholder .loading3 {
59 | border-top-right-radius: 4px;
60 | -webkit-animation-delay: 0.4s;
61 | animation-delay: 0.4s;
62 | }
63 |
64 | #init__loading__placeholder .loading4 {
65 | -webkit-animation-delay: 0.1s;
66 | animation-delay: 0.1s;
67 | }
68 |
69 | #init__loading__placeholder .loading5 {
70 | -webkit-animation-delay: 0.2s;
71 | animation-delay: 0.2s;
72 | }
73 |
74 | #init__loading__placeholder .loading6 {
75 | -webkit-animation-delay: 0.3s;
76 | animation-delay: 0.3s;
77 | }
78 |
79 | #init__loading__placeholder .loading7 {
80 | border-bottom-left-radius: 4px;
81 | -webkit-animation-delay: 0s;
82 | animation-delay: 0s;
83 | }
84 |
85 | #init__loading__placeholder .loading8 {
86 | -webkit-animation-delay: 0.1s;
87 | animation-delay: 0.1s;
88 | }
89 |
90 | #init__loading__placeholder .loading9 {
91 | border-bottom-right-radius: 4px;
92 | -webkit-animation-delay: 0.2s;
93 | animation-delay: 0.2s;
94 | }
95 |
96 | @-webkit-keyframes loading-grid-scale-delay {
97 | 0%,
98 | 70%,
99 | 100% {
100 | -webkit-transform: scale3D(1, 1, 1);
101 | transform: scale3D(1, 1, 1);
102 | }
103 |
104 | 35% {
105 | -webkit-transform: scale3D(0, 0, 1);
106 | transform: scale3D(0, 0, 1);
107 | }
108 | }
109 |
110 | @keyframes loading-grid-scale-delay {
111 | 0%,
112 | 70%,
113 | 100% {
114 | -webkit-transform: scale3D(1, 1, 1);
115 | transform: scale3D(1, 1, 1);
116 | }
117 |
118 | 35% {
119 | -webkit-transform: scale3D(0, 0, 1);
120 | transform: scale3D(0, 0, 1);
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/NApx.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: NApx
3 | * path: @bilibili-live/live-danmaku-engine-v2
4 | */
5 |
6 | (function(require,module,exports) {
7 | var define;
8 | var t;!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof t&&t.amd?t([],n):"object"==typeof exports?exports.DanmakuBridge=n():e.DanmakuBridge=n()}(self,function(){return function(){"use strict";var t={};!function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}(t);var e=function(t,e,n){if(n||2===arguments.length)for(var o,a=0,r=e.length;a0&&(this.tasks.forEach(function(t){t&&t()}),this.tasks.length=0)},t.prototype.play=function(){this.asyncCallMethod("play")},t.prototype.add=function(t,e){this.callMethod("add",t,e)},t.prototype.searchAreaDanmaku=function(t,e){return this.asyncCallMethod("searchAreaDanmaku",t,e)},t.prototype.option=function(t,e){return this.asyncCallMethod("option",t,e)},t.prototype.visible=function(t){return this.asyncCallMethod("visible",t)},t.prototype.resize=function(){this.asyncCallMethod("resize")},t.prototype.clear=function(){this.asyncCallMethod("clear")},t.prototype.destroy=function(){this.asyncCallMethod("destroy")},t.prototype.loadDanmaku=function(t){var e=this,n=document.createElement("script");n.type="text/javascript",n.onload=function(){e.Danmaku=new window.LiveDanmakuEngine.default(e.config),e.callTasks()},n.onerror=function(){e.errorTimes>=2||(e.errorTimes++,console.error("[Danmaku Core Error]","Times: ".concat(e.errorTimes),"Url: ".concat(t)),e.loadDanmaku(t))},n.src=t,document.getElementsByTagName("body")[0].appendChild(n)},t}();return t.default=a,t}()});
9 | })()
--------------------------------------------------------------------------------
/docs/apis/nav.md:
--------------------------------------------------------------------------------
1 | # nav
2 |
3 | ## 接口地址
4 |
5 | `https://api.bilibili.com/x/web-interface/nav`
6 |
7 | ## 方法
8 |
9 | `GET`
10 |
11 | ## 参数
12 |
13 | 无
14 |
15 | ## 返回示例
16 |
17 | ```json
18 | {
19 | "code": 0,
20 | "message": "0",
21 | "ttl": 1,
22 | "data": {
23 | "isLogin": true,
24 | "email_verified": 0,
25 | "face": "http://i0.hdslb.com/bfs/face/member/noface.jpg",
26 | "face_nft": 0,
27 | "face_nft_type": 0,
28 | "level_info": {
29 | "current_level": 0,
30 | "current_min": 0,
31 | "current_exp": 0,
32 | "next_exp": 1
33 | },
34 | "mid": 549621446,
35 | "mobile_verified": 1,
36 | "money": 0,
37 | "moral": 70,
38 | "official": {
39 | "role": 0,
40 | "title": "",
41 | "desc": "",
42 | "type": -1
43 | },
44 | "officialVerify": {
45 | "type": -1,
46 | "desc": ""
47 | },
48 | "pendant": {
49 | "pid": 0,
50 | "name": "",
51 | "image": "",
52 | "expire": 0,
53 | "image_enhance": "",
54 | "image_enhance_frame": ""
55 | },
56 | "scores": 0,
57 | "uname": "bili_28350385046",
58 | "vipDueDate": 0,
59 | "vipStatus": 0,
60 | "vipType": 0,
61 | "vip_pay_type": 0,
62 | "vip_theme_type": 0,
63 | "vip_label": {
64 | "path": "",
65 | "text": "",
66 | "label_theme": "",
67 | "text_color": "",
68 | "bg_style": 0,
69 | "bg_color": "",
70 | "border_color": "",
71 | "use_img_label": true,
72 | "img_label_uri_hans": "",
73 | "img_label_uri_hant": "",
74 | "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png",
75 | "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png"
76 | },
77 | "vip_avatar_subscript": 0,
78 | "vip_nickname_color": "",
79 | "vip": {
80 | "type": 0,
81 | "status": 0,
82 | "due_date": 0,
83 | "vip_pay_type": 0,
84 | "theme_type": 0,
85 | "label": {
86 | "path": "",
87 | "text": "",
88 | "label_theme": "",
89 | "text_color": "",
90 | "bg_style": 0,
91 | "bg_color": "",
92 | "border_color": "",
93 | "use_img_label": true,
94 | "img_label_uri_hans": "",
95 | "img_label_uri_hant": "",
96 | "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png",
97 | "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png"
98 | },
99 | "avatar_subscript": 0,
100 | "nickname_color": "",
101 | "role": 0,
102 | "avatar_subscript_url": "",
103 | "tv_vip_status": 0,
104 | "tv_vip_pay_type": 0
105 | },
106 | "wallet": {
107 | "mid": 549621446,
108 | "bcoin_balance": 0,
109 | "coupon_balance": 0,
110 | "coupon_due_time": 0
111 | },
112 | "has_shop": false,
113 | "shop_url": "",
114 | "allowance_count": 0,
115 | "answer_status": 1,
116 | "is_senior_member": 0
117 | }
118 | }
119 | ```
120 |
121 | ## 接口目的
122 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/cPXi.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: cPXi
3 | * path: ./interface
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e,a,t,r,o,i,n,l,s;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SEIType=exports.CorePlayerType=exports.ExternalEventType=exports.ApiErrorCode=exports.P2PType=exports.EQuality=exports.CodecType=exports.FormatType=exports.ProtocolType=void 0,function(e){e.HTTP_HLS="http_hls",e.HTTP_STREAM="http_stream"}(e=exports.ProtocolType||(exports.ProtocolType={})),function(e){e.FLV="flv",e.TS="ts",e.FMP4="fmp4"}(a=exports.FormatType||(exports.FormatType={})),function(e){e.AVC="avc",e.HEVC="hevc"}(t=exports.CodecType||(exports.CodecType={})),function(e){e[e.Origin=1e4]="Origin",e[e.K4=2e4]="K4",e[e.Dolby=3e4]="Dolby"}(r=exports.EQuality||(exports.EQuality={})),function(e){e[e.HLS_NOT_P2P=-1]="HLS_NOT_P2P",e[e.NONE=0]="NONE",e[e.HLS_BILI=1]="HLS_BILI",e[e.FLV_QVB=8]="FLV_QVB"}(o=exports.P2PType||(exports.P2PType={})),function(e){e[e.AreaBlock=6005]="AreaBlock"}(i=exports.ApiErrorCode||(exports.ApiErrorCode={})),function(e){e.Initialized="initialized",e.LiveStateChange="liveStateChange",e.StartPlayRound="startPlayRound",e.VideoStateChange="videoStateChange",e.FullscreenChange="fullscreenChange",e.Playing="playing",e.Paused="paused",e.SwitchLine="switchLine",e.SwitchQuality="switchQuality",e.WebFullscreen="webFullscreen",e.FeedBackClick="feedBackClick",e.BlockSettingClick="blockSettingClick",e.Set="set",e.Reload="reload",e.GuidChange="guidChange",e.InitDanmaku="initDanmaku",e.AddDanmaku="addDanmaku",e.SendDanmaku="sendDanmaku",e.ReceiveOnlineCount="receiveOnlineCount",e.ReceiveMessage="receiveMessage",e.UserLogin="userLogin",e.SendGift="sendGift",e.FirstLoadedAPIPlayer="firstLoadedAPIPlayer",e.FirstLoadedAPIPlayurl="firstLoadedAPIPlayurl",e.FirstLoadStart="firstLoadStart",e.FirstLoadedMetaData="firstLoadedMetaData",e.FirstPlaying="firstPlaying",e.EnterTheRoom="enterTheRoom",e.OperableElementsChange="operableElementsChange",e.AutoPlay="autoPlay",e.SwitchQualityNotLogin="switchQualityNotLogin",e.Recommend="recommend",e.DanmakuMaskChange="danmakuMaskChange",e.DanmakuMaskStatusChange="danmakuMaskStatusChange",e.CtrlVisibleChange="ctrlVisibleChange",e.WebPlayerCreated="webPlayerCreated",e.FirstFrame="FirstFrame",e.VideoDestroyed="VideoDestroyed",e.SEIData="SEIData",e.VolumeChange="VolumeChange",e.VideoDirectionChange="VideoDirectionChange",e.UserClickPlayIcon="UserClickPlayIcon",e.MergeStream="MergeStream",e.SEIParseData="SEIParseData",e.OrientationChange="OrientationChange",e.UserRedirect="UserRedirect",e.MutePlay="MutePlay",e.NotAutoPlay="NotAutoPlay",e.WaitStart="WaitStart",e.WaitEnd="WaitEnd",e.VideoError="VideoError",e.MetaDataChange="MetaDataChange",e.PlayFaild="PlayFailed",e.ScreenStateChange="ScreenStateChange",e.UserOperation="UserOperation"}(n=exports.ExternalEventType||(exports.ExternalEventType={})),function(e){e.fMp4Player="fMp4Player",e.Hls7Player="Hls7Player",e.NativePlayer="NativePlayer"}(l=exports.CorePlayerType||(exports.CorePlayerType={})),function(e){e.LIVE_SEI_CHANNEL="LIVE_SEI_CHANNEL",e.BILIMASK__SVGBIN="BILIMASK__SVGBIN",e.B_LIVE_VIBRATION="B_LIVE_VIBRATION",e.LIVE_SEI_PC_LINK="LIVE_SEI_PC_LINK",e.BVC_KUAWAN____TS="BVC_KUAWAN____TS",e.BILILIVESUBTITLE="BILILIVESUBTITLE",e.BVCLIVESTREAMHOP="BVCLIVESTREAMHOP",e.BVC__CANVAS_DATA="BVC__CANVAS_DATA"}(s=exports.SEIType||(exports.SEIType={}));
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/modules/ywxt.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: ywxt
3 | * path: ./modal
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@bilibili-live/web-player-common");require("./modal.less");var e=function(){function e(t,i){this.container=t,this._snippet=['','','','
'],this._opts=Object.assign({},e._DEFAULT_OPTIONS,i),this._initialize()}return e.prototype.show=function(){var t=this._opts,e=this._template;this._freshPos(),e._container.classList.add("active"),"function"==typeof t.onShow&&t.onShow()},e.prototype.hide=function(){var t=this._opts;this._template._container.classList.remove("active"),"function"==typeof t.onHide&&t.onHide(),t.autoRemove&&this.destroy()},e.prototype.destroy=function(){this._template._container.remove()},e.prototype._initialize=function(){this._create()._bindEvents(),this._opts.autoShow&&this.show()},e.prototype._create=function(){var e=(0,t.createElement)("div",{classname:"blp-plugin-modal"});e.innerHTML=this._snippet.join(""),this._template={_container:e,_header:e.querySelector(".blp-plugin-modal-header"),_body:e.querySelector(".blp-plugin-modal-body"),_footer:e.querySelector(".blp-plugin-modal-footer"),_close:e.querySelector(".blp-plugin-modal-close")};var i=this._template,n=this._opts;return i._header.innerText=n.title,i._body.innerHTML=""!==n.html?n.html:n.text,this._createBtn(i._footer,n.btns,n),n.hideBtn&&i._close.classList.add("active"),this.container.appendChild(e),null!=n.width&&0!==n.width&&(e.style.width="".concat(n.width,"px")),this},e.prototype._createBtn=function(e,i,n){var o=this;if(i instanceof Array)i.forEach(function(t){o._createBtn(e,t,n)});else{var l=null;switch(i.type){case"submit":(l=(0,t.createElement)("button",{classname:"blp-plugin-modal-btn submit-btn"})).innerHTML=i.text,"function"==typeof i.click&&l.addEventListener("click",function(t){i.click(t),o.hide()});break;case"cancel":(l=(0,t.createElement)("button",{classname:"blp-plugin-modal-btn cancel-btn"})).innerHTML=i.text,"flex-report"===n.btnPostion&&l.classList.add("live-bilibili-player-report-cancel"),l.addEventListener("click",function(){var t;null===(t=i.click)||void 0===t||t.call(i),o.hide()})}null!=l&&e.append(l)}},e.prototype._bindEvents=function(){var t=this;return this._opts.hideBtn&&this._template._close.addEventListener("click",function(){t.hide()}),this},e.prototype._freshPos=function(){var t=this._opts,e=this._template._container,i=this._template._footer,n="",o="",l=0,s=0,a=e.style;switch(t.btnPostion){case"flex-report":i.style.cssText="\n display: flex;\n justify-content: space-around;\n margin-top: 69px;\n ",a.height="190px",a.padding="20px"}switch(t.position){case"center-center":n="50%",o="50%",l=-1*parseInt(a.width)/2,s=-1*parseInt(a.height)/2}a.left=n,a.top=o,a.marginLeft="".concat(l,"px"),a.marginTop="".concat(s,"px")},e._DEFAULT_OPTIONS={title:"Bilibili HTML5 Live Player Modal",theme:"white",text:"Are you confirm the operation?",html:"",btns:[{type:"submit",text:"Confirm",click:function(){}},{type:"cancel",text:"Cancel",click:function(){}}],mask:!0,position:"center-center",hideBtn:!0,autoShow:!1,autoRemove:!1},e}();exports.default=e;
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/js/vendors.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | * Determine if an object is a Buffer
3 | *
4 | * @author Feross Aboukhadijeh
5 | * @license MIT
6 | */
7 |
8 | /*!
9 | * Draggabilly v3.0.0
10 | * Make that shiz draggable
11 | * https://draggabilly.desandro.com
12 | * MIT license
13 | */
14 |
15 | /*!
16 | * Infinite Scroll v2.0.4
17 | * measure size of elements
18 | * MIT license
19 | */
20 |
21 | /*!
22 | * Unidragger v3.0.1
23 | * Draggable base class
24 | * MIT license
25 | */
26 |
27 | /*!
28 | * Vue.js v2.6.14
29 | * (c) 2014-2021 Evan You
30 | * Released under the MIT License.
31 | */
32 |
33 | /*!
34 | * pinia v2.1.6
35 | * (c) 2023 Eduardo San Martin Morote
36 | * @license MIT
37 | */
38 |
39 | /*!
40 | * vuex v3.6.2
41 | * (c) 2021 Evan You
42 | * @license MIT
43 | */
44 |
45 | /*! *****************************************************************************
46 | Copyright (C) Microsoft. All rights reserved.
47 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use
48 | this file except in compliance with the License. You may obtain a copy of the
49 | License at http://www.apache.org/licenses/LICENSE-2.0
50 |
51 | THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
52 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
53 | WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
54 | MERCHANTABLITY OR NON-INFRINGEMENT.
55 |
56 | See the Apache Version 2.0 License for specific language governing permissions
57 | and limitations under the License.
58 | ***************************************************************************** */
59 |
60 | /*! *****************************************************************************
61 | Copyright (c) Microsoft Corporation.
62 |
63 | Permission to use, copy, modify, and/or distribute this software for any
64 | purpose with or without fee is hereby granted.
65 |
66 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
67 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
68 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
69 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
70 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
71 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
72 | PERFORMANCE OF THIS SOFTWARE.
73 | ***************************************************************************** */
74 |
75 | /**
76 | * @license
77 | * Lodash
78 | * Copyright OpenJS Foundation and other contributors
79 | * Released under MIT license
80 | * Based on Underscore.js 1.8.3
81 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
82 | */
83 |
84 | /**
85 | * Prefect script loader is designed to load script dynamically.
86 | * Based on (eldargab/load-script)[https://github.com/eldargab/load-script]
87 | *
88 | * @author: Eldar Gabdullin (Original), LancerComet (Revision)
89 | * @license: MIT
90 | */
91 |
92 | /** @preserve
93 | * Counter block mode compatible with Dr Brian Gladman fileenc.c
94 | * derived from CryptoJS.mode.CTR
95 | * Jan Hruby jhruby.web@gmail.com
96 | */
97 |
--------------------------------------------------------------------------------
/resources/anatomy/modules/Klvu.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: Klvu
3 | * path: ./loading
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.unloading=exports.loading=void 0;var e='\n\n';function t(t){t.querySelectorAll(".web-player-loading").forEach(function(e){return e.remove()});var n=document.createElement("div");n.classList.add("web-player-loading"),n.innerHTML=e,n.style.cssText="\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10;\n display: none;\n pointer-events: none;\n ",t.appendChild(n);var i=setTimeout(function(){n.style.display="flex"},500);return function(){clearTimeout(i),n.remove()}}function n(){document.querySelectorAll(".web-player-loading").forEach(function(e){return e.remove()})}exports.loading=t,exports.unloading=n;
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/modules/PTXm.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: PTXm
3 | * path: ./browser-fullscreen
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))(function(l,u){function i(e){try{c(r.next(e))}catch(n){u(n)}}function o(e){try{c(r.throw(e))}catch(n){u(n)}}function c(e){var n;e.done?l(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(i,o)}c((r=r.apply(e,n||[])).next())})},n=this&&this.__generator||function(e,n){var t,r,l,u,i={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return u={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function o(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(i=0)),i;)try{if(t=1,r&&(l=2&o[0]?r.return:o[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,o[1])).done)return l;switch(r=0,l&&(o=[2&o[0],l.value]),o[0]){case 0:case 1:l=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(l=(l=i.trys).length>0&&l[l.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!l||o[1]>l[0]&&o[1]=0;--i){if(h(b,t,"f")[i].timestamp1&&l&&b.webXInputSetState(0,0),null!=e&&null!=e.vibrate&&e.vibrate!==h(b,r,"f")){var n=e.timestamp-t;if(Math.abs(n)<=1){if(l){var o=Math.max(0,n);setTimeout(function(){b.webXInputSetState(e.vibrate.l,e.vibrate.r)},1e3*o)}c(b,r,e.vibrate,"f"),c(b,a,e.timestamp,"f")}}},this.onFrameCallback=function(t){t>performance.now()-5&&b.onUpdateVibrate(),c(b,n,window.requestAnimationFrame(b.onFrameCallback),"f")},this.destroy=function(){cancelAnimationFrame(h(b,n,"f")),c(b,t,[],"f"),b.webXInputSetState(0,0),h(b,e,"f").dispose()},s.set(this,function(t){0===t?(h(b,o,"f").shiftLimit=0,h(b,o,"f").curLocation=0):t<.075?h(b,o,"f").shiftLimit=2:t<=.88?h(b,o,"f").shiftLimit=5:t>.88&&(h(b,o,"f").shiftLimit=7),h(b,o,"f").speed=4*t,h(b,f,"f").call(b)}),f.set(this,function(){"top"===h(b,o,"f").direction?(h(b,o,"f").curLocation+=h(b,o,"f").speed,h(b,o,"f").curLocation+=h(b,o,"f").speed):(h(b,o,"f").curLocation-=h(b,o,"f").speed,h(b,o,"f").curLocation-=h(b,o,"f").speed),Math.abs(h(b,o,"f").curLocation)>h(b,o,"f").shiftLimit&&("top"===h(b,o,"f").direction?(h(b,o,"f").direction="bottom",h(b,o,"f").curLocation=h(b,o,"f").shiftLimit):(h(b,o,"f").direction="top",h(b,o,"f").curLocation=h(b,o,"f").shiftLimit)),null!=b.dmBiz&&b.dmBiz.offsetDM(h(b,o,"f").curLocation)}),c(this,t,[],"f"),c(this,i,m,"f"),this.onFrameCallback(0)}return m.prototype.webXInputSetState=function(t,i){h(this,e,"f").setState(t,i),h(this,s,"f").call(this,h(this,e,"f").getMotorPercent())},m}();exports.VibrateTask=m,t=new WeakMap,e=new WeakMap,i=new WeakMap,a=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,s=new WeakMap,f=new WeakMap;
8 | })()
--------------------------------------------------------------------------------
/resources/anatomy/modules/PFwM.js:
--------------------------------------------------------------------------------
1 | /**
2 | * id: PFwM
3 | * path: ./ajax
4 | */
5 |
6 | (function(require,module,exports) {
7 | "use strict";var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]performance.now()?(h=Math.random()*p.scope,[4,(0,r.sleep)(h)]):[3,2];case 1:n.sent(),n.label=2;case 2:""!==(d=(0,r.getCookie)("bili_jct"))&&"POST"===(null==s?void 0:s.method)&&null!=(null==s?void 0:s.data)&&(w=new FormData,b=e(e({},null!==(u=s.data)&&void 0!==u?u:{}),{csrf:d,csrf_token:d}),Object.keys(b).forEach(function(e){w.append(e,b[e])}),s.body=w),n.label=3;case 3:return n.trys.push([3,5,,6]),[4,fetch(l,e({credentials:"include"},null!=s?s:{}))];case 4:return v=n.sent(),[3,6];case 5:throw y=n.sent(),m=String(y),c.forEach(function(e){return e("requestErr",{errMsg:m,apiUrl:f.pathname})}),new Error(m);case 6:if(!v.ok)throw g="url: ".concat(i,", status: ").concat(v.status),c.forEach(function(e){return e("responseErr",{errMsg:"status: ".concat(v.status),apiUrl:f.pathname})}),new Error(g);return[4,v.json()];case 7:if(E=n.sent(),c.forEach(function(e){return e("perf",{duration:performance.now()-t,apiUrl:f.pathname})}),"function"==typeof(null==s?void 0:s.handleRes))return s.handleRes(E),[2,E.data];if(x=E.code,_=E.data,j=E.message,0!==x)throw c.forEach(function(e){return e("apiBizErr",{errMsg:j,apiUrl:f.pathname})}),new Error(j);return[2,_]}})})}exports.ajax=i,i.watch=function(e){return c.add(e),function(){c.delete(e)}},i.disperse=function(e,t){var n=/^(https?:)?\/\//.test(e)?e:"".concat(a,"/").concat(e.replace(/^\//,""));o.set(n.replace(/^(https?:)?\/\//,""),t)};
8 | })()
--------------------------------------------------------------------------------
/src/frontend/backup/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | B站直播间弹幕采集演示
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
加载中, 请耐心等待
25 |
26 |
27 |
28 |
31 |
32 |
39 |
40 | 当前连接的房间列表:
41 |
42 | -
43 | {{room}}
44 | 断开
45 |
46 |
47 |
48 |
49 |
53 |
54 |
87 |
WebSocket 中断,可能是因为服务在重新部署,请稍后重试。
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------