├── README.md ├── background.js ├── content.js ├── favicon.png ├── index.css ├── lib ├── chart.js ├── cryptojs.js └── jquery.js ├── logo.webp ├── manifest.json ├── popup.html └── popup.js /README.md: -------------------------------------------------------------------------------- 1 | # crash-extension 2 | bc crash history viewer 3 | 4 | this is the extension that can see bc crash game history. 5 | it works as an extension on the browser. 6 | 7 | it is contributed by the two members for the new badge. -------------------------------------------------------------------------------- /background.js: -------------------------------------------------------------------------------- 1 | chrome.runtime.onInstalled.addListener(() => { 2 | console.log('Extension installed.'); 3 | }); 4 | 5 | chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { 6 | if (message.type === "DATA_SCRAPED") { 7 | console.log("Data received in background script:", message.payload); 8 | 9 | chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { 10 | if (tabs[0]?.id) { 11 | chrome.tabs.sendMessage(tabs[0].id, { type: "DATA_UPDATE" }, (response) => { 12 | if (chrome.runtime.lastError) { 13 | console.error("Error sending message to content script:", chrome.runtime.lastError); 14 | sendResponse({ success: false }); 15 | } else { 16 | // Relay the scraped data to the popup 17 | chrome.runtime.sendMessage({ 18 | type: "DATA_UPDATE", 19 | payload: response?.data || "No data found." 20 | }); 21 | sendResponse({ success: true }); 22 | } 23 | }); 24 | } 25 | }); 26 | 27 | chrome.runtime.sendMessage({ 28 | type: "DATA_UPDATE", 29 | payload: message.payload 30 | }); 31 | sendResponse({ success: true }); 32 | } 33 | }); 34 | 35 | // chrome.storage.onChanged.addListener((changes, namespace) => { 36 | // for (let [hash, { oldValue, newValue }] of Object.entries(changes)) { 37 | // chrome.runtime.sendMessage({ 38 | // type: "DATA_UPDATE", 39 | // payload: newValue 40 | // }); 41 | // console.log( 42 | // `Key "${hash}" changed in ${namespace} storage:`, 43 | // `Old value = ${oldValue}, New value = ${newValue}` 44 | // ); 45 | // } 46 | // }); 47 | 48 | 49 | // Add an event listener to open popup.html in a new tab when the extension icon is clicked 50 | chrome.action.onClicked.addListener((tab) => { 51 | chrome.tabs.create({ url: chrome.runtime.getURL("popup.html") }); 52 | }); 53 | -------------------------------------------------------------------------------- /content.js: -------------------------------------------------------------------------------- 1 | function waitForElement(selector, callback, interval = 100, timeout = 5000) { 2 | const start = Date.now(); 3 | 4 | const checkExist = setInterval(() => { 5 | const element = document.querySelector(selector); 6 | if (element) { 7 | clearInterval(checkExist); 8 | callback(element); 9 | } else if (Date.now() - start > timeout) { 10 | clearInterval(checkExist); 11 | } 12 | }); 13 | } 14 | 15 | function loadLatestHash() { 16 | try { 17 | const element = document.querySelector('.tabs-content table tbody tr td:nth-child(3)'); 18 | if (element) { 19 | const value = element.textContent.trim(); 20 | chrome.storage.local.get(["latestHash"], (result) => { 21 | if (result.latestHash !== value) { 22 | chrome.storage.local.set({ latestHash: value }, () => { 23 | console.log('New value stored:', value); 24 | }); 25 | } 26 | }); 27 | } 28 | } catch (error) { 29 | console.log(error) 30 | } 31 | } 32 | 33 | function captureTableChanged() { 34 | const table = document.querySelector('.tabs-content'); 35 | if (table) { 36 | const observer = new MutationObserver(() => { 37 | try { 38 | loadLatestHash(); 39 | } catch (error) { 40 | console.log(error) 41 | } 42 | }); 43 | observer.observe(table, { childList: true, subtree: true }); 44 | } 45 | } 46 | 47 | function checkHistorySelected() { 48 | waitForElement('.tabs-btn.btn-like:nth-child(2)', (btn) => { 49 | if (!btn.hasAttribute('aria-selected')) { 50 | console.log('history selected') 51 | btn.click(); 52 | } 53 | 54 | waitForElement('.tabs-content table', () => { 55 | loadLatestHash(); 56 | captureTableChanged(); 57 | }); 58 | }); 59 | } 60 | 61 | checkHistorySelected(); -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vector41/crash-extension/bce894f946db8f00b211e57fe1fd7ef7d816dd9c/favicon.png -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0; 7 | } 8 | 9 | ::-webkit-scrollbar { 10 | width: 4px; 11 | height: 2px; 12 | } 13 | 14 | ::-webkit-scrollbar-track { 15 | background: #f1f1f1; 16 | } 17 | 18 | ::-webkit-scrollbar-thumb { 19 | background: #888; 20 | } 21 | 22 | ::-webkit-scrollbar-thumb:hover { 23 | background: #555; 24 | } 25 | 26 | .d-flex { 27 | display: flex; 28 | } 29 | 30 | .w-100 { 31 | width: 100%; 32 | } 33 | 34 | .h-100 { 35 | height: 100%; 36 | } 37 | 38 | .app-container { 39 | padding: 20px; 40 | background-color: #232626; 41 | height: 100vh; 42 | box-sizing: border-box; 43 | overflow: auto; 44 | } 45 | 46 | .app-header { 47 | display: flex; 48 | gap: 10px; 49 | flex-wrap: wrap; 50 | } 51 | 52 | .alert-container { 53 | display: flex; 54 | justify-content: flex-end; 55 | } 56 | 57 | .alert-group { 58 | max-width: 200px; 59 | width: 200px; 60 | border-radius: 10px; 61 | height: 100%; 62 | font-size: 14px; 63 | padding: 10px; 64 | box-sizing: border-box; 65 | } 66 | 67 | .alert-group.golden { 68 | background: #db1b2a; 69 | box-shadow: 0 0 5px 0 #db1b2a; 70 | } 71 | 72 | .alert-group.normal { 73 | background: #1ab379; 74 | box-shadow: 0 0 5px 0 #1ab379; 75 | } 76 | 77 | .alert-group.bad { 78 | background: #8c9710; 79 | box-shadow: 0 0 5px 0 #8c9710; 80 | } 81 | 82 | input { 83 | padding: 0 14px; 84 | border: 1px solid #797979; 85 | font-size: 14px; 86 | outline: none; 87 | color: #fff; 88 | background: none; 89 | border-radius: 5px; 90 | } 91 | 92 | button { 93 | padding: 0 10px; 94 | border: none; 95 | outline: none; 96 | margin: 2px; 97 | border-radius: 5px; 98 | height: 30px; 99 | font-size: 12px; 100 | } 101 | 102 | button:hover { 103 | cursor: pointer; 104 | opacity: 0.8; 105 | } 106 | 107 | .btn-setting { 108 | background: #323738; 109 | color: #fff; 110 | } 111 | 112 | .btn-stable { 113 | background: #525455; 114 | color: #fff; 115 | } 116 | 117 | .btn-verify { 118 | /* background-image: linear-gradient(90deg, rgb(10 185 97), rgb(106 170 66)); 119 | box-shadow: rgb(53 147 100 / 30%) 0px 0px 12px, rgb(41 177 102) 0px -2px inset; */ 120 | /* background-image: linear-gradient(90deg, rgb(10 185 97), rgb(106 170 66)); 121 | box-shadow: rgb(53 147 100 / 30%) 0px 0px 12px, rgb(41 177 102) 0px -2px inset; */ 122 | background: #04aa6d; 123 | } 124 | 125 | .btn-analysis { 126 | /* background-image: linear-gradient(90deg, rgb(10 185 97), rgb(106 170 66)); 127 | box-shadow: rgb(53 147 100 / 30%) 0px 0px 12px, rgb(41 177 102) 0px -2px inset; */ 128 | background: #04aa6d; 129 | } 130 | 131 | .analysis-setting { 132 | display: flex; 133 | align-items: center; 134 | } 135 | 136 | .input-container { 137 | display: flex; 138 | gap: 20px; 139 | } 140 | 141 | .input-container input { 142 | width: 100%; 143 | height: 30px; 144 | font-size: 12px; 145 | } 146 | 147 | .count-container { 148 | display: flex; 149 | justify-content: space-between; 150 | } 151 | 152 | .small-range-chart { 153 | display: flex; 154 | } 155 | 156 | .range-chart { 157 | margin-bottom: 5px; 158 | background: #292d2e; 159 | padding: 10px; 160 | border-radius: 10px; 161 | } 162 | 163 | .main-chart { 164 | margin-bottom: 10px; 165 | background-color: #323738; 166 | padding: 10px; 167 | border-radius: 10px; 168 | } 169 | 170 | .chart-title { 171 | color: #c8c8c8; 172 | margin: 4px; 173 | font-size: 12px; 174 | } 175 | 176 | .game-range-custom { 177 | height: 20px; 178 | font-size: 12px; 179 | padding: 0 10px; 180 | width: 50px; 181 | } 182 | 183 | .game-range-main { 184 | width: 40px; 185 | height: 30px; 186 | font-size: 12px; 187 | } 188 | 189 | .range-analysis { 190 | display: flex; 191 | justify-content: space-evenly; 192 | gap: 20px; 193 | } 194 | 195 | .dot-chart { 196 | width: 100%; 197 | display: flex; 198 | justify-content: flex-end; 199 | gap: 2px; 200 | box-sizing: border-box; 201 | } 202 | 203 | .dot-container { 204 | box-sizing: border-box; 205 | padding: 10px; 206 | background-color: #292d2e; 207 | border-radius: 10px; 208 | margin-bottom: 4px; 209 | } 210 | 211 | .dot-group { 212 | position: relative; 213 | display: flex; 214 | flex-direction: column; 215 | gap: 2px; 216 | } 217 | 218 | .dot-item { 219 | width: 12px; 220 | height: 12px; 221 | /* background: #3a4142; */ 222 | border-radius: 4px; 223 | display: flex; 224 | justify-content: center; 225 | align-items: center; 226 | } 227 | 228 | .dot { 229 | width: 8px; 230 | height: 8px; 231 | border-radius: 50%; 232 | } 233 | 234 | .dot.good { 235 | background-color: #f6c722; 236 | } 237 | 238 | .dot.middle { 239 | background-color: #008000; 240 | } 241 | 242 | .dot.bad { 243 | background-color: #e56000; 244 | } 245 | 246 | .bust-list { 247 | display: flex; 248 | justify-content: flex-end; 249 | gap: 1px; 250 | margin-bottom: 2px; 251 | } 252 | 253 | .bust-item { 254 | height: 18px; 255 | padding: 0 2px; 256 | display: flex; 257 | align-items: center; 258 | border-radius: 2px; 259 | cursor: pointer; 260 | font-size: 11px; 261 | } 262 | 263 | .bust-item.bad { 264 | background-color: #e56000; 265 | } 266 | 267 | .bust-item.middle { 268 | background-color: #008000; 269 | } 270 | 271 | .bust-item.good { 272 | background-color: #f6c722; 273 | } 274 | 275 | .dashboard-container { 276 | max-height: 70px; 277 | display: flex; 278 | align-items: center; 279 | gap: 10px; 280 | padding: 6px 10px; 281 | justify-content: center; 282 | background: #323738; 283 | border-radius: 10px; 284 | } 285 | 286 | span#game_current_combo { 287 | font-size: 40px; 288 | color: #e60606; 289 | font-weight: 500; 290 | } 291 | 292 | .dashboard-item { 293 | height: 24px; 294 | margin: 0 1px; 295 | padding: 0 5px; 296 | background-color: #555555; 297 | display: flex; 298 | justify-content: center; 299 | align-items: center; 300 | border-radius: 5px; 301 | font-size: 12px; 302 | color: #dfdfdf; 303 | gap: 4px; 304 | } 305 | 306 | .dashboard-status { 307 | width: 6px; 308 | height: 6px; 309 | border-radius: 50%; 310 | } 311 | 312 | .dashboard-status.mega { 313 | background: #1b93e9; 314 | } 315 | 316 | .dashboard-status.golden { 317 | background: #f6c722; 318 | } 319 | 320 | .dashboard-status.normal { 321 | background: #008000; 322 | } 323 | 324 | .dashboard-status.bad { 325 | background: #e56000; 326 | } 327 | 328 | .dashboard-item.flag { 329 | background-color: #008000; 330 | } 331 | 332 | .setting-container { 333 | display: flex; 334 | flex-direction: column; 335 | justify-content: space-between; 336 | } 337 | 338 | .alarm-container { 339 | display: flex; 340 | flex-direction: column; 341 | justify-content: center; 342 | gap: 4px; 343 | align-items: center; 344 | padding: 0 12px; 345 | background-color: #323738; 346 | border-radius: 10px; 347 | } 348 | 349 | .alarm-group { 350 | display: flex; 351 | gap: 4px; 352 | } 353 | 354 | .prediction-group { 355 | display: flex; 356 | justify-content: space-evenly; 357 | width: 100%; 358 | gap: 10px; 359 | color: #fff; 360 | } 361 | 362 | .alarm-item { 363 | display: flex; 364 | justify-content: center; 365 | align-items: center; 366 | gap: 4px; 367 | padding: 1px 4px; 368 | background: #494c4f; 369 | border-radius: 4px; 370 | } 371 | 372 | .alarm-number { 373 | font-size: 14px; 374 | color: #cdcdcd; 375 | } 376 | 377 | .alarm-status { 378 | width: 8px; 379 | height: 8px; 380 | border-radius: 50%; 381 | } 382 | 383 | .alarm-status.golden { 384 | background: #f6c722; 385 | } 386 | 387 | .alarm-status.normal { 388 | background: #008000; 389 | } 390 | 391 | .alarm-status.bad { 392 | background: #e56000; 393 | } 394 | 395 | .status-modal { 396 | position: fixed; 397 | z-index: 99; 398 | } 399 | 400 | .status-modal-container { 401 | display: flex; 402 | flex-direction: column; 403 | background: #959595; 404 | font-size: 12px; 405 | padding: 4px 10px; 406 | border-radius: 5px; 407 | box-shadow: 0 0 5px 0 #959595; 408 | } 409 | 410 | span#game_main_analysis, 411 | span#game_range1_analysis, 412 | span#game_range2_analysis { 413 | font-size: 14px; 414 | color: rgb(255, 128, 0); 415 | font-weight: 500; 416 | } 417 | 418 | .danger-modal { 419 | display: none; 420 | position: fixed; 421 | height: 70px; 422 | padding: 10px; 423 | box-sizing: border-box; 424 | width: 300px; 425 | font-size: 14px; 426 | background: #c52400; 427 | border-radius: 10px; 428 | box-shadow: 0 0 5px 0 #c53400; 429 | animation-name: animate; 430 | animation-duration: 2s; 431 | } 432 | 433 | 434 | @keyframes animate { 435 | from { 436 | left: -350px; 437 | } 438 | 439 | to { 440 | left: 20px; 441 | } 442 | } 443 | 444 | @media screen and (max-width: 950px) { 445 | .btn-stable { 446 | display: none; 447 | } 448 | } -------------------------------------------------------------------------------- /lib/cryptojs.js: -------------------------------------------------------------------------------- 1 | !function(t,r){"object"==typeof exports?module.exports=exports=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,r){var e=Object.create||function(){function t(){}return function(r){var e;return t.prototype=r,e=new t,t.prototype=null,e}}(),i={},n=i.lib={},o=n.Base=function(){return{extend:function(t){var r=e(this);return t&&r.mixIn(t),r.hasOwnProperty("init")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=n.WordArray=o.extend({init:function(t,e){t=this.words=t||[],e!=r?this.sigBytes=e:this.sigBytes=4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var r=this.words,e=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;r[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var o=0;o>>2]=e[o>>>2];return this.sigBytes+=n,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8,r.length=t.ceil(e/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(r){for(var e,i=[],n=function(r){var r=r,e=987654321,i=4294967295;return function(){e=36969*(65535&e)+(e>>16)&i,r=18e3*(65535&r)+(r>>16)&i;var n=(e<<16)+r&i;return n/=4294967296,n+=.5,n*(t.random()>.5?1:-1)}},o=0;o>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new s.init(e,r/2)}},h=a.Latin1={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new s.init(e,r)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(r){var e=this._data,i=e.words,n=e.sigBytes,o=this.blockSize,a=4*o,c=n/a;c=r?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var h=c*o,l=t.min(4*h,n);if(h){for(var f=0;f>>6-s%4*2;i[o>>>2]|=(a|c)<<24-o%4*8,o++}return n.create(i,o)}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Base64={stringify:function(t){var r=t.words,e=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255,a=r[o+1>>>2]>>>24-(o+1)%4*8&255,c=r[o+2>>>2]>>>24-(o+2)%4*8&255,h=s<<16|a<<8|c,l=0;l<4&&o+.75*l>>6*(3-l)&63));var f=i.charAt(64);if(f)for(;n.length%4;)n.push(f);return n.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>32-o)+r}function i(t,r,e,i,n,o,s){var a=t+(r&i|e&~i)+n+s;return(a<>>32-o)+r}function n(t,r,e,i,n,o,s){var a=t+(r^e^i)+n+s;return(a<>>32-o)+r}function o(t,r,e,i,n,o,s){var a=t+(e^(r|~i))+n+s;return(a<>>32-o)+r}var s=t,a=s.lib,c=a.WordArray,h=a.Hasher,l=s.algo,f=[];!function(){for(var t=0;t<64;t++)f[t]=4294967296*r.abs(r.sin(t+1))|0}();var u=l.MD5=h.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,r){for(var s=0;s<16;s++){var a=r+s,c=t[a];t[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var h=this._hash.words,l=t[r+0],u=t[r+1],d=t[r+2],v=t[r+3],p=t[r+4],_=t[r+5],y=t[r+6],g=t[r+7],B=t[r+8],w=t[r+9],k=t[r+10],S=t[r+11],m=t[r+12],x=t[r+13],b=t[r+14],H=t[r+15],z=h[0],A=h[1],C=h[2],D=h[3];z=e(z,A,C,D,l,7,f[0]),D=e(D,z,A,C,u,12,f[1]),C=e(C,D,z,A,d,17,f[2]),A=e(A,C,D,z,v,22,f[3]),z=e(z,A,C,D,p,7,f[4]),D=e(D,z,A,C,_,12,f[5]),C=e(C,D,z,A,y,17,f[6]),A=e(A,C,D,z,g,22,f[7]),z=e(z,A,C,D,B,7,f[8]),D=e(D,z,A,C,w,12,f[9]),C=e(C,D,z,A,k,17,f[10]),A=e(A,C,D,z,S,22,f[11]),z=e(z,A,C,D,m,7,f[12]),D=e(D,z,A,C,x,12,f[13]),C=e(C,D,z,A,b,17,f[14]),A=e(A,C,D,z,H,22,f[15]),z=i(z,A,C,D,u,5,f[16]),D=i(D,z,A,C,y,9,f[17]),C=i(C,D,z,A,S,14,f[18]),A=i(A,C,D,z,l,20,f[19]),z=i(z,A,C,D,_,5,f[20]),D=i(D,z,A,C,k,9,f[21]),C=i(C,D,z,A,H,14,f[22]),A=i(A,C,D,z,p,20,f[23]),z=i(z,A,C,D,w,5,f[24]),D=i(D,z,A,C,b,9,f[25]),C=i(C,D,z,A,v,14,f[26]),A=i(A,C,D,z,B,20,f[27]),z=i(z,A,C,D,x,5,f[28]),D=i(D,z,A,C,d,9,f[29]),C=i(C,D,z,A,g,14,f[30]),A=i(A,C,D,z,m,20,f[31]),z=n(z,A,C,D,_,4,f[32]),D=n(D,z,A,C,B,11,f[33]),C=n(C,D,z,A,S,16,f[34]),A=n(A,C,D,z,b,23,f[35]),z=n(z,A,C,D,u,4,f[36]),D=n(D,z,A,C,p,11,f[37]),C=n(C,D,z,A,g,16,f[38]),A=n(A,C,D,z,k,23,f[39]),z=n(z,A,C,D,x,4,f[40]),D=n(D,z,A,C,l,11,f[41]),C=n(C,D,z,A,v,16,f[42]),A=n(A,C,D,z,y,23,f[43]),z=n(z,A,C,D,w,4,f[44]),D=n(D,z,A,C,m,11,f[45]),C=n(C,D,z,A,H,16,f[46]),A=n(A,C,D,z,d,23,f[47]),z=o(z,A,C,D,l,6,f[48]),D=o(D,z,A,C,g,10,f[49]),C=o(C,D,z,A,b,15,f[50]),A=o(A,C,D,z,_,21,f[51]),z=o(z,A,C,D,m,6,f[52]),D=o(D,z,A,C,v,10,f[53]),C=o(C,D,z,A,k,15,f[54]),A=o(A,C,D,z,u,21,f[55]),z=o(z,A,C,D,B,6,f[56]),D=o(D,z,A,C,H,10,f[57]),C=o(C,D,z,A,y,15,f[58]),A=o(A,C,D,z,x,21,f[59]),z=o(z,A,C,D,p,6,f[60]),D=o(D,z,A,C,S,10,f[61]),C=o(C,D,z,A,d,15,f[62]),A=o(A,C,D,z,w,21,f[63]),h[0]=h[0]+z|0,h[1]=h[1]+A|0,h[2]=h[2]+C|0,h[3]=h[3]+D|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32;var o=r.floor(i/4294967296),s=i;e[(n+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e[(n+64>>>9<<4)+14]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,c=a.words,h=0;h<4;h++){var l=c[h];c[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=h.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=h._createHelper(u),s.HmacMD5=h._createHmacHelper(u)}(Math),function(){var r=t,e=r.lib,i=e.WordArray,n=e.Hasher,o=r.algo,s=[],a=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],a=e[3],c=e[4],h=0;h<80;h++){if(h<16)s[h]=0|t[r+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+s[h];f+=h<20?(n&o|~n&a)+1518500249:h<40?(n^o^a)+1859775393:h<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=i,i=f}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+a|0,e[4]=e[4]+c|0},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=Math.floor(e/4294967296),r[(i+64>>>9<<4)+15]=e,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA1=n._createHelper(a),r.HmacSHA1=n._createHmacHelper(a)}(),function(r){var e=t,i=e.lib,n=i.WordArray,o=i.Hasher,s=e.algo,a=[],c=[];!function(){function t(t){for(var e=r.sqrt(t),i=2;i<=e;i++)if(!(t%i))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=e(r.pow(i,.5))),c[n]=e(r.pow(i,1/3)),n++),i++}();var h=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],l=e[5],f=e[6],u=e[7],d=0;d<64;d++){if(d<16)h[d]=0|t[r+d];else{var v=h[d-15],p=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,_=h[d-2],y=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;h[d]=p+h[d-7]+y+h[d-16]}var g=a&l^~a&f,B=i&n^i&o^n&o,w=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),k=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),S=u+k+g+c[d]+h[d],m=w+B;u=f,f=l,l=a,a=s+S|0,s=o,o=n,n=i,i=S+m|0}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+l|0,e[6]=e[6]+f|0,e[7]=e[7]+u|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=r.floor(i/4294967296),e[(n+64>>>9<<4)+15]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),function(){function r(t){return t<<8&4278255360|t>>>8&16711935}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Utf16=o.Utf16BE={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(e,2*r)}};o.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,i=[],o=0;o>>1]|=r(t.charCodeAt(o)<<16-o%2*16);return n.create(i,2*e)}}}(),function(){if("function"==typeof ArrayBuffer){var r=t,e=r.lib,i=e.WordArray,n=i.init,o=i.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,e=[],i=0;i>>2]|=t[i]<<24-i%4*8;n.call(this,e,r)}else n.apply(this,arguments)};o.prototype=i}}(),function(r){function e(t,r,e){return t^r^e}function i(t,r,e){return t&r|~t&e}function n(t,r,e){return(t|~r)^e}function o(t,r,e){return t&e|r&~e}function s(t,r,e){return t^(r|~e)}function a(t,r){return t<>>32-r}var c=t,h=c.lib,l=h.WordArray,f=h.Hasher,u=c.algo,d=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=u.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var c=0;c<16;c++){var h=r+c,l=t[h];t[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var f,u,B,w,k,S,m,x,b,H,z=this._hash.words,A=y.words,C=g.words,D=d.words,R=v.words,E=p.words,M=_.words;S=f=z[0],m=u=z[1],x=B=z[2],b=w=z[3],H=k=z[4];for(var F,c=0;c<80;c+=1)F=f+t[r+D[c]]|0,F+=c<16?e(u,B,w)+A[0]:c<32?i(u,B,w)+A[1]:c<48?n(u,B,w)+A[2]:c<64?o(u,B,w)+A[3]:s(u,B,w)+A[4],F|=0,F=a(F,E[c]),F=F+k|0,f=k,k=w,w=a(B,10),B=u,u=F,F=S+t[r+R[c]]|0,F+=c<16?s(m,x,b)+C[0]:c<32?o(m,x,b)+C[1]:c<48?n(m,x,b)+C[2]:c<64?i(m,x,b)+C[3]:e(m,x,b)+C[4],F|=0,F=a(F,M[c]),F=F+H|0,S=H,H=b,b=a(x,10),x=m,m=F;F=z[1]+B+b|0,z[1]=z[2]+w+H|0,z[2]=z[3]+k+S|0,z[3]=z[4]+f+m|0,z[4]=z[0]+u+x|0,z[0]=F},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t.sigBytes=4*(r.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}});c.RIPEMD160=f._createHelper(B),c.HmacRIPEMD160=f._createHmacHelper(B)}(Math),function(){var r=t,e=r.lib,i=e.Base,n=r.enc,o=n.Utf8,s=r.algo;s.HMAC=i.extend({init:function(t,r){t=this._hasher=new t.init,"string"==typeof r&&(r=o.parse(r));var e=t.blockSize,i=4*e;r.sigBytes>i&&(r=t.finalize(r)),r.clamp();for(var n=this._oKey=r.clone(),s=this._iKey=r.clone(),a=n.words,c=s.words,h=0;h>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=e[n];a.high^=s,a.low^=o}for(var c=0;c<24;c++){for(var d=0;d<5;d++){for(var v=0,p=0,_=0;_<5;_++){var a=e[d+5*_];v^=a.high,p^=a.low}var y=u[d];y.high=v,y.low=p}for(var d=0;d<5;d++)for(var g=u[(d+4)%5],B=u[(d+1)%5],w=B.high,k=B.low,v=g.high^(w<<1|k>>>31),p=g.low^(k<<1|w>>>31),_=0;_<5;_++){var a=e[d+5*_];a.high^=v,a.low^=p}for(var S=1;S<25;S++){var a=e[S],m=a.high,x=a.low,b=h[S];if(b<32)var v=m<>>32-b,p=x<>>32-b;else var v=x<>>64-b,p=m<>>64-b;var H=u[l[S]];H.high=v,H.low=p}var z=u[0],A=e[0];z.high=A.high,z.low=A.low;for(var d=0;d<5;d++)for(var _=0;_<5;_++){var S=d+5*_,a=e[S],C=u[S],D=u[(d+1)%5+5*_],R=u[(d+2)%5+5*_];a.high=C.high^~D.high&R.high,a.low=C.low^~D.low&R.low}var a=e[0],E=f[c];a.high^=E.high,a.low^=E.low}},_doFinalize:function(){var t=this._data,e=t.words,i=(8*this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;e[i>>>5]|=1<<24-i%32,e[(r.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,h=[],l=0;l>>24)|4278255360&(u<<24|u>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),h.push(d),h.push(u)}return new n.init(h,a)},clone:function(){for(var t=o.clone.call(this),r=t._state=this._state.slice(0),e=0;e<25;e++)r[e]=r[e].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),function(){function r(){return s.create.apply(s,arguments)}var e=t,i=e.lib,n=i.Hasher,o=e.x64,s=o.Word,a=o.WordArray,c=e.algo,h=[r(1116352408,3609767458),r(1899447441,602891725),r(3049323471,3964484399),r(3921009573,2173295548),r(961987163,4081628472),r(1508970993,3053834265),r(2453635748,2937671579),r(2870763221,3664609560),r(3624381080,2734883394),r(310598401,1164996542),r(607225278,1323610764),r(1426881987,3590304994),r(1925078388,4068182383),r(2162078206,991336113),r(2614888103,633803317),r(3248222580,3479774868),r(3835390401,2666613458),r(4022224774,944711139),r(264347078,2341262773),r(604807628,2007800933),r(770255983,1495990901),r(1249150122,1856431235),r(1555081692,3175218132),r(1996064986,2198950837),r(2554220882,3999719339),r(2821834349,766784016),r(2952996808,2566594879),r(3210313671,3203337956),r(3336571891,1034457026),r(3584528711,2466948901),r(113926993,3758326383),r(338241895,168717936),r(666307205,1188179964),r(773529912,1546045734),r(1294757372,1522805485),r(1396182291,2643833823),r(1695183700,2343527390),r(1986661051,1014477480),r(2177026350,1206759142),r(2456956037,344077627),r(2730485921,1290863460),r(2820302411,3158454273),r(3259730800,3505952657),r(3345764771,106217008),r(3516065817,3606008344),r(3600352804,1432725776),r(4094571909,1467031594),r(275423344,851169720),r(430227734,3100823752),r(506948616,1363258195),r(659060556,3750685593),r(883997877,3785050280),r(958139571,3318307427),r(1322822218,3812723403),r(1537002063,2003034995),r(1747873779,3602036899),r(1955562222,1575990012),r(2024104815,1125592928),r(2227730452,2716904306),r(2361852424,442776044),r(2428436474,593698344),r(2756734187,3733110249),r(3204031479,2999351573),r(3329325298,3815920427),r(3391569614,3928383900),r(3515267271,566280711),r(3940187606,3454069534),r(4118630271,4000239992),r(116418474,1914138554),r(174292421,2731055270),r(289380356,3203993006),r(460393269,320620315),r(685471733,587496836),r(852142971,1086792851),r(1017036298,365543100),r(1126000580,2618297676),r(1288033470,3409855158),r(1501505948,4234509866),r(1607167915,987167468),r(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=r()}();var f=c.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],c=e[5],f=e[6],u=e[7],d=i.high,v=i.low,p=n.high,_=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=a.high,S=a.low,m=c.high,x=c.low,b=f.high,H=f.low,z=u.high,A=u.low,C=d,D=v,R=p,E=_,M=y,F=g,P=B,W=w,O=k,U=S,I=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var Z=l[T];if(T<16)var q=Z.high=0|t[r+2*T],G=Z.low=0|t[r+2*T+1];else{var J=l[T-15],$=J.high,Q=J.low,V=($>>>1|Q<<31)^($>>>8|Q<<24)^$>>>7,Y=(Q>>>1|$<<31)^(Q>>>8|$<<24)^(Q>>>7|$<<25),tt=l[T-2],rt=tt.high,et=tt.low,it=(rt>>>19|et<<13)^(rt<<3|et>>>29)^rt>>>6,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^(et>>>6|rt<<26),ot=l[T-7],st=ot.high,at=ot.low,ct=l[T-16],ht=ct.high,lt=ct.low,G=Y+at,q=V+st+(G>>>0>>0?1:0),G=G+nt,q=q+it+(G>>>0>>0?1:0),G=G+lt,q=q+ht+(G>>>0>>0?1:0);Z.high=q,Z.low=G}var ft=O&I^~O&X,ut=U&K^~U&L,dt=C&R^C&M^R&M,vt=D&E^D&F^E&F,pt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),_t=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),yt=(O>>>14|U<<18)^(O>>>18|U<<14)^(O<<23|U>>>9),gt=(U>>>14|O<<18)^(U>>>18|O<<14)^(U<<23|O>>>9),Bt=h[T],wt=Bt.high,kt=Bt.low,St=N+gt,mt=j+yt+(St>>>0>>0?1:0),St=St+ut,mt=mt+ft+(St>>>0>>0?1:0),St=St+kt,mt=mt+wt+(St>>>0>>0?1:0),St=St+G,mt=mt+q+(St>>>0>>0?1:0),xt=_t+vt,bt=pt+dt+(xt>>>0<_t>>>0?1:0);j=X,N=L,X=I,L=K,I=O,K=U,U=W+St|0,O=P+mt+(U>>>0>>0?1:0)|0,P=M,W=F,M=R,F=E,R=C,E=D,D=St+xt|0,C=mt+bt+(D>>>0>>0?1:0)|0}v=i.low=v+D,i.high=d+C+(v>>>0>>0?1:0),_=n.low=_+E,n.high=p+R+(_>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=a.low=S+U,a.high=k+O+(S>>>0>>0?1:0),x=c.low=x+K,c.high=m+I+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=u.low=A+N,u.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+128>>>10<<5)+30]=Math.floor(e/4294967296),r[(i+128>>>10<<5)+31]=e,t.sigBytes=4*r.length,this._process();var n=this._hash.toX32();return n},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(f),e.HmacSHA512=n._createHmacHelper(f)}(),function(){var r=t,e=r.x64,i=e.Word,n=e.WordArray,o=r.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}});r.SHA384=s._createHelper(a),r.HmacSHA384=s._createHmacHelper(a)}(),t.lib.Cipher||function(r){var e=t,i=e.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=e.enc,c=(a.Utf8,a.Base64),h=e.algo,l=h.EvpKDF,f=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(t,r){return this.create(this._ENC_XFORM_MODE,t,r)},createDecryptor:function(t,r){return this.create(this._DEC_XFORM_MODE,t,r)},init:function(t,r,e){this.cfg=this.cfg.extend(e),this._xformMode=t,this._key=r,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var r=this._doFinalize();return r},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?m:w}return function(r){return{encrypt:function(e,i,n){return t(i).encrypt(r,e,i,n)},decrypt:function(e,i,n){return t(i).decrypt(r,e,i,n)}}}}()}),u=(i.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),e.mode={}),d=i.BlockCipherMode=n.extend({createEncryptor:function(t,r){return this.Encryptor.create(t,r)},createDecryptor:function(t,r){return this.Decryptor.create(t,r)},init:function(t,r){this._cipher=t,this._iv=r}}),v=u.CBC=function(){function t(t,e,i){var n=this._iv;if(n){var o=n;this._iv=r}else var o=this._prevBlock;for(var s=0;s>>2];t.sigBytes-=r}},y=(i.BlockCipher=f.extend({cfg:f.cfg.extend({mode:v,padding:_}),reset:function(){f.reset.call(this);var t=this.cfg,r=t.iv,e=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=e.createEncryptor;else{var i=e.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,r&&r.words):(this._mode=i.call(e,this,r&&r.words),this._mode.__creator=i)},_doProcessBlock:function(t,r){this._mode.processBlock(t,r)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var r=this._process(!0)}else{var r=this._process(!0);t.unpad(r)}return r},blockSize:4}),i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=e.format={},B=g.OpenSSL={stringify:function(t){var r=t.ciphertext,e=t.salt;if(e)var i=o.create([1398893684,1701076831]).concat(e).concat(r);else var i=r;return i.toString(c)},parse:function(t){var r=c.parse(t),e=r.words;if(1398893684==e[0]&&1701076831==e[1]){var i=o.create(e.slice(2,4));e.splice(0,4),r.sigBytes-=16}return y.create({ciphertext:r,salt:i})}},w=i.SerializableCipher=n.extend({cfg:n.extend({format:B}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=t.createEncryptor(e,i),o=n.finalize(r),s=n.cfg;return y.create({ciphertext:o,key:e,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=t.createDecryptor(e,i).finalize(r.ciphertext);return n},_parse:function(t,r){return"string"==typeof t?r.parse(t,this):t}}),k=e.kdf={},S=k.OpenSSL={execute:function(t,r,e,i){i||(i=o.random(8));var n=l.create({keySize:r+e}).compute(t,i),s=o.create(n.words.slice(r),4*e);return n.sigBytes=4*r,y.create({key:n,iv:s,salt:i})}},m=i.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=i.kdf.execute(e,t.keySize,t.ivSize);i.iv=n.iv;var o=w.encrypt.call(this,t,r,n.key,i);return o.mixIn(n),o},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=i.kdf.execute(e,t.keySize,t.ivSize,r.salt);i.iv=n.iv;var o=w.decrypt.call(this,t,r,n.key,i);return o}})}(),t.mode.CFB=function(){function r(t,r,e,i){var n=this._iv;if(n){var o=n.slice(0);this._iv=void 0}else var o=this._prevBlock;i.encryptBlock(o,0);for(var s=0;s>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso10126={pad:function(r,e){var i=4*e,n=i-r.sigBytes%i;r.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1))},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso97971={pad:function(r,e){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,e)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),e.encryptBlock(o,0);for(var s=0;s>>8^255&n^99,o[e]=n,s[n]=e;var p=t[e],_=t[p],y=t[_],g=257*t[n]^16843008*n;a[e]=g<<24|g>>>8,c[e]=g<<16|g>>>16,h[e]=g<<8|g>>>24,l[e]=g;var g=16843009*y^65537*_^257*p^16843008*e;f[n]=g<<24|g>>>8,u[n]=g<<16|g>>>16,d[n]=g<<8|g>>>24,v[n]=g,e?(e=p^t[t[t[y^p]]],i^=t[t[i]]):e=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],_=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,r=t.words,e=t.sigBytes/4,i=this._nRounds=e+6,n=4*(i+1),s=this._keySchedule=[],a=0;a6&&a%e==4&&(c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c]):(c=c<<8|c>>>24,c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c],c^=p[a/e|0]<<24),s[a]=s[a-e]^c}for(var h=this._invKeySchedule=[],l=0;l>>24]]^u[o[c>>>16&255]]^d[o[c>>>8&255]]^v[o[255&c]]}}},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._keySchedule,a,c,h,l,o)},decryptBlock:function(t,r){var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e,this._doCryptBlock(t,r,this._invKeySchedule,f,u,d,v,s);var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e},_doCryptBlock:function(t,r,e,i,n,o,s,a){for(var c=this._nRounds,h=t[r]^e[0],l=t[r+1]^e[1],f=t[r+2]^e[2],u=t[r+3]^e[3],d=4,v=1;v>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^e[d++],_=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^e[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^e[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^e[d++];h=p,l=_,f=y,u=g}var p=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^e[d++],_=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&h])^e[d++],y=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^e[d++],g=(a[u>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^e[d++];t[r]=p,t[r+1]=_,t[r+2]=y,t[r+3]=g},keySize:8});r.AES=i._createHelper(_)}(),function(){function r(t,r){var e=(this._lBlock>>>t^this._rBlock)&r;this._rBlock^=e,this._lBlock^=e<>>t^this._lBlock)&r;this._lBlock^=e,this._rBlock^=e<>>5]>>>31-n%32&1}for(var o=this._subKeys=[],s=0;s<16;s++){for(var a=o[s]=[],f=l[s],i=0;i<24;i++)a[i/6|0]|=e[(h[i]-1+f)%28]<<31-i%6,a[4+(i/6|0)]|=e[28+(h[i+24]-1+f)%28]<<31-i%6;a[0]=a[0]<<1|a[0]>>>31;for(var i=1;i<7;i++)a[i]=a[i]>>>4*(i-1)+3;a[7]=a[7]<<5|a[7]>>>27}for(var u=this._invSubKeys=[],i=0;i<16;i++)u[i]=o[15-i]},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._subKeys)},decryptBlock:function(t,r){this._doCryptBlock(t,r,this._invSubKeys)},_doCryptBlock:function(t,i,n){this._lBlock=t[i],this._rBlock=t[i+1],r.call(this,4,252645135),r.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),r.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=n[o],a=this._lBlock,c=this._rBlock,h=0,l=0;l<8;l++)h|=f[l][((c^s[l])&u[l])>>>0];this._lBlock=c,this._rBlock=a^h}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,r.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),t[i]=this._lBlock,t[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});i.DES=s._createHelper(d);var v=a.TripleDES=s.extend({_doReset:function(){var t=this._key,r=t.words;this._des1=d.createEncryptor(o.create(r.slice(0,2))),this._des2=d.createEncryptor(o.create(r.slice(2,4))),this._des3=d.createEncryptor(o.create(r.slice(4,6)))},encryptBlock:function(t,r){this._des1.encryptBlock(t,r),this._des2.decryptBlock(t,r),this._des3.encryptBlock(t,r)},decryptBlock:function(t,r){this._des3.decryptBlock(t,r),this._des2.encryptBlock(t,r),this._des1.decryptBlock(t,r)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=s._createHelper(v)}(),function(){function r(){for(var t=this._S,r=this._i,e=this._j,i=0,n=0;n<4;n++){r=(r+1)%256,e=(e+t[r])%256;var o=t[r];t[r]=t[e],t[e]=o,i|=t[(t[r]+t[e])%256]<<24-8*n}return this._i=r,this._j=e,i}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=o.RC4=n.extend({_doReset:function(){for(var t=this._key,r=t.words,e=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;for(var n=0,o=0;n<256;n++){var s=n%e,a=r[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+a)%256;var c=i[n];i[n]=i[o],i[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=r.call(this)},keySize:8,ivSize:0});e.RC4=n._createHelper(s);var a=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)r.call(this)}});e.RC4Drop=n._createHelper(a)}(),t.mode.CTRGladman=function(){function r(t){if(255===(t>>24&255)){var r=t>>16&255,e=t>>8&255,i=255&t;255===r?(r=0,255===e?(e=0,255===i?i=0:++i):++e):++r,t=0,t+=r<<16,t+=e<<8,t+=i}else t+=1<<24;return t}function e(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var i=t.lib.BlockCipherMode.extend(),n=i.Encryptor=i.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),e(s);var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c>>0>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0>>0?1:0)|0,this._b=r[7]>>>0>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)r.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;o[0]^=h,o[1]^=f,o[2]^=l,o[3]^=u,o[4]^=h,o[5]^=f,o[6]^=l,o[7]^=u;for(var i=0;i<4;i++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.Rabbit=n._createHelper(h)}(),t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);e.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a>>0>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0>>0?1:0)|0,this._b=r[7]>>>0>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.RabbitLegacy=n.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var o=0;o<4;o++)r.call(this);for(var o=0;o<8;o++)n[o]^=i[o+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(var o=0;o<4;o++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.RabbitLegacy=n._createHelper(h)}(),t.pad.ZeroPadding={pad:function(t,r){var e=4*r;t.clamp(),t.sigBytes+=e-(t.sigBytes%e||e)},unpad:function(t){for(var r=t.words,e=t.sigBytes-1;!(r[e>>>2]>>>24-e%4*8&255);)e--;t.sigBytes=e+1}},t}); 3 | //# sourceMappingURL=crypto-js.min.js.map -------------------------------------------------------------------------------- /logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vector41/crash-extension/bce894f946db8f00b211e57fe1fd7ef7d816dd9c/logo.webp -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | "name": "BC.GAME Analyzer", 4 | "version": "1.1", 5 | "description": "Automatically logs the first table row from BC.Game Crash page in real-time.", 6 | "permissions": [ 7 | "scripting", 8 | "tabs", 9 | "storage", 10 | "notifications" 11 | ], 12 | "host_permissions": [ 13 | "https://bc.game/game/crash/*" 14 | ], 15 | "background": { 16 | "service_worker": "background.js" 17 | }, 18 | "content_scripts": [ 19 | { 20 | "matches": [ 21 | "https://*/*", 22 | "https://bc.game/game/crash/*" 23 | ], 24 | "js": [ 25 | "content.js", 26 | "lib/jquery.js" 27 | ] 28 | } 29 | ], 30 | "action": { 31 | "default_icon": "favicon.png" 32 | }, 33 | "icons": { 34 | "16": "favicon.png", 35 | "48": "favicon.png", 36 | "128": "favicon.png" 37 | }, 38 | "content_security_policy": { 39 | "script-src": [ 40 | "'self'" 41 | ], 42 | "object-src": "'self'" 43 | } 44 | } -------------------------------------------------------------------------------- /popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BC.GAME Analyzer 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 |
45 | Verifying a huge amount of games may consume more ressources from your CPU 46 |
47 |
48 |
49 |
50 | 52 | 54 | 56 |
57 |
58 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
67 |
68 |
69 |
0
70 |
71 | 75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | 84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
96 | 97 |
98 |
99 |
100 |
101 |
102 | Main range / 103 | Thresold: 104 |
105 | 106 |
107 |
108 |
109 | Range 110 | 111 |
112 | 113 |
114 |
115 |
116 | Range 117 | 119 |
120 | 121 |
122 |
123 |
124 |

