{"version":3,"sources":["webpack:///./node_modules/parse-srcset/src/parse-srcset.js","webpack:///./node_modules/picocolors/picocolors.browser.js","webpack:///./node_modules/paho-mqtt/paho-mqtt.js","webpack:///./node_modules/path-browserify/index.js","webpack:///./node_modules/os-browserify/browser.js"],"names":["input","isSpace","c","collectCharacters","regEx","chars","match","exec","substring","pos","length","url","descriptors","currentDescriptor","state","inputLength","regexLeadingSpaces","regexLeadingCommasOrSpaces","regexLeadingNotSpaces","regexTrailingCommas","regexNonNegativeInteger","regexFloatingPoint","candidates","slice","replace","parseDescriptors","tokenize","charAt","push","w","d","h","i","desc","lastChar","value","intVal","floatVal","pError","candidate","parseInt","parseFloat","test","console","log","x","String","create","isColorSupported","reset","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","module","exports","createColors","factory","PahoMQTT","global","data","localStorage","setItem","key","item","getItem","removeItem","MESSAGE_TYPE","validate","obj","keys","hasOwnProperty","errorStr","validKey","Error","format","ERROR","INVALID_TYPE","scope","f","apply","arguments","OK","code","text","CONNECT_TIMEOUT","SUBSCRIBE_TIMEOUT","UNSUBSCRIBE_TIMEOUT","PING_TIMEOUT","INTERNAL_ERROR","CONNACK_RETURNCODE","SOCKET_ERROR","SOCKET_CLOSE","MALFORMED_UTF","UNSUPPORTED","INVALID_STATE","INVALID_ARGUMENT","UNSUPPORTED_OPERATION","INVALID_STORED_DATA","INVALID_MQTT_MESSAGE_TYPE","MALFORMED_UNICODE","BUFFER_FULL","CONNACK_RC","error","substitutions","field","start","indexOf","part1","part2","MqttProtoIdentifierv3","MqttProtoIdentifierv4","WireMessage","type","options","name","this","decodeMessage","digit","startingPos","first","messageInfo","remLength","multiplier","endPos","wireMessage","sessionPresent","returnCode","qos","len","readUint16","topicName","parseUTF8","messageIdentifier","message","Message","subarray","retained","duplicate","destinationName","payloadMessage","writeUint16","buffer","offset","writeString","utf8Length","stringToUTF8","UTF8Length","output","charCode","charCodeAt","lowCharCode","isNaN","utf16","byte1","byte2","toString","byte3","byte4","fromCharCode","prototype","encode","willMessagePayloadBytes","topicStrLength","destinationNameLength","undefined","mqttVersion","clientId","willMessage","payloadBytes","Uint8Array","byteLength","userName","password","topics","requestedQos","ArrayBuffer","mbi","number","Array","numBytes","encodeMBI","byteStream","set","connectFlags","cleanSession","keepAliveInterval","Pinger","client","_client","_keepAliveInterval","isReset","pingReq","doTimeout","pinger","doPing","_trace","socket","send","timeout","setTimeout","_disconnected","clearTimeout","cancel","Timeout","timeoutSeconds","action","args","ClientImpl","uri","host","port","path","WebSocket","_wsuri","_localKey","_msg_queue","_buffered_msg_queue","_sentMessages","_receivedMessages","_notify_msg_sent","_message_identifier","_sequence","restore","connected","maxMessageIdentifier","connectOptions","hostIndex","onConnected","onConnectionLost","onMessageDelivered","onMessageArrived","traceFunction","_connectTimeout","sendPinger","receivePinger","_reconnectInterval","_reconnecting","_reconnectTimeout","disconnectedPublishing","disconnectedBufferSize","receiveBuffer","_traceBuffer","_MAX_TRACE_ENTRIES","connect","connectOptionsMasked","_traceMask","uris","_doConnect","subscribe","filter","subscribeOptions","constructor","onSuccess","grantedQos","invocationContext","onFailure","errorCode","errorMessage","timeOut","_requires_ack","_schedule_message","unsubscribe","unsubscribeOptions","callback","Object","sequence","unshift","disconnect","getTraceLog","Date","startTrace","stopTrace","wsurl","useSSL","uriParts","split","join","binaryType","onopen","_on_socket_open","onmessage","_on_socket_message","onerror","_on_socket_error","onclose","_on_socket_close","_process_queue","store","prefix","storedMessage","version","pubRecReceived","hex","messageBytes","payloadHex","JSON","stringify","parse","pop","_socket_send","messageCount","event","messages","_deframeMessages","_handleMessage","byteArray","newData","result","errorStack","stack","sentMessage","receivedMessage","sequencedMessages","msgId","msg","sort","a","b","pubRelMessage","reconnected","_connected","_receivePublish","_receiveMessage","pubCompMessage","wireMessageMasked","pubAckMessage","pubRecMessage","reconnect","_reconnect","errorText","readyState","close","mqttVersionExplicit","call","splice","record","severity","max","shift","traceObject","masked","traceObjectMasked","attr","newPayload","payload","isView","DataView","defineProperties","enumerable","get","newDestinationName","newQos","newRetained","newTopic","newDuplicate","Client","ipv6AddSBracket","clientIdLength","newOnConnected","newDisconnectedPublishing","newDisconnectedBufferSize","newOnConnectionLost","newOnMessageDelivered","newOnMessageArrived","trace","hosts","ports","stringPayload","usingURIs","ipv6","topic","publish","isConnected","self","window","normalizeArray","parts","allowAboveRoot","up","last","xs","res","resolve","resolvedPath","resolvedAbsolute","process","cwd","TypeError","p","normalize","isAbsolute","trailingSlash","substr","paths","index","relative","from","to","trim","arr","end","fromParts","toParts","Math","min","samePartsLength","outputParts","concat","sep","delimiter","dirname","hasRoot","matchedSlash","basename","ext","extname","startDot","startPart","preDotState","str","endianness","hostname","location","loadavg","uptime","freemem","Number","MAX_VALUE","totalmem","cpus","release","navigator","appVersion","networkInterfaces","getNetworkInterfaces","arch","platform","tmpdir","tmpDir","EOL","homedir"],"mappings":"gFAAA,UAmBE,EAAO,QAAW,0BAAP,EAUL,WAGP,OAAO,SAAUA,OAOhB,SAASC,EAAQC,GAChB,MAAc,MAANA,GACF,OAANA,GACM,OAANA,GACM,OAANA,GACM,OAANA,EAGD,SAASC,EAAkBC,GAC1B,IAAIC,EACHC,EAAQF,EAAMG,KAAKP,MAAMQ,UAAUC,IACpC,GAAIH,EAGH,OAFAD,EAAQC,EAAO,GACfG,GAAOJ,EAAMK,OACNL,EAoCT,IAhCA,IAgBCM,EACAC,EACAC,EACAC,EACAZ,EApBGa,EAAcf,MAAMU,OAGvBM,EAAqB,oBACrBC,EAA6B,qBAC7BC,EAAwB,qBACxBC,EAAsB,QACtBC,EAA0B,QAO1BC,EAAqB,oDAUrBZ,EAAM,EAGNa,E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AKjO,MAAM8a,EAAUhB,IAa9B,IAAIR,EAA6B,MAApB,KAAKA,QAAQ,GACpB,SAAU2B,EAAK1T,EAAOuB,GAAO,OAAOmS,EAAI3B,OAAO/R,EAAOuB,IACtD,SAAUmS,EAAK1T,EAAOuB,GAEpB,OADIvB,EAAQ,IAAGA,EAAQ0T,EAAI9b,OAASoI,GAC7B0T,EAAI3B,OAAO/R,EAAOuB,M,oCC3SjC1E,EAAQ8W,WAAa,WAAc,MAAO,MAE1C9W,EAAQ+W,SAAW,WACf,MAAwB,oBAAbC,SACAA,SAASD,SAER,IAGhB/W,EAAQiX,QAAU,WAAc,MAAO,IAEvCjX,EAAQkX,OAAS,WAAc,OAAO,GAEtClX,EAAQmX,QAAU,WACd,OAAOC,OAAOC,WAGlBrX,EAAQsX,SAAW,WACf,OAAOF,OAAOC,WAGlBrX,EAAQuX,KAAO,WAAc,MAAO,IAEpCvX,EAAQ0D,KAAO,WAAc,MAAO,WAEpC1D,EAAQwX,QAAU,WACd,MAAyB,oBAAdC,UACAA,UAAUC,WAEd,IAGX1X,EAAQ2X,kBACN3X,EAAQ4X,qBACR,WAAc,MAAO,IAEvB5X,EAAQ6X,KAAO,WAAc,MAAO,cAEpC7X,EAAQ8X,SAAW,WAAc,MAAO,WAExC9X,EAAQ+X,OAAS/X,EAAQgY,OAAS,WAC9B,MAAO,QAGXhY,EAAQiY,IAAM,KAEdjY,EAAQkY,QAAU,WACjB,MAAO","file":"698c12b.js","sourcesContent":["/**\n * Srcset Parser\n *\n * By Alex Bell | MIT License\n *\n * JS Parser for the string value that appears in markup \n *\n * @returns Array [{url: _, d: _, w: _, h:_}, ...]\n *\n * Based super duper closely on the reference algorithm at:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute\n *\n * Most comments are copied in directly from the spec\n * (except for comments in parens).\n */\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof module === 'object' && module.exports) {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.parseSrcset = factory();\n\t}\n}(this, function () {\n\n\t// 1. Let input be the value passed to this algorithm.\n\treturn function (input) {\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// Manual is faster than RegEx\n\t\t// http://bjorn.tipling.com/state-and-regular-expressions-in-javascript\n\t\t// http://jsperf.com/whitespace-character/5\n\t\tfunction isSpace(c) {\n\t\t\treturn (c === \"\\u0020\" || // space\n\t\t\tc === \"\\u0009\" || // horizontal tab\n\t\t\tc === \"\\u000A\" || // new line\n\t\t\tc === \"\\u000C\" || // form feed\n\t\t\tc === \"\\u000D\"); // carriage return\n\t\t}\n\n\t\tfunction collectCharacters(regEx) {\n\t\t\tvar chars,\n\t\t\t\tmatch = regEx.exec(input.substring(pos));\n\t\t\tif (match) {\n\t\t\t\tchars = match[ 0 ];\n\t\t\t\tpos += chars.length;\n\t\t\t\treturn chars;\n\t\t\t}\n\t\t}\n\n\t\tvar inputLength = input.length,\n\n\t\t\t// (Don't use \\s, to avoid matching non-breaking space)\n\t\t\tregexLeadingSpaces = /^[ \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingCommasOrSpaces = /^[, \\t\\n\\r\\u000c]+/,\n\t\t\tregexLeadingNotSpaces = /^[^ \\t\\n\\r\\u000c]+/,\n\t\t\tregexTrailingCommas = /[,]+$/,\n\t\t\tregexNonNegativeInteger = /^\\d+$/,\n\n\t\t\t// ( Positive or negative or unsigned integers or decimals, without or without exponents.\n\t\t\t// Must include at least one digit.\n\t\t\t// According to spec tests any decimal point must be followed by a digit.\n\t\t\t// No leading plus sign is allowed.)\n\t\t\t// https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number\n\t\t\tregexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,\n\n\t\t\turl,\n\t\t\tdescriptors,\n\t\t\tcurrentDescriptor,\n\t\t\tstate,\n\t\t\tc,\n\n\t\t\t// 2. Let position be a pointer into input, initially pointing at the start\n\t\t\t// of the string.\n\t\t\tpos = 0,\n\n\t\t\t// 3. Let candidates be an initially empty source set.\n\t\t\tcandidates = [];\n\n\t\t// 4. Splitting loop: Collect a sequence of characters that are space\n\t\t// characters or U+002C COMMA characters. If any U+002C COMMA characters\n\t\t// were collected, that is a parse error.\n\t\twhile (true) {\n\t\t\tcollectCharacters(regexLeadingCommasOrSpaces);\n\n\t\t\t// 5. If position is past the end of input, return candidates and abort these steps.\n\t\t\tif (pos >= inputLength) {\n\t\t\t\treturn candidates; // (we're done, this is the sole return path)\n\t\t\t}\n\n\t\t\t// 6. Collect a sequence of characters that are not space characters,\n\t\t\t// and let that be url.\n\t\t\turl = collectCharacters(regexLeadingNotSpaces);\n\n\t\t\t// 7. Let descriptors be a new empty list.\n\t\t\tdescriptors = [];\n\n\t\t\t// 8. If url ends with a U+002C COMMA character (,), follow these substeps:\n\t\t\t//\t\t(1). Remove all trailing U+002C COMMA characters from url. If this removed\n\t\t\t// more than one character, that is a parse error.\n\t\t\tif (url.slice(-1) === \",\") {\n\t\t\t\turl = url.replace(regexTrailingCommas, \"\");\n\t\t\t\t// (Jump ahead to step 9 to skip tokenization and just push the candidate).\n\t\t\t\tparseDescriptors();\n\n\t\t\t\t//\tOtherwise, follow these substeps:\n\t\t\t} else {\n\t\t\t\ttokenize();\n\t\t\t} // (close else of step 8)\n\n\t\t\t// 16. Return to the step labeled splitting loop.\n\t\t} // (Close of big while loop.)\n\n\t\t/**\n\t\t * Tokenizes descriptor properties prior to parsing\n\t\t * Returns undefined.\n\t\t */\n\t\tfunction tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t// Do the following depending on the value of state.\n\t\t\t\t// For the purpose of this step, \"EOF\" is a special character representing\n\t\t\t\t// that position is past the end of input.\n\n\t\t\t\t// In descriptor\n\t\t\t\tif (state === \"in descriptor\") {\n\t\t\t\t\t// Do the following, depending on the value of c:\n\n\t\t\t\t\t// Space character\n\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t// descriptors and let current descriptor be the empty string.\n\t\t\t\t\t// Set state to after descriptor.\n\t\t\t\t\tif (isSpace(c)) {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t\tcurrentDescriptor = \"\";\n\t\t\t\t\t\t\tstate = \"after descriptor\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// U+002C COMMA (,)\n\t\t\t\t\t\t// Advance position to the next character in input. If current descriptor\n\t\t\t\t\t\t// is not empty, append current descriptor to descriptors. Jump to the step\n\t\t\t\t\t\t// labeled descriptor parser.\n\t\t\t\t\t} else if (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// U+0028 LEFT PARENTHESIS (()\n\t\t\t\t\t\t// Append c to current descriptor. Set state to in parens.\n\t\t\t\t\t} else if (c === \"\\u0028\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in parens\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t\t// descriptors. Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\t\t\t\t\t// (end \"in descriptor\"\n\n\t\t\t\t\t// In parens\n\t\t\t\t} else if (state === \"in parens\") {\n\n\t\t\t\t\t// U+0029 RIGHT PARENTHESIS ())\n\t\t\t\t\t// Append c to current descriptor. Set state to in descriptor.\n\t\t\t\t\tif (c === \")\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in descriptor\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// Append current descriptor to descriptors. Jump to the step labeled\n\t\t\t\t\t\t// descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\n\t\t\t\t\t// After descriptor\n\t\t\t\t} else if (state === \"after descriptor\") {\n\n\t\t\t\t\t// Do the following, depending on the value of c:\n\t\t\t\t\t// Space character: Stay in this state.\n\t\t\t\t\tif (isSpace(c)) {\n\n\t\t\t\t\t\t// EOF: Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Set state to in descriptor. Set position to the previous character in input.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = \"in descriptor\";\n\t\t\t\t\t\tpos -= 1;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Advance position to the next character in input.\n\t\t\t\tpos += 1;\n\n\t\t\t\t// Repeat this step.\n\t\t\t} // (close while true loop)\n\t\t}\n\n\t\t/**\n\t\t * Adds descriptor properties to a candidate, pushes to the candidates array\n\t\t * @return undefined\n\t\t */\n\t\t// Declared outside of the while loop so that it's only created once.\n\t\tfunction parseDescriptors() {\n\n\t\t\t// 9. Descriptor parser: Let error be no.\n\t\t\tvar pError = false,\n\n\t\t\t\t// 10. Let width be absent.\n\t\t\t\t// 11. Let density be absent.\n\t\t\t\t// 12. Let future-compat-h be absent. (We're implementing it now as h)\n\t\t\t\tw, d, h, i,\n\t\t\t\tcandidate = {},\n\t\t\t\tdesc, lastChar, value, intVal, floatVal;\n\n\t\t\t// 13. For each descriptor in descriptors, run the appropriate set of steps\n\t\t\t// from the following list:\n\t\t\tfor (i = 0 ; i < descriptors.length; i++) {\n\t\t\t\tdesc = descriptors[ i ];\n\n\t\t\t\tlastChar = desc[ desc.length - 1 ];\n\t\t\t\tvalue = desc.substring(0, desc.length - 1);\n\t\t\t\tintVal = parseInt(value, 10);\n\t\t\t\tfloatVal = parseFloat(value);\n\n\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t// a U+0077 LATIN SMALL LETTER W character\n\t\t\t\tif (regexNonNegativeInteger.test(value) && (lastChar === \"w\")) {\n\n\t\t\t\t\t// If width and density are not both absent, then let error be yes.\n\t\t\t\t\tif (w || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes.\n\t\t\t\t\t// Otherwise, let width be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {w = intVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid floating-point number followed by\n\t\t\t\t\t// a U+0078 LATIN SMALL LETTER X character\n\t\t\t\t} else if (regexFloatingPoint.test(value) && (lastChar === \"x\")) {\n\n\t\t\t\t\t// If width, density and future-compat-h are not all absent, then let error\n\t\t\t\t\t// be yes.\n\t\t\t\t\tif (w || d || h) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing floating-point number values to the descriptor.\n\t\t\t\t\t// If the result is less than zero, let error be yes. Otherwise, let density\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (floatVal < 0) {pError = true;} else {d = floatVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t\t// a U+0068 LATIN SMALL LETTER H character\n\t\t\t\t} else if (regexNonNegativeInteger.test(value) && (lastChar === \"h\")) {\n\n\t\t\t\t\t// If height and density are not both absent, then let error be yes.\n\t\t\t\t\tif (h || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes. Otherwise, let future-compat-h\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {h = intVal;}\n\n\t\t\t\t\t// Anything else, Let error be yes.\n\t\t\t\t} else {pError = true;}\n\t\t\t} // (close step 13 for loop)\n\n\t\t\t// 15. If error is still no, then append a new image source to candidates whose\n\t\t\t// URL is url, associated with a width width if not absent and a pixel\n\t\t\t// density density if not absent. Otherwise, there is a parse error.\n\t\t\tif (!pError) {\n\t\t\t\tcandidate.url = url;\n\t\t\t\tif (w) { candidate.w = w;}\n\t\t\t\tif (d) { candidate.d = d;}\n\t\t\t\tif (h) { candidate.h = h;}\n\t\t\t\tcandidates.push(candidate);\n\t\t\t} else if (console && console.log) {\n\t\t\t\tconsole.log(\"Invalid srcset descriptor found in '\" +\n\t\t\t\t\tinput + \"' at '\" + desc + \"'.\");\n\t\t\t}\n\t\t} // (close parseDescriptors fn)\n\n\t}\n}));\n","var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n","/*******************************************************************************\n * Copyright (c) 2013 IBM Corp.\n *\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * and Eclipse Distribution License v1.0 which accompany this distribution.\n *\n * The Eclipse Public License is available at\n * http://www.eclipse.org/legal/epl-v10.html\n * and the Eclipse Distribution License is available at\n * http://www.eclipse.org/org/documents/edl-v10.php.\n *\n * Contributors:\n * Andrew Banks - initial API and implementation and initial documentation\n *******************************************************************************/\n\n\n// Only expose a single object name in the global namespace.\n// Everything must go through this module. Global Paho module\n// only has a single public function, client, which returns\n// a Paho client object given connection details.\n\n/**\n * Send and receive messages using web browsers.\n *
\n * This programming interface lets a JavaScript client application use the MQTT V3.1 or\n * V3.1.1 protocol to connect to an MQTT-supporting messaging server.\n *\n * The function supported includes:\n *
\n * The API consists of two main objects:\n *
\n * The programming interface validates parameters passed to it, and will throw\n * an Error containing an error message intended for developer use, if it detects\n * an error with any parameter.\n *
\n * Example:\n *\n * \n\t * The send, subscribe and unsubscribe methods are implemented as asynchronous JavaScript methods\n\t * (even though the underlying protocol exchange might be synchronous in nature).\n\t * This means they signal their completion by calling back to the application,\n\t * via Success or Failure callback functions provided by the application on the method in question.\n\t * Such callbacks are called at most once per method invocation and do not persist beyond the lifetime\n\t * of the script that made the invocation.\n\t * \n\t * In contrast there are some callback functions, most notably onMessageArrived,\n\t * that are defined on the {@link Paho.Client} object.\n\t * These may get called multiple times, and aren't directly related to specific method invocations made by the client.\n\t *\n\t * @name Paho.Client\n\t *\n\t * @constructor\n\t *\n\t * @param {string} host - the address of the messaging server, as a fully qualified WebSocket URI, as a DNS name or dotted decimal IP address.\n\t * @param {number} port - the port number to connect to - only required if host is not a URI\n\t * @param {string} path - the path on the host to connect to - only used if host is not a URI. Default: '/mqtt'.\n\t * @param {string} clientId - the Messaging client identifier, between 1 and 23 characters in length.\n\t *\n\t * @property {string} host - read only the server's DNS hostname or dotted decimal IP address.\n\t * @property {number} port - read only the server's port.\n\t * @property {string} path - read only the server's path.\n\t * @property {string} clientId - read only used when connecting to the server.\n\t * @property {function} onConnectionLost - called when a connection has been lost.\n\t * after a connect() method has succeeded.\n\t * Establish the call back used when a connection has been lost. The connection may be\n\t * lost because the client initiates a disconnect or because the server or network\n\t * cause the client to be disconnected. The disconnect call back may be called without\n\t * the connectionComplete call back being invoked if, for example the client fails to\n\t * connect.\n\t * A single response object parameter is passed to the onConnectionLost callback containing the following fields:\n\t * \n\t * All attributes may be null, which implies the default values.\n\t *\n\t * @name Paho.Message\n\t * @constructor\n\t * @param {String|ArrayBuffer} payload The message data to be sent.\n\t * \n\t * @property {string} payloadString read only The payload as a string if the payload consists of valid UTF-8 characters.\n\t * @property {ArrayBuffer} payloadBytes read only The payload as an ArrayBuffer.\n\t * \n\t * @property {string} destinationName mandatory The name of the destination to which the message is to be sent\n\t * (for messages about to be sent) or the name of the destination from which the message has been received.\n\t * (for messages received by the onMessage function).\n\t * \n\t * @property {number} qos The Quality of Service used to deliver the message.\n\t * \n\t * @property {Boolean} retained If true, the message is to be retained by the server and delivered\n\t * to both current and future subscriptions.\n\t * If false the server only delivers the message to current subscribers, this is the default for new Messages.\n\t * A received message has the retained boolean set to true if the message was published\n\t * with the retained boolean set to true\n\t * and the subscrption was made after the message has been published.\n\t * \n\t * @property {Boolean} duplicate read only If true, this message might be a duplicate of one which has already been received.\n\t * This is only set on messages received from the server.\n\t *\n\t */\n\t\tvar Message = function (newPayload) {\n\t\t\tvar payload;\n\t\t\tif ( typeof newPayload === \"string\" ||\n\t\tnewPayload instanceof ArrayBuffer ||\n\t\t(ArrayBuffer.isView(newPayload) && !(newPayload instanceof DataView))\n\t\t\t) {\n\t\t\t\tpayload = newPayload;\n\t\t\t} else {\n\t\t\t\tthrow (format(ERROR.INVALID_ARGUMENT, [newPayload, \"newPayload\"]));\n\t\t\t}\n\n\t\t\tvar destinationName;\n\t\t\tvar qos = 0;\n\t\t\tvar retained = false;\n\t\t\tvar duplicate = false;\n\n\t\t\tObject.defineProperties(this,{\n\t\t\t\t\"payloadString\":{\n\t\t\t\t\tenumerable : true,\n\t\t\t\t\tget : function () {\n\t\t\t\t\t\tif (typeof payload === \"string\")\n\t\t\t\t\t\t\treturn payload;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn parseUTF8(payload, 0, payload.length);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"payloadBytes\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() {\n\t\t\t\t\t\tif (typeof payload === \"string\") {\n\t\t\t\t\t\t\tvar buffer = new ArrayBuffer(UTF8Length(payload));\n\t\t\t\t\t\t\tvar byteStream = new Uint8Array(buffer);\n\t\t\t\t\t\t\tstringToUTF8(payload, byteStream, 0);\n\n\t\t\t\t\t\t\treturn byteStream;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn payload;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"destinationName\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return destinationName; },\n\t\t\t\t\tset: function(newDestinationName) {\n\t\t\t\t\t\tif (typeof newDestinationName === \"string\")\n\t\t\t\t\t\t\tdestinationName = newDestinationName;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [newDestinationName, \"newDestinationName\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"qos\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return qos; },\n\t\t\t\t\tset: function(newQos) {\n\t\t\t\t\t\tif (newQos === 0 || newQos === 1 || newQos === 2 )\n\t\t\t\t\t\t\tqos = newQos;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(\"Invalid argument:\"+newQos);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"retained\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return retained; },\n\t\t\t\t\tset: function(newRetained) {\n\t\t\t\t\t\tif (typeof newRetained === \"boolean\")\n\t\t\t\t\t\t\tretained = newRetained;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [newRetained, \"newRetained\"]));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"topic\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return destinationName; },\n\t\t\t\t\tset: function(newTopic) {destinationName=newTopic;}\n\t\t\t\t},\n\t\t\t\t\"duplicate\":{\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget: function() { return duplicate; },\n\t\t\t\t\tset: function(newDuplicate) {duplicate=newDuplicate;}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// Module contents.\n\t\treturn {\n\t\t\tClient: Client,\n\t\t\tMessage: Message\n\t\t};\n\t// eslint-disable-next-line no-nested-ternary\n\t})(typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n\treturn PahoMQTT;\n});\n","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n if (typeof location !== 'undefined') {\n return location.hostname\n }\n else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n if (typeof navigator !== 'undefined') {\n return navigator.appVersion;\n }\n return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n return '/tmp';\n};\n\nexports.EOL = '\\n';\n\nexports.homedir = function () {\n\treturn '/'\n};\n"],"sourceRoot":""}
\n * @namespace Paho\n */\n\n/* jshint shadow:true */\n(function ExportLibrary(root, factory) {\n\tif(typeof exports === \"object\" && typeof module === \"object\"){\n\t\tmodule.exports = factory();\n\t} else if (typeof define === \"function\" && define.amd){\n\t\tdefine(factory);\n\t} else if (typeof exports === \"object\"){\n\t\texports = factory();\n\t} else {\n\t\t//if (typeof root.Paho === \"undefined\"){\n\t\t//\troot.Paho = {};\n\t\t//}\n\t\troot.Paho = factory();\n\t}\n})(this, function LibraryFactory(){\n\n\n\tvar PahoMQTT = (function (global) {\n\n\t// Private variables below, these are only visible inside the function closure\n\t// which is used to define the module.\n\tvar version = \"@VERSION@-@BUILDLEVEL@\";\n\n\t/**\n\t * @private\n\t */\n\tvar localStorage = global.localStorage || (function () {\n\t\tvar data = {};\n\n\t\treturn {\n\t\t\tsetItem: function (key, item) { data[key] = item; },\n\t\t\tgetItem: function (key) { return data[key]; },\n\t\t\tremoveItem: function (key) { delete data[key]; },\n\t\t};\n\t})();\n\n\t\t/**\n\t * Unique message type identifiers, with associated\n\t * associated integer values.\n\t * @private\n\t */\n\t\tvar MESSAGE_TYPE = {\n\t\t\tCONNECT: 1,\n\t\t\tCONNACK: 2,\n\t\t\tPUBLISH: 3,\n\t\t\tPUBACK: 4,\n\t\t\tPUBREC: 5,\n\t\t\tPUBREL: 6,\n\t\t\tPUBCOMP: 7,\n\t\t\tSUBSCRIBE: 8,\n\t\t\tSUBACK: 9,\n\t\t\tUNSUBSCRIBE: 10,\n\t\t\tUNSUBACK: 11,\n\t\t\tPINGREQ: 12,\n\t\t\tPINGRESP: 13,\n\t\t\tDISCONNECT: 14\n\t\t};\n\n\t\t// Collection of utility methods used to simplify module code\n\t\t// and promote the DRY pattern.\n\n\t\t/**\n\t * Validate an object's parameter names to ensure they\n\t * match a list of expected variables name for this option\n\t * type. Used to ensure option object passed into the API don't\n\t * contain erroneous parameters.\n\t * @param {Object} obj - User options object\n\t * @param {Object} keys - valid keys and types that may exist in obj.\n\t * @throws {Error} Invalid option parameter found.\n\t * @private\n\t */\n\t\tvar validate = function(obj, keys) {\n\t\t\tfor (var key in obj) {\n\t\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\t\tif (keys.hasOwnProperty(key)) {\n\t\t\t\t\t\tif (typeof obj[key] !== keys[key])\n\t\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof obj[key], key]));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar errorStr = \"Unknown property, \" + key + \". Valid properties are:\";\n\t\t\t\t\t\tfor (var validKey in keys)\n\t\t\t\t\t\t\tif (keys.hasOwnProperty(validKey))\n\t\t\t\t\t\t\t\terrorStr = errorStr+\" \"+validKey;\n\t\t\t\t\t\tthrow new Error(errorStr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t * Return a new function which runs the user function bound\n\t * to a fixed scope.\n\t * @param {function} User function\n\t * @param {object} Function scope\n\t * @return {function} User function bound to another scope\n\t * @private\n\t */\n\t\tvar scope = function (f, scope) {\n\t\t\treturn function () {\n\t\t\t\treturn f.apply(scope, arguments);\n\t\t\t};\n\t\t};\n\n\t\t/**\n\t * Unique message type identifiers, with associated\n\t * associated integer values.\n\t * @private\n\t */\n\t\tvar ERROR = {\n\t\t\tOK: {code:0, text:\"AMQJSC0000I OK.\"},\n\t\t\tCONNECT_TIMEOUT: {code:1, text:\"AMQJSC0001E Connect timed out.\"},\n\t\t\tSUBSCRIBE_TIMEOUT: {code:2, text:\"AMQJS0002E Subscribe timed out.\"},\n\t\t\tUNSUBSCRIBE_TIMEOUT: {code:3, text:\"AMQJS0003E Unsubscribe timed out.\"},\n\t\t\tPING_TIMEOUT: {code:4, text:\"AMQJS0004E Ping timed out.\"},\n\t\t\tINTERNAL_ERROR: {code:5, text:\"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}\"},\n\t\t\tCONNACK_RETURNCODE: {code:6, text:\"AMQJS0006E Bad Connack return code:{0} {1}.\"},\n\t\t\tSOCKET_ERROR: {code:7, text:\"AMQJS0007E Socket error:{0}.\"},\n\t\t\tSOCKET_CLOSE: {code:8, text:\"AMQJS0008I Socket closed.\"},\n\t\t\tMALFORMED_UTF: {code:9, text:\"AMQJS0009E Malformed UTF data:{0} {1} {2}.\"},\n\t\t\tUNSUPPORTED: {code:10, text:\"AMQJS0010E {0} is not supported by this browser.\"},\n\t\t\tINVALID_STATE: {code:11, text:\"AMQJS0011E Invalid state {0}.\"},\n\t\t\tINVALID_TYPE: {code:12, text:\"AMQJS0012E Invalid type {0} for {1}.\"},\n\t\t\tINVALID_ARGUMENT: {code:13, text:\"AMQJS0013E Invalid argument {0} for {1}.\"},\n\t\t\tUNSUPPORTED_OPERATION: {code:14, text:\"AMQJS0014E Unsupported operation.\"},\n\t\t\tINVALID_STORED_DATA: {code:15, text:\"AMQJS0015E Invalid data in local storage key={0} value={1}.\"},\n\t\t\tINVALID_MQTT_MESSAGE_TYPE: {code:16, text:\"AMQJS0016E Invalid MQTT message type {0}.\"},\n\t\t\tMALFORMED_UNICODE: {code:17, text:\"AMQJS0017E Malformed Unicode string:{0} {1}.\"},\n\t\t\tBUFFER_FULL: {code:18, text:\"AMQJS0018E Message buffer is full, maximum buffer size: {0}.\"},\n\t\t};\n\n\t\t/** CONNACK RC Meaning. */\n\t\tvar CONNACK_RC = {\n\t\t\t0:\"Connection Accepted\",\n\t\t\t1:\"Connection Refused: unacceptable protocol version\",\n\t\t\t2:\"Connection Refused: identifier rejected\",\n\t\t\t3:\"Connection Refused: server unavailable\",\n\t\t\t4:\"Connection Refused: bad user name or password\",\n\t\t\t5:\"Connection Refused: not authorized\"\n\t\t};\n\n\t/**\n\t * Format an error message text.\n\t * @private\n\t * @param {error} ERROR value above.\n\t * @param {substitutions} [array] substituted into the text.\n\t * @return the text with the substitutions made.\n\t */\n\t\tvar format = function(error, substitutions) {\n\t\t\tvar text = error.text;\n\t\t\tif (substitutions) {\n\t\t\t\tvar field,start;\n\t\t\t\tfor (var i=0; i\nvar client = new Paho.MQTT.Client(location.hostname, Number(location.port), \"clientId\");\nclient.onConnectionLost = onConnectionLost;\nclient.onMessageArrived = onMessageArrived;\nclient.connect({onSuccess:onConnect});\n\nfunction onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"/World\");\n var message = new Paho.MQTT.Message(\"Hello\");\n message.destinationName = \"/World\";\n client.send(message);\n};\nfunction onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0)\n\tconsole.log(\"onConnectionLost:\"+responseObject.errorMessage);\n};\nfunction onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n client.disconnect();\n};\n *
\n\t *
\n\t * @property {function} onMessageDelivered - called when a message has been delivered.\n\t * All processing that this Client will ever do has been completed. So, for example,\n\t * in the case of a Qos=2 message sent by this client, the PubComp flow has been received from the server\n\t * and the message has been removed from persistent storage before this callback is invoked.\n\t * Parameters passed to the onMessageDelivered callback are:\n\t * \n\t *
\n\t * @property {function} onMessageArrived - called when a message has arrived in this Paho.client.\n\t * Parameters passed to the onMessageArrived callback are:\n\t * \n\t *
\n\t * @property {function} onConnected - called when a connection is successfully made to the server.\n\t * after a connect() method.\n\t * Parameters passed to the onConnected callback are:\n\t * \n\t *
\n\t * @property {boolean} disconnectedPublishing - if set, will enable disconnected publishing in\n\t * in the event that the connection to the server is lost.\n\t * @property {number} disconnectedBufferSize - Used to set the maximum number of messages that the disconnected\n\t * buffer will hold before rejecting new messages. Default size: 5000 messages\n\t * @property {function} trace - called whenever trace is called. TODO\n\t */\n\t\tvar Client = function (host, port, path, clientId) {\n\n\t\t\tvar uri;\n\n\t\t\tif (typeof host !== \"string\")\n\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof host, \"host\"]));\n\n\t\t\tif (arguments.length == 2) {\n\t\t\t// host: must be full ws:// uri\n\t\t\t// port: clientId\n\t\t\t\tclientId = port;\n\t\t\t\turi = host;\n\t\t\t\tvar match = uri.match(/^(wss?):\\/\\/((\\[(.+)\\])|([^\\/]+?))(:(\\d+))?(\\/.*)$/);\n\t\t\t\tif (match) {\n\t\t\t\t\thost = match[4]||match[2];\n\t\t\t\t\tport = parseInt(match[7]);\n\t\t\t\t\tpath = match[8];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT,[host,\"host\"]));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (arguments.length == 3) {\n\t\t\t\t\tclientId = path;\n\t\t\t\t\tpath = \"/mqtt\";\n\t\t\t\t}\n\t\t\t\tif (typeof port !== \"number\" || port < 0)\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof port, \"port\"]));\n\t\t\t\tif (typeof path !== \"string\")\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof path, \"path\"]));\n\n\t\t\t\tvar ipv6AddSBracket = (host.indexOf(\":\") !== -1 && host.slice(0,1) !== \"[\" && host.slice(-1) !== \"]\");\n\t\t\t\turi = \"ws://\"+(ipv6AddSBracket?\"[\"+host+\"]\":host)+\":\"+port+path;\n\t\t\t}\n\n\t\t\tvar clientIdLength = 0;\n\t\t\tfor (var i = 0; i\n\t\t *
\n\t * @param {function} connectOptions.onFailure - called when the connect request has failed or timed out.\n\t\t * A single response object parameter is passed to the onFailure callback containing the following fields:\n\t\t * \n\t\t *
\n\t * @param {array} connectOptions.hosts - If present this contains either a set of hostnames or fully qualified\n\t\t * WebSocket URIs (ws://iot.eclipse.org:80/ws), that are tried in order in place\n\t\t * of the host and port paramater on the construtor. The hosts are tried one at at time in order until\n\t\t * one of then succeeds.\n\t * @param {array} connectOptions.ports - If present the set of ports matching the hosts. If hosts contains URIs, this property\n\t\t * is not used.\n\t * @param {boolean} connectOptions.reconnect - Sets whether the client will automatically attempt to reconnect\n\t * to the server if the connection is lost.\n\t *\n\t *
\n\t * @param {number} connectOptions.mqttVersion - The version of MQTT to use to connect to the MQTT Broker.\n\t *\n\t *
\n\t * @param {boolean} connectOptions.mqttVersionExplicit - If set to true, will force the connection to use the\n\t * selected MQTT Version or will fail to connect.\n\t * @param {array} connectOptions.uris - If present, should contain a list of fully qualified WebSocket uris\n\t * (e.g. ws://iot.eclipse.org:80/ws), that are tried in order in place of the host and port parameter of the construtor.\n\t * The uris are tried one at a time in order until one of them succeeds. Do not use this in conjunction with hosts as\n\t * the hosts array will be converted to uris and will overwrite this property.\n\t\t * @throws {InvalidState} If the client is not in disconnected state. The client must have received connectionLost\n\t\t * or disconnected before calling connect for a second or subsequent time.\n\t\t */\n\t\t\tthis.connect = function (connectOptions) {\n\t\t\t\tconnectOptions = connectOptions || {} ;\n\t\t\t\tvalidate(connectOptions, {timeout:\"number\",\n\t\t\t\t\tuserName:\"string\",\n\t\t\t\t\tpassword:\"string\",\n\t\t\t\t\twillMessage:\"object\",\n\t\t\t\t\tkeepAliveInterval:\"number\",\n\t\t\t\t\tcleanSession:\"boolean\",\n\t\t\t\t\tuseSSL:\"boolean\",\n\t\t\t\t\tinvocationContext:\"object\",\n\t\t\t\t\tonSuccess:\"function\",\n\t\t\t\t\tonFailure:\"function\",\n\t\t\t\t\thosts:\"object\",\n\t\t\t\t\tports:\"object\",\n\t\t\t\t\treconnect:\"boolean\",\n\t\t\t\t\tmqttVersion:\"number\",\n\t\t\t\t\tmqttVersionExplicit:\"boolean\",\n\t\t\t\t\turis: \"object\"});\n\n\t\t\t\t// If no keep alive interval is set, assume 60 seconds.\n\t\t\t\tif (connectOptions.keepAliveInterval === undefined)\n\t\t\t\t\tconnectOptions.keepAliveInterval = 60;\n\n\t\t\t\tif (connectOptions.mqttVersion > 4 || connectOptions.mqttVersion < 3) {\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.mqttVersion, \"connectOptions.mqttVersion\"]));\n\t\t\t\t}\n\n\t\t\t\tif (connectOptions.mqttVersion === undefined) {\n\t\t\t\t\tconnectOptions.mqttVersionExplicit = false;\n\t\t\t\t\tconnectOptions.mqttVersion = 4;\n\t\t\t\t} else {\n\t\t\t\t\tconnectOptions.mqttVersionExplicit = true;\n\t\t\t\t}\n\n\t\t\t\t//Check that if password is set, so is username\n\t\t\t\tif (connectOptions.password !== undefined && connectOptions.userName === undefined)\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.password, \"connectOptions.password\"]));\n\n\t\t\t\tif (connectOptions.willMessage) {\n\t\t\t\t\tif (!(connectOptions.willMessage instanceof Message))\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [connectOptions.willMessage, \"connectOptions.willMessage\"]));\n\t\t\t\t\t// The will message must have a payload that can be represented as a string.\n\t\t\t\t\t// Cause the willMessage to throw an exception if this is not the case.\n\t\t\t\t\tconnectOptions.willMessage.stringPayload = null;\n\n\t\t\t\t\tif (typeof connectOptions.willMessage.destinationName === \"undefined\")\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_TYPE, [typeof connectOptions.willMessage.destinationName, \"connectOptions.willMessage.destinationName\"]));\n\t\t\t\t}\n\t\t\t\tif (typeof connectOptions.cleanSession === \"undefined\")\n\t\t\t\t\tconnectOptions.cleanSession = true;\n\t\t\t\tif (connectOptions.hosts) {\n\n\t\t\t\t\tif (!(connectOptions.hosts instanceof Array) )\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, \"connectOptions.hosts\"]));\n\t\t\t\t\tif (connectOptions.hosts.length <1 )\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [connectOptions.hosts, \"connectOptions.hosts\"]));\n\n\t\t\t\t\tvar usingURIs = false;\n\t\t\t\t\tfor (var i = 0; i\n\t\t *
\n\t\t * @param {function} subscribeOptions.onFailure - called when the subscribe request has failed or timed out.\n\t\t * A single response object parameter is passed to the onFailure callback containing the following fields:\n\t\t * \n\t\t *
\n\t\t * @param {number} subscribeOptions.timeout - which, if present, determines the number of\n\t\t * seconds after which the onFailure calback is called.\n\t\t * The presence of a timeout does not prevent the onSuccess\n\t\t * callback from being called when the subscribe completes.\n\t\t * @throws {InvalidState} if the client is not in connected state.\n\t\t */\n\t\t\tthis.subscribe = function (filter, subscribeOptions) {\n\t\t\t\tif (typeof filter !== \"string\" && filter.constructor !== Array)\n\t\t\t\t\tthrow new Error(\"Invalid argument:\"+filter);\n\t\t\t\tsubscribeOptions = subscribeOptions || {} ;\n\t\t\t\tvalidate(subscribeOptions, {qos:\"number\",\n\t\t\t\t\tinvocationContext:\"object\",\n\t\t\t\t\tonSuccess:\"function\",\n\t\t\t\t\tonFailure:\"function\",\n\t\t\t\t\ttimeout:\"number\"\n\t\t\t\t});\n\t\t\t\tif (subscribeOptions.timeout && !subscribeOptions.onFailure)\n\t\t\t\t\tthrow new Error(\"subscribeOptions.timeout specified with no onFailure callback.\");\n\t\t\t\tif (typeof subscribeOptions.qos !== \"undefined\" && !(subscribeOptions.qos === 0 || subscribeOptions.qos === 1 || subscribeOptions.qos === 2 ))\n\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT, [subscribeOptions.qos, \"subscribeOptions.qos\"]));\n\t\t\t\tclient.subscribe(filter, subscribeOptions);\n\t\t\t};\n\n\t\t/**\n\t\t * Unsubscribe for messages, stop receiving messages sent to destinations described by the filter.\n\t\t *\n\t\t * @name Paho.Client#unsubscribe\n\t\t * @function\n\t\t * @param {string} filter - describing the destinations to receive messages from.\n\t\t * @param {object} unsubscribeOptions - used to control the subscription\n\t\t * @param {object} unsubscribeOptions.invocationContext - passed to the onSuccess callback\n\t\t\t\t\t\t\t\t\t\t\t or onFailure callback.\n\t\t * @param {function} unsubscribeOptions.onSuccess - called when the unsubscribe acknowledgement has been received from the server.\n\t\t * A single response object parameter is passed to the\n\t\t * onSuccess callback containing the following fields:\n\t\t * \n\t\t *
\n\t\t * @param {function} unsubscribeOptions.onFailure called when the unsubscribe request has failed or timed out.\n\t\t * A single response object parameter is passed to the onFailure callback containing the following fields:\n\t\t * \n\t\t *
\n\t\t * @param {number} unsubscribeOptions.timeout - which, if present, determines the number of seconds\n\t\t * after which the onFailure callback is called. The presence of\n\t\t * a timeout does not prevent the onSuccess callback from being\n\t\t * called when the unsubscribe completes\n\t\t * @throws {InvalidState} if the client is not in connected state.\n\t\t */\n\t\t\tthis.unsubscribe = function (filter, unsubscribeOptions) {\n\t\t\t\tif (typeof filter !== \"string\" && filter.constructor !== Array)\n\t\t\t\t\tthrow new Error(\"Invalid argument:\"+filter);\n\t\t\t\tunsubscribeOptions = unsubscribeOptions || {} ;\n\t\t\t\tvalidate(unsubscribeOptions, {invocationContext:\"object\",\n\t\t\t\t\tonSuccess:\"function\",\n\t\t\t\t\tonFailure:\"function\",\n\t\t\t\t\ttimeout:\"number\"\n\t\t\t\t});\n\t\t\t\tif (unsubscribeOptions.timeout && !unsubscribeOptions.onFailure)\n\t\t\t\t\tthrow new Error(\"unsubscribeOptions.timeout specified with no onFailure callback.\");\n\t\t\t\tclient.unsubscribe(filter, unsubscribeOptions);\n\t\t\t};\n\n\t\t\t/**\n\t\t * Send a message to the consumers of the destination in the Message.\n\t\t *\n\t\t * @name Paho.Client#send\n\t\t * @function\n\t\t * @param {string|Paho.Message} topic - mandatory The name of the destination to which the message is to be sent.\n\t\t * \t\t\t\t\t - If it is the only parameter, used as Paho.Message object.\n\t\t * @param {String|ArrayBuffer} payload - The message data to be sent.\n\t\t * @param {number} qos The Quality of Service used to deliver the message.\n\t\t * \t\t\n\t\t * \t\t\t
\n\t\t * @param {Boolean} retained If true, the message is to be retained by the server and delivered\n\t\t * to both current and future subscriptions.\n\t\t * If false the server only delivers the message to current subscribers, this is the default for new Messages.\n\t\t * A received message has the retained boolean set to true if the message was published\n\t\t * with the retained boolean set to true\n\t\t * and the subscrption was made after the message has been published.\n\t\t * @throws {InvalidState} if the client is not connected.\n\t\t */\n\t\t\tthis.send = function (topic,payload,qos,retained) {\n\t\t\t\tvar message ;\n\n\t\t\t\tif(arguments.length === 0){\n\t\t\t\t\tthrow new Error(\"Invalid argument.\"+\"length\");\n\n\t\t\t\t}else if(arguments.length == 1) {\n\n\t\t\t\t\tif (!(topic instanceof Message) && (typeof topic !== \"string\"))\n\t\t\t\t\t\tthrow new Error(\"Invalid argument:\"+ typeof topic);\n\n\t\t\t\t\tmessage = topic;\n\t\t\t\t\tif (typeof message.destinationName === \"undefined\")\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT,[message.destinationName,\"Message.destinationName\"]));\n\t\t\t\t\tclient.send(message);\n\n\t\t\t\t}else {\n\t\t\t\t//parameter checking in Message object\n\t\t\t\t\tmessage = new Message(payload);\n\t\t\t\t\tmessage.destinationName = topic;\n\t\t\t\t\tif(arguments.length >= 3)\n\t\t\t\t\t\tmessage.qos = qos;\n\t\t\t\t\tif(arguments.length >= 4)\n\t\t\t\t\t\tmessage.retained = retained;\n\t\t\t\t\tclient.send(message);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t * Publish a message to the consumers of the destination in the Message.\n\t\t * Synonym for Paho.Mqtt.Client#send\n\t\t *\n\t\t * @name Paho.Client#publish\n\t\t * @function\n\t\t * @param {string|Paho.Message} topic - mandatory The name of the topic to which the message is to be published.\n\t\t * \t\t\t\t\t - If it is the only parameter, used as Paho.Message object.\n\t\t * @param {String|ArrayBuffer} payload - The message data to be published.\n\t\t * @param {number} qos The Quality of Service used to deliver the message.\n\t\t * \t\t\n\t\t * \t\t\t
\n\t\t * @param {Boolean} retained If true, the message is to be retained by the server and delivered\n\t\t * to both current and future subscriptions.\n\t\t * If false the server only delivers the message to current subscribers, this is the default for new Messages.\n\t\t * A received message has the retained boolean set to true if the message was published\n\t\t * with the retained boolean set to true\n\t\t * and the subscrption was made after the message has been published.\n\t\t * @throws {InvalidState} if the client is not connected.\n\t\t */\n\t\t\tthis.publish = function(topic,payload,qos,retained) {\n\t\t\t\tvar message ;\n\n\t\t\t\tif(arguments.length === 0){\n\t\t\t\t\tthrow new Error(\"Invalid argument.\"+\"length\");\n\n\t\t\t\t}else if(arguments.length == 1) {\n\n\t\t\t\t\tif (!(topic instanceof Message) && (typeof topic !== \"string\"))\n\t\t\t\t\t\tthrow new Error(\"Invalid argument:\"+ typeof topic);\n\n\t\t\t\t\tmessage = topic;\n\t\t\t\t\tif (typeof message.destinationName === \"undefined\")\n\t\t\t\t\t\tthrow new Error(format(ERROR.INVALID_ARGUMENT,[message.destinationName,\"Message.destinationName\"]));\n\t\t\t\t\tclient.send(message);\n\n\t\t\t\t}else {\n\t\t\t\t\t//parameter checking in Message object\n\t\t\t\t\tmessage = new Message(payload);\n\t\t\t\t\tmessage.destinationName = topic;\n\t\t\t\t\tif(arguments.length >= 3)\n\t\t\t\t\t\tmessage.qos = qos;\n\t\t\t\t\tif(arguments.length >= 4)\n\t\t\t\t\t\tmessage.retained = retained;\n\t\t\t\t\tclient.send(message);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t * Normal disconnect of this Messaging client from its server.\n\t\t *\n\t\t * @name Paho.Client#disconnect\n\t\t * @function\n\t\t * @throws {InvalidState} if the client is already disconnected.\n\t\t */\n\t\t\tthis.disconnect = function () {\n\t\t\t\tclient.disconnect();\n\t\t\t};\n\n\t\t\t/**\n\t\t * Get the contents of the trace log.\n\t\t *\n\t\t * @name Paho.Client#getTraceLog\n\t\t * @function\n\t\t * @return {Object[]} tracebuffer containing the time ordered trace records.\n\t\t */\n\t\t\tthis.getTraceLog = function () {\n\t\t\t\treturn client.getTraceLog();\n\t\t\t};\n\n\t\t\t/**\n\t\t * Start tracing.\n\t\t *\n\t\t * @name Paho.Client#startTrace\n\t\t * @function\n\t\t */\n\t\t\tthis.startTrace = function () {\n\t\t\t\tclient.startTrace();\n\t\t\t};\n\n\t\t\t/**\n\t\t * Stop tracing.\n\t\t *\n\t\t * @name Paho.Client#stopTrace\n\t\t * @function\n\t\t */\n\t\t\tthis.stopTrace = function () {\n\t\t\t\tclient.stopTrace();\n\t\t\t};\n\n\t\t\tthis.isConnected = function() {\n\t\t\t\treturn client.connected;\n\t\t\t};\n\t\t};\n\n\t\t/**\n\t * An application message, sent or received.\n\t * \n\t *
\n\t *