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AYL,EAAME,EAAa,EAAG,GACjDE,EAAeE,SAAS,EAAG,EAAG,EAAG,GAC1BF,EAAeG,SACxB,C,oFC7BA,IAAAV,EAAA5B,EAAA,kBAASuC,EAAQC,GAAmV,OAAtOD,EAArD,mBAAXE,QAAoD,iBAApBA,OAAOC,SAAmC,SAAiBF,GAAO,cAAcA,CAAK,EAAsB,SAAiBA,GAAO,OAAOA,GAAyB,mBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,CAAK,EAAYD,EAAQC,EAAM,CAkC1W,SAAAK,EAAgBC,IAC7B,EAAAlB,EAAArB,SAAa,EAAGsB,WAChB,IAAIkB,EAASC,OAAOJ,UAAUK,SAASC,KAAKJ,GAE5C,OAAIA,aAAoB1C,MAA8B,WAAtBmC,EAAQO,IAAqC,kBAAXC,EAEzD,IAAI3C,KAAK0C,EAASK,WACI,iBAAbL,GAAoC,oBAAXC,EAClC,IAAI3C,KAAK0C,IAES,iBAAbA,GAAoC,oBAAXC,GAAoD,oBAAZK,UAE3EA,QAAQC,KAAK,sNAEbD,QAAQC,MAAK,IAAIC,OAAQC,QAGpB,IAAInD,KAAKoD,KAEpB,C,sCCrDe,SAAAC,EAAsBC,EAAUC,GAC7C,GAAIA,EAAKlD,OAASiD,EAChB,MAAM,IAAIE,UAAUF,EAAW,aAAeA,EAAW,EAAI,IAAM,IAAM,uBAAyBC,EAAKlD,OAAS,WAEpH,C","sources":["admin-panel/src/views/overview.js","node_modules/date-fns/esm/getDaysInMonth/index.js","node_modules/date-fns/esm/toDate/index.js","node_modules/date-fns/esm/_lib/requiredArgs/index.js"],"sourcesContent":["import * as React from \"react\";\nimport {Link} from \"react-router-dom\";\nimport {getDaysInMonth} from \"date-fns\";\n\nexport default function Overview(props) {\n\n const today = new Date();\n const numDays = getDaysInMonth(today);\n\n let colors = [ '#ff4444', '#ffbb33', '#00C851', '#33b5e5' ];\n while (colors.length < numDays) {\n colors = colors.concat(colors);\n }\n\n let data = new Array(numDays).fill(0);\n let visitorCount = 0;\n /*\n for (let date in this.state.visitors) {\n if (this.state.visitors.hasOwnProperty(date)) {\n let day = parseInt(date.split(\"/\")[2]) - 1;\n if (day >= 0 && day < numDays) {\n let count = parseInt(this.state.visitors[date]);\n data[day] = count;\n visitorCount += count;\n }\n }\n }\n */\n\n let labels = Array.from(Array(numDays), (_, i) => i + 1);\n let chartOptions = {};\n let chartData = {\n labels: labels,\n datasets: [{\n label: 'Unique Visitors ' + format(today, \"MMMM\"),\n borderWidth: 1,\n data: data,\n backgroundColor: colors,\n }]\n };\n\n /*\n let loadAvg = this.state.server.load_avg;\n if (Array.isArray(this.state.server.load_avg)) {\n loadAvg = this.state.server.load_avg.join(\" \");\n }\n */\n\n return <>\n <div className={\"content-header\"}>\n <div className={\"container-fluid\"}>\n <div className={\"row mb-2\"}>\n <div className={\"col-sm-6\"}>\n <h1 className={\"m-0 text-dark\"}>Dashboard</h1>\n </div>\n <div className={\"col-sm-6\"}>\n <ol className={\"breadcrumb float-sm-right\"}>\n <li className={\"breadcrumb-item\"}><Link to={\"/admin/dashboard\"}>Home</Link></li>\n <li className=\"breadcrumb-item active\">Dashboard</li>\n </ol>\n </div>\n </div>\n </div>\n </div>\n <section className={\"content\"}>\n </section>\n </>\n}\n\n/*\nexport default class Overview extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n chartVisible : true,\n statusVisible : true,\n userCount: 0,\n notificationCount: 0,\n visitorsTotal: 0,\n visitors: { },\n server: { load_avg: [\"Unknown\"] },\n errors: []\n }\n }\n\n removeError(i) {\n if (i >= 0 && i < this.state.errors.length) {\n let errors = this.state.errors.slice();\n errors.splice(i, 1);\n this.setState({...this.state, errors: errors});\n }\n }\n\n componentDidMount() {\n this.parent.api.getStats().then((res) => {\n if(!res.success) {\n let errors = this.state.errors.slice();\n errors.push({ message: res.msg, title: \"Error fetching Stats\" });\n this.setState({ ...this.state, errors: errors });\n } else {\n this.setState({\n ...this.state,\n userCount: res.userCount,\n pageCount: res.pageCount,\n visitors: res.visitors,\n visitorsTotal: res.visitorsTotal,\n server: res.server\n });\n }\n });\n }\n\n render() {\n\n\n }\n}*/","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}"],"names":["$lBpE3","parcelRequire","$7dd706a7a7ce4043$export$2e2bcd8739ae039","props","today","Date","numDays","$2eEzJ","default","colors","length","concat","data","Array","fill","from","_","i","format","jsxs","Fragment","jsx","className","$1dF7x","Link","to","$18SRp","$1a0c5cfa88810db3$export$2e2bcd8739ae039","dirtyDate","$3QBsJ","arguments","date","year","getFullYear","monthIndex","getMonth","lastDayOfMonth","setFullYear","setHours","getDate","$0d5117f350b1bdf8$var$_typeof","obj","Symbol","iterator","constructor","prototype","$0d5117f350b1bdf8$export$2e2bcd8739ae039","argument","argStr","Object","toString","call","getTime","console","warn","Error","stack","NaN","$2cd349b4b0303572$export$2e2bcd8739ae039","required","args","TypeError"],"version":3,"file":"overview.01501b20.js.map"}