Range Analysis

125 |
126 | 128 | 129 |
130 |

Payout Analysis

131 |
132 | 134 | 135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /popup.js: -------------------------------------------------------------------------------- 1 | let latestHash = ''; 2 | 3 | const canvas = document.getElementById('arrayCanvas'); 4 | const ctx = canvas.getContext('2d'); 5 | 6 | const cellSize = 12; 7 | const padding = 2; 8 | const cols = 10000; 9 | const rows = 6; 10 | 11 | const cellWidth = cellSize + padding; 12 | const cellHeight = cellSize + padding; 13 | 14 | const gridWidth = cols * cellWidth; 15 | const gridHeight = rows * cellHeight; 16 | 17 | function drawGrid() { 18 | ctx.strokeStyle = '#444'; 19 | 20 | for (let col = 0; col <= cols; col++) { 21 | const x = canvas.width - gridWidth + col * cellWidth; 22 | ctx.beginPath(); 23 | ctx.moveTo(x, 0); 24 | ctx.lineTo(x, gridHeight); 25 | ctx.stroke(); 26 | } 27 | 28 | for (let row = 0; row <= rows; row++) { 29 | const y = row * cellHeight; 30 | ctx.beginPath(); 31 | ctx.moveTo(canvas.width - gridWidth, y); 32 | ctx.lineTo(canvas.width, y); 33 | ctx.stroke(); 34 | } 35 | } 36 | 37 | drawGrid(); 38 | $('#selected_status_modal').css('display', 'none'); 39 | showNotification('BC.GAME Analyzer was started. First please reload the BC.GAME website.'); 40 | 41 | chrome.storage.onChanged.addListener((changes, namespace) => { 42 | if (namespace === 'local' && changes.latestHash) { 43 | const newValue = changes.latestHash.newValue; 44 | 45 | document.getElementById('game_hash_input').value = newValue; 46 | document.getElementById('game_verify_submit').click(); 47 | } 48 | }); 49 | 50 | chrome.storage.local.get(['latestHash'], (result) => { 51 | const storedValue = result.latestHash || 'No value stored yet'; 52 | document.getElementById('game_hash_input').value = storedValue; 53 | document.getElementById('game_verify_submit').click(); 54 | }); 55 | 56 | let latestComboCount = 0; 57 | 58 | const saltString = '0000000000000000000301e2801a9a9598bfb114e574a91a887f2132f33047e6'; 59 | 60 | window.addEventListener('message', (event) => { 61 | if (event.data?.hash) { 62 | $('#game_hash_input').val(event.data?.hash); 63 | 64 | const gameAmount = Number($('#game_amount_input').val()); 65 | verify(event.data?.hash, gameAmount); 66 | } 67 | }); 68 | 69 | $('.tabs ul li a').click(function () { 70 | const $this = $(this), 71 | $tabs = $this.closest('.tabs'), 72 | $li = $this.closest('li'), 73 | $lis = $tabs.find('ul > li'); 74 | 75 | const id = $tabs.attr('id'), 76 | index = $lis.index($li); 77 | 78 | $lis.removeClass('is-active'); 79 | $li.addClass('is-active'); 80 | 81 | $(`#${id}-content > div`).addClass('is-hidden'); 82 | $(`#${id}-content > div:eq(${index})`).removeClass('is-hidden'); 83 | }); 84 | 85 | function enterLoadState() { 86 | $('#game_hash_input').parent().addClass('is-loading'); 87 | $('#game_verify_submit, #chart_plus_1_submit, #chart_plus_10_submit, #chart_plus_100_submit').addClass('is-loading'); 88 | $('#game_hash_input, #game_amount_input, #game_verify_submit').attr('disabled', 'disabled'); 89 | } 90 | 91 | function exitLoadState() { 92 | $('#game_hash_input').parent().removeClass('is-loading'); 93 | $('#game_verify_submit, #chart_plus_1_submit, #chart_plus_10_submit, #chart_plus_100_submit').removeClass('is-loading'); 94 | $('#game_hash_input, #game_amount_input, #game_verify_submit').removeAttr('disabled'); 95 | } 96 | 97 | let $range = $('.range-analysis'); 98 | 99 | let isVerifying = false; 100 | let data = []; 101 | let data300 = []; 102 | let data500 = []; 103 | let data2000 = []; 104 | let dataAnalysisRange = []; 105 | let dataDot = []; 106 | let combo12xCount = 0; 107 | let combo15xCount = 0; 108 | let combo2xCount = 0; 109 | let combo3xCount = 0; 110 | let gameRedThresold = Number($('#game_payout').val()); 111 | let duration = 0; 112 | 113 | $('#game_verify_submit').on('click', () => { 114 | const gameHash = $('#game_hash_input').val(); 115 | const gameAmount = Number($('#game_amount_input').val()); 116 | const gameAmountRange1 = Number($('#game_range1_amount').val()); 117 | const gameAmountRange2 = Number($('#game_range2_amount').val()); 118 | verify(gameHash, gameAmount); 119 | verifyRange1(gameHash, gameAmountRange1); 120 | verifyRange2(gameHash, gameAmountRange2); 121 | verifyRangeLong(gameHash, 2000); 122 | }); 123 | 124 | function verify(gameHash, gameAmount) { 125 | if (isVerifying) return; 126 | isVerifying = true; 127 | enterLoadState(); 128 | $range.empty(); 129 | duration = 0; 130 | 131 | data = []; 132 | let index = 0; 133 | for (let item of gameResults(gameHash, gameAmount)) { 134 | setTimeout(addTableRow.bind(null, item.hash, item.bust, data.length), data.length * 1); 135 | data.unshift({ ...item, index: ++index }); 136 | duration += Math.log(item.bust || 1) / 0.00006; 137 | } 138 | 139 | // [1000, 100, 10, 9, 8, 5, 3, 2, 1.5].forEach((v) => showRangeAnalysis(data, v)); 140 | analysisGameRange(); 141 | 142 | drawChartMain(); 143 | showBustList(); 144 | showDotChart(); 145 | 146 | analysisDashboard(); 147 | analysisRangeMain(); 148 | analysisAlarmPanel(); 149 | predictNextPayout(); 150 | } 151 | 152 | function analysisRangeMain() { 153 | let avgDelta = Number($('#game_amount_input').val()) / data.filter((v) => v.bust >= 10).length; 154 | let delta = 0, maxDelta = 0; 155 | let lastIndex = 0; 156 | 157 | data.filter((v) => v.bust >= 10).forEach(v => { 158 | if (lastIndex > 0) { 159 | delta = v.index - lastIndex; 160 | if (delta > maxDelta) { 161 | maxDelta = delta; 162 | } 163 | } 164 | lastIndex = v.index; 165 | }); 166 | 167 | $('#game_main_analysis').text(`avg: ${avgDelta.toFixed(2)}, max: ${maxDelta}, total: ${data.filter((v) => v.bust >= 10).length}`); 168 | } 169 | 170 | function analysisRange1() { 171 | let avgDelta = Number($('#game_range1_amount').val()) / data300.filter((v) => v.bust >= 10).length; 172 | let delta = 0, maxDelta = 0; 173 | let lastIndex = 0; 174 | 175 | data300.filter((v) => v.bust >= 10).reverse().forEach(v => { 176 | if (lastIndex > 0) { 177 | delta = v.index - lastIndex; 178 | if (delta > maxDelta) { 179 | maxDelta = delta; 180 | } 181 | } 182 | lastIndex = v.index; 183 | }); 184 | 185 | $('#game_range1_analysis').text(`avg: ${avgDelta.toFixed(2)}, max: ${maxDelta}, total: ${data300.filter((v) => v.bust >= 10).length}`); 186 | } 187 | 188 | function analysisRange2() { 189 | let avgDelta = Number($('#game_range2_amount').val()) / data500.filter((v) => v.bust >= 10).length; 190 | let delta = 0, maxDelta = 0; 191 | let lastIndex = 0; 192 | 193 | data500.filter((v) => v.bust >= 10).reverse().forEach(v => { 194 | if (lastIndex > 0) { 195 | delta = v.index - lastIndex; 196 | if (delta > maxDelta) { 197 | maxDelta = delta; 198 | } 199 | } 200 | lastIndex = v.index; 201 | }); 202 | 203 | $('#game_range2_analysis').text(`avg: ${avgDelta.toFixed(2)}, max: ${maxDelta}, total: ${data500.filter((v) => v.bust >= 10).length}`); 204 | } 205 | 206 | function analysisDashboard() { 207 | const latest10x = data.reverse().filter((v) => v.bust >= 10)[0]; 208 | $('#game_current_combo').text(latest10x.index - 1); 209 | 210 | const $divAverage = $('#game_average'); 211 | $divAverage.empty(); 212 | 213 | const count100 = data2000.filter((v) => v.index <= 100 && v.bust >= 10).length; 214 | const count200 = data2000.filter((v) => v.index <= 200 && v.bust >= 10).length; 215 | const count300 = data2000.filter((v) => v.index <= 300 && v.bust >= 10).length; 216 | const count500 = data2000.filter((v) => v.index <= 500 && v.bust >= 10).length; 217 | const count1000 = data2000.filter((v) => v.index <= 1000 && v.bust >= 10).length; 218 | const count2000 = data2000.filter((v) => v.index <= 2000 && v.bust >= 10).length; 219 | 220 | let shortAvg = (count300 - count100) / 3 + count100 / 3; 221 | let midAvg = ((count1000 - count300) / 7) * 2 / 3 + (count300 / 3) / 3; 222 | let longAvg = ((count2000 - count500) / 15) * 2 / 3 + (count500 / 5) / 3; 223 | 224 | let $rangeBadge1 = $('
').attr('class', `dashboard-status ${verifyAlarmStatus(shortAvg)}`); 225 | let $avgShort = $('
').attr('class', 'dashboard-item').text(`${shortAvg > 0 ? shortAvg.toFixed(1) : 0}`); 226 | $avgShort.append($rangeBadge1); 227 | 228 | let $rangeBadge2 = $('
').attr('class', `dashboard-status ${verifyAlarmStatus(midAvg)}`); 229 | let $avgMiddle = $('
').attr('class', 'dashboard-item').text(`${midAvg > 0 ? midAvg.toFixed(1) : 0}`); 230 | $avgMiddle.append($rangeBadge2); 231 | 232 | let $rangeBadge3 = $('
').attr('class', `dashboard-status ${verifyAlarmStatus(longAvg)}`); 233 | let $avgLong = $('
').attr('class', 'dashboard-item').text(`${longAvg > 0 ? longAvg.toFixed(1) : 0}`); 234 | $avgLong.append($rangeBadge3); 235 | 236 | [$avgShort, $avgMiddle, $avgLong].forEach((v) => $divAverage.append(v)); 237 | } 238 | 239 | function analysisAlarmPanel() { 240 | let $panel = $('#alarm_container'); 241 | $panel.empty(); 242 | 243 | let number1 = data2000.filter((v) => v.index <= 500 && v.index > 400).filter((v) => v.bust >= 10).length; 244 | let $item500 = $('
').attr('class', 'alarm-item'); 245 | let $number500 = $('').attr('class', 'alarm-number').text(number1); 246 | let $status500 = $('
').attr('class', `alarm-status ${verifyAlarmStatus(number1)}`); 247 | $item500.append($number500).append($status500); 248 | 249 | let number2 = data2000.filter((v) => v.index <= 400 && v.index > 300).filter((v) => v.bust >= 10).length; 250 | let $item400 = $('
').attr('class', 'alarm-item'); 251 | let $number400 = $('').attr('class', 'alarm-number').text(number2); 252 | let $status400 = $('
').attr('class', `alarm-status ${verifyAlarmStatus(number2)}`); 253 | $item400.append($number400).append($status400); 254 | 255 | let number3 = data2000.filter((v) => v.index <= 300 && v.index > 200).filter((v) => v.bust >= 10).length; 256 | let $item300 = $('
').attr('class', 'alarm-item'); 257 | let $number300 = $('').attr('class', 'alarm-number').text(number3); 258 | let $status300 = $('
').attr('class', `alarm-status ${verifyAlarmStatus(number3)}`); 259 | $item300.append($number300).append($status300); 260 | 261 | let number4 = data2000.filter((v) => v.index <= 200 && v.index > 100).filter((v) => v.bust >= 10).length; 262 | let $item200 = $('
').attr('class', 'alarm-item'); 263 | let $number200 = $('').attr('class', 'alarm-number').text(number4); 264 | let $status200 = $('
').attr('class', `alarm-status ${verifyAlarmStatus(number4)}`); 265 | $item200.append($number200).append($status200); 266 | 267 | let number5 = data2000.filter((v) => v.index <= 100).filter((v) => v.bust >= 10).length; 268 | let $item100 = $('
').attr('class', 'alarm-item'); 269 | let $number100 = $('').attr('class', 'alarm-number').text(number5); 270 | let $status100 = $('
').attr('class', `alarm-status ${verifyAlarmStatus(number5)}`); 271 | $item100.append($number100).append($status100); 272 | 273 | [$item100, $item200, $item300, $item400, $item500].forEach(v => $panel.append(v)); 274 | } 275 | 276 | function verifyAlarmStatus(param) { 277 | if (param <= 4) 278 | return 'golden'; 279 | else if (param > 4 && param < 9) 280 | return 'normal'; 281 | else 282 | return 'bad'; 283 | } 284 | 285 | function verifyRange1(gameHash, gameAmount) { 286 | data300 = []; 287 | let index = 0; 288 | 289 | for (let item of gameResults(gameHash, gameAmount)) { 290 | setTimeout(addTableRow.bind(null, item.hash, item.bust, data300.length), data300.length * 1); 291 | data300.unshift({ ...item, index: ++index }); 292 | duration += Math.log(item.bust || 1) / 0.00006; 293 | } 294 | drawChartRange1(); 295 | analysisRange1(); 296 | } 297 | 298 | function verifyRange2(gameHash, gameAmount) { 299 | data500 = []; 300 | let index = 0; 301 | 302 | for (let item of gameResults(gameHash, gameAmount)) { 303 | setTimeout(addTableRow.bind(null, item.hash, item.bust, data500.length), data500.length * 1); 304 | data500.unshift({ ...item, index: ++index }); 305 | duration += Math.log(item.bust || 1) / 0.00006; 306 | } 307 | drawChartRange2(); 308 | analysisRange2(); 309 | } 310 | 311 | function verifyRangeLong(gameHash, gameAmount) { 312 | data2000 = []; 313 | let index = 0; 314 | 315 | for (let item of gameResults(gameHash, gameAmount)) { 316 | setTimeout(addTableRow.bind(null, item.hash, item.bust, data2000.length), data2000.length * 1); 317 | data2000.unshift({ ...item, index: ++index }); 318 | duration += Math.log(item.bust || 1) / 0.00006; 319 | } 320 | controlComboStatus(); 321 | } 322 | 323 | function analysisAverageRange(gameHash, range) { 324 | dataAnalysisRange = []; 325 | let perRange = range / 10; 326 | let index = 0; 327 | 328 | for (let item of gameResults(gameHash, range)) { 329 | setTimeout(addTableRow.bind(null, item.hash, item.bust, data2000.length), data2000.length * 1); 330 | dataAnalysisRange.unshift({ ...item, index: ++index }); 331 | duration += Math.log(item.bust || 1) / 0.00006; 332 | } 333 | printLongAverage(range, perRange); 334 | } 335 | 336 | function printLongAverage(m, p) { 337 | let totalSum = 0; 338 | let content = '' 339 | for (let i = 0; i <= m; i = i + p) { 340 | if (i + p <= m) { 341 | totalSum += dataAnalysisRange.filter((v) => v.index > i && v.index <= i + p).reduce((sum, item) => sum + item.bust, 0); 342 | console.log(`${i} ~ ${i + p} range: ${(dataAnalysisRange.filter((v) => v.index > i && v.index <= i + p).reduce((sum, item) => sum + item.bust, 0)).toFixed(2)}`) 343 | content += `${i} ~ ${i + p} range: ${(dataAnalysisRange.filter((v) => v.index > i && v.index <= i + p).reduce((sum, item) => sum + item.bust, 0)).toFixed(2)} \n`; 344 | } 345 | } 346 | console.log(`avg in ${m} range: ${(totalSum / 10).toFixed(2)}`) 347 | content += `\n avg in ${m} range: ${(totalSum / 10).toFixed(2)}`; 348 | 349 | alert(content) 350 | } 351 | 352 | function showRangeAnalysis(data, bust) { 353 | let aboveItems = data.filter((v) => v.bust >= bust); 354 | let mainRange = Number($('#game_amount_input').val()) > 200 ? 100 : Number($('#game_amount_input').val()); 355 | 356 | let delta = 0, 357 | totalDelta = 0, 358 | avgDelta = 0, 359 | maxDelta = 0, 360 | avgMainDelta = 0, 361 | maxMainDelta = 0, 362 | avgMain2Delta = 0, 363 | maxMain2Delta = 0, 364 | avgMain3Delta = 0, 365 | maxMain3Delta = 0, 366 | avg500Delta = 0, 367 | max500Delta = 0, 368 | avg1000Delta = 0, 369 | max1000Delta = 0, 370 | avg2000Delta = 0, 371 | max2000Delta = 0; 372 | 373 | let lastIndex = 0; 374 | let $div = $('
').css('margin-bottom', 10); 375 | aboveItems.reverse().forEach((item, i) => { 376 | if (lastIndex > 0) { 377 | delta = item.index - lastIndex; 378 | if (delta > maxDelta) maxDelta = delta; 379 | totalDelta += delta; 380 | } 381 | lastIndex = item.index; 382 | }); 383 | 384 | avgDelta = avgDelta = Number($('#game_amount_input').val()) / aboveItems.filter((v) => v.bust >= bust).length; 385 | 386 | avgMainDelta = mainRange / data2000.filter((v) => v.index <= mainRange && v.bust >= bust).length; 387 | lastIndex = 0; 388 | data2000.filter((v) => v.index <= mainRange && v.bust >= bust).reverse().forEach(v => { 389 | if (lastIndex > 0) { 390 | delta = v.index - lastIndex; 391 | if (delta > maxMainDelta) maxMainDelta = delta; 392 | } 393 | lastIndex = v.index; 394 | }); 395 | 396 | avgMain2Delta = mainRange * 2 / data2000.filter((v) => v.index <= mainRange * 2 && v.bust >= bust).length; 397 | lastIndex = 0; 398 | data2000.filter((v) => v.index <= mainRange * 2 && v.bust >= bust).reverse().forEach(v => { 399 | if (lastIndex > 0) { 400 | delta = v.index - lastIndex; 401 | if (delta > maxMain2Delta) maxMain2Delta = delta; 402 | } 403 | lastIndex = v.index; 404 | }); 405 | 406 | avgMain3Delta = mainRange * 3 / data2000.filter((v) => v.index <= mainRange * 3 && v.bust >= bust).length; 407 | lastIndex = 0; 408 | data2000.filter((v) => v.index <= mainRange * 3 && v.bust >= bust).reverse().forEach(v => { 409 | if (lastIndex > 0) { 410 | delta = v.index - lastIndex; 411 | if (delta > maxMain3Delta) maxMain3Delta = delta; 412 | } 413 | lastIndex = v.index; 414 | }); 415 | 416 | avg500Delta = 500 / data2000.filter((v) => v.index <= 500 && v.bust >= bust).length; 417 | lastIndex = 0; 418 | data2000.filter((v) => v.index <= 500 && v.bust >= bust).reverse().forEach(v => { 419 | if (lastIndex > 0) { 420 | delta = v.index - lastIndex; 421 | if (delta > max500Delta) max500Delta = delta; 422 | } 423 | lastIndex = v.index; 424 | }); 425 | 426 | avg1000Delta = 1000 / data2000.filter((v) => v.index <= 1000 && v.bust >= bust).length; 427 | lastIndex = 0; 428 | data2000.filter((v) => v.index <= 1000 && v.bust >= bust).reverse().forEach(v => { 429 | if (lastIndex > 0) { 430 | delta = v.index - lastIndex; 431 | if (delta > max1000Delta) max1000Delta = delta; 432 | } 433 | lastIndex = v.index; 434 | }); 435 | 436 | avg2000Delta = 2000 / data2000.filter((v) => v.index <= 2000 && v.bust >= bust).length; 437 | lastIndex = 0; 438 | data2000.filter((v) => v.index <= 2000 && v.bust >= bust).reverse().forEach(v => { 439 | if (lastIndex > 0) { 440 | delta = v.index - lastIndex; 441 | if (delta > max2000Delta) max2000Delta = delta; 442 | } 443 | lastIndex = v.index; 444 | }); 445 | 446 | let $label = $('