eext-leye/iframe/js/mqtt.min.js

20 lines
360 KiB
JavaScript
Raw Normal View History

2026-02-10 14:02:36 +08:00
"use strict";var mqtt=(()=>{var as=Object.defineProperty;var Yb=Object.getOwnPropertyDescriptor;var Jb=Object.getOwnPropertyNames;var Xb=Object.prototype.hasOwnProperty;var ze=(t,e)=>()=>(t&&(e=t(t=0)),e);var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kr=(t,e)=>{for(var r in e)as(t,r,{get:e[r],enumerable:!0})},Zb=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jb(e))!Xb.call(t,i)&&i!==r&&as(t,i,{get:()=>e[i],enumerable:!(n=Yb(e,i))||n.enumerable});return t};var me=t=>Zb(as({},"__esModule",{value:!0}),t);var A=ze(()=>{});var M={};Kr(M,{_debugEnd:()=>Kc,_debugProcess:()=>zc,_events:()=>ff,_eventsCount:()=>hf,_exiting:()=>Pc,_fatalExceptions:()=>$c,_getActiveHandles:()=>Cc,_getActiveRequests:()=>kc,_kill:()=>Mc,_linkedBinding:()=>xc,_maxListeners:()=>cf,_preload_modules:()=>af,_rawDebug:()=>Ac,_startProfilerIdleNotifier:()=>Qc,_stopProfilerIdleNotifier:()=>Yc,_tickCallback:()=>Gc,abort:()=>ef,addListener:()=>df,allowedNodeEnvironmentFlags:()=>jc,arch:()=>cc,argv:()=>dc,argv0:()=>sf,assert:()=>Fc,binding:()=>wc,browser:()=>Ec,chdir:()=>vc,config:()=>Oc,cpuUsage:()=>Ri,cwd:()=>_c,debugPort:()=>of,default:()=>Sf,dlopen:()=>Rc,domain:()=>Tc,emit:()=>wf,emitWarning:()=>bc,env:()=>hc,execArgv:()=>pc,execPath:()=>nf,exit:()=>Uc,features:()=>Wc,hasUncaughtExceptionCaptureCallback:()=>Vc,hrtime:()=>Oi,kill:()=>Lc,listeners:()=>vf,memoryUsage:()=>qc,moduleLoadList:()=>Ic,nextTick:()=>ac,off:()=>yf,on:()=>Nt,once:()=>pf,openStdin:()=>Dc,pid:()=>tf,platform:()=>fc,ppid:()=>rf,prependListener:()=>mf,prependOnceListener:()=>_f,reallyExit:()=>Bc,release:()=>Sc,removeAllListeners:()=>bf,removeListener:()=>gf,resourceUsage:()=>Nc,setSourceMapsEnabled:()=>uf,setUncaughtExceptionCaptureCallback:()=>Hc,stderr:()=>Xc,stdin:()=>Zc,stdout:()=>Jc,title:()=>lc,umask:()=>mc,uptime:()=>lf,version:()=>yc,versions:()=>gc});function cs(t){throw new Error("Node.js process "+t+" is not supported by JSPM core outside of Node.js")}function ew(){!Qr||!wr||(Qr=!1,wr.length?Mt=wr.concat(Mt):Pi=-1,Mt.length&&sc())}function sc(){if(!Qr){var t=setTimeout(ew,0);Qr=!0;for(var e=Mt.length;e;){for(wr=Mt,Mt=[];++Pi<e;)wr&&wr[Pi].run();Pi=-1,e=Mt.length}wr=null,Qr=!1,clearTimeout(t)}}function ac(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Mt.push(new uc(t,e)),Mt.length===1&&!Qr&&setTimeout(sc,0)}function uc(t,e){this.fun=t,this.array=e}function Ue(){}function xc(t){cs("_linkedBinding")}function Rc(t){cs("dlopen")}function kc(){return[]}function Cc(){return[]}function Fc(t,e){if(!t)throw new Error(e||"assertion error")}function Vc(){return!1}function lf(){return Jt.now()/1e3}function Oi(t){var e=Math.floor((Date.now()-Jt.now())*.001),r=Jt.now()*.001,n=Math.floor(r)+e,i=Math.floor(r%1*1e9);return t&&(n=n-t[0],i=i-t[1],i<0&&(n--,i+=ls)),[n,i]}function Nt(){return Sf}function vf(t){return[]}var Mt,Qr,wr,Pi,lc,cc,fc,hc,dc,pc,yc,gc,bc,wc,mc,_c,vc,Sc,Ec,Ac,Ic,Tc,Pc,Oc,Bc,Mc,Ri,Nc,qc,Lc,Uc,Dc,jc,Wc,$c,Hc,Gc,zc,Kc,Qc,Yc,Jc,Xc,Zc,ef,tf,rf,nf,of,sf,af,uf,Jt,us,ls,cf,ff,hf,df,pf,yf,gf,bf,wf,mf,_f,Sf,Ef=ze(()=>{A();x();I();Mt=[],Qr=!1,Pi=-1;uc.prototype.run=function(){this.fun.apply(null,this.array)};lc="browser",cc="x64",fc="browser",hc={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},dc=["/usr/bin/node"],pc=[],yc="v16.8.0",gc={},bc=function(t,e){console.warn((e?e+": ":"")+t)},wc=function(t){cs("binding")},mc=function(t){return 0},_c=function(){return"/"},vc=function(t){},Sc={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};Ec=!0,Ac=Ue,Ic=[];Tc={},Pc=!1,Oc={};Bc=Ue,Mc=Ue,Ri=function(){return{}},Nc=Ri,qc=Ri,Lc=Ue,Uc=Ue,Dc=Ue,jc={};Wc={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},$c=Ue,Hc=Ue;Gc=Ue,zc=Ue,Kc=Ue,Qc=Ue,Yc=Ue,Jc=void 0,Xc=void 0,Zc=void 0,ef=Ue,tf=2,rf=1,nf="/bin/usr/node",of=9229,sf="node",af=[],uf=Ue,Jt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Jt.now===void 0&&(
`;super(r),this.name="AggregateError",this.errors=e}};Of.exports={AggregateError:fs,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var hs=D((CP,Rf)=>{"use strict";A();x();I();Rf.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var De=D((DP,Bf)=>{"use strict";A();x();I();var{format:ow,inspect:Ci}=hs(),{AggregateError:sw}=Ee(),aw=globalThis.AggregateError||sw,uw=Symbol("kIsNodeError"),lw=["string","function","number","object","Function","Object","boolean","bigint","symbol"],cw=/^([A-Z][a-z0-9]*)+$/,fw="__node_internal_",Bi={};function _r(t,e){if(!t)throw new Bi.ERR_INTERNAL_ASSERTION(e)}function kf(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function hw(t,e,r){if(typeof e=="function")return _r(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return _r(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:ow(e,...r)}function Le(t,e,r){r||(r=Error);class n extends r{constructor(...s){super(hw(t,e,s))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[uw]=!0,Bi[t]=n}function Cf(t){let e=fw+t.name;return Object.defineProperty(t,"name",{value:e}),t}function dw(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new aw([e,t],e.message);return r.code=e.code,r}return t||e}var ds=class extends Error{constructo
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}si.exports=cA,si.exports.__esModule=!0,si.exports.default=si.exports});var ag=D((gD,ai)=>{A();x();I();var fA=tg(),hA=rg(),dA=og(),pA=sg();function yA(t,e){return fA(t)||hA(t,e)||dA(t,e)||pA()}ai.exports=yA,ai.exports.__esModule=!0,ai.exports.default=ai.exports});var Ou=D((Fo,ug)=>{A();x();I();(function(t,e){typeof Fo=="object"&&typeof ug<"u"?e(Fo):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.fastUniqueNumbers={}))})(Fo,function(t){"use strict";var e=function(w){return function(y){var P=w(y);return y.add(P),P}},r=function(w){return function(y,P){return w.set(y,P),P}},n=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,i=536870912,s=i*2,o=function(w,y){return function(P){var E=y.get(P),b=E===void 0?P.size:E<s?E+1:0;if(!P.has(b))return w(P,b);if(P.size<i){for(;P.has(b);)b=Math.floor(Math.random()*s);return w(P,b)}if(P.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;P.has(b);)b=Math.floor(Math.random()*n);return w(P,b)}},a=new WeakMap,c=r(a),f=o(c,a),h=e(f);t.addUniqueNumber=h,t.generateUniqueNumber=f})});var cg=D((OD,ui)=>{A();x();I();function lg(t,e,r,n,i,s,o){try{var a=t[s](o),c=a.value}catch(f){return void r(f)}a.done?e(c):Promise.resolve(c).then(n,i)}function gA(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(c){lg(s,n,i,o,a,"next",c)}function a(c){lg(s,n,i,o,a,"throw",c)}o(void 0)})}}ui.exports=gA,ui.exports.__esModule=!0,ui.exports.default=ui.exports});var Ru=D((qD,li)=>{A();x();I();function bA(t,e){this.v=t,this.k=e}li.exports=bA,li.exports.__esModule=!0,li.exports.default=li.exports});var ku=D(($D,$t)=>{A();x();I();function Wo(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}$t.exports=Wo=function(o,a,c,f){function h(d,w){Wo(o,d,function(y){return this._invoke(d,w,y)})}a?i?i(o,a,{value:c,enumerable:!f,configurable:!f,writable:!f}):o[a]=c:(h("next",0),h("throw",1),h("return",2))},$t.exports.__esModule=!0,$t.exports.default=$t.exports,Wo(t,e,r,n)}$t.exports=Wo,$t.exports.__esModule=!0,$t.exports.default=$t.exports});var Cu=D((YD,Ht)=>{A();x();I();var Rt=ku();function fg(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function s(y,P,E,b){var m=P&&P.prototype instanceof a?P:a,v=Object.create(m.prototype);return Rt(v,"_invoke",function(R,T,g){var O,_,q,$=0,j=g||[],J=!1,W={p:0,n:0,v:t,a:H,f:H.bind(t,4),d:function(K,X){return O=K,_=0,q=t,W.n=X,o}};function H(G,K){for(_=G,q=K,e=0;!J&&$&&!X&&e<j.length;e++){var X,Q=j[e],V=W.p,te=Q[2];G>3?(X=te===K)&&(q=Q[(_=Q[4])?5:(_=3,3)],Q[4]=Q[5]=t):Q[0]<=V&&((X=G<2&&V<Q[1])?(_=0,W.v=K,W.n=Q[1]):V<te&&(X=G<3||Q[0]>K||K>te)&&(Q[4]=G,Q[5]=K,W.n=te,_=0))}if(X||G>1)return o;throw J=!0,K}return function(G,K,X){if($>1)throw TypeError("Generator is already running");for(J&&K===1&&H(K,X),_=K,q=X;(e=_<2?t:q)||!J;){O||(_?_<3?(_>1&&(W.n=-1),H(_,q)):W.n=q:W.v=q);try{if($=2,O){if(_||(G="next"),e=O[G]){if(!(e=e.call(O,q)))throw TypeError("iterator result is not an object");if(!e.done)return e;q=e.value,_<2&&(_=0)}else _===1&&(e=O.return)&&e.call(O),_<2&&(q=TypeError("The iterator does not provide a '"+G+"' method"),_=1);O=t}else if((e=(J=W.n<0)?q:R.call(T,W))!==o)break}catch(Q){O=t,_=1,q=Q}finally{$=1}}return{value:e,done:J}}}(y,E,b),!0),v}var o={};function a(){}function c(){}function f(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(Rt(e={},n,function(){return this}),e),d=f.prototype=a.prototype=Object.create(h);function w(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,f):(y.__proto__=f,Rt(y,i,"GeneratorFunction")),y.prototype=Object.create(d),y}return c.prototype=f,Rt(d,"constructor",f),Rt(f,"constructor",c),c.displayName="GeneratorFunction",Rt(f,i,"GeneratorFunction"),Rt(d),Rt(d,i,"Generator"),Rt(d,n,function(){return this}),Rt(d,"toString",function(){return"[object Generator]"}),(Ht.exports=fg=function(){r
`)>=0)return!1;return!0}function C(k,B){var re;if(k.indent===" ")re=" ";else if(typeof k.indent=="number"&&k.indent>0)re=q.call(Array(k.indent+1)," ");else return null;return{base:re,prev:q.call(Array(B+1),re)}}function N(k,B){if(k.length===0)return"";var re=`
`+B.prev+B.base;return re+q.call(k,","+re)+`
`+B.prev}function F(k,B){var re=ne(k),ie=[];if(re){ie.length=k.length;for(var oe=0;oe<k.length;oe++)ie[oe]=Re(k,oe)?B(k[oe],k):""}var ce=typeof W=="function"?W(k):[],Qt;if(G){Qt={};for(var br=0;br<ce.length;br++)Qt["$"+ce[br]]=ce[br]}for(var Ye in k)Re(k,Ye)&&(re&&String(Number(Ye))===Ye&&Ye<k.length||G&&Qt["$"+Ye]instanceof Symbol||(O.call(/[^\w$]/,Ye)?ie.push(B(Ye,k)+": "+B(k[Ye],k)):ie.push(Ye+": "+B(k[Ye],k))));if(typeof W=="function")for(var Yt=0;Yt<ce.length;Yt++)X.call(k,ce[Yt])&&ie.push("["+B(ce[Yt])+"]: "+B(k[ce[Yt]],k));return ie}return Al}function Ox(){if(yb)return xl;yb=!0;var t=Wr(),e=ub(),r=Px(),n=Sn(),i=t("%WeakMap%",!0),s=t("%Map%",!0),o=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),c=e("WeakMap.prototype.has",!0),f=e("Map.prototype.get",!0),h=e("Map.prototype.set",!0),d=e("Map.prototype.has",!0),w=function(b,m){for(var v=b,R;(R=v.next)!==null;v=R)if(R.key===m)return v.next=R.next,R.next=b.next,b.next=R,R},y=function(b,m){var v=w(b,m);return v&&v.value},P=function(b,m,v){var R=w(b,m);R?R.value=v:b.next={key:m,next:b.next,value:v}},E=function(b,m){return!!w(b,m)};return xl=function(){var m,v,R,T={assert:function(g){if(!T.has(g))throw new n("Side channel does not contain "+r(g))},get:function(g){if(i&&g&&(typeof g=="object"||typeof g=="function")){if(m)return o(m,g)}else if(s){if(v)return f(v,g)}else if(R)return y(R,g)},has:function(g){if(i&&g&&(typeof g=="object"||typeof g=="function")){if(m)return c(m,g)}else if(s){if(v)return d(v,g)}else if(R)return E(R,g);return!1},set:function(g,O){i&&g&&(typeof g=="object"||typeof g=="function")?(m||(m=new i),a(m,g,O)):s?(v||(v=new s),h(v,g,O)):(R||(R={key:{},next:null}),P(R,g,O))}};return T},xl}function Bl(){if(gb)return Tl;gb=!0;var t=String.prototype.replace,e=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Tl={default:r.RFC3986,formatters:{RFC1738:function(n){return t.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},Tl}function Sb(){if(bb)return Pl;bb=!0;var t=Bl(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var b=[],m=0;m<256;++m)b.push("%"+((m<16?"0":"")+m.toString(16)).toUpperCase());return b}(),i=function(m){for(;m.length>1;){var v=m.pop(),R=v.obj[v.prop];if(r(R)){for(var T=[],g=0;g<R.length;++g)typeof R[g]<"u"&&T.push(R[g]);v.obj[v.prop]=T}}},s=function(m,v){for(var R=v&&v.plainObjects?Object.create(null):{},T=0;T<m.length;++T)typeof m[T]<"u"&&(R[T]=m[T]);return R},o=function b(m,v,R){if(!v)return m;if(typeof v!="object"){if(r(m))m.push(v);else if(m&&typeof m=="object")(R&&(R.plainObjects||R.allowPrototypes)||!e.call(Object.prototype,v))&&(m[v]=!0);else return[m,v];return m}if(!m||typeof m!="object")return[m].concat(v);var T=m;return r(m)&&!r(v)&&(T=s(m,R)),r(m)&&r(v)?(v.forEach(function(g,O){if(e.call(m,O)){var _=m[O];_&&typeof _=="object"&&g&&typeof g=="object"?m[O]=b(_,g,R):m.push(g)}else m[O]=g}),m):Object.keys(v).reduce(function(g,O){var _=v[O];return e.call(g,O)?g[O]=b(g[O],_,R):g[O]=_,g},T)},a=function(m,v){return Object.keys(v).reduce(function(R,T){return R[T]=v[T],R},m)},c=function(b,m,v){var R=b.replace(/\+/g," ");if(v==="iso-8859-1")return R.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(R)}catch{return R}},f=1024,h=function(m,v,R,T,g){if(m.length===0)return m;var O=m;if(typeof m=="symbol"?O=Symbol.prototype.toString.call(m):typeof m!="string"&&(O=String(m)),R==="iso-8859-1")return escape(O).replace(/%u[0-9a-f]{4}/gi,function(H){return"%26%23"+parseInt(H.slice(2),16)+"%3B"});for(var _="",q=0;q<O.length;q+=f){for(var $=O.length>=f?O.slice(q,q+f):O,j=[],J=0;J<$.length;++J){var W=$.charCodeAt(J);if(W===45||W===46||W===95||W===126||W>=48&&W<=57||W>=65&&W<=90||W>=97&&W<=122||g===t.RFC1738&&(W===40||W===41)){j[j.length]=$.charAt(J);continue}if(W<128){j[j.length]=n[W];continue}if(W<2048){j[j.length]=n[192|W>>6]+n[128|W&63];continue}if(W<55296||W>=57344){j[j.length]=n[224|W>>12]+n[128|W>>6&63]+n[128|W&63];continue}J+=1,W=65536+((W&1023)<<10|$.charCodeAt(J)&1023),j[j.length]=n[240|W>>18]+n[128|W>>12&63]+n[128|W>>6&63]+n[128|W&63]}_+=j.join("")}return _}
`," "],o=["{","}","|","\\","^","`"].concat(s),a=["'"].concat(o),c=["%","/","?",";","#"].concat(a),f=["/","?","#"],h=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=Cx();function m(g,O,_){if(g&&typeof g=="object"&&g instanceof e)return g;var q=new e;return q.parse(g,O,_),q}e.prototype.parse=function(g,O,_){if(typeof g!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof g);var q=g.indexOf("?"),$=q!==-1&&q<g.indexOf("#")?"?":"#",j=g.split($),J=/\\/g;j[0]=j[0].replace(J,"/"),g=j.join($);var W=g;if(W=W.trim(),!_&&g.split("#").length===1){var H=i.exec(W);if(H)return this.path=W,this.href=W,this.pathname=H[1],H[2]?(this.search=H[2],O?this.query=b.parse(this.search.substr(1)):this.query=this.search.substr(1)):O&&(this.search="",this.query={}),this}var G=r.exec(W);if(G){G=G[0];var K=G.toLowerCase();this.protocol=K,W=W.substr(G.length)}if(_||G||W.match(/^\/\/[^@/]+@[^@/]+/)){var X=W.substr(0,2)==="//";X&&!(G&&P[G])&&(W=W.substr(2),this.slashes=!0)}if(!P[G]&&(X||G&&!E[G])){for(var Q=-1,V=0;V<f.length;V++){var te=W.indexOf(f[V]);te!==-1&&(Q===-1||te<Q)&&(Q=te)}var Y,ee;Q===-1?ee=W.lastIndexOf("@"):ee=W.lastIndexOf("@",Q),ee!==-1&&(Y=W.slice(0,ee),W=W.slice(ee+1),this.auth=decodeURIComponent(Y)),Q=-1;for(var V=0;V<c.length;V++){var te=W.indexOf(c[V]);te!==-1&&(Q===-1||te<Q)&&(Q=te)}Q===-1&&(Q=W.length),this.host=W.slice(0,Q),W=W.slice(Q),this.parseHost(),this.hostname=this.hostname||"";var pe=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!pe)for(var Z=this.hostname.split(/\./),V=0,ne=Z.length;V<ne;V++){var fe=Z[V];if(fe&&!fe.match(d)){for(var be="",ye=0,Ae=fe.length;ye<Ae;ye++)fe.charCodeAt(ye)>127?be+="x":be+=fe[ye];if(!be.match(d)){var _e=Z.slice(0,V),ve=Z.slice(V+1),Oe=fe.match(w);Oe&&(_e.push(Oe[1]),ve.unshift(Oe[2])),ve.length&&(W="/"+ve.join(".")+W),this.hostname=_e.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),pe||(this.hostname=t.toASCII(this.hostname));var xe=this.port?":"+this.port:"",st=this.hostname||"";this.host=st+xe,this.href+=this.host,pe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),W[0]!=="/"&&(W="/"+W))}if(!y[K])for(var V=0,ne=a.length;V<ne;V++){var Re=a[V];if(W.indexOf(Re)!==-1){var Ne=encodeURIComponent(Re);Ne===Re&&(Ne=escape(Re)),W=W.split(Re).join(Ne)}}var Ct=W.indexOf("#");Ct!==-1&&(this.hash=W.substr(Ct),W=W.slice(0,Ct));var Bt=W.indexOf("?");if(Bt!==-1?(this.search=W.substr(Bt),this.query=W.substr(Bt+1),O&&(this.query=b.parse(this.query)),W=W.slice(0,Bt)):O&&(this.search="",this.query={}),W&&(this.pathname=W),E[K]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var xe=this.pathname||"",xn=this.search||"";this.path=xe+xn}return this.href=this.format(),this};function v(g){return typeof g=="string"&&(g=m(g)),g instanceof e?g.format():e.prototype.format.call(g)}e.prototype.format=function(){var g=this.auth||"";g&&(g=encodeURIComponent(g),g=g.replace(/%3A/i,":"),g+="@");var O=this.protocol||"",_=this.pathname||"",q=this.hash||"",$=!1,j="";this.host?$=g+this.host:this.hostname&&($=g+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&($+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(j=b.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var J=this.search||j&&"?"+j||"";return O&&O.substr(-1)!==":"&&(O+=":"),this.slashes||(!O||E[O])&&$!==!1?($="//"+($||""),_&&_.charAt(0)!=="/"&&(_="/"+_)):$||($=""),q&&q.charAt(0)!=="#"&&(q="#"+q),J&&J.charAt(0)!=="?"&&(J="?"+J),_=_.replace(/[?#]/g,function(W){return encodeURIComponent(W)}),J=J.replace("#","%23"),O+$+_+J+q};function R(g,O){return m(g,!1,!0).resolve(O)}e.prototype.resolve=function(g){return this.resolveObject(m(g,!1,!0)).format()};function T(g,O){return g?m(g,!1,!0).resolveObject(O):O}return e.prototype.resolveObject=function(g){if(typeof g=="
`)&&(e=e.replace(Kx,"%0A")),e.includes("\r")&&(e=e.replace(Qx,"%0D")),e.includes(" ")&&(e=e.replace(Yx,"%09")),n.pathname=e,n}var Tx,Al,pb,Il,xl,yb,Tl,gb,Pl,bb,Ol,wb,Rl,mb,kl,_b,Hr,vb,Ge,Mx,Nx,qx,Lx,Ux,Dx,jx,Fx,Wx,$x,Hx,Cl,Vx,Gx,zx,Kx,Qx,Yx,xb=ze(()=>{A();x();I();Ug();lb();db();vl();Tx=Object.freeze(Object.create(null)),Al={},pb=!1,Il=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global;xl={},yb=!1;Tl={},gb=!1;Pl={},bb=!1;Ol={},wb=!1;Rl={},mb=!1;kl={},_b=!1;Hr={},vb=!1;Ge=Bx();Ge.parse;Ge.resolve;Ge.resolveObject;Ge.format;Ge.Url;Mx=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0;Ge.URL=typeof URL<"u"?URL:null;Ge.pathToFileURL=Ab;Ge.fileURLToPath=Eb;Nx=Ge.Url,qx=Ge.format,Lx=Ge.resolve,Ux=Ge.resolveObject,Dx=Ge.parse,jx=Ge.URL,Fx=92,Wx=47,$x=97,Hx=122,Cl=Mx==="win32",Vx=/\//g,Gx=/%/g,zx=/\\/g,Kx=/\n/g,Qx=/\r/g,Yx=/\t/g});var Pb=D((WF,Tb)=>{"use strict";A();x();I();Tb.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}});var Qo=D(mi=>{"use strict";A();x();I();Object.defineProperty(mi,"__esModule",{value:!0});mi.BufferedDuplex=void 0;mi.writev=Rb;var Zx=or(),Ob=(ke(),me(qe));function Rb(t,e){let r=new Array(t.length);for(let n=0;n<t.length;n++)typeof t[n].chunk=="string"?r[n]=Ob.Buffer.from(t[n].chunk,"utf8"):r[n]=t[n].chunk;this._write(Ob.Buffer.concat(r),"binary",e)}var Ml=class extends Zx.Duplex{socket;proxy;isSocketOpen;writeQueue;constructor(e,r,n){super({objectMode:!0}),this.proxy=r,this.socket=n,this.writeQueue=[],e.objectMode||(this._writev=Rb.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",i=>{!this.destroyed&&this.readable&&this.push(i)})}_read(e){this.proxy.read(e)}_write(e,r,n){this.isSocketOpen?this.writeToProxy(e,r,n):this.writeQueue.push({chunk:e,encoding:r,cb:n})}_final(e){this.writeQueue=[],this.proxy.end(e)}_destroy(e,r){this.writeQueue=[],this.proxy.destroy(),r(e)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(e,r,n){this.proxy.write(e,r)===!1?this.proxy.once("drain",n):n()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:e,encoding:r,cb:n}=this.writeQueue.shift();this.writeToProxy(e,r,n)}}};mi.BufferedDuplex=Ml});var _i=D(gr=>{"use strict";A();x();I();var ql=gr&&gr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gr,"__esModule",{value:!0});gr.streamBuilder=gr.browserStreamBuilder=void 0;var Yo=(ke(),me(qe)),kb=ql(Pb()),eT=ql(At()),tT=or(),rT=ql(yi()),Nl=Qo(),yr=(0,eT.default)("mqttjs:ws"),nT=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function Cb(t,e){let r=`${t.protocol}://${t.hostname}:${t.port}${t.path}`;return typeof t.transformWsUrl=="function"&&(r=t.transformWsUrl(r,t,e)),r}function Bb(t){let e=t;return t.port||(t.protocol==="wss"?e.port=443:e.port=80),t.path||(e.path="/"),t.wsOptions||(e.wsOptions={}),!rT.default&&!t.forceNativeWebSocket&&t.protocol==="wss"&&nT.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r])}),e}function iT(t){let e=Bb(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let r=new URL(document.URL);e.hostname=r.hostname,e.port||(e.port=Number(r.port))}return e.objectMode===void 0&&(e.objectMode=!(e.binary===!0||e.binary===void 0)),e}function oT(t,e,r){yr("createWebSocket"),yr(`protocol: ${r.protocolId} ${r.protocolVersion}`);let n=r.protocolId==="MQIsdp"&&r.protocolVersion===3?"mqttv3.1":"mqtt";yr(`creating new Websocket for url: ${e} and protocol: ${n}`);let i;return r.createWebsocket?i=r.createWebsocket(e,[n],r):i=new kb.default(e,[n],r.wsOptions),i}function sT(t,e){let r=e.protocolId==="MQIsdp"&&e.protocolVersion===3?"mqttv3.1":"mqtt",n=Cb(e,t),i;return e.createWebsocket?i=e.createWebsocket(n,[r],e):i=new WebSocket(n,[r]),i.binaryType="arraybuffer",i}var aT=(t,e)=>{yr("streamBuilder");let r=Bb(e);r.hostname=r.hostname||r.host||"localhost";let n=Cb(r,t),i=oT(t,n,r),s=kb.default.createW
/*! Bundled license information:
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
@babel/runtime/helpers/regenerator.js:
(*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)
*/