From a94bb3fd99399ad1093edf937babba79fdebe165 Mon Sep 17 00:00:00 2001 From: lchzh3473 Date: Wed, 11 Oct 2023 04:43:58 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20lchzh347?= =?UTF-8?q?3/sim-phi@fde2a524d4a77ebc755b875cb528664d9a77e96e=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index-6a4a1e6c.js => index-9a6dbbb3.js | 4 +- ...x-6a4a1e6c.js.map => index-9a6dbbb3.js.map | 2 +- index-55aa2d29.js => index-c02abc05.js | 4 +- ...x-55aa2d29.js.map => index-c02abc05.js.map | 2 +- index.html | 369 +++++++++--------- phizone-af9b573d.js | 2 - phizone-af9b573d.js.map | 1 - phizone-d6cac78c.js | 2 + phizone-d6cac78c.js.map | 1 + reader--1d1e88a8.js | 2 + reader--1d1e88a8.js.map | 1 + reader--283200c6.js | 2 - reader--283200c6.js.map | 1 - script-1.5.4.1.js | 2 - script-1.5.4.1.js.map | 1 - script-1.5.4.2.js | 2 + script-1.5.4.2.js.map | 1 + skin-3580d176.js => skin-198ed131.js | 4 +- skin-3580d176.js.map => skin-198ed131.js.map | 2 +- style.css | 2 +- 20 files changed, 208 insertions(+), 199 deletions(-) rename index-6a4a1e6c.js => index-9a6dbbb3.js (95%) rename index-6a4a1e6c.js.map => index-9a6dbbb3.js.map (99%) rename index-55aa2d29.js => index-c02abc05.js (99%) rename index-55aa2d29.js.map => index-c02abc05.js.map (99%) delete mode 100644 phizone-af9b573d.js delete mode 100644 phizone-af9b573d.js.map create mode 100644 phizone-d6cac78c.js create mode 100644 phizone-d6cac78c.js.map create mode 100644 reader--1d1e88a8.js create mode 100644 reader--1d1e88a8.js.map delete mode 100644 reader--283200c6.js delete mode 100644 reader--283200c6.js.map delete mode 100644 script-1.5.4.1.js delete mode 100644 script-1.5.4.1.js.map create mode 100644 script-1.5.4.2.js create mode 100644 script-1.5.4.2.js.map rename skin-3580d176.js => skin-198ed131.js (97%) rename skin-3580d176.js.map => skin-198ed131.js.map (99%) diff --git a/index-6a4a1e6c.js b/index-9a6dbbb3.js similarity index 95% rename from index-6a4a1e6c.js rename to index-9a6dbbb3.js index f1af660..b5be805 100644 --- a/index-6a4a1e6c.js +++ b/index-9a6dbbb3.js @@ -1,2 +1,2 @@ -import{I as e}from"./index-55aa2d29.js";import{w as o}from"./waitForElementById-46893270.js";import"/utils/interact.js";import"/utils/aup.js";const t=e=>document.body.querySelector(e),n="flag{qwq}";function s(){(function(){const e=new Date;1!==e.getDate()||3!==e.getMonth()||import("./reverse-d335c325.js")})(),hook.before.set(n,(()=>{const e=hook.chartsMD5.get(hook.selectchart.value);console.log(hook.tmps.name),"ab9d2cc3eb569236ead459ad4caba109"===e?hook.now.set(n,function(){console.log("好耶");const e=hook.audio.actx.createAnalyser();e.fftSize=4096;const o=()=>{const o=e.frequencyBinCount,t=new Uint8Array(o);e.getByteFrequencyData(t);const n=t.reduce(((e,o)=>e+o))/o;return Math.min(1,n/255*2.15)};let t=null,n=NaN,s=NaN,a=NaN,r="",c=!1;const i=(e,o,t)=>(r=o,c=t,e);return l=>{const d=1.95*l,m=hook.tmps.bgMusicHack();if(m&&m!==t&&(m.connect(e),t=m),d<168)hook.stat.numOfNotes=305,hook.tmps.level="lN Lv.I2",hook.tmps.progress=d/218;else if(d<169){const e=1-(169-d)**3;hook.stat.numOfNotes=305+2195*e|0,hook.tmps.progress=o()}else hook.stat.numOfNotes=2500,hook.tmps.progress=o();if(d>325&&d<358){const e=hook.stat.perfect,o=hook.stat.good,t=hook.stat.bad;isNaN(n)&&(n=e),isNaN(s)&&(s=o),isNaN(a)&&(a=t),e!==n?n=i(e,"O(≧▽≦)O",!0):o!==s?s=i(o,"(^ω^)",!0):t!==a&&(a=i(t,"(⊙﹏⊙;)",!0)),d<327||d>334&&d<335||d>342&&d<343||d>350&&d<351?i(null,"(⊙o⊙)",!1):c||(r="(⊙ω⊙)"),hook.tmps.combo=r}}}()):hook.now.delete(n)}));const s=setInterval((()=>{if(!t(".title>small"))return;clearInterval(s);let n=3;t(".title>small").addEventListener("click",(()=>{if(--n)return;const t=Utils.randomUUID(),s=Utils.randomUUID(),a=hook.toast(`Demo

Legacy`);o(t,(o=>{o.addEventListener("click",(()=>{const o=o=>hook.uploader.fireLoad({name:"demo.zip"},e.decodeAlt(o)),t=new XMLHttpRequest;t.open("GET","//i0.hdslb.com/bfs/music/1682346166.jpg",!0),t.responseType="blob",t.onprogress=e=>hook.uploader.fireProgress(e.loaded,e.total),t.onloadend=()=>createImageBitmap(t.response).then(o),function(e=(()=>{})){const o=Object.assign(document.createElement("meta"),{content:"no-referrer",name:"referrer"});document.head.appendChild(o),e(),o.remove()}((()=>t.send())),a.dispatchEvent(new Event("custom-done"))}))})),o(s,(e=>{e.addEventListener("click",(()=>{location.replace("/sim-phi-legacy"),a.dispatchEvent(new Event("custom-done"))}))}))}))}),500)}export{s as default}; -//# sourceMappingURL=index-6a4a1e6c.js.map +import{I as e}from"./index-c02abc05.js";import{w as o}from"./waitForElementById-46893270.js";import"/utils/interact.js";import"/utils/aup.js";const t=e=>document.body.querySelector(e),n="flag{qwq}";function s(){(function(){const e=new Date;1!==e.getDate()||3!==e.getMonth()||import("./reverse-d335c325.js")})(),hook.before.set(n,(()=>{const e=hook.chartsMD5.get(hook.selectchart.value);console.log(hook.tmps.name),"ab9d2cc3eb569236ead459ad4caba109"===e?hook.now.set(n,function(){console.log("好耶");const e=hook.audio.actx.createAnalyser();e.fftSize=4096;const o=()=>{const o=e.frequencyBinCount,t=new Uint8Array(o);e.getByteFrequencyData(t);const n=t.reduce(((e,o)=>e+o))/o;return Math.min(1,n/255*2.15)};let t=null,n=NaN,s=NaN,a=NaN,r="",c=!1;const i=(e,o,t)=>(r=o,c=t,e);return l=>{const d=1.95*l,m=hook.tmps.bgMusicHack();if(m&&m!==t&&(m.connect(e),t=m),d<168)hook.stat.numOfNotes=305,hook.tmps.level="lN Lv.I2",hook.tmps.progress=d/218;else if(d<169){const e=1-(169-d)**3;hook.stat.numOfNotes=305+2195*e|0,hook.tmps.progress=o()}else hook.stat.numOfNotes=2500,hook.tmps.progress=o();if(d>325&&d<358){const e=hook.stat.perfect,o=hook.stat.good,t=hook.stat.bad;isNaN(n)&&(n=e),isNaN(s)&&(s=o),isNaN(a)&&(a=t),e!==n?n=i(e,"O(≧▽≦)O",!0):o!==s?s=i(o,"(^ω^)",!0):t!==a&&(a=i(t,"(⊙﹏⊙;)",!0)),d<327||d>334&&d<335||d>342&&d<343||d>350&&d<351?i(null,"(⊙o⊙)",!1):c||(r="(⊙ω⊙)"),hook.tmps.combo=r}}}()):hook.now.delete(n)}));const s=setInterval((()=>{if(!t(".title>small"))return;clearInterval(s);let n=3;t(".title>small").addEventListener("click",(()=>{if(--n)return;const t=Utils.randomUUID(),s=Utils.randomUUID(),a=hook.toast(`Demo

