/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { // General JavaScript __webpack_require__ (1)(); // Page-specific JavaScript const pageName = document.getElementsByTagName("body")[0].id; try { __webpack_require__(3)("./" + pageName)(); } catch (error) { console.log( "Something went wrong when loading the js for this page...\n" + "The pageName is \"" + pageName + "\".\n" + "If it was excpected to get js for this page, please check the filename, and recompile webpack." ); } // Require all styles __webpack_require__(8); // Require font awesome __webpack_require__(10); /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { let sidenav = __webpack_require__(2); module.exports = () => { const pageName = document.getElementsByTagName("body")[0].id; if (pageName == "neo_ide") { return; } document.getElementById("sidenav").innerHTML = sidenav; M.AutoInit(); }; /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = ` `; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var map = { "./": 4, "./general": 1, "./general.js": 1, "./index": 4, "./index.js": 4, "./logviewer": 5, "./logviewer.js": 5, "./neo_ide": 6, "./neo_ide.js": 6, "./scripts": 7, "./scripts.js": 7 }; function webpackContext(req) { var id = webpackContextResolve(req); return __webpack_require__(id); } function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) { // check for number or string var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } return id; } webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = 3; /***/ }), /* 4 */ /***/ (function(module, exports) { let socket = io(); module.exports = () => { M.AutoInit(); setupSocket(); setInterval(() => { socket.emit("GetGeneralInfo"); }, 500); socket.emit("GetLog", {filter: "success error event", entryN: 10}); }; function setupSocket() { socket.on("lastLogEntries", (entries) => { let list = ""; entries.forEach((entry) => { list += "" + prettifyType(entry.type) + "" + entry.time + "" + entry.details + ""; }); document.getElementById("log-table-body").innerHTML = list; M.AutoInit(); }); socket.on("newLogEntry", (entry) => { // Start with parsing the new entry, no reason to select the DOM-element and stuff, if we are filtering out the entry anyway. let type = entry.type; if ( (type.toUpperCase() !== "SUCCESS") && (type.toUpperCase() !== "ERROR") && (type.toUpperCase() !== "EVENT") && (type.toUpperCase() !== "INFO")) { return; } let logTable = document.getElementById("log-table-body"); let LTable = logTable.rows.length; logTable.deleteRow(LTable - 1); // Since length outputs a 1-based number let newEntry = logTable.insertRow(0); newEntry.insertCell(0).innerHTML = prettifyType(entry.type); newEntry.insertCell(1).innerHTML = entry.time; newEntry.insertCell(2).innerHTML = entry.details; M.AutoInit(); newEntry.className = "newLogEntry"; }); socket.on("generalInfo", (info) => { if (info["scriptIsExited"]) { document.getElementById("currentScript").innerHTML = info["currentScript"] + " (exited)"; } else { document.getElementById("currentScript").innerHTML = info["currentScript"]; } document.getElementById("uptime").innerHTML = info["uptime"] + " seconds"; }); } function prettifyType(type) { let prettyTable = { "DEBUG": `😸`, "INFO": `â„šī¸`, "WARNING": `âš ī¸`, "EVENT": `âšĄī¸`, "SUCCESS": `✅`, "ERROR": `🔴`, "PYTHON": `🐍` }; return prettyTable[type]; } /***/ }), /* 5 */ /***/ (function(module, exports) { let socket = io(); module.exports = () => { M.AutoInit(); socket.emit("GetLog", {filter: "success error event debug python info warning", entryN: 1000}); socket.on("lastLogEntries", (entries) => { M.toast({html: "Loading log-files..."}); console.log("Log-entries received: " + entries.length); let HTMLBasicTable = ""; let HTMLAdvancedTable = ""; let HTMLScriptTable = ""; let HTMLRAWTable = ""; entries.forEach((entry) => { let strHTML = "" + prettifyType(entry.type) + "" + entry.time + "" + entry.details + ""; if (entry.type === "SUCCESS") { HTMLBasicTable += strHTML; } if (entry.type === "ERROR") { HTMLBasicTable += strHTML; } if (entry.type === "EVENT") { HTMLBasicTable += strHTML; } if (entry.type === "PYTHON") { HTMLScriptTable += strHTML; } if (entry.type !== "PYTHON") { HTMLAdvancedTable += strHTML; } //HTMLRAWTable += entry.join(" "); }); document.getElementById("log-table-basic").innerHTML = HTMLBasicTable; document.getElementById("log-table-script").innerHTML = HTMLScriptTable; document.getElementById("log-table-advanced").innerHTML = HTMLAdvancedTable; //document.getElementById("log-table-raw").innerHTML = HTMLRAWTable; }); socket.on("newLogEntry", (entry) => { if (entry.type === "SUCCESS") { appendEntryToTable("log-table-basic", entry); } if (entry.type === "ERROR") { appendEntryToTable("log-table-basic", entry); } if (entry.type === "EVENT") { appendEntryToTable("log-table-basic", entry); } if (entry.type === "PYTHON") { appendEntryToTable("log-table-script", entry); } if (entry.type !== "PYTHON") { appendEntryToTable("log-table-advanced", entry); } }); }; function appendEntryToTable(tableName, entry) { let newEntry = document.getElementById(tableName).insertRow(0); newEntry.insertCell(0).innerHTML = prettifyType(entry.type); newEntry.insertCell(1).innerHTML = entry.time; newEntry.insertCell(2).innerHTML = entry.details; M.AutoInit(); newEntry.className = "newLogEntry"; } function prettifyType(type) { let prettyTable = { "DEBUG": `😸`, "INFO": `â„šī¸`, "WARNING": `âš ī¸`, "EVENT": `âšĄī¸`, "SUCCESS": `✅`, "ERROR": `🔴`, "PYTHON": `🐍` }; return prettyTable[type]; } /***/ }), /* 6 */ /***/ (function(module, exports) { module.exports = () => { }; /***/ }), /* 7 */ /***/ (function(module, exports) { module.exports = () => { let socket = io(); socket.emit("GetScripts", {}); socket.on("updatedScriptList", (scriptList) => { let localScriptsHTML = ""; let remoteScriptsHTML = ""; for (let i = 0; i < scriptList.length; i++) { if (scriptList[i].loc !== "local") { continue; } let HTMLElem = "
  • {{script_name}}

    {{badges}}

    {{buttons}}
  • "; if (scriptList[i].loc === "local") { HTMLElem = HTMLElem.replace("{{badges}}", ""); HTMLElem = HTMLElem.replace("{{script_name}}", scriptList[i].name); HTMLElem = HTMLElem.replace("{{buttons}}", "play_arrow" + "edit" + "delete_forever" ); localScriptsHTML += HTMLElem; } else if (scriptList[i].loc === "remote") { HTMLElem = HTMLElem.replace("{{badges}}", "GitHub"); HTMLElem = HTMLElem.replace("{{script_name}}", scriptList[i].name); remoteScriptsHTML += HTMLElem; } } document.getElementById("local-scripts").innerHTML = localScriptsHTML; document.getElementById("remote-scripts").innerHTML = remoteScriptsHTML; }); /* The delays here with settimeout, is set to a second deliberately, because, rather than making a whole checking-thing. We just wait a second, and assume, that if it worked, the change should show now. Else, check the logViewer. */ function clickHandler(event) { let element = event.target.parentElement; if (element.className === "selectScript") { M.toast({html: "Now selecting script: " + element.dataset.path}); socket.emit("SelectScript", {"scriptPath": element.dataset.path}); } else if (element.className === "editScript") { window.location.href = ( "http://" + window.location.hostname + ":" + window.location.port + "/neo_ide?scriptName=" + btoa(element.dataset.path) ); } else if (element.className === "deleteScript") { if (confirm("Do you really want to delete this script?\n" + element.dataset.path + "\n\nYou can not undo this action, and the script will be lost forever...")) { M.toast({html: "Trying to create script. If no change after a second. Check the logViewer."}); socket.emit("DeleteScript", {"scriptPath": element.dataset.path}); setTimeout(() => {socket.emit("GetScripts", {})}, 1000); } } else if (element.id === "createEmptyScript") { var scriptName = prompt("Please enter the name of the new script:"); if (scriptName != null || scriptName != "") { M.toast({html: "Trying to create script. If no change after a second. Check the logViewer."}); socket.emit("CreateEmptyScript", {"scriptName": scriptName}); setTimeout(() => {socket.emit("GetScripts", {})}, 1000); } } } addEventListener("click", clickHandler, false); }; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /* 9 */, /* 10 */ /***/ (function(module, exports) { /*! * Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ !function(){"use strict";var c={};try{"undefined"!=typeof window&&(c=window)}catch(c){}var l=(c.navigator||{}).userAgent,h=void 0===l?"":l,z=c,v=(~h.indexOf("MSIE")||h.indexOf("Trident/"),"___FONT_AWESOME___"),m=function(){try{return!0}catch(c){return!1}}(),s=[1,2,3,4,5,6,7,8,9,10],e=s.concat([11,12,13,14,15,16,17,18,19,20]);["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter"].concat(s.map(function(c){return c+"x"})).concat(e.map(function(c){return"w-"+c}));var a=z||{};a[v]||(a[v]={}),a[v].styles||(a[v].styles={}),a[v].hooks||(a[v].hooks={}),a[v].shims||(a[v].shims=[]);var t=a[v],M=Object.assign||function(c){for(var l=1;l>>0;h--;)l[h]=c[h];return l}function U(c){return c.classList?X(c.classList):(c.getAttribute("class")||"").split(" ").filter(function(c){return c})}function K(c,l){var h,z=l.split("-"),v=z[0],m=z.slice(1).join("-");return v!==c||""===m||(h=m,~w.indexOf(h))?null:m}function G(c){return(""+c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function J(h){return Object.keys(h||{}).reduce(function(c,l){return c+(l+": ")+h[l]+";"},"")}function Q(c){return c.size!==W.size||c.x!==W.x||c.y!==W.y||c.rotate!==W.rotate||c.flipX||c.flipY}function Z(c){var l=c.transform,h=c.containerWidth,z=c.iconWidth;return{outer:{transform:"translate("+h/2+" 256)"},inner:{transform:"translate("+32*l.x+", "+32*l.y+") "+" "+("scale("+l.size/16*(l.flipX?-1:1)+", "+l.size/16*(l.flipY?-1:1)+") ")+" "+("rotate("+l.rotate+" 0 0)")},path:{transform:"translate("+z/2*-1+" -256)"}}}var $={x:0,y:0,width:"100%",height:"100%"},cc=function(c){var l=c.children,h=c.attributes,z=c.main,v=c.mask,m=c.transform,s=z.width,e=z.icon,a=v.width,t=v.icon,M=Z({transform:m,containerWidth:a,iconWidth:s}),f={tag:"rect",attributes:A({},$,{fill:"white"})},r={tag:"g",attributes:A({},M.inner),children:[{tag:"path",attributes:A({},e.attributes,M.path,{fill:"black"})}]},H={tag:"g",attributes:A({},M.outer),children:[r]},i="mask-"+D(),n="clip-"+D(),V={tag:"defs",children:[{tag:"clipPath",attributes:{id:n},children:[t]},{tag:"mask",attributes:A({},$,{id:i,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,H]}]};return l.push(V,{tag:"rect",attributes:A({fill:"currentColor","clip-path":"url(#"+n+")",mask:"url(#"+i+")"},$)}),{children:l,attributes:h}},lc=function(c){var l=c.children,h=c.attributes,z=c.main,v=c.transform,m=J(c.styles);if(0"+s.map(bc).join("")+""}var gc=function(){};function Sc(c){return"string"==typeof(c.getAttribute?c.getAttribute(g):null)}var yc={replace:function(c){var l=c[0],h=c[1].map(function(c){return bc(c)}).join("\n");if(l.parentNode&&l.outerHTML)l.outerHTML=h+(E.keepOriginalSource&&"svg"!==l.tagName.toLowerCase()?"\x3c!-- "+l.outerHTML+" --\x3e":"");else if(l.parentNode){var z=document.createElement("span");l.parentNode.replaceChild(z,l),z.outerHTML=h}},nest:function(c){var l=c[0],h=c[1];if(~U(l).indexOf(E.replacementClass))return yc.replace(c);var z=new RegExp(E.familyPrefix+"-.*");delete h[0].attributes.style;var v=h[0].attributes.class.split(" ").reduce(function(c,l){return l===E.replacementClass||l.match(z)?c.toSvg.push(l):c.toNode.push(l),c},{toNode:[],toSvg:[]});h[0].attributes.class=v.toSvg.join(" ");var m=h.map(function(c){return bc(c)}).join("\n");l.setAttribute("class",v.toNode.join(" ")),l.setAttribute(g,""),l.innerHTML=m}};function wc(h,c){var z="function"==typeof c?c:gc;0===h.length?z():(r.requestAnimationFrame||function(c){return c()})(function(){var c=!0===E.autoReplaceSvg?yc.replace:yc[E.autoReplaceSvg]||yc.replace,l=Mc.begin("mutate");h.map(c),l(),z()})}var kc=!1;var xc=null;function Ac(c){if(e&&E.observeMutations){var v=c.treeCallback,m=c.nodeCallback,s=c.pseudoElementsCallback,l=c.observeMutationsRoot,h=void 0===l?H.body:l;xc=new e(function(c){kc||X(c).forEach(function(c){if("childList"===c.type&&0li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1em}.svg-inline--fa.fa-stack-2x{height:2em;width:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}";if("fa"!==l||h!==c){var v=new RegExp("\\.fa\\-","g"),m=new RegExp("\\."+c,"g");z=z.replace(v,"."+l+"-").replace(m,"."+h)}return z};function zl(c){return{found:!0,width:c[0],height:c[1],icon:{tag:"path",attributes:{fill:"currentColor",d:c.slice(4)[0]}}}}function vl(){E.autoAddCss&&!tl&&(Y(hl()),tl=!0)}function ml(l,c){return Object.defineProperty(l,"abstract",{get:c}),Object.defineProperty(l,"html",{get:function(){return l.abstract.map(function(c){return bc(c)})}}),Object.defineProperty(l,"node",{get:function(){if(M){var c=H.createElement("div");return c.innerHTML=l.html,c.children}}}),l}function sl(c){var l=c.prefix,h=void 0===l?"fa":l,z=c.iconName;if(z)return pc(al.definitions,h,z)||pc(T.styles,h,z)}var el,al=new(function(){function c(){k(this,c),this.definitions={}}return x(c,[{key:"add",value:function(){for(var l=this,c=arguments.length,h=Array(c),z=0;z