{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/server-chart.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","makeChart","min","max","data","Highcharts","setOptions","time","timezoneOffset","lang","resetZoom","resetZoomTitle","chart","type","renderTo","backgroundColor","zoomType","pinchType","resetZoomButton","position","align","verticalAlign","x","theme","fill","style","color","states","hover","title","text","xAxis","yAxis","allowDecimals","tickPositioner","numLength","num","Math","floor","log10","positions","interval","ceil","this","dataMax","flat","pow","tick","push","gridLineColor","gridLineDashStyle","legend","enabled","itemStyle","itemHoverStyle","itemHiddenStyle","padding","tooltip","fontWeight","borderRadius","formatter","f","currentPoint","stackValues","pointers","series","forEach","points","point","y","visible","setState","length","dateFormat","positioner","labelWidth","labelHeight","plotX","plotWidth","plotLeft","plotY","plotTop","credits","loading","hideDuration","showDuration","labelStyle","opacity","fontSize","plotOptions","findNearestPointBy","marker","symbol","lineWidthPlus","radius","showLoading","moreInfo","server","info","document","getElementById","clientHeight","height","innerHTML","scrollHeight","updateStatus","status","update","log"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAK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EAAO,SACP6E,GAAS,EACT,MAEF,KAAM,EACJjF,EAAQ,UACRI,EAAO,UACP6E,GAAS,EACT,MAEF,KAAM,EACN,KAAM,EACN,QACEjF,EAAQ,UACRI,EAAO,UAQX,OAJI4E,EAASP,SAASC,eAAeH,EAAS,YACvCxE,MAAMC,MAAQA,EACrBgF,EAAOH,UAAYzE,EAEZ6E,GAGgB,oBAAdtE,KAAKE,QACd7D,OAAOkB,UAAU2C,MAAQ,SAAU9C,GACjC,OAAO4C,KAAKuE,IAAInH,GAAK4C,KAAKuE,IAAI","file":"js/server-chart-50cb147769713bc681e4.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","window.makeChart = function (min, max, data) {\n Highcharts.setOptions({\n time: {\n timezoneOffset: -10 * 60,\n },\n lang: {\n resetZoom: \"Zoom Out\",\n resetZoomTitle: \"Return to original view\",\n },\n });\n var chart = Highcharts.chart(\"server-graph\", {\n chart: {\n type: \"line\",\n renderTo: \"container\",\n backgroundColor: \"rgba(255,255,255, 0)\",\n zoomType: \"x\",\n pinchType: \"x\",\n resetZoomButton: {\n position: {\n // align: 'right', // by default\n // verticalAlign: 'top', // by default\n align: \"left\",\n verticalAlign: \"top\",\n x: 10,\n },\n theme: {\n fill: \"#222\",\n style: {\n color: \"white\",\n },\n r: 0,\n states: {\n hover: {\n fill: \"#333\",\n style: {\n color: \"white\",\n },\n },\n },\n },\n },\n },\n title: {\n text: \"\",\n },\n xAxis: {\n type: \"datetime\",\n title: {\n text: \"Time (AEST)\",\n },\n min: min,\n max: max,\n },\n yAxis: {\n allowDecimals: false,\n min: 0,\n title: {\n text: \"\",\n },\n tickPositioner: function () {\n function numLength(num) {\n return Math.floor(Math.log10(num)) + 1;\n }\n var positions = [],\n interval = Math.max(\n Math.ceil((Math.floor((this.dataMax * 100) / 5 / 10) + 1) / 10),\n 1\n ),\n flat = Math.floor(interval / Math.pow(10, numLength(interval) - 1));\n interval = Math.pow(10, numLength(interval) - 1) * flat;\n tick = 0;\n if (this.dataMax !== null && 0 !== null) {\n for (tick; tick - interval <= this.dataMax; tick += interval) {\n positions.push(tick);\n }\n }\n return positions;\n },\n gridLineColor: \"rgba(100,100,100,50)\",\n gridLineDashStyle: \"longdash\",\n },\n legend: {\n enabled: true,\n align: \"center\",\n itemStyle: {\n color: \"#fff\",\n },\n itemHoverStyle: {\n color: \"rgb(180,255,255)\",\n },\n itemHiddenStyle: {\n color: \"#777\",\n },\n padding: 20,\n // title: {\n // text: 'aaaaaaaaaa',\n // style: {\n // textAlign: 'center'\n // }\n // }\n },\n tooltip: {\n // headerFormat: '{series.name}
',\n // pointFormat: '{point.x:%l:%M %P}: {point.y} Players',\n style: {\n color: \"#FFF\",\n fontWeight: \"bold\",\n },\n backgroundColor: \"#222\",\n borderRadius: 20,\n formatter: function (f) {\n var currentPoint = this,\n stackValues = \"\",\n pointers = [];\n\n chart.series.forEach(function (series) {\n series.points.forEach(function (point) {\n if (\n currentPoint.x === point.x &&\n currentPoint.y === point.y &&\n series.visible\n ) {\n stackValues +=\n '\\u25CF ' +\n series.name +\n \": \" +\n point.y +\n \" online
\";\n pointers.push(point);\n } else {\n point.setState(\"\");\n point.series.setState(\"\");\n }\n });\n });\n\n return (\n \"Server\" +\n (pointers.length == 1 ? \"\" : \"s\") +\n \":\" +\n \"
\" +\n stackValues +\n \"
\" +\n Highcharts.dateFormat(\"%e/%m %l:%M %p\", currentPoint.x)\n );\n },\n\n positioner: function (labelWidth, labelHeight, point) {\n var tooltipX, tooltipY;\n if (point.plotX + labelWidth * 1.25 > this.chart.plotWidth) {\n tooltipX = point.plotX + this.chart.plotLeft - labelWidth - 40;\n } else {\n tooltipX = point.plotX + this.chart.plotLeft + 40;\n }\n tooltipY = point.plotY + this.chart.plotTop - 20;\n return {\n x: tooltipX,\n y: tooltipY,\n };\n },\n },\n credits: {\n enabled: false,\n },\n loading: {\n hideDuration: 500,\n showDuration: 1500,\n labelStyle: {\n color: '#fff',\n opacity: '1',\n fontSize: '2em',\n },\n style: {\n backgroundColor: '#111',\n opacity: '1'\n }\n },\n series: data,\n plotOptions: {\n series: {\n findNearestPointBy: \"xy\",\n marker: {\n enabled: false,\n symbol: \"circle\",\n lineWidthPlus: 2,\n radius: 2,\n },\n },\n },\n });\n chart.showLoading(\"Server Data loading...\");\n return chart;\n};\n\nwindow.moreInfo = function (server) {\n var info = document.getElementById(server + \"-info\");\n var text = document.getElementById(server + \"-showmore\");\n var showMore = \"More info\";\n if (info.clientHeight) {\n info.style.height = 0;\n text.innerHTML = showMore;\n } else {\n text.innerHTML = \"Less info\";\n info.style.height = info.scrollHeight + \"px\";\n }\n};\n\nwindow.updateStatus = function (server, status) {\n var color,\n text,\n update = false; // Update = update player count\n switch (status) {\n case 0:\n color = \"#0ee315\";\n text = \"online\";\n update = true;\n break;\n\n case -2:\n color = \"#ed1811\";\n text = \"offline\";\n update = true;\n break;\n\n case -1:\n case -3:\n default:\n color = \"#ed8611\";\n text = \"unknown\";\n break;\n }\n\n var status = document.getElementById(server + \"-status\");\n status.style.color = color;\n status.innerHTML = text;\n\n return update;\n};\n\nif (typeof Math.log10 == \"undefined\") {\n Object.prototype.log10 = function (n) {\n return Math.log(n) / Math.log(10);\n };\n}\n"],"sourceRoot":""}