Legacy`);o(t,(o=>{o.addEventListener("click",(()=>{const o=o=>hook.uploader.fireLoad({name:"demo.zip"},e.decodeAlt(o)),t=new XMLHttpRequest;t.open("GET","//i0.hdslb.com/bfs/music/1682346166.jpg",!0),t.responseType="blob",t.onprogress=e=>hook.uploader.fireProgress(e.loaded,e.total),t.onloadend=()=>createImageBitmap(t.response).then(o),function(e=(()=>{})){const o=Object.assign(document.createElement("meta"),{content:"no-referrer",name:"referrer"});document.head.appendChild(o),e(),o.remove()}((()=>t.send())),a.dispatchEvent(new Event("custom-done"))}))})),o(s,(e=>{e.addEventListener("click",(()=>{location.replace("/sim-phi-legacy"),a.dispatchEvent(new Event("custom-done"))}))}))}))}),500)}export{s as default}; +//# sourceMappingURL=index-9a6dbbb3.js.map diff --git a/index-6a4a1e6c.js.map b/index-9a6dbbb3.js.map similarity index 99% rename from index-6a4a1e6c.js.map rename to index-9a6dbbb3.js.map index fb457e1..8530287 100644 --- a/index-6a4a1e6c.js.map +++ b/index-9a6dbbb3.js.map @@ -1 +1 @@ -{"version":3,"file":"index-6a4a1e6c.js","sources":["../src/plugins/demo/index.js"],"sourcesContent":["import { ImgAny } from '../../utils/ImageTools';\nimport { waitForElementById } from '../../utils/waitForElementById';\nconst $ = query => document.body.querySelector(query);\nconst flag0 = 'flag{\\x71w\\x71}';\nexport default function() {\n (function() {\n const t = new Date();\n if (t.getDate() !== 1 || t.getMonth() !== 3) return;\n import('./reverse.js');\n }());\n hook.before.set(flag0, () => {\n const md5 = hook.chartsMD5.get(hook.selectchart.value);\n console.log(hook.tmps.name);\n if (md5 === 'ab9d2cc3eb569236ead459ad4caba109') hook.now.set(flag0, loadModYukiOri());\n else hook.now.delete(flag0);\n });\n const id = setInterval(() => {\n if (!$('.title>small')) return;\n clearInterval(id);\n let tid = 3;\n $('.title>small').addEventListener('click', () => {\n if (--tid) return;\n const uidDemo = Utils.randomUUID();\n const uidLegacy = Utils.randomUUID();\n const div = hook.toast(`Demo

Legacy`);\n waitForElementById(uidDemo, elem => {\n elem.addEventListener('click', () => {\n const handler = img => hook.uploader.fireLoad({ name: 'demo.zip' }, ImgAny.decodeAlt(img));\n const xhr = new XMLHttpRequest();\n xhr.open('GET', '//i0.hdslb.com/bfs/music/1682346166.jpg', true);\n xhr.responseType = 'blob';\n xhr.onprogress = evt => hook.uploader.fireProgress(evt.loaded, evt.total);\n xhr.onloadend = () => createImageBitmap(xhr.response).then(handler);\n setNoReferrer(() => xhr.send());\n div.dispatchEvent(new Event('custom-done'));\n });\n });\n waitForElementById(uidLegacy, elem => {\n elem.addEventListener('click', () => {\n location.replace('/sim-phi-legacy');\n div.dispatchEvent(new Event('custom-done'));\n });\n });\n });\n }, 500);\n}\nfunction loadModYukiOri() {\n console.log('好耶');\n const analyser = hook.audio.actx.createAnalyser();\n analyser.fftSize = 4096;\n // analyser.minDecibels = -180;\n const getFreq = () => {\n // progress变为频谱图\n const bufferLength = analyser.frequencyBinCount;\n const freq = new Uint8Array(bufferLength);\n analyser.getByteFrequencyData(freq);\n const avg = freq.reduce((a, b) => a + b) / bufferLength;\n return Math.min(1, avg / 255 * 2.15); // FIXME: more accurate formula\n };\n let flagMusic = null;\n let flagPerfect = NaN;\n let flagGood = NaN;\n let flagBad = NaN;\n let flagEm = '';\n let flagN = false;\n const setFlag = (flag, em, n) => {\n flagEm = em;\n flagN = n;\n return flag;\n };\n return time => {\n const time1 = time * 1.95;\n const bgMusic = hook.tmps.bgMusicHack();\n if (bgMusic && bgMusic !== flagMusic) {\n bgMusic.connect(analyser); // ?\n flagMusic = bgMusic;\n }\n if (time1 < 168) {\n hook.stat.numOfNotes = 305;\n hook.tmps.level = 'lN\\u2002Lv.I2';\n hook.tmps.progress = time1 / 218;\n } else if (time1 < 169) {\n const progress = 1 - (169 - time1) ** 3; // easeCubicOut\n hook.stat.numOfNotes = 305 + 2195 * progress | 0;\n hook.tmps.progress = getFreq();\n } else {\n hook.stat.numOfNotes = 2500;\n hook.tmps.progress = getFreq();\n }\n if (time1 > 325 && time1 < 358) {\n // 监听判定变化\n const statusP = hook.stat.perfect;\n const statusG = hook.stat.good;\n const statusB = hook.stat.bad;\n if (isNaN(flagPerfect)) flagPerfect = statusP;\n if (isNaN(flagGood)) flagGood = statusG;\n if (isNaN(flagBad)) flagBad = statusB;\n if (statusP !== flagPerfect) flagPerfect = setFlag(statusP, '\\uff2f(\\u2267\\u25bd\\u2266)\\uff2f', true);\n else if (statusG !== flagGood) flagGood = setFlag(statusG, '(\\uff3e\\u03c9\\uff3e)', true);\n else if (statusB !== flagBad) flagBad = setFlag(statusB, '(\\u2299\\ufe4f\\u2299;)', true);\n // 监听时间变化\n if (time1 < 327) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (time1 > 334 && time1 < 335) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (time1 > 342 && time1 < 343) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (time1 > 350 && time1 < 351) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (!flagN) flagEm = '(\\u2299ω\\u2299)';\n hook.tmps.combo = flagEm;\n }\n };\n}\nfunction setNoReferrer(handler = () => {}) {\n const meta = Object.assign(document.createElement('meta'), { content: 'no-referrer', name: 'referrer' });\n document.head.appendChild(meta); handler(); meta.remove();\n}\n"],"names":["$","query","document","body","querySelector","flag0","index","t","Date","getDate","getMonth","import","hook","before","set","md5","chartsMD5","get","selectchart","value","console","log","tmps","name","now","analyser","audio","actx","createAnalyser","fftSize","getFreq","bufferLength","frequencyBinCount","freq","Uint8Array","getByteFrequencyData","avg","reduce","a","b","Math","min","flagMusic","flagPerfect","NaN","flagGood","flagBad","flagEm","flagN","setFlag","o","flag","em","n","time","time1","bgMusic","bgMusicHack","connect","stat","numOfNotes","level","progress","statusP","perfect","statusG","good","statusB","bad","isNaN","combo","loadModYukiOri","delete","id","setInterval","clearInterval","tid","addEventListener","uidDemo","Utils","randomUUID","uidLegacy","div","toast","waitForElementById","elem","handler","img","uploader","fireLoad","ImgAny","decodeAlt","xhr","XMLHttpRequest","open","responseType","onprogress","evt","fireProgress","loaded","total","onloadend","createImageBitmap","response","then","s","meta","Object","assign","createElement","content","head","appendChild","remove","setNoReferrer","send","dispatchEvent","Event","location","replace"],"mappings":"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"} \ No newline at end of file +{"version":3,"file":"index-9a6dbbb3.js","sources":["../src/plugins/demo/index.js"],"sourcesContent":["import { ImgAny } from '../../utils/ImageTools';\nimport { waitForElementById } from '../../utils/waitForElementById';\nconst $ = query => document.body.querySelector(query);\nconst flag0 = 'flag{\\x71w\\x71}';\nexport default function() {\n (function() {\n const t = new Date();\n if (t.getDate() !== 1 || t.getMonth() !== 3) return;\n import('./reverse.js');\n }());\n hook.before.set(flag0, () => {\n const md5 = hook.chartsMD5.get(hook.selectchart.value);\n console.log(hook.tmps.name);\n if (md5 === 'ab9d2cc3eb569236ead459ad4caba109') hook.now.set(flag0, loadModYukiOri());\n else hook.now.delete(flag0);\n });\n const id = setInterval(() => {\n if (!$('.title>small')) return;\n clearInterval(id);\n let tid = 3;\n $('.title>small').addEventListener('click', () => {\n if (--tid) return;\n const uidDemo = Utils.randomUUID();\n const uidLegacy = Utils.randomUUID();\n const div = hook.toast(`Demo

