!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.r(t),r.d(t,"parseSerialMessages",(function(){return f}));var a=self;a.addEventListener("message",(function(e){var t=e.data,r=t.command,n=t.message;"cleanup"===r&&(i="",u=!0),n&&a.postMessage(f(n))}));var i="",u=!0,l=new RegExp("(".concat("\r?\n",")"),"g"),c=new RegExp("[, \t]+","g"),f=function(e){var t=e.join("");if(u){l.lastIndex=0;var r=l.exec(t);if(!(r&&r.index>-1))return{datasetNames:[],parsedLines:[]};t=t.substring(r.index+r[0].length),u=!1}var n=((i||"")+t).split(l).filter((function(e){return e.length>0}));i="",l.lastIndex=0,l.test(n[n.length-1])||(i=n[n.length-1],n.splice(-1));var a={},f=[];return l.lastIndex=0,n.filter((function(e){return!l.test(e)})).forEach((function(e){var t={},r=[];e.indexOf(":")>0?e.split(c).forEach((function(e){var t=o(e.split(":"),2),n=t[0],a=t[1];n=n&&n.trim(),a=a&&a.trim(),n&&n.length>0&&a&&a.length>0&&r.push.apply(r,[n,a])})):e.split(c).forEach((function(e,t){e.length&&r.push.apply(r,["value ".concat(t+1),e])}));for(var n=0;n<r.length-1;n+=2){var i=r[n],u=parseFloat(r[n+1]);0!==i.length&&(a[i]=!0,t[i]=u)}f.push(t)})),{parsedLines:f,datasetNames:Object.keys(a)}}}]);