12 lines
159 KiB
JavaScript
12 lines
159 KiB
JavaScript
import{d as xe,ag as Ge,A as Be,ah as Qe,G as Te,D as Oe,c as _e,e as me,f as we,h as fe,i as ce,ai as Je,F as Pe,j as De,k as ke,g as he,S as qe,J as Ze,T as Ye,t as Ie,y as Fe,aj as Xe,n as We,_ as Ee,p as Ke,a3 as ge,r as ye,b as He,ak as et,al as tt,q as Re,s as Le,am as rt,a as nt,l as je,an as it,ao as ze,ap as Ve,E as Me,aq as ot,C as st}from"./index-ccab2584.js";import{_ as Ue}from"./notData-cf10628e.js";import{c as Ce}from"./_commonjs-dynamic-modules-d7dd40bd.js";const at=["onClick"],ut={class:"breadcrumb-title"},lt=xe({__name:"Breadcrumb",setup(de){const ve=Ge(),s=Be(),v=Qe(),x=Te(),i=Oe(()=>x.themeConfig),a=Oe(()=>{var u;return(u=v.breadcrumbListGet[ve.matched[ve.matched.length-1].path])!=null?u:[]}),d=(f,u)=>{u!==a.value.length-1&&s.push(f.path)};return(f,u)=>{const e=_e("el-icon"),n=_e("el-breadcrumb-item"),o=_e("el-breadcrumb");return me(),we("div",{class:We(["breadcrumb-box",!i.value.breadcrumbIcon&&"no-icon"])},[fe(o,{"separator-icon":Fe(Xe)},{default:ce(()=>[fe(Je,{name:"breadcrumb"},{default:ce(()=>[(me(!0),we(Pe,null,De(a.value,(c,l)=>(me(),ke(n,{key:c.path},{default:ce(()=>[he("div",{class:"el-breadcrumb__inner is-link",onClick:_=>d(c,l)},[qe(fe(e,{class:"breadcrumb-icon"},{default:ce(()=>[(me(),ke(Ze(c.meta.icon)))]),_:2},1536),[[Ye,c.meta.icon&&i.value.breadcrumbIcon]]),he("span",ut,Ie(c.meta.title),1)],8,at)]),_:2},1024))),128))]),_:1})]),_:1},8,["separator-icon"])],2)}}});const ft=Ee(lt,[["__scopeId","data-v-0c1ab9e7"]]),ct={class:"tool-bar-lf"},ht=xe({__name:"ToolBarLeft",setup(de){const ve=Te(),s=Oe(()=>ve.themeConfig);return(v,x)=>(me(),we("div",ct,[s.value.breadcrumb?(me(),ke(ft,{key:0,id:"breadcrumb"})):Ke("",!0)]))}});const Qt=Ee(ht,[["__scopeId","data-v-2f06fc6a"]]);var $e={exports:{}};(function(de,ve){(function(s){de.exports=s()})(function(){return function(){function s(v,x,i){function a(u,e){if(!x[u]){if(!v[u]){var n=typeof Ce=="function"&&Ce;if(!e&&n)return n(u,!0);if(d)return d(u,!0);var o=new Error("Cannot find module '"+u+"'");throw o.code="MODULE_NOT_FOUND",o}var c=x[u]={exports:{}};v[u][0].call(c.exports,function(l){var _=v[u][1][l];return a(_||l)},c,c.exports,s,v,x,i)}return x[u].exports}for(var d=typeof Ce=="function"&&Ce,f=0;f<i.length;f++)a(i[f]);return a}return s}()({1:[function(s,v,x){(function(i,a){var d=s("events"),f=s("./store"),u=s("end-of-stream"),e=s("mqtt-packet"),n=s("readable-stream").Writable,o=s("inherits"),c=s("reinterval"),l=s("./validations"),_=s("xtend"),E=a.setImmediate||function(S){i.nextTick(S)},O={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0};function m(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function P(S,j,W){S.emit("packetsend",j);var M=e.writeToStream(j,S.stream);!M&&W?S.stream.once("drain",W):W&&W()}function R(S){S&&Object.keys(S).forEach(function(j){typeof S[j]=="function"&&(S[j](new Error("Connection closed")),delete S[j])})}function C(S,j,W){S.outgoingStore.put(j,function(ee){if(ee)return W&&W(ee);P(S,j,W)})}function T(){}function A(S,j){var W,M=this;if(!(this instanceof A))return new A(S,j);this.options=j||{};for(W in O)typeof this.options[W]>"u"?this.options[W]=O[W]:this.options[W]=j[W];this.options.clientId=typeof this.options.clientId=="string"?this.options.clientId:m(),this.streamBuilder=S,this.outgoingStore=this.options.outgoingStore||new f,this.incomingStore=this.options.incomingStore||new f,this.queueQoSZero=this.options.queueQoSZero===void 0?!0:this.options.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this.nextId=Math.max(1,Math.floor(Math.random()*65535)),this.outgoing={},this.on("connect",function(){if(this.disconnected)return;this.connected=!0;var g=this.outgoingStore.createStream();this.once("close",D),g.on("end",function(){M.removeListener("close",D)}),g.on("error",function(V){M.removeListener("close",D),M.emit("error",V)});function D(){g.destroy(),g=null}function F(){if(!!g){var V=g.read(1),Z;if(!V){g.once("readable",F);return}!M.disconnecting&&!M.reconnectTimer?(Z=M.outgoing[V.messageId],M.outgoing[V.messageId]=function(K,Q){Z&&Z(K,Q),F()},M._sendPacket(V)):g.destroy&&g.destroy()}}F()}),this.on("close",function(){this.connected=!1,clearTimeout(this.connackTimer)}),this.on("connect",this._setupPingTimer),this.on("connect",function(){var g=this.queue;function D(){var F=g.shift(),V=null;!F||(V=F.packet,M._sendPacket(V,function(Z){F.cb&&F.cb(Z),D()}))}D()});var ee=!0;this.on("connect",function(){!ee&&this.options.clean&&Object.keys(this._resubscribeTopics).length>0&&(this.options.resubscribe?(this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics)):this._resubscribeTopics={}),ee=!1}),this.on("close",function(){M.pingTimer!==null&&(M.pingTimer.clear(),M.pingTimer=null)}),this.on("close",this._setupReconnect),d.EventEmitter.call(this),this._setupStream()}o(A,d.EventEmitter),A.prototype._setupStream=function(){var S,j=this,W=new n,M=e.parser(this.options),ee=null,g=[];this._clearReconnect(),this.stream=this.streamBuilder(this),M.on("packet",function(V){g.push(V)});function D(){i.nextTick(F)}function F(){var V=g.shift(),Z=ee;V?j._handlePacket(V,D):(ee=null,Z())}W._write=function(V,Z,K){ee=K,M.parse(V),F()},this.stream.pipe(W),this.stream.on("error",T),u(this.stream,this.emit.bind(this,"close")),S=Object.create(this.options),S.cmd="connect",P(this,S),M.on("error",this.emit.bind(this,"error")),this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){j._cleanUp(!0)},this.options.connectTimeout)},A.prototype._handlePacket=function(S,j){switch(this.emit("packetreceive",S),S.cmd){case"publish":this._handlePublish(S,j);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(S),j();break;case"pubrel":this._handlePubrel(S,j);break;case"connack":this._handleConnack(S),j();break;case"pingresp":this._handlePingresp(S),j();break}},A.prototype._checkDisconnecting=function(S){return this.disconnecting&&(S?S(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},A.prototype.publish=function(S,j,W,M){var ee;typeof W=="function"&&(M=W,W=null);var g={qos:0,retain:!1,dup:!1};if(W=_(g,W),this._checkDisconnecting(M))return this;switch(ee={cmd:"publish",topic:S,payload:j,qos:W.qos,retain:W.retain,messageId:this._nextId(),dup:W.dup},W.qos){case 1:case 2:this.outgoing[ee.messageId]=M||T,this._sendPacket(ee);break;default:this._sendPacket(ee,M);break}return this},A.prototype.subscribe=function(){var S,j=Array.prototype.slice.call(arguments),W=[],M=j.shift(),ee=M.resubscribe,g=j.pop()||T,D=j.pop(),F,V=this;if(delete M.resubscribe,typeof M=="string"&&(M=[M]),typeof g!="function"&&(D=g,g=T),F=l.validateTopics(M),F!==null)return E(g,new Error("Invalid topic "+F)),this;if(this._checkDisconnecting(g))return this;var Z={qos:0};if(D=_(Z,D),Array.isArray(M)?M.forEach(function(Q){(V._resubscribeTopics[Q]<D.qos||!V._resubscribeTopics.hasOwnProperty(Q)||ee)&&W.push({topic:Q,qos:D.qos})}):Object.keys(M).forEach(function(Q){(V._resubscribeTopics[Q]<M[Q]||!V._resubscribeTopics.hasOwnProperty(Q)||ee)&&W.push({topic:Q,qos:M[Q]})}),S={cmd:"subscribe",subscriptions:W,qos:1,retain:!1,dup:!1,messageId:this._nextId()},!W.length){g(null,[]);return}if(this.options.resubscribe){var K=[];W.forEach(function(Q){V.options.reconnectPeriod>0&&(V._resubscribeTopics[Q.topic]=Q.qos,K.push(Q.topic))}),V.messageIdToTopic[S.messageId]=K}return this.outgoing[S.messageId]=function(Q,z){if(!Q)for(var N=z.granted,re=0;re<N.length;re+=1)W[re].qos=N[re];g(Q,W)},this._sendPacket(S),this},A.prototype.unsubscribe=function(S,j){var W={cmd:"unsubscribe",qos:1,messageId:this._nextId()},M=this;return j=j||T,this._checkDisconnecting(j)?this:(typeof S=="string"?W.unsubscriptions=[S]:typeof S=="object"&&S.length&&(W.unsubscriptions=S),this.options.resubscribe&&W.unsubscriptions.forEach(function(ee){delete M._resubscribeTopics[ee]}),this.outgoing[W.messageId]=j,this._sendPacket(W),this)},A.prototype.end=function(S,j){var W=this;typeof S=="function"&&(j=S,S=!1);function M(){W.disconnected=!0,W.incomingStore.close(function(){W.outgoingStore.close(function(){j&&j.apply(null,arguments),W.emit("end")})}),W._deferredReconnect&&W._deferredReconnect()}function ee(){W._cleanUp(S,E.bind(null,M))}return this.disconnecting?this:(this._clearReconnect(),this.disconnecting=!0,!S&&Object.keys(this.outgoing).length>0?this.once("outgoingEmpty",setTimeout.bind(null,ee,10)):ee(),this)},A.prototype.removeOutgoingMessage=function(S){var j=this.outgoing[S];return delete this.outgoing[S],this.outgoingStore.del({messageId:S},function(){j(new Error("Message removed"))}),this},A.prototype.reconnect=function(S){var j=this,W=function(){S?(j.options.incomingStore=S.incomingStore,j.options.outgoingStore=S.outgoingStore):(j.options.incomingStore=null,j.options.outgoingStore=null),j.incomingStore=j.options.incomingStore||new f,j.outgoingStore=j.options.outgoingStore||new f,j.disconnecting=!1,j.disconnected=!1,j._deferredReconnect=null,j._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=W:W(),this},A.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},A.prototype._setupReconnect=function(){var S=this;!S.disconnecting&&!S.reconnectTimer&&S.options.reconnectPeriod>0&&(this.reconnecting||(this.emit("offline"),this.reconnecting=!0),S.reconnectTimer=setInterval(function(){S._reconnect()},S.options.reconnectPeriod))},A.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},A.prototype._cleanUp=function(S,j){j&&this.stream.on("close",j),S?(this.options.reconnectPeriod===0&&this.options.clean&&R(this.outgoing),this.stream.destroy()):this._sendPacket({cmd:"disconnect"},E.bind(null,this.stream.end.bind(this.stream))),this.disconnecting||(this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(this.pingTimer.clear(),this.pingTimer=null),j&&!this.connected&&(this.stream.removeListener("close",j),j())},A.prototype._sendPacket=function(S,j){if(!this.connected){(S.qos||0)===0&&this.queueQoSZero||S.cmd!=="publish"?this.queue.push({packet:S,cb:j}):S.qos>0?(j=this.outgoing[S.messageId],this.outgoingStore.put(S,function(W){if(W)return j&&j(W)})):j&&j(new Error("No connection to broker"));return}switch(this._shiftPingInterval(),S.cmd){case"publish":break;case"pubrel":C(this,S,j);return;default:P(this,S,j);return}switch(S.qos){case 2:case 1:C(this,S,j);break;case 0:default:P(this,S,j);break}},A.prototype._setupPingTimer=function(){var S=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=c(function(){S._checkPing()},this.options.keepalive*1e3))},A.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},A.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},A.prototype._handlePingresp=function(){this.pingResp=!0},A.prototype._handleConnack=function(S){var j=S.returnCode,W=["","Unacceptable protocol version","Identifier rejected","Server unavailable","Bad username or password","Not authorized"];if(clearTimeout(this.connackTimer),j===0)this.reconnecting=!1,this.emit("connect",S);else if(j>0){var M=new Error("Connection refused: "+W[j]);M.code=j,this.emit("error",M)}},A.prototype._handlePublish=function(S,j){j=typeof j<"u"?j:T;var W=S.topic.toString(),M=S.payload,ee=S.qos,g=S.messageId,D=this;switch(ee){case 2:this.incomingStore.put(S,function(F){if(F)return j(F);D._sendPacket({cmd:"pubrec",messageId:g},j)});break;case 1:this.emit("message",W,M,S),this.handleMessage(S,function(F){if(F)return j(F);D._sendPacket({cmd:"puback",messageId:g},j)});break;case 0:this.emit("message",W,M,S),this.handleMessage(S,j);break}},A.prototype.handleMessage=function(S,j){j()},A.prototype._handleAck=function(S){var j=S.messageId,W=S.cmd,M=null,ee=this.outgoing[j],g=this;if(!!ee){switch(W){case"pubcomp":case"puback":delete this.outgoing[j],this.outgoingStore.del(S,ee);break;case"pubrec":M={cmd:"pubrel",qos:2,messageId:j},this._sendPacket(M);break;case"suback":if(delete this.outgoing[j],S.granted.length===1&&(S.granted[0]&128)!==0){var D=this.messageIdToTopic[j];D&&D.forEach(function(F){delete g._resubscribeTopics[F]})}ee(null,S);break;case"unsuback":delete this.outgoing[j],ee(null);break;default:g.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")}},A.prototype._handlePubrel=function(S,j){j=typeof j<"u"?j:T;var W=S.messageId,M=this,ee={cmd:"pubcomp",messageId:W};M.incomingStore.get(S,function(g,D){!g&&D.cmd!=="pubrel"?(M.emit("message",D.topic,D.payload,D),M.incomingStore.put(S,function(F){if(F)return j(F);M.handleMessage(D,function(V){if(V)return j(V);M._sendPacket(ee,j)})})):M._sendPacket(ee,j)})},A.prototype._nextId=function(){var S=this.nextId++;return this.nextId===65536&&(this.nextId=1),S},A.prototype.getLastMessageId=function(){return this.nextId===1?65535:this.nextId-1},v.exports=A}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./store":6,"./validations":7,_process:92,"end-of-stream":17,events:78,inherits:80,"mqtt-packet":85,"readable-stream":106,reinterval:107,xtend:120}],2:[function(s,v,x){var i=s("net");function a(d,f){var u,e;return f.port=f.port||1883,f.hostname=f.hostname||f.host||"localhost",u=f.port,e=f.hostname,i.createConnection(u,e)}v.exports=a},{net:11}],3:[function(s,v,x){var i=s("tls");function a(d,f){var u;f.port=f.port||8883,f.host=f.hostname||f.host||"localhost",f.rejectUnauthorized=f.rejectUnauthorized!==!1,delete f.path,u=i.connect(f),u.on("secureConnect",function(){f.rejectUnauthorized&&!u.authorized?u.emit("error",new Error("TLS not authorized")):u.removeListener("error",e)});function e(n){f.rejectUnauthorized&&d.emit("error",n),u.end()}return u.on("error",e),u}v.exports=a},{tls:11}],4:[function(s,v,x){(function(i){var a=s("websocket-stream"),d=s("url"),f=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],u=i.title==="browser";function e(_,E){var O=_.protocol+"://"+_.hostname+":"+_.port+_.path;return typeof _.transformWsUrl=="function"&&(O=_.transformWsUrl(O,_,E)),O}function n(_){_.hostname||(_.hostname="localhost"),_.port||(_.protocol==="wss"?_.port=443:_.port=80),_.path||(_.path="/"),_.wsOptions||(_.wsOptions={}),!u&&_.protocol==="wss"&&f.forEach(function(E){_.hasOwnProperty(E)&&!_.wsOptions.hasOwnProperty(E)&&(_.wsOptions[E]=_[E])})}function o(_,E){var O=E.protocolId==="MQIsdp"&&E.protocolVersion===3?"mqttv3.1":"mqtt";n(E);var m=e(E,_);return a(m,[O],E.wsOptions)}function c(_,E){return o(_,E)}function l(_,E){if(E.hostname||(E.hostname=E.host),!E.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");var O=d.parse(document.URL);E.hostname=O.hostname,E.port||(E.port=O.port)}return o(_,E)}u?v.exports=l:v.exports=c}).call(this,s("_process"))},{_process:92,url:112,"websocket-stream":117}],5:[function(s,v,x){var i=!1,a=[];function d(l){i?wx.sendSocketMessage({data:l.buffer||l}):a.push(l)}function f(l,_){var E={OPEN:1,CLOSING:2,CLOSED:3,readyState:i?1:0,send:d,close:wx.closeSocket,onopen:null,onmessage:null,onclose:null,onerror:null};return wx.connectSocket({url:l,protocols:_}),wx.onSocketOpen(function(O){E.readyState=E.OPEN,i=!0;for(var m=0;m<a.length;m++)d(a[m]);a=[],E.onopen&&E.onopen.apply(E,arguments)}),wx.onSocketMessage(function(O){E.onmessage&&E.onmessage.apply(E,arguments)}),wx.onSocketClose(function(){E.onclose&&E.onclose.apply(E,arguments),E.readyState=E.CLOSED,i=!1}),wx.onSocketError(function(){E.onerror&&E.onerror.apply(E,arguments),E.readyState=E.CLOSED,i=!1}),E}var u=s("websocket-stream");function e(l,_){var E=l.protocol==="wxs"?"wss":"ws",O=E+"://"+l.hostname+l.path;return l.port&&l.port!==80&&l.port!==443&&(O=E+"://"+l.hostname+":"+l.port+l.path),typeof l.transformWsUrl=="function"&&(O=l.transformWsUrl(O,l,_)),O}function n(l){l.hostname||(l.hostname="localhost"),l.path||(l.path="/"),l.wsOptions||(l.wsOptions={})}function o(l,_){var E=_.protocolId==="MQIsdp"&&_.protocolVersion===3?"mqttv3.1":"mqtt";n(_);var O=e(_,l);return u(f(O,[E]))}function c(l,_){if(_.hostname=_.hostname||_.host,!_.hostname)throw new Error("Could not determine host. Specify host manually.");return o(l,_)}v.exports=c},{"websocket-stream":117}],6:[function(s,v,x){(function(i){var a=s("xtend"),d=s("readable-stream").Readable,f={objectMode:!0},u={clean:!0},e=s("es6-map");function n(o){if(!(this instanceof n))return new n(o);this.options=o||{},this.options=a(u,o),this._inflights=new e}n.prototype.put=function(o,c){return this._inflights.set(o.messageId,o),c&&c(),this},n.prototype.createStream=function(){var o=new d(f),c=!1,l=[],_=0;return this._inflights.forEach(function(E,O){l.push(E)}),o._read=function(){!c&&_<l.length?this.push(l[_++]):this.push(null)},o.destroy=function(){if(!c){var E=this;c=!0,i.nextTick(function(){E.emit("close")})}},o},n.prototype.del=function(o,c){return o=this._inflights.get(o.messageId),o?(this._inflights.delete(o.messageId),c(null,o)):c&&c(new Error("missing packet")),this},n.prototype.get=function(o,c){return o=this._inflights.get(o.messageId),o?c(null,o):c&&c(new Error("missing packet")),this},n.prototype.close=function(o){this.options.clean&&(this._inflights=null),o&&o()},v.exports=n}).call(this,s("_process"))},{_process:92,"es6-map":66,"readable-stream":106,xtend:120}],7:[function(s,v,x){function i(d){for(var f=d.split("/"),u=0;u<f.length;u++)if(f[u]!=="+"){if(f[u]==="#")return u===f.length-1;if(f[u].indexOf("+")!==-1||f[u].indexOf("#")!==-1)return!1}return!0}function a(d){if(d.length===0)return"empty_topic_list";for(var f=0;f<d.length;f++)if(!i(d[f]))return d[f];return null}v.exports={validateTopics:a}},{}],8:[function(s,v,x){(function(i){var a=s("../client"),d=s("../store"),f=s("url"),u=s("xtend"),e={};i.title!=="browser"?(e.mqtt=s("./tcp"),e.tcp=s("./tcp"),e.ssl=s("./tls"),e.tls=s("./tls"),e.mqtts=s("./tls")):(e.wx=s("./wx"),e.wxs=s("./wx")),e.ws=s("./ws"),e.wss=s("./ws");function n(c){var l;c.auth&&(l=c.auth.match(/^(.+):(.+)$/),l?(c.username=l[1],c.password=l[2]):c.username=c.auth)}function o(c,l){if(typeof c=="object"&&!l&&(l=c,c=null),l=l||{},c){var _=f.parse(c,!0);if(_.port!=null&&(_.port=Number(_.port)),l=u(_,l),l.protocol===null)throw new Error("Missing protocol");l.protocol=l.protocol.replace(/:$/,"")}if(n(l),l.query&&typeof l.query.clientId=="string"&&(l.clientId=l.query.clientId),l.cert&&l.key)if(l.protocol){if(["mqtts","wss","wxs"].indexOf(l.protocol)===-1)switch(l.protocol){case"mqtt":l.protocol="mqtts";break;case"ws":l.protocol="wss";break;case"wx":l.protocol="wxs";break;default:throw new Error('Unknown protocol for secure connection: "'+l.protocol+'"!')}}else throw new Error("Missing secure protocol key");if(!e[l.protocol]){var E=["mqtts","wss"].indexOf(l.protocol)!==-1;l.protocol=["mqtt","mqtts","ws","wss","wx","wxs"].filter(function(m,P){return E&&P%2===0?!1:typeof e[m]=="function"})[0]}if(l.clean===!1&&!l.clientId)throw new Error("Missing clientId for unclean clients");l.protocol&&(l.defaultProtocol=l.protocol);function O(m){return l.servers&&((!m._reconnectCount||m._reconnectCount===l.servers.length)&&(m._reconnectCount=0),l.host=l.servers[m._reconnectCount].host,l.port=l.servers[m._reconnectCount].port,l.protocol=l.servers[m._reconnectCount].protocol?l.servers[m._reconnectCount].protocol:l.defaultProtocol,l.hostname=l.host,m._reconnectCount++),e[l.protocol](m,l)}return new a(O,l)}v.exports=o,v.exports.connect=o,v.exports.MqttClient=a,v.exports.Store=d}).call(this,s("_process"))},{"../client":1,"../store":6,"./tcp":2,"./tls":3,"./ws":4,"./wx":5,_process:92,url:112,xtend:120}],9:[function(s,v,x){x.byteLength=o,x.toByteArray=l,x.fromByteArray=O;for(var i=[],a=[],d=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,e=f.length;u<e;++u)i[u]=f[u],a[f.charCodeAt(u)]=u;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63;function n(m){var P=m.length;if(P%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var R=m.indexOf("=");R===-1&&(R=P);var C=R===P?0:4-R%4;return[R,C]}function o(m){var P=n(m),R=P[0],C=P[1];return(R+C)*3/4-C}function c(m,P,R){return(P+R)*3/4-R}function l(m){for(var P,R=n(m),C=R[0],T=R[1],A=new d(c(m,C,T)),S=0,j=T>0?C-4:C,W=0;W<j;W+=4)P=a[m.charCodeAt(W)]<<18|a[m.charCodeAt(W+1)]<<12|a[m.charCodeAt(W+2)]<<6|a[m.charCodeAt(W+3)],A[S++]=P>>16&255,A[S++]=P>>8&255,A[S++]=P&255;return T===2&&(P=a[m.charCodeAt(W)]<<2|a[m.charCodeAt(W+1)]>>4,A[S++]=P&255),T===1&&(P=a[m.charCodeAt(W)]<<10|a[m.charCodeAt(W+1)]<<4|a[m.charCodeAt(W+2)]>>2,A[S++]=P>>8&255,A[S++]=P&255),A}function _(m){return i[m>>18&63]+i[m>>12&63]+i[m>>6&63]+i[m&63]}function E(m,P,R){for(var C,T=[],A=P;A<R;A+=3)C=(m[A]<<16&16711680)+(m[A+1]<<8&65280)+(m[A+2]&255),T.push(_(C));return T.join("")}function O(m){for(var P,R=m.length,C=R%3,T=[],A=16383,S=0,j=R-C;S<j;S+=A)T.push(E(m,S,S+A>j?j:S+A));return C===1?(P=m[R-1],T.push(i[P>>2]+i[P<<4&63]+"==")):C===2&&(P=(m[R-2]<<8)+m[R-1],T.push(i[P>>10]+i[P>>4&63]+i[P<<2&63]+"=")),T.join("")}},{}],10:[function(s,v,x){var i=s("readable-stream/duplex"),a=s("util"),d=s("safe-buffer").Buffer;function f(u){if(!(this instanceof f))return new f(u);if(this._bufs=[],this.length=0,typeof u=="function"){this._callback=u;var e=function(o){this._callback&&(this._callback(o),this._callback=null)}.bind(this);this.on("pipe",function(o){o.on("error",e)}),this.on("unpipe",function(o){o.removeListener("error",e)})}else this.append(u);i.call(this)}a.inherits(f,i),f.prototype._offset=function(e){var n=0,o=0,c;if(e===0)return[0,0];for(;o<this._bufs.length;o++){if(c=n+this._bufs[o].length,e<c||o==this._bufs.length-1)return[o,e-n];n=c}},f.prototype.append=function(e){var n=0;if(d.isBuffer(e))this._appendBuffer(e);else if(Array.isArray(e))for(;n<e.length;n++)this.append(e[n]);else if(e instanceof f)for(;n<e._bufs.length;n++)this.append(e._bufs[n]);else e!=null&&(typeof e=="number"&&(e=e.toString()),this._appendBuffer(d.from(e)));return this},f.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},f.prototype._write=function(e,n,o){this._appendBuffer(e),typeof o=="function"&&o()},f.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)},f.prototype.end=function(e){i.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},f.prototype.get=function(e){return this.slice(e,e+1)[0]},f.prototype.slice=function(e,n){return typeof e=="number"&&e<0&&(e+=this.length),typeof n=="number"&&n<0&&(n+=this.length),this.copy(null,0,e,n)},f.prototype.copy=function(e,n,o,c){if((typeof o!="number"||o<0)&&(o=0),(typeof c!="number"||c>this.length)&&(c=this.length),o>=this.length||c<=0)return e||d.alloc(0);var l=!!e,_=this._offset(o),E=c-o,O=E,m=l&&n||0,P=_[1],R,C;if(o===0&&c==this.length){if(!l)return this._bufs.length===1?this._bufs[0]:d.concat(this._bufs,this.length);for(C=0;C<this._bufs.length;C++)this._bufs[C].copy(e,m),m+=this._bufs[C].length;return e}if(O<=this._bufs[_[0]].length-P)return l?this._bufs[_[0]].copy(e,n,P,P+O):this._bufs[_[0]].slice(P,P+O);for(l||(e=d.allocUnsafe(E)),C=_[0];C<this._bufs.length;C++){if(R=this._bufs[C].length-P,O>R)this._bufs[C].copy(e,m,P);else{this._bufs[C].copy(e,m,P,P+O);break}m+=R,O-=R,P&&(P=0)}return e},f.prototype.shallowSlice=function(e,n){e=e||0,n=n||this.length,e<0&&(e+=this.length),n<0&&(n+=this.length);var o=this._offset(e),c=this._offset(n),l=this._bufs.slice(o[0],c[0]+1);return c[1]==0?l.pop():l[l.length-1]=l[l.length-1].slice(0,c[1]),o[1]!=0&&(l[0]=l[0].slice(o[1])),new f(l)},f.prototype.toString=function(e,n,o){return this.slice(n,o).toString(e)},f.prototype.consume=function(e){for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this},f.prototype.duplicate=function(){for(var e=0,n=new f;e<this._bufs.length;e++)n.append(this._bufs[e]);return n},f.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var u={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};for(var e in u)(function(n){f.prototype[n]=function(o){return this.slice(o,o+u[n])[n](0)}})(e)}(),v.exports=f},{"readable-stream/duplex":97,"safe-buffer":108,util:116}],11:[function(s,v,x){},{}],12:[function(s,v,x){var i=s("base64-js"),a=s("ieee754");x.Buffer=e,x.SlowBuffer=R,x.INSPECT_MAX_BYTES=50;var d=2147483647;x.kMaxLength=d,e.TYPED_ARRAY_SUPPORT=f(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function f(){try{var h=new Uint8Array(1);return h.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},h.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(!!e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(!!e.isBuffer(this))return this.byteOffset}});function u(h){if(h>d)throw new RangeError('The value "'+h+'" is invalid for option "size"');var t=new Uint8Array(h);return t.__proto__=e.prototype,t}function e(h,t,r){if(typeof h=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(h)}return n(h,t,r)}typeof Symbol<"u"&&Symbol.species!=null&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192;function n(h,t,r){if(typeof h=="string")return _(h,t);if(ArrayBuffer.isView(h))return E(h);if(h==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(Y(h,ArrayBuffer)||h&&Y(h.buffer,ArrayBuffer))return O(h,t,r);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var b=h.valueOf&&h.valueOf();if(b!=null&&b!==h)return e.from(b,t,r);var L=m(h);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return e.from(h[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}e.from=function(h,t,r){return n(h,t,r)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array;function o(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function c(h,t,r){return o(h),h<=0?u(h):t!==void 0?typeof r=="string"?u(h).fill(t,r):u(h).fill(t):u(h)}e.alloc=function(h,t,r){return c(h,t,r)};function l(h){return o(h),u(h<0?0:P(h)|0)}e.allocUnsafe=function(h){return l(h)},e.allocUnsafeSlow=function(h){return l(h)};function _(h,t){if((typeof t!="string"||t==="")&&(t="utf8"),!e.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=C(h,t)|0,b=u(r),L=b.write(h,t);return L!==r&&(b=b.slice(0,L)),b}function E(h){for(var t=h.length<0?0:P(h.length)|0,r=u(t),b=0;b<t;b+=1)r[b]=h[b]&255;return r}function O(h,t,r){if(t<0||h.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var b;return t===void 0&&r===void 0?b=new Uint8Array(h):r===void 0?b=new Uint8Array(h,t):b=new Uint8Array(h,t,r),b.__proto__=e.prototype,b}function m(h){if(e.isBuffer(h)){var t=P(h.length)|0,r=u(t);return r.length===0||h.copy(r,0,0,t),r}if(h.length!==void 0)return typeof h.length!="number"||oe(h.length)?u(0):E(h);if(h.type==="Buffer"&&Array.isArray(h.data))return E(h.data)}function P(h){if(h>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return h|0}function R(h){return+h!=h&&(h=0),e.alloc(+h)}e.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==e.prototype},e.compare=function(t,r){if(Y(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),Y(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var b=t.length,L=r.length,q=0,X=Math.min(b,L);q<X;++q)if(t[q]!==r[q]){b=t[q],L=r[q];break}return b<L?-1:L<b?1:0},e.isEncoding=function(t){switch(String(t).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}},e.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return e.alloc(0);var b;if(r===void 0)for(r=0,b=0;b<t.length;++b)r+=t[b].length;var L=e.allocUnsafe(r),q=0;for(b=0;b<t.length;++b){var X=t[b];if(Y(X,Uint8Array)&&(X=e.from(X)),!e.isBuffer(X))throw new TypeError('"list" argument must be an Array of Buffers');X.copy(L,q),q+=X.length}return L};function C(h,t){if(e.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||Y(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);var r=h.length,b=arguments.length>2&&arguments[2]===!0;if(!b&&r===0)return 0;for(var L=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ne(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return w(h).length;default:if(L)return b?-1:ne(h).length;t=(""+t).toLowerCase(),L=!0}}e.byteLength=C;function T(h,t,r){var b=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(h||(h="utf8");;)switch(h){case"hex":return re(this,t,r);case"utf8":case"utf-8":return Z(this,t,r);case"ascii":return z(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return V(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(b)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),b=!0}}e.prototype._isBuffer=!0;function A(h,t,r){var b=h[t];h[t]=h[r],h[r]=b}e.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)A(this,r,r+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)A(this,r,r+3),A(this,r+1,r+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)A(this,r,r+7),A(this,r+1,r+6),A(this,r+2,r+5),A(this,r+3,r+4);return this},e.prototype.toString=function(){var t=this.length;return t===0?"":arguments.length===0?Z(this,0,t):T.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:e.compare(this,t)===0},e.prototype.inspect=function(){var t="",r=x.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},e.prototype.compare=function(t,r,b,L,q){if(Y(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),b===void 0&&(b=t?t.length:0),L===void 0&&(L=0),q===void 0&&(q=this.length),r<0||b>t.length||L<0||q>this.length)throw new RangeError("out of range index");if(L>=q&&r>=b)return 0;if(L>=q)return-1;if(r>=b)return 1;if(r>>>=0,b>>>=0,L>>>=0,q>>>=0,this===t)return 0;for(var X=q-L,se=b-r,ae=Math.min(X,se),ue=this.slice(L,q),pe=t.slice(r,b),le=0;le<ae;++le)if(ue[le]!==pe[le]){X=ue[le],se=pe[le];break}return X<se?-1:se<X?1:0};function S(h,t,r,b,L){if(h.length===0)return-1;if(typeof r=="string"?(b=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,oe(r)&&(r=L?0:h.length-1),r<0&&(r=h.length+r),r>=h.length){if(L)return-1;r=h.length-1}else if(r<0)if(L)r=0;else return-1;if(typeof t=="string"&&(t=e.from(t,b)),e.isBuffer(t))return t.length===0?-1:j(h,t,r,b,L);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(h,t,r):Uint8Array.prototype.lastIndexOf.call(h,t,r):j(h,[t],r,b,L);throw new TypeError("val must be string, number or Buffer")}function j(h,t,r,b,L){var q=1,X=h.length,se=t.length;if(b!==void 0&&(b=String(b).toLowerCase(),b==="ucs2"||b==="ucs-2"||b==="utf16le"||b==="utf-16le")){if(h.length<2||t.length<2)return-1;q=2,X/=2,se/=2,r/=2}function ae(Se,Ne){return q===1?Se[Ne]:Se.readUInt16BE(Ne*q)}var ue;if(L){var pe=-1;for(ue=r;ue<X;ue++)if(ae(h,ue)===ae(t,pe===-1?0:ue-pe)){if(pe===-1&&(pe=ue),ue-pe+1===se)return pe*q}else pe!==-1&&(ue-=ue-pe),pe=-1}else for(r+se>X&&(r=X-se),ue=r;ue>=0;ue--){for(var le=!0,be=0;be<se;be++)if(ae(h,ue+be)!==ae(t,be)){le=!1;break}if(le)return ue}return-1}e.prototype.includes=function(t,r,b){return this.indexOf(t,r,b)!==-1},e.prototype.indexOf=function(t,r,b){return S(this,t,r,b,!0)},e.prototype.lastIndexOf=function(t,r,b){return S(this,t,r,b,!1)};function W(h,t,r,b){r=Number(r)||0;var L=h.length-r;b?(b=Number(b),b>L&&(b=L)):b=L;var q=t.length;b>q/2&&(b=q/2);for(var X=0;X<b;++X){var se=parseInt(t.substr(X*2,2),16);if(oe(se))return X;h[r+X]=se}return X}function M(h,t,r,b){return G(ne(t,h.length-r),h,r,b)}function ee(h,t,r,b){return G(ie(t),h,r,b)}function g(h,t,r,b){return ee(h,t,r,b)}function D(h,t,r,b){return G(w(t),h,r,b)}function F(h,t,r,b){return G(y(t,h.length-r),h,r,b)}e.prototype.write=function(t,r,b,L){if(r===void 0)L="utf8",b=this.length,r=0;else if(b===void 0&&typeof r=="string")L=r,b=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(b)?(b=b>>>0,L===void 0&&(L="utf8")):(L=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var q=this.length-r;if((b===void 0||b>q)&&(b=q),t.length>0&&(b<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var X=!1;;)switch(L){case"hex":return W(this,t,r,b);case"utf8":case"utf-8":return M(this,t,r,b);case"ascii":return ee(this,t,r,b);case"latin1":case"binary":return g(this,t,r,b);case"base64":return D(this,t,r,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r,b);default:if(X)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),X=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(h,t,r){return t===0&&r===h.length?i.fromByteArray(h):i.fromByteArray(h.slice(t,r))}function Z(h,t,r){r=Math.min(h.length,r);for(var b=[],L=t;L<r;){var q=h[L],X=null,se=q>239?4:q>223?3:q>191?2:1;if(L+se<=r){var ae,ue,pe,le;switch(se){case 1:q<128&&(X=q);break;case 2:ae=h[L+1],(ae&192)===128&&(le=(q&31)<<6|ae&63,le>127&&(X=le));break;case 3:ae=h[L+1],ue=h[L+2],(ae&192)===128&&(ue&192)===128&&(le=(q&15)<<12|(ae&63)<<6|ue&63,le>2047&&(le<55296||le>57343)&&(X=le));break;case 4:ae=h[L+1],ue=h[L+2],pe=h[L+3],(ae&192)===128&&(ue&192)===128&&(pe&192)===128&&(le=(q&15)<<18|(ae&63)<<12|(ue&63)<<6|pe&63,le>65535&&le<1114112&&(X=le))}}X===null?(X=65533,se=1):X>65535&&(X-=65536,b.push(X>>>10&1023|55296),X=56320|X&1023),b.push(X),L+=se}return Q(b)}var K=4096;function Q(h){var t=h.length;if(t<=K)return String.fromCharCode.apply(String,h);for(var r="",b=0;b<t;)r+=String.fromCharCode.apply(String,h.slice(b,b+=K));return r}function z(h,t,r){var b="";r=Math.min(h.length,r);for(var L=t;L<r;++L)b+=String.fromCharCode(h[L]&127);return b}function N(h,t,r){var b="";r=Math.min(h.length,r);for(var L=t;L<r;++L)b+=String.fromCharCode(h[L]);return b}function re(h,t,r){var b=h.length;(!t||t<0)&&(t=0),(!r||r<0||r>b)&&(r=b);for(var L="",q=t;q<r;++q)L+=te(h[q]);return L}function B(h,t,r){for(var b=h.slice(t,r),L="",q=0;q<b.length;q+=2)L+=String.fromCharCode(b[q]+b[q+1]*256);return L}e.prototype.slice=function(t,r){var b=this.length;t=~~t,r=r===void 0?b:~~r,t<0?(t+=b,t<0&&(t=0)):t>b&&(t=b),r<0?(r+=b,r<0&&(r=0)):r>b&&(r=b),r<t&&(r=t);var L=this.subarray(t,r);return L.__proto__=e.prototype,L};function k(h,t,r){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+t>r)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUIntLE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=this[t],q=1,X=0;++X<r&&(q*=256);)L+=this[t+X]*q;return L},e.prototype.readUIntBE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=this[t+--r],q=1;r>0&&(q*=256);)L+=this[t+--r]*q;return L},e.prototype.readUInt8=function(t,r){return t=t>>>0,r||k(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||k(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||k(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},e.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||k(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=this[t],q=1,X=0;++X<r&&(q*=256);)L+=this[t+X]*q;return q*=128,L>=q&&(L-=Math.pow(2,8*r)),L},e.prototype.readIntBE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=r,q=1,X=this[t+--L];L>0&&(q*=256);)X+=this[t+--L]*q;return q*=128,X>=q&&(X-=Math.pow(2,8*r)),X},e.prototype.readInt8=function(t,r){return t=t>>>0,r||k(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},e.prototype.readInt16LE=function(t,r){t=t>>>0,r||k(t,2,this.length);var b=this[t]|this[t+1]<<8;return b&32768?b|4294901760:b},e.prototype.readInt16BE=function(t,r){t=t>>>0,r||k(t,2,this.length);var b=this[t+1]|this[t]<<8;return b&32768?b|4294901760:b},e.prototype.readInt32LE=function(t,r){return t=t>>>0,r||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,r){return t=t>>>0,r||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,r){return t=t>>>0,r||k(t,4,this.length),a.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,r){return t=t>>>0,r||k(t,4,this.length),a.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||k(t,8,this.length),a.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||k(t,8,this.length),a.read(this,t,!1,52,8)};function p(h,t,r,b,L,q){if(!e.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>L||t<q)throw new RangeError('"value" argument is out of bounds');if(r+b>h.length)throw new RangeError("Index out of range")}e.prototype.writeUIntLE=function(t,r,b,L){if(t=+t,r=r>>>0,b=b>>>0,!L){var q=Math.pow(2,8*b)-1;p(this,t,r,b,q,0)}var X=1,se=0;for(this[r]=t&255;++se<b&&(X*=256);)this[r+se]=t/X&255;return r+b},e.prototype.writeUIntBE=function(t,r,b,L){if(t=+t,r=r>>>0,b=b>>>0,!L){var q=Math.pow(2,8*b)-1;p(this,t,r,b,q,0)}var X=b-1,se=1;for(this[r+X]=t&255;--X>=0&&(se*=256);)this[r+X]=t/se&255;return r+b},e.prototype.writeUInt8=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,1,255,0),this[r]=t&255,r+1},e.prototype.writeUInt16LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2},e.prototype.writeUInt16BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2},e.prototype.writeUInt32LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4},e.prototype.writeUInt32BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4},e.prototype.writeIntLE=function(t,r,b,L){if(t=+t,r=r>>>0,!L){var q=Math.pow(2,8*b-1);p(this,t,r,b,q-1,-q)}var X=0,se=1,ae=0;for(this[r]=t&255;++X<b&&(se*=256);)t<0&&ae===0&&this[r+X-1]!==0&&(ae=1),this[r+X]=(t/se>>0)-ae&255;return r+b},e.prototype.writeIntBE=function(t,r,b,L){if(t=+t,r=r>>>0,!L){var q=Math.pow(2,8*b-1);p(this,t,r,b,q-1,-q)}var X=b-1,se=1,ae=0;for(this[r+X]=t&255;--X>=0&&(se*=256);)t<0&&ae===0&&this[r+X+1]!==0&&(ae=1),this[r+X]=(t/se>>0)-ae&255;return r+b},e.prototype.writeInt8=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1},e.prototype.writeInt16LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2},e.prototype.writeInt16BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2},e.prototype.writeInt32LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},e.prototype.writeInt32BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function I(h,t,r,b,L,q){if(r+b>h.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(h,t,r,b,L){return t=+t,r=r>>>0,L||I(h,t,r,4),a.write(h,t,r,b,23,4),r+4}e.prototype.writeFloatLE=function(t,r,b){return U(this,t,r,!0,b)},e.prototype.writeFloatBE=function(t,r,b){return U(this,t,r,!1,b)};function $(h,t,r,b,L){return t=+t,r=r>>>0,L||I(h,t,r,8),a.write(h,t,r,b,52,8),r+8}e.prototype.writeDoubleLE=function(t,r,b){return $(this,t,r,!0,b)},e.prototype.writeDoubleBE=function(t,r,b){return $(this,t,r,!1,b)},e.prototype.copy=function(t,r,b,L){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(b||(b=0),!L&&L!==0&&(L=this.length),r>=t.length&&(r=t.length),r||(r=0),L>0&&L<b&&(L=b),L===b||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(b<0||b>=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),t.length-r<L-b&&(L=t.length-r+b);var q=L-b;if(this===t&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(r,b,L);else if(this===t&&b<r&&r<L)for(var X=q-1;X>=0;--X)t[X+r]=this[X+b];else Uint8Array.prototype.set.call(t,this.subarray(b,L),r);return q},e.prototype.fill=function(t,r,b,L){if(typeof t=="string"){if(typeof r=="string"?(L=r,r=0,b=this.length):typeof b=="string"&&(L=b,b=this.length),L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!e.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(t.length===1){var q=t.charCodeAt(0);(L==="utf8"&&q<128||L==="latin1")&&(t=q)}}else typeof t=="number"&&(t=t&255);if(r<0||this.length<r||this.length<b)throw new RangeError("Out of range index");if(b<=r)return this;r=r>>>0,b=b===void 0?this.length:b>>>0,t||(t=0);var X;if(typeof t=="number")for(X=r;X<b;++X)this[X]=t;else{var se=e.isBuffer(t)?t:e.from(t,L),ae=se.length;if(ae===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(X=0;X<b-r;++X)this[X+r]=se[X%ae]}return this};var H=/[^+/0-9A-Za-z-_]/g;function J(h){if(h=h.split("=")[0],h=h.trim().replace(H,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function te(h){return h<16?"0"+h.toString(16):h.toString(16)}function ne(h,t){t=t||1/0;for(var r,b=h.length,L=null,q=[],X=0;X<b;++X){if(r=h.charCodeAt(X),r>55295&&r<57344){if(!L){if(r>56319){(t-=3)>-1&&q.push(239,191,189);continue}else if(X+1===b){(t-=3)>-1&&q.push(239,191,189);continue}L=r;continue}if(r<56320){(t-=3)>-1&&q.push(239,191,189),L=r;continue}r=(L-55296<<10|r-56320)+65536}else L&&(t-=3)>-1&&q.push(239,191,189);if(L=null,r<128){if((t-=1)<0)break;q.push(r)}else if(r<2048){if((t-=2)<0)break;q.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;q.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;q.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return q}function ie(h){for(var t=[],r=0;r<h.length;++r)t.push(h.charCodeAt(r)&255);return t}function y(h,t){for(var r,b,L,q=[],X=0;X<h.length&&!((t-=2)<0);++X)r=h.charCodeAt(X),b=r>>8,L=r%256,q.push(L),q.push(b);return q}function w(h){return i.toByteArray(J(h))}function G(h,t,r,b){for(var L=0;L<b&&!(L+r>=t.length||L>=h.length);++L)t[L+r]=h[L];return L}function Y(h,t){return h instanceof t||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===t.name}function oe(h){return h!==h}},{"base64-js":9,ieee754:79}],13:[function(s,v,x){(function(i){function a(C){return Array.isArray?Array.isArray(C):R(C)==="[object Array]"}x.isArray=a;function d(C){return typeof C=="boolean"}x.isBoolean=d;function f(C){return C===null}x.isNull=f;function u(C){return C==null}x.isNullOrUndefined=u;function e(C){return typeof C=="number"}x.isNumber=e;function n(C){return typeof C=="string"}x.isString=n;function o(C){return typeof C=="symbol"}x.isSymbol=o;function c(C){return C===void 0}x.isUndefined=c;function l(C){return R(C)==="[object RegExp]"}x.isRegExp=l;function _(C){return typeof C=="object"&&C!==null}x.isObject=_;function E(C){return R(C)==="[object Date]"}x.isDate=E;function O(C){return R(C)==="[object Error]"||C instanceof Error}x.isError=O;function m(C){return typeof C=="function"}x.isFunction=m;function P(C){return C===null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||typeof C=="symbol"||typeof C>"u"}x.isPrimitive=P,x.isBuffer=i.isBuffer;function R(C){return Object.prototype.toString.call(C)}}).call(this,{isBuffer:s("../../is-buffer/index.js")})},{"../../is-buffer/index.js":81}],14:[function(s,v,x){var i=s("es5-ext/object/copy"),a=s("es5-ext/object/normalize-options"),d=s("es5-ext/object/valid-callable"),f=s("es5-ext/object/map"),u=s("es5-ext/object/valid-callable"),e=s("es5-ext/object/valid-value"),n=Function.prototype.bind,o=Object.defineProperty,c=Object.prototype.hasOwnProperty,l;l=function(_,E,O){var m=e(E)&&u(E.value),P;return P=i(E),delete P.writable,delete P.value,P.get=function(){return!O.overwriteDefinition&&c.call(this,_)?m:(E.value=n.call(m,O.resolveContext?O.resolveContext(this):this),o(this,_,E),this[_])},P},v.exports=function(_){var E=a(arguments[1]);return E.resolveContext!=null&&d(E.resolveContext),f(_,function(O,m){return l(m,O,E)})}},{"es5-ext/object/copy":38,"es5-ext/object/map":47,"es5-ext/object/normalize-options":48,"es5-ext/object/valid-callable":53,"es5-ext/object/valid-value":54}],15:[function(s,v,x){var i=s("es5-ext/object/assign"),a=s("es5-ext/object/normalize-options"),d=s("es5-ext/object/is-callable"),f=s("es5-ext/string/#/contains"),u;u=v.exports=function(e,n){var o,c,l,_,E;return arguments.length<2||typeof e!="string"?(_=n,n=e,e=null):_=arguments[2],e==null?(o=l=!0,c=!1):(o=f.call(e,"c"),c=f.call(e,"e"),l=f.call(e,"w")),E={value:n,configurable:o,enumerable:c,writable:l},_?i(a(_),E):E},u.gs=function(e,n,o){var c,l,_,E;return typeof e!="string"?(_=o,o=n,n=e,e=null):_=arguments[3],n==null?n=void 0:d(n)?o==null?o=void 0:d(o)||(_=o,o=void 0):(_=n,n=o=void 0),e==null?(c=!0,l=!1):(c=f.call(e,"c"),l=f.call(e,"e")),E={get:n,set:o,configurable:c,enumerable:l},_?i(a(_),E):E}},{"es5-ext/object/assign":35,"es5-ext/object/is-callable":41,"es5-ext/object/normalize-options":48,"es5-ext/string/#/contains":55}],16:[function(s,v,x){(function(i,a){var d=s("readable-stream"),f=s("end-of-stream"),u=s("inherits"),e=s("stream-shift"),n=a.from&&a.from!==Uint8Array.from?a.from([0]):new a([0]),o=function(m,P){m._corked?m.once("uncork",P):P()},c=function(m,P){m._autoDestroy&&m.destroy(P)},l=function(m,P){return function(R){R?c(m,R.message==="premature close"?null:R):P&&!m._ended&&m.end()}},_=function(m,P){if(!m||m._writableState&&m._writableState.finished)return P();if(m._writableState)return m.end(P);m.end(),P()},E=function(m){return new d.Readable({objectMode:!0,highWaterMark:16}).wrap(m)},O=function(m,P,R){if(!(this instanceof O))return new O(m,P,R);d.Duplex.call(this,R),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!R||R.autoDestroy!==!1,this._forwardDestroy=!R||R.destroy!==!1,this._forwardEnd=!R||R.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,m&&this.setWritable(m),P&&this.setReadable(P)};u(O,d.Duplex),O.obj=function(m,P,R){return R||(R={}),R.objectMode=!0,R.highWaterMark=16,new O(m,P,R)},O.prototype.cork=function(){++this._corked===1&&this.emit("cork")},O.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},O.prototype.setWritable=function(m){if(this._unwrite&&this._unwrite(),this.destroyed){m&&m.destroy&&m.destroy();return}if(m===null||m===!1){this.end();return}var P=this,R=f(m,{writable:!0,readable:!1},l(this,this._forwardEnd)),C=function(){var A=P._ondrain;P._ondrain=null,A&&A()},T=function(){P._writable.removeListener("drain",C),R()};this._unwrite&&i.nextTick(C),this._writable=m,this._writable.on("drain",C),this._unwrite=T,this.uncork()},O.prototype.setReadable=function(m){if(this._unread&&this._unread(),this.destroyed){m&&m.destroy&&m.destroy();return}if(m===null||m===!1){this.push(null),this.resume();return}var P=this,R=f(m,{writable:!1,readable:!0},l(this)),C=function(){P._forward()},T=function(){P.push(null)},A=function(){P._readable2.removeListener("readable",C),P._readable2.removeListener("end",T),R()};this._drained=!0,this._readable=m,this._readable2=m._readableState?m:E(m),this._readable2.on("readable",C),this._readable2.on("end",T),this._unread=A,this._forward()},O.prototype._read=function(){this._drained=!0,this._forward()},O.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var m;this._drained&&(m=e(this._readable2))!==null;)this.destroyed||(this._drained=this.push(m));this._forwarding=!1}},O.prototype.destroy=function(m){if(!this.destroyed){this.destroyed=!0;var P=this;i.nextTick(function(){P._destroy(m)})}},O.prototype._destroy=function(m){if(m){var P=this._ondrain;this._ondrain=null,P?P(m):this.emit("error",m)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},O.prototype._write=function(m,P,R){if(this.destroyed)return R();if(this._corked)return o(this,this._write.bind(this,m,P,R));if(m===n)return this._finish(R);if(!this._writable)return R();this._writable.write(m)===!1?this._ondrain=R:R()},O.prototype._finish=function(m){var P=this;this.emit("preend"),o(this,function(){_(P._forwardEnd&&P._writable,function(){P._writableState.prefinished===!1&&(P._writableState.prefinished=!0),P.emit("prefinish"),o(P,m)})})},O.prototype.end=function(m,P,R){return typeof m=="function"?this.end(null,null,m):typeof P=="function"?this.end(m,null,P):(this._ended=!0,m&&this.write(m),this._writableState.ending||this.write(n),d.Writable.prototype.end.call(this,R))},v.exports=O}).call(this,s("_process"),s("buffer").Buffer)},{_process:92,buffer:12,"end-of-stream":17,inherits:80,"readable-stream":106,"stream-shift":109}],17:[function(s,v,x){var i=s("once"),a=function(){},d=function(e){return e.setHeader&&typeof e.abort=="function"},f=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},u=function(e,n,o){if(typeof n=="function")return u(e,null,n);n||(n={}),o=i(o||a);var c=e._writableState,l=e._readableState,_=n.readable||n.readable!==!1&&e.readable,E=n.writable||n.writable!==!1&&e.writable,O=function(){e.writable||m()},m=function(){E=!1,_||o.call(e)},P=function(){_=!1,E||o.call(e)},R=function(S){o.call(e,S?new Error("exited with error code: "+S):null)},C=function(S){o.call(e,S)},T=function(){if(_&&!(l&&l.ended))return o.call(e,new Error("premature close"));if(E&&!(c&&c.ended))return o.call(e,new Error("premature close"))},A=function(){e.req.on("finish",m)};return d(e)?(e.on("complete",m),e.on("abort",T),e.req?A():e.on("request",A)):E&&!c&&(e.on("end",O),e.on("close",O)),f(e)&&e.on("exit",R),e.on("end",P),e.on("finish",m),n.error!==!1&&e.on("error",C),e.on("close",T),function(){e.removeListener("complete",m),e.removeListener("abort",T),e.removeListener("request",A),e.req&&e.req.removeListener("finish",m),e.removeListener("end",O),e.removeListener("close",O),e.removeListener("finish",m),e.removeListener("exit",R),e.removeListener("end",P),e.removeListener("error",C),e.removeListener("close",T)}};v.exports=u},{once:90}],18:[function(s,v,x){var i=s("../../object/valid-value");v.exports=function(){return i(this).length=0,this}},{"../../object/valid-value":54}],19:[function(s,v,x){var i=s("../../number/is-nan"),a=s("../../number/to-pos-integer"),d=s("../../object/valid-value"),f=Array.prototype.indexOf,u=Object.prototype.hasOwnProperty,e=Math.abs,n=Math.floor;v.exports=function(o){var c,l,_,E;if(!i(o))return f.apply(this,arguments);for(l=a(d(this).length),_=arguments[1],isNaN(_)?_=0:_>=0?_=n(_):_=a(this.length)-n(e(_)),c=_;c<l;++c)if(u.call(this,c)&&(E=this[c],i(E)))return c;return-1}},{"../../number/is-nan":29,"../../number/to-pos-integer":33,"../../object/valid-value":54}],20:[function(s,v,x){v.exports=s("./is-implemented")()?Array.from:s("./shim")},{"./is-implemented":21,"./shim":22}],21:[function(s,v,x){v.exports=function(){var i=Array.from,a,d;return typeof i!="function"?!1:(a=["raz","dwa"],d=i(a),Boolean(d&&d!==a&&d[1]==="dwa"))}},{}],22:[function(s,v,x){var i=s("es6-symbol").iterator,a=s("../../function/is-arguments"),d=s("../../function/is-function"),f=s("../../number/to-pos-integer"),u=s("../../object/valid-callable"),e=s("../../object/valid-value"),n=s("../../object/is-value"),o=s("../../string/is-string"),c=Array.isArray,l=Function.prototype.call,_={configurable:!0,enumerable:!0,writable:!0,value:null},E=Object.defineProperty;v.exports=function(O){var m=arguments[1],P=arguments[2],R,C,T,A,S,j,W,M,ee,g;if(O=Object(e(O)),n(m)&&u(m),!this||this===Array||!d(this)){if(!m){if(a(O))return S=O.length,S!==1?Array.apply(null,O):(A=new Array(1),A[0]=O[0],A);if(c(O)){for(A=new Array(S=O.length),C=0;C<S;++C)A[C]=O[C];return A}}A=[]}else R=this;if(!c(O)){if((ee=O[i])!==void 0){for(W=u(ee).call(O),R&&(A=new R),M=W.next(),C=0;!M.done;)g=m?l.call(m,P,M.value,C):M.value,R?(_.value=g,E(A,C,_)):A[C]=g,M=W.next(),++C;S=C}else if(o(O)){for(S=O.length,R&&(A=new R),C=0,T=0;C<S;++C)g=O[C],C+1<S&&(j=g.charCodeAt(0),j>=55296&&j<=56319&&(g+=O[++C])),g=m?l.call(m,P,g,T):g,R?(_.value=g,E(A,T,_)):A[T]=g,++T;S=T}}if(S===void 0)for(S=f(O.length),R&&(A=new R(S)),C=0;C<S;++C)g=m?l.call(m,P,O[C],C):O[C],R?(_.value=g,E(A,C,_)):A[C]=g;return R&&(_.value=null,A.length=S),A}},{"../../function/is-arguments":23,"../../function/is-function":24,"../../number/to-pos-integer":33,"../../object/is-value":43,"../../object/valid-callable":53,"../../object/valid-value":54,"../../string/is-string":58,"es6-symbol":72}],23:[function(s,v,x){var i=Object.prototype.toString,a=i.call(function(){return arguments}());v.exports=function(d){return i.call(d)===a}},{}],24:[function(s,v,x){var i=Object.prototype.toString,a=i.call(s("./noop"));v.exports=function(d){return typeof d=="function"&&i.call(d)===a}},{"./noop":25}],25:[function(s,v,x){v.exports=function(){}},{}],26:[function(s,v,x){v.exports=s("./is-implemented")()?Math.sign:s("./shim")},{"./is-implemented":27,"./shim":28}],27:[function(s,v,x){v.exports=function(){var i=Math.sign;return typeof i!="function"?!1:i(10)===1&&i(-20)===-1}},{}],28:[function(s,v,x){v.exports=function(i){return i=Number(i),isNaN(i)||i===0?i:i>0?1:-1}},{}],29:[function(s,v,x){v.exports=s("./is-implemented")()?Number.isNaN:s("./shim")},{"./is-implemented":30,"./shim":31}],30:[function(s,v,x){v.exports=function(){var i=Number.isNaN;return typeof i!="function"?!1:!i({})&&i(NaN)&&!i(34)}},{}],31:[function(s,v,x){v.exports=function(i){return i!==i}},{}],32:[function(s,v,x){var i=s("../math/sign"),a=Math.abs,d=Math.floor;v.exports=function(f){return isNaN(f)?0:(f=Number(f),f===0||!isFinite(f)?f:i(f)*d(a(f)))}},{"../math/sign":26}],33:[function(s,v,x){var i=s("./to-integer"),a=Math.max;v.exports=function(d){return a(0,i(d))}},{"./to-integer":32}],34:[function(s,v,x){var i=s("./valid-callable"),a=s("./valid-value"),d=Function.prototype.bind,f=Function.prototype.call,u=Object.keys,e=Object.prototype.propertyIsEnumerable;v.exports=function(n,o){return function(c,l){var _,E=arguments[2],O=arguments[3];return c=Object(a(c)),i(l),_=u(c),O&&_.sort(typeof O=="function"?d.call(O,c):void 0),typeof n!="function"&&(n=_[n]),f.call(n,_,function(m,P){return e.call(c,m)?f.call(l,E,c[m],m,c,P):o})}}},{"./valid-callable":53,"./valid-value":54}],35:[function(s,v,x){v.exports=s("./is-implemented")()?Object.assign:s("./shim")},{"./is-implemented":36,"./shim":37}],36:[function(s,v,x){v.exports=function(){var i=Object.assign,a;return typeof i!="function"?!1:(a={foo:"raz"},i(a,{bar:"dwa"},{trzy:"trzy"}),a.foo+a.bar+a.trzy==="razdwatrzy")}},{}],37:[function(s,v,x){var i=s("../keys"),a=s("../valid-value"),d=Math.max;v.exports=function(f,u){var e,n,o=d(arguments.length,2),c;for(f=Object(a(f)),c=function(l){try{f[l]=u[l]}catch(_){e||(e=_)}},n=1;n<o;++n)u=arguments[n],i(u).forEach(c);if(e!==void 0)throw e;return f}},{"../keys":44,"../valid-value":54}],38:[function(s,v,x){var i=s("../array/from"),a=s("./assign"),d=s("./valid-value");v.exports=function(f){var u=Object(d(f)),e=arguments[1],n=Object(arguments[2]);if(u!==f&&!e)return u;var o={};return e?i(e,function(c){(n.ensure||c in f)&&(o[c]=f[c])}):a(o,f),o}},{"../array/from":20,"./assign":35,"./valid-value":54}],39:[function(s,v,x){var i=Object.create,a;s("./set-prototype-of/is-implemented")()||(a=s("./set-prototype-of/shim")),v.exports=function(){var d,f,u;return!a||a.level!==1?i:(d={},f={},u={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if(e==="__proto__"){f[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}f[e]=u}),Object.defineProperties(d,f),Object.defineProperty(a,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:d}),function(e,n){return i(e===null?d:e,n)})}()},{"./set-prototype-of/is-implemented":51,"./set-prototype-of/shim":52}],40:[function(s,v,x){v.exports=s("./_iterate")("forEach")},{"./_iterate":34}],41:[function(s,v,x){v.exports=function(i){return typeof i=="function"}},{}],42:[function(s,v,x){var i=s("./is-value"),a={function:!0,object:!0};v.exports=function(d){return i(d)&&a[typeof d]||!1}},{"./is-value":43}],43:[function(s,v,x){var i=s("../function/noop")();v.exports=function(a){return a!==i&&a!==null}},{"../function/noop":25}],44:[function(s,v,x){v.exports=s("./is-implemented")()?Object.keys:s("./shim")},{"./is-implemented":45,"./shim":46}],45:[function(s,v,x){v.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},{}],46:[function(s,v,x){var i=s("../is-value"),a=Object.keys;v.exports=function(d){return a(i(d)?Object(d):d)}},{"../is-value":43}],47:[function(s,v,x){var i=s("./valid-callable"),a=s("./for-each"),d=Function.prototype.call;v.exports=function(f,u){var e={},n=arguments[2];return i(u),a(f,function(o,c,l,_){e[c]=d.call(u,n,o,c,l,_)}),e}},{"./for-each":40,"./valid-callable":53}],48:[function(s,v,x){var i=s("./is-value"),a=Array.prototype.forEach,d=Object.create,f=function(u,e){var n;for(n in u)e[n]=u[n]};v.exports=function(u){var e=d(null);return a.call(arguments,function(n){!i(n)||f(Object(n),e)}),e}},{"./is-value":43}],49:[function(s,v,x){var i=Array.prototype.forEach,a=Object.create;v.exports=function(d){var f=a(null);return i.call(arguments,function(u){f[u]=!0}),f}},{}],50:[function(s,v,x){v.exports=s("./is-implemented")()?Object.setPrototypeOf:s("./shim")},{"./is-implemented":51,"./shim":52}],51:[function(s,v,x){var i=Object.create,a=Object.getPrototypeOf,d={};v.exports=function(){var f=Object.setPrototypeOf,u=arguments[0]||i;return typeof f!="function"?!1:a(f(u(null),d))===d}},{}],52:[function(s,v,x){var i=s("../is-object"),a=s("../valid-value"),d=Object.prototype.isPrototypeOf,f=Object.defineProperty,u={configurable:!0,enumerable:!1,writable:!0,value:void 0},e;e=function(n,o){if(a(n),o===null||i(o))return n;throw new TypeError("Prototype must be null or an object")},v.exports=function(n){var o,c;return n?(n.level===2?n.set?(c=n.set,o=function(l,_){return c.call(e(l,_),_),l}):o=function(l,_){return e(l,_).__proto__=_,l}:o=function l(_,E){var O;return e(_,E),O=d.call(l.nullPolyfill,_),O&&delete l.nullPolyfill.__proto__,E===null&&(E=l.nullPolyfill),_.__proto__=E,O&&f(l.nullPolyfill,"__proto__",u),_},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:n.level})):null}(function(){var n=Object.create(null),o={},c,l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(l){try{c=l.set,c.call(n,o)}catch{}if(Object.getPrototypeOf(n)===o)return{set:c,level:2}}return n.__proto__=o,Object.getPrototypeOf(n)===o?{level:2}:(n={},n.__proto__=o,Object.getPrototypeOf(n)===o?{level:1}:!1)}()),s("../create")},{"../create":39,"../is-object":42,"../valid-value":54}],53:[function(s,v,x){v.exports=function(i){if(typeof i!="function")throw new TypeError(i+" is not a function");return i}},{}],54:[function(s,v,x){var i=s("./is-value");v.exports=function(a){if(!i(a))throw new TypeError("Cannot use null or undefined");return a}},{"./is-value":43}],55:[function(s,v,x){v.exports=s("./is-implemented")()?String.prototype.contains:s("./shim")},{"./is-implemented":56,"./shim":57}],56:[function(s,v,x){var i="razdwatrzy";v.exports=function(){return typeof i.contains!="function"?!1:i.contains("dwa")===!0&&i.contains("foo")===!1}},{}],57:[function(s,v,x){var i=String.prototype.indexOf;v.exports=function(a){return i.call(this,a,arguments[1])>-1}},{}],58:[function(s,v,x){var i=Object.prototype.toString,a=i.call("");v.exports=function(d){return typeof d=="string"||d&&typeof d=="object"&&(d instanceof String||i.call(d)===a)||!1}},{}],59:[function(s,v,x){var i=s("es5-ext/object/set-prototype-of"),a=s("es5-ext/string/#/contains"),d=s("d"),f=s("es6-symbol"),u=s("./"),e=Object.defineProperty,n;n=v.exports=function(o,c){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");u.call(this,o),c?a.call(c,"key+value")?c="key+value":a.call(c,"key")?c="key":c="value":c="value",e(this,"__kind__",d("",c))},i&&i(n,u),delete n.prototype.constructor,n.prototype=Object.create(u.prototype,{_resolve:d(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),e(n.prototype,f.toStringTag,d("c","Array Iterator"))},{"./":62,d:15,"es5-ext/object/set-prototype-of":50,"es5-ext/string/#/contains":55,"es6-symbol":72}],60:[function(s,v,x){var i=s("es5-ext/function/is-arguments"),a=s("es5-ext/object/valid-callable"),d=s("es5-ext/string/is-string"),f=s("./get"),u=Array.isArray,e=Function.prototype.call,n=Array.prototype.some;v.exports=function(o,c){var l,_=arguments[2],E,O,m,P,R,C,T;if(u(o)||i(o)?l="array":d(o)?l="string":o=f(o),a(c),O=function(){m=!0},l==="array"){n.call(o,function(A){return e.call(c,_,A,O),m});return}if(l==="string"){for(R=o.length,P=0;P<R&&(C=o[P],P+1<R&&(T=C.charCodeAt(0),T>=55296&&T<=56319&&(C+=o[++P])),e.call(c,_,C,O),!m);++P);return}for(E=o.next();!E.done;){if(e.call(c,_,E.value,O),m)return;E=o.next()}}},{"./get":61,"es5-ext/function/is-arguments":23,"es5-ext/object/valid-callable":53,"es5-ext/string/is-string":58}],61:[function(s,v,x){var i=s("es5-ext/function/is-arguments"),a=s("es5-ext/string/is-string"),d=s("./array"),f=s("./string"),u=s("./valid-iterable"),e=s("es6-symbol").iterator;v.exports=function(n){return typeof u(n)[e]=="function"?n[e]():i(n)?new d(n):a(n)?new f(n):new d(n)}},{"./array":59,"./string":64,"./valid-iterable":65,"es5-ext/function/is-arguments":23,"es5-ext/string/is-string":58,"es6-symbol":72}],62:[function(s,v,x){var i=s("es5-ext/array/#/clear"),a=s("es5-ext/object/assign"),d=s("es5-ext/object/valid-callable"),f=s("es5-ext/object/valid-value"),u=s("d"),e=s("d/auto-bind"),n=s("es6-symbol"),o=Object.defineProperty,c=Object.defineProperties,l;v.exports=l=function(_,E){if(!(this instanceof l))throw new TypeError("Constructor requires 'new'");c(this,{__list__:u("w",f(_)),__context__:u("w",E),__nextIndex__:u("w",0)}),E&&(d(E.on),E.on("_add",this._onAdd),E.on("_delete",this._onDelete),E.on("_clear",this._onClear))},delete l.prototype.constructor,c(l.prototype,a({_next:u(function(){var _;if(!!this.__list__){if(this.__redo__&&(_=this.__redo__.shift(),_!==void 0))return _;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:u(function(){return this._createResult(this._next())}),_createResult:u(function(_){return _===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(_)}}),_resolve:u(function(_){return this.__list__[_]}),_unBind:u(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:u(function(){return"[object "+(this[n.toStringTag]||"Object")+"]"})},e({_onAdd:u(function(_){if(!(_>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){o(this,"__redo__",u("c",[_]));return}this.__redo__.forEach(function(E,O){E>=_&&(this.__redo__[O]=++E)},this),this.__redo__.push(_)}}),_onDelete:u(function(_){var E;_>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(E=this.__redo__.indexOf(_),E!==-1&&this.__redo__.splice(E,1),this.__redo__.forEach(function(O,m){O>_&&(this.__redo__[m]=--O)},this)))}),_onClear:u(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),o(l.prototype,n.iterator,u(function(){return this}))},{d:15,"d/auto-bind":14,"es5-ext/array/#/clear":18,"es5-ext/object/assign":35,"es5-ext/object/valid-callable":53,"es5-ext/object/valid-value":54,"es6-symbol":72}],63:[function(s,v,x){var i=s("es5-ext/function/is-arguments"),a=s("es5-ext/object/is-value"),d=s("es5-ext/string/is-string"),f=s("es6-symbol").iterator,u=Array.isArray;v.exports=function(e){return a(e)?u(e)||d(e)||i(e)?!0:typeof e[f]=="function":!1}},{"es5-ext/function/is-arguments":23,"es5-ext/object/is-value":43,"es5-ext/string/is-string":58,"es6-symbol":72}],64:[function(s,v,x){var i=s("es5-ext/object/set-prototype-of"),a=s("d"),d=s("es6-symbol"),f=s("./"),u=Object.defineProperty,e;e=v.exports=function(n){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");n=String(n),f.call(this,n),u(this,"__length__",a("",n.length))},i&&i(e,f),delete e.prototype.constructor,e.prototype=Object.create(f.prototype,{_next:a(function(){if(!!this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:a(function(n){var o=this.__list__[n],c;return this.__nextIndex__===this.__length__?o:(c=o.charCodeAt(0),c>=55296&&c<=56319?o+this.__list__[this.__nextIndex__++]:o)})}),u(e.prototype,d.toStringTag,a("c","String Iterator"))},{"./":62,d:15,"es5-ext/object/set-prototype-of":50,"es6-symbol":72}],65:[function(s,v,x){var i=s("./is-iterable");v.exports=function(a){if(!i(a))throw new TypeError(a+" is not iterable");return a}},{"./is-iterable":63}],66:[function(s,v,x){v.exports=s("./is-implemented")()?Map:s("./polyfill")},{"./is-implemented":67,"./polyfill":71}],67:[function(s,v,x){v.exports=function(){var i,a,d;if(typeof Map!="function")return!1;try{i=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch{return!1}return!(String(i)!=="[object Map]"||i.size!==3||typeof i.clear!="function"||typeof i.delete!="function"||typeof i.entries!="function"||typeof i.forEach!="function"||typeof i.get!="function"||typeof i.has!="function"||typeof i.keys!="function"||typeof i.set!="function"||typeof i.values!="function"||(a=i.entries(),d=a.next(),d.done!==!1)||!d.value||d.value[0]!=="raz"||d.value[1]!=="one")}},{}],68:[function(s,v,x){v.exports=function(){return typeof Map>"u"?!1:Object.prototype.toString.call(new Map)==="[object Map]"}()},{}],69:[function(s,v,x){v.exports=s("es5-ext/object/primitive-set")("key","value","key+value")},{"es5-ext/object/primitive-set":49}],70:[function(s,v,x){var i=s("es5-ext/object/set-prototype-of"),a=s("d"),d=s("es6-iterator"),f=s("es6-symbol").toStringTag,u=s("./iterator-kinds"),e=Object.defineProperties,n=d.prototype._unBind,o;o=v.exports=function(c,l){if(!(this instanceof o))return new o(c,l);d.call(this,c.__mapKeysData__,c),(!l||!u[l])&&(l="key+value"),e(this,{__kind__:a("",l),__values__:a("w",c.__mapValuesData__)})},i&&i(o,d),o.prototype=Object.create(d.prototype,{constructor:a(o),_resolve:a(function(c){return this.__kind__==="value"?this.__values__[c]:this.__kind__==="key"?this.__list__[c]:[this.__list__[c],this.__values__[c]]}),_unBind:a(function(){this.__values__=null,n.call(this)}),toString:a(function(){return"[object Map Iterator]"})}),Object.defineProperty(o.prototype,f,a("c","Map Iterator"))},{"./iterator-kinds":69,d:15,"es5-ext/object/set-prototype-of":50,"es6-iterator":62,"es6-symbol":72}],71:[function(s,v,x){var i=s("es5-ext/array/#/clear"),a=s("es5-ext/array/#/e-index-of"),d=s("es5-ext/object/set-prototype-of"),f=s("es5-ext/object/valid-callable"),u=s("es5-ext/object/valid-value"),e=s("d"),n=s("event-emitter"),o=s("es6-symbol"),c=s("es6-iterator/valid-iterable"),l=s("es6-iterator/for-of"),_=s("./lib/iterator"),E=s("./is-native-implemented"),O=Function.prototype.call,m=Object.defineProperties,P=Object.getPrototypeOf,R;v.exports=R=function(){var C=arguments[0],T,A,S;if(!(this instanceof R))throw new TypeError("Constructor requires 'new'");return E&&d&&Map!==R?S=d(new Map,P(this)):S=this,C!=null&&c(C),m(S,{__mapKeysData__:e("c",T=[]),__mapValuesData__:e("c",A=[])}),C&&l(C,function(j){var W=u(j)[0];j=j[1],a.call(T,W)===-1&&(T.push(W),A.push(j))},S),S},E&&(d&&d(R,Map),R.prototype=Object.create(Map.prototype,{constructor:e(R)})),n(m(R.prototype,{clear:e(function(){!this.__mapKeysData__.length||(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))}),delete:e(function(C){var T=a.call(this.__mapKeysData__,C);return T===-1?!1:(this.__mapKeysData__.splice(T,1),this.__mapValuesData__.splice(T,1),this.emit("_delete",T,C),!0)}),entries:e(function(){return new _(this,"key+value")}),forEach:e(function(C){var T=arguments[1],A,S;for(f(C),A=this.entries(),S=A._next();S!==void 0;)O.call(C,T,this.__mapValuesData__[S],this.__mapKeysData__[S],this),S=A._next()}),get:e(function(C){var T=a.call(this.__mapKeysData__,C);if(T!==-1)return this.__mapValuesData__[T]}),has:e(function(C){return a.call(this.__mapKeysData__,C)!==-1}),keys:e(function(){return new _(this,"key")}),set:e(function(C,T){var A=a.call(this.__mapKeysData__,C),S;return A===-1&&(A=this.__mapKeysData__.push(C)-1,S=!0),this.__mapValuesData__[A]=T,S&&this.emit("_add",A,C),this}),size:e.gs(function(){return this.__mapKeysData__.length}),values:e(function(){return new _(this,"value")}),toString:e(function(){return"[object Map]"})})),Object.defineProperty(R.prototype,o.iterator,e(function(){return this.entries()})),Object.defineProperty(R.prototype,o.toStringTag,e("c","Map"))},{"./is-native-implemented":68,"./lib/iterator":70,d:15,"es5-ext/array/#/clear":18,"es5-ext/array/#/e-index-of":19,"es5-ext/object/set-prototype-of":50,"es5-ext/object/valid-callable":53,"es5-ext/object/valid-value":54,"es6-iterator/for-of":60,"es6-iterator/valid-iterable":65,"es6-symbol":72,"event-emitter":77}],72:[function(s,v,x){v.exports=s("./is-implemented")()?Symbol:s("./polyfill")},{"./is-implemented":73,"./polyfill":75}],73:[function(s,v,x){var i={object:!0,symbol:!0};v.exports=function(){var a;if(typeof Symbol!="function")return!1;a=Symbol("test symbol");try{String(a)}catch{return!1}return!(!i[typeof Symbol.iterator]||!i[typeof Symbol.toPrimitive]||!i[typeof Symbol.toStringTag])}},{}],74:[function(s,v,x){v.exports=function(i){return i?typeof i=="symbol"?!0:!i.constructor||i.constructor.name!=="Symbol"?!1:i[i.constructor.toStringTag]==="Symbol":!1}},{}],75:[function(s,v,x){var i=s("d"),a=s("./validate-symbol"),d=Object.create,f=Object.defineProperties,u=Object.defineProperty,e=Object.prototype,n,o,c,l=d(null),_;if(typeof Symbol=="function"){n=Symbol;try{String(n()),_=!0}catch{}}var E=function(){var O=d(null);return function(m){for(var P=0,R,C;O[m+(P||"")];)++P;return m+=P||"",O[m]=!0,R="@@"+m,u(e,R,i.gs(null,function(T){C||(C=!0,u(this,R,i(T)),C=!1)})),R}}();c=function(m){if(this instanceof c)throw new TypeError("Symbol is not a constructor");return o(m)},v.exports=o=function O(m){var P;if(this instanceof O)throw new TypeError("Symbol is not a constructor");return _?n(m):(P=d(c.prototype),m=m===void 0?"":String(m),f(P,{__description__:i("",m),__name__:i("",E(m))}))},f(o,{for:i(function(O){return l[O]?l[O]:l[O]=o(String(O))}),keyFor:i(function(O){var m;a(O);for(m in l)if(l[m]===O)return m}),hasInstance:i("",n&&n.hasInstance||o("hasInstance")),isConcatSpreadable:i("",n&&n.isConcatSpreadable||o("isConcatSpreadable")),iterator:i("",n&&n.iterator||o("iterator")),match:i("",n&&n.match||o("match")),replace:i("",n&&n.replace||o("replace")),search:i("",n&&n.search||o("search")),species:i("",n&&n.species||o("species")),split:i("",n&&n.split||o("split")),toPrimitive:i("",n&&n.toPrimitive||o("toPrimitive")),toStringTag:i("",n&&n.toStringTag||o("toStringTag")),unscopables:i("",n&&n.unscopables||o("unscopables"))}),f(c.prototype,{constructor:i(o),toString:i("",function(){return this.__name__})}),f(o.prototype,{toString:i(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:i(function(){return a(this)})}),u(o.prototype,o.toPrimitive,i("",function(){var O=a(this);return typeof O=="symbol"?O:O.toString()})),u(o.prototype,o.toStringTag,i("c","Symbol")),u(c.prototype,o.toStringTag,i("c",o.prototype[o.toStringTag])),u(c.prototype,o.toPrimitive,i("c",o.prototype[o.toPrimitive]))},{"./validate-symbol":76,d:15}],76:[function(s,v,x){var i=s("./is-symbol");v.exports=function(a){if(!i(a))throw new TypeError(a+" is not a symbol");return a}},{"./is-symbol":74}],77:[function(s,v,x){var i=s("d"),a=s("es5-ext/object/valid-callable"),d=Function.prototype.apply,f=Function.prototype.call,u=Object.create,e=Object.defineProperty,n=Object.defineProperties,o=Object.prototype.hasOwnProperty,c={configurable:!0,enumerable:!1,writable:!0},l,_,E,O,m,P,R;l=function(C,T){var A;return a(T),o.call(this,"__ee__")?A=this.__ee__:(A=c.value=u(null),e(this,"__ee__",c),c.value=null),A[C]?typeof A[C]=="object"?A[C].push(T):A[C]=[A[C],T]:A[C]=T,this},_=function(C,T){var A,S;return a(T),S=this,l.call(this,C,A=function(){E.call(S,C,A),d.call(T,this,arguments)}),A.__eeOnceListener__=T,this},E=function(C,T){var A,S,j,W;if(a(T),!o.call(this,"__ee__"))return this;if(A=this.__ee__,!A[C])return this;if(S=A[C],typeof S=="object")for(W=0;j=S[W];++W)(j===T||j.__eeOnceListener__===T)&&(S.length===2?A[C]=S[W?0:1]:S.splice(W,1));else(S===T||S.__eeOnceListener__===T)&&delete A[C];return this},O=function(C){var T,A,S,j,W;if(!!o.call(this,"__ee__")&&(j=this.__ee__[C],!!j))if(typeof j=="object"){for(A=arguments.length,W=new Array(A-1),T=1;T<A;++T)W[T-1]=arguments[T];for(j=j.slice(),T=0;S=j[T];++T)d.call(S,this,W)}else switch(arguments.length){case 1:f.call(j,this);break;case 2:f.call(j,this,arguments[1]);break;case 3:f.call(j,this,arguments[1],arguments[2]);break;default:for(A=arguments.length,W=new Array(A-1),T=1;T<A;++T)W[T-1]=arguments[T];d.call(j,this,W)}},m={on:l,once:_,off:E,emit:O},P={on:i(l),once:i(_),off:i(E),emit:i(O)},R=n({},P),v.exports=x=function(C){return C==null?u(R):n(Object(C),P)},x.methods=m},{d:15,"es5-ext/object/valid-callable":53}],78:[function(s,v,x){var i=Object.create||W,a=Object.keys||M,d=Function.prototype.bind||ee;function f(){(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events"))&&(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}v.exports=f,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._maxListeners=void 0;var u=10,e;try{var n={};Object.defineProperty&&Object.defineProperty(n,"x",{value:0}),e=n.x===0}catch{e=!1}e?Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(g){if(typeof g!="number"||g<0||g!==g)throw new TypeError('"defaultMaxListeners" must be a positive number');u=g}}):f.defaultMaxListeners=u,f.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||isNaN(D))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=D,this};function o(g){return g._maxListeners===void 0?f.defaultMaxListeners:g._maxListeners}f.prototype.getMaxListeners=function(){return o(this)};function c(g,D,F){if(D)g.call(F);else for(var V=g.length,Z=S(g,V),K=0;K<V;++K)Z[K].call(F)}function l(g,D,F,V){if(D)g.call(F,V);else for(var Z=g.length,K=S(g,Z),Q=0;Q<Z;++Q)K[Q].call(F,V)}function _(g,D,F,V,Z){if(D)g.call(F,V,Z);else for(var K=g.length,Q=S(g,K),z=0;z<K;++z)Q[z].call(F,V,Z)}function E(g,D,F,V,Z,K){if(D)g.call(F,V,Z,K);else for(var Q=g.length,z=S(g,Q),N=0;N<Q;++N)z[N].call(F,V,Z,K)}function O(g,D,F,V){if(D)g.apply(F,V);else for(var Z=g.length,K=S(g,Z),Q=0;Q<Z;++Q)K[Q].apply(F,V)}f.prototype.emit=function(D){var F,V,Z,K,Q,z,N=D==="error";if(z=this._events,z)N=N&&z.error==null;else if(!N)return!1;if(N){if(arguments.length>1&&(F=arguments[1]),F instanceof Error)throw F;var re=new Error('Unhandled "error" event. ('+F+")");throw re.context=F,re}if(V=z[D],!V)return!1;var B=typeof V=="function";switch(Z=arguments.length,Z){case 1:c(V,B,this);break;case 2:l(V,B,this,arguments[1]);break;case 3:_(V,B,this,arguments[1],arguments[2]);break;case 4:E(V,B,this,arguments[1],arguments[2],arguments[3]);break;default:for(K=new Array(Z-1),Q=1;Q<Z;Q++)K[Q-1]=arguments[Q];O(V,B,this,K)}return!0};function m(g,D,F,V){var Z,K,Q;if(typeof F!="function")throw new TypeError('"listener" argument must be a function');if(K=g._events,K?(K.newListener&&(g.emit("newListener",D,F.listener?F.listener:F),K=g._events),Q=K[D]):(K=g._events=i(null),g._eventsCount=0),!Q)Q=K[D]=F,++g._eventsCount;else if(typeof Q=="function"?Q=K[D]=V?[F,Q]:[Q,F]:V?Q.unshift(F):Q.push(F),!Q.warned&&(Z=o(g),Z&&Z>0&&Q.length>Z)){Q.warned=!0;var z=new Error("Possible EventEmitter memory leak detected. "+Q.length+' "'+String(D)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');z.name="MaxListenersExceededWarning",z.emitter=g,z.type=D,z.count=Q.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",z.name,z.message)}return g}f.prototype.addListener=function(D,F){return m(this,D,F,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(D,F){return m(this,D,F,!0)};function P(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var g=new Array(arguments.length),D=0;D<g.length;++D)g[D]=arguments[D];this.listener.apply(this.target,g)}}function R(g,D,F){var V={fired:!1,wrapFn:void 0,target:g,type:D,listener:F},Z=d.call(P,V);return Z.listener=F,V.wrapFn=Z,Z}f.prototype.once=function(D,F){if(typeof F!="function")throw new TypeError('"listener" argument must be a function');return this.on(D,R(this,D,F)),this},f.prototype.prependOnceListener=function(D,F){if(typeof F!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(D,R(this,D,F)),this},f.prototype.removeListener=function(D,F){var V,Z,K,Q,z;if(typeof F!="function")throw new TypeError('"listener" argument must be a function');if(Z=this._events,!Z)return this;if(V=Z[D],!V)return this;if(V===F||V.listener===F)--this._eventsCount===0?this._events=i(null):(delete Z[D],Z.removeListener&&this.emit("removeListener",D,V.listener||F));else if(typeof V!="function"){for(K=-1,Q=V.length-1;Q>=0;Q--)if(V[Q]===F||V[Q].listener===F){z=V[Q].listener,K=Q;break}if(K<0)return this;K===0?V.shift():A(V,K),V.length===1&&(Z[D]=V[0]),Z.removeListener&&this.emit("removeListener",D,z||F)}return this},f.prototype.removeAllListeners=function(D){var F,V,Z;if(V=this._events,!V)return this;if(!V.removeListener)return arguments.length===0?(this._events=i(null),this._eventsCount=0):V[D]&&(--this._eventsCount===0?this._events=i(null):delete V[D]),this;if(arguments.length===0){var K=a(V),Q;for(Z=0;Z<K.length;++Z)Q=K[Z],Q!=="removeListener"&&this.removeAllListeners(Q);return this.removeAllListeners("removeListener"),this._events=i(null),this._eventsCount=0,this}if(F=V[D],typeof F=="function")this.removeListener(D,F);else if(F)for(Z=F.length-1;Z>=0;Z--)this.removeListener(D,F[Z]);return this};function C(g,D,F){var V=g._events;if(!V)return[];var Z=V[D];return Z?typeof Z=="function"?F?[Z.listener||Z]:[Z]:F?j(Z):S(Z,Z.length):[]}f.prototype.listeners=function(D){return C(this,D,!0)},f.prototype.rawListeners=function(D){return C(this,D,!1)},f.listenerCount=function(g,D){return typeof g.listenerCount=="function"?g.listenerCount(D):T.call(g,D)},f.prototype.listenerCount=T;function T(g){var D=this._events;if(D){var F=D[g];if(typeof F=="function")return 1;if(F)return F.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function A(g,D){for(var F=D,V=F+1,Z=g.length;V<Z;F+=1,V+=1)g[F]=g[V];g.pop()}function S(g,D){for(var F=new Array(D),V=0;V<D;++V)F[V]=g[V];return F}function j(g){for(var D=new Array(g.length),F=0;F<D.length;++F)D[F]=g[F].listener||g[F];return D}function W(g){var D=function(){};return D.prototype=g,new D}function M(g){for(var D in g)Object.prototype.hasOwnProperty.call(g,D);return D}function ee(g){var D=this;return function(){return D.apply(g,arguments)}}},{}],79:[function(s,v,x){x.read=function(i,a,d,f,u){var e,n,o=u*8-f-1,c=(1<<o)-1,l=c>>1,_=-7,E=d?u-1:0,O=d?-1:1,m=i[a+E];for(E+=O,e=m&(1<<-_)-1,m>>=-_,_+=o;_>0;e=e*256+i[a+E],E+=O,_-=8);for(n=e&(1<<-_)-1,e>>=-_,_+=f;_>0;n=n*256+i[a+E],E+=O,_-=8);if(e===0)e=1-l;else{if(e===c)return n?NaN:(m?-1:1)*(1/0);n=n+Math.pow(2,f),e=e-l}return(m?-1:1)*n*Math.pow(2,e-f)},x.write=function(i,a,d,f,u,e){var n,o,c,l=e*8-u-1,_=(1<<l)-1,E=_>>1,O=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=f?0:e-1,P=f?1:-1,R=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(o=isNaN(a)?1:0,n=_):(n=Math.floor(Math.log(a)/Math.LN2),a*(c=Math.pow(2,-n))<1&&(n--,c*=2),n+E>=1?a+=O/c:a+=O*Math.pow(2,1-E),a*c>=2&&(n++,c/=2),n+E>=_?(o=0,n=_):n+E>=1?(o=(a*c-1)*Math.pow(2,u),n=n+E):(o=a*Math.pow(2,E-1)*Math.pow(2,u),n=0));u>=8;i[d+m]=o&255,m+=P,o/=256,u-=8);for(n=n<<u|o,l+=u;l>0;i[d+m]=n&255,m+=P,n/=256,l-=8);i[d+m-P]|=R*128}},{}],80:[function(s,v,x){typeof Object.create=="function"?v.exports=function(a,d){a.super_=d,a.prototype=Object.create(d.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:v.exports=function(a,d){a.super_=d;var f=function(){};f.prototype=d.prototype,a.prototype=new f,a.prototype.constructor=a}},{}],81:[function(s,v,x){v.exports=function(d){return d!=null&&(i(d)||a(d)||!!d._isBuffer)};function i(d){return!!d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d)}function a(d){return typeof d.readFloatLE=="function"&&typeof d.slice=="function"&&i(d.slice(0,0))}},{}],82:[function(s,v,x){var i={}.toString;v.exports=Array.isArray||function(a){return i.call(a)=="[object Array]"}},{}],83:[function(s,v,x){var i=s("safe-buffer").Buffer,a=v.exports;a.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:"reserved"},a.codes={};for(var d in a.types){var f=a.types[d];a.codes[f]=d}a.CMD_SHIFT=4,a.CMD_MASK=240,a.DUP_MASK=8,a.QOS_MASK=3,a.QOS_SHIFT=1,a.RETAIN_MASK=1,a.LENGTH_MASK=127,a.LENGTH_FIN_MASK=128,a.SESSIONPRESENT_MASK=1,a.SESSIONPRESENT_HEADER=i.from([a.SESSIONPRESENT_MASK]),a.CONNACK_HEADER=i.from([a.codes.connack<<a.CMD_SHIFT]),a.USERNAME_MASK=128,a.PASSWORD_MASK=64,a.WILL_RETAIN_MASK=32,a.WILL_QOS_MASK=24,a.WILL_QOS_SHIFT=3,a.WILL_FLAG_MASK=4,a.CLEAN_SESSION_MASK=2,a.CONNECT_HEADER=i.from([a.codes.connect<<a.CMD_SHIFT]);function u(e){return[0,1,2].map(function(n){return[0,1].map(function(o){return[0,1].map(function(c){var l=new i(1);return l.writeUInt8(a.codes[e]<<a.CMD_SHIFT|(o?a.DUP_MASK:0)|n<<a.QOS_SHIFT|c,0,!0),l})})})}a.PUBLISH_HEADER=u("publish"),a.SUBSCRIBE_HEADER=u("subscribe"),a.UNSUBSCRIBE_HEADER=u("unsubscribe"),a.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},a.SUBACK_HEADER=i.from([a.codes.suback<<a.CMD_SHIFT]),a.VERSION3=i.from([3]),a.VERSION4=i.from([4]),a.QOS=[0,1,2].map(function(e){return i.from([e])}),a.EMPTY={pingreq:i.from([a.codes.pingreq<<4,0]),pingresp:i.from([a.codes.pingresp<<4,0]),disconnect:i.from([a.codes.disconnect<<4,0])}},{"safe-buffer":108}],84:[function(s,v,x){var i=s("safe-buffer").Buffer,a=s("./writeToStream"),d=s("events").EventEmitter,f=s("inherits");function u(n){var o=new e;return a(n,o),o.concat()}function e(){this._array=new Array(20),this._i=0}f(e,d),e.prototype.write=function(n){return this._array[this._i++]=n,!0},e.prototype.concat=function(){var n=0,o=new Array(this._array.length),c=this._array,l=0,_,E;for(_=0;_<c.length&&c[_]!==void 0;_++)typeof c[_]!="string"?o[_]=c[_].length:o[_]=i.byteLength(c[_]),n+=o[_];for(E=i.allocUnsafe(n),_=0;_<c.length&&c[_]!==void 0;_++)typeof c[_]!="string"?(c[_].copy(E,l),l+=o[_]):(E.write(c[_],l),l+=o[_]);return E},v.exports=u},{"./writeToStream":89,events:78,inherits:80,"safe-buffer":108}],85:[function(s,v,x){x.parser=s("./parser"),x.generate=s("./generate"),x.writeToStream=s("./writeToStream")},{"./generate":84,"./parser":88,"./writeToStream":89}],86:[function(s,v,x){var i=s("safe-buffer").Buffer,a=65536,d={};function f(e){var n=i.allocUnsafe(2);return n.writeUInt8(e>>8,0),n.writeUInt8(e&255,0+1),n}function u(){for(var e=0;e<a;e++)d[e]=f(e)}v.exports={cache:d,generateCache:u,generateNumber:f}},{"safe-buffer":108}],87:[function(s,v,x){function i(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}v.exports=i},{}],88:[function(s,v,x){var i=s("bl"),a=s("inherits"),d=s("events").EventEmitter,f=s("./packet"),u=s("./constants");function e(){if(!(this instanceof e))return new e;this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState()}a(e,d),e.prototype._resetState=function(){this.packet=new f,this.error=null,this._list=i(),this._stateCounter=0},e.prototype.parse=function(n){for(this.error&&this._resetState(),this._list.append(n);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},e.prototype._parseHeader=function(){var n=this._list.readUInt8(0);return this.packet.cmd=u.types[n>>u.CMD_SHIFT],this.packet.retain=(n&u.RETAIN_MASK)!==0,this.packet.qos=n>>u.QOS_SHIFT&u.QOS_MASK,this.packet.dup=(n&u.DUP_MASK)!==0,this._list.consume(1),!0},e.prototype._parseLength=function(){for(var n=0,o=1,c=0,l=!0,_;n<5&&(_=this._list.readUInt8(n++),c+=o*(_&u.LENGTH_MASK),o*=128,(_&u.LENGTH_FIN_MASK)!==0);)if(this._list.length<=n){l=!1;break}return l&&(this.packet.length=c,this._list.consume(n)),l},e.prototype._parsePayload=function(){var n=!1;if(this.packet.length===0||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._parseMessageId();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":case"disconnect":break;default:this._emitError(new Error("Not supported"))}n=!0}return n},e.prototype._parseConnect=function(){var n,o,c,l,_,E,O={},m=this.packet;if(n=this._parseString(),n===null)return this._emitError(new Error("Cannot parse protocolId"));if(n!=="MQTT"&&n!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(m.protocolId=n,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(m.protocolVersion=this._list.readUInt8(this._pos),m.protocolVersion!==3&&m.protocolVersion!==4)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(O.username=this._list.readUInt8(this._pos)&u.USERNAME_MASK,O.password=this._list.readUInt8(this._pos)&u.PASSWORD_MASK,O.will=this._list.readUInt8(this._pos)&u.WILL_FLAG_MASK,O.will&&(m.will={},m.will.retain=(this._list.readUInt8(this._pos)&u.WILL_RETAIN_MASK)!==0,m.will.qos=(this._list.readUInt8(this._pos)&u.WILL_QOS_MASK)>>u.WILL_QOS_SHIFT),m.clean=(this._list.readUInt8(this._pos)&u.CLEAN_SESSION_MASK)!==0,this._pos++,m.keepalive=this._parseNum(),m.keepalive===-1)return this._emitError(new Error("Packet too short"));if(o=this._parseString(),o===null)return this._emitError(new Error("Packet too short"));if(m.clientId=o,O.will){if(c=this._parseString(),c===null)return this._emitError(new Error("Cannot parse will topic"));if(m.will.topic=c,l=this._parseBuffer(),l===null)return this._emitError(new Error("Cannot parse will payload"));m.will.payload=l}if(O.username){if(E=this._parseString(),E===null)return this._emitError(new Error("Cannot parse username"));m.username=E}if(O.password){if(_=this._parseBuffer(),_===null)return this._emitError(new Error("Cannot parse password"));m.password=_}return m},e.prototype._parseConnack=function(){var n=this.packet;if(this._list.length<2)return null;if(n.sessionPresent=!!(this._list.readUInt8(this._pos++)&u.SESSIONPRESENT_MASK),n.returnCode=this._list.readUInt8(this._pos),n.returnCode===-1)return this._emitError(new Error("Cannot parse return code"))},e.prototype._parsePublish=function(){var n=this.packet;if(n.topic=this._parseString(),n.topic===null)return this._emitError(new Error("Cannot parse topic"));n.qos>0&&!this._parseMessageId()||(n.payload=this._list.slice(this._pos,n.length))},e.prototype._parseSubscribe=function(){var n=this.packet,o,c;if(n.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(n.subscriptions=[],!!this._parseMessageId())for(;this._pos<n.length;){if(o=this._parseString(),o===null)return this._emitError(new Error("Cannot parse topic"));c=this._list.readUInt8(this._pos++),n.subscriptions.push({topic:o,qos:c})}},e.prototype._parseSuback=function(){if(this.packet.granted=[],!!this._parseMessageId())for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))},e.prototype._parseUnsubscribe=function(){var n=this.packet;if(n.unsubscriptions=[],!!this._parseMessageId())for(;this._pos<n.length;){var o;if(o=this._parseString(),o===null)return this._emitError(new Error("Cannot parse topic"));n.unsubscriptions.push(o)}},e.prototype._parseUnsuback=function(){if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"))},e.prototype._parseMessageId=function(){var n=this.packet;return n.messageId=this._parseNum(),n.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):!0},e.prototype._parseString=function(n){var o=this._parseNum(),c,l=o+this._pos;return o===-1||l>this._list.length||l>this.packet.length?null:(c=this._list.toString("utf8",this._pos,l),this._pos+=o,c)},e.prototype._parseBuffer=function(){var n=this._parseNum(),o,c=n+this._pos;return n===-1||c>this._list.length||c>this.packet.length?null:(o=this._list.slice(this._pos,c),this._pos+=n,o)},e.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var n=this._list.readUInt16BE(this._pos);return this._pos+=2,n},e.prototype._newPacket=function(){return this.packet&&(this._list.consume(this.packet.length),this.emit("packet",this.packet)),this.packet=new f,!0},e.prototype._emitError=function(n){this.error=n,this.emit("error",n)},v.exports=e},{"./constants":83,"./packet":87,bl:10,events:78,inherits:80}],89:[function(s,v,x){var i=s("./constants"),a=s("safe-buffer").Buffer,d=a.allocUnsafe(0),f=a.from([0]),u=s("./numbers"),e=s("process-nextick-args").nextTick,n=u.cache,o=u.generateNumber,c=u.generateCache,l=F,_=!0;function E(z,N){switch(N.cork&&(N.cork(),e(O,N)),_&&(_=!1,c()),z.cmd){case"connect":return m(z,N);case"connack":return P(z,N);case"publish":return R(z,N);case"puback":case"pubrec":case"pubrel":case"pubcomp":case"unsuback":return C(z,N);case"subscribe":return T(z,N);case"suback":return A(z,N);case"unsubscribe":return S(z,N);case"pingreq":case"pingresp":case"disconnect":return j(z,N);default:return N.emit("error",new Error("Unknown command")),!1}}Object.defineProperty(E,"cacheNumbers",{get:function(){return l===F},set:function(z){z?((!n||Object.keys(n).length===0)&&(_=!0),l=F):(_=!1,l=V)}});function O(z){z.uncork()}function m(z,N){var re=z||{},B=re.protocolId||"MQTT",k=re.protocolVersion||4,p=re.will,I=re.clean,U=re.keepalive||0,$=re.clientId||"",H=re.username,J=re.password;I===void 0&&(I=!0);var te=0;if(!B||typeof B!="string"&&!a.isBuffer(B))return N.emit("error",new Error("Invalid protocolId")),!1;if(te+=B.length+2,k!==3&&k!==4)return N.emit("error",new Error("Invalid protocol version")),!1;if(te+=1,(typeof $=="string"||a.isBuffer($))&&($||k===4)&&($||I))te+=$.length+2;else{if(k<4)return N.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(I*1===0)return N.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof U!="number"||U<0||U>65535||U%1!==0)return N.emit("error",new Error("Invalid keepalive")),!1;if(te+=2,te+=1,p){if(typeof p!="object")return N.emit("error",new Error("Invalid will")),!1;if(!p.topic||typeof p.topic!="string")return N.emit("error",new Error("Invalid will topic")),!1;if(te+=a.byteLength(p.topic)+2,p.payload&&p.payload)if(p.payload.length>=0)typeof p.payload=="string"?te+=a.byteLength(p.payload)+2:te+=p.payload.length+2;else return N.emit("error",new Error("Invalid will payload")),!1;else te+=2}var ne=!1;if(H!=null)if(Q(H))ne=!0,te+=a.byteLength(H)+2;else return N.emit("error",new Error("Invalid username")),!1;if(J!=null){if(!ne)return N.emit("error",new Error("Username is required to use password")),!1;if(Q(J))te+=K(J)+2;else return N.emit("error",new Error("Invalid password")),!1}N.write(i.CONNECT_HEADER),g(N,te),Z(N,B),N.write(k===4?i.VERSION4:i.VERSION3);var ie=0;return ie|=H!=null?i.USERNAME_MASK:0,ie|=J!=null?i.PASSWORD_MASK:0,ie|=p&&p.retain?i.WILL_RETAIN_MASK:0,ie|=p&&p.qos?p.qos<<i.WILL_QOS_SHIFT:0,ie|=p?i.WILL_FLAG_MASK:0,ie|=I?i.CLEAN_SESSION_MASK:0,N.write(a.from([ie])),l(N,U),Z(N,$),p&&(D(N,p.topic),Z(N,p.payload)),H!=null&&Z(N,H),J!=null&&Z(N,J),!0}function P(z,N){var re=z||{},B=re.returnCode;return typeof B!="number"?(N.emit("error",new Error("Invalid return code")),!1):(N.write(i.CONNACK_HEADER),g(N,2),N.write(z.sessionPresent?i.SESSIONPRESENT_HEADER:f),N.write(a.from([B])))}function R(z,N){var re=z||{},B=re.qos||0,k=re.retain?i.RETAIN_MASK:0,p=re.topic,I=re.payload||d,U=re.messageId,$=0;if(typeof p=="string")$+=a.byteLength(p)+2;else if(a.isBuffer(p))$+=p.length+2;else return N.emit("error",new Error("Invalid topic")),!1;return a.isBuffer(I)?$+=I.length:$+=a.byteLength(I),B&&typeof U!="number"?(N.emit("error",new Error("Invalid messageId")),!1):(B&&($+=2),N.write(i.PUBLISH_HEADER[B][z.dup?1:0][k?1:0]),g(N,$),l(N,K(p)),N.write(p),B>0&&l(N,U),N.write(I))}function C(z,N){var re=z||{},B=re.cmd||"puback",k=re.messageId,p=re.dup&&B==="pubrel"?i.DUP_MASK:0,I=0;return B==="pubrel"&&(I=1),typeof k!="number"?(N.emit("error",new Error("Invalid messageId")),!1):(N.write(i.ACKS[B][I][p][0]),g(N,2),l(N,k))}function T(z,N){var re=z||{},B=re.dup?i.DUP_MASK:0,k=re.messageId,p=re.subscriptions,I=0;if(typeof k!="number")return N.emit("error",new Error("Invalid messageId")),!1;if(I+=2,typeof p=="object"&&p.length)for(var U=0;U<p.length;U+=1){var $=p[U].topic,H=p[U].qos;if(typeof $!="string")return N.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof H!="number")return N.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;I+=a.byteLength($)+2+1}else return N.emit("error",new Error("Invalid subscriptions")),!1;N.write(i.SUBSCRIBE_HEADER[1][B?1:0][0]),g(N,I),l(N,k);for(var J=!0,te=0;te<p.length;te++){var ne=p[te],ie=ne.topic,y=ne.qos;D(N,ie),J=N.write(i.QOS[y])}return J}function A(z,N){var re=z||{},B=re.messageId,k=re.granted,p=0;if(typeof B!="number")return N.emit("error",new Error("Invalid messageId")),!1;if(p+=2,typeof k=="object"&&k.length)for(var I=0;I<k.length;I+=1){if(typeof k[I]!="number")return N.emit("error",new Error("Invalid qos vector")),!1;p+=1}else return N.emit("error",new Error("Invalid qos vector")),!1;return N.write(i.SUBACK_HEADER),g(N,p),l(N,B),N.write(a.from(k))}function S(z,N){var re=z||{},B=re.messageId,k=re.dup?i.DUP_MASK:0,p=re.unsubscriptions,I=0;if(typeof B!="number")return N.emit("error",new Error("Invalid messageId")),!1;if(I+=2,typeof p=="object"&&p.length)for(var U=0;U<p.length;U+=1){if(typeof p[U]!="string")return N.emit("error",new Error("Invalid unsubscriptions")),!1;I+=a.byteLength(p[U])+2}else return N.emit("error",new Error("Invalid unsubscriptions")),!1;N.write(i.UNSUBSCRIBE_HEADER[1][k?1:0][0]),g(N,I),l(N,B);for(var $=!0,H=0;H<p.length;H++)$=D(N,p[H]);return $}function j(z,N){return N.write(i.EMPTY[z.cmd])}function W(z){return z>=0&&z<128?1:z>=128&&z<16384?2:z>=16384&&z<2097152?3:z>=2097152&&z<268435456?4:0}function M(z){var N=0,re=0,B=a.allocUnsafe(W(z));do N=z%128|0,z=z/128|0,z>0&&(N=N|128),B.writeUInt8(N,re++);while(z>0);return B}var ee={};function g(z,N){var re=ee[N];re||(re=M(N),N<16384&&(ee[N]=re)),z.write(re)}function D(z,N){var re=a.byteLength(N);l(z,re),z.write(N,"utf8")}function F(z,N){return z.write(n[N])}function V(z,N){return z.write(o(N))}function Z(z,N){typeof N=="string"?D(z,N):N?(l(z,N.length),z.write(N)):l(z,0)}function K(z){return z?z instanceof a?z.length:a.byteLength(z):0}function Q(z){return typeof z=="string"||z instanceof a}v.exports=E},{"./constants":83,"./numbers":86,"process-nextick-args":91,"safe-buffer":108}],90:[function(s,v,x){var i=s("wrappy");v.exports=i(a),v.exports.strict=i(d),a.proto=a(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return a(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return d(this)},configurable:!0})});function a(f){var u=function(){return u.called?u.value:(u.called=!0,u.value=f.apply(this,arguments))};return u.called=!1,u}function d(f){var u=function(){if(u.called)throw new Error(u.onceError);return u.called=!0,u.value=f.apply(this,arguments)},e=f.name||"Function wrapped with `once`";return u.onceError=e+" shouldn't be called more than once",u.called=!1,u}},{wrappy:119}],91:[function(s,v,x){(function(i){!i.version||i.version.indexOf("v0.")===0||i.version.indexOf("v1.")===0&&i.version.indexOf("v1.8.")!==0?v.exports={nextTick:a}:v.exports=i;function a(d,f,u,e){if(typeof d!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,c;switch(n){case 0:case 1:return i.nextTick(d);case 2:return i.nextTick(function(){d.call(null,f)});case 3:return i.nextTick(function(){d.call(null,f,u)});case 4:return i.nextTick(function(){d.call(null,f,u,e)});default:for(o=new Array(n-1),c=0;c<o.length;)o[c++]=arguments[c];return i.nextTick(function(){d.apply(null,o)})}}}).call(this,s("_process"))},{_process:92}],92:[function(s,v,x){var i=v.exports={},a,d;function f(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=f}catch{a=f}try{typeof clearTimeout=="function"?d=clearTimeout:d=u}catch{d=u}})();function e(R){if(a===setTimeout)return setTimeout(R,0);if((a===f||!a)&&setTimeout)return a=setTimeout,setTimeout(R,0);try{return a(R,0)}catch{try{return a.call(null,R,0)}catch{return a.call(this,R,0)}}}function n(R){if(d===clearTimeout)return clearTimeout(R);if((d===u||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(R);try{return d(R)}catch{try{return d.call(null,R)}catch{return d.call(this,R)}}}var o=[],c=!1,l,_=-1;function E(){!c||!l||(c=!1,l.length?o=l.concat(o):_=-1,o.length&&O())}function O(){if(!c){var R=e(E);c=!0;for(var C=o.length;C;){for(l=o,o=[];++_<C;)l&&l[_].run();_=-1,C=o.length}l=null,c=!1,n(R)}}i.nextTick=function(R){var C=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)C[T-1]=arguments[T];o.push(new m(R,C)),o.length===1&&!c&&e(O)};function m(R,C){this.fun=R,this.array=C}m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function P(){}i.on=P,i.addListener=P,i.once=P,i.off=P,i.removeListener=P,i.removeAllListeners=P,i.emit=P,i.prependListener=P,i.prependOnceListener=P,i.listeners=function(R){return[]},i.binding=function(R){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(R){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],93:[function(s,v,x){(function(i){(function(a){var d=typeof x=="object"&&x&&!x.nodeType&&x,f=typeof v=="object"&&v&&!v.nodeType&&v,u=typeof i=="object"&&i;(u.global===u||u.window===u||u.self===u)&&(a=u);var e,n=2147483647,o=36,c=1,l=26,_=38,E=700,O=72,m=128,P="-",R=/^xn--/,C=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=o-c,j=Math.floor,W=String.fromCharCode,M;function ee(k){throw new RangeError(A[k])}function g(k,p){for(var I=k.length,U=[];I--;)U[I]=p(k[I]);return U}function D(k,p){var I=k.split("@"),U="";I.length>1&&(U=I[0]+"@",k=I[1]),k=k.replace(T,".");var $=k.split("."),H=g($,p).join(".");return U+H}function F(k){for(var p=[],I=0,U=k.length,$,H;I<U;)$=k.charCodeAt(I++),$>=55296&&$<=56319&&I<U?(H=k.charCodeAt(I++),(H&64512)==56320?p.push((($&1023)<<10)+(H&1023)+65536):(p.push($),I--)):p.push($);return p}function V(k){return g(k,function(p){var I="";return p>65535&&(p-=65536,I+=W(p>>>10&1023|55296),p=56320|p&1023),I+=W(p),I}).join("")}function Z(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:o}function K(k,p){return k+22+75*(k<26)-((p!=0)<<5)}function Q(k,p,I){var U=0;for(k=I?j(k/E):k>>1,k+=j(k/p);k>S*l>>1;U+=o)k=j(k/S);return j(U+(S+1)*k/(k+_))}function z(k){var p=[],I=k.length,U,$=0,H=m,J=O,te,ne,ie,y,w,G,Y,oe,h;for(te=k.lastIndexOf(P),te<0&&(te=0),ne=0;ne<te;++ne)k.charCodeAt(ne)>=128&&ee("not-basic"),p.push(k.charCodeAt(ne));for(ie=te>0?te+1:0;ie<I;){for(y=$,w=1,G=o;ie>=I&&ee("invalid-input"),Y=Z(k.charCodeAt(ie++)),(Y>=o||Y>j((n-$)/w))&&ee("overflow"),$+=Y*w,oe=G<=J?c:G>=J+l?l:G-J,!(Y<oe);G+=o)h=o-oe,w>j(n/h)&&ee("overflow"),w*=h;U=p.length+1,J=Q($-y,U,y==0),j($/U)>n-H&&ee("overflow"),H+=j($/U),$%=U,p.splice($++,0,H)}return V(p)}function N(k){var p,I,U,$,H,J,te,ne,ie,y,w,G=[],Y,oe,h,t;for(k=F(k),Y=k.length,p=m,I=0,H=O,J=0;J<Y;++J)w=k[J],w<128&&G.push(W(w));for(U=$=G.length,$&&G.push(P);U<Y;){for(te=n,J=0;J<Y;++J)w=k[J],w>=p&&w<te&&(te=w);for(oe=U+1,te-p>j((n-I)/oe)&&ee("overflow"),I+=(te-p)*oe,p=te,J=0;J<Y;++J)if(w=k[J],w<p&&++I>n&&ee("overflow"),w==p){for(ne=I,ie=o;y=ie<=H?c:ie>=H+l?l:ie-H,!(ne<y);ie+=o)t=ne-y,h=o-y,G.push(W(K(y+t%h,0))),ne=j(t/h);G.push(W(K(ne,0))),H=Q(I,oe,U==$),I=0,++U}++I,++p}return G.join("")}function re(k){return D(k,function(p){return R.test(p)?z(p.slice(4).toLowerCase()):p})}function B(k){return D(k,function(p){return C.test(p)?"xn--"+N(p):p})}if(e={version:"1.4.1",ucs2:{decode:F,encode:V},decode:z,encode:N,toASCII:B,toUnicode:re},d&&f)if(v.exports==d)f.exports=e;else for(M in e)e.hasOwnProperty(M)&&(d[M]=e[M]);else a.punycode=e})(this)}).call(this,typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}],94:[function(s,v,x){function i(d,f){return Object.prototype.hasOwnProperty.call(d,f)}v.exports=function(d,f,u,e){f=f||"&",u=u||"=";var n={};if(typeof d!="string"||d.length===0)return n;var o=/\+/g;d=d.split(f);var c=1e3;e&&typeof e.maxKeys=="number"&&(c=e.maxKeys);var l=d.length;c>0&&l>c&&(l=c);for(var _=0;_<l;++_){var E=d[_].replace(o,"%20"),O=E.indexOf(u),m,P,R,C;O>=0?(m=E.substr(0,O),P=E.substr(O+1)):(m=E,P=""),R=decodeURIComponent(m),C=decodeURIComponent(P),i(n,R)?a(n[R])?n[R].push(C):n[R]=[n[R],C]:n[R]=C}return n};var a=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}},{}],95:[function(s,v,x){var i=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};v.exports=function(u,e,n,o){return e=e||"&",n=n||"=",u===null&&(u=void 0),typeof u=="object"?d(f(u),function(c){var l=encodeURIComponent(i(c))+n;return a(u[c])?d(u[c],function(_){return l+encodeURIComponent(i(_))}).join(e):l+encodeURIComponent(i(u[c]))}).join(e):o?encodeURIComponent(i(o))+n+encodeURIComponent(i(u)):""};var a=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function d(u,e){if(u.map)return u.map(e);for(var n=[],o=0;o<u.length;o++)n.push(e(u[o],o));return n}var f=Object.keys||function(u){var e=[];for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&e.push(n);return e}},{}],96:[function(s,v,x){x.decode=x.parse=s("./decode"),x.encode=x.stringify=s("./encode")},{"./decode":94,"./encode":95}],97:[function(s,v,x){v.exports=s("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":98}],98:[function(s,v,x){var i=s("process-nextick-args"),a=Object.keys||function(E){var O=[];for(var m in E)O.push(m);return O};v.exports=c;var d=s("core-util-is");d.inherits=s("inherits");var f=s("./_stream_readable"),u=s("./_stream_writable");d.inherits(c,f);for(var e=a(u.prototype),n=0;n<e.length;n++){var o=e[n];c.prototype[o]||(c.prototype[o]=u.prototype[o])}function c(E){if(!(this instanceof c))return new c(E);f.call(this,E),u.call(this,E),E&&E.readable===!1&&(this.readable=!1),E&&E.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,E&&E.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",l)}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l(){this.allowHalfOpen||this._writableState.ended||i.nextTick(_,this)}function _(E){E.end()}Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(E){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=E,this._writableState.destroyed=E)}}),c.prototype._destroy=function(E,O){this.push(null),this.end(),i.nextTick(O,E)}},{"./_stream_readable":100,"./_stream_writable":102,"core-util-is":13,inherits:80,"process-nextick-args":91}],99:[function(s,v,x){v.exports=d;var i=s("./_stream_transform"),a=s("core-util-is");a.inherits=s("inherits"),a.inherits(d,i);function d(f){if(!(this instanceof d))return new d(f);i.call(this,f)}d.prototype._transform=function(f,u,e){e(null,f)}},{"./_stream_transform":101,"core-util-is":13,inherits:80}],100:[function(s,v,x){(function(i,a){var d=s("process-nextick-args");v.exports=j;var f=s("isarray"),u;j.ReadableState=S,s("events").EventEmitter;var e=function(y,w){return y.listeners(w).length},n=s("./internal/streams/stream"),o=s("safe-buffer").Buffer,c=a.Uint8Array||function(){};function l(y){return o.from(y)}function _(y){return o.isBuffer(y)||y instanceof c}var E=s("core-util-is");E.inherits=s("inherits");var O=s("util"),m=void 0;O&&O.debuglog?m=O.debuglog("stream"):m=function(){};var P=s("./internal/streams/BufferList"),R=s("./internal/streams/destroy"),C;E.inherits(j,n);var T=["error","close","destroy","pause","resume"];function A(y,w,G){if(typeof y.prependListener=="function")return y.prependListener(w,G);!y._events||!y._events[w]?y.on(w,G):f(y._events[w])?y._events[w].unshift(G):y._events[w]=[G,y._events[w]]}function S(y,w){u=u||s("./_stream_duplex"),y=y||{};var G=w instanceof u;this.objectMode=!!y.objectMode,G&&(this.objectMode=this.objectMode||!!y.readableObjectMode);var Y=y.highWaterMark,oe=y.readableHighWaterMark,h=this.objectMode?16:16*1024;Y||Y===0?this.highWaterMark=Y:G&&(oe||oe===0)?this.highWaterMark=oe:this.highWaterMark=h,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new P,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.destroyed=!1,this.defaultEncoding=y.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,y.encoding&&(C||(C=s("string_decoder/").StringDecoder),this.decoder=new C(y.encoding),this.encoding=y.encoding)}function j(y){if(u=u||s("./_stream_duplex"),!(this instanceof j))return new j(y);this._readableState=new S(y,this),this.readable=!0,y&&(typeof y.read=="function"&&(this._read=y.read),typeof y.destroy=="function"&&(this._destroy=y.destroy)),n.call(this)}Object.defineProperty(j.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(y){!this._readableState||(this._readableState.destroyed=y)}}),j.prototype.destroy=R.destroy,j.prototype._undestroy=R.undestroy,j.prototype._destroy=function(y,w){this.push(null),w(y)},j.prototype.push=function(y,w){var G=this._readableState,Y;return G.objectMode?Y=!0:typeof y=="string"&&(w=w||G.defaultEncoding,w!==G.encoding&&(y=o.from(y,w),w=""),Y=!0),W(this,y,w,!1,Y)},j.prototype.unshift=function(y){return W(this,y,null,!0,!1)};function W(y,w,G,Y,oe){var h=y._readableState;if(w===null)h.reading=!1,Z(y,h);else{var t;oe||(t=ee(h,w)),t?y.emit("error",t):h.objectMode||w&&w.length>0?(typeof w!="string"&&!h.objectMode&&Object.getPrototypeOf(w)!==o.prototype&&(w=l(w)),Y?h.endEmitted?y.emit("error",new Error("stream.unshift() after end event")):M(y,h,w,!0):h.ended?y.emit("error",new Error("stream.push() after EOF")):(h.reading=!1,h.decoder&&!G?(w=h.decoder.write(w),h.objectMode||w.length!==0?M(y,h,w,!1):z(y,h)):M(y,h,w,!1))):Y||(h.reading=!1)}return g(h)}function M(y,w,G,Y){w.flowing&&w.length===0&&!w.sync?(y.emit("data",G),y.read(0)):(w.length+=w.objectMode?1:G.length,Y?w.buffer.unshift(G):w.buffer.push(G),w.needReadable&&K(y)),z(y,w)}function ee(y,w){var G;return!_(w)&&typeof w!="string"&&w!==void 0&&!y.objectMode&&(G=new TypeError("Invalid non-string/buffer chunk")),G}function g(y){return!y.ended&&(y.needReadable||y.length<y.highWaterMark||y.length===0)}j.prototype.isPaused=function(){return this._readableState.flowing===!1},j.prototype.setEncoding=function(y){return C||(C=s("string_decoder/").StringDecoder),this._readableState.decoder=new C(y),this._readableState.encoding=y,this};var D=8388608;function F(y){return y>=D?y=D:(y--,y|=y>>>1,y|=y>>>2,y|=y>>>4,y|=y>>>8,y|=y>>>16,y++),y}function V(y,w){return y<=0||w.length===0&&w.ended?0:w.objectMode?1:y!==y?w.flowing&&w.length?w.buffer.head.data.length:w.length:(y>w.highWaterMark&&(w.highWaterMark=F(y)),y<=w.length?y:w.ended?w.length:(w.needReadable=!0,0))}j.prototype.read=function(y){m("read",y),y=parseInt(y,10);var w=this._readableState,G=y;if(y!==0&&(w.emittedReadable=!1),y===0&&w.needReadable&&(w.length>=w.highWaterMark||w.ended))return m("read: emitReadable",w.length,w.ended),w.length===0&&w.ended?te(this):K(this),null;if(y=V(y,w),y===0&&w.ended)return w.length===0&&te(this),null;var Y=w.needReadable;m("need readable",Y),(w.length===0||w.length-y<w.highWaterMark)&&(Y=!0,m("length less than watermark",Y)),w.ended||w.reading?(Y=!1,m("reading or ended",Y)):Y&&(m("do read"),w.reading=!0,w.sync=!0,w.length===0&&(w.needReadable=!0),this._read(w.highWaterMark),w.sync=!1,w.reading||(y=V(G,w)));var oe;return y>0?oe=U(y,w):oe=null,oe===null?(w.needReadable=!0,y=0):w.length-=y,w.length===0&&(w.ended||(w.needReadable=!0),G!==y&&w.ended&&te(this)),oe!==null&&this.emit("data",oe),oe};function Z(y,w){if(!w.ended){if(w.decoder){var G=w.decoder.end();G&&G.length&&(w.buffer.push(G),w.length+=w.objectMode?1:G.length)}w.ended=!0,K(y)}}function K(y){var w=y._readableState;w.needReadable=!1,w.emittedReadable||(m("emitReadable",w.flowing),w.emittedReadable=!0,w.sync?d.nextTick(Q,y):Q(y))}function Q(y){m("emit readable"),y.emit("readable"),I(y)}function z(y,w){w.readingMore||(w.readingMore=!0,d.nextTick(N,y,w))}function N(y,w){for(var G=w.length;!w.reading&&!w.flowing&&!w.ended&&w.length<w.highWaterMark&&(m("maybeReadMore read 0"),y.read(0),G!==w.length);)G=w.length;w.readingMore=!1}j.prototype._read=function(y){this.emit("error",new Error("_read() is not implemented"))},j.prototype.pipe=function(y,w){var G=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=y;break;case 1:Y.pipes=[Y.pipes,y];break;default:Y.pipes.push(y);break}Y.pipesCount+=1,m("pipe count=%d opts=%j",Y.pipesCount,w);var oe=(!w||w.end!==!1)&&y!==i.stdout&&y!==i.stderr,h=oe?r:le;Y.endEmitted?d.nextTick(h):G.once("end",h),y.on("unpipe",t);function t(be,Se){m("onunpipe"),be===G&&Se&&Se.hasUnpiped===!1&&(Se.hasUnpiped=!0,q())}function r(){m("onend"),y.end()}var b=re(G);y.on("drain",b);var L=!1;function q(){m("cleanup"),y.removeListener("close",ue),y.removeListener("finish",pe),y.removeListener("drain",b),y.removeListener("error",ae),y.removeListener("unpipe",t),G.removeListener("end",r),G.removeListener("end",le),G.removeListener("data",se),L=!0,Y.awaitDrain&&(!y._writableState||y._writableState.needDrain)&&b()}var X=!1;G.on("data",se);function se(be){m("ondata"),X=!1;var Se=y.write(be);Se===!1&&!X&&((Y.pipesCount===1&&Y.pipes===y||Y.pipesCount>1&&ie(Y.pipes,y)!==-1)&&!L&&(m("false write response, pause",G._readableState.awaitDrain),G._readableState.awaitDrain++,X=!0),G.pause())}function ae(be){m("onerror",be),le(),y.removeListener("error",ae),e(y,"error")===0&&y.emit("error",be)}A(y,"error",ae);function ue(){y.removeListener("finish",pe),le()}y.once("close",ue);function pe(){m("onfinish"),y.removeListener("close",ue),le()}y.once("finish",pe);function le(){m("unpipe"),G.unpipe(y)}return y.emit("pipe",G),Y.flowing||(m("pipe resume"),G.resume()),y};function re(y){return function(){var w=y._readableState;m("pipeOnDrain",w.awaitDrain),w.awaitDrain&&w.awaitDrain--,w.awaitDrain===0&&e(y,"data")&&(w.flowing=!0,I(y))}}j.prototype.unpipe=function(y){var w=this._readableState,G={hasUnpiped:!1};if(w.pipesCount===0)return this;if(w.pipesCount===1)return y&&y!==w.pipes?this:(y||(y=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,y&&y.emit("unpipe",this,G),this);if(!y){var Y=w.pipes,oe=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var h=0;h<oe;h++)Y[h].emit("unpipe",this,G);return this}var t=ie(w.pipes,y);return t===-1?this:(w.pipes.splice(t,1),w.pipesCount-=1,w.pipesCount===1&&(w.pipes=w.pipes[0]),y.emit("unpipe",this,G),this)},j.prototype.on=function(y,w){var G=n.prototype.on.call(this,y,w);if(y==="data")this._readableState.flowing!==!1&&this.resume();else if(y==="readable"){var Y=this._readableState;!Y.endEmitted&&!Y.readableListening&&(Y.readableListening=Y.needReadable=!0,Y.emittedReadable=!1,Y.reading?Y.length&&K(this):d.nextTick(B,this))}return G},j.prototype.addListener=j.prototype.on;function B(y){m("readable nexttick read 0"),y.read(0)}j.prototype.resume=function(){var y=this._readableState;return y.flowing||(m("resume"),y.flowing=!0,k(this,y)),this};function k(y,w){w.resumeScheduled||(w.resumeScheduled=!0,d.nextTick(p,y,w))}function p(y,w){w.reading||(m("resume read 0"),y.read(0)),w.resumeScheduled=!1,w.awaitDrain=0,y.emit("resume"),I(y),w.flowing&&!w.reading&&y.read(0)}j.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function I(y){var w=y._readableState;for(m("flow",w.flowing);w.flowing&&y.read()!==null;);}j.prototype.wrap=function(y){var w=this,G=this._readableState,Y=!1;y.on("end",function(){if(m("wrapped end"),G.decoder&&!G.ended){var t=G.decoder.end();t&&t.length&&w.push(t)}w.push(null)}),y.on("data",function(t){if(m("wrapped data"),G.decoder&&(t=G.decoder.write(t)),!(G.objectMode&&t==null)&&!(!G.objectMode&&(!t||!t.length))){var r=w.push(t);r||(Y=!0,y.pause())}});for(var oe in y)this[oe]===void 0&&typeof y[oe]=="function"&&(this[oe]=function(t){return function(){return y[t].apply(y,arguments)}}(oe));for(var h=0;h<T.length;h++)y.on(T[h],this.emit.bind(this,T[h]));return this._read=function(t){m("wrapped _read",t),Y&&(Y=!1,y.resume())},this},Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),j._fromList=U;function U(y,w){if(w.length===0)return null;var G;return w.objectMode?G=w.buffer.shift():!y||y>=w.length?(w.decoder?G=w.buffer.join(""):w.buffer.length===1?G=w.buffer.head.data:G=w.buffer.concat(w.length),w.buffer.clear()):G=$(y,w.buffer,w.decoder),G}function $(y,w,G){var Y;return y<w.head.data.length?(Y=w.head.data.slice(0,y),w.head.data=w.head.data.slice(y)):y===w.head.data.length?Y=w.shift():Y=G?H(y,w):J(y,w),Y}function H(y,w){var G=w.head,Y=1,oe=G.data;for(y-=oe.length;G=G.next;){var h=G.data,t=y>h.length?h.length:y;if(t===h.length?oe+=h:oe+=h.slice(0,y),y-=t,y===0){t===h.length?(++Y,G.next?w.head=G.next:w.head=w.tail=null):(w.head=G,G.data=h.slice(t));break}++Y}return w.length-=Y,oe}function J(y,w){var G=o.allocUnsafe(y),Y=w.head,oe=1;for(Y.data.copy(G),y-=Y.data.length;Y=Y.next;){var h=Y.data,t=y>h.length?h.length:y;if(h.copy(G,G.length-y,0,t),y-=t,y===0){t===h.length?(++oe,Y.next?w.head=Y.next:w.head=w.tail=null):(w.head=Y,Y.data=h.slice(t));break}++oe}return w.length-=oe,G}function te(y){var w=y._readableState;if(w.length>0)throw new Error('"endReadable()" called on non-empty stream');w.endEmitted||(w.ended=!0,d.nextTick(ne,w,y))}function ne(y,w){!y.endEmitted&&y.length===0&&(y.endEmitted=!0,w.readable=!1,w.emit("end"))}function ie(y,w){for(var G=0,Y=y.length;G<Y;G++)if(y[G]===w)return G;return-1}}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./_stream_duplex":98,"./internal/streams/BufferList":103,"./internal/streams/destroy":104,"./internal/streams/stream":105,_process:92,"core-util-is":13,events:78,inherits:80,isarray:82,"process-nextick-args":91,"safe-buffer":108,"string_decoder/":110,util:11}],101:[function(s,v,x){v.exports=f;var i=s("./_stream_duplex"),a=s("core-util-is");a.inherits=s("inherits"),a.inherits(f,i);function d(n,o){var c=this._transformState;c.transforming=!1;var l=c.writecb;if(!l)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,o!=null&&this.push(o),l(n);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}function f(n){if(!(this instanceof f))return new f(n);i.call(this,n),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,n&&(typeof n.transform=="function"&&(this._transform=n.transform),typeof n.flush=="function"&&(this._flush=n.flush)),this.on("prefinish",u)}function u(){var n=this;typeof this._flush=="function"?this._flush(function(o,c){e(n,o,c)}):e(this,null,null)}f.prototype.push=function(n,o){return this._transformState.needTransform=!1,i.prototype.push.call(this,n,o)},f.prototype._transform=function(n,o,c){throw new Error("_transform() is not implemented")},f.prototype._write=function(n,o,c){var l=this._transformState;if(l.writecb=c,l.writechunk=n,l.writeencoding=o,!l.transforming){var _=this._readableState;(l.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},f.prototype._read=function(n){var o=this._transformState;o.writechunk!==null&&o.writecb&&!o.transforming?(o.transforming=!0,this._transform(o.writechunk,o.writeencoding,o.afterTransform)):o.needTransform=!0},f.prototype._destroy=function(n,o){var c=this;i.prototype._destroy.call(this,n,function(l){o(l),c.emit("close")})};function e(n,o,c){if(o)return n.emit("error",o);if(c!=null&&n.push(c),n._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(n._transformState.transforming)throw new Error("Calling transform done when still transforming");return n.push(null)}},{"./_stream_duplex":98,"core-util-is":13,inherits:80}],102:[function(s,v,x){(function(i,a,d){var f=s("process-nextick-args");v.exports=A;function u(p){var I=this;this.next=null,this.entry=null,this.finish=function(){k(I,p)}}var e=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?d:f.nextTick,n;A.WritableState=C;var o=s("core-util-is");o.inherits=s("inherits");var c={deprecate:s("util-deprecate")},l=s("./internal/streams/stream"),_=s("safe-buffer").Buffer,E=a.Uint8Array||function(){};function O(p){return _.from(p)}function m(p){return _.isBuffer(p)||p instanceof E}var P=s("./internal/streams/destroy");o.inherits(A,l);function R(){}function C(p,I){n=n||s("./_stream_duplex"),p=p||{};var U=I instanceof n;this.objectMode=!!p.objectMode,U&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var $=p.highWaterMark,H=p.writableHighWaterMark,J=this.objectMode?16:16*1024;$||$===0?this.highWaterMark=$:U&&(H||H===0)?this.highWaterMark=H:this.highWaterMark=J,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var te=p.decodeStrings===!1;this.decodeStrings=!te,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){F(I,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}C.prototype.getBuffer=function(){for(var I=this.bufferedRequest,U=[];I;)U.push(I),I=I.next;return U},function(){try{Object.defineProperty(C.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(p){return T.call(this,p)?!0:this!==A?!1:p&&p._writableState instanceof C}})):T=function(p){return p instanceof this};function A(p){if(n=n||s("./_stream_duplex"),!T.call(A,this)&&!(this instanceof n))return new A(p);this._writableState=new C(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),l.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function S(p,I){var U=new Error("write after end");p.emit("error",U),f.nextTick(I,U)}function j(p,I,U,$){var H=!0,J=!1;return U===null?J=new TypeError("May not write null values to stream"):typeof U!="string"&&U!==void 0&&!I.objectMode&&(J=new TypeError("Invalid non-string/buffer chunk")),J&&(p.emit("error",J),f.nextTick($,J),H=!1),H}A.prototype.write=function(p,I,U){var $=this._writableState,H=!1,J=!$.objectMode&&m(p);return J&&!_.isBuffer(p)&&(p=O(p)),typeof I=="function"&&(U=I,I=null),J?I="buffer":I||(I=$.defaultEncoding),typeof U!="function"&&(U=R),$.ended?S(this,U):(J||j(this,$,p,U))&&($.pendingcb++,H=M(this,$,J,p,I,U)),H},A.prototype.cork=function(){var p=this._writableState;p.corked++},A.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,!p.writing&&!p.corked&&!p.finished&&!p.bufferProcessing&&p.bufferedRequest&&K(this,p))},A.prototype.setDefaultEncoding=function(I){if(typeof I=="string"&&(I=I.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((I+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+I);return this._writableState.defaultEncoding=I,this};function W(p,I,U){return!p.objectMode&&p.decodeStrings!==!1&&typeof I=="string"&&(I=_.from(I,U)),I}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(p,I,U,$,H,J){if(!U){var te=W(I,$,H);$!==te&&(U=!0,H="buffer",$=te)}var ne=I.objectMode?1:$.length;I.length+=ne;var ie=I.length<I.highWaterMark;if(ie||(I.needDrain=!0),I.writing||I.corked){var y=I.lastBufferedRequest;I.lastBufferedRequest={chunk:$,encoding:H,isBuf:U,callback:J,next:null},y?y.next=I.lastBufferedRequest:I.bufferedRequest=I.lastBufferedRequest,I.bufferedRequestCount+=1}else ee(p,I,!1,ne,$,H,J);return ie}function ee(p,I,U,$,H,J,te){I.writelen=$,I.writecb=te,I.writing=!0,I.sync=!0,U?p._writev(H,I.onwrite):p._write(H,J,I.onwrite),I.sync=!1}function g(p,I,U,$,H){--I.pendingcb,U?(f.nextTick(H,$),f.nextTick(re,p,I),p._writableState.errorEmitted=!0,p.emit("error",$)):(H($),p._writableState.errorEmitted=!0,p.emit("error",$),re(p,I))}function D(p){p.writing=!1,p.writecb=null,p.length-=p.writelen,p.writelen=0}function F(p,I){var U=p._writableState,$=U.sync,H=U.writecb;if(D(U),I)g(p,U,$,I,H);else{var J=Q(U);!J&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&K(p,U),$?e(V,p,U,J,H):V(p,U,J,H)}}function V(p,I,U,$){U||Z(p,I),I.pendingcb--,$(),re(p,I)}function Z(p,I){I.length===0&&I.needDrain&&(I.needDrain=!1,p.emit("drain"))}function K(p,I){I.bufferProcessing=!0;var U=I.bufferedRequest;if(p._writev&&U&&U.next){var $=I.bufferedRequestCount,H=new Array($),J=I.corkedRequestsFree;J.entry=U;for(var te=0,ne=!0;U;)H[te]=U,U.isBuf||(ne=!1),U=U.next,te+=1;H.allBuffers=ne,ee(p,I,!0,I.length,H,"",J.finish),I.pendingcb++,I.lastBufferedRequest=null,J.next?(I.corkedRequestsFree=J.next,J.next=null):I.corkedRequestsFree=new u(I),I.bufferedRequestCount=0}else{for(;U;){var ie=U.chunk,y=U.encoding,w=U.callback,G=I.objectMode?1:ie.length;if(ee(p,I,!1,G,ie,y,w),U=U.next,I.bufferedRequestCount--,I.writing)break}U===null&&(I.lastBufferedRequest=null)}I.bufferedRequest=U,I.bufferProcessing=!1}A.prototype._write=function(p,I,U){U(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(p,I,U){var $=this._writableState;typeof p=="function"?(U=p,p=null,I=null):typeof I=="function"&&(U=I,I=null),p!=null&&this.write(p,I),$.corked&&($.corked=1,this.uncork()),!$.ending&&!$.finished&&B(this,$,U)};function Q(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function z(p,I){p._final(function(U){I.pendingcb--,U&&p.emit("error",U),I.prefinished=!0,p.emit("prefinish"),re(p,I)})}function N(p,I){!I.prefinished&&!I.finalCalled&&(typeof p._final=="function"?(I.pendingcb++,I.finalCalled=!0,f.nextTick(z,p,I)):(I.prefinished=!0,p.emit("prefinish")))}function re(p,I){var U=Q(I);return U&&(N(p,I),I.pendingcb===0&&(I.finished=!0,p.emit("finish"))),U}function B(p,I,U){I.ending=!0,re(p,I),U&&(I.finished?f.nextTick(U):p.once("finish",U)),I.ended=!0,p.writable=!1}function k(p,I,U){var $=p.entry;for(p.entry=null;$;){var H=$.callback;I.pendingcb--,H(U),$=$.next}I.corkedRequestsFree?I.corkedRequestsFree.next=p:I.corkedRequestsFree=p}Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(p){!this._writableState||(this._writableState.destroyed=p)}}),A.prototype.destroy=P.destroy,A.prototype._undestroy=P.undestroy,A.prototype._destroy=function(p,I){this.end(),I(p)}}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{},s("timers").setImmediate)},{"./_stream_duplex":98,"./internal/streams/destroy":104,"./internal/streams/stream":105,_process:92,"core-util-is":13,inherits:80,"process-nextick-args":91,"safe-buffer":108,timers:111,"util-deprecate":114}],103:[function(s,v,x){function i(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}var a=s("safe-buffer").Buffer,d=s("util");function f(u,e,n){u.copy(e,n)}v.exports=function(){function u(){i(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(n){var o={data:n,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},u.prototype.unshift=function(n){var o={data:n,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},u.prototype.shift=function(){if(this.length!==0){var n=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,n}},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(n){if(this.length===0)return"";for(var o=this.head,c=""+o.data;o=o.next;)c+=n+o.data;return c},u.prototype.concat=function(n){if(this.length===0)return a.alloc(0);if(this.length===1)return this.head.data;for(var o=a.allocUnsafe(n>>>0),c=this.head,l=0;c;)f(c.data,o,l),l+=c.data.length,c=c.next;return o},u}(),d&&d.inspect&&d.inspect.custom&&(v.exports.prototype[d.inspect.custom]=function(){var u=d.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":108,util:11}],104:[function(s,v,x){var i=s("process-nextick-args");function a(u,e){var n=this,o=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return o||c?(e?e(u):u&&(!this._writableState||!this._writableState.errorEmitted)&&i.nextTick(f,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(l){!e&&l?(i.nextTick(f,n,l),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(l)}),this)}function d(){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.finished=!1,this._writableState.errorEmitted=!1)}function f(u,e){u.emit("error",e)}v.exports={destroy:a,undestroy:d}},{"process-nextick-args":91}],105:[function(s,v,x){v.exports=s("events").EventEmitter},{events:78}],106:[function(s,v,x){x=v.exports=s("./lib/_stream_readable.js"),x.Stream=x,x.Readable=x,x.Writable=s("./lib/_stream_writable.js"),x.Duplex=s("./lib/_stream_duplex.js"),x.Transform=s("./lib/_stream_transform.js"),x.PassThrough=s("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":98,"./lib/_stream_passthrough.js":99,"./lib/_stream_readable.js":100,"./lib/_stream_transform.js":101,"./lib/_stream_writable.js":102}],107:[function(s,v,x){function i(d,f,u){var e=this;this._callback=d,this._args=u,this._interval=setInterval(d,f,this._args),this.reschedule=function(n){n||(n=e._interval),e._interval&&clearInterval(e._interval),e._interval=setInterval(e._callback,n,e._args)},this.clear=function(){e._interval&&(clearInterval(e._interval),e._interval=void 0)},this.destroy=function(){e._interval&&clearInterval(e._interval),e._callback=void 0,e._interval=void 0,e._args=void 0}}function a(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var d;if(arguments.length>0){d=new Array(arguments.length-2);for(var f=0;f<d.length;f++)d[f]=arguments[f+2]}return new i(arguments[0],arguments[1],d)}v.exports=a},{}],108:[function(s,v,x){var i=s("buffer"),a=i.Buffer;function d(u,e){for(var n in u)e[n]=u[n]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?v.exports=i:(d(i,x),x.Buffer=f);function f(u,e,n){return a(u,e,n)}d(a,f),f.from=function(u,e,n){if(typeof u=="number")throw new TypeError("Argument must not be a number");return a(u,e,n)},f.alloc=function(u,e,n){if(typeof u!="number")throw new TypeError("Argument must be a number");var o=a(u);return e!==void 0?typeof n=="string"?o.fill(e,n):o.fill(e):o.fill(0),o},f.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return a(u)},f.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(u)}},{buffer:12}],109:[function(s,v,x){v.exports=i;function i(d){var f=d._readableState;return f?f.objectMode?d.read():d.read(a(f)):null}function a(d){return d.buffer.length?d.buffer.head?d.buffer.head.data.length:d.buffer[0].length:d.length}},{}],110:[function(s,v,x){var i=s("safe-buffer").Buffer,a=i.isEncoding||function(T){switch(T=""+T,T&&T.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 d(T){if(!T)return"utf8";for(var A;;)switch(T){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 T;default:if(A)return;T=(""+T).toLowerCase(),A=!0}}function f(T){var A=d(T);if(typeof A!="string"&&(i.isEncoding===a||!a(T)))throw new Error("Unknown encoding: "+T);return A||T}x.StringDecoder=u;function u(T){this.encoding=f(T);var A;switch(this.encoding){case"utf16le":this.text=E,this.end=O,A=4;break;case"utf8":this.fillLast=c,A=4;break;case"base64":this.text=m,this.end=P,A=3;break;default:this.write=R,this.end=C;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(A)}u.prototype.write=function(T){if(T.length===0)return"";var A,S;if(this.lastNeed){if(A=this.fillLast(T),A===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<T.length?A?A+this.text(T,S):this.text(T,S):A||""},u.prototype.end=_,u.prototype.text=l,u.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function e(T){return T<=127?0:T>>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function n(T,A,S){var j=A.length-1;if(j<S)return 0;var W=e(A[j]);return W>=0?(W>0&&(T.lastNeed=W-1),W):--j<S||W===-2?0:(W=e(A[j]),W>=0?(W>0&&(T.lastNeed=W-2),W):--j<S||W===-2?0:(W=e(A[j]),W>=0?(W>0&&(W===2?W=0:T.lastNeed=W-3),W):0))}function o(T,A,S){if((A[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function c(T){var A=this.lastTotal-this.lastNeed,S=o(this,T);if(S!==void 0)return S;if(this.lastNeed<=T.length)return T.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,A,0,T.length),this.lastNeed-=T.length}function l(T,A){var S=n(this,T,A);if(!this.lastNeed)return T.toString("utf8",A);this.lastTotal=S;var j=T.length-(S-this.lastNeed);return T.copy(this.lastChar,0,j),T.toString("utf8",A,j)}function _(T){var A=T&&T.length?this.write(T):"";return this.lastNeed?A+"\uFFFD":A}function E(T,A){if((T.length-A)%2===0){var S=T.toString("utf16le",A);if(S){var j=S.charCodeAt(S.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",A,T.length-1)}function O(T){var A=T&&T.length?this.write(T):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,S)}return A}function m(T,A){var S=(T.length-A)%3;return S===0?T.toString("base64",A):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",A,T.length-S))}function P(T){var A=T&&T.length?this.write(T):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function R(T){return T.toString(this.encoding)}function C(T){return T&&T.length?this.write(T):""}},{"safe-buffer":108}],111:[function(s,v,x){(function(i,a){var d=s("process/browser.js").nextTick,f=Function.prototype.apply,u=Array.prototype.slice,e={},n=0;x.setTimeout=function(){return new o(f.call(setTimeout,window,arguments),clearTimeout)},x.setInterval=function(){return new o(f.call(setInterval,window,arguments),clearInterval)},x.clearTimeout=x.clearInterval=function(c){c.close()};function o(c,l){this._id=c,this._clearFn=l}o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},x.enroll=function(c,l){clearTimeout(c._idleTimeoutId),c._idleTimeout=l},x.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},x._unrefActive=x.active=function(c){clearTimeout(c._idleTimeoutId);var l=c._idleTimeout;l>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},l))},x.setImmediate=typeof i=="function"?i:function(c){var l=n++,_=arguments.length<2?!1:u.call(arguments,1);return e[l]=!0,d(function(){e[l]&&(_?c.apply(null,_):c.call(null),x.clearImmediate(l))}),l},x.clearImmediate=typeof a=="function"?a:function(c){delete e[c]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":92,timers:111}],112:[function(s,v,x){var i=s("punycode"),a=s("./util");x.parse=A,x.resolve=j,x.resolveObject=W,x.format=S,x.Url=d;function d(){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}var f=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,n=["<",">",'"',"`"," ","\r",`
|
|
`," "],o=["{","}","|","\\","^","`"].concat(n),c=["'"].concat(o),l=["%","/","?",";","#"].concat(c),_=["/","?","#"],E=255,O=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,P={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=s("querystring");function A(M,ee,g){if(M&&a.isObject(M)&&M instanceof d)return M;var D=new d;return D.parse(M,ee,g),D}d.prototype.parse=function(M,ee,g){if(!a.isString(M))throw new TypeError("Parameter 'url' must be a string, not "+typeof M);var D=M.indexOf("?"),F=D!==-1&&D<M.indexOf("#")?"?":"#",V=M.split(F),Z=/\\/g;V[0]=V[0].replace(Z,"/"),M=V.join(F);var K=M;if(K=K.trim(),!g&&M.split("#").length===1){var Q=e.exec(K);if(Q)return this.path=K,this.href=K,this.pathname=Q[1],Q[2]?(this.search=Q[2],ee?this.query=T.parse(this.search.substr(1)):this.query=this.search.substr(1)):ee&&(this.search="",this.query={}),this}var z=f.exec(K);if(z){z=z[0];var N=z.toLowerCase();this.protocol=N,K=K.substr(z.length)}if(g||z||K.match(/^\/\/[^@\/]+@[^@\/]+/)){var re=K.substr(0,2)==="//";re&&!(z&&R[z])&&(K=K.substr(2),this.slashes=!0)}if(!R[z]&&(re||z&&!C[z])){for(var B=-1,k=0;k<_.length;k++){var p=K.indexOf(_[k]);p!==-1&&(B===-1||p<B)&&(B=p)}var I,U;B===-1?U=K.lastIndexOf("@"):U=K.lastIndexOf("@",B),U!==-1&&(I=K.slice(0,U),K=K.slice(U+1),this.auth=decodeURIComponent(I)),B=-1;for(var k=0;k<l.length;k++){var p=K.indexOf(l[k]);p!==-1&&(B===-1||p<B)&&(B=p)}B===-1&&(B=K.length),this.host=K.slice(0,B),K=K.slice(B),this.parseHost(),this.hostname=this.hostname||"";var $=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!$)for(var H=this.hostname.split(/\./),k=0,J=H.length;k<J;k++){var te=H[k];if(!!te&&!te.match(O)){for(var ne="",ie=0,y=te.length;ie<y;ie++)te.charCodeAt(ie)>127?ne+="x":ne+=te[ie];if(!ne.match(O)){var w=H.slice(0,k),G=H.slice(k+1),Y=te.match(m);Y&&(w.push(Y[1]),G.unshift(Y[2])),G.length&&(K="/"+G.join(".")+K),this.hostname=w.join(".");break}}}this.hostname.length>E?this.hostname="":this.hostname=this.hostname.toLowerCase(),$||(this.hostname=i.toASCII(this.hostname));var oe=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+oe,this.href+=this.host,$&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),K[0]!=="/"&&(K="/"+K))}if(!P[N])for(var k=0,J=c.length;k<J;k++){var t=c[k];if(K.indexOf(t)!==-1){var r=encodeURIComponent(t);r===t&&(r=escape(t)),K=K.split(t).join(r)}}var b=K.indexOf("#");b!==-1&&(this.hash=K.substr(b),K=K.slice(0,b));var L=K.indexOf("?");if(L!==-1?(this.search=K.substr(L),this.query=K.substr(L+1),ee&&(this.query=T.parse(this.query)),K=K.slice(0,L)):ee&&(this.search="",this.query={}),K&&(this.pathname=K),C[N]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var oe=this.pathname||"",q=this.search||"";this.path=oe+q}return this.href=this.format(),this};function S(M){return a.isString(M)&&(M=A(M)),M instanceof d?M.format():d.prototype.format.call(M)}d.prototype.format=function(){var M=this.auth||"";M&&(M=encodeURIComponent(M),M=M.replace(/%3A/i,":"),M+="@");var ee=this.protocol||"",g=this.pathname||"",D=this.hash||"",F=!1,V="";this.host?F=M+this.host:this.hostname&&(F=M+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(F+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(V=T.stringify(this.query));var Z=this.search||V&&"?"+V||"";return ee&&ee.substr(-1)!==":"&&(ee+=":"),this.slashes||(!ee||C[ee])&&F!==!1?(F="//"+(F||""),g&&g.charAt(0)!=="/"&&(g="/"+g)):F||(F=""),D&&D.charAt(0)!=="#"&&(D="#"+D),Z&&Z.charAt(0)!=="?"&&(Z="?"+Z),g=g.replace(/[?#]/g,function(K){return encodeURIComponent(K)}),Z=Z.replace("#","%23"),ee+F+g+Z+D};function j(M,ee){return A(M,!1,!0).resolve(ee)}d.prototype.resolve=function(M){return this.resolveObject(A(M,!1,!0)).format()};function W(M,ee){return M?A(M,!1,!0).resolveObject(ee):ee}d.prototype.resolveObject=function(M){if(a.isString(M)){var ee=new d;ee.parse(M,!1,!0),M=ee}for(var g=new d,D=Object.keys(this),F=0;F<D.length;F++){var V=D[F];g[V]=this[V]}if(g.hash=M.hash,M.href==="")return g.href=g.format(),g;if(M.slashes&&!M.protocol){for(var Z=Object.keys(M),K=0;K<Z.length;K++){var Q=Z[K];Q!=="protocol"&&(g[Q]=M[Q])}return C[g.protocol]&&g.hostname&&!g.pathname&&(g.path=g.pathname="/"),g.href=g.format(),g}if(M.protocol&&M.protocol!==g.protocol){if(!C[M.protocol]){for(var z=Object.keys(M),N=0;N<z.length;N++){var re=z[N];g[re]=M[re]}return g.href=g.format(),g}if(g.protocol=M.protocol,!M.host&&!R[M.protocol]){for(var J=(M.pathname||"").split("/");J.length&&!(M.host=J.shift()););M.host||(M.host=""),M.hostname||(M.hostname=""),J[0]!==""&&J.unshift(""),J.length<2&&J.unshift(""),g.pathname=J.join("/")}else g.pathname=M.pathname;if(g.search=M.search,g.query=M.query,g.host=M.host||"",g.auth=M.auth,g.hostname=M.hostname||M.host,g.port=M.port,g.pathname||g.search){var B=g.pathname||"",k=g.search||"";g.path=B+k}return g.slashes=g.slashes||M.slashes,g.href=g.format(),g}var p=g.pathname&&g.pathname.charAt(0)==="/",I=M.host||M.pathname&&M.pathname.charAt(0)==="/",U=I||p||g.host&&M.pathname,$=U,H=g.pathname&&g.pathname.split("/")||[],J=M.pathname&&M.pathname.split("/")||[],te=g.protocol&&!C[g.protocol];if(te&&(g.hostname="",g.port=null,g.host&&(H[0]===""?H[0]=g.host:H.unshift(g.host)),g.host="",M.protocol&&(M.hostname=null,M.port=null,M.host&&(J[0]===""?J[0]=M.host:J.unshift(M.host)),M.host=null),U=U&&(J[0]===""||H[0]==="")),I)g.host=M.host||M.host===""?M.host:g.host,g.hostname=M.hostname||M.hostname===""?M.hostname:g.hostname,g.search=M.search,g.query=M.query,H=J;else if(J.length)H||(H=[]),H.pop(),H=H.concat(J),g.search=M.search,g.query=M.query;else if(!a.isNullOrUndefined(M.search)){if(te){g.hostname=g.host=H.shift();var ne=g.host&&g.host.indexOf("@")>0?g.host.split("@"):!1;ne&&(g.auth=ne.shift(),g.host=g.hostname=ne.shift())}return g.search=M.search,g.query=M.query,(!a.isNull(g.pathname)||!a.isNull(g.search))&&(g.path=(g.pathname?g.pathname:"")+(g.search?g.search:"")),g.href=g.format(),g}if(!H.length)return g.pathname=null,g.search?g.path="/"+g.search:g.path=null,g.href=g.format(),g;for(var ie=H.slice(-1)[0],y=(g.host||M.host||H.length>1)&&(ie==="."||ie==="..")||ie==="",w=0,G=H.length;G>=0;G--)ie=H[G],ie==="."?H.splice(G,1):ie===".."?(H.splice(G,1),w++):w&&(H.splice(G,1),w--);if(!U&&!$)for(;w--;w)H.unshift("..");U&&H[0]!==""&&(!H[0]||H[0].charAt(0)!=="/")&&H.unshift(""),y&&H.join("/").substr(-1)!=="/"&&H.push("");var Y=H[0]===""||H[0]&&H[0].charAt(0)==="/";if(te){g.hostname=g.host=Y?"":H.length?H.shift():"";var ne=g.host&&g.host.indexOf("@")>0?g.host.split("@"):!1;ne&&(g.auth=ne.shift(),g.host=g.hostname=ne.shift())}return U=U||g.host&&H.length,U&&!Y&&H.unshift(""),H.length?g.pathname=H.join("/"):(g.pathname=null,g.path=null),(!a.isNull(g.pathname)||!a.isNull(g.search))&&(g.path=(g.pathname?g.pathname:"")+(g.search?g.search:"")),g.auth=M.auth||g.auth,g.slashes=g.slashes||M.slashes,g.href=g.format(),g},d.prototype.parseHost=function(){var M=this.host,ee=u.exec(M);ee&&(ee=ee[0],ee!==":"&&(this.port=ee.substr(1)),M=M.substr(0,M.length-ee.length)),M&&(this.hostname=M)}},{"./util":113,punycode:93,querystring:96}],113:[function(s,v,x){v.exports={isString:function(i){return typeof i=="string"},isObject:function(i){return typeof i=="object"&&i!==null},isNull:function(i){return i===null},isNullOrUndefined:function(i){return i==null}}},{}],114:[function(s,v,x){(function(i){v.exports=a;function a(f,u){if(d("noDeprecation"))return f;var e=!1;function n(){if(!e){if(d("throwDeprecation"))throw new Error(u);d("traceDeprecation")?console.trace(u):console.warn(u),e=!0}return f.apply(this,arguments)}return n}function d(f){try{if(!i.localStorage)return!1}catch{return!1}var u=i.localStorage[f];return u==null?!1:String(u).toLowerCase()==="true"}}).call(this,typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}],115:[function(s,v,x){v.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}},{}],116:[function(s,v,x){(function(i,a){var d=/%[sdj%]/g;x.format=function(B){if(!j(B)){for(var k=[],p=0;p<arguments.length;p++)k.push(e(arguments[p]));return k.join(" ")}for(var p=1,I=arguments,U=I.length,$=String(B).replace(d,function(J){if(J==="%%")return"%";if(p>=U)return J;switch(J){case"%s":return String(I[p++]);case"%d":return Number(I[p++]);case"%j":try{return JSON.stringify(I[p++])}catch{return"[Circular]"}default:return J}}),H=I[p];p<U;H=I[++p])T(H)||!g(H)?$+=" "+H:$+=" "+e(H);return $},x.deprecate=function(B,k){if(M(a.process))return function(){return x.deprecate(B,k).apply(this,arguments)};if(i.noDeprecation===!0)return B;var p=!1;function I(){if(!p){if(i.throwDeprecation)throw new Error(k);i.traceDeprecation?console.trace(k):console.error(k),p=!0}return B.apply(this,arguments)}return I};var f={},u;x.debuglog=function(B){if(M(u)&&(u={}.NODE_DEBUG||""),B=B.toUpperCase(),!f[B])if(new RegExp("\\b"+B+"\\b","i").test(u)){var k=i.pid;f[B]=function(){var p=x.format.apply(x,arguments);console.error("%s %d: %s",B,k,p)}}else f[B]=function(){};return f[B]};function e(B,k){var p={seen:[],stylize:o};return arguments.length>=3&&(p.depth=arguments[2]),arguments.length>=4&&(p.colors=arguments[3]),C(k)?p.showHidden=k:k&&x._extend(p,k),M(p.showHidden)&&(p.showHidden=!1),M(p.depth)&&(p.depth=2),M(p.colors)&&(p.colors=!1),M(p.customInspect)&&(p.customInspect=!0),p.colors&&(p.stylize=n),l(p,B,p.depth)}x.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function n(B,k){var p=e.styles[k];return p?"\x1B["+e.colors[p][0]+"m"+B+"\x1B["+e.colors[p][1]+"m":B}function o(B,k){return B}function c(B){var k={};return B.forEach(function(p,I){k[p]=!0}),k}function l(B,k,p){if(B.customInspect&&k&&V(k.inspect)&&k.inspect!==x.inspect&&!(k.constructor&&k.constructor.prototype===k)){var I=k.inspect(p,B);return j(I)||(I=l(B,I,p)),I}var U=_(B,k);if(U)return U;var $=Object.keys(k),H=c($);if(B.showHidden&&($=Object.getOwnPropertyNames(k)),F(k)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return E(k);if($.length===0){if(V(k)){var J=k.name?": "+k.name:"";return B.stylize("[Function"+J+"]","special")}if(ee(k))return B.stylize(RegExp.prototype.toString.call(k),"regexp");if(D(k))return B.stylize(Date.prototype.toString.call(k),"date");if(F(k))return E(k)}var te="",ne=!1,ie=["{","}"];if(R(k)&&(ne=!0,ie=["[","]"]),V(k)){var y=k.name?": "+k.name:"";te=" [Function"+y+"]"}if(ee(k)&&(te=" "+RegExp.prototype.toString.call(k)),D(k)&&(te=" "+Date.prototype.toUTCString.call(k)),F(k)&&(te=" "+E(k)),$.length===0&&(!ne||k.length==0))return ie[0]+te+ie[1];if(p<0)return ee(k)?B.stylize(RegExp.prototype.toString.call(k),"regexp"):B.stylize("[Object]","special");B.seen.push(k);var w;return ne?w=O(B,k,p,H,$):w=$.map(function(G){return m(B,k,p,H,G,ne)}),B.seen.pop(),P(w,te,ie)}function _(B,k){if(M(k))return B.stylize("undefined","undefined");if(j(k)){var p="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(p,"string")}if(S(k))return B.stylize(""+k,"number");if(C(k))return B.stylize(""+k,"boolean");if(T(k))return B.stylize("null","null")}function E(B){return"["+Error.prototype.toString.call(B)+"]"}function O(B,k,p,I,U){for(var $=[],H=0,J=k.length;H<J;++H)re(k,String(H))?$.push(m(B,k,p,I,String(H),!0)):$.push("");return U.forEach(function(te){te.match(/^\d+$/)||$.push(m(B,k,p,I,te,!0))}),$}function m(B,k,p,I,U,$){var H,J,te;if(te=Object.getOwnPropertyDescriptor(k,U)||{value:k[U]},te.get?te.set?J=B.stylize("[Getter/Setter]","special"):J=B.stylize("[Getter]","special"):te.set&&(J=B.stylize("[Setter]","special")),re(I,U)||(H="["+U+"]"),J||(B.seen.indexOf(te.value)<0?(T(p)?J=l(B,te.value,null):J=l(B,te.value,p-1),J.indexOf(`
|
|
`)>-1&&($?J=J.split(`
|
|
`).map(function(ne){return" "+ne}).join(`
|
|
`).substr(2):J=`
|
|
`+J.split(`
|
|
`).map(function(ne){return" "+ne}).join(`
|
|
`))):J=B.stylize("[Circular]","special")),M(H)){if($&&U.match(/^\d+$/))return J;H=JSON.stringify(""+U),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.substr(1,H.length-2),H=B.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=B.stylize(H,"string"))}return H+": "+J}function P(B,k,p){var I=B.reduce(function(U,$){return $.indexOf(`
|
|
`)>=0,U+$.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?p[0]+(k===""?"":k+`
|
|
`)+" "+B.join(`,
|
|
`)+" "+p[1]:p[0]+k+" "+B.join(", ")+" "+p[1]}function R(B){return Array.isArray(B)}x.isArray=R;function C(B){return typeof B=="boolean"}x.isBoolean=C;function T(B){return B===null}x.isNull=T;function A(B){return B==null}x.isNullOrUndefined=A;function S(B){return typeof B=="number"}x.isNumber=S;function j(B){return typeof B=="string"}x.isString=j;function W(B){return typeof B=="symbol"}x.isSymbol=W;function M(B){return B===void 0}x.isUndefined=M;function ee(B){return g(B)&&K(B)==="[object RegExp]"}x.isRegExp=ee;function g(B){return typeof B=="object"&&B!==null}x.isObject=g;function D(B){return g(B)&&K(B)==="[object Date]"}x.isDate=D;function F(B){return g(B)&&(K(B)==="[object Error]"||B instanceof Error)}x.isError=F;function V(B){return typeof B=="function"}x.isFunction=V;function Z(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}x.isPrimitive=Z,x.isBuffer=s("./support/isBuffer");function K(B){return Object.prototype.toString.call(B)}function Q(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var B=new Date,k=[Q(B.getHours()),Q(B.getMinutes()),Q(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],k].join(" ")}x.log=function(){N(),x.format.apply(x,arguments)},x.inherits=s("inherits"),x._extend=function(B,k){if(!k||!g(k))return B;for(var p=Object.keys(k),I=p.length;I--;)B[p[I]]=k[p[I]];return B};function re(B,k){return Object.prototype.hasOwnProperty.call(B,k)}}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":115,_process:92,inherits:80}],117:[function(s,v,x){(function(i,a){var d=s("readable-stream").Transform,f=s("duplexify"),u=s("ws"),e=s("safe-buffer").Buffer;v.exports=o;function n(c,l,_){var E=new d({objectMode:c.objectMode});return E._write=l,E._flush=_,E}function o(c,l,_){var E,O,m=i.title==="browser",P=!!a.WebSocket,R=m?W:j;l&&!Array.isArray(l)&&typeof l=="object"&&(_=l,l=null,(typeof _.protocol=="string"||Array.isArray(_.protocol))&&(l=_.protocol)),_||(_={}),_.objectMode===void 0&&(_.objectMode=!(_.binary===!0||_.binary===void 0));var C=n(_,R,M);_.objectMode||(C._writev=Z);var T=_.browserBufferSize||1024*512,A=_.browserBufferTimeout||1e3;typeof c=="object"?O=c:(P&&m?O=new u(c,l):O=new u(c,l,_),O.binaryType="arraybuffer"),O.readyState===O.OPEN?E=C:(E=f.obj(),O.onopen=ee),E.socket=O,O.onclose=g,O.onerror=D,O.onmessage=F,C.on("close",V);var S=!_.objectMode;function j(K,Q,z){if(O.readyState!==O.OPEN){z();return}S&&typeof K=="string"&&(K=e.from(K,"utf8")),O.send(K,z)}function W(K,Q,z){if(O.bufferedAmount>T){setTimeout(W,A,K,Q,z);return}S&&typeof K=="string"&&(K=e.from(K,"utf8"));try{O.send(K)}catch(N){return z(N)}z()}function M(K){O.close(),K()}function ee(){E.setReadable(C),E.setWritable(C),E.emit("connect")}function g(){E.end(),E.destroy()}function D(K){E.destroy(K)}function F(K){var Q=K.data;Q instanceof ArrayBuffer?Q=e.from(Q):Q=e.from(Q,"utf8"),C.push(Q)}function V(){O.close()}function Z(K,Q){for(var z=new Array(K.length),N=0;N<K.length;N++)typeof K[N].chunk=="string"?z[N]=e.from(K[N],"utf8"):z[N]=K[N].chunk;this._write(e.concat(z),"binary",Q)}return E}}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:92,duplexify:16,"readable-stream":106,"safe-buffer":108,ws:118}],118:[function(s,v,x){var i=null;typeof WebSocket<"u"?i=WebSocket:typeof MozWebSocket<"u"?i=MozWebSocket:typeof window<"u"&&(i=window.WebSocket||window.MozWebSocket),v.exports=i},{}],119:[function(s,v,x){v.exports=i;function i(a,d){if(a&&d)return i(a)(d);if(typeof a!="function")throw new TypeError("need wrapper function");return Object.keys(a).forEach(function(u){f[u]=a[u]}),f;function f(){for(var u=new Array(arguments.length),e=0;e<u.length;e++)u[e]=arguments[e];var n=a.apply(this,u),o=u[u.length-1];return typeof n=="function"&&n!==o&&Object.keys(o).forEach(function(c){n[c]=o[c]}),n}}},{}],120:[function(s,v,x){v.exports=a;var i=Object.prototype.hasOwnProperty;function a(){for(var d={},f=0;f<arguments.length;f++){var u=arguments[f];for(var e in u)i.call(u,e)&&(d[e]=u[e])}return d}},{}]},{},[8])(8)})})($e);const Ae=de=>(Re("data-v-7544cefd"),de=de(),Le(),de),pt={class:"message"},dt=Ae(()=>he("div",{style:{"margin-left":"10px"}},"\u6D88\u606F",-1)),_t={key:0,class:"message-list"},mt=["onClick"],gt={class:"message-content"},yt={class:"main-title"},vt={key:0,class:"redCircle"},bt={class:"message-title"},wt={class:"message-date"},St={key:1,class:"message-empty"},xt=Ae(()=>he("img",{src:Ue,alt:"notData"},null,-1)),Et=Ae(()=>he("div",null,"\u6682\u65E0\u901A\u77E5",-1)),It=[xt,Et],Tt=Ae(()=>he("div",{class:"message-empty"},[he("img",{src:Ue,alt:"notData"}),he("div",null,"\u6682\u65E0\u6D88\u606F")],-1)),At=Ae(()=>he("div",{class:"message-empty"},[he("img",{src:Ue,alt:"notData"}),he("div",null,"\u6682\u65E0\u4EE3\u529E")],-1)),Ct=xe({__name:"Message",setup(de){const ve=Te(),s=ye(0),v=ye([]),x=ye("first"),i=ye(),a=ye({clean:!0,connectTimeout:5e3,clientId:"mqtt_01",username:"admin",password:"JXJ@admin"}),d=async o=>{if(o.isRead==0){let c={messageId:o.messageId,type:o.type};const l=await rt(c);l&&l.success&&f()}},f=async()=>{s.value=0;const o=await tt();o.result&&o.result.length>0?(v.value=o.result,v.value.map(c=>{c.isRead==0&&s.value++})):(v.value=[],s.value=0)},u=o=>{},e=()=>{let o="ws://182.90.224.147:8083/mqtt";i.value=$e.exports.connect(o,a.value),i.value.on("connect",c=>{i.value.subscribe(`wisdomSite/message/${ve.userInfo.userId}`,{qos:1},(l,_)=>{}),i.value.on("message",(l,_)=>{JSON.parse(_.toString()),f()})})},n=()=>{if(i.value)try{i.value.end(),i.value=null}catch{}};return He(()=>{f(),e()}),et(()=>{n()}),(o,c)=>{const l=_e("el-badge"),_=_e("el-tab-pane"),E=_e("el-tabs"),O=_e("el-popover");return me(),we("div",pt,[fe(O,{placement:"bottom",width:310,trigger:"click"},{reference:ce(()=>[fe(l,{value:s.value,hidden:!s.value,style:{display:"flex","justify-content":"center","align-items":"center"},class:"item"},{default:ce(()=>[he("i",{class:We(["iconfont icon-xiaoxi","toolBar-icon"]),style:{"font-size":"14px"}}),dt]),_:1},8,["value","hidden"])]),default:ce(()=>[fe(E,{modelValue:x.value,"onUpdate:modelValue":c[0]||(c[0]=m=>x.value=m),onTabChange:u},{default:ce(()=>[fe(_,{label:`\u901A\u77E5(${v.value.length})`,name:"first"},{default:ce(()=>[v.value.length>0?(me(),we("div",_t,[(me(!0),we(Pe,null,De(v.value,(m,P)=>(me(),we("div",{class:"message-item",key:P,onClick:R=>d(m)},[he("div",gt,[he("div",yt,[m.isRead?Ke("",!0):(me(),we("span",vt)),he("span",bt,Ie(m.title),1)]),he("span",wt,Ie(m.createTime),1)])],8,mt))),128))])):(me(),we("div",St,It))]),_:1},8,["label"]),fe(_,{label:"\u6D88\u606F(0)",name:"second"},{default:ce(()=>[Tt]),_:1}),fe(_,{label:"\u4EE3\u529E(0)",name:"third"},{default:ce(()=>[At]),_:1})]),_:1},8,["modelValue"])]),_:1})])}}});const kt=Ee(Ct,[["__scopeId","data-v-7544cefd"]]),Ot={class:"dialog-footer"},jt=xe({name:"editPassword"}),Mt=xe({...jt,setup(de,{expose:ve}){const s=Be(),v=Te(),x=ye(!1),i=nt({password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:"blur"}],enterPassword:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801",trigger:"blur"},{validator:(n,o,c)=>{o===""?c(new Error("\u8BF7\u786E\u8BA4\u5BC6\u7801")):o!==f.value.password?c(new Error("\u4E24\u6B21\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4")):c()}}]}),a=ye(!1),d=ye(),f=ye({password:"",enterPassword:""}),u=async n=>{!n||await n.validate(async(o,c)=>{if(o)try{x.value=!0,await it({password:f.value.password}),a.value=!1,await ze(),v.resetStore(),s.replace(Ve),Me.success("\u4FEE\u6539\u5BC6\u7801\u6210\u529F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55")}finally{x.value=!1}else Me({showClose:!0,message:"\u8BF7\u5B8C\u5584\u8868\u5355\u4FE1\u606F\uFF01",type:"error"})})};return ve({openDialog:()=>{var n;(n=d.value)==null||n.resetFields(),a.value=!0},onSubmit:u}),(n,o)=>{const c=_e("el-input"),l=_e("el-form-item"),_=_e("el-form"),E=_e("el-button"),O=_e("el-dialog");return me(),ke(O,{modelValue:a.value,"onUpdate:modelValue":o[4]||(o[4]=m=>a.value=m),title:"\u4FEE\u6539\u5BC6\u7801",width:"500px",draggable:""},{footer:ce(()=>[he("span",Ot,[fe(E,{onClick:o[2]||(o[2]=m=>a.value=!1)},{default:ce(()=>[je("\u53D6\u6D88")]),_:1}),fe(E,{type:"primary",loading:x.value,onClick:o[3]||(o[3]=m=>u(d.value))},{default:ce(()=>[je("\u786E\u8BA4")]),_:1},8,["loading"])])]),default:ce(()=>[fe(_,{ref_key:"ruleFormRef",ref:d,rules:i,class:"form",model:f.value,"label-width":"100px"},{default:ce(()=>[fe(l,{label:"\u4FEE\u6539\u5BC6\u7801:",prop:"password"},{default:ce(()=>[fe(c,{modelValue:f.value.password,"onUpdate:modelValue":o[0]||(o[0]=m=>f.value.password=m),placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801"},null,8,["modelValue"])]),_:1}),fe(l,{label:"\u786E\u8BA4\u5BC6\u7801:",prop:"enterPassword"},{default:ce(()=>[fe(c,{type:"password",modelValue:f.value.enterPassword,"onUpdate:modelValue":o[1]||(o[1]=m=>f.value.enterPassword=m),placeholder:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}});const Bt=Ee(Mt,[["__scopeId","data-v-67739aba"]]),Pt=de=>(Re("data-v-9f8d1b71"),de=de(),Le(),de),Rt={class:"avatar"},Lt=Pt(()=>he("span",null,"\u6587\u6863\u5730\u5740",-1)),Ut=xe({__name:"Avatar",setup(de){const ve=Be(),s=Te(),v=s.account;ye(!1);const x=ye(""),i=async()=>{const{result:c}=await ot({configKey:"system_doc"});x.value=c[0].configValue},a=()=>{st.confirm("\u60A8\u662F\u5426\u786E\u8BA4\u9000\u51FA\u767B\u5F55?","\u6E29\u99A8\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{await ze(),s.resetStore(),ve.replace(Ve),Me.success("\u9000\u51FA\u767B\u5F55\u6210\u529F\uFF01")})},d=ye(null),f=ye(null),u=c=>{var l,_;c=="infoRef"?(l=d.value)==null||l.openDialog():(_=f.value)==null||_.openDialog(),f.value},e=c=>{s.seteditPassword(c)},n=()=>{s.seteditPassword(!0),s.editPassword},o=()=>{window.open(x.value,"_blank")};return He(()=>{i()}),(c,l)=>{const _=_e("CaretBottom"),E=_e("el-icon"),O=_e("el-dropdown-item"),m=_e("el-dropdown-menu"),P=_e("el-dropdown");return me(),we(Pe,null,[fe(P,{onVisibleChange:e,"hide-on-click":!1,trigger:"click"},{dropdown:ce(()=>[fe(m,{"virtual-triggering":""},{default:ce(()=>[fe(O,{onClick:o},{default:ce(()=>[Lt]),_:1}),fe(O,{onClick:l[0]||(l[0]=R=>u("passwordRef"))},{default:ce(()=>[he("span",{onClic:n},"\u4FEE\u6539\u5BC6\u7801",32)]),_:1}),fe(O,{onClick:a,divided:""},{default:ce(()=>[je(Ie(c.$t("header.logout")),1)]),_:1})]),_:1})]),default:ce(()=>[he("div",Rt,[he("span",null,Ie(Fe(v)),1),fe(E,null,{default:ce(()=>[fe(_)]),_:1})])]),_:1}),fe(Bt,{ref_key:"passwordRef",ref:f},null,512)],64)}}});const Nt=Ee(Ut,[["__scopeId","data-v-9f8d1b71"]]),Dt=de=>(Re("data-v-b1225e4c"),de=de(),Le(),de),Ft={class:"tool-bar-ri"},Wt={class:"header-icon"},Kt={style:{display:"flex","align-items":"center",cursor:"pointer"}},Ht=Dt(()=>he("span",{style:{margin:"0 26px"}},"|",-1)),zt=xe({__name:"ToolBarRight",setup(de){return(ve,s)=>(me(),we("div",Ft,[he("div",Wt,[he("div",Kt,[fe(kt,{id:"message"})]),Ht]),fe(Nt)]))}});const Jt=Ee(zt,[["__scopeId","data-v-b1225e4c"]]);export{Qt as T,Jt as a};
|