Legacy`);\n waitForElementById(uidDemo, elem => {\n elem.addEventListener('click', () => {\n const handler = img => hook.uploader.fireLoad({ name: 'demo.zip' }, ImgAny.decodeAlt(img));\n const xhr = new XMLHttpRequest();\n xhr.open('GET', '//i0.hdslb.com/bfs/music/1682346166.jpg', true);\n xhr.responseType = 'blob';\n xhr.onprogress = evt => hook.uploader.fireProgress(evt.loaded, evt.total);\n xhr.onloadend = () => createImageBitmap(xhr.response).then(handler);\n setNoReferrer(() => xhr.send());\n div.dispatchEvent(new Event('custom-done'));\n });\n });\n waitForElementById(uidLegacy, elem => {\n elem.addEventListener('click', () => {\n location.replace('/sim-phi-legacy');\n div.dispatchEvent(new Event('custom-done'));\n });\n });\n });\n }, 500);\n}\nfunction loadModYukiOri() {\n console.log('好耶');\n const analyser = hook.audio.actx.createAnalyser();\n analyser.fftSize = 4096;\n // analyser.minDecibels = -180;\n const getFreq = () => {\n // progress变为频谱图\n const bufferLength = analyser.frequencyBinCount;\n const freq = new Uint8Array(bufferLength);\n analyser.getByteFrequencyData(freq);\n const avg = freq.reduce((a, b) => a + b) / bufferLength;\n return Math.min(1, avg / 255 * 2.15); // FIXME: more accurate formula\n };\n let flagMusic = null;\n let flagPerfect = NaN;\n let flagGood = NaN;\n let flagBad = NaN;\n let flagEm = '';\n let flagN = false;\n const setFlag = (flag, em, n) => {\n flagEm = em;\n flagN = n;\n return flag;\n };\n return time => {\n const time1 = time * 1.95;\n const bgMusic = hook.tmps.bgMusicHack();\n if (bgMusic && bgMusic !== flagMusic) {\n bgMusic.connect(analyser); // ?\n flagMusic = bgMusic;\n }\n if (time1 < 168) {\n hook.stat.numOfNotes = 305;\n hook.tmps.level = 'lN\\u2002Lv.I2';\n hook.tmps.progress = time1 / 218;\n } else if (time1 < 169) {\n const progress = 1 - (169 - time1) ** 3; // easeCubicOut\n hook.stat.numOfNotes = 305 + 2195 * progress | 0;\n hook.tmps.progress = getFreq();\n } else {\n hook.stat.numOfNotes = 2500;\n hook.tmps.progress = getFreq();\n }\n if (time1 > 325 && time1 < 358) {\n // 监听判定变化\n const statusP = hook.stat.perfect;\n const statusG = hook.stat.good;\n const statusB = hook.stat.bad;\n if (isNaN(flagPerfect)) flagPerfect = statusP;\n if (isNaN(flagGood)) flagGood = statusG;\n if (isNaN(flagBad)) flagBad = statusB;\n if (statusP !== flagPerfect) flagPerfect = setFlag(statusP, '\\uff2f(\\u2267\\u25bd\\u2266)\\uff2f', true);\n else if (statusG !== flagGood) flagGood = setFlag(statusG, '(\\uff3e\\u03c9\\uff3e)', true);\n else if (statusB !== flagBad) flagBad = setFlag(statusB, '(\\u2299\\ufe4f\\u2299;)', true);\n // 监听时间变化\n if (time1 < 327) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (time1 > 334 && time1 < 335) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (time1 > 342 && time1 < 343) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (time1 > 350 && time1 < 351) setFlag(null, '(\\u2299o\\u2299)', false);\n else if (!flagN) flagEm = '(\\u2299ω\\u2299)';\n hook.tmps.combo = flagEm;\n }\n };\n}\nfunction setNoReferrer(handler = () => {}) {\n const meta = Object.assign(document.createElement('meta'), { content: 'no-referrer', name: 'referrer' });\n document.head.appendChild(meta); handler(); meta.remove();\n}\n"],"names":["$","query","document","body","querySelector","flag0","index","t","Date","getDate","getMonth","import","hook","before","set","md5","chartsMD5","get","selectchart","value","console","log","tmps","name","now","analyser","audio","actx","createAnalyser","fftSize","getFreq","bufferLength","frequencyBinCount","freq","Uint8Array","getByteFrequencyData","avg","reduce","a","b","Math","min","flagMusic","flagPerfect","NaN","flagGood","flagBad","flagEm","flagN","setFlag","o","flag","em","n","time","time1","bgMusic","bgMusicHack","connect","stat","numOfNotes","level","progress","statusP","perfect","statusG","good","statusB","bad","isNaN","combo","loadModYukiOri","delete","id","setInterval","clearInterval","tid","addEventListener","uidDemo","Utils","randomUUID","uidLegacy","div","toast","waitForElementById","elem","handler","img","uploader","fireLoad","ImgAny","decodeAlt","xhr","XMLHttpRequest","open","responseType","onprogress","evt","fireProgress","loaded","total","onloadend","createImageBitmap","response","then","s","meta","Object","assign","createElement","content","head","appendChild","remove","setNoReferrer","send","dispatchEvent","Event","location","replace"],"mappings":"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"} \ No newline at end of file diff --git a/index-55aa2d29.js b/index-c02abc05.js similarity index 99% rename from index-55aa2d29.js rename to index-c02abc05.js index 96feb41..37b3ba7 100644 --- a/index-55aa2d29.js +++ b/index-c02abc05.js @@ -4,5 +4,5 @@ var e=Object.defineProperty,t=(t,s,n)=>(((t,s,n)=>{s in t?e(t,s,{enumerable:!0,c * * @author Feross Aboukhadijeh * @license MIT - */function k(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}!function(){var e=b,t=y.utf8,s=x,n=y.bin,i=function(a,o){a.constructor==String?a=o&&"binary"===o.encoding?n.stringToBytes(a):t.stringToBytes(a):s(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var r=e.bytesToWords(a),l=8*a.length,c=1732584193,h=-271733879,d=-1732584194,f=271733878,u=0;u>>24)|4278255360&(r[u]<<24|r[u]>>>8);r[l>>>5]|=128<>>9<<4)]=l;var m=i._ff,g=i._gg,p=i._hh,v=i._ii;for(u=0;u>>0,h=h+w>>>0,d=d+y>>>0,f=f+x>>>0}return e.endian([c,h,d,f])};i._ff=function(e,t,s,n,i,a,o){var r=e+(t&s|~t&n)+(i>>>0)+o;return(r<>>32-a)+t},i._gg=function(e,t,s,n,i,a,o){var r=e+(t&n|s&~n)+(i>>>0)+o;return(r<>>32-a)+t},i._hh=function(e,t,s,n,i,a,o){var r=e+(t^s^n)+(i>>>0)+o;return(r<>>32-a)+t},i._ii=function(e,t,s,n,i,a,o){var r=e+(s^(t|~n))+(i>>>0)+o;return(r<>>32-a)+t},i._blocksize=16,i._digestsize=16,p.exports=function(t,s){if(null==t)throw new Error("Illegal argument "+t);var a=e.wordsToBytes(i(t,s));return s&&s.asBytes?a:s&&s.asString?n.bytesToString(a):e.bytesToHex(a)}}();const L=u(p.exports);function S(){return new Worker(""+new URL("assets/zip.worker-628ccbfe.js",import.meta.url).href)}class T extends EventTarget{constructor(){super(),t(this,"input"),this.input=Object.assign(document.createElement("input"),{type:"file",accept:"",multiple:!0,onchange:()=>{this.fireChange(this.input.files);for(const e of this.input.files||[]){const t=new FileReader;t.readAsArrayBuffer(e),t.onprogress=e=>this.fireProgress(e.loaded,e.total),t.onload=t=>t.target&&t.target.result instanceof ArrayBuffer&&this.fireLoad(e,t.target.result)}}})}uploadFile(){this.input.webkitdirectory=!1,this.input.click()}uploadDir(){this.input.webkitdirectory=!0,this.input.click()}fireChange(e){return this.dispatchEvent(Object.assign(new Event("change"),{files:e}))}fireProgress(e,t){return this.dispatchEvent(new ProgressEvent("progress",{lengthComputable:!0,loaded:e,total:t}))}fireLoad(e,t){return this.dispatchEvent(Object.assign(new ProgressEvent("load"),{file:e,buffer:t}))}}class E extends EventTarget{constructor({handler:e=(async e=>Promise.resolve(e))}){super(),t(this,"total"),t(this,"worker"),t(this,"handler"),this.worker=null,this.total=0,this.handler=e}read(e){if(!this.worker){this.dispatchEvent(new CustomEvent("loadstart"));const e=new S;e.addEventListener("message",(e=>{(async()=>{const{data:t}=e;this.total=t.total;const s=await this.handler(t.data);this.dispatchEvent(new CustomEvent("read",{detail:s}))})().catch((e=>this.dispatchEvent(new CustomEvent("error",{detail:e}))))})),this.worker=e}this.worker.postMessage(e,[e.buffer])}terminate(){this.worker&&(this.worker.terminate(),this.worker=null)}}const M=[{pattern:/\.(mp3|ogg|wav|mp4|webm|ogv|mpg|mpeg|avi|mov|flv|wmv|mkv)$/i,read:async(e,t,{createAudioBuffer:s}={})=>async function(e,t){const s=document.createElement("video");await new Promise((t=>{s.src=URL.createObjectURL(new Blob([e.buffer])),s.preload="metadata",s.onloadedmetadata=t,s.onerror=t}));const{videoWidth:n,videoHeight:i}=s,a={audio:await t(e.buffer.slice(0)),video:n&&i?s:null};return{type:"media",name:e.name,data:a}}(e,(async e=>"function"==typeof s?s(e):async function(e){const t=new self.AudioContext;return await t.close(),new Promise(((s,n)=>{const i=t.decodeAudioData(e,s,n);i instanceof Promise&&i.then(s,n)})).catch((e=>{throw null!=e?e:new DOMException("Unable to decode audio data","EncodingError")}))}(e)))},{pattern:/\.json$/i,type:"json",read(e){const t=h(e.text,((e,t)=>"number"==typeof t?Math.fround(t):t)),s=`PGS(${t.formatVersion})`;return{type:"chart",name:e.name,md5:L(e.text),data:t,format:s}}},{pattern:/\.(png|jpg|jpeg|gif|bmp|webp|svg)$/i,async read(e){const t=new Blob([e.buffer]),s=await createImageBitmap(t);return{type:"image",name:e.name,data:s}}},{pattern:/^line\.csv$/i,type:"text",mustMatch:!0,read:(e,t)=>({type:"line",data:f(l(e.text,!0),t)})},{pattern:/^info\.csv$/i,type:"text",mustMatch:!0,read:(e,t)=>({type:"info",data:d(l(e.text,!0),t)})}],C=function(e){const t=M.map(e);return{async read(e,s={}){const{name:n,path:i}=function(e){const t=e.lastIndexOf("/");return{name:e.slice(t+1),path:~t?e.slice(0,t):""}}(e.name),a=t.filter((e=>e.pattern.test(n)||!e.mustMatch));a.sort(((e,t)=>e.pattern.test(n)&&!t.pattern.test(n)?-1:!e.pattern.test(n)&&t.pattern.test(n)?1:e.weight>t.weight?-1:e.weight{e.pattern.test(n)&&o.push(t)};for(const t of a)try{const n=await t.read(e,i,s);if(n)return n}catch(e){r(t,e)}return{type:"unknown",name:n,data:t[0].pattern.test(n)?o:""}},use(s){if(Array.isArray(s))for(const e of s)this.use(e);else t.push(e(s))}}}((function(e){const{pattern:t,type:s="binary",mustMatch:n=!1,weight:i=0,read:a}=e,o={pattern:t,type:s,mustMatch:n,weight:i,read:a};return"text"===s&&(o.read=async(e,t)=>{if(null==e.isText)try{e.text=c(e.buffer),e.isText=!0}catch{e.isText=!1}return e.isText?a(e,t):null}),"json"===s&&(o.read=async(e,t)=>{if(null==e.isText)try{e.text=c(e.buffer),e.isText=!0}catch{e.isText=!1}if(null==e.isJSON)try{e.data=JSON.parse(e.text),e.isJSON=!0}catch{e.isJSON=!1}return e.isJSON?a(e,t):null}),o}));var A;(e=>{e.int=function(e){return 0|Number(e)},e.float=function(e){return Number(e)||0},e.bool=function(e){return!!e},e.str=function(e){return String(e)},e.arr=function(e,t){return Array.isArray(e)?e.map((e=>new t(e||{}))):[]}})(A||(A={}));class I{constructor(e){t(this,"startTime"),t(this,"endTime"),t(this,"value"),t(this,"floorPosition"),t(this,"floorPosition2"),this.startTime=A.int(e.startTime),this.endTime=A.int(e.endTime),this.value=A.float(e.value),this.floorPosition=A.float(e.floorPosition),this.floorPosition2=A.float(e.floorPosition2)}}class B{constructor(e){t(this,"type"),t(this,"time"),t(this,"positionX"),t(this,"holdTime"),t(this,"speed"),t(this,"floorPosition"),this.type=A.int(e.type),this.time=A.int(e.time),this.positionX=A.float(e.positionX),this.holdTime=A.int(e.holdTime),this.speed=A.float(e.speed),this.floorPosition=A.float(e.floorPosition)}}class R{constructor(e){t(this,"startTime"),t(this,"endTime"),t(this,"start"),t(this,"end"),t(this,"start2"),t(this,"end2"),this.startTime=A.int(e.startTime),this.endTime=A.int(e.endTime),this.start=A.float(e.start),this.end=A.float(e.end),this.start2=A.float(e.start2),this.end2=A.float(e.end2)}}class P{constructor(e){t(this,"numOfNotes"),t(this,"numOfNotesAbove"),t(this,"numOfNotesBelow"),t(this,"bpm"),t(this,"speedEvents"),t(this,"notesAbove"),t(this,"notesBelow"),t(this,"judgeLineDisappearEvents"),t(this,"judgeLineMoveEvents"),t(this,"judgeLineRotateEvents"),this.numOfNotes=A.int(e.numOfNotes),this.numOfNotesAbove=A.int(e.numOfNotesAbove),this.numOfNotesBelow=A.int(e.numOfNotesBelow),this.bpm=A.float(e.bpm),this.speedEvents=A.arr(e.speedEvents,I),this.notesAbove=A.arr(e.notesAbove,B),this.notesBelow=A.arr(e.notesBelow,B),this.judgeLineDisappearEvents=A.arr(e.judgeLineDisappearEvents,R),this.judgeLineMoveEvents=A.arr(e.judgeLineMoveEvents,R),this.judgeLineRotateEvents=A.arr(e.judgeLineRotateEvents,R)}}class F{constructor(e){t(this,"formatVersion"),t(this,"offset"),t(this,"numOfNotes"),t(this,"judgeLineList"),this.formatVersion=A.int(e.formatVersion),this.offset=A.float(e.offset),this.numOfNotes=A.int(e.numOfNotes),this.judgeLineList=A.arr(e.judgeLineList,P)}}function D(e){const t=e.map((e=>new R(e)));if(!t.length)return[new R({startTime:-999999,endTime:1e9})];const s=[new R({startTime:-999999,endTime:0,start:t[0].start,end:t[0].start,start2:t[0].start2,end2:t[0].start2})];t.push(new R({startTime:t[t.length-1].endTime,endTime:1e9,start:t[t.length-1].end,end:t[t.length-1].end,start2:t[t.length-1].end2,end2:t[t.length-1].end2}));for(const e of t){if(e.startTime>e.endTime)continue;const t=s[s.length-1];t.endTime>e.endTime||(t.endTime===e.startTime?s.push(e):t.endTimee.startTime&&s.push(new R({startTime:t.endTime,endTime:e.endTime,start:(e.start*(e.endTime-t.endTime)+e.end*(t.endTime-e.startTime))/(e.endTime-e.startTime),end:t.end,start2:(e.start2*(e.endTime-t.endTime)+e.end2*(t.endTime-e.startTime))/(e.endTime-e.startTime),end2:t.end2})))}const n=[s.shift()];for(const e of s){const t=n[n.length-1],s=t.endTime-t.startTime,i=e.endTime-e.startTime;e.startTime===e.endTime||(t.end===e.start&&t.end2===e.start2&&(t.end-t.start)*i==(e.end-e.start)*s&&(t.end2-t.start2)*i==(e.end2-e.start2)*s?(t.endTime=e.endTime,t.end=e.end,t.end2=e.end2):n.push(e))}return n}function N(e){const t=[];for(const s of e){const e=t[t.length-1];(null==e?void 0:e.value)===s.value?e.endTime=s.endTime:t.push(s)}return t}class j{constructor(e,s,n,i){t(this,"type"),t(this,"id"),t(this,"offsetX"),t(this,"offsetY"),t(this,"isActive"),t(this,"isTapped"),t(this,"isMoving"),t(this,"lastDeltaX"),t(this,"lastDeltaY"),t(this,"nowDeltaX"),t(this,"nowDeltaY"),t(this,"deltaTime"),t(this,"currentTime"),t(this,"flicking"),t(this,"flicked"),this.type=e,this.id=s,this.offsetX=n,this.offsetY=i,this.isActive=!0,this.isTapped=!1,this.isMoving=!1,this.lastDeltaX=0,this.lastDeltaY=0,this.nowDeltaX=0,this.nowDeltaY=0,this.deltaTime=0,this.currentTime=performance.now(),this.flicking=!1,this.flicked=!1}move(e,t){this.lastDeltaX=this.nowDeltaX,this.lastDeltaY=this.nowDeltaY,this.nowDeltaX=e-this.offsetX,this.nowDeltaY=t-this.offsetY,this.offsetX=e,this.offsetY=t;const s=performance.now();this.deltaTime=s-this.currentTime,this.currentTime=s,this.isMoving=!0;const n=(this.nowDeltaX*this.lastDeltaX+this.nowDeltaY*this.lastDeltaY)/Math.sqrt(this.lastDeltaX**2+this.lastDeltaY**2)/this.deltaTime;this.flicking&&n<.5?(this.flicking=!1,this.flicked=!1):!this.flicking&&n>1&&(this.flicking=!0)}}class O{constructor(e,s,n,i){t(this,"offsetX"),t(this,"offsetY"),t(this,"type"),t(this,"judged"),t(this,"event"),t(this,"preventBad"),this.offsetX=e,this.offsetY=s,this.type=0|n,this.judged=!1,this.event=i,this.preventBad=!1}}class H{constructor(){t(this,"level"),t(this,"noteRank"),t(this,"combos"),t(this,"maxcombo"),t(this,"combo"),t(this,"cumDisp"),t(this,"curDisp"),t(this,"numDisp"),t(this,"numOfNotes"),t(this,"data"),t(this,"id"),t(this,"format"),this.level=0,this.noteRank=[0,0,0,0,0,0,0,0],this.combos=[0,0,0,0,0],this.cumDisp=0,this.curDisp=0,this.numDisp=0,this.maxcombo=0,this.combo=0,this.numOfNotes=0,this.data={},this.id="",this.format=""}get good(){return this.noteRank[7]+this.noteRank[3]}get bad(){return this.noteRank[6]+this.noteRank[2]}get great(){return this.noteRank[5]+this.noteRank[1]}get perfect(){return this.noteRank[4]+this.great}get all(){return this.perfect+this.good+this.bad}get scoreNum(){const e=1e6*(.9*this.perfect+.585*this.good+.1*this.maxcombo)/this.numOfNotes;return isFinite(e)?e:0}get scoreStr(){const e=this.scoreNum.toFixed(0);return"0".repeat(e.length<7?7-e.length:0)+e}get accNum(){const e=(this.perfect+.65*this.good)/this.all;return isFinite(e)?e:1}get accStr(){return`${(100*this.accNum).toFixed(2)}%`}get avgDispStr(){const e=Math.trunc(this.cumDisp/this.numDisp*1e3)||0;return`${e>0?"+":""}${e.toFixed(0)}ms`}get curDispStr(){const e=Math.trunc(1e3*this.curDisp);return`${e>0?"+":""}${e.toFixed(0)}ms`}get lineStatus(){return this.bad?0:this.good?3:1}get rankStatus(){const e=Math.round(this.scoreNum);return e>=1e6?0:e>=96e4?1:e>=92e4?2:e>=88e4?3:e>=82e4?4:e>=7e5?5:6}get localData(){return Math.round(1e4*this.accNum+566).toString(22).slice(-3)+Math.round(this.scoreNum+40672).toString(32).slice(-4)+this.level.toString(36).slice(-1)}static removeLegacy(e){const t=localStorage.getItem("phi");null!=t&&(localStorage.setItem(e,t),localStorage.removeItem("phi"))}getData(e,t=""){const s=this.data[this.id].slice(0,3),n=this.data[this.id].slice(3,7),i=Math.round(1e4*this.accNum+566).toString(22).slice(-3),a=Math.round(this.scoreNum+40672).toString(32).slice(-4),o=this.level.toString(36).slice(-1),r=parseInt(n,32)-40672,l=r.toFixed(0),c="0".repeat(l.length<7?7-l.length:0)+l;e||(this.data[this.id]=(s>i?s:i)+(n>a?n:a)+o);const h=[];for(const[e,t]of Object.entries(this.data))h.push(e+t);localStorage.setItem(`phi-${t}`,h.sort((()=>Math.random()-.5)).join(""));const d={newBestColor:na?"- ":"+ "}${Math.abs(r-Math.round(this.scoreNum))}`,textAboveColor:"#65fe43",textAboveStr:" ( Speed {SPEED}x )",textBelowColor:"#fe4365",textBelowStr:"AUTO PLAY"};return e?Object.assign(d,{newBestColor:"#fff",newBestStr:"BEST",scoreDelta:""}):1===this.lineStatus?Object.assign(d,{textBelowStr:"ALL PERFECT",textBelowColor:"#ffc500"}):3===this.lineStatus?Object.assign(d,{textBelowStr:"FULL COMBO",textBelowColor:"#00bef1"}):Object.assign(d,{textBelowStr:""})}reset(e,t,s,n=""){var i;const a=`phi-${n}`;this.numOfNotes=0|e,this.combo=0,this.maxcombo=0,this.noteRank=[0,0,0,0,0,0,0,0],this.combos=[0,0,0,0,0],this.cumDisp=0,this.curDisp=0,this.numDisp=0,""===n&&H.removeLegacy(a);const o=null!==(i=localStorage.getItem(a))&&void 0!==i?i:(localStorage.setItem(a,""),"");for(let e=0;ethis.maxcombo&&(this.maxcombo=this.combo),this.combos[0]++,this.combos[t]++}addDisp(e){this.curDisp=e,this.cumDisp+=e,this.numDisp++}}function $(e,t,s){const n=document.createElement("canvas");Object.assign(n,{width:e,height:t});const i=n.getContext("2d",s);if(!i)throw new TypeError("Failed to create canvas context");return i}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}var Y,V=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],z=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],U=function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function _(e){const t=$(1,1);return t.fillStyle=e,t.fillRect(0,0,1,1),t.getImageData(0,0,1,1).data}async function q(e,t,s=512){const n=_(t),i=$(e.width,e.height,{willReadFrequently:!0});i.drawImage(e,0,0);for(let t=0;t{e.decode=function(e,t=0){const s=$(e.width-2*t,e.height-2*t);s.drawImage(e,-t,-t);const n=s.getImageData(0,0,s.canvas.width,s.canvas.width),i=new Uint8Array(n.data.length/4*3);for(let e=0;ee^t**2*3473&255;for(let e=0;e{})){return e(this.checkbox,this.container),this}}class Z extends Array{constructor({updateCallback:e=((...e)=>!1),iterateCallback:s=((...e)=>{})}={}){super(),t(this,"update"),t(this,"animate"),this.update=this.defilter.bind(this,e),this.animate=this.iterate.bind(this,s)}defilter(e){let t=this.length;for(;t--;)e(this[t])&&this.splice(t,1);return this}iterate(e){for(const t of this)e(t)}add(e){this[this.length]=e}clear(){this.length=0}}class G{constructor(e,s,n,i){t(this,"offsetX"),t(this,"offsetY"),t(this,"color"),t(this,"text"),t(this,"time"),this.offsetX=e,this.offsetY=s,this.color=n,this.text=i,this.time=0}static tap(e,t){return new G(e,t,"cyan","")}static hold(e,t){return new G(e,t,"lime","")}static move(e,t){return new G(e,t,"violet","")}}class K{constructor(e,s,n,i){t(this,"offsetX"),t(this,"offsetY"),t(this,"time"),t(this,"duration"),t(this,"effects"),t(this,"direction"),t(this,"color");const a=gs.hitFX[n];this.offsetX=e||0,this.offsetY=s||0,this.time=performance.now(),this.duration=a.duration,this.effects=a.effects,this.direction=Array(a.numOfParts||0).fill(0).map((()=>[80*Math.random()+185,2*Math.random()*Math.PI])),this.color=i}static perfect(e,t,s){return new K(e,t,"Perfect","#ffeca0")}static good(e,t,s){return new K(e,t,"Good","#b4e1ff")}}class Q{constructor(e,s,n,i){t(this,"offsetX"),t(this,"offsetY"),t(this,"time"),t(this,"duration"),t(this,"color"),t(this,"text"),this.offsetX=e||0,this.offsetY=s||0,this.time=performance.now(),this.duration=250,this.color=n,this.text=i}static early(e,t){return new Q(e,t,"#03aaf9","Early")}static late(e,t){return new Q(e,t,"#ff4612","Late")}}class ee{constructor(e,s,n=!1){t(this,"full"),t(this,"head"),t(this,"body"),t(this,"tail");const i=-e.width/2*s,a=-e.height/2*s,o=e.width*s,r=e.height*s;this.full=t=>t.drawImage(e,i,a,o,r),this.head=t=>t.drawImage(e,i,0,o,r),this.body=(t,s,n)=>t.drawImage(e,i,s,o,n),this.tail=(t,s)=>t.drawImage(e,i,s-r,o,r),n&&(this.head=t=>t.drawImage(e,i,a,o,r),this.tail=(t,s)=>t.drawImage(e,i,s-r-a,o,r))}}function te(e,t,s){const{width:n,height:i}=e,{width:a,height:o}=t;return a*i>o*n?[a*(1-s)/2,(o-a*i/n*s)/2,a*s,a*i/n*s]:[(a-o*n/i*s)/2,o*(1-s)/2,o*n/i*s,o*s]}class se{constructor(e){t(this,"host"),t(this,"code"),t(this,"name"),t(this,"target"),t(this,"list"),t(this,"updateHTML"),this.host=e.host,this.code=e.code,this.name=e.name,this.target=e.target,this.list=[e],this.updateHTML=()=>{}}appendMessage(e){return this.host===e.host&&this.code===e.code&&this.name===e.name&&this.target===e.target&&(this.list.push(e),this.updateHTML(),!0)}}class ne{constructor(){t(this,"lastMessage",""),t(this,"betterMessageBoxes"),this.betterMessageBoxes=[]}addBox(e="warn"){const t=document.createElement("div");return t.setAttribute("type",e),t.classList.add("msgbox"),this.nodeView.appendChild(t)}removeNodeBox(e){e.remove(),this.updateText(this.lastMessage)}removeBetterMessageBox(e){const t=this.betterMessageBoxes.indexOf(e);-1!==t&&this.betterMessageBoxes.splice(t,1)}msgbox(e="",t="",s=!1){const n=this.addBox(t);n.innerHTML=e;const i=document.createElement("a");i.innerText="忽略",i.style.float="right",i.onclick=()=>this.removeNodeBox(n),i.classList.toggle("disabled",s),n.appendChild(i)}bmsgbox(e){const t=new se(e),s={page:1,size:5,get pages(){return Math.ceil(t.list.length/this.size)}},n=document.createTextNode(""),i=document.createElement("a");i.innerText="全部忽略",i.classList.add("bm-rbtn");const a=document.createElement("span");a.textContent=String(s.page),a.contentEditable="true",a.style.cssText=";color:red;outline:none;text-decoration:underline";const o=document.createElement("span");o.textContent=String(s.pages);const r=document.createElement("a");r.innerText="上一页";const l=document.createElement("a");l.innerText="下一页";const c=document.createElement("div");c.classList.add("bm-item"),c.append(a," / ",o," 页 ",r," ",l);const h=this.addBox(["notice","warn","error"][t.code]);h.append(n,i,c),i.setAttribute("bm-ctrl",""),c.setAttribute("bm-ctrl","");const d=e=>{isNaN(e)||(s.page=Math.max(1,Math.min(e,s.pages))),a.textContent=String(s.page),t.updateHTML()};a.onblur=()=>d(parseInt(a.textContent)),r.onclick=()=>d(s.page-1),l.onclick=()=>d(s.page+1),i.onclick=()=>{this.removeBetterMessageBox(t),this.removeNodeBox(h)};let f=0;return t.updateHTML=()=>{clearTimeout(f),f=self.setTimeout((()=>{const{pages:e}=s;s.page>e&&(s.page=e);const i=(s.page-1)*s.size;n.textContent=`${t.code?`${t.host}: 检测到${t.list.length}个${t.name}\n`:""}来自${t.target}`,a.textContent=String(s.page),o.textContent=String(e);for(const t of h.querySelectorAll("[bm-ctrl]"))t.classList.toggle("hide",e<=1);for(const e of h.querySelectorAll("[bm-cell]"))e.remove();for(const e of t.list.slice(i,i+s.size)){const s=document.createElement("a");s.innerText="忽略",s.classList.add("bm-rbtn"),s.onclick=()=>{t.list.splice(t.list.indexOf(e),1),t.updateHTML(),0===t.list.length?(this.removeBetterMessageBox(t),this.removeNodeBox(h)):this.updateText(this.lastMessage)};const n=document.createElement("div");n.setAttribute("bm-cell",""),n.classList.add("bm-item"),n.append(`${e.name}: ${e.message}`,s),h.appendChild(n)}}))},this.betterMessageBoxes.push(t),t}getBetterMessageBox(e){for(const t of this.betterMessageBoxes)if(t.appendMessage(e))return t;return this.bmsgbox(e)}updateText(e="",t=""){const s=this.nodeView.querySelectorAll(".msgbox[type=warn]").length+this.betterMessageBoxes.reduce(((e,t)=>e+t.list.length-1),0);"error"===t?(this.nodeText.className="error",this.nodeText.innerText=e):(this.nodeText.className=s?"warning":"accept",this.nodeText.innerText=e+(s?`(发现${s}个问题,点击查看)`:""),this.lastMessage=e)}sendWarning(e="",t=!1){"string"==typeof e?this.msgbox(t?e:Utils.escapeHTML(e),"warn"):this.getBetterMessageBox(e).updateHTML(),this.updateText(this.lastMessage)}sendError(e="",t="",s=!1){if(t){const e=/([A-Za-z][A-Za-z+-.]{2,}:\/\/|www\.)[^\s\x00-\x20\x7f-\x9f"]{2,}[^\s\x00-\x20\x7f-\x9f"!'),.:;?\]}]/g,n=t.replace(e,((e="")=>{const t=e.startsWith("www.")?`//${e}`:e,s=e.replace(`${location.origin}/`,"");return e.includes(location.origin)?`${s}`:`${s}`}));this.msgbox(n,"error",s)}this.updateText(e,"error")}}self._i=["Phixos","1.5.4.1".split("."),1611795955,1696489055];const ie=e=>document.getElementById(e)||(()=>{throw new Error(`Cannot find element: ${e}`)})(),ae=e=>document.body.querySelector(e),oe=ie("view-nav"),re=ie("view-cfg"),le=ie("view-msg"),ce=ie("cover-dark"),he=ie("cover-rsmg"),de=ie("cover-view"),fe=ie("btn-rsmg"),ue=ie("btn-docs"),me=ie("btn-more"),ge=ie("nav-cfg"),pe=ie("nav-msg"),ve=ie("msg-out"),be=ie("uploader"),we=ie("stage"),ye=ie("select-note-scale"),xe=ie("select-aspect-ratio"),ke=ie("select-background-dim"),Le=ie("highLight"),Se=ie("input-offset"),Te=ie("lineColor"),Ee=ie("autoplay"),Me=ie("showTransition"),Ce=ie("feedback"),Ae=ie("imageBlur"),Ie=ie("select-bg"),Be=ie("btn-play"),Re=ie("btn-pause"),Pe=ie("select-bgm"),Fe=ie("select-chart"),De=ie("select-flip"),Ne=ie("select-speed"),je=ie("input-name"),Oe=ie("input-artist"),He=ie("input-charter"),$e=ie("input-illustrator"),Xe=ie("select-difficulty"),Ye=ie("select-level"),Ve=ie("select-volume"),ze=ie("uploader-select"),Ue=ie("uploader-upload"),_e=ie("uploader-file"),qe=ie("uploader-dir"),We=ie("select"),Je=ie("mask"),Ze=e=>Math.sin(e*Math.PI/2),Ge=e=>1+(e-1)**3,Ke=(e=0)=>`${Math.floor(e/60)}:${`00${Math.floor(e%60)}`.slice(-2)}`,Qe={modify:e=>e,pressTime:0};Qe.before=new Map,Qe.now=new Map,Qe.after=new Map,Qe.filter=null,Qe.filterOptions={},document.oncontextmenu=e=>e.preventDefault();for(const e of oe.children)e.addEventListener("click",(function(){for(const e of oe.children)e.classList.toggle("active",e===this);re.classList.toggle("hide","nav-cfg"!==this.id),le.classList.toggle("hide","nav-msg"!==this.id)}));ce.addEventListener("click",(()=>{ce.classList.add("fade"),he.classList.add("fade"),de.classList.add("fade")})),fe.addEventListener("click",(()=>{ce.classList.remove("fade"),he.classList.remove("fade")})),ue.addEventListener("click",(()=>{Qe.fireModal("

提示

",'

点击此处查看使用说明

')})),me.addEventListener("click",(()=>{ce.classList.remove("fade"),de.classList.remove("fade"),ge.click()})),ve.addEventListener("click",(()=>{ce.classList.remove("fade"),de.classList.remove("fade"),pe.click()}));const et=new class extends ne{constructor(){super(...arguments),t(this,"nodeView",le),t(this,"nodeText",ve)}},tt=et.updateText.bind(et),st=et.sendWarning.bind(et),nt=et.sendError.bind(et),it=new H,at=new class{constructor(e){t(this,"aspectRatio"),t(this,"isFull"),t(this,"stage"),this.aspectRatio=0,this.isFull=!1,this.stage=e,this.resize()}resize(e=0){this.aspectRatio=e||this.aspectRatio||16/9;const t=self.devicePixelRatio||1,s=Math.min(854,.8*document.body.getBoundingClientRect().width),n=Math.round(s*t),i=n/t,a=Math.ceil(n/this.aspectRatio)/t;this.isFull?this.stage.style.cssText=";position:fixed;top:0;left:0;bottom:0;right:0":this.stage.style.cssText=`;width:${i.toFixed(3)}px;height:${a.toFixed(3)}px`}getFull(){return this.isFull}setFull(e){return this.isFull=e}}(we),ot=new class{constructor(e){if(t(this,"stage"),t(this,"canvas"),t(this,"ctx"),t(this,"canvasfg"),t(this,"ctxfg"),t(this,"wlen"),t(this,"hlen"),t(this,"scaleX"),t(this,"scaleY"),t(this,"width"),t(this,"height"),t(this,"matX"),t(this,"matY"),t(this,"matR"),t(this,"speed"),t(this,"lineScale"),t(this,"noteScale"),t(this,"noteScaleRatio"),t(this,"brightness"),t(this,"multiHint"),t(this,"playMode"),t(this,"musicVolume"),t(this,"soundVolume"),t(this,"enableFR"),t(this,"enableVP"),t(this,"lowResFactor"),t(this,"lines"),t(this,"notes"),t(this,"taps"),t(this,"drags"),t(this,"flicks"),t(this,"holds"),t(this,"linesReversed"),t(this,"notesReversed"),t(this,"tapsReversed"),t(this,"dragsReversed"),t(this,"flicksReversed"),t(this,"holdsReversed"),t(this,"tapholds"),t(this,"chart"),t(this,"bgImage"),t(this,"bgImageBlur"),t(this,"bgMusic"),t(this,"bgVideo"),t(this,"_mirrorType"),t(this,"initialized"),!(e instanceof HTMLDivElement))throw new Error("Not a container");const s=()=>{throw new Error("Failed to initialize canvas")};this.stage=e,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d",{alpha:!1})||s(),this.canvasfg=document.createElement("canvas"),this.ctxfg=this.canvasfg.getContext("2d")||s(),this.stage.appendChild(this.canvas),this.canvas.style.cssText=";position:absolute;top:0px;left:0px;right:0px;bottom:0px",console.log("Hello, Phixos!"),this.speed=1,this.lineScale=57.6,this.noteScale=1,this.noteScaleRatio=8e3,this.brightness=.6,this.multiHint=!0,this.playMode=1,this.musicVolume=1,this.soundVolume=1,this._mirrorType=0,this.enableFR=!1,this.enableVP=!1,this.chart=null,this.bgImage=null,this.bgImageBlur=null,this.bgMusic=null,this.bgVideo=null,this.lines=[],this.notes=[],this.taps=[],this.drags=[],this.flicks=[],this.holds=[],this.linesReversed=[],this.notesReversed=[],this.tapsReversed=[],this.dragsReversed=[],this.flicksReversed=[],this.holdsReversed=[],this.tapholds=[],this.lowResFactor=1,this.width=0,this.height=0,this.wlen=0,this.hlen=0,this.scaleX=0,this.scaleY=0,this.matX=e=>e,this.matY=e=>e,this.matR=e=>e,this.initialized=!1,this._setLowResFactor(1),this.resizeCanvas()}setNoteScale(e=1){this.noteScale=e,this.noteScaleRatio=this.canvasfg.width*this.noteScale/8080}setLowResFactor(e=1){this._setLowResFactor(e),this._resizeCanvas()}resizeCanvas(){const{width:e,height:t}=this.stage.getBoundingClientRect();this.width===e&&this.height===t||(this.width=e,this.height=t,this.canvas.style.cssText+=`;width:${e.toFixed(3)}px;height:${t.toFixed(3)}px`,this._resizeCanvas())}mirrorView(e=this._mirrorType){const t=3&e;this._mirrorType=t,this.transformView(1&t?-1:1,2&t?-1:1,0,0)}transformView(e=1,t=1,s=0,n=0){const{canvasfg:i}=this,a=i.width*e,o=.5*(i.width-a),r=-i.height*t,l=.5*(i.height-r),c=-Math.sign(e*t)*Math.PI/180,h=t>0?0:Math.PI,d=Math.sign(t)*a*.05625,f=Math.sign(t)*-r*.6;this.matX=e=>o+a*(e-s),this.matY=e=>l+r*(e-n),this.matR=e=>h+c*e,this.scaleX=d,this.scaleY=f,this.initialized=!0}prerenderChart(e){this.lines.length=0,this.notes.length=0,this.taps.length=0,this.drags.length=0,this.flicks.length=0,this.holds.length=0,this.tapholds.length=0;const t=new F(e),s={aniStart:1e9,aniEnd:0,hitStart:1e9,hitEnd:0},n=e=>{es.aniEnd&&(s.aniEnd=e)},i=e=>{n(e),es.hitEnd&&(s.hitEnd=e)},a=(e,t)=>{for(const s of e)s.startSeconds=s.startTime/t*1.875,s.endSeconds=s.endTime/t*1.875,s.startTime>-999999&&n(s.startSeconds),s.endTime<1e9&&n(s.endSeconds)},o=(e,t,s,n,a)=>{e.offsetX=0,e.offsetY=0,e.alpha=0,e.seconds=e.time*t,e.holdSeconds=e.holdTime*t,e.maxVisiblePos=(e=>{const t=Math.fround(e);if(!isFinite(t))throw new TypeError("Argument must be a finite number");const s=11718.75,n=t>=s?2**Math.floor(1+Math.log2(t/s)):1,i=t/n+.001,a=Math.fround(i);if(a<=i)return a*n;const o=new Float32Array([i]);return new Uint32Array(o.buffer)[0]+=o[0]<=0?1:-1,o[0]*n})(e.floorPosition),e.time<1e9&&(i(e.seconds),i(e.seconds+e.holdSeconds)),e.line=s,e.lineId=s.lineId,e.noteId=n,e.isAbove=a,e.name=`${s.lineId}${a?"+":"-"}${n}${"?tdhf"[e.type]}`,this.notes.push(e),1===e.type?this.taps.push(e):2===e.type?this.drags.push(e):3===e.type?this.holds.push(e):4===e.type&&this.flicks.push(e),(1===e.type||3===e.type)&&this.tapholds.push(e)},r=(e,t)=>e.seconds-t.seconds||e.lineId-t.lineId||e.noteId-t.noteId;t.judgeLineList.forEach(((e,t)=>e.lineId=t));for(const e of t.judgeLineList)e.bpm*=this.speed,e.offsetX=0,e.offsetY=0,e.alpha=0,e.rotation=0,e.positionY=0,e.positionY2=0,e.speedEvents=N(e.speedEvents),e.judgeLineDisappearEvents=D(e.judgeLineDisappearEvents),e.judgeLineMoveEvents=D(e.judgeLineMoveEvents),e.judgeLineRotateEvents=D(e.judgeLineRotateEvents),e.disappearEventsIndex=0,e.moveEventsIndex=0,e.rotateEventsIndex=0,e.speedEventsIndex=0,a(e.speedEvents,e.bpm),a(e.judgeLineDisappearEvents,e.bpm),a(e.judgeLineMoveEvents,e.bpm),a(e.judgeLineRotateEvents,e.bpm),this.lines.push(e),e.notesAbove.forEach(((t,s)=>o(t,1.875/e.bpm,e,s,!0))),e.notesBelow.forEach(((t,s)=>o(t,1.875/e.bpm,e,s,!1)));this.notes.sort(r),this.taps.sort(r),this.drags.sort(r),this.holds.sort(r),this.flicks.sort(r),this.notesReversed=this.notes.toReversed(),this.tapsReversed=this.taps.toReversed(),this.dragsReversed=this.drags.toReversed(),this.holdsReversed=this.holds.toReversed(),this.flicksReversed=this.flicks.toReversed(),this.linesReversed=this.lines.toReversed(),this.tapholds.sort(r);const l={};for(const e of this.notes)l[e.seconds.toFixed(6)]=l[e.seconds.toFixed(6)]?2:1;for(const e of this.notes)e.isMulti=2===l[e.seconds.toFixed(6)];for(let e=0;e.01)break;t.nearNotes.push(e)}}for(let e=0;e.01)break;t.nearNotes.push(e)}}this.chart=t,this.chart.maxSeconds=s.aniEnd,console.table(s)}seekLineEventIndex(e){if(!this.initialized)throw new Error("Not initialized");for(const t of this.lines)if(t.speedEventsIndex=0,t.disappearEventsIndex=0,t.moveEventsIndex=0,t.rotateEventsIndex=0,null!=e){for(;t.speedEventsIndexn.endSeconds)continue;const i=(e-n.startSeconds)/(n.endSeconds-n.startSeconds);t.alpha=n.start+(n.end-n.start)*i,t.alpha>1&&(t.alpha=1),t.disappearEventsIndex=s;break}for(let s=t.moveEventsIndex,n=t.judgeLineMoveEvents.length;sn.endSeconds)continue;const i=(e-n.startSeconds)/(n.endSeconds-n.startSeconds);t.offsetX=this.matX(n.start+(n.end-n.start)*i),t.offsetY=this.matY(n.start2+(n.end2-n.start2)*i),t.moveEventsIndex=s;break}for(let s=t.rotateEventsIndex,n=t.judgeLineRotateEvents.length;sn.endSeconds)continue;const i=(e-n.startSeconds)/(n.endSeconds-n.startSeconds);t.rotation=this.matR(n.start+(n.end-n.start)*i),t.cosr=Math.cos(t.rotation),t.sinr=Math.sin(t.rotation),t.rotateEventsIndex=s;break}for(let s=t.speedEventsIndex,n=t.speedEvents.length;sn.endSeconds)){t.positionY=(e-n.startSeconds)*this.speed*n.value+(this.enableFR?n.floorPosition2:n.floorPosition),t.positionY2=(e-n.startSeconds)*this.speed*n.value+n.floorPosition2,t.speedEventsIndex=s;break}}const s=s=>3!==s.type?(s.floorPosition-t.positionY)*s.speed:s.secondsnull==e.badTime?s(e):(performance.now()-e.badTime>500&&delete e.badTime,null==e.badY&&(e.badY=s(e)),e.badY),i=(n,i,a)=>{if(n.projectX=t.offsetX+i*n.cosr,n.offsetX=n.projectX+a*n.sinr,n.projectY=t.offsetY+i*n.sinr,n.offsetY=n.projectY-a*n.cosr,n.visible=(n.offsetX-this.wlen)**2+(n.offsetY-this.hlen)**2<(1.23625*this.wlen+this.hlen+this.scaleY*n.holdSeconds*this.speed*n.speed)**2,n.showPoint=!1,null==n.badTime)if(n.seconds>e){n.showPoint=!0;const e=n.maxVisiblePos2||3===n.type&&0===n.speed?0:1}else n.frameCount=null==n.frameCount?0:n.frameCount+1,3===n.type?(n.showPoint=!0,n.alpha=0===n.speed?0:n.status%4==2?.45:1):n.alpha=Math.max(1-(e-n.seconds)/.16,0)};for(const e of t.notesAbove)e.cosr=t.cosr,e.sinr=t.sinr,i(e,this.scaleX*e.positionX,this.scaleY*n(e));for(const e of t.notesBelow)e.cosr=-t.cosr,e.sinr=-t.sinr,i(e,-this.scaleX*e.positionX,this.scaleY*n(e))}}_setLowResFactor(e=1){this.lowResFactor=e}_resizeCanvas(){const{canvas:e,canvasfg:t,width:s,height:n}=this,i=this.lowResFactor*self.devicePixelRatio,a=s*i,o=n*i;e.width=a,e.height=o,t.width=Math.min(a,16*o/9),t.height=o,this.wlen=t.width/2,this.hlen=t.height/2,this.mirrorView(),this.setNoteScale(this.noteScale),this.lineScale=t.width>.75*t.height?t.height/18.75:t.width/14.0625}}(we),{canvas:rt,ctx:lt,canvasfg:ct,ctxfg:ht}=ot;self.addEventListener("resize",(()=>at.resize()));class dt extends EventTarget{constructor(e=""){super(),t(this,"status"),this.status=e}emit(e=""){this.status!==e&&(this.status=e,this.dispatchEvent(new Event("change")))}eq(e=""){return this.status===e}ne(e=""){return this.status!==e}}const ft=new dt("stop"),ut={text:"",list:[],reg(e,t,s){this.list[this.list.length]={toString:()=>s(e)},e.addEventListener(t,this.update.bind(this))},update(){const e=this.list.map(String).filter(Boolean);this.text=0===e.length?"":`(${e.join("+")})`}};let mt="";const gt=new Map,pt=new Map,vt=new Map,bt=new Map,wt=new Map,yt=new Map,xt=[],kt=[];ye.addEventListener("change",(e=>{ot.setNoteScale(Number(e.target.value))})),xe.addEventListener("change",(e=>{at.resize(Number(e.target.value))})),ke.addEventListener("change",(e=>{ot.brightness=Number(e.target.value)})),Le.addEventListener("change",(e=>{ot.multiHint=e.target.checked}));const Lt=new class{constructor(e){t(this,"key"),t(this,"data"),this.key=e,this.data={}}init(e){var t;return this.data=JSON.parse(null!==(t=localStorage.getItem(this.key))&&void 0!==t?t:"{}"),"function"==typeof e&&e(this.data)&&this.reset(),this}save(){localStorage.setItem(this.key,JSON.stringify(this.data))}reset(){this.data={},this.save()}get(e){return this.data[e]}set(e,t){this.data[e]=t,this.save()}reg(e,t,s=!0){if(t instanceof HTMLInputElement||t instanceof HTMLSelectElement){const n="checkbox"===t.type?"checked":"value",i=this.get(e);void 0!==i&&(t[n]=i),t.addEventListener("change",(()=>{this.set(e,t[n])})),s&&t.dispatchEvent(new Event("change"))}else{if(!(t instanceof HTMLTextAreaElement))throw new Error("Node must be ,