TransFlow/dist/static/js/chunk-585237fc.638f0739.js

9 lines
379 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-585237fc"],{"0050":function(e,t,n){"use strict";(function(t){function n(e){return e instanceof t?t.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function r(e){return e=e||{},e.circles?i(e):e.proto?o:r;function t(e,t){for(var r=Object.keys(e),i=new Array(r.length),o=0;o<r.length;o++){var s=r[o],a=e[s];"object"!==typeof a||null===a?i[s]=a:a instanceof Date?i[s]=new Date(a):ArrayBuffer.isView(a)?i[s]=n(a):i[s]=t(a)}return i}function r(e){if("object"!==typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return t(e,r);if(e instanceof Map)return new Map(t(Array.from(e),r));if(e instanceof Set)return new Set(t(Array.from(e),r));var i={};for(var o in e)if(!1!==Object.hasOwnProperty.call(e,o)){var s=e[o];"object"!==typeof s||null===s?i[o]=s:s instanceof Date?i[o]=new Date(s):s instanceof Map?i[o]=new Map(t(Array.from(s),r)):s instanceof Set?i[o]=new Set(t(Array.from(s),r)):ArrayBuffer.isView(s)?i[o]=n(s):i[o]=r(s)}return i}function o(e){if("object"!==typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return t(e,o);if(e instanceof Map)return new Map(t(Array.from(e),o));if(e instanceof Set)return new Set(t(Array.from(e),o));var r={};for(var i in e){var s=e[i];"object"!==typeof s||null===s?r[i]=s:s instanceof Date?r[i]=new Date(s):s instanceof Map?r[i]=new Map(t(Array.from(s),o)):s instanceof Set?r[i]=new Set(t(Array.from(s),o)):ArrayBuffer.isView(s)?r[i]=n(s):r[i]=o(s)}return r}}function i(e){var t=[],r=[];return e.proto?s:o;function i(e,i){for(var o=Object.keys(e),s=new Array(o.length),a=0;a<o.length;a++){var l=o[a],c=e[l];if("object"!==typeof c||null===c)s[l]=c;else if(c instanceof Date)s[l]=new Date(c);else if(ArrayBuffer.isView(c))s[l]=n(c);else{var u=t.indexOf(c);s[l]=-1!==u?r[u]:i(c)}}return s}function o(e){if("object"!==typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return i(e,o);if(e instanceof Map)return new Map(i(Array.from(e),o));if(e instanceof Set)return new Set(i(Array.from(e),o));var s={};for(var a in t.push(e),r.push(s),e)if(!1!==Object.hasOwnProperty.call(e,a)){var l=e[a];if("object"!==typeof l||null===l)s[a]=l;else if(l instanceof Date)s[a]=new Date(l);else if(l instanceof Map)s[a]=new Map(i(Array.from(l),o));else if(l instanceof Set)s[a]=new Set(i(Array.from(l),o));else if(ArrayBuffer.isView(l))s[a]=n(l);else{var c=t.indexOf(l);s[a]=-1!==c?r[c]:o(l)}}return t.pop(),r.pop(),s}function s(e){if("object"!==typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return i(e,s);if(e instanceof Map)return new Map(i(Array.from(e),s));if(e instanceof Set)return new Set(i(Array.from(e),s));var o={};for(var a in t.push(e),r.push(o),e){var l=e[a];if("object"!==typeof l||null===l)o[a]=l;else if(l instanceof Date)o[a]=new Date(l);else if(l instanceof Map)o[a]=new Map(i(Array.from(l),s));else if(l instanceof Set)o[a]=new Set(i(Array.from(l),s));else if(ArrayBuffer.isView(l))o[a]=n(l);else{var c=t.indexOf(l);o[a]=-1!==c?r[c]:s(l)}}return t.pop(),r.pop(),o}}e.exports=r}).call(this,n("b639").Buffer)},"035d":function(e,t,n){t=e.exports=n("85f8"),t.Stream=t,t.Readable=t,t.Writable=n("13a8"),t.Duplex=n("be3f"),t.Transform=n("3ca2"),t.PassThrough=n("7058"),t.finished=n("d9e1"),t.pipeline=n("652a")},"0573":function(e,t,n){},"05ee":function(e,t,n){"use strict";const r=n(1),i=n("db34")("mqttjs:tcp");function o(e,t){t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost";const n=t.port,o=t.hostname;return i("port %d and host %s",n,o),r.createConnection(n,o)}e.exports=o},"0b16":function(e,t,n){"use strict";var r=n("1985"),i=n("35e86");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=_,t.resolve=C,t.resolveObject=E,t.format=S,t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],u=["{","}","|","\\","^","`"].concat(c),h=["'"].concat(u),p=["%","/","?",";","#"].concat(h),f=["/","?","#"],d=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=n("b383");function _(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}function S(e){return i.isString(e)&&(e=_(e)),e instanceof o?e.format():o.prototype.format.call(e)}function C(e,t){return _(e,!1,!0).resolve(t)}function E(e,t){return e?_(e,!1,!0).resolveObject(t):t}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a),u=/\\/g;c[0]=c[0].replace(u,"/"),e=c.join(a);var _=e;if(_=_.trim(),!n&&1===e.split("#").length){var S=l.exec(_);if(S)return this.path=_,this.href=_,this.pathname=S[1],S[2]?(this.search=S[2],this.query=t?w.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var C=s.exec(_);if(C){C=C[0];var E=C.toLowerCase();this.protocol=E,_=_.substr(C.length)}if(n||C||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===_.substr(0,2);!k||C&&b[C]||(_=_.substr(2),this.slashes=!0)}if(!b[C]&&(k||C&&!v[C])){for(var T,x,A=-1,I=0;I<f.length;I++){var R=_.indexOf(f[I]);-1!==R&&(-1===A||R<A)&&(A=R)}x=-1===A?_.lastIndexOf("@"):_.lastIndexOf("@",A),-1!==x&&(T=_.slice(0,x),_=_.slice(x+1),this.auth=decodeURIComponent(T)),A=-1;for(I=0;I<p.length;I++){R=_.indexOf(p[I]);-1!==R&&(-1===A||R<A)&&(A=R)}-1===A&&(A=_.length),this.host=_.slice(0,A),_=_.slice(A),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var P=this.hostname.split(/\./),F=(I=0,P.length);I<F;I++){var B=P[I];if(B&&!B.match(g)){for(var M="",L=0,N=B.length;L<N;L++)B.charCodeAt(L)>127?M+="x":M+=B[L];if(!M.match(g)){var j=P.slice(0,I),D=P.slice(I+1),U=B.match(m);U&&(j.push(U[1]),D.unshift(U[2])),D.length&&(_="/"+D.join(".")+_),this.hostname=j.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var q=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+q,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!y[E])for(I=0,F=h.length;I<F;I++){var z=h[I];if(-1!==_.indexOf(z)){var W=encodeURIComponent(z);W===z&&(W=escape(z)),_=_.split(z).join(W)}}var $=_.indexOf("#");-1!==$&&(this.hash=_.substr($),_=_.slice(0,$));var H=_.indexOf("?");if(-1!==H?(this.search=_.substr(H),this.query=_.substr(H+1),t&&(this.query=w.parse(this.query)),_=_.slice(0,H)):t&&(this.search="",this.query={}),_&&(this.pathname=_),v[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var K=this.search||"";this.path=q+K}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=w.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})),a=a.replace("#","%23"),t+o+n+a+r},o.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var h=Object.keys(e),p=0;p<h.length;p++){var f=h[p];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||b[e.protocol])n.pathname=e.pathname;else{var d=(e.pathname||"").split("/");while(d.length&&!(e.host=d.shift()));e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",m=n.search||"";n.path=g+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||y||n.host&&e.pathname,S=_,C=n.pathname&&n.pathname.split("/")||[],E=(d=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===C[0]?C[0]=n.host:C.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),_=_&&(""===d[0]||""===C[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,C=d;else if(d.length)C||(C=[]),C.pop(),C=C.concat(d),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(E){n.hostname=n.host=C.shift();var k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=C.slice(-1)[0],x=(n.host||e.host||C.length>1)&&("."===T||".."===T)||""===T,A=0,I=C.length;I>=0;I--)T=C[I],"."===T?C.splice(I,1):".."===T?(C.splice(I,1),A++):A&&(C.splice(I,1),A--);if(!_&&!S)for(;A--;A)C.unshift("..");!_||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),x&&"/"!==C.join("/").substr(-1)&&C.push("");var R=""===C[0]||C[0]&&"/"===C[0].charAt(0);if(E){n.hostname=n.host=R?"":C.length?C.shift():"";k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return _=_||n.host&&C.length,_&&!R&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},"0e8b":function(e,t,n){"use strict";(function(t,r){var i;e.exports=I,I.ReadableState=A;n("faa1").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=n("b98b"),a=n("b639").Buffer,l=t.Uint8Array||function(){};function c(e){return a.from(e)}function u(e){return a.isBuffer(e)||e instanceof l}var h,p=n(4);h=p&&p.debuglog?p.debuglog("stream"):function(){};var f,d,g,m=n("e937"),y=n("f482"),b=n("86c6"),v=b.getHighWaterMark,w=n("9bfc").codes,_=w.ERR_INVALID_ARG_TYPE,S=w.ERR_STREAM_PUSH_AFTER_EOF,C=w.ERR_METHOD_NOT_IMPLEMENTED,E=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n("3fb5")(I,s);var k=y.errorOrDestroy,T=["error","close","destroy","pause","resume"];function x(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function A(e,t,r){i=i||n("a493"),e=e||{},"boolean"!==typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",r),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=n("7d72").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function I(e){if(i=i||n("a493"),!(this instanceof I))return new I(e);var t=this instanceof i;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function R(e,t,n,r,i){h("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,L(e,s);else if(i||(o=P(s,t)),o)k(e,o);else if(s.objectMode||t&&t.length>0)if("string"===typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=c(t)),r)s.endEmitted?k(e,new E):O(e,s,t,!0);else if(s.ended)k(e,new S);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?O(e,s,t,!1):D(e,s)):O(e,s,t,!1)}else r||(s.reading=!1,D(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&N(e)),D(e,t)}function P(e,t){var n;return u(t)||"string"===typeof t||void 0===t||e.objectMode||(n=new _("chunk",["string","Buffer","Uint8Array"],t)),n}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),I.prototype.destroy=y.destroy,I.prototype._undestroy=y.undestroy,I.prototype._destroy=function(e,t){t(e)},I.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=a.from(e,t),t=""),n=!0),R(this,e,t,!1,n)},I.prototype.unshift=function(e){return R(this,e,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(e){f||(f=n("7d72").StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,i="";while(null!==r)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var F=1073741824;function B(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=B(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e,t){if(h("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}}function N(e){var t=e._readableState;h("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(j,e))}function j(e){var t=e._readableState;h("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,H(e)}function D(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(U,e,t))}function U(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length)){var n=t.length;if(h("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function q(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,H(e))}}function V(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){h("readable nexttick read 0"),e.read(0)}function W(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick($,e,t))}function $(e,t){h("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),H(e),t.flowing&&!t.reading&&e.read(0)}function H(e){var t=e._readableState;h("flow",t.flowing);while(t.flowing&&null!==e.read());}function K(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function Q(e){var t=e._readableState;h("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(Y,t,e))}function Y(e,t){if(h("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function G(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}I.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):N(this),null;if(e=M(e,t),0===e&&t.ended)return 0===t.length&&Q(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,h("length less than watermark",i)),t.ended||t.reading?(i=!1,h("reading or ended",i)):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=M(n,t))),r=e>0?K(e,t):null,null===r?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&Q(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){k(this,new C("_read()"))},I.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:b;function l(e,t){h("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function c(){h("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",l);var u=q(n);e.on("drain",u);var p=!1;function f(){h("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",g),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",b),n.removeListener("data",d),p=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u()}function d(t){h("ondata");var r=e.write(t);h("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==G(i.pipes,e))&&!p&&(h("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function g(t){h("onerror",t),b(),e.removeListener("error",g),0===o(e,"error")&&k(e,t)}function m(){e.removeListener("finish",y),b()}function y(){h("onfinish"),e.removeListener("close",m),b()}function b(){h("unpipe"),n.unpipe(e)}return n.on("data",d),x(e,"error",g),e.once("close",m),e.once("finish",y),e.emit("pipe",n),i.flowing||(h("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},I.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,h("on readable",i.length,i.reading),i.length?N(this):i.reading||r.nextTick(z,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(V,this),n},I.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(V,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!e.readableListening,W(this,e)),e.paused=!1,this},I.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){if(h("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<T.length;o++)e.on(T[o],this.emit.bind(this,T[o]));return this._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"===typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n("782c")),d(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),I._fromList=K,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(I.from=function(e,t){return void 0===g&&(g=n("a50f")),g(I,e,t)})}).call(this,n("c8ba"),n("f28c"))},1:function(e,t){},"13a8":function(e,t,n){"use strict";(function(t,r){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){$(t,e)}}var o;e.exports=A,A.WritableState=x;var s={deprecate:n("b7d1")},a=n("9ede"),l=n("b639").Buffer,c=t.Uint8Array||function(){};function u(e){return l.from(e)}function h(e){return l.isBuffer(e)||e instanceof c}var p,f=n("edb3"),d=n("31b5"),g=d.getHighWaterMark,m=n("fbd7").codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_MULTIPLE_CALLBACK,w=m.ERR_STREAM_CANNOT_PIPE,_=m.ERR_STREAM_DESTROYED,S=m.ERR_STREAM_NULL_VALUES,C=m.ERR_STREAM_WRITE_AFTER_END,E=m.ERR_UNKNOWN_ENCODING,k=f.errorOrDestroy;function T(){}function x(e,t,r){o=o||n("be3f"),e=e||{},"boolean"!==typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=g(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){L(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){o=o||n("be3f");var t=this instanceof o;if(!t&&!p.call(A,this))return new A(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),a.call(this)}function I(e,t){var n=new C;k(e,n),r.nextTick(t,n)}function R(e,t,n,i){var o;return null===n?o=new S:"string"===typeof n||t.objectMode||(o=new y("chunk",["string","Buffer"],n)),!o||(k(e,o),r.nextTick(i,o),!1)}function O(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=l.from(t,n)),t}function P(e,t,n,r,i,o){if(!n){var s=O(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else F(e,t,!1,a,r,i,o);return l}function F(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function B(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(z,e,t),e._writableState.errorEmitted=!0,k(e,i)):(o(i),e._writableState.errorEmitted=!0,k(e,i),z(e,t))}function M(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function L(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if("function"!==typeof o)throw new v;if(M(n),t)B(e,n,i,t,o);else{var s=U(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||D(e,n),i?r.nextTick(N,e,n,s,o):N(e,n,s,o)}}function N(e,t,n,r){n||j(e,t),t.pendingcb--,r(),z(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function D(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),s=t.corkedRequestsFree;s.entry=n;var a=0,l=!0;while(n)o[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;o.allBuffers=l,F(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{while(n){var c=n.chunk,u=n.encoding,h=n.callback,p=t.objectMode?1:c.length;if(F(e,t,!1,p,c,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function U(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function q(e,t){e._final((function(n){t.pendingcb--,n&&k(e,n),t.prefinished=!0,e.emit("prefinish"),z(e,t)}))}function V(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(q,e,t)))}function z(e,t){var n=U(t);if(n&&(V(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}function W(e,t,n){t.ending=!0,z(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function $(e,t,n){var r=e.entry;e.entry=null;while(r){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}n("3fb5")(A,a),x.prototype.getBuffer=function(){var e=this.bufferedRequest,t=[];while(e)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===A&&(e&&e._writableState instanceof x)}})):p=function(e){return e instanceof this},A.prototype.pipe=function(){k(this,new w)},A.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&h(e);return o&&!l.isBuffer(e)&&(e=u(e)),"function"===typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!==typeof n&&(n=T),r.ending?I(this,n):(o||R(this,r,e,n))&&(r.pendingcb++,i=P(this,r,o,e,t,n)),i},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new b("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||W(this,r,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this,n("c8ba"),n("f28c"))},1515:function(e,t,n){"use strict";var r=n("6c8c"),i=n.n(r);i.a},"17e3":function(e,t,n){},1985:function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,c=36,u=1,h=26,p=38,f=700,d=72,g=128,m="-",y=/^xn--/,b=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=c-u,S=Math.floor,C=String.fromCharCode;function E(e){throw new RangeError(w[e])}function k(e,t){var n=e.length,r=[];while(n--)r[n]=t(e[n]);return r}function T(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(v,".");var i=e.split("."),o=k(i,t).join(".");return r+o}function x(e){var t,n,r=[],i=0,o=e.length;while(i<o)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function A(e){return k(e,(function(e){var t="";return e>65535&&(e-=65536,t+=C(e>>>10&1023|55296),e=56320|1023&e),t+=C(e),t})).join("")}function I(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function R(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,n){var r=0;for(e=n?S(e/f):e>>1,e+=S(e/t);e>_*h>>1;r+=c)e=S(e/_);return S(r+(_+1)*e/(e+p))}function P(e){var t,n,r,i,o,s,a,p,f,y,b=[],v=e.length,w=0,_=g,C=d;for(n=e.lastIndexOf(m),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&E("not-basic"),b.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<v;){for(o=w,s=1,a=c;;a+=c){if(i>=v&&E("invalid-input"),p=I(e.charCodeAt(i++)),(p>=c||p>S((l-w)/s))&&E("overflow"),w+=p*s,f=a<=C?u:a>=C+h?h:a-C,p<f)break;y=c-f,s>S(l/y)&&E("overflow"),s*=y}t=b.length+1,C=O(w-o,t,0==o),S(w/t)>l-_&&E("overflow"),_+=S(w/t),w%=t,b.splice(w++,0,_)}return A(b)}function F(e){var t,n,r,i,o,s,a,p,f,y,b,v,w,_,k,T=[];for(e=x(e),v=e.length,t=g,n=0,o=d,s=0;s<v;++s)b=e[s],b<128&&T.push(C(b));r=i=T.length,i&&T.push(m);while(r<v){for(a=l,s=0;s<v;++s)b=e[s],b>=t&&b<a&&(a=b);for(w=r+1,a-t>S((l-n)/w)&&E("overflow"),n+=(a-t)*w,t=a,s=0;s<v;++s)if(b=e[s],b<t&&++n>l&&E("overflow"),b==t){for(p=n,f=c;;f+=c){if(y=f<=o?u:f>=o+h?h:f-o,p<y)break;k=p-y,_=c-y,T.push(C(R(y+k%_,0))),p=S(k/_)}T.push(C(R(p,0))),o=O(n,w,r==i),n=0,++r}++n,++t}return T.join("")}function B(e){return T(e,(function(e){return y.test(e)?P(e.slice(4).toLowerCase()):e}))}function M(e){return T(e,(function(e){return b.test(e)?"xn--"+F(e):e}))}a={version:"1.4.1",ucs2:{decode:x,encode:A},decode:P,encode:F,toASCII:M,toUnicode:B},i=function(){return a}.call(t,n,t,e),void 0===i||(e.exports=i)})()}).call(this,n("62e4")(e),n("c8ba"))},"1b34":function(e,t,n){},"1cfe":function(e,t,n){"use strict";var r=n("8050"),i=n.n(r);i.a},"1da5":function(e,t,n){"use strict";var r=n("364a"),i=n.n(r);i.a},"1e4b":function(e,t,n){"use strict";n.r(t);var r,i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content-box"},[n("div",[n("el-tabs",{attrs:{type:"border-card"},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"xx路口",name:"first"}},[n("div",{staticClass:"mapModuleApp"},[n("iframe",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"mapModule",src:"./VideoWeb/index.html",frameborder:"0",scrolling:"no"}})])]),n("el-tab-pane",{attrs:{label:"数据看板",name:"second"}},[n("dataBoard",{attrs:{activeName:e.activeName}})],1),n("el-tab-pane",{attrs:{label:"分析配置",name:"third"}},[n("analysisConfiguration")],1),n("el-tab-pane",{attrs:{label:"分析状态",name:"fourth"}},[n("editModal")],1),n("el-tab-pane",{attrs:{label:"存储",name:"five"}},[e._v("存储")])],1)],1),n("el-drawer",{directives:[{name:"alterELDialogMarginTop",rawName:"v-alterELDialogMarginTop",value:{marginTop:"0vh"},expression:"{marginTop:'0vh'}"}],ref:"drawer",staticClass:"new-dialog",attrs:{visible:e.dialogFormVisible,direction:"btt","custom-class":"demo-drawer",modal:!1,"close-on-click-modal":!1,customClass:"customWidth",width:"100%",wrapperClosable:!1,"with-header":!1},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[n("div",{staticClass:"formBox"},[n("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px",inline:!0}},[n("el-form-item",{attrs:{label:"组件名称"}},[n("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),"断面"==e.form.type?n("el-form-item",{attrs:{label:"断面方向"}},[n("el-select",{attrs:{placeholder:"请选择类型"},model:{value:e.form.Direction,callback:function(t){e.$set(e.form,"Direction",t)},expression:"form.Direction"}},[n("el-option",{attrs:{label:"正向",value:"正向"}}),n("el-option",{attrs:{label:"反向",value:"反向"}}),n("el-option",{attrs:{label:"双向",value:"双向"}})],1)],1):e._e(),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubmit(e.form)}}},[e._v("确认")]),n("el-button",{on:{click:function(t){return e.closeFigure(e.form)}}},[e._v("取消")])],1)],1)],1)]),n("el-dialog",{attrs:{title:e.componentTitle+"指标组件",width:"40%",visible:e.component},on:{"update:visible":function(t){e.component=t}}},[n("el-form",{ref:"form",attrs:{model:e.componentForm,"label-width":"150px"},on:{close:function(t){return e.closeComponentForm()}}},[n("el-form-item",{attrs:{label:"名称:"}},[n("el-input",{model:{value:e.componentForm.componentName,callback:function(t){e.$set(e.componentForm,"componentName",t)},expression:"componentForm.componentName"}})],1),"类型"==e.componentForm.componentType?n("el-form-item",{attrs:{label:"类型筛选:"}},[n("el-checkbox-group",{model:{value:e.componentForm.typeFiltering,callback:function(t){e.$set(e.componentForm,"typeFiltering",t)},expression:"componentForm.typeFiltering"}},e._l(e.typeData,(function(t){return n("el-checkbox",{key:t,attrs:{label:t}},[e._v(e._s(t))])})),1)],1):e._e(),"OD"!=e.componentForm.componentType?n("el-form-item",{attrs:{label:"数值筛选:"}},[n("el-input-number",{model:{value:e.componentForm.startValue,callback:function(t){e.$set(e.componentForm,"startValue",t)},expression:"componentForm.startValue"}}),n("el-input-number",{staticStyle:{"margin-left":"5%"},model:{value:e.componentForm.endValue,callback:function(t){e.$set(e.componentForm,"endValue",t)},expression:"componentForm.endValue"}})],1):e._e(),n("el-form-item",{attrs:{label:"时间模式:"}},[n("el-select",{attrs:{placeholder:"请选择时间模式"},model:{value:e.componentForm.timeMode,callback:function(t){e.$set(e.componentForm,"timeMode",t)},expression:"componentForm.timeMode"}},[n("el-option",{attrs:{label:"触发",value:"touch"}}),"排队数"!=e.componentForm.componentType&&"检测数"!=e.componentForm.componentType&&"延误"!=e.componentForm.componentType&&"拥堵"!=e.componentForm.componentType?n("el-option",{attrs:{label:"周期时刻",value:"timeing"}}):e._e(),"OD"!=e.componentForm.componentType?n("el-option",{attrs:{label:"周期统计",value:"date"}}):e._e()],1)],1),n("el-form-item",{attrs:{label:"周期间隔:"}},[n("el-slider",{model:{value:e.componentForm.cycleInterval,callback:function(t){e.$set(e.componentForm,"cycleInterval",t)},expression:"componentForm.cycleInterval"}}),n("el-select",{attrs:{placeholder:"请选择单位"},model:{value:e.componentForm.company,callback:function(t){e.$set(e.componentForm,"company",t)},expression:"componentForm.company"}},e._l(e.timeSelect,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),"OD"==e.componentForm.componentType?n("el-form-item",{attrs:{label:"起点:"}},[n("el-checkbox-group",{on:{change:e.handleCheckedStartSection},model:{value:e.componentForm.startSection,callback:function(t){e.$set(e.componentForm,"startSection",t)},expression:"componentForm.startSection"}},e._l(e.sectionals,(function(t){return n("el-checkbox",{key:t.graphicId,attrs:{label:t.graphicName}},[e._v(e._s(t.graphicName))])})),1)],1):e._e(),"OD"==e.componentForm.componentType?n("el-form-item",{attrs:{label:"终点:"}},[n("el-checkbox-group",{on:{change:e.handleCheckedendSection},model:{value:e.componentForm.endSection,callback:function(t){e.$set(e.componentForm,"endSection",t)},expression:"componentForm.endSection"}},e._l(e.sectionals,(function(t){return n("el-checkbox",{key:t.graphicId,attrs:{label:t.graphicName}},[e._v(e._s(t.graphicName))])})),1)],1):e._e(),"OD"!=e.componentForm.componentType?n("el-form-item",{attrs:{label:"展现形式:"}},[n("el-checkbox-group",{on:{change:e.handlePresentation},model:{value:e.componentForm.presentation,callback:function(t){e.$set(e.componentForm,"presentation",t)},expression:"componentForm.presentation"}},[n("el-checkbox",{attrs:{label:"数值",name:"type"}}),"拥堵"!=e.componentForm.componentType?n("el-checkbox",{attrs:{label:"表格",name:"type"}}):e._e(),n("el-checkbox",{attrs:{label:"时间曲线图",name:"type"}}),"类型"==e.componentForm.componentType?n("el-checkbox",{attrs:{label:"直方图",name:"type"}}):e._e(),"类型"==e.componentForm.componentType?n("el-checkbox",{attrs:{label:"饼状图",name:"type"}}):e._e(),"拥堵"!=e.componentForm.componentType?n("el-checkbox",{attrs:{label:"均值图",name:"type"}}):e._e()],1)],1):e._e(),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubmitComponent(e.componentForm)}}},[e._v("确认")]),n("el-button",{on:{click:function(t){return e.closeComponent(e.componentForm)}}},[e._v("取消")])],1)],1)],1)],1)},o=[],s=(n("7f7f"),n("ac6a"),n("28a5"),n("34ef"),n("8cce")),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"analysis"},[n("div",{staticClass:"top",staticStyle:{"margin-top":"10px"}},[n("div",{staticClass:"section"},[e._e(),n("el-form",{ref:"form",staticStyle:{"margin-top":"15px"},attrs:{model:e.sizeForm,"label-width":"fit-content"}},[e._e(),e._e(),n("div",{staticClass:"warning",staticStyle:{"margin-top":"15px"},on:{click:function(t){return e.handleContent("postion")}}},[n("i",{class:0==e.contentShow.postion?"el-icon-arrow-right":"el-icon-arrow-down",staticStyle:{"font-weight":"600","font-size":"18px","margin-right":"5px"}}),n("p",{staticClass:"board-title"},[e._v("相机位置")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v(" 在 WGS84 坐标系中输入相机位置\n ")]),e.contentShow.postion?n("el-form-item",{attrs:{label:"相机位置:"}},[n("el-input",{staticStyle:{width:"150px"},attrs:{size:"small",placeholder:"经度"},model:{value:e.sizeForm.longitude,callback:function(t){e.$set(e.sizeForm,"longitude",t)},expression:"sizeForm.longitude"}}),n("el-input",{staticStyle:{width:"150px","margin-left":"20px"},attrs:{size:"small",placeholder:"纬度"},model:{value:e.sizeForm.latitude,callback:function(t){e.$set(e.sizeForm,"latitude",t)},expression:"sizeForm.latitude"}})],1):e._e()],1),e.contentShow.postion?n("div",{staticStyle:{"margin-top":"15px"}},[n("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handSaveitude()}}},[e._v("保存")])],1):e._e()],1)]),n("div",{staticClass:"dataBoard"},[n("div",{staticClass:"section"},[n("div",{staticClass:"warning",on:{click:function(t){return e.handleContent("coordinate")}}},[n("i",{class:0==e.contentShow.coordinate?"el-icon-arrow-right":"el-icon-arrow-down",staticStyle:{"font-weight":"600","font-size":"18px","margin-right":"5px"}}),n("p",{staticClass:"board-title"},[e._v("坐标转换")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("通过将图像坐标系转换为物理坐标系,地理参考使您能够将像素测量转换为真实速度和距离。\n ")]),e.contentShow.coordinate?n("el-form",{ref:"form",attrs:{model:e.coordinateForm,"label-width":"fit-content"}},[n("el-form-item",{staticClass:"otherThings",attrs:{label:"UTM区"}},[n("el-input-number",{attrs:{"controls-position":"right",size:"small",min:1,max:60},on:{change:e.handleChange},model:{value:e.coordinateForm.num,callback:function(t){e.$set(e.coordinateForm,"num",t)},expression:"coordinateForm.num"}}),n("div",{staticClass:"warning",staticStyle:{margin:"0px"}},[n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("地理参照允许测量物理速度和静态图像源的距离。\n ")])],1),n("el-form-item",{attrs:{label:"半球:"}},[n("el-select",{attrs:{size:"small",placeholder:"请选择"},model:{value:e.coordinateForm.value,callback:function(t){e.$set(e.coordinateForm,"value",t)},expression:"coordinateForm.value"}},e._l(e.options,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:"坐标转换:"}},[n("el-radio-group",{model:{value:e.coordinateForm.coordinateTransformation,callback:function(t){e.$set(e.coordinateForm,"coordinateTransformation",t)},expression:"coordinateForm.coordinateTransformation"}},[n("el-radio",{attrs:{label:"WGS-84坐标系"}}),n("el-radio",{attrs:{label:"其他"}})],1)],1),n("div",{staticStyle:{width:"100%",height:"400px","margin-bottom":"10px"}},[n("iframe",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"mapModuleTop",src:"./VideoWeb/index.html",frameborder:"0"},on:{load:e.load}})]),n("div",{staticClass:"warning"},[n("el-button",{staticStyle:{color:"#fffff"},attrs:{size:"mini",type:"primary"},on:{click:function(t){e.dialogVisible=!0}}},[e._v("新增点\n ")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("请至少配置4个点不满足4个点会没有数据。\n ")],1),n("el-table",{attrs:{border:"",data:e.coordinateTableData}},[n("template",{slot:"empty"},[n("el-empty",{attrs:{"image-size":100,description:"暂无数据"}})],1),n("el-table-column",{attrs:{prop:"pointName",label:"点名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-input",{attrs:{maxlength:"30",placeholder:"请输入"},model:{value:t.row.pointName,callback:function(n){e.$set(t.row,"pointName",n)},expression:"scope.row.pointName"}})]}}],null,!1,2386407447)}),n("el-table-column",{attrs:{prop:"longitude",label:"经度",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-input",{attrs:{maxlength:"20",placeholder:"请输入"},model:{value:t.row.longitude,callback:function(n){e.$set(t.row,"longitude",n)},expression:"scope.row.longitude"}})]}}],null,!1,1223382878)}),n("el-table-column",{attrs:{prop:"latitude",label:"纬度",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-input",{attrs:{maxlength:"20",placeholder:"请输入"},model:{value:t.row.latitude,callback:function(n){e.$set(t.row,"latitude",n)},expression:"scope.row.latitude"}})]}}],null,!1,1252814925)}),n("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{staticStyle:{color:"#2090c1"},attrs:{size:"mini",type:"text"},on:{click:function(n){return e.handleUpdate(t.row)}}},[e._v("编辑\n ")]),n("el-button",{staticStyle:{color:"#f56c6c"},attrs:{size:"mini",type:"text"},on:{click:function(n){return e.handleDeleteDian(t.row)}}},[e._v("删除\n ")])]}}],null,!1,2444983767)})],2),n("div",{staticStyle:{"margin-top":"15px"}},[n("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",disabled:e.coordinateTableData.length<4,size:"small"},on:{click:function(t){return e.handlePos()}}},[e._v("保存")])],1)],1):e._e()],1)]),e._e(),e._e(),e._e(),n("div",{staticClass:"dataBoard"},[n("div",{staticClass:"section"},[n("div",{staticClass:"warning",on:{click:function(t){return e.handleContent("plate")}}},[n("i",{class:0==e.contentShow.plate?"el-icon-arrow-right":"el-icon-arrow-down",staticStyle:{"font-weight":"600","font-size":"18px","margin-right":"5px"}}),n("p",{staticClass:"board-title"},[e._v("车牌识别")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("车牌识别开关。牌照信息表示与目标属性。(断面号牌,与断面设置关联)\n ")]),e.contentShow.plate?n("el-form",{ref:"form",attrs:{model:e.licensePlateform,"label-width":"fit-content"}},[n("el-form-item",{attrs:{label:"车牌识别开关:"}},[n("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(t){return e.changeChepai(t)}},model:{value:e.licensePlateform.licensePlateClose,callback:function(t){e.$set(e.licensePlateform,"licensePlateClose",t)},expression:"licensePlateform.licensePlateClose"}})],1),e._e(),e._e(),e._e()],1):e._e()],1)]),n("div",{staticClass:"dataBoard"},[n("div",{staticClass:"section"},[n("div",{staticClass:"warning",on:{click:function(t){return e.handleContent("parking")}}},[n("i",{class:0==e.contentShow.parking?"el-icon-arrow-right":"el-icon-arrow-down",staticStyle:{"font-weight":"600","font-size":"18px","margin-right":"5px"}}),n("p",{staticClass:"board-title"},[e._v("停车状态")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("位移、速度例如位移δ速度v则判断车辆停车\n ")]),e.contentShow.parking?n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.stopStateform,"label-width":"fit-content"}},[n("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{label:"位移:"}},[n("el-input-number",{attrs:{min:0,max:3e3,label:"位移"},on:{change:e.handleChange},model:{value:e.stopStateform.displacement,callback:function(t){e.$set(e.stopStateform,"displacement",t)},expression:"stopStateform.displacement"}})],1),n("el-form-item",{staticStyle:{"margin-right":"10px"},attrs:{label:"速度:"}},[n("el-input-number",{attrs:{min:0,max:3e3,label:"速度"},on:{change:e.handleChange},model:{value:e.stopStateform.speed,callback:function(t){e.$set(e.stopStateform,"speed",t)},expression:"stopStateform.speed"}})],1),e._e()],1):e._e(),e.contentShow.parking?n("div",{staticStyle:{"margin-top":"15px"}},[n("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleParking()}}},[e._v("保存")])],1):e._e()],1)]),e._e(),n("el-dialog",{attrs:{title:"新增点",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("el-form",{ref:"addform",attrs:{rules:e.formRules,model:e.addDianForm,"label-position":"left","label-width":"85px"}},[n("el-form-item",{staticStyle:{"margin-bottom":"15px"},attrs:{label:"点名称:",prop:"pointName"}},[n("el-col",{attrs:{span:16}},[n("el-input",{attrs:{placeholder:"请输入点名称"},model:{value:e.addDianForm.pointName,callback:function(t){e.$set(e.addDianForm,"pointName",t)},expression:"addDianForm.pointName"}})],1)],1),n("el-form-item",{staticStyle:{"margin-bottom":"15px"},attrs:{label:"经度:",prop:"longitude"}},[n("el-col",{attrs:{span:16}},[n("el-input",{attrs:{oninput:"value=value.replace(/[^0-9.]/g,'')",placeholder:"请输入经度"},model:{value:e.addDianForm.longitude,callback:function(t){e.$set(e.addDianForm,"longitude",t)},expression:"addDianForm.longitude"}})],1)],1),n("el-form-item",{attrs:{label:"纬度:",prop:"latitude"}},[n("el-col",{attrs:{span:16}},[n("el-input",{attrs:{oninput:"value=value.replace(/[^0-9.]/g,'')",placeholder:"请输入纬度"},model:{value:e.addDianForm.latitude,callback:function(t){e.$set(e.addDianForm,"latitude",t)},expression:"addDianForm.latitude"}})],1)],1)],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleDian("addform")}}},[e._v("确 定")])],1)],1)],1)},l=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"warning"},[n("p",{staticClass:"board-title"},[e._v("车道识别配置")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("在视频/动图上设置进口出口道\n ")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"warning"},[n("p",{staticClass:"board-title"},[e._v("识别区域")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("您可以自定义进行视频分析的区域,区域之外的部分将被忽略。此功能可以帮助您检测和跟踪高分辨率视频特定部分的较小对象,实现检测器的数字变焦功能。\n ")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"warning"},[n("p",{staticClass:"board-title"},[e._v("轨迹平滑")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("为轨迹预测滤波算法定义细化轨迹的时间窗口。数值越小,延迟越小,适用于实时性要求高的场景;数值越大,轨迹的连续性越好,目标即使越过一些障碍也不容易丢失。\n ")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"warning"},[n("p",{staticClass:"board-title"},[e._v("通信设置")]),n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#409eff",margin:"0 3px 0 10px"}}),e._v("更新频率可以根据链路带宽进行设置。\n ")])}],c=n("ade3"),u=(n("6b54"),n("e7fc")),h=n.n(u),p=n("365c"),f={data:function(){return{formRules:{pointName:[{required:!0,message:"请输入点名称",trigger:"blur"}],longitude:[{required:!0,message:"请输入经度",trigger:"blur"}],latitude:[{required:!0,message:"请输入纬度",trigger:"blur"}]},addDianForm:{pointName:"",longitude:"",latitude:""},dialogVisible:!1,coordinateTransformationId:"",AnalysisSettingId:"",contentShow:{postion:!0,coordinate:!1,plate:!0,parking:!0},sizeForm:{name:"",region:"",date1:"",date2:"",delivery:!1,type:[],resource:"",desc:"",longitude:"",latitude:""},formInline:{user:"",region:""},topForm:{},coordinateForm:{coordinateClose:!1,model:"Georeferencing",coordinateTransformation:"84坐标系",value:"0",num:1},options:[{value:"南",label:"南"},{value:"北",label:"北"}],coordinateTableData:[{name:"11",longitude:"111",inIp:"01",latitude:""},{name:"22",longitude:"222",inIp:"02",latitude:""},{name:"33",longitude:"333",inIp:"03",latitude:""}],laneform:{laneClose:!1,areaDetector:!1,sectionDetector:!1},identificationAreaform:{identificationAreaClose:!1},trajectorySmoothingform:{trajectorySmoothingClose:!1,time:""},licensePlateform:{licensePlateClose:0},licensePlateTableData:[{thresholdValue:"11",sectionPlate:"111",inIp:"01",setAssociation:""},{thresholdValue:"22",sectionPlate:"222",inIp:"02",setAssociation:""},{thresholdValue:"33",sectionPlate:"333",inIp:"03",setAssociation:""}],stopStateform:{displacement:"2000",speed:"2000",acceleration:"2000"},communicationform:{type:"快速-用于高带宽连接",renewalFrequency:""},form:{name:"",region:"",date1:"",date2:"",delivery:!1,type:[],resource:"",desc:""},tableData:[{name:"11",inPort:"111",inIp:"01"},{name:"22",inPort:"222",inIp:"02"},{name:"33",inPort:"333",inIp:"03"}],internalIpList:[],fileList:[]}},created:function(){var e=this;Object(p["d"])({VideoId:this.$route.query.id}).then((function(t){e.sizeForm.longitude=t.data.data.cameraPositionLongitude,e.sizeForm.latitude=t.data.data.cameraPositionLatitude,e.coordinateForm.num=t.data.data.utmArea,e.coordinateForm.value=t.data.data.hemisphere,e.coordinateForm.coordinateTransformation=t.data.data.coordinateTransformation,e.coordinateTableData=t.data.data.pointData,e.licensePlateform.licensePlateClose=t.data.data.licensePlateRecognitionSwitch,e.stopStateform.displacement=t.data.data.parkingDisplacement,e.stopStateform.speed=t.data.data.parkingSpeed,e.AnalysisSettingId=t.data.data.analysisSettingId,e.coordinateTransformationId=t.data.data.coordinateTransformationId}))},methods:(r={handleDeleteDian:function(e){var t=this;this.$confirm("此操作将删除该点位, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.coordinateTableData=t.coordinateTableData.filter((function(t){return t.pointName!=e.pointName})),t.$message({type:"success",message:"删除成功!"})})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},handleDian:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;console.log(t.addDianForm,"addDianForm,,,"),t.coordinateTableData.unshift(t.addDianForm),t.addDianForm={},t.dialogVisible=!1}))},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handlePos:function(){var e=this,t={CoordinateTransformationId:this.coordinateTransformationId,UTMArea:this.coordinateForm.num,Hemisphere:this.coordinateForm.value,CoordinateTransformation:this.coordinateForm.coordinateTransformation,PointData:this.coordinateTableData};Object(p["i"])(t).then((function(t){e.$message({type:"success",message:"保存成功!"})}))},handleParking:function(){var e=this,t=new URLSearchParams;t.append("AnalysisSettingId",this.AnalysisSettingId),t.append("ParkingDisplacement",this.stopStateform.displacement),t.append("ParkingSpeed",this.stopStateform.speed),Object(p["k"])(t).then((function(t){e.$message({type:"success",message:"保存成功!"})}))},changeChepai:function(e){var t=this;console.log(e,"val111");var n=new URLSearchParams;n.append("AnalysisSettingId",this.AnalysisSettingId),n.append("LicensePlateRecognitionSwitch",e),Object(p["j"])(n).then((function(e){t.$message({type:"success",message:"保存成功!"})}))},handSaveitude:function(){var e=this,t=new URLSearchParams;t.append("AnalysisSettingId",this.AnalysisSettingId),t.append("CameraPositionLongitude",this.sizeForm.longitude),t.append("CameraPositionLatitude",this.sizeForm.latitude),Object(p["h"])(t).then((function(t){e.$message({type:"success",message:"保存成功!"})}))},handleContent:function(e){"postion"==e&&(this.contentShow.postion=!this.contentShow.postion),"coordinate"==e&&(this.contentShow.coordinate=!this.contentShow.coordinate),"plate"==e&&(this.contentShow.plate=!this.contentShow.plate),"parking"==e&&(this.contentShow.parking=!this.contentShow.parking)},handleChange:function(e){console.log(e)},load:function(){var e=this;console.log("1111");var t=document.getElementById("mapModuleTop");console.log("iframe",t),t.onload=function(){e.testMqtt()}},testMqtt:function(){console.log("222"),this.getDataByMqtt()}},Object(c["a"])(r,"handleChange",(function(){})),Object(c["a"])(r,"handleagain",(function(){var e=this;this.$confirm("此操作将重新启动系统, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){})).catch((function(){e.$message({type:"info",message:"已取消"})}))})),Object(c["a"])(r,"handleReset",(function(){var e=this;this.$confirm("此操作将重置默认值, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){})).catch((function(){e.$message({type:"info",message:"已取消重置"})}))})),Object(c["a"])(r,"handleRemove",(function(e,t){console.log(e,t)})),Object(c["a"])(r,"handlePreview",(function(e){console.log(e)})),Object(c["a"])(r,"handleExceed",(function(e,t){this.$message.warning("当前限制选择 3 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))})),Object(c["a"])(r,"beforeRemove",(function(e,t){return this.$confirm("确定移除 ".concat(e.name,""))})),Object(c["a"])(r,"getReverseShellList",(function(){this.tableData.unshift({name:"",inIp:"",inPort:null,outPort:null,enabled:null,isEdit:!0})})),Object(c["a"])(r,"handleAdd",(function(e){for(var t in e)if(""===e[t]||null===e[t]||"undefined"===typeof e[t])return void this.msgError("Please complete the information");e.name,e.inIp;this.getReverseShellList()})),Object(c["a"])(r,"handleUpdate",(function(e){if(e.isEdit){for(var t in e)if(""===e[t]||null===e[t]||"undefined"===typeof e[t])return void this.msgError("Please complete the information");e.name,e.inIp,parseInt(e.inPort),parseInt(e.outPort),e.enabled}else e.isEdit=!0})),Object(c["a"])(r,"handleDelete",(function(e){e.isEdit?this.getReverseShellList():this.$confirm("Are you sure to delete reverse shell?","warning",{confirmButtonText:"Sure",cancelButtonText:"Cancel",type:"warning"}).then((function(){})).catch((function(){}))})),Object(c["a"])(r,"getDataByMqtt",(function(e,t,n){var r=this,i="test_id_"+String((new Date).getTime()),o="ws://172.16.1.168:10087/",s={keepalive:60,username:"admin",password:"123456",clientId:i,protocolId:"MQTT",protocolVersion:4,clean:!0,reconnectPeriod:2e3,connectTimeout:3e4,will:{topic:"img1",payload:"[MQTT-TEST] 遗嘱消息:连接异常断开!",qos:0,retain:!1}};void 0==this.mqttClient&&(this.mqttClient=h.a.connect(o,s),this.mqttClient.on("error",(function(e){console.log("[MQTT-TEST] 连接错误:",e),r.mqttClient.end()})),this.mqttClient.on("reconnect",(function(e){})),this.mqttClient.on("connect",(function(e){r.mqttClient.subscribe("img0",{qos:0}),r.mqttClient.subscribe("img1",{qos:0}),r.mqttClient.subscribe("img2",{qos:0}),r.mqttClient.subscribe("img3",{qos:0}),r.mqttClient.subscribe("img4",{qos:0}),r.mqttClient.subscribe("img5",{qos:0}),r.mqttClient.subscribe("stream0",{qos:0}),r.mqttClient.subscribe("stream1",{qos:0}),r.mqttClient.subscribe("stream2",{qos:0}),r.mqttClient.subscribe("stream3",{qos:0}),r.mqttClient.subscribe("stream4",{qos:0}),r.mqttClient.subscribe("stream5",{qos:0})})),this.mqttClient.on("message",(function(e,t,n){if(-1!=e.indexOf("img0")){var i=new TextDecoder,o=new Uint8Array(t),s=i.decode(o);JSON.parse(s)}else if(-1!=e.indexOf("img1"))try{var a=new TextDecoder,l=new Uint8Array(t),c=a.decode(l),u=JSON.parse(c);console.log("msg",u),r.imgUrl1="data:image/png;base64,"+u.pic,console.log("imageUrl",imageUrl)}catch(V){var h="arraybuffer",p=new Blob([t],{type:h}),f=(window.URL||window.webkitURL).createObjectURL(p);console.log("imageUrl",f)}else if(-1!=e.indexOf("img2"))try{var d=new TextDecoder,g=new Uint8Array(t),m=d.decode(g),y=JSON.parse(m);console.log("msg",y),r.imgUrl2="data:image/png;base64,"+y.pic,console.log("imageUrl",imageUrl)}catch(z){var b="arraybuffer",v=new Blob([t],{type:b}),w=(window.URL||window.webkitURL).createObjectURL(v);console.log("imageUrl",w)}else if(-1!=e.indexOf("img3"))try{var _=new TextDecoder,S=new Uint8Array(t),C=_.decode(S),E=JSON.parse(C);console.log("msg",E),r.imgUrl3="data:image/png;base64,"+E.pic,console.log("imageUrl",imageUrl)}catch(W){var k="arraybuffer",T=new Blob([t],{type:k}),x=(window.URL||window.webkitURL).createObjectURL(T);console.log("imageUrl",x)}else if(-1!=e.indexOf("img4"))try{var A=new TextDecoder,I=new Uint8Array(t),R=A.decode(I),O=JSON.parse(R);console.log("msg",O),r.imgUrl4="data:image/png;base64,"+O.pic,console.log("imageUrl",imageUrl)}catch($){var P="arraybuffer",F=new Blob([t],{type:P}),B=(window.URL||window.webkitURL).createObjectURL(F);console.log("imageUrl",B)}else if(-1!=e.indexOf("img5"))try{var M=new TextDecoder,L=new Uint8Array(t),N=M.decode(L),j=JSON.parse(N);console.log("msg",j),r.imgUrl5="data:image/png;base64,"+j.pic,console.log("imageUrl",imageUrl)}catch(H){var D="arraybuffer",U=new Blob([t],{type:D}),q=(window.URL||window.webkitURL).createObjectURL(U);console.log("imageUrl",q)}else-1!=e.indexOf("stream0")||-1!=e.indexOf("stream0")||(-1!=e.indexOf("stream1")||-1!=e.indexOf("stream2")||-1!=e.indexOf("stream3")||-1!=e.indexOf("stream4")||-1!=e.indexOf("stream5"))&&console.log('[MQTT-TEST] 从主题 "'.concat(e,'" 收到的内容: ').concat(t.toString()),new Date,(new Date).getMilliseconds())})))})),r)},d=f,g=(n("b84c"),n("2877")),m=Object(g["a"])(d,a,l,!1,null,"1028d528",null),y=m.exports,b=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"box",staticClass:"box",staticStyle:{height:"100vh"}},["second"==e.activeName?n("div",{staticClass:"dataBoard"},[n("div",{staticClass:"plate1"},[n("div",{ref:"section",staticClass:"section"},[n("div",{ref:"sectionContent"},[n("div",[n("p",{staticClass:"board-title"},[n("span",[e._v(e._s(e.title1))])]),n("span",{staticClass:"downPull",class:1==e.count2?"upActive":"active",on:{click:function(t){return e.sectionHandle()}}})]),n("typeChart",{attrs:{pageType:"断面",triggerType:"触发"}}),n("speedChart",{attrs:{pageType:"断面",triggerType:"触发"}}),n("flowChart",{attrs:{pageType:"断面",triggerType:"触发"}}),n("congestionChart",{attrs:{pageType:"断面",triggerType:"触发"}}),n("lineUpChart",{attrs:{pageType:"断面",triggerType:"周期统计"}}),n("delayChart",{attrs:{pageType:"断面",triggerType:"周期统计"}}),n("checkChart",{attrs:{pageType:"断面",triggerType:"周期统计"}})],1)])]),n("div",{staticClass:"plate2"},[n("div",{ref:"region",staticClass:"region"},[n("div",{ref:"regionContent"},[n("div",[n("p",{staticClass:"board-title"},[n("span",[e._v(e._s(e.title2))])]),n("span",{staticClass:"downPull",class:1==e.count1?"upActive":"active",on:{click:function(t){return e.regionHandle()}}})]),n("OD",{attrs:{pageType:"区域",triggerType:"触发"}}),n("speedChart",{attrs:{pageType:"区域",triggerType:"触发"}}),n("flowChart",{attrs:{pageType:"区域",triggerType:"周期统计"}}),n("lineUpChart",{attrs:{pageType:"区域",triggerType:"触发"}}),n("checkChart",{attrs:{pageType:"区域",triggerType:"周期时刻"}}),n("delayChart",{attrs:{pageType:"区域",triggerType:"周期统计"}}),n("congestionChart",{attrs:{pageType:"区域",triggerType:"周期统计"}}),n("headWayChart",{attrs:{pageType:"区域",triggerType:"周期统计"}})],1)])])]):e._e()])},v=[],w=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("avgChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("avgChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("avgChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1)])},_=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 延误组件")])}],S=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"down"},[n("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[n("span",{staticClass:"moreIcon"}),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{attrs:{command:"show"}},[e._v("查看详情")])],1)],1)],1),n("el-dialog",{attrs:{title:"编辑",visible:e.dialogVisible,width:"40%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("el-form",{attrs:{"label-width":"80px"}},[n("el-form-item",{attrs:{label:"val1"}},[n("el-time-select",{attrs:{placeholder:"起始时间","picker-options":{start:"08:30",step:"00:15",end:"18:30"}},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),n("el-time-select",{attrs:{placeholder:"结束时间","picker-options":{start:"08:30",step:"00:15",end:"18:30",minTime:e.startTime}},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}})],1),n("el-form-item",{attrs:{label:"val2"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.options,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:"val3"}},[n("el-input")],1),n("el-form-item",{attrs:{label:"val4"}},[n("el-checkbox-group",{model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},[n("el-checkbox",{attrs:{label:"数值"}}),n("el-checkbox",{attrs:{label:"表格"}}),n("el-checkbox",{attrs:{label:"时间曲线图"}}),n("el-checkbox",{attrs:{label:"均值图"}})],1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确认")]),n("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")])],1)],1)],1)],1)},C=[],E={name:"detailDialog",props:{},data:function(){return{dialogVisible:!1,startTime:"",endTime:"",checkList:["复选框 A"],options:[{value:"选项1",label:"黄金糕"},{value:"选项2",label:"双皮奶"},{value:"选项3",label:"蚵仔煎"},{value:"选项4",label:"龙须面"},{value:"选项5",label:"北京烤鸭"}],value:""}},methods:{onSubmit:function(){},handleCommand:function(e){"show"==e&&(this.dialogVisible=!0)},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))}},mounted:function(){}},k=E,T=(n("810a"),Object(g["a"])(k,S,C,!1,null,"08a214e9",null)),x=T.exports,A=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"lineChart",staticStyle:{width:"100%",height:"300px"},attrs:{id:"lineChart"}})},I=[],R={name:"lineChart",props:{list:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{drawLine:function(){var e=this.$echarts.init(this.$refs.lineChart),t={grid:{left:"2%",right:"4%",bottom:"10%",top:"20%",containLabel:!0},tooltip:{show:!0},xAxis:[{type:"category",axisLine:{show:!0,lineStyle:{color:"#eeebeb",type:"dashed"}},axisTick:{show:!1},axisLabel:{color:"#6c6c6c"},splitLine:{show:!1},boundaryGap:["5%","5%"],data:this.list.map((function(e){return e.type}))}],yAxis:[{type:"value",axisLabel:{color:"#6c6c6c"},splitLine:{lineStyle:{color:"#eeebeb",type:"dashed"}},axisLine:{show:!1}}],series:[{name:"速度",type:"line",stack:"总量",symbolSize:6,smooth:!0,itemStyle:{color:"#fb864b",borderColor:"#fb864b",borderWidth:2},data:this.list.map((function(e){return e.speed}))}]};e.setOption(t),window.addEventListener("resize",(function(){e.resize()}))}},mounted:function(){this.drawLine()}},O=R,P=Object(g["a"])(O,A,I,!1,null,"bf331baa",null),F=P.exports,B=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"barChart",staticStyle:{width:"100%",height:"300px"},attrs:{id:"barChart"}})},M=[],L={name:"barChart",props:{list:Array,default:function(){return[]}},data:function(){return{}},methods:{drawBar:function(){var e=this.$echarts.init(this.$refs.barChart),t={color:["#7262FD","#FC5A5A"],tooltip:{confine:!0},grid:{left:"2%",right:"4%",bottom:"10%",top:"20%",containLabel:!0},xAxis:{type:"category",data:this.list.map((function(e){return e.type})),axisLine:{lineStyle:{color:"#000"}},axisLabel:{fontSize:12,color:"#000"},axisTick:{show:!1}},yAxis:[{type:"value",min:0,minInterval:1,splitArea:{show:!1},axisLine:{show:!0},axisTick:{show:!1},splitLine:{lineStyle:{color:"#eeebeb",type:"dashed"}},axisLabel:{fontSize:12,color:"#000",fontFamily:"Bebas"}}],series:[{type:"bar",barWidth:20,itemStyle:{barBorderRadius:[5,5,0,0]},name:"时间",data:this.list.map((function(e){return e.speed}))}]};e.setOption(t),window.addEventListener("resize",(function(){e.resize()}))}},mounted:function(){this.drawBar()}},N=L,j=Object(g["a"])(N,B,M,!1,null,null,null),D=j.exports,U=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tableContent"},[n("div",{staticClass:"down"},[n("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[n("span",{staticClass:"moreIcon"}),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{attrs:{command:"show"}},[e._v("查看详情")])],1)],1)],1),"触发"==e.type?n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.msg}},[n("el-table-column",{attrs:{align:"center",prop:"steam_id",label:"视频路"}}),n("el-table-column",{attrs:{align:"center",prop:"timestamp",label:"时间戳"}}),n("el-table-column",{attrs:{align:"center",prop:"obj_id",label:"目标编号"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"目标类型"}}),n("el-table-column",{attrs:{align:"center",prop:"plate",label:"车牌"}}),n("el-table-column",{attrs:{align:"center",prop:"speed",label:"速度"}}),n("el-table-column",{attrs:{align:"center",prop:"event",label:"监测触发事件"}}),n("el-table-column",{attrs:{align:"center",prop:"lane",label:"车道"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"车头时距"}})],1):e._e(),"周期统计"==e.type?n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.msg}},[n("el-table-column",{attrs:{align:"center",prop:"time",label:"断面编号"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"断面名称"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"时间戳"}}),n("el-table-column",{attrs:{align:"center",prop:"event",label:"时间序号"}}),n("el-table-column",{attrs:{align:"center",prop:"lane",label:"目标类型"}}),n("el-table-column",{attrs:{align:"center",prop:"speed",label:"入流流量"}}),n("el-table-column",{attrs:{align:"center",prop:"avgFlow",label:"出流流量"}}),n("el-table-column",{attrs:{align:"center",prop:"time",label:"断面流量"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"入流平均速度"}}),n("el-table-column",{attrs:{align:"center",prop:"event",label:"出流平均速度"}})],1):e._e(),n("el-dialog",{attrs:{title:"编辑",visible:e.dialogVisible,width:"40%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("el-form",{attrs:{model:e.msg,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"val1"}},[n("el-time-select",{attrs:{placeholder:"起始时间","picker-options":{start:"08:30",step:"00:15",end:"18:30"}},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),n("el-time-select",{attrs:{placeholder:"结束时间","picker-options":{start:"08:30",step:"00:15",end:"18:30",minTime:e.startTime}},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}})],1),n("el-form-item",{attrs:{label:"val2"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.options,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:"val3"}},[n("el-input",{model:{value:e.msg[0].val3,callback:function(t){e.$set(e.msg[0],"val3",t)},expression:"msg[0].val3"}})],1),n("el-form-item",{attrs:{label:"val4"}},[n("el-checkbox-group",{model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},[n("el-checkbox",{attrs:{label:"数值"}}),n("el-checkbox",{attrs:{label:"表格"}}),n("el-checkbox",{attrs:{label:"时间曲线图"}}),n("el-checkbox",{attrs:{label:"均值图"}})],1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"}},[e._v("确认")]),n("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")])],1)],1)],1)],1)},q=[],V={name:"tableShow",props:{msg:{type:Array,default:function(){return[]}},type:{type:String}},data:function(){return{dialogVisible:!1,startTime:"",endTime:"",checkList:["复选框 A"],options:[{value:"选项1",label:"黄金糕"},{value:"选项2",label:"双皮奶"},{value:"选项3",label:"蚵仔煎"},{value:"选项4",label:"龙须面"},{value:"选项5",label:"北京烤鸭"}],value:""}},methods:{handleCommand:function(e){"show"==e&&(this.dialogVisible=!0)},onSubmit:function(){},handleClose:function(){}},mounted:function(){}},z=V,W=(n("3ed2"),Object(g["a"])(z,U,q,!1,null,"322f88cc",null)),$=W.exports,H=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"thermalChart",staticStyle:{width:"100%",height:"300px"},attrs:{id:"thermalChart"}})},K=[],Q={name:"thermalChart",data:function(){return{tableData:[{name:"111",val1:"100",val2:"200",val3:"300",val4:"400"}]}},methods:{drawThermalChart:function(){var e=this.$echarts.init(this.$refs.thermalChart),t=([[0,0,5],[0,1,1],[0,2,0],[0,3,0],[0,4,0],[0,5,0],[0,6,0],[0,7,0],[0,8,0],[0,9,0],[0,10,0],[0,11,2],[0,12,4],[0,13,1],[0,14,1],[0,15,3],[0,16,4],[0,17,6],[0,18,4],[0,19,4],[0,20,3],[0,21,3],[0,22,2],[0,23,5],[1,0,7],[1,1,0],[1,2,0],[1,3,0],[1,4,0],[1,5,0],[1,6,0],[1,7,0],[1,8,0],[1,9,0],[1,10,5],[1,11,2],[1,12,2],[1,13,6],[1,14,9],[1,15,11],[1,16,6],[1,17,7],[1,18,8],[1,19,12],[1,20,5],[1,21,5],[1,22,7],[1,23,2],[2,0,1],[2,1,1],[2,2,0],[2,3,0],[2,4,0],[2,5,0],[2,6,0],[2,7,0],[2,8,0],[2,9,0],[2,10,3],[2,11,2],[2,12,1],[2,13,9],[2,14,8],[2,15,10],[2,16,6],[2,17,5],[2,18,5],[2,19,5],[2,20,7],[2,21,4],[2,22,2],[2,23,4],[3,0,7],[3,1,3],[3,2,0],[3,3,0],[3,4,0],[3,5,0],[3,6,0],[3,7,0],[3,8,1],[3,9,0],[3,10,5],[3,11,4],[3,12,7],[3,13,14],[3,14,13],[3,15,12],[3,16,9],[3,17,5],[3,18,5],[3,19,10],[3,20,6],[3,21,4],[3,22,4],[3,23,1],[4,0,1],[4,1,3],[4,2,0],[4,3,0],[4,4,0],[4,5,1],[4,6,0],[4,7,0],[4,8,0],[4,9,2],[4,10,4],[4,11,4],[4,12,2],[4,13,4],[4,14,4],[4,15,14],[4,16,12],[4,17,1],[4,18,8],[4,19,5],[4,20,3],[4,21,7],[4,22,3],[4,23,0],[5,0,2],[5,1,1],[5,2,0],[5,3,3],[5,4,0],[5,5,0],[5,6,0],[5,7,0],[5,8,2],[5,9,0],[5,10,4],[5,11,1],[5,12,5],[5,13,10],[5,14,5],[5,15,7],[5,16,11],[5,17,6],[5,18,0],[5,19,5],[5,20,3],[5,21,4],[5,22,2],[5,23,0],[6,0,1],[6,1,0],[6,2,0],[6,3,0],[6,4,0],[6,5,0],[6,6,0],[6,7,0],[6,8,0],[6,9,0],[6,10,1],[6,11,0],[6,12,2],[6,13,1],[6,14,3],[6,15,4],[6,16,0],[6,17,0],[6,18,0],[6,19,0],[6,20,1],[6,21,2],[6,22,2],[6,23,6]].map((function(e){return[e[1],e[0],e[2]||"-"]})),{textStyle:{color:"#666",fontSize:13},toolbox:{show:!0,feature:{saveAsImage:{backgroundColor:"rgba(0,0,0,0)"},restore:{}},iconStyle:{borderColor:"#666"}},tooltip:{},grid:{containLabel:!0},xAxis:{nameTextStyle:{color:"#666",padding:[0,0,-10,0],fontSize:13},axisLabel:{interval:0,textStyle:{fontSize:13}},axisTick:{lineStyle:{color:"#c8c8c8",width:1},show:!0},splitLine:{show:!1},axisLine:{lineStyle:{color:"#c8c8c8",width:1},show:!0},type:"category",data:["2015年","2016年","2017年","2018年","2019年"],splitArea:{show:!0,areaStyle:{color:["rgba(200,200,200,0.3)","rgba(200,200,200,0.2)"]}}},yAxis:{nameTextStyle:{color:"#666",padding:[0,0,-10,0],fontSize:13},axisLabel:{interval:0,textStyle:{fontSize:13}},axisTick:{lineStyle:{color:"#c8c8c8",width:1},show:!0},splitLine:{show:!1},axisLine:{lineStyle:{color:"#c8c8c8",width:1},show:!0},type:"category",data:["GATE1","GATE2","GATE3","GATE4","GATE5","GATE6","GATE7"]},visualMap:[{min:100,max:400,calculable:!1,orient:"horizontal",left:"center",top:20,color:["#C7021D","#79E73C"],text:["高 ","低"],textStyle:{color:"#666",fontSize:13}}],series:[{type:"heatmap",data:[[0,0,100],[0,1,100],[0,2,100],[0,3,100],[0,4,100],[0,5,100],[0,6,200],[1,0,120],[1,1,120],[1,2,125],[1,3,120],[1,4,120],[1,5,120],[1,6,120],[2,0,120],[2,1,140],[2,2,140],[2,3,140],[2,4,140],[2,5,140],[2,6,140],[3,0,200],[3,1,200],[3,2,200],[3,3,200],[3,4,200],[3,5,200],[3,6,200],[4,0,300],[4,1,300],[4,2,300],[4,3,300],[4,4,300],[4,5,300],[4,6,300]],label:{normal:{show:!0,color:"#fff"}},itemStyle:{normal:{borderColor:"rgba(255, 255, 255, 0.5)"},emphasis:{shadowBlur:0,shadowColor:"rgba(255, 255, 255, 0.5)"}}}]});e.setOption(t),window.onresize=function(){e.resize()}}},mounted:function(){this.drawThermalChart()}},Y=Q,G=Object(g["a"])(Y,H,K,!1,null,"cabee130",null),J=G.exports,Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tableContent"},[n("div",{staticClass:"down"},[n("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[n("span",{staticClass:"moreIcon"}),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",{attrs:{command:"show"}},[e._v("查看详情")])],1)],1)],1),"触发"==e.type?n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.msg}},[n("el-table-column",{attrs:{align:"center",prop:"type",label:"视频路"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"时间戳"}}),n("el-table-column",{attrs:{align:"center",prop:"carNumber",label:"目标编号"}}),n("el-table-column",{attrs:{align:"center",prop:"lane",label:"目标类型"}}),n("el-table-column",{attrs:{align:"center",prop:"event",label:"车牌"}}),n("el-table-column",{attrs:{align:"center",prop:"speed",label:"速度"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"监测触发事件"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"车道"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"车头时距"}})],1):e._e(),"周期时刻"==e.type?n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.msg}},[n("el-table-column",{attrs:{align:"center",prop:"type",label:"区域编号"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"区域名称"}}),n("el-table-column",{attrs:{align:"center",prop:"carNumber",label:"时间戳"}}),n("el-table-column",{attrs:{align:"center",prop:"lane",label:"视频帧"}}),n("el-table-column",{attrs:{align:"center",prop:"event",label:"目标类型"}}),n("el-table-column",{attrs:{align:"center",prop:"speed",label:"存车数"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"排队数"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"占用状态"}}),n("el-table-column",{attrs:{align:"center",prop:"headWay",label:"空间平均速度"}})],1):e._e(),"周期统计"==e.type?n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.msg}},[n("el-table-column",{attrs:{align:"center",prop:"time",label:"区域编号"}}),n("el-table-column",{attrs:{align:"center",prop:"type",label:"区域名称"}}),n("el-table-column",{attrs:{align:"center",prop:"event",label:"时间戳"}}),n("el-table-column",{attrs:{align:"center",prop:"lane",label:"驶入流量"}}),n("el-table-column",{attrs:{align:"center",prop:"speed",label:"驶离流量"}}),n("el-table-column",{attrs:{align:"center",prop:"avgFlow",label:"平均存车数"}}),n("el-table-column",{attrs:{align:"center",prop:"avgFlow",label:"平均排队数"}}),n("el-table-column",{attrs:{align:"center",prop:"avgFlow",label:"平均占有率"}}),n("el-table-column",{attrs:{align:"center",prop:"avgFlow",label:"平均延误"}}),n("el-table-column",{attrs:{align:"center",prop:"avgFlow",label:"平均速度"}})],1):e._e(),n("el-dialog",{attrs:{title:"编辑",visible:e.dialogVisible,width:"40%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[n("el-form",{attrs:{model:e.msg,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"val1"}},[n("el-time-select",{attrs:{placeholder:"起始时间","picker-options":{start:"08:30",step:"00:15",end:"18:30"}},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),n("el-time-select",{attrs:{placeholder:"结束时间","picker-options":{start:"08:30",step:"00:15",end:"18:30",minTime:e.startTime}},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}})],1),n("el-form-item",{attrs:{label:"val2"}},[n("el-select",[n("el-option")],1)],1),n("el-form-item",{attrs:{label:"val3"}},[n("el-input",{model:{value:e.msg[0].val3,callback:function(t){e.$set(e.msg[0],"val3",t)},expression:"msg[0].val3"}})],1),n("el-form-item",{attrs:{label:"val4"}},[n("el-checkbox-group",{model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},[n("el-checkbox",{attrs:{label:"数值"}}),n("el-checkbox",{attrs:{label:"表格"}}),n("el-checkbox",{attrs:{label:"时间曲线图"}}),n("el-checkbox",{attrs:{label:"均值图"}})],1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"}},[e._v("确认")]),n("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")])],1)],1)],1)],1)},X=[],ee={name:"tableShow",props:{msg:{type:Array,default:function(){return[]}},type:{type:String}},data:function(){return{dialogVisible:!1,startTime:"",endTime:"",checkList:["复选框 A"]}},methods:{handleCommand:function(e){"show"==e&&(this.dialogVisible=!0)}},mounted:function(){}},te=ee,ne=(n("792c"),Object(g["a"])(te,Z,X,!1,null,"46335629",null)),re=ne.exports,ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"barChart",staticStyle:{width:"100%",height:"300px"},attrs:{id:"barChart"}})},oe=[],se={name:"barChart",props:{list:Array,default:function(){return[]}},data:function(){return{}},methods:{drawBar:function(){for(var e=this.$echarts.init(this.$refs.barChart),t=["path://M66.1,35.7L100,49.8v128.7l-33.9-12.7L66.1,35.7z","path://M133.9,35.7L100,49.8v128.7l33.9-12.7V35.7z","path://M66.1,35.7L100,21.5l33.9,14.1L100,49.8L66.1,35.7z"],n=[{label:"最大值",value:500},{label:"平均值",value:400},{label:"最小值",value:200},{label:"中间值",value:200}],r=1e3,i=n.map((function(e){return e.label})),o=["#5f55ed59","#f8954359","#47d69d59","#F9F1EA"],s=["#5f55ed","#f89543","#47d69d","#C1AE9E"],a=["#5571f659","#f1d57759","#3fdfc159","#F3DFCD"],l=["#5f55ed","#fd7d3d","#25cd75","#C1AE9E"],c=["#437ffa","#fee266","#35c9c7","#F3DFCD"],u=["#5571f6","#f1d577","#3fdfc1","#F3DFCD"],h=["#7148ea","#fd7d3d","#25cd75","#BFA188"],p=[],f=[],d=[],g=[],m=[],y=0;y<n.length;y++)p.push({name:n[y].label,value:r,itemStyle:{color:o[y],borderColor:s[y]}}),f.push({name:n[y].label,value:r,symbolPosition:"end",itemStyle:{color:a[y],borderColor:l[y]}}),d.push({name:n[y].label,value:r,itemStyle:{color:c[y]}}),g.push({name:n[y].label,value:n[y].value,symbolPosition:"end",itemStyle:{color:u[y]}}),m.push({name:n[y].label,value:n[y].value,label:{show:!0,position:"bottom",distance:60,color:h[y],fontSize:40},itemStyle:{color:new this.$echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:h[y]},{offset:1,color:c[y]}])}});var b={xAxis:[{data:i,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,margin:30,fontSize:20,color:"#707FB3"}}],yAxis:{splitLine:{show:!1},axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!1}},grid:{show:!1,height:200,bottom:"19%"},series:[{name:"左边",type:"pictorialBar",symbolSize:["50%","100%"],symbolOffset:[-70,20],barWidth:100,silent:!0,z:12,symbol:t[0],data:p},{name:"右边",type:"pictorialBar",symbolSize:["50%","100%"],symbolOffset:[-20,20],barWidth:100,silent:!0,z:12,symbol:t[1],data:p},{name:"",type:"pictorialBar",symbolSize:[100,40],symbolOffset:[0,0],silent:!0,symbol:t[2],data:f},{name:"",type:"pictorialBar",symbolSize:[101,38],symbolOffset:[0,20],silent:!0,z:12,symbol:t[2],data:d},{name:"",type:"pictorialBar",symbolSize:[99,45],symbolOffset:[0,-23],z:16,silent:!0,symbol:t[2],data:g,animationDuration:1e3,animationDelay:function(e){return 500*e}},{type:"bar",silent:!0,barWidth:100,barGap:"-100%",z:13,data:m,animationDuration:1e3,animationDelay:function(e){return 500*e}}]};e.setOption(b),window.addEventListener("resize",(function(){e.resize()}))}},mounted:function(){this.drawBar()}},ae=se,le=Object(g["a"])(ae,ie,oe,!1,null,null,null),ce=le.exports,ue={name:"delayChart",props:["pageType","triggerType"],components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re,avgChart:ce},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){},watch:{}},he=ue,pe=(n("1cfe"),Object(g["a"])(he,w,_,!1,null,"6bcef1af",null)),fe=pe.exports,de=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog"),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog"),"触发"==e.triggerType?n("avgChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("avgChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("avgChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1)])},ge=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 速度组件")])}],me={name:"speedChart",props:["pageType","triggerType"],components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,regionTable:re,thermalChart:J,avgChart:ce},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},ye=me,be=(n("1da5"),Object(g["a"])(ye,de,ge,!1,null,"226341ef",null)),ve=be.exports,we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1)])},_e=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 流量组件")])}],Se={name:"flowChart",props:["pageType","triggerType"],components:{lineChart:F,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},Ce=Se,Ee=(n("1515"),Object(g["a"])(Ce,we,_e,!1,null,"d1733660",null)),ke=Ee.exports,Te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("avgChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("avgChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("avgChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1)])},xe=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 车头时距组件")])}],Ae={name:"headWayChart",props:["pageType","triggerType"],components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re,avgChart:ce},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},Ie=Ae,Re=(n("361d"),Object(g["a"])(Ie,Te,xe,!1,null,"2f31a060",null)),Oe=Re.exports,Pe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("avgChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("avgChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("avgChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1)])},Fe=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 检测数组件")])}],Be={name:"checkChart",props:["pageType","triggerType"],components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re,avgChart:ce},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},Me=Be,Le=(n("911e"),Object(g["a"])(Me,Pe,Fe,!1,null,"c79cc8b8",null)),Ne=Le.exports,je=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("avgChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("avgChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("avgChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1)])},De=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 排队数组件")])}],Ue={name:"lineUpChart",components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re,avgChart:ce},props:["pageType","triggerType"],data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},qe=Ue,Ve=(n("d01d"),Object(g["a"])(qe,je,De,!1,null,"790d788b",null)),ze=Ve.exports,We=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)],1),n("div")])},$e=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 拥堵组件")])}],He={name:"congestionChart",props:["pageType","triggerType"],components:{lineChart:F,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){},watch:{}},Ke=He,Qe=(n("6447"),Object(g["a"])(Ke,We,$e,!1,null,"393b1b01",null)),Ye=Qe.exports,Ge=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"typeContent"},[n("el-card",{staticStyle:{width:"150px","margin-bottom":"20px","text-align":"center"}},[n("div",{staticStyle:{"font-size":"30px","font-weight":"bold"}},[e._v("99")]),n("div",{staticStyle:{padding:"14px"}},[n("span",[e._v("数值")]),n("div",{staticClass:"bottom clearfix"},[n("time",{staticClass:"time"},[e._v("17:49")]),n("el-button",{staticClass:"button",attrs:{type:"text"}},[e._v("操作按钮")])],1)])]),"断面"==e.pageType?n("div",{staticStyle:{"margin-bottom":"20px",border:"1px solid #E4E7ED"}},["触发"==e.triggerType?n("tableShow",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("tableShow",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),"区域"==e.pageType?n("div",["触发"==e.triggerType?n("regionTable",{attrs:{msg:e.tableData,type:e.triggerType}}):e._e(),"周期时刻"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicTime,type:e.triggerType}}):e._e(),"周期统计"==e.triggerType?n("regionTable",{attrs:{msg:e.periodicStatistic,type:e.triggerType}}):e._e()],1):e._e(),n("div",{staticClass:"border"},[n("detailDialog"),"触发"==e.triggerType?n("lineChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("lineChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("lineChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog"),"触发"==e.triggerType?n("barChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("barChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("barChart",{attrs:{list:e.periodicStatistic}}):e._e()],1),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),n("pieChart")],1)],1)])},Je=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" 类型组件")])}],Ze=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"pieChart",staticStyle:{width:"100%",height:"300px"},attrs:{id:"pieChart"}})},Xe=[],et={name:"pieChart",props:{list:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{drawPie:function(){var e,t=this.$echarts.init(this.$refs.pieChart),n=["#0CD2E6","#3751E6","#FFC722"],r=["货车","汽车","卡车"],i=[{name:"货车",value:30},{name:"汽车",value:10},{name:"卡车",value:15}],o={color:n,legend:{top:20,right:"center",textStyle:{},data:r},series:[(e={name:"需求类型占比",type:"pie",center:["50%","55%"],radius:"80%",label:{normal:{show:!1}},labelLine:{show:!1,length:0,length2:0}},Object(c["a"])(e,"label",{normal:{show:!0,position:"inside",formatter:"{value|{c}}",rich:{value:{fontSize:20,color:"#ffffff"}}}}),Object(c["a"])(e,"data",i),e)]};t.setOption(o),window.addEventListener("resize",(function(){t.resize()}))}},mounted:function(){this.drawPie()}},tt=et,nt=Object(g["a"])(tt,Ze,Xe,!1,null,"7838cfb6",null),rt=nt.exports,it={name:"typeChart",props:["pageType","triggerType"],components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,regionTable:re,pieChart:rt},data:function(){return{tableData:[{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:35.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:70.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5},{steam_id:0,timestamp:"2022-10-01 09:15:10.156",obj_id:125,type:"car",plate:"苏A0131M",speed:60.2,event:"in",lane:0,headWay:6.5}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},ot=it,st=(n("386f"),Object(g["a"])(ot,Ge,Je,!1,null,"8d18f94e",null)),at=st.exports,lt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setion"},[e._m(0),n("div",{staticClass:"border"},[n("detailDialog",{attrs:{msg:e.tableData}}),"触发"==e.triggerType?n("thermalChart",{attrs:{list:e.tableData}}):e._e(),"周期时刻"==e.triggerType?n("thermalChart",{attrs:{list:e.periodicTime}}):e._e(),"周期统计"==e.triggerType?n("thermalChart",{attrs:{list:e.periodicStatistic}}):e._e()],1)])},ct=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"chartTitle"},[n("span",{staticClass:"titleIcon"}),e._v(" OD组件")])}],ut={name:"lineUpChart",components:{lineChart:F,barChart:D,tableShow:$,detailDialog:x,thermalChart:J,regionTable:re},props:["pageType","triggerType"],data:function(){return{tableData:[{time:"7:40",type:"小汽车",carNumber:"苏E.999999",lane:"成华大道",event:"in",speed:"80",headWay:"10"},{time:"9:40",type:"货车",carNumber:"苏E.888888",lane:"成华大道",event:"in",speed:"60",headWay:"10"},{time:"10:40",type:"小汽车",carNumber:"苏E.777777",lane:"成华大道",event:"in",speed:"90",headWay:"10"}],periodicTime:[{time:"17:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"50",CongestionStatus:"拥堵"},{time:"22:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"30",CongestionStatus:"拥堵"},{time:"24:00",type:"货车",lane:"西城车道",lineUp:"200",check:"300",ownStatus:"空",speed:"80",CongestionStatus:"拥堵"}],periodicStatistic:[{time:"9:40",type:"小汽车",event:"out",lane:"西北大道",speed:"60",avgFlow:"200"},{time:"10:40",type:"小汽车",event:"out",lane:"西北大道",speed:"55",avgFlow:"50"},{time:"11:40",type:"小汽车",event:"out",lane:"西北大道",speed:"61",avgFlow:"40"}]}},methods:{},mounted:function(){}},ht=ut,pt=(n("f676"),Object(g["a"])(ht,lt,ct,!1,null,"4f0d5a74",null)),ft=pt.exports,dt={components:{delayChart:fe,speedChart:ve,flowChart:ke,headWayChart:Oe,checkChart:Ne,lineUpChart:ze,congestionChart:Ye,typeChart:at,OD:ft},props:{activeName:{type:String}},data:function(){return{title1:"01断面",title2:"01区域",dialogVisible:!1,count1:!1,count2:!1}},created:function(){},methods:{regionHandle:function(){this.count1=!this.count1,0==this.count1?(this.$refs.region.style.height="47vh",this.$refs.box.style.height="100vh"):1==this.count1&&(this.$refs.region.style.height=this.$refs.regionContent.offsetHeight+30+"px",this.$refs.box.style.height="auto")},sectionHandle:function(){this.count2=!this.count2,0==this.count2?(this.$refs.section.style.height="47vh",this.$refs.box.style.height="100vh"):1==this.count2&&(this.$refs.section.style.height=this.$refs.sectionContent.offsetHeight+30+"px",this.$refs.box.style.height="auto")}},mounted:function(){}},gt=dt,mt=(n("8fc1"),Object(g["a"])(gt,b,v,!1,null,"84b082e0",null)),yt=mt.exports,bt=n("2707"),vt=n("bc3a"),wt=n.n(vt);function _t(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function St(e,t){if(null==e)return{};var n,r,i=_t(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n("c5f6");function Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kt(e,t,n){return t&&Et(e.prototype,t),n&&Et(e,n),e}var Tt,xt,At=n("2b0e"),It=new At["default"],Rt=function(){function e(t){Ct(this,e),this.connect={host:It.mqttHost,port:It.mqttPort,endpoint:"/mqtt",clean:!0,cleanSession:!0,connectTimeout:7e3,reconnectPeriod:7e3,clientId:Number(new Date).toString(),username:"admin",password:"123456"},this.subscription={topic:t,qos:2},this.mqttClient=null}return kt(e,[{key:"createConnect",value:function(){var e=this,t=this.connect,n=(t.host,t.port,t.endpoint,St(t,["host","port","endpoint"])),r="ws://172.16.1.168:10087/";try{this._client=h.a.connect(r,n)}catch(a){console.log("mqtt.connect error",a)}this._client.on("connect",(function(){console.log("Connection succeeded!")})),this._client.on("reconnect",(function(e){console.log("正在重连",e)})),this._client.on("error",(function(e){console.log("Connection failed",e)}));var i=this.subscription,o=i.topic,s=i.qos;return this._client.subscribe(o,{qos:s},(function(t,n){t?console.log("Subscribe to topics error",t):(e.subscribeSuccess=!0,console.log("Subscribe to topics res",n[0].qos,n[0].topic))})),this.mqttClient=this._client,this.mqttClient}}]),e}(),Ot=Rt,Pt={data:function(){return{receiveNews:"",topicSends:["img0","stream0","trajectory0","detection0"],trajectory:!1,hideBoxShow:!0,closeStatus:null,modelOthers:!1,componentShow:"",isShowBtn:!0,isShowBtn1:!1,inputVal:"",dialogFormVisible:!1,areaComponent:!1,indexModule:!1,speed:!1,component:!1,sectionals:[],activeName:"first",VideoId:"",title:"断面",componentTitle:"速度",form:{name:"",type:"",id:"",coordinate:"",Direction:"正向",StoppingSpeed:"5"},startFigureName:"",areaComponentform:{name:"",region:"",date1:"",date2:"",delivery:!1,type:[],resource:"实时(触发)",desc:""},timeSelect:[{label:"秒",value:"秒"},{label:"分钟",value:"分钟"},{label:"小时",value:"小时"},{label:"天",value:"天"}],componentForm:{company:"秒",componentName:"",componentParameterId:"01888e05fac246b29e3a19a27c3d2ab0",cycleInterval:"",startSectionIds:"",startSectionNames:"",endSectionIds:"",endSectionNames:"",endValue:"",presentationForm:"",presentation:[],startValue:"",timeMode:"触发",type:"",startSection:[],endSection:[],componentType:"",typeFiltering:""},typeData:["小汽车","公交车","卡车","非机动车","行人"],presentation:["数值","表格","时间曲线图","均值图"],trackForm:{name:""},nowTime:"",ins:0,imgUrl:"",imgUrl1:"",imgUrl2:"",imgUrl3:"",imgUrl4:"",imgUrl5:"",btnPic:[],Data:[{title:"xx路口",url:""},{title:"数据看板",url:""},{title:"分析配置",url:""},{title:"分析配置",url:""}],messageInfo:[],orderList:[],enterList:[],stockInfo:[],perCent:0,perCent1:0,perCent2:0,facToal:"",wbContent:"",inContent:"",outContent:"",containerDetails:"",locdesc:"",weatherItem:{},loadingShow1:!0,number:"",componentId:""}},mounted:function(){window.getFigure=this.getFigureD,window.getModifyTheName=this.getModifyTheNameN,window.getSingleComponentId=this.getSingleComponentIdN,window.getSimulationAreaEdit=this.getSimulationAreaEdit,window.OnScene=this.OnSceneN,this.getAllSectionalData(this.$route.query.id),this.VideoId=this.$route.query.id,this.number=this.$route.query.num},created:function(){this.componentForm.company=this.timeSelect[0].value,this.createMqtt()},methods:{createMqtt:function(){var e=this;Tt=new Ot(this.topicSends),xt=Tt.createConnect(),xt.subscribe(["img"+this.number,"stream"+this.number,"trajectory"+this.number,"detection"+this.number],{qos:0},(function(t){t?console.log("消息订阅失败!"):(console.log("订阅成功"),xt.publish("msg_stream",JSON.stringify({msg_flag:parseInt(e.number)})))})),xt.on("message",(function(t,n){try{e.realInfo(t,n)}catch(r){}}))},disConnect:function(){null!=xt&&(xt.unsubscribe(this.topicSends),xt=null)},realInfo:function(e,t){switch(e){case"img0":case"img1":case"img2":try{var n=new TextDecoder,r=new Uint8Array(t),i=n.decode(r),o=JSON.parse(i);document.getElementById("mapModule").contentWindow.getDestination(JSON.stringify(o))}catch(w){}break;case"stream0":case"stream1":case"stream2":try{var s=new TextDecoder,a=new Uint8Array(t),l=s.decode(a),c=JSON.parse(l);document.getElementById("mapModule").contentWindow.getData(JSON.stringify(c))}catch(w){}break;case"trajectory0":case"trajectory1":case"trajectory2":case"trajectory3":try{var u=new TextDecoder,h=new Uint8Array(t),p=u.decode(h),f=JSON.parse(p);document.getElementById("mapModule").contentWindow.getGuiJi(JSON.stringify(f))}catch(w){}break;case"detection0":case"detection1":case"detection2":try{var d=new TextDecoder,g=new Uint8Array(t),m=d.decode(g),y=[];if(0!=m.length){for(var b=0;b<m.length;b++)y.push(m[b].det_id);console.log("detId",y);var v=JSON.parse(y);document.getElementById("mapModule").contentWindow.getChuFa(JSON.stringify(v))}}catch(w){}break}this.receiveNews=""},OnSceneN:function(){document.getElementById("mapModule").contentWindow.postVideoId(JSON.stringify(this.$route.query.id))},getSingleComponentIdN:function(e,t,n){var r=this;console.log("id",e),console.log("type",t),console.log("name",n),this.componentId=e,this.componentForm.componentType=t,this.componentTitle=t,Object(p["b"])({AnalogAreaComponentId:e}).then((function(e){if(console.log("res",e),200==e.data.code){if(console.log("res",e.data.data),r.component=!0,""!=e.data.data.company&&(r.componentForm.company=e.data.data.company),""!=e.data.data.timeMode&&(r.componentForm.timeMode=e.data.data.timeMode),r.componentForm.componentName=e.data.data.componentName+"-"+t,r.componentForm.componentParameterId=e.data.data.componentParameterId,r.componentForm.cycleInterval=e.data.data.cycleInterval,r.componentForm.startSectionIds=e.data.data.startSectionIds,r.componentForm.startSectionNames=e.data.data.startSectionNames,r.componentForm.endSectionIds=e.data.data.endSectionIds,r.componentForm.endSectionNames=e.data.data.endSectionNames,r.componentForm.endValue=e.data.data.endValue,r.componentForm.startValue=e.data.data.startValue,r.componentForm.presentationForm=e.data.data.presentationForm,r.componentForm.type=e.data.data.type,""!=e.data.data.startSectionIds){console.log("startSectionIds",e.data.data.startSectionIds);var n=[],i=[];n=e.data.data.startSectionIds.split(","),console.log("this.sectionals",r.sectionals),console.log("startSectionIdArr",n),n.forEach((function(e){r.sectionals.forEach((function(t){e==t.graphicId&&(i.push(t.graphicName),r.componentForm.startSection=i)}))}))}if(""!=e.data.data.endSectionIds){console.log("endSectionIds",e.data.data.endSectionIds);var o=[],s=[];o=e.data.data.endSectionIds.split(","),console.log("this.sectionals",r.sectionals),console.log("endSectionIdArr",o),o.forEach((function(e){r.sectionals.forEach((function(t){e==t.graphicId&&(s.push(t.graphicName),r.componentForm.endSection=s)}))}))}if(""!=e.data.data.presentationForm){var a=[];a=e.data.data.presentationForm.split(","),r.componentForm.presentation=a}}}))},getSimulationAreaEdit:function(e,t,n,r){var i=this;"图形"==t?(this.form.id=e,this.form.name=r,this.form.type=n,this.startFigureName=r,("轨迹"==this.form.type||"区域"==this.form.type||"断面"==this.form.type)&&(this.dialogFormVisible=!0)):"组件"==t&&(this.componentId=e,this.componentForm.componentType=n,this.componentTitle=n,Object(p["b"])({AnalogAreaComponentId:e}).then((function(e){if(console.log("res",e),200==e.data.code){if(console.log("res",e.data.data),i.component=!0,""!=e.data.data.company&&(i.componentForm.company=e.data.data.company),""!=e.data.data.timeMode&&(i.componentForm.timeMode=e.data.data.timeMode),i.componentForm.componentName=e.data.data.componentName+"-"+t,i.componentForm.componentParameterId=e.data.data.componentParameterId,i.componentForm.cycleInterval=e.data.data.cycleInterval,i.componentForm.startSectionIds=e.data.data.startSectionIds,i.componentForm.startSectionNames=e.data.data.startSectionNames,i.componentForm.endSectionIds=e.data.data.endSectionIds,i.componentForm.endSectionNames=e.data.data.endSectionNames,i.componentForm.endValue=e.data.data.endValue,i.componentForm.startValue=e.data.data.startValue,i.componentForm.presentationForm=e.data.data.presentationForm,i.componentForm.type=e.data.data.type,""!=e.data.data.startSectionIds){console.log("startSectionIds",e.data.data.startSectionIds);var n=[],r=[];n=e.data.data.startSectionIds.split(","),console.log("this.sectionals",i.sectionals),console.log("startSectionIdArr",n),n.forEach((function(e){i.sectionals.forEach((function(t){e==t.graphicId&&(r.push(t.graphicName),i.componentForm.startSection=r)}))}))}if(""!=e.data.data.endSectionIds){console.log("endSectionIds",e.data.data.endSectionIds);var o=[],s=[];o=e.data.data.endSectionIds.split(","),console.log("this.sectionals",i.sectionals),console.log("endSectionIdArr",o),o.forEach((function(e){i.sectionals.forEach((function(t){e==t.graphicId&&(s.push(t.graphicName),i.componentForm.endSection=s)}))}))}if(""!=e.data.data.presentationForm){var a=[];a=e.data.data.presentationForm.split(","),i.componentForm.presentation=a}}})))},getAllSectionalData:function(e){var t=this;Object(p["g"])({VideoId:e}).then((function(e){console.log("res",e),200==e.data.code&&(t.sectionals=e.data.data)}))},figureType:function(e){return"Move"==e?e="轨迹":"Poly"==e?e="区域":"Line"==e&&(e="断面"),e},getFigureD:function(e,t,n){console.log("图形类型",e),console.log("初始图形名称",t),this.startFigureName=t,console.log("图形位置",n),this.dialogFormVisible=!0,this.form.name=t,this.form.type=this.figureType(e),this.form.coordinate=n,this.form.id="",this.title=this.figureType(e)},getModifyTheNameN:function(e){console.log("data",e);var t=[];t=e.split(","),console.log("arr",t),this.form.id=t[0],this.form.name=t[1],this.form.type=t[2],this.startFigureName=t[1],("轨迹"==this.form.type||"区域"==this.form.type||"断面"==this.form.type)&&(this.dialogFormVisible=!0)},onSubmit:function(e){var t=this;if(console.log("form",e),""==e.id){var n=new FormData;"断面"==e.type?(n.append("GraphicName",e.name),n.append("GraphicType",e.type),n.append("Coordinate",e.coordinate),n.append("VideoId",this.VideoId),n.append("Direction",e.Direction)):(e.type,n.append("GraphicName",e.name),n.append("GraphicType",e.type),n.append("Coordinate",e.coordinate),n.append("VideoId",this.VideoId)),wt()({method:"post",url:bt["a"].addFigure,data:n}).then((function(n){console.log("res",n),200==n.data.code?(t.$message({message:n.data.msg,type:"success"}),document.getElementById("mapModule").contentWindow.postFigureId(JSON.stringify(n.data.data)),document.getElementById("mapModule").contentWindow.postFigureName(JSON.stringify(n.data.data+","+e.name+","+t.startFigureName)),t.dialogFormVisible=!1):t.$message({message:n.data.msg,type:"warning"})}))}else{var r=new FormData;"断面"==e.type?(r.append("GraphicName",e.name),r.append("GraphicType",e.type),r.append("Direction",e.Direction),r.append("GraphicId",e.id)):"区域"==e.type?(r.append("GraphicName",e.name),r.append("GraphicType",e.type),r.append("Direction",e.Direction),r.append("GraphicId",e.id),r.append("StoppingSpeed",e.StoppingSpeed)):(r.append("GraphicName",e.name),r.append("GraphicType",e.type),r.append("GraphicId",e.id)),wt()({method:"post",url:bt["a"].editFigure,data:r}).then((function(n){console.log("res",n),200==n.data.code?(t.$message({message:n.data.msg,type:"success"}),console.log("startFigureName",t.startFigureName),document.getElementById("mapModule").contentWindow.postFigureName(JSON.stringify(e.id+","+e.name+","+t.startFigureName)),t.dialogFormVisible=!1):t.$message({message:n.data.msg,type:"warning"})}))}},onSubmitComponent:function(e){var t=this;this.component=!1;var n=new FormData;"OD"==e.componentType?(n.append("componentName",e.componentName),n.append("company",e.company),n.append("componentParameterId",e.componentParameterId),n.append("cycleInterval",e.cycleInterval),n.append("startSectionIds",e.startSectionIds),n.append("startSectionNames",e.startSectionNames),n.append("endSectionIds",e.endSectionIds),n.append("endSectionNames",e.endSectionNames),n.append("endValue",e.endValue),n.append("startValue",e.startValue),n.append("timeMode",e.timeMode),n.append("presentationForm","矩阵图"),n.append("type",e.type)):(n.append("componentName",e.componentName),n.append("company",e.company),n.append("componentParameterId",e.componentParameterId),n.append("cycleInterval",e.cycleInterval),n.append("endValue",e.endValue),n.append("startValue",e.startValue),n.append("timeMode",e.timeMode),n.append("presentationForm",e.presentationForm),n.append("type",e.type)),wt()({method:"post",url:bt["a"].editComponent,data:n}).then((function(n){console.log("res",n),200==n.data.code?(t.$message({message:n.data.msg,type:"success"}),document.getElementById("mapModule").contentWindow.postFigureId(JSON.stringify(n.data.data)),document.getElementById("mapModule").contentWindow.editComponent(JSON.stringify(t.componentId+","+e.componentName)),t.dialogFormVisible=!1):t.$message({message:n.data.msg,type:"warning"})}))},closeComponent:function(e){this.component=!1},closeFigure:function(e){console.log("form",e),""!=e.id?(this.dialogFormVisible=!1,document.getElementById("mapModule").contentWindow.closeEdit(JSON.stringify(e.type+","+e.id))):(this.dialogFormVisible=!1,document.getElementById("mapModule").contentWindow.delFigure())},closeComponentForm:function(){this.component=!1},closeForm:function(e){""!=this.form.id?(this.dialogFormVisible=!1,document.getElementById("mapModule").contentWindow.closeEdit(JSON.stringify(e.type+","+e.id))):(this.dialogFormVisible=!1,document.getElementById("mapModule").contentWindow.delFigure())},handleCheckedStartSection:function(e){var t=this;console.log("改变起点",e);var n=[],r=[];e.forEach((function(e){t.sectionals.forEach((function(i){if(e==i.graphicName){n.push(i.graphicId),r.push(i.graphicName);var o=n.join(","),s=r.join(",");t.componentForm.startSectionIds=o,t.componentForm.startSectionNames=s}}))}))},handleCheckedendSection:function(e){var t=this;console.log("改变终点",e);var n=[],r=[];e.forEach((function(e){t.sectionals.forEach((function(i){if(e==i.graphicName){n.push(i.graphicId),r.push(i.graphicName);var o=n.join(","),s=r.join(",");console.log("newendSectionId",o),console.log("newEndSectionName",s),t.componentForm.endSectionIds=o,t.componentForm.endSectionNames=s}}))}))},handlePresentation:function(e){console.log("展现形式",e);var t=e.join(",");this.componentForm.presentationForm=t,console.log("this.componentForm.presentationForm",this.componentForm.presentationForm)},loadingShow:function(e){this.loadingShow1=e},handleSearch:function(){this.modelOthers=!0,this.$refs.htModels.finbBox(this.inputVal),console.log(this.$refs.htModels,"asdasdasd"),this.inputVal=""},handleRow:function(e){this.modelOthers=!0,this.$refs.htModels.finbBox(e)},handleWather:function(){var e=this;wt()({url:"https://restapi.amap.com/v3/weather/weatherInfo?key=bc2b906032fdd8a63cbd0790d656b1d7&city=620100",methods:""}).then((function(t){e.weatherItem=t.data.lives[0],console.log(e.weatherItem,"asdsads")}))}},components:{editModal:s["a"],analysisConfiguration:y,dataBoard:yt}},Ft=Pt,Bt=(n("fa1c"),Object(g["a"])(Ft,i,o,!1,null,"75f60f3e",null));t["default"]=Bt.exports},"1e4d":function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}r.prototype.allocate=function(){const e=this.nextId++;return 65536===this.nextId&&(this.nextId=1),e},r.prototype.getLastAllocated=function(){return 1===this.nextId?65535:this.nextId-1},r.prototype.register=function(e){return!0},r.prototype.deallocate=function(e){},r.prototype.clear=function(){},e.exports=r},"1fad":function(e,t,n){const r=n("51e9"),i=n("faa1"),o=n("a7c9"),s=n("b289"),a=n("e4fc")("mqtt-packet:parser");class l extends i{constructor(){super(),this.parser=this.constructor.parser}static parser(e){return this instanceof l?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new l).parser(e)}_resetState(){a("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new o,this.error=null,this._list=r(),this._stateCounter=0}parse(e){this.error&&this._resetState(),this._list.append(e),a("parse: current state: %s",this._states[this._stateCounter]);while((-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error)this._stateCounter++,a("parse: state complete. _stateCounter is now: %d",this._stateCounter),a("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return a("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const e=this._list.readUInt8(0);return this.packet.cmd=s.types[e>>s.CMD_SHIFT],this.packet.retain=0!==(e&s.RETAIN_MASK),this.packet.qos=e>>s.QOS_SHIFT&s.QOS_MASK,this.packet.dup=0!==(e&s.DUP_MASK),a("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),a("_parseLength %d",e.value),!!e}_parsePayload(){a("_parsePayload: payload %O",this._list);let e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return a("_parsePayload complete result: %s",e),e}_parseConnect(){let e,t,n,r;a("_parseConnect");const i={},o=this.packet,l=this._parseString();if(null===l)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==l&&"MQIsdp"!==l)return this._emitError(new Error("Invalid protocolId"));if(o.protocolId=l,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(o.protocolVersion=this._list.readUInt8(this._pos),o.protocolVersion>=128&&(o.bridgeMode=!0,o.protocolVersion=o.protocolVersion-128),3!==o.protocolVersion&&4!==o.protocolVersion&&5!==o.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(i.username=this._list.readUInt8(this._pos)&s.USERNAME_MASK,i.password=this._list.readUInt8(this._pos)&s.PASSWORD_MASK,i.will=this._list.readUInt8(this._pos)&s.WILL_FLAG_MASK,i.will&&(o.will={},o.will.retain=0!==(this._list.readUInt8(this._pos)&s.WILL_RETAIN_MASK),o.will.qos=(this._list.readUInt8(this._pos)&s.WILL_QOS_MASK)>>s.WILL_QOS_SHIFT),o.clean=0!==(this._list.readUInt8(this._pos)&s.CLEAN_SESSION_MASK),this._pos++,o.keepalive=this._parseNum(),-1===o.keepalive)return this._emitError(new Error("Packet too short"));if(5===o.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(o.properties=e)}const c=this._parseString();if(null===c)return this._emitError(new Error("Packet too short"));if(o.clientId=c,a("_parseConnect: packet.clientId: %s",o.clientId),i.will){if(5===o.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(o.will.properties=e)}if(e=this._parseString(),null===e)return this._emitError(new Error("Cannot parse will topic"));if(o.will.topic=e,a("_parseConnect: packet.will.topic: %s",o.will.topic),t=this._parseBuffer(),null===t)return this._emitError(new Error("Cannot parse will payload"));o.will.payload=t,a("_parseConnect: packet.will.paylaod: %s",o.will.payload)}if(i.username){if(r=this._parseString(),null===r)return this._emitError(new Error("Cannot parse username"));o.username=r,a("_parseConnect: packet.username: %s",o.username)}if(i.password){if(n=this._parseBuffer(),null===n)return this._emitError(new Error("Cannot parse password"));o.password=n}return this.settings=o,a("_parseConnect: complete"),o}_parseConnack(){a("_parseConnack");const e=this.packet;if(this._list.length<1)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&s.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(-1===e.returnCode||-1===e.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}a("_parseConnack: complete")}_parsePublish(){a("_parsePublish");const e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),a("_parsePublish: payload from buffer list: %o",e.payload)}}_parseSubscribe(){a("_parseSubscribe");const e=this.packet;let t,n,r,i,o,l,c;if(1!==e.qos)return this._emitError(new Error("Wrong subscribe header"));if(e.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}while(this._pos<e.length){if(t=this._parseString(),null===t)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=e.length)return this._emitError(new Error("Malformed Subscribe Payload"));n=this._parseByte(),r=n&s.SUBSCRIBE_OPTIONS_QOS_MASK,l=0!==(n>>s.SUBSCRIBE_OPTIONS_NL_SHIFT&s.SUBSCRIBE_OPTIONS_NL_MASK),o=0!==(n>>s.SUBSCRIBE_OPTIONS_RAP_SHIFT&s.SUBSCRIBE_OPTIONS_RAP_MASK),i=n>>s.SUBSCRIBE_OPTIONS_RH_SHIFT&s.SUBSCRIBE_OPTIONS_RH_MASK,c={topic:t,qos:r},5===this.settings.protocolVersion?(c.nl=l,c.rap=o,c.rh=i):this.settings.bridgeMode&&(c.rh=0,c.rap=!0,c.nl=!0),a("_parseSubscribe: push subscription `%s` to subscription",c),e.subscriptions.push(c)}}}_parseSuback(){a("_parseSuback");const e=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}while(this._pos<this.packet.length)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){a("_parseUnsubscribe");const e=this.packet;if(e.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}while(this._pos<e.length){const t=this._parseString();if(null===t)return this._emitError(new Error("Cannot parse topic"));a("_parseUnsubscribe: push topic `%s` to unsubscriptions",t),e.unsubscriptions.push(t)}}}_parseUnsuback(){a("_parseUnsuback");const e=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t),e.granted=[];while(this._pos<this.packet.length)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){a("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const e=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion&&(e.length>2?(e.reasonCode=this._parseByte(),a("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)):e.reasonCode=0,e.length>3)){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0}_parseDisconnect(){const e=this.packet;if(a("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?e.reasonCode=this._parseByte():e.reasonCode=0;const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return a("_parseDisconnect result: true"),!0}_parseAuth(){a("_parseAuth");const e=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();const t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),a("_parseAuth: result: true"),!0}_parseMessageId(){const e=this.packet;return e.messageId=this._parseNum(),null===e.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(a("_parseMessageId: packet.messageId %d",e.messageId),!0)}_parseString(e){const t=this._parseNum(),n=t+this._pos;if(-1===t||n>this._list.length||n>this.packet.length)return null;const r=this._list.toString("utf8",this._pos,n);return this._pos+=t,a("_parseString: result: %s",r),r}_parseStringPair(){return a("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const e=this._parseNum(),t=e+this._pos;if(-1===e||t>this._list.length||t>this.packet.length)return null;const n=this._list.slice(this._pos,t);return this._pos+=e,a("_parseBuffer: result: %o",n),n}_parseNum(){if(this._list.length-this._pos<2)return-1;const e=this._list.readUInt16BE(this._pos);return this._pos+=2,a("_parseNum: result: %s",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const e=this._list.readUInt32BE(this._pos);return this._pos+=4,a("_parse4ByteNum: result: %s",e),e}_parseVarByteNum(e){a("_parseVarByteNum");const t=4;let n,r=0,i=1,o=0,l=!1;const c=this._pos?this._pos:0;while(r<t&&c+r<this._list.length){if(n=this._list.readUInt8(c+r++),o+=i*(n&s.VARBYTEINT_MASK),i*=128,0===(n&s.VARBYTEINT_FIN_MASK)){l=!0;break}if(this._list.length<=r)break}return!l&&r===t&&this._list.length>=r&&this._emitError(new Error("Invalid variable byte integer")),c&&(this._pos+=r),l=!!l&&(e?{bytes:r,value:o}:o),a("_parseVarByteNum: result: %o",l),l}_parseByte(){let e;return this._pos<this._list.length&&(e=this._list.readUInt8(this._pos),this._pos++),a("_parseByte: result: %o",e),e}_parseByType(e){switch(a("_parseByType: type: %s",e),e){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){a("_parseProperties");const e=this._parseVarByteNum(),t=this._pos,n=t+e,r={};while(this._pos<n){const e=this._parseByte();if(!e)return this._emitError(new Error("Cannot parse property code type")),!1;const t=s.propertiesCodes[e];if(!t)return this._emitError(new Error("Unknown property")),!1;if("userProperties"!==t)r[t]?(Array.isArray(r[t])||(r[t]=[r[t]]),r[t].push(this._parseByType(s.propertiesTypes[t]))):r[t]=this._parseByType(s.propertiesTypes[t]);else{r[t]||(r[t]=Object.create(null));const e=this._parseByType(s.propertiesTypes[t]);if(r[t][e.name])if(Array.isArray(r[t][e.name]))r[t][e.name].push(e.value);else{const n=r[t][e.name];r[t][e.name]=[n],r[t][e.name].push(e.value)}else r[t][e.name]=e.value}}return r}_newPacket(){return a("_newPacket"),this.packet&&(this._list.consume(this.packet.length),a("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),a("_newPacket: new packet"),this.packet=new o,this._pos=0,!0}_emitError(e){a("_emitError"),this.error=e,this.emit("error",e)}}e.exports=l},"1fb5":function(e,t,n){"use strict";t.byteLength=u,t.toByteArray=p,t.fromByteArray=g;for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function u(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r}function h(e,t,n){return 3*(t+n)/4-n}function p(e){var t,n,r=c(e),s=r[0],a=r[1],l=new o(h(e,s,a)),u=0,p=a>0?s-4:s;for(n=0;n<p;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l}function f(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function d(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(f(r));return i.join("")}function g(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,l=n-i;a<l;a+=s)o.push(d(e,a,a+s>l?l:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},2:function(e,t){},2527:function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},"29a2":function(e,t,n){"use strict";function r(e,t,n){var r=this;this._callback=e,this._args=n,this._interval=setInterval(e,t,this._args),this.reschedule=function(e){e||(e=r._interval),r._interval&&clearInterval(r._interval),r._interval=setInterval(r._callback,e,r._args)},this.clear=function(){r._interval&&(clearInterval(r._interval),r._interval=void 0)},this.destroy=function(){r._interval&&clearInterval(r._interval),r._callback=void 0,r._interval=void 0,r._args=void 0}}function i(){if("function"!==typeof arguments[0])throw new Error("callback needed");if("number"!==typeof arguments[1])throw new Error("interval needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new r(arguments[0],arguments[1],e)}e.exports=i},"29aa":function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=7*o,a=365.25*o;function l(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]),c=(t[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return l*a;case"weeks":case"week":case"w":return l*s;case"days":case"day":case"d":return l*o;case"hours":case"hour":case"hrs":case"hr":case"h":return l*i;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function c(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+"d":t>=i?Math.round(e/i)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}function u(e){var t=Math.abs(e);return t>=o?h(e,t,o,"day"):t>=i?h(e,t,i,"hour"):t>=r?h(e,t,r,"minute"):t>=n?h(e,t,n,"second"):e+" ms"}function h(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return l(e);if("number"===n&&isFinite(e))return t.long?u(e):c(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},"2a28":function(e,t,n){"use strict";e.exports=n("0050")()},"2fae":function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"===typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;var s=[];for(r=0;o&&r<t;r++)s.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(r=0;r<n.length;r++)o=i(this,o,n[r]);return s},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n("aff9")(r)}catch(l){}},3:function(e,t){},"31b5":function(e,t,n){"use strict";var r=n("fbd7").codes.ERR_INVALID_OPT_VALUE;function i(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}function o(e,t,n,o){var s=i(t,o,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?n:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},33013:function(e,t,n){"use strict";const{Buffer:r}=n("b639"),i=Symbol.for("BufferList");function o(e){if(!(this instanceof o))return new o(e);o._init.call(this,e)}o._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},o.prototype._new=function(e){return new o(e)},o.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let n=0;n<this._bufs.length;n++){const r=t+this._bufs[n].length;if(e<r||n===this._bufs.length-1)return[n,e-t];t=r}},o.prototype._reverseOffset=function(e){const t=e[0];let n=e[1];for(let r=0;r<t;r++)n+=this._bufs[r].length;return n},o.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},o.prototype.slice=function(e,t){return"number"===typeof e&&e<0&&(e+=this.length),"number"===typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},o.prototype.copy=function(e,t,n,i){if(("number"!==typeof n||n<0)&&(n=0),("number"!==typeof i||i>this.length)&&(i=this.length),n>=this.length)return e||r.alloc(0);if(i<=0)return e||r.alloc(0);const o=!!e,s=this._offset(n),a=i-n;let l=a,c=o&&t||0,u=s[1];if(0===n&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,c),c+=this._bufs[t].length;return e}if(l<=this._bufs[s[0]].length-u)return o?this._bufs[s[0]].copy(e,t,u,u+l):this._bufs[s[0]].slice(u,u+l);o||(e=r.allocUnsafe(a));for(let r=s[0];r<this._bufs.length;r++){const t=this._bufs[r].length-u;if(!(l>t)){this._bufs[r].copy(e,c,u,u+l),c+=t;break}this._bufs[r].copy(e,c,u),c+=t,l-=t,u&&(u=0)}return e.length>c?e.slice(0,c):e},o.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!==typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const n=this._offset(e),r=this._offset(t),i=this._bufs.slice(n[0],r[0]+1);return 0===r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!==n[1]&&(i[0]=i[0].slice(n[1])),this._new(i)},o.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},o.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;while(this._bufs.length){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},o.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(r.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"===typeof e&&(e=e.toString()),this._appendBuffer(r.from(e));return this},o.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},o.prototype.indexOf=function(e,t,n){if(void 0===n&&"string"===typeof t&&(n=t,t=void 0),"function"===typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"===typeof e?e=r.from([e]):"string"===typeof e?e=r.from(e,n):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=r.from(e.buffer,e.byteOffset,e.byteLength):r.isBuffer(e)||(e=r.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const i=this._offset(t);let o=i[0],s=i[1];for(;o<this._bufs.length;o++){const t=this._bufs[o];while(s<t.length){const n=t.length-s;if(n>=e.length){const n=t.indexOf(e,s);if(-1!==n)return this._reverseOffset([o,n]);s=t.length-e.length+1}else{const t=this._reverseOffset([o,s]);if(this._match(t,e))return t;s++}}s=0}return-1},o.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let n=0;n<t.length;n++)if(this.get(e+n)!==t[n])return!1;return!0},function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)(function(t){null===e[t]?o.prototype[t]=function(e,n){return this.slice(e,e+n)[t](0,n)}:o.prototype[t]=function(n=0){return this.slice(n,n+e[t])[t](0)}})(t)}(),o.prototype._isBufferList=function(e){return e instanceof o||o.isBufferList(e)},o.isBufferList=function(e){return null!=e&&e[i]},e.exports=o},3409:function(e,t,n){t.parser=n("1fad").parser,t.generate=n("7f0f"),t.writeToStream=n("7135")},"34e3":function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n("d9e1"),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function f(e,t){return{value:e,done:t}}function d(e){var t=e[s];if(null!==t){var n=e[p].read();null!==n&&(e[u]=null,e[s]=null,e[a]=null,t(f(n,!1)))}}function g(e){t.nextTick(d,e)}function m(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[h](n,r)}),r)}}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((r={get stream(){return this[p]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[p].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(m(i,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[u]=r,r}},i(r,Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[p].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),y),v=function(e){var t,n=Object.create(b,(t={},i(t,p,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[p].read();r?(n[u]=null,n[s]=null,n[a]=null,e(f(r,!1))):(n[s]=e,n[a]=t)},writable:!0}),t));return n[u]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[u]=null,n[s]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[s];null!==r&&(n[u]=null,n[s]=null,n[a]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",g.bind(null,n)),n};e.exports=v}).call(this,n("f28c"))},"35e86":function(e,t,n){"use strict";e.exports={isString:function(e){return"string"===typeof e},isObject:function(e){return"object"===typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},"361d":function(e,t,n){"use strict";var r=n("728f"),i=n.n(r);i.a},"364a":function(e,t,n){},"386b7":function(e,t,n){"use strict";var r;function i(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var o=n("9bfc").codes,s=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function l(e){if(e)throw e}function c(e){return e.setHeader&&"function"===typeof e.abort}function u(e,t,o,s){s=i(s);var l=!1;e.on("close",(function(){l=!0})),void 0===r&&(r=n("bf09")),r(e,{readable:t,writable:o},(function(e){if(e)return s(e);l=!0,s()}));var u=!1;return function(t){if(!l&&!u)return u=!0,c(e)?e.abort():"function"===typeof e.destroy?e.destroy():void s(t||new a("pipe"))}}function h(e){e()}function p(e,t){return e.pipe(t)}function f(e){return e.length?"function"!==typeof e[e.length-1]?l:e.pop():l}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1,a=n>0;return u(e,s,a,(function(e){r||(r=e),e&&o.forEach(h),s||(o.forEach(h),i(r))}))}));return t.reduce(p)}e.exports=d},"386f":function(e,t,n){"use strict";var r=n("e548"),i=n.n(r);i.a},"3ca2":function(e,t,n){"use strict";e.exports=u;var r=n("fbd7").codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n("be3f");function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,n){p(e,t,n)}))}function p(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}n("3fb5")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},"3d67":function(e,t,n){"use strict";n.r(t),n.d(t,"Stack",(function(){return c})),n.d(t,"Queue",(function(){return k})),n.d(t,"PriorityQueue",(function(){return R})),n.d(t,"Vector",(function(){return j})),n.d(t,"VectorIterator",(function(){return L})),n.d(t,"LinkList",(function(){return W})),n.d(t,"LinkListIterator",(function(){return V})),n.d(t,"Deque",(function(){return S})),n.d(t,"DequeIterator",(function(){return w})),n.d(t,"OrderedSet",(function(){return oe})),n.d(t,"OrderedSetIterator",(function(){return re})),n.d(t,"OrderedMap",(function(){return pe})),n.d(t,"OrderedMapIterator",(function(){return ue})),n.d(t,"HashSet",(function(){return we})),n.d(t,"HashMap",(function(){return ke})),n.d(t,"Container",(function(){return s})),n.d(t,"ContainerIterator",(function(){return i})),n.d(t,"SequentialContainer",(function(){return p})),n.d(t,"TreeContainer",(function(){return G})),n.d(t,"HashContainer",(function(){return ge}));var r=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(){function e(t){void 0===t&&(t=e.NORMAL),this.iteratorType=t}return e.NORMAL=!1,e.REVERSE=!0,e}(),o=function(){function e(){this.length=0}return e.prototype.size=function(){return this.length},e.prototype.empty=function(){return 0===this.length},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(o),a=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(e){function t(t){void 0===t&&(t=[]);var n=e.call(this)||this;return n.stack=[],t.forEach((function(e){return n.push(e)})),n}return a(t,e),t.prototype.clear=function(){this.length=0,this.stack.length=0},t.prototype.push=function(e){this.stack.push(e),this.length+=1},t.prototype.pop=function(){this.stack.pop(),this.length>0&&(this.length-=1)},t.prototype.top=function(){return this.stack[this.length-1]},t}(o),c=l,u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(s),p=h;function f(e,t,n){if(e<t||e>n)throw new RangeError}var d=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(e){function t(t,n,r,o,s){var a=e.call(this,s)||this;return a.node=t,a.size=n,a.getElementByPos=r,a.setElementByPos=o,a.iteratorType===i.NORMAL?(a.pre=function(){if(0===this.node)throw new RangeError("Deque iterator access denied!");return this.node-=1,this},a.next=function(){if(this.node===this.size())throw new RangeError("Deque Iterator access denied!");return this.node+=1,this}):(a.pre=function(){if(this.node===this.size()-1)throw new RangeError("Deque iterator access denied!");return this.node+=1,this},a.next=function(){if(-1===this.node)throw new RangeError("Deque iterator access denied!");return this.node-=1,this}),a}return d(t,e),Object.defineProperty(t.prototype,"pointer",{get:function(){return f(this.node,0,this.size()-1),this.getElementByPos(this.node)},set:function(e){f(this.node,0,this.size()-1),this.setElementByPos(this.node,e)},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return this.node===e.node},t}(i),m=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},b=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s},v=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.copy=function(){return new t(this.node,this.size,this.getElementByPos,this.setElementByPos,this.iteratorType)},t}(g),_=function(e){function t(t,n){void 0===t&&(t=[]),void 0===n&&(n=4096);var r,i=e.call(this)||this;if(i.first=0,i.curFirst=0,i.last=0,i.curLast=0,i.bucketNum=0,i.map=[],"size"in t)r="number"===typeof t.size?t.size:t.size();else{if(!("length"in t))throw new RangeError("Can't get container's size!");r=t.length}i.bucketSize=n,i.bucketNum=Math.max(Math.ceil(r/i.bucketSize),1);for(var o=0;o<i.bucketNum;++o)i.map.push(new Array(i.bucketSize));var s=Math.ceil(r/i.bucketSize);return i.first=i.last=(i.bucketNum>>1)-(s>>1),i.curFirst=i.curLast=i.bucketSize-r%i.bucketSize>>1,t.forEach((function(e){return i.pushBack(e)})),i.size=i.size.bind(i),i.getElementByPos=i.getElementByPos.bind(i),i.setElementByPos=i.setElementByPos.bind(i),i}return m(t,e),t.prototype.reAllocate=function(){for(var e=[],t=Math.max(this.bucketNum>>1,1),n=0;n<t;++n)e[n]=new Array(this.bucketSize);for(n=this.first;n<this.bucketNum;++n)e[e.length]=this.map[n];for(n=0;n<this.last;++n)e[e.length]=this.map[n];e[e.length]=v([],b(this.map[this.last]),!1),this.first=t,this.last=e.length-1;for(n=0;n<t;++n)e[e.length]=new Array(this.bucketSize);this.map=e,this.bucketNum=e.length},t.prototype.getElementIndex=function(e){var t=this.curFirst+e+1,n=t%this.bucketSize,r=n-1,i=this.first+(t-n)/this.bucketSize;return 0===n&&(i-=1),i%=this.bucketNum,r<0&&(r+=this.bucketSize),{curNodeBucketIndex:i,curNodePointerIndex:r}},t.prototype.clear=function(){this.map=[[]],this.bucketNum=1,this.first=this.last=this.length=0,this.curFirst=this.curLast=this.bucketSize>>1},t.prototype.front=function(){return this.map[this.first][this.curFirst]},t.prototype.back=function(){return this.map[this.last][this.curLast]},t.prototype.begin=function(){return new w(0,this.size,this.getElementByPos,this.setElementByPos)},t.prototype.end=function(){return new w(this.length,this.size,this.getElementByPos,this.setElementByPos)},t.prototype.rBegin=function(){return new w(this.length-1,this.size,this.getElementByPos,this.setElementByPos,i.REVERSE)},t.prototype.rEnd=function(){return new w(-1,this.size,this.getElementByPos,this.setElementByPos,i.REVERSE)},t.prototype.pushBack=function(e){this.length&&(this.curLast<this.bucketSize-1?this.curLast+=1:this.last<this.bucketNum-1?(this.last+=1,this.curLast=0):(this.last=0,this.curLast=0),this.last===this.first&&this.curLast===this.curFirst&&this.reAllocate()),this.length+=1,this.map[this.last][this.curLast]=e},t.prototype.popBack=function(){this.length&&(this.map[this.last][this.curLast]=void 0,1!==this.length&&(this.curLast>0?this.curLast-=1:this.last>0?(this.last-=1,this.curLast=this.bucketSize-1):(this.last=this.bucketNum-1,this.curLast=this.bucketSize-1)),this.length-=1)},t.prototype.pushFront=function(e){this.length&&(this.curFirst>0?this.curFirst-=1:this.first>0?(this.first-=1,this.curFirst=this.bucketSize-1):(this.first=this.bucketNum-1,this.curFirst=this.bucketSize-1),this.first===this.last&&this.curFirst===this.curLast&&this.reAllocate()),this.length+=1,this.map[this.first][this.curFirst]=e},t.prototype.popFront=function(){this.length&&(this.map[this.first][this.curFirst]=void 0,1!==this.length&&(this.curFirst<this.bucketSize-1?this.curFirst+=1:this.first<this.bucketNum-1?(this.first+=1,this.curFirst=0):(this.first=0,this.curFirst=0)),this.length-=1)},t.prototype.forEach=function(e){for(var t=0;t<this.length;++t)e(this.getElementByPos(t),t)},t.prototype.getElementByPos=function(e){f(e,0,this.length-1);var t=this.getElementIndex(e),n=t.curNodeBucketIndex,r=t.curNodePointerIndex;return this.map[n][r]},t.prototype.setElementByPos=function(e,t){f(e,0,this.length-1);var n=this.getElementIndex(e),r=n.curNodeBucketIndex,i=n.curNodePointerIndex;this.map[r][i]=t},t.prototype.insert=function(e,t,n){if(void 0===n&&(n=1),f(e,0,this.length),0===e)while(n--)this.pushFront(t);else if(e===this.length)while(n--)this.pushBack(t);else{for(var r=[],i=e;i<this.length;++i)r.push(this.getElementByPos(i));this.cut(e-1);for(i=0;i<n;++i)this.pushBack(t);for(i=0;i<r.length;++i)this.pushBack(r[i])}},t.prototype.cut=function(e){if(e<0)this.clear();else{var t=this.getElementIndex(e),n=t.curNodeBucketIndex,r=t.curNodePointerIndex;this.last=n,this.curLast=r,this.length=e+1}},t.prototype.eraseElementByPos=function(e){var t=this;if(f(e,0,this.length-1),0===e)this.popFront();else if(e===this.length-1)this.popBack();else{for(var n=[],r=e+1;r<this.length;++r)n.push(this.getElementByPos(r));this.cut(e),this.popBack(),n.forEach((function(e){return t.pushBack(e)}))}},t.prototype.eraseElementByValue=function(e){if(this.length){for(var t=[],n=0;n<this.length;++n){var r=this.getElementByPos(n);r!==e&&t.push(r)}var i=t.length;for(n=0;n<i;++n)this.setElementByPos(n,t[n]);this.cut(i-1)}},t.prototype.eraseElementByIterator=function(e){var t=e.node;return this.eraseElementByPos(t),e=e.next(),e},t.prototype.find=function(e){for(var t=0;t<this.length;++t)if(this.getElementByPos(t)===e)return new w(t,this.size,this.getElementByPos,this.setElementByPos);return this.end()},t.prototype.reverse=function(){var e=0,t=this.length-1;while(e<t){var n=this.getElementByPos(e);this.setElementByPos(e,this.getElementByPos(t)),this.setElementByPos(t,n),e+=1,t-=1}},t.prototype.unique=function(){if(!(this.length<=1)){for(var e=1,t=this.getElementByPos(0),n=1;n<this.length;++n){var r=this.getElementByPos(n);r!==t&&(t=r,this.setElementByPos(e++,r))}while(this.length>e)this.popBack()}},t.prototype.sort=function(e){for(var t=[],n=0;n<this.length;++n)t.push(this.getElementByPos(n));t.sort(e);for(n=0;n<this.length;++n)this.setElementByPos(n,t[n])},t.prototype.shrinkToFit=function(){if(this.length){var e=[];this.forEach((function(t){return e.push(t)})),this.bucketNum=Math.max(Math.ceil(this.length/this.bucketSize),1),this.length=this.first=this.last=this.curFirst=this.curLast=0,this.map=[];for(var t=0;t<this.bucketNum;++t)this.map.push(new Array(this.bucketSize));for(t=0;t<e.length;++t)this.pushBack(e[t])}},t.prototype[Symbol.iterator]=function(){return function(){var e;return y(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.length?[4,this.getElementByPos(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return++e,[3,1];case 4:return[2]}}))}.bind(this)()},t}(p),S=_,C=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t){void 0===t&&(t=[]);var n=e.call(this)||this;return n.queue=new S(t),n.length=n.queue.size(),n}return C(t,e),t.prototype.clear=function(){this.queue.clear(),this.length=0},t.prototype.push=function(e){this.queue.pushBack(e),this.length+=1},t.prototype.pop=function(){this.queue.popFront(),this.length&&(this.length-=1)},t.prototype.front=function(){return this.queue.front()},t}(o),k=E,T=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s},A=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},I=function(e){function t(t,n,r){var i;void 0===t&&(t=[]),void 0===n&&(n=function(e,t){return e>t?-1:e<t?1:0}),void 0===r&&(r=!0);var o=e.call(this)||this;o.cmp=n,Array.isArray(t)?o.priorityQueue=r?A([],x(t),!1):t:(o.priorityQueue=[],t.forEach((function(e){return o.priorityQueue.push(e)}))),o.length=o.priorityQueue.length;for(var s=o.length-1>>1;s>=0;--s){var a=s,l=a<<1|1;while(l<o.length){var c=l,u=c+1,h=c;if(u<o.length&&o.cmp(o.priorityQueue[c],o.priorityQueue[u])>0&&(h=u),o.cmp(o.priorityQueue[a],o.priorityQueue[h])<=0)break;i=x([o.priorityQueue[h],o.priorityQueue[a]],2),o.priorityQueue[a]=i[0],o.priorityQueue[h]=i[1],a=h,l=a<<1|1}}return o}return T(t,e),t.prototype.adjust=function(e){var t,n,r=e<<1|1,i=2+(e<<1);r<this.length&&this.cmp(this.priorityQueue[e],this.priorityQueue[r])>0&&(t=x([this.priorityQueue[r],this.priorityQueue[e]],2),this.priorityQueue[e]=t[0],this.priorityQueue[r]=t[1]),i<this.length&&this.cmp(this.priorityQueue[e],this.priorityQueue[i])>0&&(n=x([this.priorityQueue[i],this.priorityQueue[e]],2),this.priorityQueue[e]=n[0],this.priorityQueue[i]=n[1])},t.prototype.clear=function(){this.length=0,this.priorityQueue.length=0},t.prototype.push=function(e){if(this.priorityQueue.push(e),this.length+=1,1!==this.length){var t=this.length-1;while(t>0){var n=t-1>>1;if(this.cmp(this.priorityQueue[n],e)<=0)break;this.adjust(n),t=n}}},t.prototype.pop=function(){if(this.length){var e=this.priorityQueue[this.length-1];this.length-=1;var t=0;while(t<this.length){var n=t<<1|1,r=2+(t<<1);if(n>=this.length)break;var i=n;if(r<this.length&&this.cmp(this.priorityQueue[n],this.priorityQueue[r])>0&&(i=r),this.cmp(this.priorityQueue[i],e)>=0)break;this.priorityQueue[t]=this.priorityQueue[i],t=i}this.priorityQueue[t]=e,this.priorityQueue.pop()}},t.prototype.top=function(){return this.priorityQueue[0]},t}(o),R=I,O=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},F=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s},B=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},M=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.copy=function(){return new t(this.node,this.size,this.getElementByPos,this.setElementByPos,this.iteratorType)},t}(g),N=function(e){function t(t,n){void 0===t&&(t=[]),void 0===n&&(n=!0);var r=e.call(this)||this;return Array.isArray(t)?(r.vector=n?B([],F(t),!1):t,r.length=t.length):(r.vector=[],t.forEach((function(e){return r.pushBack(e)}))),r.size=r.size.bind(r),r.getElementByPos=r.getElementByPos.bind(r),r.setElementByPos=r.setElementByPos.bind(r),r}return O(t,e),t.prototype.clear=function(){this.length=0,this.vector.length=0},t.prototype.begin=function(){return new L(0,this.size,this.getElementByPos,this.setElementByPos)},t.prototype.end=function(){return new L(this.length,this.size,this.getElementByPos,this.setElementByPos)},t.prototype.rBegin=function(){return new L(this.length-1,this.size,this.getElementByPos,this.setElementByPos,i.REVERSE)},t.prototype.rEnd=function(){return new L(-1,this.size,this.getElementByPos,this.setElementByPos,i.REVERSE)},t.prototype.front=function(){return this.vector[0]},t.prototype.back=function(){return this.vector[this.length-1]},t.prototype.forEach=function(e){for(var t=0;t<this.length;++t)e(this.vector[t],t)},t.prototype.getElementByPos=function(e){return f(e,0,this.length-1),this.vector[e]},t.prototype.eraseElementByPos=function(e){f(e,0,this.length-1),this.vector.splice(e,1),this.length-=1},t.prototype.eraseElementByValue=function(e){for(var t=0,n=0;n<this.length;++n)this.vector[n]!==e&&(this.vector[t++]=this.vector[n]);this.length=this.vector.length=t},t.prototype.eraseElementByIterator=function(e){var t=e.node;return e=e.next(),this.eraseElementByPos(t),e},t.prototype.pushBack=function(e){this.vector.push(e),this.length+=1},t.prototype.popBack=function(){this.length&&(this.vector.pop(),this.length-=1)},t.prototype.setElementByPos=function(e,t){f(e,0,this.length-1),this.vector[e]=t},t.prototype.insert=function(e,t,n){var r;void 0===n&&(n=1),f(e,0,this.length),(r=this.vector).splice.apply(r,B([e,0],F(new Array(n).fill(t)),!1)),this.length+=n},t.prototype.find=function(e){for(var t=0;t<this.length;++t)if(this.vector[t]===e)return new L(t,this.size,this.getElementByPos,this.getElementByPos);return this.end()},t.prototype.reverse=function(){this.vector.reverse()},t.prototype.unique=function(){for(var e=1,t=1;t<this.length;++t)this.vector[t]!==this.vector[t-1]&&(this.vector[e++]=this.vector[t]);this.length=this.vector.length=e},t.prototype.sort=function(e){this.vector.sort(e)},t.prototype[Symbol.iterator]=function(){return function(){return P(this,(function(e){switch(e.label){case 0:return[5,M(this.vector)];case 1:return[2,e.sent()]}}))}.bind(this)()},t}(p),j=N,D=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},q=function(){function e(e){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=e}return e}(),V=function(e){function t(t,n,r){var o=e.call(this,r)||this;return o.node=t,o.header=n,o.iteratorType===i.NORMAL?(o.pre=function(){if(this.node.pre===this.header)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.pre,this},o.next=function(){if(this.node===this.header)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.next,this}):(o.pre=function(){if(this.node.next===this.header)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.next,this},o.next=function(){if(this.node===this.header)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.pre,this}),o}return D(t,e),Object.defineProperty(t.prototype,"pointer",{get:function(){if(this.node===this.header)throw new RangeError("LinkList iterator access denied!");return this.node.value},set:function(e){if(this.node===this.header)throw new RangeError("LinkList iterator access denied!");this.node.value=e},enumerable:!1,configurable:!0}),t.prototype.equals=function(e){return this.node===e.node},t.prototype.copy=function(){return new t(this.node,this.header,this.iteratorType)},t}(i),z=function(e){function t(t){void 0===t&&(t=[]);var n=e.call(this)||this;return n.header=new q,n.head=void 0,n.tail=void 0,t.forEach((function(e){return n.pushBack(e)})),n}return D(t,e),t.prototype.clear=function(){this.length=0,this.head=this.tail=void 0,this.header.pre=this.header.next=void 0},t.prototype.begin=function(){return new V(this.head||this.header,this.header)},t.prototype.end=function(){return new V(this.header,this.header)},t.prototype.rBegin=function(){return new V(this.tail||this.header,this.header,i.REVERSE)},t.prototype.rEnd=function(){return new V(this.header,this.header,i.REVERSE)},t.prototype.front=function(){return this.head?this.head.value:void 0},t.prototype.back=function(){return this.tail?this.tail.value:void 0},t.prototype.forEach=function(e){if(this.length){var t=this.head,n=0;while(t!==this.header)e(t.value,n++),t=t.next}},t.prototype.getElementByPos=function(e){f(e,0,this.length-1);var t=this.head;while(e--)t=t.next;return t.value},t.prototype.eraseElementByPos=function(e){if(f(e,0,this.length-1),0===e)this.popFront();else if(e===this.length-1)this.popBack();else{var t=this.head;while(e--)t=t.next;t=t;var n=t.pre,r=t.next;r.pre=n,n.next=r,this.length-=1}},t.prototype.eraseElementByValue=function(e){while(this.head&&this.head.value===e)this.popFront();while(this.tail&&this.tail.value===e)this.popBack();if(this.head){var t=this.head;while(t!==this.header){if(t.value===e){var n=t.pre,r=t.next;r&&(r.pre=n),n&&(n.next=r),this.length-=1}t=t.next}}},t.prototype.eraseElementByIterator=function(e){var t=e.node;if(t===this.header)throw new RangeError("Invalid iterator");if(e=e.next(),this.head===t)this.popFront();else if(this.tail===t)this.popBack();else{var n=t.pre,r=t.next;r&&(r.pre=n),n&&(n.next=r),this.length-=1}return e},t.prototype.pushBack=function(e){this.length+=1;var t=new q(e);this.tail?(this.tail.next=t,t.pre=this.tail,this.tail=t):(this.head=this.tail=t,this.header.next=this.head,this.head.pre=this.header),this.tail.next=this.header,this.header.pre=this.tail},t.prototype.popBack=function(){this.tail&&(this.length-=1,this.head===this.tail?(this.head=this.tail=void 0,this.header.next=void 0):(this.tail=this.tail.pre,this.tail&&(this.tail.next=void 0)),this.header.pre=this.tail,this.tail&&(this.tail.next=this.header))},t.prototype.setElementByPos=function(e,t){f(e,0,this.length-1);var n=this.head;while(e--)n=n.next;n.value=t},t.prototype.insert=function(e,t,n){if(void 0===n&&(n=1),f(e,0,this.length),!(n<=0))if(0===e)while(n--)this.pushFront(t);else if(e===this.length)while(n--)this.pushBack(t);else{for(var r=this.head,i=1;i<e;++i)r=r.next;var o=r.next;this.length+=n;while(n--)r.next=new q(t),r.next.pre=r,r=r.next;r.next=o,o&&(o.pre=r)}},t.prototype.find=function(e){if(!this.head)return this.end();var t=this.head;while(t!==this.header){if(t.value===e)return new V(t,this.header);t=t.next}return this.end()},t.prototype.reverse=function(){if(!(this.length<=1)){var e=this.head,t=this.tail,n=0;while(n<<1<this.length){var r=e.value;e.value=t.value,t.value=r,e=e.next,t=t.pre,n+=1}}},t.prototype.unique=function(){if(!(this.length<=1)){var e=this.head;while(e!==this.header){var t=e;while(t.next&&t.value===t.next.value)t=t.next,this.length-=1;e.next=t.next,e.next&&(e.next.pre=e),e=e.next}}},t.prototype.sort=function(e){if(!(this.length<=1)){var t=[];this.forEach((function(e){return t.push(e)})),t.sort(e);var n=this.head;t.forEach((function(e){n.value=e,n=n.next}))}},t.prototype.pushFront=function(e){this.length+=1;var t=new q(e);this.head?(t.next=this.head,this.head.pre=t,this.head=t):(this.head=this.tail=t,this.tail.next=this.header,this.header.pre=this.tail),this.header.next=this.head,this.head.pre=this.header},t.prototype.popFront=function(){this.head&&(this.length-=1,this.head===this.tail?(this.head=this.tail=void 0,this.header.pre=this.tail):(this.head=this.head.next,this.head&&(this.head.pre=this.header)),this.header.next=this.head)},t.prototype.merge=function(e){var t=this;if(this.head){var n=this.head;e.forEach((function(e){while(n&&n!==t.header&&n.value<=e)n=n.next;if(n===t.header)t.pushBack(e),n=t.tail;else if(n===t.head)t.pushFront(e),n=t.head;else{t.length+=1;var r=n.pre;r.next=new q(e),r.next.pre=r,r.next.next=n,n.pre=r.next}}))}else e.forEach((function(e){return t.pushBack(e)}))},t.prototype[Symbol.iterator]=function(){return function(){var e;return U(this,(function(t){switch(t.label){case 0:if(!this.head)return[2];e=this.head,t.label=1;case 1:return e===this.header?[3,3]:[4,e.value];case 2:return t.sent(),e=e.next,[3,1];case 3:return[2]}}))}.bind(this)()},t}(p),W=z,$=function(){function e(e,t){this.color=!0,this.key=void 0,this.value=void 0,this.left=void 0,this.right=void 0,this.parent=void 0,this.key=e,this.value=t}return e.prototype.pre=function(){var t=this;if(t.color===e.RED&&t.parent.parent===t)t=t.right;else if(t.left){t=t.left;while(t.right)t=t.right}else{var n=t.parent;while(n.left===t)t=n,n=t.parent;t=n}return t},e.prototype.next=function(){var e=this;if(e.right){e=e.right;while(e.left)e=e.left}else{var t=e.parent;while(t.right===e)e=t,t=e.parent;e.right!==t&&(e=t)}return e},e.prototype.rotateLeft=function(){var e=this.parent,t=this.right,n=t.left;return e.parent===this?e.parent=t:e.left===this?e.left=t:e.right=t,t.parent=e,t.left=this,this.parent=t,this.right=n,n&&(n.parent=this),t},e.prototype.rotateRight=function(){var e=this.parent,t=this.left,n=t.right;return e.parent===this?e.parent=t:e.left===this?e.left=t:e.right=t,t.parent=e,t.right=this,this.parent=t,this.left=n,n&&(n.parent=this),t},e.prototype.remove=function(){var e=this.parent;this===e.left?e.left=void 0:e.right=void 0},e.RED=!0,e.BLACK=!1,e}(),H=$,K=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s},Y=function(e){function t(t){void 0===t&&(t=function(e,t){return e<t?-1:e>t?1:0});var n=e.call(this)||this;return n.root=void 0,n.header=new H,n.inOrderTraversal=function(e,t){if(void 0===e)return!1;var r=n.inOrderTraversal(e.left,t);return!!r||(!!t(e)||n.inOrderTraversal(e.right,t))},n.cmp=t,n}return K(t,e),t.prototype._lowerBound=function(e,t){var n;while(e){var r=this.cmp(e.key,t);if(r<0)e=e.right;else{if(!(r>0))return e;n=e,e=e.left}}return void 0===n?this.header:n},t.prototype._upperBound=function(e,t){var n;while(e){var r=this.cmp(e.key,t);r<=0?e=e.right:r>0&&(n=e,e=e.left)}return void 0===n?this.header:n},t.prototype._reverseLowerBound=function(e,t){var n;while(e){var r=this.cmp(e.key,t);if(r<0)n=e,e=e.right;else{if(!(r>0))return e;e=e.left}}return void 0===n?this.header:n},t.prototype._reverseUpperBound=function(e,t){var n;while(e){var r=this.cmp(e.key,t);r<0?(n=e,e=e.right):r>=0&&(e=e.left)}return void 0===n?this.header:n},t.prototype.eraseNodeSelfBalance=function(e){while(1){var t=e.parent;if(t===this.header)return;if(e.color===H.RED)return void(e.color=H.BLACK);if(e===t.left){var n=t.right;if(n.color===H.RED)n.color=H.BLACK,t.color=H.RED,t===this.root?this.root=t.rotateLeft():t.rotateLeft();else if(n.color===H.BLACK){if(n.right&&n.right.color===H.RED)return n.color=t.color,t.color=H.BLACK,n.right.color=H.BLACK,void(t===this.root?this.root=t.rotateLeft():t.rotateLeft());n.left&&n.left.color===H.RED?(n.color=H.RED,n.left.color=H.BLACK,n.rotateRight()):(n.color=H.RED,e=t)}}else{n=t.left;if(n.color===H.RED)n.color=H.BLACK,t.color=H.RED,t===this.root?this.root=t.rotateRight():t.rotateRight();else{if(n.left&&n.left.color===H.RED)return n.color=t.color,t.color=H.BLACK,n.left.color=H.BLACK,void(t===this.root?this.root=t.rotateRight():t.rotateRight());n.right&&n.right.color===H.RED?(n.color=H.RED,n.right.color=H.BLACK,n.rotateLeft()):(n.color=H.RED,e=t)}}}},t.prototype.eraseNode=function(e){var t,n;if(1!==this.length){var r=e;while(r.left||r.right){if(r.right){r=r.right;while(r.left)r=r.left}else r.left&&(r=r.left);t=Q([r.key,e.key],2),e.key=t[0],r.key=t[1],n=Q([r.value,e.value],2),e.value=n[0],r.value=n[1],e=r}this.header.left===r?this.header.left=r.parent:this.header.right===r&&(this.header.right=r.parent),this.eraseNodeSelfBalance(r),r.remove(),this.length-=1,this.root.color=H.BLACK}else this.clear()},t.prototype.insertNodeSelfBalance=function(e){while(1){var t=e.parent;if(t.color===H.BLACK)return;var n=t.parent;if(t===n.left){var r=n.right;if(r&&r.color===H.RED){if(r.color=t.color=H.BLACK,n===this.root)return;n.color=H.RED,e=n;continue}if(e===t.right){if(e.color=H.BLACK,e.left&&(e.left.parent=t),e.right&&(e.right.parent=n),t.right=e.left,n.left=e.right,e.left=t,e.right=n,n===this.root)this.root=e,this.header.parent=e;else{var i=n.parent;i.left===n?i.left=e:i.right=e}e.parent=n.parent,t.parent=e,n.parent=e}else t.color=H.BLACK,n===this.root?this.root=n.rotateRight():n.rotateRight();n.color=H.RED}else{r=n.left;if(r&&r.color===H.RED){if(r.color=t.color=H.BLACK,n===this.root)return;n.color=H.RED,e=n;continue}if(e===t.left){if(e.color=H.BLACK,e.left&&(e.left.parent=n),e.right&&(e.right.parent=t),n.right=e.left,t.left=e.right,e.left=n,e.right=t,n===this.root)this.root=e,this.header.parent=e;else{i=n.parent;i.left===n?i.left=e:i.right=e}e.parent=n.parent,t.parent=e,n.parent=e}else t.color=H.BLACK,n===this.root?this.root=n.rotateLeft():n.rotateLeft();n.color=H.RED}return}},t.prototype.findElementNode=function(e,t){while(e){var n=this.cmp(e.key,t);if(n<0)e=e.right;else{if(!(n>0))return e;e=e.left}}return e},t.prototype.set=function(e,t,n){if(void 0===this.root)return this.length+=1,this.root=new H(e,t),this.root.color=H.BLACK,this.root.parent=this.header,this.header.parent=this.root,this.header.left=this.root,void(this.header.right=this.root);var r,i=this.header.left,o=this.cmp(i.key,e);if(0!==o){if(o>0)i.left=new H(e,t),i.left.parent=i,r=i.left,this.header.left=r;else{var s=this.header.right,a=this.cmp(s.key,e);if(0===a)return void(s.value=t);if(a<0)s.right=new H(e,t),s.right.parent=s,r=s.right,this.header.right=r;else{if(void 0!==n){var l=n.node;if(l!==this.header){var c=this.cmp(l.key,e);if(0===c)return void(l.value=t);if(c>0){var u=l.pre(),h=this.cmp(u.key,e);if(0===h)return void(u.value=t);h<0&&(r=new H(e,t),void 0===u.right?(u.right=r,r.parent=u):(l.left=r,r.parent=l))}}}if(void 0===r){r=this.root;while(1){var p=this.cmp(r.key,e);if(p>0){if(void 0===r.left){r.left=new H(e,t),r.left.parent=r,r=r.left;break}r=r.left}else{if(!(p<0))return void(r.value=t);if(void 0===r.right){r.right=new H(e,t),r.right.parent=r,r=r.right;break}r=r.right}}}}}this.length+=1,this.insertNodeSelfBalance(r)}else i.value=t},t.prototype.clear=function(){this.length=0,this.root=void 0,this.header.parent=void 0,this.header.left=this.header.right=void 0},t.prototype.updateKeyByIterator=function(e,t){var n=e.node;if(n===this.header)throw new TypeError("Invalid iterator!");if(1===this.length)return n.key=t,!0;if(n===this.header.left)return this.cmp(n.next().key,t)>0&&(n.key=t,!0);if(n===this.header.right)return this.cmp(n.pre().key,t)<0&&(n.key=t,!0);var r=n.pre().key;if(this.cmp(r,t)>=0)return!1;var i=n.next().key;return!(this.cmp(i,t)<=0)&&(n.key=t,!0)},t.prototype.eraseElementByPos=function(e){var t=this;f(e,0,this.length-1);var n=0;this.inOrderTraversal(this.root,(function(r){return e===n?(t.eraseNode(r),!0):(n+=1,!1)}))},t.prototype.eraseElementByKey=function(e){if(this.length){var t=this.findElementNode(this.root,e);void 0!==t&&this.eraseNode(t)}},t.prototype.eraseElementByIterator=function(e){var t=e.node;if(t===this.header)throw new RangeError("Invalid iterator");return void 0===t.right&&(e=e.next()),this.eraseNode(t),e},t.prototype.getHeight=function(){if(!this.length)return 0;var e=function(t){return t?Math.max(e(t.left),e(t.right))+1:0};return e(this.root)},t}(s),G=Y,J=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Z=function(e){function t(t,n,r){var o=e.call(this,r)||this;return o.node=t,o.header=n,o.iteratorType===i.NORMAL?(o.pre=function(){if(this.node===this.header.left)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.pre(),this},o.next=function(){if(this.node===this.header)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.next(),this}):(o.pre=function(){if(this.node===this.header.right)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.next(),this},o.next=function(){if(this.node===this.header)throw new RangeError("LinkList iterator access denied!");return this.node=this.node.pre(),this}),o}return J(t,e),t.prototype.equals=function(e){return this.node===e.node},t}(i),X=Z,ee=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ne=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ee(t,e),Object.defineProperty(t.prototype,"pointer",{get:function(){if(this.node===this.header)throw new RangeError("OrderedSet iterator access denied!");return this.node.key},enumerable:!1,configurable:!0}),t.prototype.copy=function(){return new t(this.node,this.header,this.iteratorType)},t}(X),ie=function(e){function t(t,n){void 0===t&&(t=[]);var r=e.call(this,n)||this;return r.iterationFunc=function(e){return te(this,(function(t){switch(t.label){case 0:return void 0===e?[2]:[5,ne(this.iterationFunc(e.left))];case 1:return t.sent(),[4,e.key];case 2:return t.sent(),[5,ne(this.iterationFunc(e.right))];case 3:return t.sent(),[2]}}))},t.forEach((function(e){return r.insert(e)})),r.iterationFunc=r.iterationFunc.bind(r),r}return ee(t,e),t.prototype.begin=function(){return new re(this.header.left||this.header,this.header)},t.prototype.end=function(){return new re(this.header,this.header)},t.prototype.rBegin=function(){return new re(this.header.right||this.header,this.header,i.REVERSE)},t.prototype.rEnd=function(){return new re(this.header,this.header,i.REVERSE)},t.prototype.front=function(){return this.header.left?this.header.left.key:void 0},t.prototype.back=function(){return this.header.right?this.header.right.key:void 0},t.prototype.forEach=function(e){var t,n,r=0;try{for(var i=ne(this),o=i.next();!o.done;o=i.next()){var s=o.value;e(s,r++)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.getElementByPos=function(e){var t,n,r;f(e,0,this.length-1);var i=0;try{for(var o=ne(this),s=o.next();!s.done;s=o.next()){var a=s.value;i===e&&(r=a),i+=1}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},t.prototype.insert=function(e,t){this.set(e,void 0,t)},t.prototype.find=function(e){var t=this.findElementNode(this.root,e);return void 0!==t?new re(t,this.header):this.end()},t.prototype.lowerBound=function(e){var t=this._lowerBound(this.root,e);return new re(t,this.header)},t.prototype.upperBound=function(e){var t=this._upperBound(this.root,e);return new re(t,this.header)},t.prototype.reverseLowerBound=function(e){var t=this._reverseLowerBound(this.root,e);return new re(t,this.header)},t.prototype.reverseUpperBound=function(e){var t=this._reverseUpperBound(this.root,e);return new re(t,this.header)},t.prototype.union=function(e){var t=this;e.forEach((function(e){return t.insert(e)}))},t.prototype[Symbol.iterator]=function(){return this.iterationFunc(this.root)},t}(G),oe=ie,se=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ae=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},le=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s},ce=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),Object.defineProperty(t.prototype,"pointer",{get:function(){var e=this;if(this.node===this.header)throw new RangeError("OrderedMap iterator access denied");return new Proxy([],{get:function(t,n){return"0"===n?e.node.key:"1"===n?e.node.value:void 0},set:function(t,n,r){if("1"!==n)throw new TypeError("props must be 1");return e.node.value=r,!0}})},enumerable:!1,configurable:!0}),t.prototype.copy=function(){return new t(this.node,this.header,this.iteratorType)},t}(X),he=function(e){function t(t,n){void 0===t&&(t=[]);var r=e.call(this,n)||this;return r.iterationFunc=function(e){return ae(this,(function(t){switch(t.label){case 0:return void 0===e?[2]:[5,ce(this.iterationFunc(e.left))];case 1:return t.sent(),[4,[e.key,e.value]];case 2:return t.sent(),[5,ce(this.iterationFunc(e.right))];case 3:return t.sent(),[2]}}))},r.iterationFunc=r.iterationFunc.bind(r),t.forEach((function(e){var t=le(e,2),n=t[0],i=t[1];return r.setElement(n,i)})),r}return se(t,e),t.prototype.begin=function(){return new ue(this.header.left||this.header,this.header)},t.prototype.end=function(){return new ue(this.header,this.header)},t.prototype.rBegin=function(){return new ue(this.header.right||this.header,this.header,i.REVERSE)},t.prototype.rEnd=function(){return new ue(this.header,this.header,i.REVERSE)},t.prototype.front=function(){if(this.length){var e=this.header.left;return[e.key,e.value]}},t.prototype.back=function(){if(this.length){var e=this.header.right;return[e.key,e.value]}},t.prototype.forEach=function(e){var t,n,r=0;try{for(var i=ce(this),o=i.next();!o.done;o=i.next()){var s=o.value;e(s,r++)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.lowerBound=function(e){var t=this._lowerBound(this.root,e);return new ue(t,this.header)},t.prototype.upperBound=function(e){var t=this._upperBound(this.root,e);return new ue(t,this.header)},t.prototype.reverseLowerBound=function(e){var t=this._reverseLowerBound(this.root,e);return new ue(t,this.header)},t.prototype.reverseUpperBound=function(e){var t=this._reverseUpperBound(this.root,e);return new ue(t,this.header)},t.prototype.setElement=function(e,t,n){this.set(e,t,n)},t.prototype.find=function(e){var t=this.findElementNode(this.root,e);return void 0!==t?new ue(t,this.header):this.end()},t.prototype.getElementByKey=function(e){var t=this.findElementNode(this.root,e);return t?t.value:void 0},t.prototype.getElementByPos=function(e){var t,n,r;f(e,0,this.length-1);var i=0;try{for(var o=ce(this),s=o.next();!s.done;s=o.next()){var a=s.value;if(i===e){r=a;break}i+=1}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},t.prototype.union=function(e){var t=this;e.forEach((function(e){var n=le(e,2),r=n[0],i=n[1];return t.setElement(r,i)}))},t.prototype[Symbol.iterator]=function(){return this.iterationFunc(this.root)},t}(G),pe=he,fe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),de=function(e){function t(t,n){void 0===t&&(t=16),void 0===n&&(n=function(e){var t;t="string"!==typeof e?JSON.stringify(e):e;for(var n=0,r=t.length,i=0;i<r;i++){var o=t.charCodeAt(i);n=(n<<5)-n+o,n|=0}return n>>>0});var r=e.call(this)||this;if(t<16||0!==(t&t-1))throw new RangeError("InitBucketNum range error");return r.bucketNum=r.initBucketNum=t,r.hashFunc=n,r}return fe(t,e),t.prototype.clear=function(){this.length=0,this.bucketNum=this.initBucketNum,this.hashTable=[]},t.sigma=.75,t.treeifyThreshold=8,t.untreeifyThreshold=6,t.minTreeifySize=64,t.maxBucketNum=1<<30,t}(o),ge=de,me=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},be=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ve=function(e){function t(t,n,r){void 0===t&&(t=[]);var i=e.call(this,n,r)||this;return i.hashTable=[],t.forEach((function(e){return i.insert(e)})),i}return me(t,e),t.prototype.reAllocate=function(){var e=this;if(!(this.bucketNum>=ge.maxBucketNum)){var t=[],n=this.bucketNum;this.bucketNum<<=1;for(var r=Object.keys(this.hashTable),i=r.length,o=function(i){var o=parseInt(r[i]),a=s.hashTable[o],l=a.size();if(0===l)return"continue";if(1===l){var c=a.front();return t[s.hashFunc(c)&s.bucketNum-1]=new j([c],!1),"continue"}var u=[],h=[];a.forEach((function(t){var r=e.hashFunc(t);0===(r&n)?u.push(t):h.push(t)})),a instanceof oe?(u.length>ge.untreeifyThreshold?t[o]=new oe(u):u.length&&(t[o]=new j(u,!1)),h.length>ge.untreeifyThreshold?t[o+n]=new oe(h):h.length&&(t[o+n]=new j(h,!1))):(u.length>=ge.treeifyThreshold?t[o]=new oe(u):u.length&&(t[o]=new j(u,!1)),h.length>=ge.treeifyThreshold?t[o+n]=new oe(h):h.length&&(t[o+n]=new j(h,!1)))},s=this,a=0;a<i;++a)o(a);this.hashTable=t}},t.prototype.forEach=function(e){for(var t=Object.values(this.hashTable),n=t.length,r=0,i=0;i<n;++i)t[i].forEach((function(t){return e(t,r++)}))},t.prototype.insert=function(e){var t=this.hashFunc(e)&this.bucketNum-1,n=this.hashTable[t];if(n){var r=n.size();if(n instanceof j){if(!n.find(e).equals(n.end()))return;if(n.pushBack(e),r+1>=ge.treeifyThreshold){if(this.bucketNum<=ge.minTreeifySize)return this.length+=1,void this.reAllocate();this.hashTable[t]=new oe(n)}this.length+=1}else{n.insert(e);var i=n.size();this.length+=i-r}}else this.hashTable[t]=new j([e],!1),this.length+=1;this.length>this.bucketNum*ge.sigma&&this.reAllocate()},t.prototype.eraseElementByKey=function(e){var t=this.hashFunc(e)&this.bucketNum-1,n=this.hashTable[t];if(n){var r=n.size();if(0!==r)if(n instanceof j){n.eraseElementByValue(e);var i=n.size();this.length+=i-r}else{n.eraseElementByKey(e);i=n.size();this.length+=i-r,i<=ge.untreeifyThreshold&&(this.hashTable[t]=new j(n))}}},t.prototype.find=function(e){var t=this.hashFunc(e)&this.bucketNum-1,n=this.hashTable[t];return!!n&&!n.find(e).equals(n.end())},t.prototype[Symbol.iterator]=function(){return function(){var e,t,n,r,i,o,s,a,l,c;return ye(this,(function(u){switch(u.label){case 0:e=Object.values(this.hashTable),t=e.length,n=0,u.label=1;case 1:if(!(n<t))return[3,10];r=e[n],u.label=2;case 2:u.trys.push([2,7,8,9]),l=void 0,i=be(r),o=i.next(),u.label=3;case 3:return o.done?[3,6]:(s=o.value,[4,s]);case 4:u.sent(),u.label=5;case 5:return o=i.next(),[3,3];case 6:return[3,9];case 7:return a=u.sent(),l={error:a},[3,9];case 8:try{o&&!o.done&&(c=i.return)&&c.call(i)}finally{if(l)throw l.error}return[7];case 9:return++n,[3,1];case 10:return[2]}}))}.bind(this)()},t}(ge),we=ve,_e=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Ce=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ee=function(e){function t(t,n,r){void 0===t&&(t=[]);var i=e.call(this,n,r)||this;return i.hashTable=[],t.forEach((function(e){return i.setElement(e[0],e[1])})),i}return _e(t,e),t.prototype.reAllocate=function(){var e=this;if(!(this.bucketNum>=ge.maxBucketNum)){var t=[],n=this.bucketNum;this.bucketNum<<=1;for(var r=Object.keys(this.hashTable),i=r.length,o=function(i){var o=parseInt(r[i]),a=s.hashTable[o],l=a.size();if(0===l)return"continue";if(1===l){var c=a.front();return t[s.hashFunc(c[0])&s.bucketNum-1]=new j([c],!1),"continue"}var u=[],h=[];a.forEach((function(t){var r=e.hashFunc(t[0]);0===(r&n)?u.push(t):h.push(t)})),a instanceof pe?(u.length>ge.untreeifyThreshold?t[o]=new pe(u):u.length&&(t[o]=new j(u,!1)),h.length>ge.untreeifyThreshold?t[o+n]=new pe(h):h.length&&(t[o+n]=new j(h,!1))):(u.length>=ge.treeifyThreshold?t[o]=new pe(u):u.length&&(t[o]=new j(u,!1)),h.length>=ge.treeifyThreshold?t[o+n]=new pe(h):h.length&&(t[o+n]=new j(h,!1)))},s=this,a=0;a<i;++a)o(a);this.hashTable=t}},t.prototype.forEach=function(e){for(var t=Object.values(this.hashTable),n=t.length,r=0,i=0;i<n;++i)t[i].forEach((function(t){return e(t,r++)}))},t.prototype.setElement=function(e,n){var r,i,o=this.hashFunc(e)&this.bucketNum-1,s=this.hashTable[o];if(s){var a=s.size();if(s instanceof j){try{for(var l=Ce(s),c=l.next();!c.done;c=l.next()){var u=c.value;if(u[0]===e)return void(u[1]=n)}}catch(p){r={error:p}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}if(s.pushBack([e,n]),a+1>=t.treeifyThreshold){if(this.bucketNum<=t.minTreeifySize)return this.length+=1,void this.reAllocate();this.hashTable[o]=new pe(this.hashTable[o])}this.length+=1}else{s.setElement(e,n);var h=s.size();this.length+=h-a}}else this.length+=1,this.hashTable[o]=new j([[e,n]],!1);this.length>this.bucketNum*t.sigma&&this.reAllocate()},t.prototype.getElementByKey=function(e){var t,n,r=this.hashFunc(e)&this.bucketNum-1,i=this.hashTable[r];if(i){if(i instanceof pe)return i.getElementByKey(e);try{for(var o=Ce(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(a[0]===e)return a[1]}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}},t.prototype.eraseElementByKey=function(e){var t,n,r=this.hashFunc(e)&this.bucketNum-1,i=this.hashTable[r];if(i)if(i instanceof j){var o=0;try{for(var s=Ce(i),a=s.next();!a.done;a=s.next()){var l=a.value;if(l[0]===e)return i.eraseElementByPos(o),void(this.length-=1);o+=1}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}else{var c=i.size();i.eraseElementByKey(e);var u=i.size();this.length+=u-c,u<=ge.untreeifyThreshold&&(this.hashTable[r]=new j(i))}},t.prototype.find=function(e){var t,n,r=this.hashFunc(e)&this.bucketNum-1,i=this.hashTable[r];if(!i)return!1;if(i instanceof pe)return!i.find(e).equals(i.end());try{for(var o=Ce(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(a[0]===e)return!0}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!1},t.prototype[Symbol.iterator]=function(){return function(){var e,t,n,r,i,o,s,a,l,c;return Se(this,(function(u){switch(u.label){case 0:e=Object.values(this.hashTable),t=e.length,n=0,u.label=1;case 1:if(!(n<t))return[3,10];r=e[n],u.label=2;case 2:u.trys.push([2,7,8,9]),l=void 0,i=Ce(r),o=i.next(),u.label=3;case 3:return o.done?[3,6]:(s=o.value,[4,s]);case 4:u.sent(),u.label=5;case 5:return o=i.next(),[3,3];case 6:return[3,9];case 7:return a=u.sent(),l={error:a},[3,9];case 8:try{o&&!o.done&&(c=i.return)&&c.call(i)}finally{if(l)throw l.error}return[7];case 9:return++n,[3,1];case 10:return[2]}}))}.bind(this)()},t}(ge),ke=Ee},"3ed2":function(e,t,n){"use strict";var r=n("cfda"),i=n.n(r);i.a},"3fb5":function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},4:function(e,t){},4311:function(e,t,n){},"454e":function(e,t,n){function r(e){function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){let t,n,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(t||i);n.diff=o,n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),"string"!==typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if("%%"===t)return"%";s++;const o=r.formatters[i];if("function"===typeof o){const r=e[s];t=o.call(n,r),e.splice(s,1),s--}return t}),r.formatArgs.call(n,e);const l=n.log||r.log;l.apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=i,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(n!==r.namespaces&&(n=r.namespaces,o=r.enabled(e)),o),set:e=>{s=e}}),"function"===typeof r.init&&r.init(a),a}function i(e,t){const n=r(this.namespace+("undefined"===typeof t?":":t)+e);return n.log=this.log,n}function o(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"===typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){const e=[...r.names.map(l),...r.skips.map(l).map(e=>"-"+e)].join(",");return r.enable(""),e}function a(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function c(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=n("5679"),r.destroy=u,Object.keys(e).forEach(t=>{r[t]=e[t]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},"4d84":function(e,t,n){"use strict";const r=n("3d67").OrderedSet,i=n("687e")("number-allocator:trace"),o=n("687e")("number-allocator:error");function s(e,t){this.low=e,this.high=t}function a(e,t){if(!(this instanceof a))return new a(e,t);this.min=e,this.max=t,this.ss=new r([],(e,t)=>e.compare(t)),i("Create"),this.clear()}s.prototype.equals=function(e){return this.low===e.low&&this.high===e.high},s.prototype.compare=function(e){return this.low<e.low&&this.high<e.low?-1:e.low<this.low&&e.high<this.low?1:0},a.prototype.firstVacant=function(){return 0===this.ss.size()?null:this.ss.front().low},a.prototype.alloc=function(){if(0===this.ss.size())return i("alloc():empty"),null;const e=this.ss.begin(),t=e.pointer.low,n=e.pointer.high,r=t;return r+1<=n?this.ss.updateKeyByIterator(e,new s(t+1,n)):this.ss.eraseElementByPos(0),i("alloc():"+r),r},a.prototype.use=function(e){const t=new s(e,e),n=this.ss.lowerBound(t);if(!n.equals(this.ss.end())){const r=n.pointer.low,o=n.pointer.high;return n.pointer.equals(t)?(this.ss.eraseElementByIterator(n),i("use():"+e),!0):!(r>e)&&(r===e?(this.ss.updateKeyByIterator(n,new s(r+1,o)),i("use():"+e),!0):o===e?(this.ss.updateKeyByIterator(n,new s(r,o-1)),i("use():"+e),!0):(this.ss.updateKeyByIterator(n,new s(e+1,o)),this.ss.insert(new s(r,e-1)),i("use():"+e),!0))}return i("use():failed"),!1},a.prototype.free=function(e){if(e<this.min||e>this.max)return void o("free():"+e+" is out of range");const t=new s(e,e),n=this.ss.upperBound(t);if(n.equals(this.ss.end())){if(n.equals(this.ss.begin()))return void this.ss.insert(t);n.pre();const r=n.pointer.high,i=n.pointer.high;i+1===e?this.ss.updateKeyByIterator(n,new s(r,e)):this.ss.insert(t)}else if(n.equals(this.ss.begin()))if(e+1===n.pointer.low){const e=n.pointer.high-1,t=n.pointer.high;this.ss.updateKeyByIterator(n,new s(e,t))}else this.ss.insert(t);else{const r=n.pointer.low,i=n.pointer.high;n.pre();const o=n.pointer.low,a=n.pointer.high;if(a+1===e)if(e+1===r){this.ss.eraseElementByIterator(n);const e=n.pointer.high;this.ss.updateKeyByIterator(n,new s(o,e))}else this.ss.updateKeyByIterator(n,new s(o,e));else e+1===r?(this.ss.eraseElementByIterator(n.next()),this.ss.insert(new s(e,i))):this.ss.insert(t)}i("free():"+e)},a.prototype.clear=function(){i("clear()"),this.ss.clear(),this.ss.insert(new s(this.min,this.max))},a.prototype.intervalCount=function(){return this.ss.size()},a.prototype.dump=function(){console.log("length:"+this.ss.size());for(const e of this.ss)console.log(e)},e.exports=a},5:function(e,t){},"51e9":function(e,t,n){"use strict";const r=n("f214").Duplex,i=n("3fb5"),o=n("33013");function s(e){if(!(this instanceof s))return new s(e);if("function"===typeof e){this._callback=e;const t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)})),e=null}o._init.call(this,e),r.call(this)}i(s,r),Object.assign(s.prototype,o.prototype),s.prototype._new=function(e){return new s(e)},s.prototype._write=function(e,t,n){this._appendBuffer(e),"function"===typeof n&&n()},s.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},s.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},s.prototype._isBufferList=function(e){return e instanceof s||e instanceof o||s.isBufferList(e)},s.isBufferList=o.isBufferList,e.exports=s,e.exports.BufferListStream=s,e.exports.BufferList=o},"53a8":function(e,t){e.exports=r;var n=Object.prototype.hasOwnProperty;function r(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e}},"555e":function(e,t,n){function r(e){function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){let t,n,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(t||i);n.diff=o,n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),"string"!==typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if("%%"===t)return"%";s++;const o=r.formatters[i];if("function"===typeof o){const r=e[s];t=o.call(n,r),e.splice(s,1),s--}return t}),r.formatArgs.call(n,e);const l=n.log||r.log;l.apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=i,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(n!==r.namespaces&&(n=r.namespaces,o=r.enabled(e)),o),set:e=>{s=e}}),"function"===typeof r.init&&r.init(a),a}function i(e,t){const n=r(this.namespace+("undefined"===typeof t?":":t)+e);return n.log=this.log,n}function o(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"===typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){const e=[...r.names.map(l),...r.skips.map(l).map(e=>"-"+e)].join(",");return r.enable(""),e}function a(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function c(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=n("29aa"),r.destroy=u,Object.keys(e).forEach(t=>{r[t]=e[t]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},"566b":function(e,t,n){var r=n("d633");function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},5679:function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=7*o,a=365.25*o;function l(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]),c=(t[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return l*a;case"weeks":case"week":case"w":return l*s;case"days":case"day":case"d":return l*o;case"hours":case"hour":case"hrs":case"hr":case"h":return l*i;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function c(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+"d":t>=i?Math.round(e/i)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}function u(e){var t=Math.abs(e);return t>=o?h(e,t,o,"day"):t>=i?h(e,t,i,"hour"):t>=r?h(e,t,r,"minute"):t>=n?h(e,t,n,"second"):e+" ms"}function h(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return l(e);if("number"===n&&isFinite(e))return t.long?u(e):c(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},"56ac":function(e,t,n){(function(t,r){var i=n("035d"),o=n("ab52"),s=n("3fb5"),a=n("f9c1"),l=t.from&&t.from!==Uint8Array.from?t.from([0]):new t([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},u=function(e,t){e._autoDestroy&&e.destroy(t)},h=function(e,t){return function(n){n?u(e,"premature close"===n.message?null:n):t&&!e._ended&&e.end()}},p=function(e,t){return e?e._writableState&&e._writableState.finished?t():e._writableState?e.end(t):(e.end(),void t()):t()},f=function(){},d=function(e){return new i.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},g=function(e,t,n){if(!(this instanceof g))return new g(e,t,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};s(g,i.Duplex),g.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new g(e,t,n)},g.prototype.cork=function(){1===++this._corked&&this.emit("cork")},g.prototype.uncork=function(){this._corked&&0===--this._corked&&this.emit("uncork")},g.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,n=o(e,{writable:!0,readable:!1},h(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()},s=function(){t._writable.removeListener("drain",i),n()};this._unwrite&&r.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=s,this.uncork()}else this.end()},g.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t=this,n=o(e,{writable:!1,readable:!0},h(this)),r=function(){t._forward()},i=function(){t.push(null)},s=function(){t._readable2.removeListener("readable",r),t._readable2.removeListener("end",i),n()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:d(e),this._readable2.on("readable",r),this._readable2.on("end",i),this._unread=s,this._forward()}},g.prototype._read=function(){this._drained=!0,this._forward()},g.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;this._forwarding=!0;while(this._drained&&null!==(e=a(this._readable2)))this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},g.prototype.destroy=function(e,t){if(t||(t=f),this.destroyed)return t(null);this.destroyed=!0;var n=this;r.nextTick((function(){n._destroy(e),t(null)}))},g.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},g.prototype._write=function(e,t,n){if(!this.destroyed)return this._corked?c(this,this._write.bind(this,e,t,n)):e===l?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:this.destroyed||n()):n()},g.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,(function(){p(t._forwardEnd&&t._writable,(function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)}))}))},g.prototype.end=function(e,t,n){return"function"===typeof e?this.end(null,null,e):"function"===typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this._writableState.destroyed||this.write(l),i.Writable.prototype.end.call(this,n))},e.exports=g}).call(this,n("b639").Buffer,n("f28c"))},6:function(e,t){},6155:function(e,t,n){const r=n("4d84");e.exports.NumberAllocator=r},"62e4":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"63f0":function(e,t,n){"use strict";const r=n("2fae"),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),h=Symbol("lruList"),p=Symbol("cache"),f=Symbol("updateAgeOnGet"),d=()=>1;class g{constructor(e){if("number"===typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!==typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||d;if(this[s]="function"!==typeof t?d:t,this[a]=e.stale||!1,e.maxAge&&"number"!==typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!==typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!==typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!==typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[o]=0,this[h].forEach(e=>{e.length=this[s](e.value,e.key),this[o]+=e.length})),b(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let n=this[h].tail;null!==n;){const r=n.prev;_(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[h].head;null!==n;){const r=n.next;_(this,e,n,t),n=r}}keys(){return this[h].toArray().map(e=>e.key)}values(){return this[h].toArray().map(e=>e.value)}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach(e=>this[c](e.key,e.value)),this[p]=new Map,this[h]=new r,this[o]=0}dump(){return this[h].map(e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[h]}set(e,t,n){if(n=n||this[l],n&&"number"!==typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[i])return v(this,this[p].get(e)),!1;const s=this[p].get(e),l=s.value;return this[c]&&(this[u]||this[c](e,l.value)),l.now=r,l.maxAge=n,l.value=t,this[o]+=a-l.length,l.length=a,this.get(e),b(this),!0}const f=new w(e,t,a,r,n);return f.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=f.length,this[h].unshift(f),this[p].set(e,this[h].head),b(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!y(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[h].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach((e,t)=>m(this,t,!1))}}const m=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(y(e,t)){if(v(e,r),!e[a])return}else n&&(e[f]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[i])for(let t=e[h].tail;e[o]>e[i]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[p].delete(n.key),e[h].removeNode(t)}};class w{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const _=(e,t,n,r)=>{let i=n.value;y(e,i)&&(v(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=g},6447:function(e,t,n){"use strict";var r=n("b68e"),i=n.n(r);i.a},"652a":function(e,t,n){"use strict";var r;function i(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var o=n("fbd7").codes,s=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function l(e){if(e)throw e}function c(e){return e.setHeader&&"function"===typeof e.abort}function u(e,t,o,s){s=i(s);var l=!1;e.on("close",(function(){l=!0})),void 0===r&&(r=n("d9e1")),r(e,{readable:t,writable:o},(function(e){if(e)return s(e);l=!0,s()}));var u=!1;return function(t){if(!l&&!u)return u=!0,c(e)?e.abort():"function"===typeof e.destroy?e.destroy():void s(t||new a("pipe"))}}function h(e){e()}function p(e,t){return e.pipe(t)}function f(e){return e.length?"function"!==typeof e[e.length-1]?l:e.pop():l}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=f(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1,a=n>0;return u(e,s,a,(function(e){r||(r=e),e&&o.forEach(h),s||(o.forEach(h),i(r))}))}));return t.reduce(p)}e.exports=d},6846:function(e,t,n){},"687e":function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}function s(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}}function a(){let e;try{e=t.storage.getItem("debug")}catch(n){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",BASE_URL:"/"}).DEBUG),e}function l(){try{return localStorage}catch(e){}}t.formatArgs=o,t.save=s,t.load=a,t.useColors=i,t.storage=l(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n("c15d")(t);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n("f28c"))},"6c8c":function(e,t,n){},7058:function(e,t,n){"use strict";e.exports=i;var r=n("3ca2");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n("3fb5")(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},7135:function(e,t,n){(function(t){const r=n("b289"),i=t.allocUnsafe(0),o=t.from([0]),s=n("f0cb"),a=n("966d").nextTick,l=n("e4fc")("mqtt-packet:writeToStream"),c=s.cache,u=s.generateNumber,h=s.generateCache,p=s.genBufVariableByteInt,f=s.generate4ByteBuffer;let d=F,g=!0;function m(e,t,n){switch(l("generate called"),t.cork&&(t.cork(),a(y,t)),g&&(g=!1,h()),l("generate: packet.cmd: %s",e.cmd),e.cmd){case"connect":return b(e,t,n);case"connack":return v(e,t,n);case"publish":return w(e,t,n);case"puback":case"pubrec":case"pubrel":case"pubcomp":return _(e,t,n);case"subscribe":return S(e,t,n);case"suback":return C(e,t,n);case"unsubscribe":return E(e,t,n);case"unsuback":return k(e,t,n);case"pingreq":case"pingresp":return T(e,t,n);case"disconnect":return x(e,t,n);case"auth":return A(e,t,n);default:return t.emit("error",new Error("Unknown command")),!1}}function y(e){e.uncork()}function b(e,n,i){const o=e||{},s=o.protocolId||"MQTT";let a=o.protocolVersion||4;const l=o.will;let c=o.clean;const u=o.keepalive||0,h=o.clientId||"",p=o.username,f=o.password,g=o.properties;void 0===c&&(c=!0);let m=0;if(!s||"string"!==typeof s&&!t.isBuffer(s))return n.emit("error",new Error("Invalid protocolId")),!1;if(m+=s.length+2,3!==a&&4!==a&&5!==a)return n.emit("error",new Error("Invalid protocol version")),!1;if(m+=1,("string"===typeof h||t.isBuffer(h))&&(h||a>=4)&&(h||c))m+=t.byteLength(h)+2;else{if(a<4)return n.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*c===0)return n.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!==typeof u||u<0||u>65535||u%1!==0)return n.emit("error",new Error("Invalid keepalive")),!1;if(m+=2,m+=1,5===a){var y=N(n,g);if(!y)return!1;m+=y.length}if(l){if("object"!==typeof l)return n.emit("error",new Error("Invalid will")),!1;if(!l.topic||"string"!==typeof l.topic)return n.emit("error",new Error("Invalid will topic")),!1;if(m+=t.byteLength(l.topic)+2,m+=2,l.payload){if(!(l.payload.length>=0))return n.emit("error",new Error("Invalid will payload")),!1;"string"===typeof l.payload?m+=t.byteLength(l.payload):m+=l.payload.length}var b={};if(5===a){if(b=N(n,l.properties),!b)return!1;m+=b.length}}let v=!1;if(null!=p){if(!V(p))return n.emit("error",new Error("Invalid username")),!1;v=!0,m+=t.byteLength(p)+2}if(null!=f){if(!v)return n.emit("error",new Error("Username is required to use password")),!1;if(!V(f))return n.emit("error",new Error("Invalid password")),!1;m+=q(f)+2}n.write(r.CONNECT_HEADER),R(n,m),L(n,s),o.bridgeMode&&(a+=128),n.write(131===a?r.VERSION131:132===a?r.VERSION132:4===a?r.VERSION4:5===a?r.VERSION5:r.VERSION3);let w=0;return w|=null!=p?r.USERNAME_MASK:0,w|=null!=f?r.PASSWORD_MASK:0,w|=l&&l.retain?r.WILL_RETAIN_MASK:0,w|=l&&l.qos?l.qos<<r.WILL_QOS_SHIFT:0,w|=l?r.WILL_FLAG_MASK:0,w|=c?r.CLEAN_SESSION_MASK:0,n.write(t.from([w])),d(n,u),5===a&&y.write(),L(n,h),l&&(5===a&&b.write(),O(n,l.topic),L(n,l.payload)),null!=p&&L(n,p),null!=f&&L(n,f),!0}function v(e,n,i){const s=i?i.protocolVersion:4,a=e||{},l=5===s?a.reasonCode:a.returnCode,c=a.properties;let u=2;if("number"!==typeof l)return n.emit("error",new Error("Invalid return code")),!1;let h=null;if(5===s){if(h=N(n,c),!h)return!1;u+=h.length}return n.write(r.CONNACK_HEADER),R(n,u),n.write(a.sessionPresent?r.SESSIONPRESENT_HEADER:o),n.write(t.from([l])),null!=h&&h.write(),!0}function w(e,n,o){l("publish: packet: %o",e);const s=o?o.protocolVersion:4,a=e||{},c=a.qos||0,u=a.retain?r.RETAIN_MASK:0,h=a.topic,p=a.payload||i,f=a.messageId,g=a.properties;let m=0;if("string"===typeof h)m+=t.byteLength(h)+2;else{if(!t.isBuffer(h))return n.emit("error",new Error("Invalid topic")),!1;m+=h.length+2}if(t.isBuffer(p)?m+=p.length:m+=t.byteLength(p),c&&"number"!==typeof f)return n.emit("error",new Error("Invalid messageId")),!1;c&&(m+=2);let y=null;if(5===s){if(y=N(n,g),!y)return!1;m+=y.length}return n.write(r.PUBLISH_HEADER[c][a.dup?1:0][u?1:0]),R(n,m),d(n,q(h)),n.write(h),c>0&&d(n,f),null!=y&&y.write(),l("publish: payload: %o",p),n.write(p)}function _(e,n,i){const o=i?i.protocolVersion:4,s=e||{},a=s.cmd||"puback",l=s.messageId,c=s.dup&&"pubrel"===a?r.DUP_MASK:0;let u=0;const h=s.reasonCode,p=s.properties;let f=5===o?3:2;if("pubrel"===a&&(u=1),"number"!==typeof l)return n.emit("error",new Error("Invalid messageId")),!1;let g=null;if(5===o&&"object"===typeof p){if(g=j(n,p,i,f),!g)return!1;f+=g.length}return n.write(r.ACKS[a][u][c][0]),R(n,f),d(n,l),5===o&&n.write(t.from([h])),null!==g&&g.write(),!0}function S(e,n,i){l("subscribe: packet: ");const o=i?i.protocolVersion:4,s=e||{},a=s.dup?r.DUP_MASK:0,c=s.messageId,u=s.subscriptions,h=s.properties;let p=0;if("number"!==typeof c)return n.emit("error",new Error("Invalid messageId")),!1;p+=2;let f=null;if(5===o){if(f=N(n,h),!f)return!1;p+=f.length}if("object"!==typeof u||!u.length)return n.emit("error",new Error("Invalid subscriptions")),!1;for(let r=0;r<u.length;r+=1){const e=u[r].topic,i=u[r].qos;if("string"!==typeof e)return n.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if("number"!==typeof i)return n.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(5===o){const e=u[r].nl||!1;if("boolean"!==typeof e)return n.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;const t=u[r].rap||!1;if("boolean"!==typeof t)return n.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const i=u[r].rh||0;if("number"!==typeof i||i>2)return n.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}p+=t.byteLength(e)+2+1}l("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),n.write(r.SUBSCRIBE_HEADER[1][a?1:0][0]),R(n,p),d(n,c),null!==f&&f.write();let g=!0;for(const l of u){const e=l.topic,i=l.qos,s=+l.nl,a=+l.rap,c=l.rh;let u;O(n,e),u=r.SUBSCRIBE_OPTIONS_QOS[i],5===o&&(u|=s?r.SUBSCRIBE_OPTIONS_NL:0,u|=a?r.SUBSCRIBE_OPTIONS_RAP:0,u|=c?r.SUBSCRIBE_OPTIONS_RH[c]:0),g=n.write(t.from([u]))}return g}function C(e,n,i){const o=i?i.protocolVersion:4,s=e||{},a=s.messageId,l=s.granted,c=s.properties;let u=0;if("number"!==typeof a)return n.emit("error",new Error("Invalid messageId")),!1;if(u+=2,"object"!==typeof l||!l.length)return n.emit("error",new Error("Invalid qos vector")),!1;for(let t=0;t<l.length;t+=1){if("number"!==typeof l[t])return n.emit("error",new Error("Invalid qos vector")),!1;u+=1}let h=null;if(5===o){if(h=j(n,c,i,u),!h)return!1;u+=h.length}return n.write(r.SUBACK_HEADER),R(n,u),d(n,a),null!==h&&h.write(),n.write(t.from(l))}function E(e,n,i){const o=i?i.protocolVersion:4,s=e||{},a=s.messageId,l=s.dup?r.DUP_MASK:0,c=s.unsubscriptions,u=s.properties;let h=0;if("number"!==typeof a)return n.emit("error",new Error("Invalid messageId")),!1;if(h+=2,"object"!==typeof c||!c.length)return n.emit("error",new Error("Invalid unsubscriptions")),!1;for(let r=0;r<c.length;r+=1){if("string"!==typeof c[r])return n.emit("error",new Error("Invalid unsubscriptions")),!1;h+=t.byteLength(c[r])+2}let p=null;if(5===o){if(p=N(n,u),!p)return!1;h+=p.length}n.write(r.UNSUBSCRIBE_HEADER[1][l?1:0][0]),R(n,h),d(n,a),null!==p&&p.write();let f=!0;for(let t=0;t<c.length;t++)f=O(n,c[t]);return f}function k(e,n,i){const o=i?i.protocolVersion:4,s=e||{},a=s.messageId,l=s.dup?r.DUP_MASK:0,c=s.granted,u=s.properties,h=s.cmd,p=0;let f=2;if("number"!==typeof a)return n.emit("error",new Error("Invalid messageId")),!1;if(5===o){if("object"!==typeof c||!c.length)return n.emit("error",new Error("Invalid qos vector")),!1;for(let e=0;e<c.length;e+=1){if("number"!==typeof c[e])return n.emit("error",new Error("Invalid qos vector")),!1;f+=1}}let g=null;if(5===o){if(g=j(n,u,i,f),!g)return!1;f+=g.length}return n.write(r.ACKS[h][p][l][0]),R(n,f),d(n,a),null!==g&&g.write(),5===o&&n.write(t.from(c)),!0}function T(e,t,n){return t.write(r.EMPTY[e.cmd])}function x(e,n,i){const o=i?i.protocolVersion:4,s=e||{},a=s.reasonCode,l=s.properties;let c=5===o?1:0,u=null;if(5===o){if(u=j(n,l,i,c),!u)return!1;c+=u.length}return n.write(t.from([r.codes.disconnect<<4])),R(n,c),5===o&&n.write(t.from([a])),null!==u&&u.write(),!0}function A(e,n,i){const o=i?i.protocolVersion:4,s=e||{},a=s.reasonCode,l=s.properties;let c=5===o?1:0;5!==o&&n.emit("error",new Error("Invalid mqtt version for auth packet"));const u=j(n,l,i,c);return!!u&&(c+=u.length,n.write(t.from([r.codes.auth<<4])),R(n,c),n.write(t.from([a])),null!==u&&u.write(),!0)}Object.defineProperty(m,"cacheNumbers",{get(){return d===F},set(e){e?(c&&0!==Object.keys(c).length||(g=!0),d=F):(g=!1,d=B)}});const I={};function R(e,t){if(t>r.VARBYTEINT_MAX)return e.emit("error",new Error("Invalid variable byte integer: "+t)),!1;let n=I[t];return n||(n=p(t),t<16384&&(I[t]=n)),l("writeVarByteInt: writing to stream: %o",n),e.write(n)}function O(e,n){const r=t.byteLength(n);return d(e,r),l("writeString: %s",n),e.write(n,"utf8")}function P(e,t,n){O(e,t),O(e,n)}function F(e,t){return l("writeNumberCached: number: %d",t),l("writeNumberCached: %o",c[t]),e.write(c[t])}function B(e,t){const n=u(t);return l("writeNumberGenerated: %o",n),e.write(n)}function M(e,t){const n=f(t);return l("write4ByteNumber: %o",n),e.write(n)}function L(e,t){"string"===typeof t?O(e,t):t?(d(e,t.length),e.write(t)):d(e,0)}function N(e,n){if("object"!==typeof n||null!=n.length)return{length:1,write(){U(e,{},0)}};let i=0;function o(n,i){const o=r.propertiesTypes[n];let s=0;switch(o){case"byte":if("boolean"!==typeof i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=2;break;case"int8":if("number"!==typeof i||i<0||i>255)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=2;break;case"binary":if(i&&null===i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=1+t.byteLength(i)+2;break;case"int16":if("number"!==typeof i||i<0||i>65535)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=3;break;case"int32":if("number"!==typeof i||i<0||i>4294967295)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=5;break;case"var":if("number"!==typeof i||i<0||i>268435455)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=1+t.byteLength(p(i));break;case"string":if("string"!==typeof i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=3+t.byteLength(i.toString());break;case"pair":if("object"!==typeof i)return e.emit("error",new Error(`Invalid ${n}: ${i}`)),!1;s+=Object.getOwnPropertyNames(i).reduce((e,n)=>{const r=i[n];return Array.isArray(r)?e+=r.reduce((e,r)=>(e+=3+t.byteLength(n.toString())+2+t.byteLength(r.toString()),e),0):e+=3+t.byteLength(n.toString())+2+t.byteLength(i[n].toString()),e},0);break;default:return e.emit("error",new Error(`Invalid property ${n}: ${i}`)),!1}return s}if(n)for(const t in n){let e=0,r=0;const s=n[t];if(Array.isArray(s))for(let n=0;n<s.length;n++){if(r=o(t,s[n]),!r)return!1;e+=r}else{if(r=o(t,s),!r)return!1;e=r}if(!e)return!1;i+=e}const s=t.byteLength(p(i));return{length:s+i,write(){U(e,n,i)}}}function j(e,t,n,r){const i=["reasonString","userProperties"],o=n&&n.properties&&n.properties.maximumPacketSize?n.properties.maximumPacketSize:0;let s=N(e,t);if(o)while(r+s.length>o){const n=i.shift();if(!n||!t[n])return!1;delete t[n],s=N(e,t)}return s}function D(e,n,i){const o=r.propertiesTypes[n];switch(o){case"byte":e.write(t.from([r.properties[n]])),e.write(t.from([+i]));break;case"int8":e.write(t.from([r.properties[n]])),e.write(t.from([i]));break;case"binary":e.write(t.from([r.properties[n]])),L(e,i);break;case"int16":e.write(t.from([r.properties[n]])),d(e,i);break;case"int32":e.write(t.from([r.properties[n]])),M(e,i);break;case"var":e.write(t.from([r.properties[n]])),R(e,i);break;case"string":e.write(t.from([r.properties[n]])),O(e,i);break;case"pair":Object.getOwnPropertyNames(i).forEach(o=>{const s=i[o];Array.isArray(s)?s.forEach(i=>{e.write(t.from([r.properties[n]])),P(e,o.toString(),i.toString())}):(e.write(t.from([r.properties[n]])),P(e,o.toString(),s.toString()))});break;default:return e.emit("error",new Error(`Invalid property ${n} value: ${i}`)),!1}}function U(e,t,n){R(e,n);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&null!==t[r]){const n=t[r];if(Array.isArray(n))for(let t=0;t<n.length;t++)D(e,r,n[t]);else D(e,r,n)}}function q(e){return e?e instanceof t?e.length:t.byteLength(e):0}function V(e){return"string"===typeof e||e instanceof t}e.exports=m}).call(this,n("b639").Buffer)},"728f":function(e,t,n){},"77ff":function(e,t,n){},"782c":function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n("bf09"),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function f(e,t){return{value:e,done:t}}function d(e){var t=e[s];if(null!==t){var n=e[p].read();null!==n&&(e[u]=null,e[s]=null,e[a]=null,t(f(n,!1)))}}function g(e){t.nextTick(d,e)}function m(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[h](n,r)}),r)}}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((r={get stream(){return this[p]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[p].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(m(i,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[u]=r,r}},i(r,Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[p].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),y),v=function(e){var t,n=Object.create(b,(t={},i(t,p,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[p].read();r?(n[u]=null,n[s]=null,n[a]=null,e(f(r,!1))):(n[s]=e,n[a]=t)},writable:!0}),t));return n[u]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[u]=null,n[s]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[s];null!==r&&(n[u]=null,n[s]=null,n[a]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",g.bind(null,n)),n};e.exports=v}).call(this,n("f28c"))},"792c":function(e,t,n){"use strict";var r=n("17e3"),i=n.n(r);i.a},"7d72":function(e,t,n){"use strict";var r=n("8707").Buffer,i=r.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){if(!e)return"utf8";var t;while(1)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function s(e){var t=o(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){var t;switch(this.encoding=s(e),this.encoding){case"utf16le":this.text=d,this.end=g,t=4;break;case"utf8":this.fillLast=h,t=4;break;case"base64":this.text=m,this.end=y,t=3;break;default:return this.write=b,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function l(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function c(e,t,n){var r=t.length-1;if(r<n)return 0;var i=l(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=l(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=l(t[r]),i>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"<22>"}}function h(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function p(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t}function d(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function m(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=f,a.prototype.text=p,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},"7f0f":function(e,t,n){(function(t){const r=n("7135"),i=n("faa1");function o(e,t){const n=new s;return r(e,n,t),n.concat()}class s extends i{constructor(){super(),this._array=new Array(20),this._i=0}write(e){return this._array[this._i++]=e,!0}concat(){let e=0;const n=new Array(this._array.length),r=this._array;let i,o=0;for(i=0;i<r.length&&void 0!==r[i];i++)"string"!==typeof r[i]?n[i]=r[i].length:n[i]=t.byteLength(r[i]),e+=n[i];const s=t.allocUnsafe(e);for(i=0;i<r.length&&void 0!==r[i];i++)"string"!==typeof r[i]?(r[i].copy(s,o),o+=n[i]):(s.write(r[i],o),o+=n[i]);return s}}e.exports=o}).call(this,n("b639").Buffer)},8050:function(e,t,n){},"810a":function(e,t,n){"use strict";var r=n("77ff"),i=n.n(r);i.a},8311:function(e,t,n){"use strict";const{Buffer:r}=n("b639"),i=n("035d").Transform,o=n("56ac");let s,a,l;function c(){const e=new i;return e._write=function(e,t,n){s.send({data:e.buffer,success:function(){n()},fail:function(e){n(new Error(e))}})},e._flush=function(e){s.close({success:function(){e()}})},e}function u(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}function h(e,t){const n="wxs"===e.protocol?"wss":"ws";let r=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(r=n+"://"+e.hostname+":"+e.port+e.path),"function"===typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}function p(){s.onOpen((function(){l.setReadable(a),l.setWritable(a),l.emit("connect")})),s.onMessage((function(e){let t=e.data;t=t instanceof ArrayBuffer?r.from(t):r.from(t,"utf8"),a.push(t)})),s.onClose((function(){l.end(),l.destroy()})),s.onError((function(e){l.destroy(new Error(e.errMsg))}))}function f(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");const n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";u(t);const r=h(t,e);s=wx.connectSocket({url:r,protocols:[n]}),a=c(),l=o.obj(),l._destroy=function(e,t){s.close({success:function(){t&&t(e)}})};const i=l.destroy;return l.destroy=function(){l.destroy=i;const e=this;setTimeout((function(){s.close({fail:function(){e._destroy(new Error)}})}),0)}.bind(l),p(),l}e.exports=f},8426:function(e,t,n){},"85f8":function(e,t,n){"use strict";(function(t,r){var i;e.exports=I,I.ReadableState=A;n("faa1").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=n("9ede"),a=n("b639").Buffer,l=t.Uint8Array||function(){};function c(e){return a.from(e)}function u(e){return a.isBuffer(e)||e instanceof l}var h,p=n(2);h=p&&p.debuglog?p.debuglog("stream"):function(){};var f,d,g,m=n("f688"),y=n("edb3"),b=n("31b5"),v=b.getHighWaterMark,w=n("fbd7").codes,_=w.ERR_INVALID_ARG_TYPE,S=w.ERR_STREAM_PUSH_AFTER_EOF,C=w.ERR_METHOD_NOT_IMPLEMENTED,E=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n("3fb5")(I,s);var k=y.errorOrDestroy,T=["error","close","destroy","pause","resume"];function x(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function A(e,t,r){i=i||n("be3f"),e=e||{},"boolean"!==typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",r),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=n("7d72").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function I(e){if(i=i||n("be3f"),!(this instanceof I))return new I(e);var t=this instanceof i;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function R(e,t,n,r,i){h("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,L(e,s);else if(i||(o=P(s,t)),o)k(e,o);else if(s.objectMode||t&&t.length>0)if("string"===typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=c(t)),r)s.endEmitted?k(e,new E):O(e,s,t,!0);else if(s.ended)k(e,new S);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?O(e,s,t,!1):D(e,s)):O(e,s,t,!1)}else r||(s.reading=!1,D(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&N(e)),D(e,t)}function P(e,t){var n;return u(t)||"string"===typeof t||void 0===t||e.objectMode||(n=new _("chunk",["string","Buffer","Uint8Array"],t)),n}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),I.prototype.destroy=y.destroy,I.prototype._undestroy=y.undestroy,I.prototype._destroy=function(e,t){t(e)},I.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=a.from(e,t),t=""),n=!0),R(this,e,t,!1,n)},I.prototype.unshift=function(e){return R(this,e,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(e){f||(f=n("7d72").StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,i="";while(null!==r)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var F=1073741824;function B(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=B(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e,t){if(h("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}}function N(e){var t=e._readableState;h("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(j,e))}function j(e){var t=e._readableState;h("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,H(e)}function D(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(U,e,t))}function U(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length)){var n=t.length;if(h("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function q(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,H(e))}}function V(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){h("readable nexttick read 0"),e.read(0)}function W(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick($,e,t))}function $(e,t){h("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),H(e),t.flowing&&!t.reading&&e.read(0)}function H(e){var t=e._readableState;h("flow",t.flowing);while(t.flowing&&null!==e.read());}function K(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function Q(e){var t=e._readableState;h("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(Y,t,e))}function Y(e,t){if(h("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function G(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}I.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):N(this),null;if(e=M(e,t),0===e&&t.ended)return 0===t.length&&Q(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,h("length less than watermark",i)),t.ended||t.reading?(i=!1,h("reading or ended",i)):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=M(n,t))),r=e>0?K(e,t):null,null===r?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&Q(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){k(this,new C("_read()"))},I.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:b;function l(e,t){h("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function c(){h("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",l);var u=q(n);e.on("drain",u);var p=!1;function f(){h("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",g),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",b),n.removeListener("data",d),p=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u()}function d(t){h("ondata");var r=e.write(t);h("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==G(i.pipes,e))&&!p&&(h("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function g(t){h("onerror",t),b(),e.removeListener("error",g),0===o(e,"error")&&k(e,t)}function m(){e.removeListener("finish",y),b()}function y(){h("onfinish"),e.removeListener("close",m),b()}function b(){h("unpipe"),n.unpipe(e)}return n.on("data",d),x(e,"error",g),e.once("close",m),e.once("finish",y),e.emit("pipe",n),i.flowing||(h("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},I.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,h("on readable",i.length,i.reading),i.length?N(this):i.reading||r.nextTick(z,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(V,this),n},I.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(V,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!e.readableListening,W(this,e)),e.paused=!1,this},I.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){if(h("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<T.length;o++)e.on(T[o],this.emit.bind(this,T[o]));return this._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"===typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n("34e3")),d(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),I._fromList=K,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(I.from=function(e,t){return void 0===g&&(g=n("2527")),g(I,e,t)})}).call(this,n("c8ba"),n("f28c"))},"86c6":function(e,t,n){"use strict";var r=n("9bfc").codes.ERR_INVALID_OPT_VALUE;function i(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}function o(e,t,n,o){var s=i(t,o,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?n:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},8707:function(e,t,n){var r=n("b639"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(i,s),s.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},"8fc1":function(e,t,n){"use strict";var r=n("de08"),i=n.n(r);i.a},"911e":function(e,t,n){"use strict";var r=n("0573"),i=n.n(r);i.a},9152:function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,h=n?i-1:0,p=n?-1:1,f=e[t+h];for(h+=p,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=p,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=p,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+h>=1?p/l:p*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+f]=255&s,f+=d,s/=256,c-=8);e[n+f-d]|=128*g}},"91dd":function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!==typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var l=1e3;o&&"number"===typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var h,p,f,d,g=e[u].replace(a,"%20"),m=g.indexOf(n);m>=0?(h=g.substr(0,m),p=g.substr(m+1)):(h=g,p=""),f=decodeURIComponent(h),d=decodeURIComponent(p),r(s,f)?i(s[f])?s[f].push(d):s[f]=[s[f],d]:s[f]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},"966d":function(e,t,n){"use strict";(function(t){function n(e,n,r,i){if("function"!==typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:o=new Array(a-1),s=0;while(s<o.length)o[s++]=arguments[s];return t.nextTick((function(){e.apply(null,o)}))}}"undefined"===typeof t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:n}:e.exports=t}).call(this,n("f28c"))},"9bfc":function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var i={};function o(e,t,n){function o(e,n,r){return"string"===typeof t?t:t(e,n,r)}n||(n=Error);var s=function(e){function t(t,n,r){return e.call(this,o(t,n,r))||this}return r(t,e),t}(n);s.prototype.name=n.name,s.prototype.code=e,i[e]=s}function s(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function a(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function l(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i;if("string"===typeof t&&a(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",l(e," argument"))i="The ".concat(e," ").concat(r," ").concat(s(t,"type"));else{var o=c(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(r," ").concat(s(t,"type"))}return i+=". Received type ".concat(typeof n),i}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},"9d37":function(e,t,n){"use strict";e.exports=i;var r=n("fe34");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n("3fb5")(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},"9ede":function(e,t,n){e.exports=n("faa1").EventEmitter},a43f:function(e,t,n){"use strict";const r=n("63f0"),i=n("6155").NumberAllocator;function o(e){if(!(this instanceof o))return new o(e);e>0&&(this.aliasToTopic=new r({max:e}),this.topicToAlias={},this.numberAllocator=new i(1,e),this.max=e,this.length=0)}o.prototype.put=function(e,t){if(0===t||t>this.max)return!1;const n=this.aliasToTopic.get(t);return n&&delete this.topicToAlias[n],this.aliasToTopic.set(t,e),this.topicToAlias[e]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.length,!0},o.prototype.getTopicByAlias=function(e){return this.aliasToTopic.get(e)},o.prototype.getAliasByTopic=function(e){const t=this.topicToAlias[e];return"undefined"!==typeof t&&this.aliasToTopic.get(t),t},o.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},o.prototype.getLruAlias=function(){const e=this.numberAllocator.firstVacant();return e||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},e.exports=o},a493:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n("0e8b"),o=n("f6ba");n("3fb5")(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var l=s[a];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||t.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n("f28c"))},a50f:function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},a7c9:function(e,t){class n{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}e.exports=n},a9b9:function(e,t,n){"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},ab52:function(e,t,n){(function(t){var r=n("566b"),i=function(){},o=function(e){return e.setHeader&&"function"===typeof e.abort},s=function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length},a=function(e,n,l){if("function"===typeof n)return a(e,null,n);n||(n={}),l=r(l||i);var c=e._writableState,u=e._readableState,h=n.readable||!1!==n.readable&&e.readable,p=n.writable||!1!==n.writable&&e.writable,f=!1,d=function(){e.writable||g()},g=function(){p=!1,h||l.call(e)},m=function(){h=!1,p||l.call(e)},y=function(t){l.call(e,t?new Error("exited with error code: "+t):null)},b=function(t){l.call(e,t)},v=function(){t.nextTick(w)},w=function(){if(!f)return(!h||u&&u.ended&&!u.destroyed)&&(!p||c&&c.ended&&!c.destroyed)?void 0:l.call(e,new Error("premature close"))},_=function(){e.req.on("finish",g)};return o(e)?(e.on("complete",g),e.on("abort",v),e.req?_():e.on("request",_)):p&&!c&&(e.on("end",d),e.on("close",d)),s(e)&&e.on("exit",y),e.on("end",m),e.on("finish",g),!1!==n.error&&e.on("error",b),e.on("close",v),function(){f=!0,e.removeListener("complete",g),e.removeListener("abort",v),e.removeListener("request",_),e.req&&e.req.removeListener("finish",g),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("exit",y),e.removeListener("end",m),e.removeListener("error",b),e.removeListener("close",v)}};e.exports=a}).call(this,n("f28c"))},adaa:function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=7*o,a=365.25*o;function l(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]),c=(t[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return l*a;case"weeks":case"week":case"w":return l*s;case"days":case"day":case"d":return l*o;case"hours":case"hour":case"hrs":case"hr":case"h":return l*i;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function c(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+"d":t>=i?Math.round(e/i)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}function u(e){var t=Math.abs(e);return t>=o?h(e,t,o,"day"):t>=i?h(e,t,i,"hour"):t>=r?h(e,t,r,"minute"):t>=n?h(e,t,n,"second"):e+" ms"}function h(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return l(e);if("number"===n&&isFinite(e))return t.long?u(e):c(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},ae84:function(e,t,n){"use strict";function r(e){const t=e.split("/");for(let n=0;n<t.length;n++)if("+"!==t[n]){if("#"===t[n])return n===t.length-1;if(-1!==t[n].indexOf("+")||-1!==t[n].indexOf("#"))return!1}return!0}function i(e){if(0===e.length)return"empty_topic_list";for(let t=0;t<e.length;t++)if(!r(e[t]))return e[t];return null}e.exports={validateTopics:i}},aff9:function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},b289:function(e,t,n){(function(t){const n=e.exports;n.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},n.codes={};for(const e in n.types){const t=n.types[e];n.codes[t]=e}n.CMD_SHIFT=4,n.CMD_MASK=240,n.DUP_MASK=8,n.QOS_MASK=3,n.QOS_SHIFT=1,n.RETAIN_MASK=1,n.VARBYTEINT_MASK=127,n.VARBYTEINT_FIN_MASK=128,n.VARBYTEINT_MAX=268435455,n.SESSIONPRESENT_MASK=1,n.SESSIONPRESENT_HEADER=t.from([n.SESSIONPRESENT_MASK]),n.CONNACK_HEADER=t.from([n.codes.connack<<n.CMD_SHIFT]),n.USERNAME_MASK=128,n.PASSWORD_MASK=64,n.WILL_RETAIN_MASK=32,n.WILL_QOS_MASK=24,n.WILL_QOS_SHIFT=3,n.WILL_FLAG_MASK=4,n.CLEAN_SESSION_MASK=2,n.CONNECT_HEADER=t.from([n.codes.connect<<n.CMD_SHIFT]),n.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},n.propertiesCodes={};for(const e in n.properties){const t=n.properties[e];n.propertiesCodes[t]=e}function r(e){return[0,1,2].map(r=>[0,1].map(i=>[0,1].map(o=>{const s=t.alloc(1);return s.writeUInt8(n.codes[e]<<n.CMD_SHIFT|(i?n.DUP_MASK:0)|r<<n.QOS_SHIFT|o,0,!0),s})))}n.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},n.PUBLISH_HEADER=r("publish"),n.SUBSCRIBE_HEADER=r("subscribe"),n.SUBSCRIBE_OPTIONS_QOS_MASK=3,n.SUBSCRIBE_OPTIONS_NL_MASK=1,n.SUBSCRIBE_OPTIONS_NL_SHIFT=2,n.SUBSCRIBE_OPTIONS_RAP_MASK=1,n.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,n.SUBSCRIBE_OPTIONS_RH_MASK=3,n.SUBSCRIBE_OPTIONS_RH_SHIFT=4,n.SUBSCRIBE_OPTIONS_RH=[0,16,32],n.SUBSCRIBE_OPTIONS_NL=4,n.SUBSCRIBE_OPTIONS_RAP=8,n.SUBSCRIBE_OPTIONS_QOS=[0,1,2],n.UNSUBSCRIBE_HEADER=r("unsubscribe"),n.ACKS={unsuback:r("unsuback"),puback:r("puback"),pubcomp:r("pubcomp"),pubrel:r("pubrel"),pubrec:r("pubrec")},n.SUBACK_HEADER=t.from([n.codes.suback<<n.CMD_SHIFT]),n.VERSION3=t.from([3]),n.VERSION4=t.from([4]),n.VERSION5=t.from([5]),n.VERSION131=t.from([131]),n.VERSION132=t.from([132]),n.QOS=[0,1,2].map(e=>t.from([e])),n.EMPTY={pingreq:t.from([n.codes.pingreq<<4,0]),pingresp:t.from([n.codes.pingresp<<4,0]),disconnect:t.from([n.codes.disconnect<<4,0])}}).call(this,n("b639").Buffer)},b383:function(e,t,n){"use strict";t.decode=t.parse=n("91dd"),t.encode=t.stringify=n("e099")},b639:function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var r=n("1fb5"),i=n("9152"),o=n("e3db");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=c.prototype):(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?m(e,t,n,r):"string"===typeof t?d(e,t,n):y(e,t)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t,n,r){return h(t),t<=0?l(e,t):void 0!==n?"string"===typeof r?l(e,t).fill(n,r):l(e,t).fill(n):l(e,t)}function f(e,t){if(h(t),e=l(e,t<0?0:0|b(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t,n){if("string"===typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|w(t,n);e=l(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function g(e,t){var n=t.length<0?0:0|b(t.length);e=l(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function m(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=g(e,t),e}function y(e,t){if(c.isBuffer(t)){var n=0|b(t.length);return e=l(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):g(e,t);if("Buffer"===t.type&&o(t.data))return g(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),c.alloc(+e)}function w(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return G(e).length;t=(""+t).toLowerCase(),r=!0}}function _(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function C(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,i);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var h=!0,p=0;p<l;p++)if(c(e,o+p)!==c(t,p)){h=!1;break}if(h)return o}return-1}function k(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function T(e,t,n,r){return ee(G(t,e.length-n),e,n,r)}function x(e,t,n,r){return ee(J(t),e,n,r)}function A(e,t,n,r){return x(e,t,n,r)}function I(e,t,n,r){return ee(X(t),e,n,r)}function R(e,t,n,r){return ee(Z(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);var r=[],i=t;while(i<n){var o,s,a,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:o=e[i+1],128===(192&o)&&(l=(31&c)<<6|63&o,l>127&&(u=l));break;case 3:o=e[i+1],s=e[i+2],128===(192&o)&&128===(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s,l>2047&&(l<55296||l>57343)&&(u=l));break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a,l>65535&&l<1114112&&(u=l))}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return B(r)}t.Buffer=c,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return p(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},c.byteLength=w,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)S(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?P(this,0,e):_.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,a=Math.min(o,s),l=this.slice(r,i),u=e.slice(t,n),h=0;h<a;++h)if(l[h]!==u[h]){o=l[h],s=u[h];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return C(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return C(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return k(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;function B(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);var n="",r=0;while(r<t)n+=String.fromCharCode.apply(String,e.slice(r,r+=F));return n}function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function N(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=Y(e[o]);return i}function j(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function q(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function V(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function z(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function W(e,t,n,r,o){return o||z(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function $(e,t,n,r,o){return o||z(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=c.prototype;else{var i=t-e;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);var r=this[e],i=1,o=0;while(++o<t&&(i*=256))r+=this[e+o]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);var r=this[e+--t],i=1;while(t>0&&(i*=256))r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);var r=this[e],i=1,o=0;while(++o<t&&(i*=256))r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);var r=t,i=1,o=this[e+--r];while(r>0&&(i*=256))o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;U(this,e,t,n,i,0)}var o=1,s=0;this[t]=255&e;while(++s<n&&(o*=256))this[t+s]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;U(this,e,t,n,i,0)}var o=n-1,s=1;this[t+o]=255&e;while(--o>=0&&(s*=256))this[t+o]=e/s&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):V(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);U(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;this[t]=255&e;while(++o<n&&(s*=256))e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);U(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;this[t+o]=255&e;while(--o>=0&&(s*=256))e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):V(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return W(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return W(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return $(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return $(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:G(new c(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function K(e){if(e=Q(e).replace(H,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function Q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function J(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Z(e,t){for(var n,r,i,o=[],s=0;s<e.length;++s){if((t-=2)<0)break;n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r)}return o}function X(e){return r.toByteArray(K(e))}function ee(e,t,n,r){for(var i=0;i<r;++i){if(i+n>=t.length||i>=e.length)break;t[i+n]=e[i]}return i}function te(e){return e!==e}}).call(this,n("c8ba"))},b68e:function(e,t,n){},b7d1:function(e,t,n){(function(t){function n(e,t){if(r("noDeprecation"))return e;var n=!1;function i(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return i}function r(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(this,n("c8ba"))},b84c:function(e,t,n){"use strict";var r=n("4311"),i=n.n(r);i.a},b98b:function(e,t,n){e.exports=n("faa1").EventEmitter},be3f:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n("85f8"),o=n("13a8");n("3fb5")(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var l=s[a];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||t.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n("f28c"))},bf09:function(e,t,n){"use strict";var r=n("9bfc").codes.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}function o(){}function s(e){return e.setHeader&&"function"===typeof e.abort}function a(e,t,n){if("function"===typeof t)return a(e,null,t);t||(t={}),n=i(n||o);var l=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,u=function(){e.writable||p()},h=e._writableState&&e._writableState.finished,p=function(){c=!1,h=!0,l||n.call(e)},f=e._readableState&&e._readableState.endEmitted,d=function(){l=!1,f=!0,c||n.call(e)},g=function(t){n.call(e,t)},m=function(){var t;return l&&!f?(e._readableState&&e._readableState.ended||(t=new r),n.call(e,t)):c&&!h?(e._writableState&&e._writableState.ended||(t=new r),n.call(e,t)):void 0},y=function(){e.req.on("finish",p)};return s(e)?(e.on("complete",p),e.on("abort",m),e.req?y():e.on("request",y)):c&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",d),e.on("finish",p),!1!==t.error&&e.on("error",g),e.on("close",m),function(){e.removeListener("complete",p),e.removeListener("abort",m),e.removeListener("request",y),e.req&&e.req.removeListener("finish",p),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",p),e.removeListener("end",d),e.removeListener("error",g),e.removeListener("close",m)}}e.exports=a},c15d:function(e,t,n){function r(e){function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){let t,n,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(t||i);n.diff=o,n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),"string"!==typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if("%%"===t)return"%";s++;const o=r.formatters[i];if("function"===typeof o){const r=e[s];t=o.call(n,r),e.splice(s,1),s--}return t}),r.formatArgs.call(n,e);const l=n.log||r.log;l.apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=i,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(n!==r.namespaces&&(n=r.namespaces,o=r.enabled(e)),o),set:e=>{s=e}}),"function"===typeof r.init&&r.init(a),a}function i(e,t){const n=r(this.namespace+("undefined"===typeof t?":":t)+e);return n.log=this.log,n}function o(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"===typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){const e=[...r.names.map(l),...r.skips.map(l).map(e=>"-"+e)].join(",");return r.enable(""),e}function a(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function c(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=n("adaa"),r.destroy=u,Object.keys(e).forEach(t=>{r[t]=e[t]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},c4c7:function(e,t,n){"use strict";const{Buffer:r}=n("b639"),i=n("035d").Transform,o=n("56ac");let s,a,l,c=!1;function u(){const e=new i;return e._write=function(e,t,n){s.sendSocketMessage({data:e.buffer,success:function(){n()},fail:function(){n(new Error)}})},e._flush=function(e){s.closeSocket({success:function(){e()}})},e}function h(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}function p(e,t){const n="alis"===e.protocol?"wss":"ws";let r=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(r=n+"://"+e.hostname+":"+e.port+e.path),"function"===typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}function f(){c||(c=!0,s.onSocketOpen((function(){l.setReadable(a),l.setWritable(a),l.emit("connect")})),s.onSocketMessage((function(e){if("string"===typeof e.data){const t=r.from(e.data,"base64");a.push(t)}else{const t=new FileReader;t.addEventListener("load",(function(){let e=t.result;e=e instanceof ArrayBuffer?r.from(e):r.from(e,"utf8"),a.push(e)})),t.readAsArrayBuffer(e.data)}})),s.onSocketClose((function(){l.end(),l.destroy()})),s.onSocketError((function(e){l.destroy(e)})))}function d(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");const n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";h(t);const r=p(t,e);return s=t.my,s.connectSocket({url:r,protocols:n}),a=u(),l=o.obj(),f(),l}e.exports=d},cfda:function(e,t,n){},d01d:function(e,t,n){"use strict";var r=n("8426"),i=n.n(r);i.a},d633:function(e,t){function n(e,t){if(e&&t)return n(e)(t);if("function"!==typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),i=t[t.length-1];return"function"===typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}e.exports=n},d9e1:function(e,t,n){"use strict";var r=n("fbd7").codes.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}function o(){}function s(e){return e.setHeader&&"function"===typeof e.abort}function a(e,t,n){if("function"===typeof t)return a(e,null,t);t||(t={}),n=i(n||o);var l=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,u=function(){e.writable||p()},h=e._writableState&&e._writableState.finished,p=function(){c=!1,h=!0,l||n.call(e)},f=e._readableState&&e._readableState.endEmitted,d=function(){l=!1,f=!0,c||n.call(e)},g=function(t){n.call(e,t)},m=function(){var t;return l&&!f?(e._readableState&&e._readableState.ended||(t=new r),n.call(e,t)):c&&!h?(e._writableState&&e._writableState.ended||(t=new r),n.call(e,t)):void 0},y=function(){e.req.on("finish",p)};return s(e)?(e.on("complete",p),e.on("abort",m),e.req?y():e.on("request",y)):c&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",d),e.on("finish",p),!1!==t.error&&e.on("error",g),e.on("close",m),function(){e.removeListener("complete",p),e.removeListener("abort",m),e.removeListener("request",y),e.req&&e.req.removeListener("finish",p),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",p),e.removeListener("end",d),e.removeListener("error",g),e.removeListener("close",m)}}e.exports=a},db34:function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}function s(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}}function a(){let e;try{e=t.storage.getItem("debug")}catch(n){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",BASE_URL:"/"}).DEBUG),e}function l(){try{return localStorage}catch(e){}}t.formatArgs=o,t.save=s,t.load=a,t.useColors=i,t.storage=l(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n("555e")(t);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n("f28c"))},de08:function(e,t,n){},df86:function(e,t,n){"use strict";(function(t,r){const i=n("faa1").EventEmitter,o=n("ea08"),s=n("e7d0"),a=n("a43f"),l=n("3409"),c=n("1e4d"),u=n("035d").Writable,h=n("3fb5"),p=n("29a2"),f=n("2a28"),d=n("ae84"),g=n("53a8"),m=n("db34")("mqttjs:client"),y=t?t.nextTick:function(e){setTimeout(e,0)},b=r.setImmediate||function(e){y(e)},v={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},w=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],_={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function S(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function C(e,t){if(5===e.options.protocolVersion&&"publish"===t.cmd){let n;t.properties&&(n=t.properties.topicAlias);const r=t.topic.toString();if(e.topicAliasSend)if(n){if(0!==r.length&&(m("applyTopicAlias :: register topic: %s - alias: %d",r,n),!e.topicAliasSend.put(r,n)))return m("applyTopicAlias :: error out of range. topic: %s - alias: %d",r,n),new Error("Sending Topic Alias out of range")}else 0!==r.length&&(e.options.autoAssignTopicAlias?(n=e.topicAliasSend.getAliasByTopic(r),n?(t.topic="",t.properties={...t.properties,topicAlias:n},m("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",r,n)):(n=e.topicAliasSend.getLruAlias(),e.topicAliasSend.put(r,n),t.properties={...t.properties,topicAlias:n},m("applyTopicAlias :: auto assign topic: %s - alias: %d",r,n))):e.options.autoUseTopicAlias&&(n=e.topicAliasSend.getAliasByTopic(r),n&&(t.topic="",t.properties={...t.properties,topicAlias:n},m("applyTopicAlias :: auto use topic: %s - alias: %d",r,n))));else if(n)return m("applyTopicAlias :: error out of range. topic: %s - alias: %d",r,n),new Error("Sending Topic Alias out of range")}}function E(e,t){let n;t.properties&&(n=t.properties.topicAlias);let r=t.topic.toString();if(0===r.length){if("undefined"===typeof n)return new Error("Unregistered Topic Alias");if(r=e.topicAliasSend.getTopicByAlias(n),"undefined"===typeof r)return new Error("Unregistered Topic Alias");t.topic=r}n&&delete t.properties.topicAlias}function k(e,t,n){m("sendPacket :: packet: %O",t),m("sendPacket :: emitting `packetsend`"),e.emit("packetsend",t),m("sendPacket :: writing to stream");const r=l.writeToStream(t,e.stream,e.options);m("sendPacket :: writeToStream result %s",r),!r&&n&&n!==I?(m("sendPacket :: handle events on `drain` once through callback."),e.stream.once("drain",n)):n&&(m("sendPacket :: invoking cb"),n())}function T(e){e&&(m("flush: queue exists? %b",!!e),Object.keys(e).forEach((function(t){"function"===typeof e[t].cb&&(e[t].cb(new Error("Connection closed")),delete e[t])})))}function x(e){e&&(m("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(e).forEach((function(t){e[t].volatile&&"function"===typeof e[t].cb&&(e[t].cb(new Error("Connection closed")),delete e[t])})))}function A(e,t,n,r){m("storeAndSend :: store packet with cmd %s to outgoingStore",t.cmd);let i,o=t;if("publish"===o.cmd&&(o=f(t),i=E(e,o),i))return n&&n(i);e.outgoingStore.put(o,(function(i){if(i)return n&&n(i);r(),k(e,t,n)}))}function I(e){m("nop ::",e)}function R(e,t){let n;const r=this;if(!(this instanceof R))return new R(e,t);for(n in this.options=t||{},v)"undefined"===typeof this.options[n]?this.options[n]=v[n]:this.options[n]=t[n];m("MqttClient :: options.protocol",t.protocol),m("MqttClient :: options.protocolVersion",t.protocolVersion),m("MqttClient :: options.username",t.username),m("MqttClient :: options.keepalive",t.keepalive),m("MqttClient :: options.reconnectPeriod",t.reconnectPeriod),m("MqttClient :: options.rejectUnauthorized",t.rejectUnauthorized),m("MqttClient :: options.topicAliasMaximum",t.topicAliasMaximum),this.options.clientId="string"===typeof t.clientId?t.clientId:S(),m("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=5===t.protocolVersion&&t.customHandleAcks?t.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=e,this.messageIdProvider="undefined"===typeof this.options.messageIdProvider?new c:this.options.messageIdProvider,this.outgoingStore=t.outgoingStore||new o,this.incomingStore=t.incomingStore||new o,this.queueQoSZero=void 0===t.queueQoSZero||t.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,t.topicAliasMaximum>0&&(t.topicAliasMaximum>65535?m("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(t.topicAliasMaximum)),this.on("connect",(function(){const e=this.queue;function t(){const n=e.shift();m("deliver :: entry %o",n);let i=null;if(!n)return void r._resubscribe();i=n.packet,m("deliver :: call _sendPacket for %o",i);let o=!0;i.messageId&&0!==i.messageId&&(r.messageIdProvider.register(i.messageId)||(o=!1)),o?r._sendPacket(i,(function(e){n.cb&&n.cb(e),t()})):(m("messageId: %d has already used. The message is skipped and removed.",i.messageId),t())}m("connect :: sending queued packets"),t()})),this.on("close",(function(){m("close :: connected set to `false`"),this.connected=!1,m("close :: clearing connackTimer"),clearTimeout(this.connackTimer),m("close :: clearing ping timer"),null!==r.pingTimer&&(r.pingTimer.clear(),r.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),m("close :: calling _setupReconnect"),this._setupReconnect()})),i.call(this),m("MqttClient :: setting up stream"),this._setupStream()}h(R,i),R.prototype._setupStream=function(){const e=this,t=new u,n=l.parser(this.options);let r=null;const i=[];function o(){if(i.length)y(s);else{const e=r;r=null,e()}}function s(){m("work :: getting next packet in queue");const t=i.shift();if(t)m("work :: packet pulled from queue"),e._handlePacket(t,o);else{m("work :: no packets in queue");const e=r;r=null,m("work :: done flag is %s",!!e),e&&e()}}function a(t){m("streamErrorHandler :: error",t.message),w.includes(t.code)?(m("streamErrorHandler :: emitting error"),e.emit("error",t)):I(t)}m("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),m("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),n.on("packet",(function(e){m("parser :: on packet push to packets array."),i.push(e)})),t._write=function(e,t,i){r=i,m("writable stream :: parsing buffer"),n.parse(e),s()},m("_setupStream :: pipe stream to writable stream"),this.stream.pipe(t),this.stream.on("error",a),this.stream.on("close",(function(){m("(%s)stream :: on close",e.options.clientId),x(e.outgoing),m("stream: emit close to MqttClient"),e.emit("close")})),m("_setupStream: sending packet `connect`");const c=Object.create(this.options);if(c.cmd="connect",this.topicAliasRecv&&(c.properties||(c.properties={}),this.topicAliasRecv&&(c.properties.topicAliasMaximum=this.topicAliasRecv.max)),k(this,c),n.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return e.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&"object"===typeof this.options.authPacket){const e=g({cmd:"auth",reasonCode:0},this.options.authPacket);k(this,e)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){m("!!connectTimeout hit!! Calling _cleanUp with force `true`"),e._cleanUp(!0)}),this.options.connectTimeout)},R.prototype._handlePacket=function(e,t){const n=this.options;if(5===n.protocolVersion&&n.properties&&n.properties.maximumPacketSize&&n.properties.maximumPacketSize<e.length)return this.emit("error",new Error("exceeding packets size "+e.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(m("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",e),e.cmd){case"publish":this._handlePublish(e,t);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(e),t();break;case"pubrel":this._handlePubrel(e,t);break;case"connack":this._handleConnack(e),t();break;case"auth":this._handleAuth(e),t();break;case"pingresp":this._handlePingresp(e),t();break;case"disconnect":this._handleDisconnect(e),t();break;default:break}},R.prototype._checkDisconnecting=function(e){return this.disconnecting&&(e&&e!==I?e(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},R.prototype.publish=function(e,t,n,r){m("publish :: message `%s` to topic `%s`",t,e);const i=this.options;"function"===typeof n&&(r=n,n=null);const o={qos:0,retain:!1,dup:!1};if(n=g(o,n),this._checkDisconnecting(r))return this;const s=this,a=function(){let o=0;if((1===n.qos||2===n.qos)&&(o=s._nextId(),null===o))return m("No messageId left"),!1;const a={cmd:"publish",topic:e,payload:t,qos:n.qos,retain:n.retain,messageId:o,dup:n.dup};switch(5===i.protocolVersion&&(a.properties=n.properties),m("publish :: qos",n.qos),n.qos){case 1:case 2:s.outgoing[a.messageId]={volatile:!1,cb:r||I},m("MqttClient:publish: packet cmd: %s",a.cmd),s._sendPacket(a,void 0,n.cbStorePut);break;default:m("MqttClient:publish: packet cmd: %s",a.cmd),s._sendPacket(a,r,n.cbStorePut);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!a())&&this._storeProcessingQueue.push({invoke:a,cbStorePut:n.cbStorePut,callback:r}),this},R.prototype.subscribe=function(){const e=this,t=new Array(arguments.length);for(let h=0;h<arguments.length;h++)t[h]=arguments[h];const n=[];let r=t.shift();const i=r.resubscribe;let o=t.pop()||I,s=t.pop();const a=this.options.protocolVersion;delete r.resubscribe,"string"===typeof r&&(r=[r]),"function"!==typeof o&&(s=o,o=I);const l=d.validateTopics(r);if(null!==l)return b(o,new Error("Invalid topic "+l)),this;if(this._checkDisconnecting(o))return m("subscribe: discconecting true"),this;const c={qos:0};if(5===a&&(c.nl=!1,c.rap=!1,c.rh=0),s=g(c,s),Array.isArray(r)?r.forEach((function(t){if(m("subscribe: array topic %s",t),!Object.prototype.hasOwnProperty.call(e._resubscribeTopics,t)||e._resubscribeTopics[t].qos<s.qos||i){const e={topic:t,qos:s.qos};5===a&&(e.nl=s.nl,e.rap=s.rap,e.rh=s.rh,e.properties=s.properties),m("subscribe: pushing topic `%s` and qos `%s` to subs list",e.topic,e.qos),n.push(e)}})):Object.keys(r).forEach((function(t){if(m("subscribe: object topic %s",t),!Object.prototype.hasOwnProperty.call(e._resubscribeTopics,t)||e._resubscribeTopics[t].qos<r[t].qos||i){const e={topic:t,qos:r[t].qos};5===a&&(e.nl=r[t].nl,e.rap=r[t].rap,e.rh=r[t].rh,e.properties=s.properties),m("subscribe: pushing `%s` to subs list",e),n.push(e)}})),!n.length)return o(null,[]),this;const u=function(){const t=e._nextId();if(null===t)return m("No messageId left"),!1;const r={cmd:"subscribe",subscriptions:n,qos:1,retain:!1,dup:!1,messageId:t};if(s.properties&&(r.properties=s.properties),e.options.resubscribe){m("subscribe :: resubscribe true");const t=[];n.forEach((function(n){if(e.options.reconnectPeriod>0){const r={qos:n.qos};5===a&&(r.nl=n.nl||!1,r.rap=n.rap||!1,r.rh=n.rh||0,r.properties=n.properties),e._resubscribeTopics[n.topic]=r,t.push(n.topic)}})),e.messageIdToTopic[r.messageId]=t}return e.outgoing[r.messageId]={volatile:!0,cb:function(e,t){if(!e){const e=t.granted;for(let t=0;t<e.length;t+=1)n[t].qos=e[t]}o(e,n)}},m("subscribe :: call _sendPacket"),e._sendPacket(r),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!u())&&this._storeProcessingQueue.push({invoke:u,callback:o}),this},R.prototype.unsubscribe=function(){const e=this,t=new Array(arguments.length);for(let a=0;a<arguments.length;a++)t[a]=arguments[a];let n=t.shift(),r=t.pop()||I,i=t.pop();"string"===typeof n&&(n=[n]),"function"!==typeof r&&(i=r,r=I);const o=d.validateTopics(n);if(null!==o)return b(r,new Error("Invalid topic "+o)),this;if(e._checkDisconnecting(r))return this;const s=function(){const t=e._nextId();if(null===t)return m("No messageId left"),!1;const o={cmd:"unsubscribe",qos:1,messageId:t};return"string"===typeof n?o.unsubscriptions=[n]:Array.isArray(n)&&(o.unsubscriptions=n),e.options.resubscribe&&o.unsubscriptions.forEach((function(t){delete e._resubscribeTopics[t]})),"object"===typeof i&&i.properties&&(o.properties=i.properties),e.outgoing[o.messageId]={volatile:!0,cb:r},m("unsubscribe: call _sendPacket"),e._sendPacket(o),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!s())&&this._storeProcessingQueue.push({invoke:s,callback:r}),this},R.prototype.end=function(e,t,n){const r=this;function i(){m("end :: closeStores: closing incoming and outgoing stores"),r.disconnected=!0,r.incomingStore.close((function(e){r.outgoingStore.close((function(t){if(m("end :: closeStores: emitting end"),r.emit("end"),n){const r=e||t;m("end :: closeStores: invoking callback with args"),n(r)}}))})),r._deferredReconnect&&r._deferredReconnect()}function o(){m("end :: (%s) :: finish :: calling _cleanUp with force %s",r.options.clientId,e),r._cleanUp(e,()=>{m("end :: finish :: calling process.nextTick on closeStores"),y(i.bind(r))},t)}return m("end :: (%s)",this.options.clientId),null!=e&&"boolean"===typeof e||(n=t||I,t=e,e=!1,"object"!==typeof t&&(n=t,t=null,"function"!==typeof n&&(n=I))),"object"!==typeof t&&(n=t,t=null),m("end :: cb? %s",!!n),n=n||I,this.disconnecting?(n(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(m("end :: (%s) :: calling finish in 10ms once outgoing is empty",r.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,o,10))):(m("end :: (%s) :: immediately calling finish",r.options.clientId),o()),this)},R.prototype.removeOutgoingMessage=function(e){const t=this.outgoing[e]?this.outgoing[e].cb:null;return delete this.outgoing[e],this.outgoingStore.del({messageId:e},(function(){t(new Error("Message removed"))})),this},R.prototype.reconnect=function(e){m("client reconnect");const t=this,n=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new o,t.outgoingStore=t.options.outgoingStore||new o,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=n:n(),this},R.prototype._reconnect=function(){m("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),m("client already connected. disconnecting first.")):(m("_reconnect: calling _setupStream"),this._setupStream())},R.prototype._setupReconnect=function(){const e=this;!e.disconnecting&&!e.reconnectTimer&&e.options.reconnectPeriod>0?(this.reconnecting||(m("_setupReconnect :: emit `offline` state"),this.emit("offline"),m("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),m("_setupReconnect :: setting reconnectTimer for %d ms",e.options.reconnectPeriod),e.reconnectTimer=setInterval((function(){m("reconnectTimer :: reconnect triggered!"),e._reconnect()}),e.options.reconnectPeriod)):m("_setupReconnect :: doing nothing...")},R.prototype._clearReconnect=function(){m("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},R.prototype._cleanUp=function(e,t){const n=arguments[2];if(t&&(m("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",t)),m("_cleanUp :: forced? %s",e),e)0===this.options.reconnectPeriod&&this.options.clean&&T(this.outgoing),m("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const e=g({cmd:"disconnect"},n);m("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(e,b.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(m("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(m("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),t&&!this.connected&&(m("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",t),t())},R.prototype._sendPacket=function(e,t,n){m("_sendPacket :: (%s) :: start",this.options.clientId),n=n||I,t=t||I;const r=C(this,e);if(r)t(r);else{if(!this.connected)return"auth"===e.cmd?(this._shiftPingInterval(),void k(this,e,t)):(m("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(e,t,n));switch(this._shiftPingInterval(),e.cmd){case"publish":break;case"pubrel":return void A(this,e,t,n);default:return void k(this,e,t)}switch(e.qos){case 2:case 1:A(this,e,t,n);break;case 0:default:k(this,e,t);break}m("_sendPacket :: (%s) :: end",this.options.clientId)}},R.prototype._storePacket=function(e,t,n){m("_storePacket :: packet: %o",e),m("_storePacket :: cb? %s",!!t),n=n||I;let r=e;if("publish"===r.cmd){r=f(e);const n=E(this,r);if(n)return t&&t(n)}0===(r.qos||0)&&this.queueQoSZero||"publish"!==r.cmd?this.queue.push({packet:r,cb:t}):r.qos>0?(t=this.outgoing[r.messageId]?this.outgoing[r.messageId].cb:null,this.outgoingStore.put(r,(function(e){if(e)return t&&t(e);n()}))):t&&t(new Error("No connection to broker"))},R.prototype._setupPingTimer=function(){m("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const e=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=p((function(){e._checkPing()}),1e3*this.options.keepalive))},R.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},R.prototype._checkPing=function(){m("_checkPing :: checking ping..."),this.pingResp?(m("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(m("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},R.prototype._handlePingresp=function(){this.pingResp=!0},R.prototype._handleConnack=function(e){m("_handleConnack");const t=this.options,n=t.protocolVersion,r=5===n?e.reasonCode:e.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,e.properties){if(e.properties.topicAliasMaximum){if(e.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));e.properties.topicAliasMaximum>0&&(this.topicAliasSend=new a(e.properties.topicAliasMaximum))}e.properties.serverKeepAlive&&t.keepalive&&(t.keepalive=e.properties.serverKeepAlive,this._shiftPingInterval()),e.properties.maximumPacketSize&&(t.properties||(t.properties={}),t.properties.maximumPacketSize=e.properties.maximumPacketSize)}if(0===r)this.reconnecting=!1,this._onConnect(e);else if(r>0){const e=new Error("Connection refused: "+_[r]);e.code=r,this.emit("error",e)}},R.prototype._handleAuth=function(e){const t=this.options,n=t.protocolVersion,r=5===n?e.reasonCode:e.returnCode;if(5!==n){const e=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+n);return e.code=r,void this.emit("error",e)}const i=this;this.handleAuth(e,(function(e,t){if(e)i.emit("error",e);else if(24===r)i.reconnecting=!1,i._sendPacket(t);else{const t=new Error("Connection refused: "+_[r]);e.code=r,i.emit("error",t)}}))},R.prototype.handleAuth=function(e,t){t()},R.prototype._handlePublish=function(e,t){m("_handlePublish: packet %o",e),t="undefined"!==typeof t?t:I;let n=e.topic.toString();const r=e.payload,i=e.qos,o=e.messageId,s=this,a=this.options,l=[0,16,128,131,135,144,145,151,153];if(5===this.options.protocolVersion){let t;if(e.properties&&(t=e.properties.topicAlias),"undefined"!==typeof t)if(0===n.length){if(!(t>0&&t<=65535))return m("_handlePublish :: topic alias out of range. alias: %d",t),void this.emit("error",new Error("Received Topic Alias is out of range"));{const e=this.topicAliasRecv.getTopicByAlias(t);if(!e)return m("_handlePublish :: unregistered topic alias. alias: %d",t),void this.emit("error",new Error("Received unregistered Topic Alias"));n=e,m("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",n,t)}}else{if(!this.topicAliasRecv.put(n,t))return m("_handlePublish :: topic alias out of range. alias: %d",t),void this.emit("error",new Error("Received Topic Alias is out of range"));m("_handlePublish :: registered topic: %s - alias: %d",n,t)}}switch(m("_handlePublish: qos %d",i),i){case 2:a.customHandleAcks(n,r,e,(function(n,r){return n instanceof Error||(r=n,n=null),n?s.emit("error",n):-1===l.indexOf(r)?s.emit("error",new Error("Wrong reason code for pubrec")):void(r?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:r},t):s.incomingStore.put(e,(function(){s._sendPacket({cmd:"pubrec",messageId:o},t)})))}));break;case 1:a.customHandleAcks(n,r,e,(function(i,a){return i instanceof Error||(a=i,i=null),i?s.emit("error",i):-1===l.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",n,r,e),void s.handleMessage(e,(function(e){if(e)return t&&t(e);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},t)})))}));break;case 0:this.emit("message",n,r,e),this.handleMessage(e,t);break;default:m("_handlePublish: unknown QoS. Doing nothing.");break}},R.prototype.handleMessage=function(e,t){t()},R.prototype._handleAck=function(e){const t=e.messageId,n=e.cmd;let r=null;const i=this.outgoing[t]?this.outgoing[t].cb:null,o=this;let s;if(i){switch(m("_handleAck :: packet type",n),n){case"pubcomp":case"puback":{const n=e.reasonCode;n&&n>0&&16!==n&&(s=new Error("Publish error: "+_[n]),s.code=n,i(s,e)),delete this.outgoing[t],this.outgoingStore.del(e,i),this.messageIdProvider.deallocate(t),this._invokeStoreProcessingQueue();break}case"pubrec":{r={cmd:"pubrel",qos:2,messageId:t};const n=e.reasonCode;n&&n>0&&16!==n?(s=new Error("Publish error: "+_[n]),s.code=n,i(s,e)):this._sendPacket(r);break}case"suback":delete this.outgoing[t],this.messageIdProvider.deallocate(t);for(let n=0;n<e.granted.length;n++)if(0!==(128&e.granted[n])){const e=this.messageIdToTopic[t];e&&e.forEach((function(e){delete o._resubscribeTopics[e]}))}this._invokeStoreProcessingQueue(),i(null,e);break;case"unsuback":delete this.outgoing[t],this.messageIdProvider.deallocate(t),this._invokeStoreProcessingQueue(),i(null);break;default:o.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}else m("_handleAck :: Server sent an ack in error. Ignoring.")},R.prototype._handlePubrel=function(e,t){m("handling pubrel packet"),t="undefined"!==typeof t?t:I;const n=e.messageId,r=this,i={cmd:"pubcomp",messageId:n};r.incomingStore.get(e,(function(e,n){e?r._sendPacket(i,t):(r.emit("message",n.topic,n.payload,n),r.handleMessage(n,(function(e){if(e)return t(e);r.incomingStore.del(n,I),r._sendPacket(i,t)})))}))},R.prototype._handleDisconnect=function(e){this.emit("disconnect",e)},R.prototype._nextId=function(){return this.messageIdProvider.allocate()},R.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},R.prototype._resubscribe=function(){m("_resubscribe");const e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||5===this.options.protocolVersion&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion){m("_resubscribe: protocolVersion 5");for(let t=0;t<e.length;t++){const n={};n[e[t]]=this._resubscribeTopics[e[t]],n.resubscribe=!0,this.subscribe(n,{properties:n[e[t]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},R.prototype._onConnect=function(e){if(this.disconnected)return void this.emit("connect",e);const t=this;function n(){let r=t.outgoingStore.createStream();function i(){t._storeProcessing=!1,t._packetIdsDuringStoreProcessing={}}function o(){r.destroy(),r=null,t._flushStoreProcessingQueue(),i()}function s(){if(!r)return;t._storeProcessing=!0;const e=r.read(1);let n;e?t._packetIdsDuringStoreProcessing[e.messageId]?s():t.disconnecting||t.reconnectTimer?r.destroy&&r.destroy():(n=t.outgoing[e.messageId]?t.outgoing[e.messageId].cb:null,t.outgoing[e.messageId]={volatile:!1,cb:function(e,t){n&&n(e,t),s()}},t._packetIdsDuringStoreProcessing[e.messageId]=!0,t.messageIdProvider.register(e.messageId)?t._sendPacket(e):m("messageId: %d has already used.",e.messageId)):r.once("readable",s)}t.once("close",o),r.on("error",(function(e){i(),t._flushStoreProcessingQueue(),t.removeListener("close",o),t.emit("error",e)})),r.on("end",(function(){let r=!0;for(const e in t._packetIdsDuringStoreProcessing)if(!t._packetIdsDuringStoreProcessing[e]){r=!1;break}r?(i(),t.removeListener("close",o),t._invokeAllStoreProcessingQueue(),t.emit("connect",e)):n()})),s()}this.connackPacket=e,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0,n()},R.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return!1},R.prototype._invokeAllStoreProcessingQueue=function(){while(this._invokeStoreProcessingQueue());},R.prototype._flushStoreProcessingQueue=function(){for(const e of this._storeProcessingQueue)e.cbStorePut&&e.cbStorePut(new Error("Connection closed")),e.callback&&e.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},e.exports=R}).call(this,n("f28c"),n("c8ba"))},e099:function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===typeof e?o(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},e3db:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},e4fc:function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}function s(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}}function a(){let e;try{e=t.storage.getItem("debug")}catch(n){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",BASE_URL:"/"}).DEBUG),e}function l(){try{return localStorage}catch(e){}}t.formatArgs=o,t.save=s,t.load=a,t.useColors=i,t.storage=l(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n("454e")(t);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n("f28c"))},e548:function(e,t,n){},e7d0:function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.aliasToTopic={},this.max=e}r.prototype.put=function(e,t){return!(0===t||t>this.max)&&(this.aliasToTopic[t]=e,this.length=Object.keys(this.aliasToTopic).length,!0)},r.prototype.getTopicByAlias=function(e){return this.aliasToTopic[e]},r.prototype.clear=function(){this.aliasToTopic={}},e.exports=r},e7fc:function(e,t,n){"use strict";(function(t){const r=n("df86"),i=n("ea08"),o=n("0b16"),s=n("53a8"),a=n("db34")("mqttjs"),l={};function c(e){let t;e.auth&&(t=e.auth.match(/^(.+):(.+)$/),t?(e.username=t[1],e.password=t[2]):e.username=e.auth)}function u(e,t){if(a("connecting to an MQTT broker..."),"object"!==typeof e||t||(t=e,e=null),t=t||{},e){const n=o.parse(e,!0);if(null!=n.port&&(n.port=Number(n.port)),t=s(n,t),null===t.protocol)throw new Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(c(t),t.query&&"string"===typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;case"ali":t.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+t.protocol+'"!')}}if(!l[t.protocol]){const e=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((function(t,n){return(!e||n%2!==0)&&"function"===typeof l[t]}))[0]}if(!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");function n(e){return t.servers&&(e._reconnectCount&&e._reconnectCount!==t.servers.length||(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),a("calling streambuilder for",t.protocol),l[t.protocol](e,t)}t.protocol&&(t.defaultProtocol=t.protocol);const i=new r(n,t);return i.on("error",(function(){})),i}"undefined"!==typeof t&&"browser"!==t.title||"function"!==typeof n?(l.mqtt=n("05ee"),l.tcp=n("05ee"),l.ssl=n("fe3c"),l.tls=n("fe3c"),l.mqtts=n("fe3c")):(l.wx=n("8311"),l.wxs=n("8311"),l.ali=n("c4c7"),l.alis=n("c4c7")),l.ws=n("fcb9"),l.wss=n("fcb9"),e.exports=u,e.exports.connect=u,e.exports.MqttClient=r,e.exports.Store=i}).call(this,n("f28c"))},e937:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}var c=n("b639"),u=c.Buffer,h=n(5),p=h.inspect,f=p&&p.custom||"inspect";function d(e,t,n){u.prototype.copy.call(e,t,n)}e.exports=function(){function e(){s(this,e),this.head=null,this.tail=null,this.length=0}return l(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";var t=this.head,n=""+t.data;while(t=t.next)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);var t=u.allocUnsafe(e>>>0),n=this.head,r=0;while(n)d(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;e-=r.length;while(t=t.next){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),e-=o,0===e){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;n.data.copy(t),e-=n.data.length;while(n=n.next){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),e-=o,0===e){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return p(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},ea08:function(e,t,n){"use strict";const r=n("53a8"),i=n("035d").Readable,o={objectMode:!0},s={clean:!0};function a(e){if(!(this instanceof a))return new a(e);this.options=e||{},this.options=r(s,e),this._inflights=new Map}a.prototype.put=function(e,t){return this._inflights.set(e.messageId,e),t&&t(),this},a.prototype.createStream=function(){const e=new i(o),t=[];let n=!1,r=0;return this._inflights.forEach((function(e,n){t.push(e)})),e._read=function(){!n&&r<t.length?this.push(t[r++]):this.push(null)},e.destroy=function(){if(n)return;const e=this;n=!0,setTimeout((function(){e.emit("close")}),0)},e},a.prototype.del=function(e,t){return e=this._inflights.get(e.messageId),e?(this._inflights.delete(e.messageId),t(null,e)):t&&t(new Error("missing packet")),this},a.prototype.get=function(e,t){return e=this._inflights.get(e.messageId),e?t(null,e):t&&t(new Error("missing packet")),this},a.prototype.close=function(e){this.options.clean&&(this._inflights=null),e&&e()},e.exports=a},edb3:function(e,t,n){"use strict";(function(t){function n(e,n){var o=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(n?n(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(s,this,e)):t.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!n&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(i,o):(o._writableState.errorEmitted=!0,t.nextTick(r,o,e)):t.nextTick(r,o,e):n?(t.nextTick(i,o),n(e)):t.nextTick(i,o)})),this)}function r(e,t){s(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(e,t){e.emit("error",t)}function a(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:n,undestroy:o,errorOrDestroy:a}}).call(this,n("f28c"))},f0cb:function(e,t,n){(function(t){const n=65536,r={},i=t.isBuffer(t.from([1,2]).subarray(0,1));function o(e){const n=t.allocUnsafe(2);return n.writeUInt8(e>>8,0),n.writeUInt8(255&e,1),n}function s(){for(let e=0;e<n;e++)r[e]=o(e)}function a(e){const n=4;let r=0,o=0;const s=t.allocUnsafe(n);do{r=e%128|0,e=e/128|0,e>0&&(r|=128),s.writeUInt8(r,o++)}while(e>0&&o<n);return e>0&&(o=0),i?s.subarray(0,o):s.slice(0,o)}function l(e){const n=t.allocUnsafe(4);return n.writeUInt32BE(e,0),n}e.exports={cache:r,generateCache:s,generateNumber:o,genBufVariableByteInt:a,generate4ByteBuffer:l}}).call(this,n("b639").Buffer)},f214:function(e,t,n){t=e.exports=n("0e8b"),t.Stream=t,t.Readable=t,t.Writable=n("f6ba"),t.Duplex=n("a493"),t.Transform=n("fe34"),t.PassThrough=n("9d37"),t.finished=n("bf09"),t.pipeline=n("386b7")},f482:function(e,t,n){"use strict";(function(t){function n(e,n){var o=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(n?n(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(s,this,e)):t.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!n&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(i,o):(o._writableState.errorEmitted=!0,t.nextTick(r,o,e)):t.nextTick(r,o,e):n?(t.nextTick(i,o),n(e)):t.nextTick(i,o)})),this)}function r(e,t){s(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(e,t){e.emit("error",t)}function a(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:n,undestroy:o,errorOrDestroy:a}}).call(this,n("f28c"))},f676:function(e,t,n){"use strict";var r=n("1b34"),i=n.n(r);i.a},f688:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}var c=n("b639"),u=c.Buffer,h=n(3),p=h.inspect,f=p&&p.custom||"inspect";function d(e,t,n){u.prototype.copy.call(e,t,n)}e.exports=function(){function e(){s(this,e),this.head=null,this.tail=null,this.length=0}return l(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";var t=this.head,n=""+t.data;while(t=t.next)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);var t=u.allocUnsafe(e>>>0),n=this.head,r=0;while(n)d(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;e-=r.length;while(t=t.next){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),e-=o,0===e){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;n.data.copy(t),e-=n.data.length;while(n=n.next){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),e-=o,0===e){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return p(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},f6ba:function(e,t,n){"use strict";(function(t,r){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){$(t,e)}}var o;e.exports=A,A.WritableState=x;var s={deprecate:n("b7d1")},a=n("b98b"),l=n("b639").Buffer,c=t.Uint8Array||function(){};function u(e){return l.from(e)}function h(e){return l.isBuffer(e)||e instanceof c}var p,f=n("f482"),d=n("86c6"),g=d.getHighWaterMark,m=n("9bfc").codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_MULTIPLE_CALLBACK,w=m.ERR_STREAM_CANNOT_PIPE,_=m.ERR_STREAM_DESTROYED,S=m.ERR_STREAM_NULL_VALUES,C=m.ERR_STREAM_WRITE_AFTER_END,E=m.ERR_UNKNOWN_ENCODING,k=f.errorOrDestroy;function T(){}function x(e,t,r){o=o||n("a493"),e=e||{},"boolean"!==typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=g(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){L(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){o=o||n("a493");var t=this instanceof o;if(!t&&!p.call(A,this))return new A(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),a.call(this)}function I(e,t){var n=new C;k(e,n),r.nextTick(t,n)}function R(e,t,n,i){var o;return null===n?o=new S:"string"===typeof n||t.objectMode||(o=new y("chunk",["string","Buffer"],n)),!o||(k(e,o),r.nextTick(i,o),!1)}function O(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=l.from(t,n)),t}function P(e,t,n,r,i,o){if(!n){var s=O(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else F(e,t,!1,a,r,i,o);return l}function F(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function B(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(z,e,t),e._writableState.errorEmitted=!0,k(e,i)):(o(i),e._writableState.errorEmitted=!0,k(e,i),z(e,t))}function M(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function L(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if("function"!==typeof o)throw new v;if(M(n),t)B(e,n,i,t,o);else{var s=U(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||D(e,n),i?r.nextTick(N,e,n,s,o):N(e,n,s,o)}}function N(e,t,n,r){n||j(e,t),t.pendingcb--,r(),z(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function D(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),s=t.corkedRequestsFree;s.entry=n;var a=0,l=!0;while(n)o[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;o.allBuffers=l,F(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{while(n){var c=n.chunk,u=n.encoding,h=n.callback,p=t.objectMode?1:c.length;if(F(e,t,!1,p,c,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function U(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function q(e,t){e._final((function(n){t.pendingcb--,n&&k(e,n),t.prefinished=!0,e.emit("prefinish"),z(e,t)}))}function V(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(q,e,t)))}function z(e,t){var n=U(t);if(n&&(V(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}function W(e,t,n){t.ending=!0,z(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function $(e,t,n){var r=e.entry;e.entry=null;while(r){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}n("3fb5")(A,a),x.prototype.getBuffer=function(){var e=this.bufferedRequest,t=[];while(e)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===A&&(e&&e._writableState instanceof x)}})):p=function(e){return e instanceof this},A.prototype.pipe=function(){k(this,new w)},A.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&h(e);return o&&!l.isBuffer(e)&&(e=u(e)),"function"===typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!==typeof n&&(n=T),r.ending?I(this,n):(o||R(this,r,e,n))&&(r.pendingcb++,i=P(this,r,o,e,t,n)),i},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new b("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||W(this,r,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this,n("c8ba"),n("f28c"))},f9c1:function(e,t){function n(e){var t=e._readableState;return t?t.objectMode||"number"===typeof e._duplexState?e.read():e.read(r(t)):null}function r(e){return e.buffer.length?e.buffer.head?e.buffer.head.data.length:e.buffer[0].length:e.length}e.exports=n},fa1c:function(e,t,n){"use strict";var r=n("6846"),i=n.n(r);i.a},faa1:function(e,t,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function s(e){console&&console.warn&&console.warn(e)}r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function l(){l.init.call(this)}e.exports=l,e.exports.once=w,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var i,o,a;if(u(n),o=e._events,void 0===o?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"===typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=h(e),i>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s(l)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function g(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?v(i):y(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function b(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function w(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return h(this)},l.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"===typeof l)o(l,this,t);else{var c=l.length,u=y(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},l.prototype.addListener=function(e,t){return p(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return p(this,e,t,!0)},l.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},l.prototype.removeListener=function(e,t){var n,r,i,o,s;if(u(t),r=this._events,void 0===r)return this;if(n=r[e],void 0===n)return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():b(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,void 0===n)return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)i=o[r],"removeListener"!==i&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],"function"===typeof t)this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return g(this,e,!0)},l.prototype.rawListeners=function(e){return g(this,e,!1)},l.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},l.prototype.listenerCount=m,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},fbd7:function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var i={};function o(e,t,n){function o(e,n,r){return"string"===typeof t?t:t(e,n,r)}n||(n=Error);var s=function(e){function t(t,n,r){return e.call(this,o(t,n,r))||this}return r(t,e),t}(n);s.prototype.name=n.name,s.prototype.code=e,i[e]=s}function s(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function a(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function l(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i;if("string"===typeof t&&a(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",l(e," argument"))i="The ".concat(e," ").concat(r," ").concat(s(t,"type"));else{var o=c(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(r," ").concat(s(t,"type"))}return i+=". Received type ".concat(typeof n),i}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},fcb9:function(e,t,n){"use strict";(function(t){const{Buffer:r}=n("b639"),i=n("a9b9"),o=n("db34")("mqttjs:ws"),s=n("56ac"),a=n("035d").Transform,l=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],c="undefined"!==typeof t&&"browser"===t.title||"function"===typeof n;function u(e,t){let n=e.protocol+"://"+e.hostname+":"+e.port+e.path;return"function"===typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}function h(e){const t=e;return e.hostname||(t.hostname="localhost"),e.port||("wss"===e.protocol?t.port=443:t.port=80),e.path||(t.path="/"),e.wsOptions||(t.wsOptions={}),c||"wss"!==e.protocol||l.forEach((function(n){Object.prototype.hasOwnProperty.call(e,n)&&!Object.prototype.hasOwnProperty.call(e.wsOptions,n)&&(t.wsOptions[n]=e[n])})),t}function p(e){const t=h(e);if(t.hostname||(t.hostname=t.host),!t.hostname){if("undefined"===typeof document)throw new Error("Could not determine host. Specify host manually.");const e=new URL(document.URL);t.hostname=e.hostname,t.port||(t.port=e.port)}return void 0===t.objectMode&&(t.objectMode=!(!0===t.binary||void 0===t.binary)),t}function f(e,t,n){o("createWebSocket"),o("protocol: "+n.protocolId+" "+n.protocolVersion);const r="MQIsdp"===n.protocolId&&3===n.protocolVersion?"mqttv3.1":"mqtt";o("creating new Websocket for url: "+t+" and protocol: "+r);const s=new i(t,[r],n.wsOptions);return s}function d(e,t){const n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt",r=u(t,e),i=new WebSocket(r,[n]);return i.binaryType="arraybuffer",i}function g(e,t){o("streamBuilder");const n=h(t),r=u(n,e),s=f(e,r,n),a=i.createWebSocketStream(s,n.wsOptions);return a.url=r,s.on("close",()=>{a.destroy()}),a}function m(e,t){let n;o("browserStreamBuilder");const i=p(t),l=i.browserBufferSize||524288,c=t.browserBufferTimeout||1e3,u=!t.objectMode,h=d(e,t),f=m(t,S,C);t.objectMode||(f._writev=_),f.on("close",()=>{h.close()});const g="undefined"!==typeof h.addEventListener;function m(e,t,n){const r=new a({objectModeMode:e.objectMode});return r._write=t,r._flush=n,r}function y(){n.setReadable(f),n.setWritable(f),n.emit("connect")}function b(){n.end(),n.destroy()}function v(e){n.destroy(e)}function w(e){let t=e.data;t=t instanceof ArrayBuffer?r.from(t):r.from(t,"utf8"),f.push(t)}function _(e,t){const n=new Array(e.length);for(let i=0;i<e.length;i++)"string"===typeof e[i].chunk?n[i]=r.from(e[i],"utf8"):n[i]=e[i].chunk;this._write(r.concat(n),"binary",t)}function S(e,t,n){h.bufferedAmount>l&&setTimeout(S,c,e,t,n),u&&"string"===typeof e&&(e=r.from(e,"utf8"));try{h.send(e)}catch(i){return n(i)}n()}function C(e){h.close(),e()}return h.readyState===h.OPEN?n=f:(n=n=s(void 0,void 0,t),t.objectMode||(n._writev=_),g?h.addEventListener("open",y):h.onopen=y),n.socket=h,g?(h.addEventListener("close",b),h.addEventListener("error",v),h.addEventListener("message",w)):(h.onclose=b,h.onerror=v,h.onmessage=w),n}e.exports=c?m:g}).call(this,n("f28c"))},fe34:function(e,t,n){"use strict";e.exports=u;var r=n("9bfc").codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n("a493");function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(t,n){p(e,t,n)}))}function p(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}n("3fb5")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},fe3c:function(e,t,n){"use strict";const r=n(6),i=n(1),o=n("db34")("mqttjs:tls");function s(e,t){t.port=t.port||8883,t.host=t.hostname||t.host||"localhost",0===i.isIP(t.host)&&(t.servername=t.host),t.rejectUnauthorized=!1!==t.rejectUnauthorized,delete t.path,o("port %d host %s rejectUnauthorized %b",t.port,t.host,t.rejectUnauthorized);const n=r.connect(t);function s(r){t.rejectUnauthorized&&e.emit("error",r),n.end()}return n.on("secureConnect",(function(){t.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",s)})),n.on("error",s),n}e.exports=s}}]);
//# sourceMappingURL=chunk-585237fc.638f0739.js.map