-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
1 lines (1 loc) · 27.1 KB
/
script.js
1
const _0x2ca864 = _0xfe54; (function (_0x22de49, _0x47238c) { const _0x18f37f = _0xfe54, _0x47b21a = _0x22de49(); while (!![]) { try { const _0x28781a = -parseInt(_0x18f37f(0x191)) / 0x1 + parseInt(_0x18f37f(0xff)) / 0x2 * (parseInt(_0x18f37f(0x113)) / 0x3) + parseInt(_0x18f37f(0x17c)) / 0x4 + parseInt(_0x18f37f(0x103)) / 0x5 * (parseInt(_0x18f37f(0x165)) / 0x6) + parseInt(_0x18f37f(0x16b)) / 0x7 * (parseInt(_0x18f37f(0x182)) / 0x8) + parseInt(_0x18f37f(0x196)) / 0x9 + parseInt(_0x18f37f(0x143)) / 0xa * (-parseInt(_0x18f37f(0x134)) / 0xb); if (_0x28781a === _0x47238c) break; else _0x47b21a['push'](_0x47b21a['shift']()); } catch (_0x50e427) { _0x47b21a['push'](_0x47b21a['shift']()); } } }(_0x186f, 0x695d8)); const locations = [{ 'location': _0x2ca864(0x15f), 'npc': _0x2ca864(0xfc) }, { 'location': _0x2ca864(0x118), 'npc': _0x2ca864(0x116) }, { 'location': '카브', 'npc': '상인\x20아루' }, { 'location': _0x2ca864(0x10e), 'npc': '상인\x20라누' }, { 'location': _0x2ca864(0x181), 'npc': _0x2ca864(0x140) }, { 'location': '탈틴', 'npc': _0x2ca864(0x1a4) }, { 'location': '타라', 'npc': '상인\x20에루' }, { 'location': _0x2ca864(0x12e), 'npc': _0x2ca864(0x176) }, { 'location': '스카하', 'npc': _0x2ca864(0x141) }, { 'location': _0x2ca864(0x1ad), 'npc': _0x2ca864(0x167) }, { 'location': '카루', 'npc': '귀넥' }, { 'location': '코르', 'npc': '리나' }, { 'location': _0x2ca864(0x109), 'npc': '얼리' }, { 'location': _0x2ca864(0x11f), 'npc': '켄' }, { 'location': _0x2ca864(0x10a), 'npc': '카디' }, { 'location': '페라', 'npc': '데위' }, { 'location': _0x2ca864(0x104), 'npc': '모락' }]; let serverObject = { '류트': 0x2a, '하프': 0x18, '울프': 0xf, '만돌린': 0xf }; const url = _0x2ca864(0x11b); function hexToRgb(_0x36b1e1) { const _0x1c8aef = _0x2ca864, _0xdca5c8 = parseInt(_0x36b1e1[_0x1c8aef(0x138)](0x1, 0x3), 0x10), _0x59d81e = parseInt(_0x36b1e1[_0x1c8aef(0x138)](0x3, 0x5), 0x10), _0x532793 = parseInt(_0x36b1e1[_0x1c8aef(0x138)](0x5, 0x7), 0x10); return '(' + _0xdca5c8 + ',\x20' + _0x59d81e + ',\x20' + _0x532793 + ')'; } let fetchedData = []; function isWithinTolerance(_0x526fd7, _0x1934e6, _0x531d4d) { const _0x5be8d3 = _0x2ca864, _0xaf406f = Math[_0x5be8d3(0x1af)](_0x1934e6['r'] - _0x526fd7['r']), _0x50b2d4 = Math[_0x5be8d3(0x1af)](_0x1934e6['g'] - _0x526fd7['g']), _0x20d286 = Math[_0x5be8d3(0x1af)](_0x1934e6['b'] - _0x526fd7['b']); return _0xaf406f <= _0x531d4d && _0x50b2d4 <= _0x531d4d && _0x20d286 <= _0x531d4d; } function parseRgb(_0x40531c) { const _0xe2e1b4 = _0x2ca864, _0x33592f = _0x40531c[_0xe2e1b4(0x1a6)](/[^0-9]/g, '\x20')[_0xe2e1b4(0x121)]()[_0xe2e1b4(0x128)](/\s+/)[_0xe2e1b4(0x15c)](Number); if (_0x33592f['length'] !== 0x3 || _0x33592f[_0xe2e1b4(0x19e)](_0x278a43 => isNaN(_0x278a43) || _0x278a43 === undefined)) return null; return { 'r': _0x33592f[0x0], 'g': _0x33592f[0x1], 'b': _0x33592f[0x2] }; } let filterToggle = 0x0; function filterData() { const _0x17155d = _0x2ca864, _0x4e3298 = parseInt(document['getElementById'](_0x17155d(0x13c))['value'], 0xa) || 0xa, _0x452a5f = document[_0x17155d(0x105)](_0x17155d(0x175)), _0x1660aa = Array['from'](_0x452a5f)['map'](_0xec0bf1 => { const _0x2168d0 = _0x17155d, _0x38cdde = _0xec0bf1[_0x2168d0(0x1a5)](_0x2168d0(0x186)), _0x23048d = _0x38cdde ? _0x38cdde[_0x2168d0(0x154)] : 'and', _0x3755b5 = _0xec0bf1[_0x2168d0(0x1a5)]('.filterType')['value'], _0x54481c = _0xec0bf1['querySelector'](_0x2168d0(0x194))['value'], _0x59a12e = _0x54481c ? parseRgb(_0x54481c) : null; return _0x59a12e ? { 'logicalOperator': _0x23048d, 'type': _0x3755b5, 'color': _0x59a12e } : null; })[_0x17155d(0x146)](_0x1789d1 => _0x1789d1 !== null); document[_0x17155d(0x105)](_0x17155d(0x137))['forEach'](_0x245324 => { const _0x3097ad = _0x17155d, _0x4258c5 = _0x245324[_0x3097ad(0x1a5)]('.A') ? window['getComputedStyle'](_0x245324[_0x3097ad(0x1a5)]('.A'))['backgroundColor'] : null, _0x2161a7 = _0x245324[_0x3097ad(0x1a5)]('.B') ? window[_0x3097ad(0x1a0)](_0x245324[_0x3097ad(0x1a5)]('.B'))[_0x3097ad(0x17d)] : null, _0x122940 = _0x245324[_0x3097ad(0x1a5)]('.C') ? window[_0x3097ad(0x1a0)](_0x245324[_0x3097ad(0x1a5)]('.C'))[_0x3097ad(0x17d)] : null; let _0x16ca3e = !![]; _0x1660aa[_0x3097ad(0x153)]((_0x397071, _0x37c4d8) => { const _0x2bc801 = _0x3097ad, { type: _0x56f789, color: _0x1679d8, logicalOperator: _0x4ff052 } = _0x397071; if (_0x1679d8) { let _0x1f6e3a; if (_0x56f789 === _0x2bc801(0x18c)) _0x1f6e3a = [_0x4258c5, _0x2161a7, _0x122940][_0x2bc801(0x19e)](_0x57871e => _0x57871e && isWithinTolerance(_0x1679d8, parseRgb(_0x57871e), _0x4e3298)); else { const _0x482c33 = _0x56f789 === _0x2bc801(0x178) ? _0x4258c5 : _0x56f789 === _0x2bc801(0x161) ? _0x2161a7 : _0x56f789 === 'inner' ? _0x122940 : null; _0x1f6e3a = _0x482c33 && isWithinTolerance(_0x1679d8, parseRgb(_0x482c33), _0x4e3298); } if (_0x37c4d8 === 0x0) _0x16ca3e = _0x1f6e3a; else { if (_0x4ff052 === _0x2bc801(0x135)) _0x16ca3e = _0x16ca3e && _0x1f6e3a; else _0x4ff052 === 'or' && (_0x16ca3e = _0x16ca3e || _0x1f6e3a); } } }), _0x16ca3e ? _0x245324[_0x3097ad(0x136)][_0x3097ad(0x122)](_0x3097ad(0x19a)) : _0x245324[_0x3097ad(0x136)][_0x3097ad(0x126)](_0x3097ad(0x19a)); }); const _0x5be489 = document[_0x17155d(0x105)](_0x17155d(0x164)); _0x5be489[_0x17155d(0x153)](_0x5206fa => { const _0x42b74d = _0x17155d, _0x138f55 = _0x5206fa['querySelectorAll'](_0x42b74d(0x155)), _0x2e2302 = Array['from'](_0x138f55)[_0x42b74d(0x173)](_0xa44ef8 => _0xa44ef8[_0x42b74d(0x136)][_0x42b74d(0x18f)](_0x42b74d(0x19a))); _0x2e2302 && _0x5206fa['classList'][_0x42b74d(0x126)](_0x42b74d(0x19a)); }), filterToggle = 0x1; } function resetFilterData() { const _0x326ad1 = _0x2ca864; document[_0x326ad1(0x105)](_0x326ad1(0x142))[_0x326ad1(0x153)](_0x1195bd => { const _0x7526ad = _0x326ad1; _0x1195bd[_0x7526ad(0x136)][_0x7526ad(0x122)](_0x7526ad(0x19a)); }), document['querySelectorAll'](_0x326ad1(0x137))['forEach'](_0x5a66dc => { const _0xcc37f7 = _0x326ad1; _0x5a66dc[_0xcc37f7(0x136)][_0xcc37f7(0x122)](_0xcc37f7(0x19a)); }), filterToggle = 0x0; } document[_0x2ca864(0x179)](_0x2ca864(0x11c))[_0x2ca864(0xf8)](_0x2ca864(0x171), function () { filterToggle != 0x1 ? filterData() : resetFilterData(); }), document[_0x2ca864(0x179)](_0x2ca864(0x145))[_0x2ca864(0xf8)](_0x2ca864(0x16e), function () { this['checked'] ? filterData() : resetFilterData(); }), window[_0x2ca864(0x11a)] = function () { const _0x5579b5 = _0x2ca864, _0x446618 = localStorage['getItem'](_0x5579b5(0x195)); _0x446618 && (document['getElementById']('apiKeyInput')[_0x5579b5(0x154)] = _0x446618); const _0x469bc6 = localStorage[_0x5579b5(0x12b)]('server'), _0x360698 = localStorage[_0x5579b5(0x12b)]('channel'); _0x469bc6 && (document[_0x5579b5(0x179)](_0x5579b5(0x16c))[_0x5579b5(0x154)] = _0x469bc6); if (_0x360698) { const _0x4cfeb4 = serverObject[_0x469bc6]; channelInput['innerHTML'] = ''; for (let _0x111ba5 = 0x1; _0x111ba5 <= _0x4cfeb4; _0x111ba5++) { const _0x6fd231 = document[_0x5579b5(0x1a1)](_0x5579b5(0x168)); _0x6fd231[_0x5579b5(0x154)] = _0x111ba5, _0x6fd231[_0x5579b5(0x150)] = _0x111ba5, channelInput[_0x5579b5(0x160)](_0x6fd231); } document[_0x5579b5(0x179)](_0x5579b5(0x117))['value'] = _0x360698; } const _0x1de82e = document[_0x5579b5(0x179)]('locationSelect'); locations[_0x5579b5(0x153)](({ location: _0x266a4f }) => { const _0x2c1c57 = _0x5579b5, _0x2ebf8a = document['createElement'](_0x2c1c57(0x168)); _0x2ebf8a[_0x2c1c57(0x154)] = _0x266a4f, _0x2ebf8a[_0x2c1c57(0x150)] = _0x266a4f, _0x1de82e[_0x2c1c57(0x160)](_0x2ebf8a); }); const _0x43cffb = localStorage[_0x5579b5(0x12b)]('tolerance'); _0x43cffb && (document['getElementById']('toleranceInput')[_0x5579b5(0x154)] = _0x43cffb); }, document[_0x2ca864(0x179)](_0x2ca864(0x10d))[_0x2ca864(0xf8)]('input', function () { const _0x26c716 = _0x2ca864, _0x5dd919 = this[_0x26c716(0x154)]; localStorage['setItem']('apiKey', _0x5dd919); }), document[_0x2ca864(0x179)]('serverSelect')[_0x2ca864(0xf8)](_0x2ca864(0x16e), function () { const _0x2da91a = _0x2ca864, _0x329ce4 = this[_0x2da91a(0x154)]; localStorage['setItem'](_0x2da91a(0x1aa), _0x329ce4); }), document[_0x2ca864(0x179)]('channelInput')[_0x2ca864(0xf8)](_0x2ca864(0x180), function () { const _0x4d2fe6 = _0x2ca864, _0x30a384 = this[_0x4d2fe6(0x154)]; localStorage[_0x4d2fe6(0x199)](_0x4d2fe6(0x183), _0x30a384); }); function _0x186f() { const _0x2c5be8 = ['테일로', 'option', 'content', 'className', '2389058OiIXqE', 'serverSelect', 'alt', 'change', 'itemDetail', 'OPENAPI00004', 'click', '내부\x20서버\x20오류\x20-\x20서버\x20내부\x20오류', 'every', 'push', '#filterAbove\x20.filterInput', '상인\x20피루', '<div>', 'outer', 'getElementById', 'item_display_name', 'width', '843680nDwuHB', 'backgroundColor', 'innerHTML', 'display', 'input', '이멘마하', '16ELKJEt', 'channel', '3px', 'getDate', '.filterAndOr', '번째\x20시도중...', 'granted', 'length', '?q=', 'OPENAPI00002', 'anywhere', 'setHours', 'entries', 'contains', 'values', '273574mbmwDj', 'fetchButton', '56px', '.colorInput', 'apiKey', '4677066FBanqz', 'OPENAPI00009', 'paddingBottom', 'setItem', 'hidden', '20px', 'permission', '%2C', 'some', '서비스\x20점검\x20중', 'getComputedStyle', 'createElement', '데이터\x20준비\x20중\x20-\x201분\x20후\x20자동으로\x20다시\x20시도합니다.\x20', 'DOMContentLoaded', '상인\x20베루', 'querySelector', 'replace', 'toLocaleTimeString', '시간\x20바뀜', 'div', 'server', '초</span>\x20후\x20초기화', '빈\x20값이\x20있으면\x20검색이\x20되지\x20않습니다.', '켈라베이스', 'contain', 'abs', '<div\x20style=\x22color:\x20red;\x22>', 'message', 'bgColor', 'addEventListener', 'getMinutes', 'src', './favicon.ico', '상인\x20네루', '\x20failed:\x20', 'floor', '37092XCHoDz', 'autoFetchCheckbox', 'Error\x20loading\x20JSON\x20data:', '주머니\x20업데이트', '10dcHnlY', '칼리다', 'querySelectorAll', 'dispatchEvent', 'table', 'getHours', '오아시스', '발레스', ']\x20<span\x20id=\x22secondsRemaining\x22>⌛', 'serverNum', 'apiKeyInput', '반호르', 'img', 'center', '잘못된\x20API\x20키', 'name', '27TBHCTk', 'locationSelect', 'OPENAPI00006', '상인\x20누누', 'channelInput', '던바튼', 'then', 'onload', 'https://open.api.nexon.com/mabinogi/v1/npcshop/list', 'filterButton', 'location', 'loadingOverlay', '필리아', 'json', 'trim', 'remove', '\x20~\x20', 'toString', 'item-img', 'add', 'cell', 'split', 'requestPermission', 'no_image.png', 'getItem', 'none', 'log', '벨바스트', 'parse', 'getTime', '주머니', 'height', 'checked', '2053876wxMmXX', 'and', 'classList', '.cell', 'slice', 'focus', '2-digit', 'serverName', 'toleranceInput', 'onerror', 'shop', 'match', '상인\x20메루', '상인\x20세누', '#content\x20>\x20.location', '90WHxJlL', 'OPENAPI00001', 'autoFilter', 'filter', 'indexOf', 'join', 'Max\x20retries\x20reached.\x20Exiting...', '요청\x20과다\x20-\x20API\x20호출\x20한도\x20초과', 'padStart', 'setMinutes', 'image_url', '알\x20수\x20없는\x20오류\x20-\x20다시\x20시도해\x20주세요.', '접근\x20거부\x20-\x20권한\x20없는\x20접근', 'textContent', 'style', 'substring', 'forEach', 'value', '.table\x20.cell', 'flex', 'container', 'error', 'maxWidth', 'OPENAPI00003', 'item', 'map', 'text', 'Attempt\x20', '티르코네일', 'appendChild', 'roman', 'toUpperCase', 'tab_name', '.location', '2416494XHKUHC', 'includes']; _0x186f = function () { return _0x2c5be8; }; return _0x186f(); } async function fetchData() { const _0x23e605 = _0x2ca864, _0x3f40db = []; let _0x1be518 = document['getElementById'](_0x23e605(0x16c))[_0x23e605(0x154)], _0x37f3da = document[_0x23e605(0x179)](_0x23e605(0x117))[_0x23e605(0x154)]; _0x37f3da > serverObject[_0x1be518] && (_0x37f3da = String(serverObject[_0x1be518]), document[_0x23e605(0x179)](_0x23e605(0x117))[_0x23e605(0x154)] = String(serverObject[_0x1be518])); const _0x54c9bd = document[_0x23e605(0x179)]('locationSelect')[_0x23e605(0x154)], _0x2ea760 = document['getElementById'](_0x23e605(0x10d))[_0x23e605(0x154)], _0x1d397e = { 'accept': 'application/json', 'x-nxopen-api-key': _0x2ea760 }; let _0x343c84 = 0x0; fetchedData[_0x23e605(0x153)](_0x5f0e3f => { const _0x192244 = _0x23e605; _0x5f0e3f[_0x192244(0x10c)] === _0x37f3da && _0x5f0e3f[_0x192244(0x13b)] == _0x1be518 && _0x5f0e3f['location'] == _0x54c9bd && (_0x3f40db[_0x192244(0x174)](_0x5f0e3f), _0x343c84 = 0x1); }); if (!_0x343c84) { const _0x3fa25e = document['getElementById'](_0x23e605(0x11e)); _0x3fa25e[_0x23e605(0x151)][_0x23e605(0x17f)] = _0x23e605(0x156); for (const { location: _0x206441, npc: _0x2c48b9 } of locations) { if (_0x54c9bd == '전체' || _0x54c9bd == _0x206441) { const _0x2061f0 = async (_0x4e0ba8, _0x499203, _0x4869d0, _0x54779a, _0x42a9d9 = 0xa) => { const _0x805918 = _0x23e605; for (let _0x225749 = 0x0; _0x225749 < _0x42a9d9; _0x225749++) { try { const _0x1c0a93 = await fetchLocationData(_0x4e0ba8, _0x499203, _0x4869d0, _0x54779a); return _0x1c0a93; } catch (_0x59927d) { displayError(_0x59927d, _0x225749 + 0x1), console[_0x805918(0x12d)](_0x805918(0x15e) + (_0x225749 + 0x1) + _0x805918(0xfd) + _0x59927d[_0x805918(0xf6)]); if (_0x225749 < _0x42a9d9 - 0x1) console['log']('Retrying\x20in\x201\x20minute...'), await new Promise(_0x5233a5 => setTimeout(_0x5233a5, 0xea60)); else { console[_0x805918(0x12d)](_0x805918(0x149)); throw _0x59927d; } } } }; try { const _0x14e826 = await _0x2061f0(_0x2c48b9, _0x1be518, _0x37f3da, _0x1d397e, 0xa); let _0x428871 = _0x37f3da; const _0x2bb9bd = fetchedData['some'](_0x232969 => _0x232969[_0x23e605(0x13b)] == _0x1be518 && _0x232969[_0x23e605(0x10c)] == _0x37f3da && _0x232969[_0x23e605(0x11d)] == _0x206441); !_0x2bb9bd ? (_0x3f40db[_0x23e605(0x174)]({ 'serverName': _0x1be518, 'serverNum': _0x428871, 'location': _0x206441, 'items': _0x14e826 }), fetchedData[_0x23e605(0x174)]({ 'serverName': _0x1be518, 'serverNum': _0x428871, 'location': _0x206441, 'items': _0x14e826 })) : _0x3f40db[_0x23e605(0x174)]({ 'serverName': _0x1be518, 'serverNum': _0x428871, 'location': _0x206441, 'items': _0x14e826 }); } catch (_0x584d55) { return console[_0x23e605(0x12d)](_0x584d55), displayError(_0x584d55, 0x0), 0x0; } } } } return _0x3f40db; } async function fetchLocationData(_0x44f55a, _0x31ff4d, _0x2026ea, _0x4a92a7) { const _0xaecdca = _0x2ca864, _0x133aeb = new URLSearchParams({ 'npc_name': _0x44f55a, 'server_name': _0x31ff4d, 'channel': _0x2026ea }), _0x446cab = await fetch(url + '?' + _0x133aeb, { 'headers': _0x4a92a7 }); if (!_0x446cab['ok']) { const _0x21a5bd = await _0x446cab[_0xaecdca(0x15d)](); throw new Error('HTTP\x20error!\x20status:\x20' + _0x446cab['status'] + ',\x20' + _0x21a5bd); } const _0x487905 = await _0x446cab['json'](); return processShops(_0x487905[_0xaecdca(0x13e)]); } function processShops(_0xa1183b) { const _0x21727e = _0x2ca864, _0x180eb6 = [], _0x1109f9 = _0xa1183b[_0x21727e(0x146)](_0x369d87 => _0x369d87[_0x21727e(0x163)] === _0x21727e(0x131)); for (const _0x3b8029 of _0x1109f9) { for (const _0x1fa8c0 of _0x3b8029[_0x21727e(0x15b)]) { const _0x466b3d = _0x1fa8c0[_0x21727e(0x17a)], _0x540a9b = _0x1fa8c0[_0x21727e(0x14d)]; if (_0x540a9b[_0x21727e(0x166)](_0x21727e(0x10f))) { const _0x243585 = findColorData(_0x540a9b); _0x180eb6['push']({ 'itemDisplayName': _0x466b3d, 'colors': _0x243585, 'imageUrl': _0x540a9b }); } } } return _0x180eb6; } let decodeData; async function loadDecodeData() { const _0x16b722 = _0x2ca864; try { const _0x4d7806 = await fetch('combined_result.json'); decodeData = await _0x4d7806[_0x16b722(0x120)](); } catch (_0x4f4641) { console[_0x16b722(0x158)](_0x16b722(0x101), _0x4f4641); } } async function initialize() { await loadDecodeData(); } initialize(); function _0xfe54(_0x4e7a83, _0x1d38c0) { const _0x186fb3 = _0x186f(); return _0xfe54 = function (_0xfe548c, _0x58ab30) { _0xfe548c = _0xfe548c - 0xf5; let _0x2bc6e8 = _0x186fb3[_0xfe548c]; return _0x2bc6e8; }, _0xfe54(_0x4e7a83, _0x1d38c0); } function extractColors(_0x51c6e8) { const _0x2d12df = _0x2ca864, _0x298098 = _0x51c6e8[_0x2d12df(0x128)](_0x2d12df(0x18a))[0x1], _0x122126 = _0x298098[_0x2d12df(0x13f)](/.{1,18}/g)[_0x2d12df(0x15c)](_0x41ceec => _0x41ceec[_0x2d12df(0x189)] === 0x12 ? _0x41ceec[_0x2d12df(0x138)](0x4, -0x2) : _0x41ceec[_0x2d12df(0x138)](0x4))[_0x2d12df(0x15c)](_0xc268 => _0xc268[_0x2d12df(0x13f)](/.{1,4}/g)); return _0x122126[_0x2d12df(0x138)](0x0, 0x3); } function findColorData(_0x485906) { const _0x2fe52f = _0x2ca864; function _0x46cc03(_0x83cd5) { const _0x127fce = _0xfe54, _0x4a709f = {}; for (const _0x22428f in _0x83cd5) { _0x4a709f[_0x22428f] = _0x83cd5[_0x22428f][_0x127fce(0x15c)](_0x3c9755 => (_0x3c9755 !== null ? _0x3c9755 : 0x11)[_0x127fce(0x124)](0x10)[_0x127fce(0x14b)](0x2, '0'))[_0x127fce(0x148)]('')[_0x127fce(0x124)](); } return _0x4a709f; } const _0x1a4549 = extractColors(_0x485906), _0x1be128 = { 'A': [], 'B': [], 'C': [] }, _0x336ca8 = ['A', 'B', 'C']; return _0x1a4549[_0x2fe52f(0x153)]((_0x6155bc, _0x1ab8da) => { _0x6155bc['forEach']((_0x2adfbf, _0x1ca712) => { const _0x302dc9 = _0xfe54, _0x48c7bc = _0x336ca8[_0x1ab8da], _0x4a1cd7 = decodeData[_0x48c7bc]?.[_0x1ca712 + 0x1]?.['upper']?.[_0x2adfbf[_0x302dc9(0x138)](0x0, 0x2)[_0x302dc9(0x162)]()] * 0x10 + decodeData[_0x48c7bc]?.[_0x1ca712 + 0x1]?.['lower']?.[_0x2adfbf[_0x302dc9(0x138)](0x2)[_0x302dc9(0x162)]()]; _0x1be128[_0x48c7bc][_0x302dc9(0x174)](_0x4a1cd7 !== undefined ? _0x4a1cd7 : null); }); }), _0x46cc03(_0x1be128); } function displayError(_0xc20684, _0x442cf5) { const _0x613909 = _0x2ca864, _0x20a57f = document[_0x613909(0x179)](_0x613909(0x169)), _0x2ea647 = _0xc20684[_0x613909(0xf6)][_0x613909(0x152)](_0xc20684[_0x613909(0xf6)][_0x613909(0x147)]('{')), _0x172d88 = JSON[_0x613909(0x12f)](_0x2ea647); let _0x176b52 = ''; switch (_0x172d88[_0x613909(0x158)][_0x613909(0x112)]) { case _0x613909(0x144): _0x176b52 = _0x613909(0x172); break; case _0x613909(0x18b): _0x176b52 = _0x613909(0x14f); break; case _0x613909(0x15a): _0x176b52 = '잘못된\x20식별자'; break; case _0x613909(0x170): _0x176b52 = '누락되었거나\x20잘못된\x20매개변수'; break; case 'OPENAPI00005': _0x176b52 = _0x613909(0x111); break; case _0x613909(0x115): _0x176b52 = '잘못된\x20게임\x20또는\x20API\x20경로'; break; case 'OPENAPI00007': _0x176b52 = _0x613909(0x14a); break; case _0x613909(0x197): _0x176b52 = _0x613909(0x1a2) + _0x442cf5 + _0x613909(0x187); break; case 'OPENAPI00010': _0x176b52 = _0x613909(0x19f); break; case 'OPENAPI00011': _0x176b52 = 'API\x20점검\x20중'; break; default: _0x176b52 = _0x613909(0x14e); }_0x20a57f['innerHTML'] = _0x613909(0xf5) + _0x176b52 + '</div>'; } async function renderData(_0x21f0b2) { const _0x120d56 = _0x2ca864, _0x12922c = document['getElementById']('content'); _0x12922c[_0x120d56(0x17e)] = ''; for (const { location: _0x2fe2ca, items: _0x4842d6 } of _0x21f0b2) { const _0xdcdb95 = document[_0x120d56(0x1a1)](_0x120d56(0x1a9)); _0xdcdb95['className'] = _0x120d56(0x11d), _0xdcdb95[_0x120d56(0x17e)] = '<div\x20class=\x22location_name\x22>' + _0x2fe2ca + _0x120d56(0x177), _0x12922c['appendChild'](_0xdcdb95); const _0x4360d8 = document['createElement']('div'); _0x4360d8[_0x120d56(0x16a)] = _0x120d56(0x107); for (const { itemDisplayName: _0x353717, colors: _0x512e6d, imageUrl: _0x5cd8cc } of _0x4842d6) { const _0x582ee = document[_0x120d56(0x1a1)]('div'); _0x582ee[_0x120d56(0x16a)] = _0x120d56(0x127); const _0x199f1a = document[_0x120d56(0x1a1)](_0x120d56(0x1a9)); _0x199f1a[_0x120d56(0x16a)] = _0x120d56(0x157); const _0x69cee1 = document[_0x120d56(0x1a1)](_0x120d56(0x1a9)); _0x69cee1[_0x120d56(0x16a)] = 'itemName'; const _0x2b51bc = document[_0x120d56(0x1a1)]('div'); _0x2b51bc['className'] = _0x120d56(0x16f); const _0x1164fc = document[_0x120d56(0x1a1)](_0x120d56(0x1a9)); _0x1164fc['className'] = _0x120d56(0xf7), _0x69cee1['innerHTML'] = '' + _0x353717; for (const [_0x4c0b2a, _0x2aa407] of Object[_0x120d56(0x18e)](_0x512e6d)) { const _0x5a3d81 = document[_0x120d56(0x1a1)](_0x120d56(0x1a9)); _0x5a3d81['className'] = 'color-box-box'; const _0x48c02b = document[_0x120d56(0x1a1)](_0x120d56(0x1a9)); _0x48c02b[_0x120d56(0x16a)] = 'color-box\x20' + _0x4c0b2a, _0x48c02b['style'][_0x120d56(0x17d)] = '#' + _0x2aa407, _0x48c02b['style'][_0x120d56(0x17b)] = _0x120d56(0x19b), _0x48c02b['style'][_0x120d56(0x132)] = _0x120d56(0x19b), _0x5a3d81[_0x120d56(0x160)](_0x48c02b), _0x5a3d81['innerHTML'] += '<p\x20class=\x22color-box-color\x22>' + hexToRgb('#' + _0x2aa407) + '</p><br>', _0x1164fc[_0x120d56(0x160)](_0x5a3d81); } const [_0x4fa75c, _0x1b1e34, _0x6e2f84] = Object[_0x120d56(0x190)](_0x512e6d)['slice'](0x0, 0x3); mabibase_color = [_0x4fa75c, _0x1b1e34, _0x6e2f84][_0x120d56(0x15c)](_0x1825df => '0x' + _0x1825df)[_0x120d56(0x148)](_0x120d56(0x19d)); const _0x461b15 = document['createElement'](_0x120d56(0x1a9)); _0x461b15[_0x120d56(0x151)][_0x120d56(0x156)] = '1', _0x461b15[_0x120d56(0x16a)] = _0x120d56(0x125), _0x461b15[_0x120d56(0x151)][_0x120d56(0x17f)] = _0x120d56(0x156), _0x461b15['style']['justifyContent'] = _0x120d56(0x110), _0x461b15[_0x120d56(0x151)]['alignItems'] = _0x120d56(0x110); const _0x2cf6c4 = document[_0x120d56(0x1a1)](_0x120d56(0x10f)); let _0x4eefb5 = await guichana(_0x353717, _0x512e6d); _0x2cf6c4[_0x120d56(0xfa)] = _0x4eefb5['src'], _0x2cf6c4[_0x120d56(0x13d)] = function () { const _0x12586d = _0x120d56; _0x2cf6c4[_0x12586d(0xfa)] = _0x12586d(0x12a); }, _0x2cf6c4[_0x120d56(0x16d)] = _0x353717, _0x2cf6c4[_0x120d56(0x151)][_0x120d56(0x132)] = _0x120d56(0x193), _0x2cf6c4[_0x120d56(0x151)]['objectFit'] = _0x120d56(0x1ae), _0x2cf6c4[_0x120d56(0x151)][_0x120d56(0x198)] = _0x120d56(0x184); const _0x583b10 = document[_0x120d56(0x1a1)](_0x120d56(0x10f)); _0x583b10[_0x120d56(0xfa)] = _0x5cd8cc, _0x583b10['style'][_0x120d56(0x159)] = '64px', _0x461b15[_0x120d56(0x160)](_0x583b10), _0x461b15['appendChild'](_0x2cf6c4), _0x2b51bc[_0x120d56(0x160)](_0x1164fc), _0x2b51bc[_0x120d56(0x160)](_0x461b15), _0x199f1a[_0x120d56(0x160)](_0x69cee1), _0x199f1a[_0x120d56(0x160)](_0x2b51bc), _0x582ee[_0x120d56(0x160)](_0x199f1a), _0x4360d8['appendChild'](_0x582ee); } _0xdcdb95['appendChild'](_0x4360d8); } const _0x59c83b = document[_0x120d56(0x105)](_0x120d56(0x137)); } document[_0x2ca864(0x179)](_0x2ca864(0x114))[_0x2ca864(0xf8)](_0x2ca864(0x16e), () => { const _0x27329c = _0x2ca864; lastNextResetTime = null, document[_0x27329c(0x179)](_0x27329c(0x192))[_0x27329c(0x106)](new Event(_0x27329c(0x171))); }), document[_0x2ca864(0x179)](_0x2ca864(0x100))[_0x2ca864(0xf8)](_0x2ca864(0x16e), _0x5f0f1b => { const _0x2205d4 = _0x2ca864; _0x5f0f1b['target']['checked'] && (Notification['permission'] !== 'granted' && Notification[_0x2205d4(0x129)]()[_0x2205d4(0x119)](_0x868875 => { if (_0x868875 === 'granted') { } else { } })), document[_0x2205d4(0x179)](_0x2205d4(0x192))[_0x2205d4(0x106)](new Event(_0x2205d4(0x171))); }), document[_0x2ca864(0x179)](_0x2ca864(0x117))[_0x2ca864(0xf8)]('change', function () { const _0x1b5b79 = _0x2ca864; lastNextResetTime = null, document['getElementById'](_0x1b5b79(0x192))[_0x1b5b79(0x106)](new Event('click')); }), document[_0x2ca864(0x179)](_0x2ca864(0x192))[_0x2ca864(0xf8)](_0x2ca864(0x171), async () => { const _0x547944 = _0x2ca864, _0x589af3 = document[_0x547944(0x179)](_0x547944(0x16c))['value'], _0xd15839 = document[_0x547944(0x179)](_0x547944(0x117))[_0x547944(0x154)], _0x4f8c0c = document[_0x547944(0x179)]('apiKeyInput')[_0x547944(0x154)]; if (!_0x589af3 || !_0xd15839 || !_0x4f8c0c) { alert(_0x547944(0x1ac)); if (!_0x589af3) document[_0x547944(0x179)](_0x547944(0x16c))[_0x547944(0x139)](); else { if (!_0xd15839) document[_0x547944(0x179)](_0x547944(0x117))[_0x547944(0x139)](); else !_0x4f8c0c && document[_0x547944(0x179)](_0x547944(0x10d))[_0x547944(0x139)](); } return; } if (lastNextResetTime && lastNextResetTime[_0x547944(0x130)]() === nextResetTime[_0x547944(0x130)]()) return; const _0x13a57b = await fetchData(); _0x13a57b && (await renderData(_0x13a57b), document[_0x547944(0x179)](_0x547944(0x145))[_0x547944(0x133)] && filterData(), lastNextResetTime = nextResetTime), document[_0x547944(0x179)]('loadingOverlay')[_0x547944(0x151)][_0x547944(0x17f)] = _0x547944(0x12c); }), document[_0x2ca864(0x179)](_0x2ca864(0x10d))[_0x2ca864(0xf8)](_0x2ca864(0x180), function () { const _0x516de5 = _0x2ca864, _0x251f9a = this[_0x516de5(0x154)]; localStorage['setItem'](_0x516de5(0x195), _0x251f9a); }), document[_0x2ca864(0x179)](_0x2ca864(0x16c))['addEventListener'](_0x2ca864(0x16e), function () { const _0x2f0913 = _0x2ca864, _0x193c51 = this[_0x2f0913(0x154)]; localStorage[_0x2f0913(0x199)](_0x2f0913(0x1aa), _0x193c51), lastNextResetTime = null, document[_0x2f0913(0x179)](_0x2f0913(0x192))[_0x2f0913(0x106)](new Event(_0x2f0913(0x171))); }), document[_0x2ca864(0x179)](_0x2ca864(0x117))[_0x2ca864(0xf8)](_0x2ca864(0x180), function () { const _0x5dba73 = _0x2ca864, _0x5b6579 = this[_0x5dba73(0x154)]; localStorage['setItem']('channel', _0x5b6579); }), document[_0x2ca864(0x179)](_0x2ca864(0x13c))[_0x2ca864(0xf8)](_0x2ca864(0x180), function () { const _0x343cf4 = _0x2ca864, _0xa91627 = this[_0x343cf4(0x154)]; localStorage[_0x343cf4(0x199)]('tolerance', _0xa91627); }); const totalMinutesInDay = 0x18 * 0x3c, intervalMinutes = 0x24, totalIntervals = totalMinutesInDay / intervalMinutes; let previousResetTime = null, timerId = null, nextResetTime = null, lastNextResetTime = null, resetTime = null; function updateNextResetTime() { const _0x103b87 = _0x2ca864, _0x301113 = new Date(), _0x43e781 = _0x301113[_0x103b87(0x108)]() * 0x3c + _0x301113[_0x103b87(0xf9)](), _0x47f033 = Math['floor'](_0x43e781 / intervalMinutes), _0x25e8c7 = (_0x47f033 + 0x1) % totalIntervals, _0xa0d69d = _0x25e8c7 * intervalMinutes, _0x22e30b = Math[_0x103b87(0xfe)](_0xa0d69d / 0x3c), _0x205170 = _0xa0d69d % 0x3c; nextResetTime = new Date(), nextResetTime[_0x103b87(0x18d)](_0x22e30b, _0x205170, 0x0, 0x0); const _0x273c85 = nextResetTime - _0x301113; _0x273c85 < 0x0 && nextResetTime['setDate'](nextResetTime[_0x103b87(0x185)]() + 0x1); resetTime = new Date(nextResetTime), resetTime[_0x103b87(0x14c)](resetTime['getMinutes']() - intervalMinutes); const _0x2d11b2 = Math['ceil']((nextResetTime - _0x301113) / 0x3e8); previousResetTime && previousResetTime[_0x103b87(0x130)]() !== nextResetTime['getTime']() && (console[_0x103b87(0x12d)](_0x103b87(0x1a8)), fetchedData = [], document[_0x103b87(0x179)](_0x103b87(0x100))[_0x103b87(0x133)] && (timerId && clearTimeout(timerId), timerId = setTimeout(async () => { const _0x36b0ca = _0x103b87, _0x424dff = await fetchData(); _0x424dff && (await renderData(_0x424dff), document['getElementById']('autoFilter')['checked'] && filterData(), windowNotification(_0x36b0ca(0x102))), document[_0x36b0ca(0x179)](_0x36b0ca(0x11e))['style'][_0x36b0ca(0x17f)] = _0x36b0ca(0x12c); }, 0x1 * 0x1e * 0x3e8))), previousResetTime = nextResetTime, document['getElementById']('next-time')[_0x103b87(0x17e)] = '[' + resetTime['toLocaleTimeString']([], { 'hour': '2-digit', 'minute': _0x103b87(0x13a) }) + _0x103b87(0x123) + nextResetTime[_0x103b87(0x1a7)]([], { 'hour': _0x103b87(0x13a), 'minute': '2-digit' }) + _0x103b87(0x10b) + _0x2d11b2 + _0x103b87(0x1ab); } document['addEventListener'](_0x2ca864(0x1a3), () => { updateNextResetTime(), setInterval(updateNextResetTime, 0x3e8); }); function windowNotification(_0x393ae9) { const _0x5c098d = _0x2ca864; Notification[_0x5c098d(0x19c)] !== _0x5c098d(0x188) ? Notification[_0x5c098d(0x129)]()[_0x5c098d(0x119)](_0x285c78 => { const _0x45955a = _0x5c098d; _0x285c78 === _0x45955a(0x188) && showWindowNotification(_0x393ae9); }) : (showWindowNotification(_0x393ae9), console['log'](_0x393ae9)); } function showWindowNotification(_0x2304a9) { const _0x151be9 = _0x2ca864; let _0x348a42 = new Notification('주머니\x20상점\x20정보', { 'body': _0x2304a9, 'icon': _0x151be9(0xfb) }); _0x348a42['onclick'] = () => { window['focus'](); }; }