From 61447e7fcabb5511e754c9a293353acdc6bc57e4 Mon Sep 17 00:00:00 2001 From: Rawrington Date: Tue, 9 Jul 2019 18:18:47 +0100 Subject: [PATCH] Fixed directory fuckery --- asset-manifest.json | 22 +++++++++---------- index.html | 2 +- ...nifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js | 22 +++++++++++++++++++ ...nifest.7b2e40b76553424624942cc4a4077cd5.js | 22 ------------------- service-worker.js | 4 ++-- ...476c50.chunk.js => main.2e1acc3f.chunk.js} | 2 +- ...hunk.js.map => main.2e1acc3f.chunk.js.map} | 2 +- ...n.f181b48f.js => runtime~main.20fadea3.js} | 4 ++-- ...8f.js.map => runtime~main.20fadea3.js.map} | 2 +- 9 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js delete mode 100644 precache-manifest.7b2e40b76553424624942cc4a4077cd5.js rename static/js/{main.60476c50.chunk.js => main.2e1acc3f.chunk.js} (98%) rename static/js/{main.60476c50.chunk.js.map => main.2e1acc3f.chunk.js.map} (99%) rename static/js/{runtime~main.f181b48f.js => runtime~main.20fadea3.js} (92%) rename static/js/{runtime~main.f181b48f.js.map => runtime~main.20fadea3.js.map} (98%) diff --git a/asset-manifest.json b/asset-manifest.json index 44e3df8..25810bc 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { - "main.css": "/skilldisplay/static/css/main.d40aef55.chunk.css", - "main.js": "/skilldisplay/static/js/main.60476c50.chunk.js", - "main.js.map": "/skilldisplay/static/js/main.60476c50.chunk.js.map", - "runtime~main.js": "/skilldisplay/static/js/runtime~main.f181b48f.js", - "runtime~main.js.map": "/skilldisplay/static/js/runtime~main.f181b48f.js.map", - "static/js/2.7cddf10a.chunk.js": "/skilldisplay/static/js/2.7cddf10a.chunk.js", - "static/js/2.7cddf10a.chunk.js.map": "/skilldisplay/static/js/2.7cddf10a.chunk.js.map", - "index.html": "/skilldisplay/index.html", - "precache-manifest.7b2e40b76553424624942cc4a4077cd5.js": "/skilldisplay/precache-manifest.7b2e40b76553424624942cc4a4077cd5.js", - "service-worker.js": "/skilldisplay/service-worker.js", - "static/css/main.d40aef55.chunk.css.map": "/skilldisplay/static/css/main.d40aef55.chunk.css.map" + "main.css": "/SkillDisplay/static/css/main.d40aef55.chunk.css", + "main.js": "/SkillDisplay/static/js/main.2e1acc3f.chunk.js", + "main.js.map": "/SkillDisplay/static/js/main.2e1acc3f.chunk.js.map", + "runtime~main.js": "/SkillDisplay/static/js/runtime~main.20fadea3.js", + "runtime~main.js.map": "/SkillDisplay/static/js/runtime~main.20fadea3.js.map", + "static/js/2.7cddf10a.chunk.js": "/SkillDisplay/static/js/2.7cddf10a.chunk.js", + "static/js/2.7cddf10a.chunk.js.map": "/SkillDisplay/static/js/2.7cddf10a.chunk.js.map", + "index.html": "/SkillDisplay/index.html", + "precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js": "/SkillDisplay/precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js", + "service-worker.js": "/SkillDisplay/service-worker.js", + "static/css/main.d40aef55.chunk.css.map": "/SkillDisplay/static/css/main.d40aef55.chunk.css.map" } } \ No newline at end of file diff --git a/index.html b/index.html index cad84c9..985fbb7 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Skill Display
\ No newline at end of file +Skill Display
\ No newline at end of file diff --git a/precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js b/precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js new file mode 100644 index 0000000..f95bdc0 --- /dev/null +++ b/precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js @@ -0,0 +1,22 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "332ff82ad0268c5b3445ffdd7a031cbf", + "url": "/SkillDisplay/index.html" + }, + { + "revision": "ceb638e4cbf0a8435ca4", + "url": "/SkillDisplay/static/css/main.d40aef55.chunk.css" + }, + { + "revision": "e3e1726d43da044c5a6a", + "url": "/SkillDisplay/static/js/2.7cddf10a.chunk.js" + }, + { + "revision": "ceb638e4cbf0a8435ca4", + "url": "/SkillDisplay/static/js/main.2e1acc3f.chunk.js" + }, + { + "revision": "e4ff8796ac8613602dd0", + "url": "/SkillDisplay/static/js/runtime~main.20fadea3.js" + } +]); \ No newline at end of file diff --git a/precache-manifest.7b2e40b76553424624942cc4a4077cd5.js b/precache-manifest.7b2e40b76553424624942cc4a4077cd5.js deleted file mode 100644 index dbddfb4..0000000 --- a/precache-manifest.7b2e40b76553424624942cc4a4077cd5.js +++ /dev/null @@ -1,22 +0,0 @@ -self.__precacheManifest = (self.__precacheManifest || []).concat([ - { - "revision": "61e324c0f70e3687566bd7bd0366532f", - "url": "/skilldisplay/index.html" - }, - { - "revision": "69970936accdcef39be9", - "url": "/skilldisplay/static/css/main.d40aef55.chunk.css" - }, - { - "revision": "e3e1726d43da044c5a6a", - "url": "/skilldisplay/static/js/2.7cddf10a.chunk.js" - }, - { - "revision": "69970936accdcef39be9", - "url": "/skilldisplay/static/js/main.60476c50.chunk.js" - }, - { - "revision": "3872d246eea7a30b8483", - "url": "/skilldisplay/static/js/runtime~main.f181b48f.js" - } -]); \ No newline at end of file diff --git a/service-worker.js b/service-worker.js index bd7b907..fd4eb2f 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/skilldisplay/precache-manifest.7b2e40b76553424624942cc4a4077cd5.js" + "/SkillDisplay/precache-manifest.2a9a97c21f02cff8e5a5de54ccc57c0a.js" ); self.addEventListener('message', (event) => { @@ -33,7 +33,7 @@ workbox.core.clientsClaim(); self.__precacheManifest = [].concat(self.__precacheManifest || []); workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); -workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/skilldisplay/index.html"), { +workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/SkillDisplay/index.html"), { blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], }); diff --git a/static/js/main.60476c50.chunk.js b/static/js/main.2e1acc3f.chunk.js similarity index 98% rename from static/js/main.60476c50.chunk.js rename to static/js/main.2e1acc3f.chunk.js index 1a9e3f9..19d132b 100644 --- a/static/js/main.60476c50.chunk.js +++ b/static/js/main.2e1acc3f.chunk.js @@ -1,2 +1,2 @@ (window.webpackJsonp=window.webpackJsonp||[]).push([[0],{15:function(t,e,n){},16:function(t,e,n){},17:function(t,e,n){},18:function(t,e,n){"use strict";n.r(e);var a=n(0),i=n.n(a),o=n(8),c=n.n(o),r=(n(15),n(1)),s=n(2),u=n(5),l=n(4),h=n(3),d=n(6);n(16),n(17);var v=function(t){function e(t){var n;Object(r.a)(this,e),(n=Object(u.a)(this,Object(l.a)(e).call(this,t))).state={xivapi_data:[]};var a="https://xivapi.com/Action/"+t.action_id;return console.log(a),fetch(a,{mode:"cors"}).then(function(t){return t.json()}).then(function(t){n.setState({xivapi_data:t})}),n}return Object(d.a)(e,t),Object(s.a)(e,[{key:"shouldComponentUpdate",value:function(){return 0!==Object.getOwnPropertyNames(this.state.xivapi_data).length}},{key:"isGCD",value:function(){return 4!==this.state.xivapi_data.ActionCategory.ID}},{key:"render",value:function(){if(this.state.xivapi_data.Icon){var t=this.isGCD()?"action-icon gcd":"action-icon ogcd",e="https://xivapi.com"+this.state.xivapi_data.Icon;return i.a.createElement("img",{className:t,src:e,alt:""})}return null}}]),e}(i.a.Component),f=function(t){function e(t){var n;return Object(r.a)(this,e),(n=Object(u.a)(this,Object(l.a)(e).call(this,t))).state={me:0,actionlist:[],actionindex:1},function t(e){var n=new URLSearchParams(window.location.search),a="".concat(n.get("HOST_PORT"),"BeforeLogLineRead")||!1,i=new WebSocket(a);i.onerror=function(){return t()},i.onmessage=function(t,n){if("."===t.data)return i.send(".");var a=JSON.parse(t.data);if("SendCharName"===a.msgtype)return console.log(a.msg.charID),console.log(a.msg.charName),e(a.msg);if("Chat"===a.msgtype){var o=a.msg.substring(0,2);if("21"===o||"22"===o)return e(a.msg)}}}(n.handleLogEvent.bind(Object(h.a)(n))),n}return Object(d.a)(e,t),Object(s.a)(e,[{key:"addActionToOverlay",value:function(t){this.setState(function(e){return{actionlist:e.actionlist.concat(t)}})}},{key:"handleLogEvent",value:function(t){if(t.charID)return this.setState({me:t.charID}),void console.log(t.charID);var e=this.state.me;if(0!==e){var n=t.split("|");if(parseInt(n[2],16)===e){var a=parseInt(n[4],16);if(7!==a){var i=this.state.actionindex;this.addActionToOverlay({index:i,action:a}),this.setState(function(t){return{actionindex:t.actionindex>=32?1:t.actionindex+1}}),setTimeout(this.purgeAction.bind(this),1e4)}}}}},{key:"purgeAction",value:function(){this.setState(function(t){return{actionlist:t.actionlist.slice(1)}})}},{key:"render",value:function(){var t=[];for(var e in console.log(this.state.actionlist),this.state.actionlist){var n=this.state.actionlist[e];t.push(i.a.createElement(v,{key:n.index,action_id:n.action}))}return i.a.createElement("div",{className:"actions"},t)}}]),e}(i.a.Component);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));c.a.render(i.a.createElement(f,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(t){t.unregister()})},9:function(t,e,n){t.exports=n(18)}},[[9,1,2]]]); -//# sourceMappingURL=main.60476c50.chunk.js.map \ No newline at end of file +//# sourceMappingURL=main.2e1acc3f.chunk.js.map \ No newline at end of file diff --git a/static/js/main.60476c50.chunk.js.map b/static/js/main.2e1acc3f.chunk.js.map similarity index 99% rename from static/js/main.60476c50.chunk.js.map rename to static/js/main.2e1acc3f.chunk.js.map index bbcd515..9c4eb40 100644 --- a/static/js/main.60476c50.chunk.js.map +++ b/static/js/main.2e1acc3f.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["Action.js","App.js","ACTWebsocket.js","serviceWorker.js","index.js"],"names":["Action","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","state","xivapi_data","actionUrl","action_id","console","log","fetch","mode","then","response","json","data","setState","getOwnPropertyNames","length","ActionCategory","ID","Icon","classes","isGCD","img","react_default","a","createElement","className","src","alt","React","Component","App","me","actionlist","actionindex","listenActWebSocket","callback","url","URLSearchParams","window","location","search","wsUri","concat","get","undefined","ws","WebSocket","onerror","onmessage","e","m","send","obj","JSON","parse","msgtype","msg","charID","charName","code","substring","handleLogEvent","bind","assertThisInitialized","split","parseInt","action","index","addActionToOverlay","setTimeout","purgeAction","slice","actions","id","push","src_Action","key","Boolean","hostname","match","ReactDOM","render","src_App","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"qQA4CeA,cApCd,SAAAA,EAAYC,GAAO,IAAAC,EAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IAClBE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KALPQ,MAAQ,CACPC,YAAa,IAMb,IAAMC,EAAY,6BAA6BV,EAAMW,UAHnC,OAKlBC,QAAQC,IAAIH,GAEZI,MAAMJ,EAAW,CAAEK,KAAM,SACvBC,KAAK,SAAAC,GAAQ,OAAIA,EAASC,SAC1BF,KAAK,SAAAG,GAASlB,EAAKmB,SAAS,CAACX,YAAaU,MAT1BlB,uFAalB,OAAkE,IAA9DC,OAAOmB,oBAAoBjB,KAAKI,MAAMC,aAAaa,uCAOvD,OAAqD,IAA7ClB,KAAKI,MAAMC,YAAYc,eAAeC,oCAI9C,GAAGpB,KAAKI,MAAMC,YAAYgB,KAAM,CAC/B,IAAMC,EAAUtB,KAAKuB,QAAQ,kBAAkB,mBACzCC,EAAM,qBAAqBxB,KAAKI,MAAMC,YAAYgB,KACxD,OAAOI,EAAAC,EAAAC,cAAA,OAAKC,UAAWN,EAASO,IAAKL,EAAKM,IA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IzB,EAAMM,EAAKoD,MAAM,KAErB,GAAGC,SAAS3D,EAAI,GAAG,MAAQyB,EAA3B,CAEA,IAAMmC,EAASD,SAAS3D,EAAI,GAAG,IAE/B,GAAc,IAAX4D,EAAH,CAEA,IAAMC,EAAQtE,KAAKI,MAAMgC,YAEzBpC,KAAKuE,mBAAmB,CAACD,QAAMD,WAE/BrE,KAAKgB,SAAS,SAACZ,GAGd,MAAO,CAACgC,YAFahC,EAAMgC,aAAe,GAAI,EAAEhC,EAAMgC,YAAY,KAKnEoC,WAAWxE,KAAKyE,YAAYR,KAAKjE,MAAO,8CAIxCA,KAAKgB,SAAS,SAACZ,GAGd,MAAO,CAAC+B,WAFW/B,EAAM+B,WAAWuC,MAAM,uCAO3C,IAAIC,EAAU,GAId,IAAK,IAAMC,KAFXpE,QAAQC,IAAIT,KAAKI,MAAM+B,YAENnC,KAAKI,MAAM+B,WAAY,CACvC,IAAMkC,EAASrE,KAAKI,MAAM+B,WAAWyC,GACrCD,EAAQE,KAAKpD,EAAAC,EAAAC,cAACmD,EAAD,CAAQC,IAAKV,EAAOC,MAAO/D,UAAW8D,EAAOA,UAG3D,OAAO5C,EAAAC,EAAAC,cAAA,OAAKC,UAAU,WAAW+C,UAvEjB5C,IAAMC,WEOJgD,QACW,cAA7BvC,OAAOC,SAASuC,UAEe,UAA7BxC,OAAOC,SAASuC,UAEhBxC,OAAOC,SAASuC,SAASC,MACvB,2DCZNC,IAASC,OAAO3D,EAAAC,EAAAC,cAAC0D,EAAD,MAASC,SAASC,eAAe,SD2H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM9E,KAAK,SAAA+E,GACjCA,EAAaC","file":"static/js/main.60476c50.chunk.js","sourcesContent":["import React from 'react'\r\nimport './css/Action.css'\r\n\r\nclass Action extends React.Component {\r\n\tstate = {\r\n\t\txivapi_data: []\r\n\t}\r\n\t\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\t\r\n\t\tconst actionUrl = \"https://xivapi.com/Action/\"+props.action_id;\r\n\t\t\r\n\t\tconsole.log(actionUrl)\r\n\t\t\r\n\t\tfetch(actionUrl, { mode: 'cors' })\r\n\t\t\t.then(response => response.json())\r\n\t\t\t.then(data => {this.setState({xivapi_data: data})})\r\n\t}\r\n\t\r\n\tshouldComponentUpdate() {\r\n\t\tif (Object.getOwnPropertyNames(this.state.xivapi_data).length === 0) {\r\n\t\t\treturn false\r\n\t\t}\r\n\t\treturn true\r\n\t}\r\n\t\r\n\tisGCD() {\r\n\t\treturn (this.state.xivapi_data.ActionCategory.ID !== 4)\r\n\t}\r\n\t\r\n\trender() {\r\n\t\tif(this.state.xivapi_data.Icon) {\r\n\t\t\tconst classes = this.isGCD()?'action-icon gcd':'action-icon ogcd'\r\n\t\t\tconst img = \"https://xivapi.com\"+this.state.xivapi_data.Icon\r\n\t\t\treturn \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null\r\n\t\t}\r\n }\r\n}\r\n\r\nexport default Action","import React from 'react'\nimport listenActWebSocket from './ACTWebsocket'\nimport './css/App.css'\nimport Action from './Action'\n\nclass App extends React.Component {\n\tstate = {\n\t\tme: 0,\n\t\tactionlist: [],\n\t\tactionindex: 1\n\t}\n\t\n\tconstructor(props) {\n\t\tsuper(props)\n\t\t\n\t\tlistenActWebSocket(this.handleLogEvent.bind(this))\n\t}\n\t\n\taddActionToOverlay(action_id) {\n\t\tthis.setState((state) => {\n\t\t\tconst actionlist = state.actionlist.concat(action_id);\n\t\t\n\t\t\treturn {actionlist}\n\t\t})\n\t}\n\t\n\thandleLogEvent(data) {\n\t\tif(data.charID) {\n\t\t\tthis.setState({me: data.charID})\n\t\t\tconsole.log(data.charID)\n\t\t\treturn\n\t\t} //the ME data we need\n\t\t\n\t\tconst me = this.state.me\n\t\t\n\t\tif(me === 0) return //we need data on the character first\n\t\t\n\t\tlet log = data.split('|')\n\t\t\n\t\tif(parseInt(log[2],16) !== me) return //we only care about our actions\n\t\t\n\t\tconst action = parseInt(log[4],16)\n\t\t\n\t\tif(action === 7) return //auto-attack\n\t\t\n\t\tconst index = this.state.actionindex\n\t\t\n\t\tthis.addActionToOverlay({index,action})\n\t\t\n\t\tthis.setState((state) => {\n\t\t\tconst actionindex = (state.actionindex >= 32)?1:state.actionindex+1\n\t\t\t\n\t\t\treturn {actionindex}\n\t\t})\n\t\t\n\t\tsetTimeout(this.purgeAction.bind(this), 10000)\n\t}\n\t\n\tpurgeAction() {\n\t\tthis.setState((state) => {\n\t\t\tconst actionlist = state.actionlist.slice(1)\n\t\t\t\n\t\t\treturn {actionlist}\n\t\t})\n\t}\n\t\n\trender() {\n\t\tlet actions = []\n\t\t\n\t\tconsole.log(this.state.actionlist)\n\t\t\n\t\tfor (const id in this.state.actionlist) {\n\t\t\tconst action = this.state.actionlist[id]\n\t\t\tactions.push()\n\t\t}\n\t\t\n\t\treturn
{actions}
\n\t}\n}\n\nexport default App;\n","export default function listenActWebSocket(callback) {\r\n\tconst url = new URLSearchParams(window.location.search)\r\n\tconst wsUri = `${url.get('HOST_PORT')}BeforeLogLineRead` || undefined\r\n\tconst ws = new WebSocket(wsUri)\r\n\tws.onerror = () => listenActWebSocket()\r\n\tws.onmessage = function (e, m) { //PING\r\n\t\tif (e.data === '.') return ws.send('.') //PONG\r\n\t\t\r\n\t\tconst obj = JSON.parse(e.data)\r\n\t\tif(obj.msgtype === 'SendCharName')\r\n\t\t{\r\n\t\t\tconsole.log(obj.msg.charID)\r\n\t\t\tconsole.log(obj.msg.charName)\r\n\t\t\treturn callback(obj.msg)\r\n\t\t}\r\n\t\telse if(obj.msgtype === 'Chat')\r\n\t\t{\r\n\t\t\tconst code = obj.msg.substring(0, 2) //first 2 numbers POG\r\n\r\n\t\t\tif(code === '21' || code === '22') return callback(obj.msg) //NetworkAbility or NetworkAoeAbility\r\n\t\t}\r\n\t}\r\n}","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './css/index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["Action.js","App.js","ACTWebsocket.js","serviceWorker.js","index.js"],"names":["Action","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","state","xivapi_data","actionUrl","action_id","console","log","fetch","mode","then","response","json","data","setState","getOwnPropertyNames","length","ActionCategory","ID","Icon","classes","isGCD","img","react_default","a","createElement","className","src","alt","React","Component","App","me","actionlist","actionindex","listenActWebSocket","callback","url","URLSearchParams","window","location","search","wsUri","concat","get","undefined","ws","WebSocket","onerror","onmessage","e","m","send","obj","JSON","parse","msgtype","msg","charID","charName","code","substring","handleLogEvent","bind","assertThisInitialized","split","parseInt","action","index","addActionToOverlay","setTimeout","purgeAction","slice","actions","id","push","src_Action","key","Boolean","hostname","match","ReactDOM","render","src_App","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"qQA4CeA,cApCd,SAAAA,EAAYC,GAAO,IAAAC,EAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IAClBE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KALPQ,MAAQ,CACPC,YAAa,IAMb,IAAMC,EAAY,6BAA6BV,EAAMW,UAHnC,OAKlBC,QAAQC,IAAIH,GAEZI,MAAMJ,EAAW,CAAEK,KAAM,SACvBC,KAAK,SAAAC,GAAQ,OAAIA,EAASC,SAC1BF,KAAK,SAAAG,GAASlB,EAAKmB,SAAS,CAACX,YAAaU,MAT1BlB,uFAalB,OAAkE,IAA9DC,OAAOmB,oBAAoBjB,KAAKI,MAAMC,aAAaa,uCAOvD,OAAqD,IAA7ClB,KAAKI,MAAMC,YAAYc,eAAeC,oCAI9C,GAAGpB,KAAKI,MAAMC,YAAYgB,KAAM,CAC/B,IAAMC,EAAUtB,KAAKuB,QAAQ,kBAAkB,mBACzCC,EAAM,qBAAqBxB,KAAKI,MAAMC,YAAYgB,KACxD,OAAOI,EAAAC,EAAAC,cAAA,OAAKC,UAAWN,EAASO,IAAKL,EAAKM,IAAI,KAI9C,OAAO,YApCWC,IAAMC,WC6EZC,cApEd,SAAAA,EAAYrC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAiC,IAClBpC,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAmC,GAAA9B,KAAAH,KAAMJ,KAPPQ,MA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SAAS,SAACZ,GAGd,MAAO,CAACgC,YAFahC,EAAMgC,aAAe,GAAI,EAAEhC,EAAMgC,YAAY,KAKnEoC,WAAWxE,KAAKyE,YAAYR,KAAKjE,MAAO,8CAIxCA,KAAKgB,SAAS,SAACZ,GAGd,MAAO,CAAC+B,WAFW/B,EAAM+B,WAAWuC,MAAM,uCAO3C,IAAIC,EAAU,GAId,IAAK,IAAMC,KAFXpE,QAAQC,IAAIT,KAAKI,MAAM+B,YAENnC,KAAKI,MAAM+B,WAAY,CACvC,IAAMkC,EAASrE,KAAKI,MAAM+B,WAAWyC,GACrCD,EAAQE,KAAKpD,EAAAC,EAAAC,cAACmD,EAAD,CAAQC,IAAKV,EAAOC,MAAO/D,UAAW8D,EAAOA,UAG3D,OAAO5C,EAAAC,EAAAC,cAAA,OAAKC,UAAU,WAAW+C,UAvEjB5C,IAAMC,WEOJgD,QACW,cAA7BvC,OAAOC,SAASuC,UAEe,UAA7BxC,OAAOC,SAASuC,UAEhBxC,OAAOC,SAASuC,SAASC,MACvB,2DCZNC,IAASC,OAAO3D,EAAAC,EAAAC,cAAC0D,EAAD,MAASC,SAASC,eAAe,SD2H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM9E,KAAK,SAAA+E,GACjCA,EAAaC","file":"static/js/main.2e1acc3f.chunk.js","sourcesContent":["import React from 'react'\r\nimport './css/Action.css'\r\n\r\nclass Action extends React.Component {\r\n\tstate = {\r\n\t\txivapi_data: []\r\n\t}\r\n\t\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\t\r\n\t\tconst actionUrl = \"https://xivapi.com/Action/\"+props.action_id;\r\n\t\t\r\n\t\tconsole.log(actionUrl)\r\n\t\t\r\n\t\tfetch(actionUrl, { mode: 'cors' })\r\n\t\t\t.then(response => response.json())\r\n\t\t\t.then(data => {this.setState({xivapi_data: data})})\r\n\t}\r\n\t\r\n\tshouldComponentUpdate() {\r\n\t\tif (Object.getOwnPropertyNames(this.state.xivapi_data).length === 0) {\r\n\t\t\treturn false\r\n\t\t}\r\n\t\treturn true\r\n\t}\r\n\t\r\n\tisGCD() {\r\n\t\treturn (this.state.xivapi_data.ActionCategory.ID !== 4)\r\n\t}\r\n\t\r\n\trender() {\r\n\t\tif(this.state.xivapi_data.Icon) {\r\n\t\t\tconst classes = this.isGCD()?'action-icon gcd':'action-icon ogcd'\r\n\t\t\tconst img = \"https://xivapi.com\"+this.state.xivapi_data.Icon\r\n\t\t\treturn \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null\r\n\t\t}\r\n }\r\n}\r\n\r\nexport default Action","import React from 'react'\nimport listenActWebSocket from './ACTWebsocket'\nimport './css/App.css'\nimport Action from './Action'\n\nclass App extends React.Component {\n\tstate = {\n\t\tme: 0,\n\t\tactionlist: [],\n\t\tactionindex: 1\n\t}\n\t\n\tconstructor(props) {\n\t\tsuper(props)\n\t\t\n\t\tlistenActWebSocket(this.handleLogEvent.bind(this))\n\t}\n\t\n\taddActionToOverlay(action_id) {\n\t\tthis.setState((state) => {\n\t\t\tconst actionlist = state.actionlist.concat(action_id);\n\t\t\n\t\t\treturn {actionlist}\n\t\t})\n\t}\n\t\n\thandleLogEvent(data) {\n\t\tif(data.charID) {\n\t\t\tthis.setState({me: data.charID})\n\t\t\tconsole.log(data.charID)\n\t\t\treturn\n\t\t} //the ME data we need\n\t\t\n\t\tconst me = this.state.me\n\t\t\n\t\tif(me === 0) return //we need data on the character first\n\t\t\n\t\tlet log = data.split('|')\n\t\t\n\t\tif(parseInt(log[2],16) !== me) return //we only care about our actions\n\t\t\n\t\tconst action = parseInt(log[4],16)\n\t\t\n\t\tif(action === 7) return //auto-attack\n\t\t\n\t\tconst index = this.state.actionindex\n\t\t\n\t\tthis.addActionToOverlay({index,action})\n\t\t\n\t\tthis.setState((state) => {\n\t\t\tconst actionindex = (state.actionindex >= 32)?1:state.actionindex+1\n\t\t\t\n\t\t\treturn {actionindex}\n\t\t})\n\t\t\n\t\tsetTimeout(this.purgeAction.bind(this), 10000)\n\t}\n\t\n\tpurgeAction() {\n\t\tthis.setState((state) => {\n\t\t\tconst actionlist = state.actionlist.slice(1)\n\t\t\t\n\t\t\treturn {actionlist}\n\t\t})\n\t}\n\t\n\trender() {\n\t\tlet actions = []\n\t\t\n\t\tconsole.log(this.state.actionlist)\n\t\t\n\t\tfor (const id in this.state.actionlist) {\n\t\t\tconst action = this.state.actionlist[id]\n\t\t\tactions.push()\n\t\t}\n\t\t\n\t\treturn
{actions}
\n\t}\n}\n\nexport default App;\n","export default function listenActWebSocket(callback) {\r\n\tconst url = new URLSearchParams(window.location.search)\r\n\tconst wsUri = `${url.get('HOST_PORT')}BeforeLogLineRead` || undefined\r\n\tconst ws = new WebSocket(wsUri)\r\n\tws.onerror = () => listenActWebSocket()\r\n\tws.onmessage = function (e, m) { //PING\r\n\t\tif (e.data === '.') return ws.send('.') //PONG\r\n\t\t\r\n\t\tconst obj = JSON.parse(e.data)\r\n\t\tif(obj.msgtype === 'SendCharName')\r\n\t\t{\r\n\t\t\tconsole.log(obj.msg.charID)\r\n\t\t\tconsole.log(obj.msg.charName)\r\n\t\t\treturn callback(obj.msg)\r\n\t\t}\r\n\t\telse if(obj.msgtype === 'Chat')\r\n\t\t{\r\n\t\t\tconst code = obj.msg.substring(0, 2) //first 2 numbers POG\r\n\r\n\t\t\tif(code === '21' || code === '22') return callback(obj.msg) //NetworkAbility or NetworkAoeAbility\r\n\t\t}\r\n\t}\r\n}","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './css/index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/runtime~main.f181b48f.js b/static/js/runtime~main.20fadea3.js similarity index 92% rename from static/js/runtime~main.f181b48f.js rename to static/js/runtime~main.20fadea3.js index e11b1f1..11f2f92 100644 --- a/static/js/runtime~main.f181b48f.js +++ b/static/js/runtime~main.20fadea3.js @@ -1,2 +1,2 @@ -!function(e){function r(r){for(var n,l,i=r[0],f=r[1],a=r[2],c=0,s=[];c