UNPKG

solclientjs

Version:

Solace Messaging API for Node.js

2 lines 549 kB
/*! For license information please see solclient.js.LICENSE.txt */ (()=>{var e={41:(e,t,s)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0});try{n=s(8167).Worker}catch(e){}var r={};r.default=n?function(e,t,s,r,i){var o=!1,a=new n(e+";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global",{eval:!0}).on("error",function(e){return i(e,null)}).on("message",function(e){return i(null,e)}).on("exit",function(e){e&&!o&&i(new Error("exited with code "+e),null)});return a.postMessage(s,r),a.terminate=function(){return o=!0,n.prototype.terminate.call(a)},a}:function(e,t,s,n,r){setImmediate(function(){return r(new Error("async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)"),null)});var i=function(){};return{terminate:i,postMessage:i}};var i=Uint8Array,o=Uint16Array,a=Int32Array,c=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),u=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=function(e,t){for(var s=new o(31),n=0;n<31;++n)s[n]=t+=1<<e[n-1];var r=new a(s[30]);for(n=1;n<30;++n)for(var i=s[n];i<s[n+1];++i)r[i]=i-s[n]<<5|n;return{b:s,r}},d=h(c,2),_=d.b,p=d.r;_[28]=258,p[258]=28;for(var E=h(l,0),T=E.b,S=E.r,g=new o(32768),m=0;m<32768;++m){var f=(43690&m)>>1|(21845&m)<<1;f=(61680&(f=(52428&f)>>2|(13107&f)<<2))>>4|(3855&f)<<4,g[m]=((65280&f)>>8|(255&f)<<8)>>1}var I=function(e,t,s){for(var n=e.length,r=0,i=new o(t);r<n;++r)e[r]&&++i[e[r]-1];var a,c=new o(t);for(r=1;r<t;++r)c[r]=c[r-1]+i[r-1]<<1;if(s){a=new o(1<<t);var l=15-t;for(r=0;r<n;++r)if(e[r])for(var u=r<<4|e[r],h=t-e[r],d=c[e[r]-1]++<<h,_=d|(1<<h)-1;d<=_;++d)a[g[d]>>l]=u}else for(a=new o(n),r=0;r<n;++r)e[r]&&(a[r]=g[c[e[r]-1]++]>>15-e[r]);return a},C=new i(288);for(m=0;m<144;++m)C[m]=8;for(m=144;m<256;++m)C[m]=9;for(m=256;m<280;++m)C[m]=7;for(m=280;m<288;++m)C[m]=8;var R=new i(32);for(m=0;m<32;++m)R[m]=5;var O=I(C,9,0),N=I(C,9,1),A=I(R,5,0),P=I(R,5,1),D=function(e){for(var t=e[0],s=1;s<e.length;++s)e[s]>t&&(t=e[s]);return t},b=function(e,t,s){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&s},y=function(e,t){var s=t/8|0;return(e[s]|e[s+1]<<8|e[s+2]<<16)>>(7&t)},v=function(e){return(e+7)/8|0},M=function(e,t,s){return(null==t||t<0)&&(t=0),(null==s||s>e.length)&&(s=e.length),new i(e.subarray(t,s))};t.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var w=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],L=function(e,t,s){var n=new Error(t||w[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,L),!s)throw n;return n},U=function(e,t,s,n){var r=e.length,o=n?n.length:0;if(!r||t.f&&!t.l)return s||new i(0);var a=!s,h=a||2!=t.i,d=t.i;a&&(s=new i(3*r));var p=function(e){var t=s.length;if(e>t){var n=new i(Math.max(2*t,e));n.set(s),s=n}},E=t.f||0,S=t.p||0,g=t.b||0,m=t.l,f=t.d,C=t.m,R=t.n,O=8*r;do{if(!m){E=b(e,S,1);var A=b(e,S+1,3);if(S+=3,!A){var w=e[(H=v(S)+4)-4]|e[H-3]<<8,U=H+w;if(U>r){d&&L(0);break}h&&p(g+w),s.set(e.subarray(H,U),g),t.b=g+=w,t.p=S=8*U,t.f=E;continue}if(1==A)m=N,f=P,C=9,R=5;else if(2==A){var F=b(e,S,31)+257,x=b(e,S+10,15)+4,k=F+b(e,S+5,31)+1;S+=14;for(var B=new i(k),G=new i(19),W=0;W<x;++W)G[u[W]]=b(e,S+3*W,7);S+=3*x;var $=D(G),q=(1<<$)-1,V=I(G,$,1);for(W=0;W<k;){var H,Y=V[b(e,S,q)];if(S+=15&Y,(H=Y>>4)<16)B[W++]=H;else{var Q=0,K=0;for(16==H?(K=3+b(e,S,3),S+=2,Q=B[W-1]):17==H?(K=3+b(e,S,7),S+=3):18==H&&(K=11+b(e,S,127),S+=7);K--;)B[W++]=Q}}var j=B.subarray(0,F),X=B.subarray(F);C=D(j),R=D(X),m=I(j,C,1),f=I(X,R,1)}else L(1);if(S>O){d&&L(0);break}}h&&p(g+131072);for(var z=(1<<C)-1,Z=(1<<R)-1,J=S;;J=S){var ee=(Q=m[y(e,S)&z])>>4;if((S+=15&Q)>O){d&&L(0);break}if(Q||L(2),ee<256)s[g++]=ee;else{if(256==ee){J=S,m=null;break}var te=ee-254;if(ee>264){var se=c[W=ee-257];te=b(e,S,(1<<se)-1)+_[W],S+=se}var ne=f[y(e,S)&Z],re=ne>>4;ne||L(3),S+=15&ne;X=T[re];if(re>3){se=l[re];X+=y(e,S)&(1<<se)-1,S+=se}if(S>O){d&&L(0);break}h&&p(g+131072);var ie=g+te;if(g<X){var oe=o-X,ae=Math.min(X,ie);for(oe+g<0&&L(3);g<ae;++g)s[g]=n[oe+g]}for(;g<ie;++g)s[g]=s[g-X]}}t.l=m,t.p=J,t.b=g,t.f=E,m&&(E=1,t.m=C,t.d=f,t.n=R)}while(!E);return g!=s.length&&a?M(s,0,g):s.subarray(0,g)},F=function(e,t,s){s<<=7&t;var n=t/8|0;e[n]|=s,e[n+1]|=s>>8},x=function(e,t,s){s<<=7&t;var n=t/8|0;e[n]|=s,e[n+1]|=s>>8,e[n+2]|=s>>16},k=function(e,t){for(var s=[],n=0;n<e.length;++n)e[n]&&s.push({s:n,f:e[n]});var r=s.length,a=s.slice();if(!r)return{t:H,l:0};if(1==r){var c=new i(s[0].s+1);return c[s[0].s]=1,{t:c,l:1}}s.sort(function(e,t){return e.f-t.f}),s.push({s:-1,f:25001});var l=s[0],u=s[1],h=0,d=1,_=2;for(s[0]={s:-1,f:l.f+u.f,l,r:u};d!=r-1;)l=s[s[h].f<s[_].f?h++:_++],u=s[h!=d&&s[h].f<s[_].f?h++:_++],s[d++]={s:-1,f:l.f+u.f,l,r:u};var p=a[0].s;for(n=1;n<r;++n)a[n].s>p&&(p=a[n].s);var E=new o(p+1),T=B(s[d-1],E,0);if(T>t){n=0;var S=0,g=T-t,m=1<<g;for(a.sort(function(e,t){return E[t.s]-E[e.s]||e.f-t.f});n<r;++n){var f=a[n].s;if(!(E[f]>t))break;S+=m-(1<<T-E[f]),E[f]=t}for(S>>=g;S>0;){var I=a[n].s;E[I]<t?S-=1<<t-E[I]++-1:++n}for(;n>=0&&S;--n){var C=a[n].s;E[C]==t&&(--E[C],++S)}T=t}return{t:new i(E),l:T}},B=function(e,t,s){return-1==e.s?Math.max(B(e.l,t,s+1),B(e.r,t,s+1)):t[e.s]=s},G=function(e){for(var t=e.length;t&&!e[--t];);for(var s=new o(++t),n=0,r=e[0],i=1,a=function(e){s[n++]=e},c=1;c<=t;++c)if(e[c]==r&&c!=t)++i;else{if(!r&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(r),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(r);i=1,r=e[c]}return{c:s.subarray(0,n),n:t}},W=function(e,t){for(var s=0,n=0;n<t.length;++n)s+=e[n]*t[n];return s},$=function(e,t,s){var n=s.length,r=v(t+2);e[r]=255&n,e[r+1]=n>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var i=0;i<n;++i)e[r+i+4]=s[i];return 8*(r+4+n)},q=function(e,t,s,n,r,i,a,h,d,_,p){F(t,p++,s),++r[256];for(var E=k(r,15),T=E.t,S=E.l,g=k(i,15),m=g.t,f=g.l,N=G(T),P=N.c,D=N.n,b=G(m),y=b.c,v=b.n,M=new o(19),w=0;w<P.length;++w)++M[31&P[w]];for(w=0;w<y.length;++w)++M[31&y[w]];for(var L=k(M,7),U=L.t,B=L.l,q=19;q>4&&!U[u[q-1]];--q);var V,H,Y,Q,K=_+5<<3,j=W(r,C)+W(i,R)+a,X=W(r,T)+W(i,m)+a+14+3*q+W(M,U)+2*M[16]+3*M[17]+7*M[18];if(d>=0&&K<=j&&K<=X)return $(t,p,e.subarray(d,d+_));if(F(t,p,1+(X<j)),p+=2,X<j){V=I(T,S,0),H=T,Y=I(m,f,0),Q=m;var z=I(U,B,0);F(t,p,D-257),F(t,p+5,v-1),F(t,p+10,q-4),p+=14;for(w=0;w<q;++w)F(t,p+3*w,U[u[w]]);p+=3*q;for(var Z=[P,y],J=0;J<2;++J){var ee=Z[J];for(w=0;w<ee.length;++w){var te=31&ee[w];F(t,p,z[te]),p+=U[te],te>15&&(F(t,p,ee[w]>>5&127),p+=ee[w]>>12)}}}else V=O,H=C,Y=A,Q=R;for(w=0;w<h;++w){var se=n[w];if(se>255){x(t,p,V[(te=se>>18&31)+257]),p+=H[te+257],te>7&&(F(t,p,se>>23&31),p+=c[te]);var ne=31&se;x(t,p,Y[ne]),p+=Q[ne],ne>3&&(x(t,p,se>>5&8191),p+=l[ne])}else x(t,p,V[se]),p+=H[se]}return x(t,p,V[256]),p+H[256]},V=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),H=new i(0),Y=function(e,t,s,n,r,u){var h=u.z||e.length,d=new i(n+h+5*(1+Math.ceil(h/7e3))+r),_=d.subarray(n,d.length-r),E=u.l,T=7&(u.r||0);if(t){T&&(_[0]=u.r>>3);for(var g=V[t-1],m=g>>13,f=8191&g,I=(1<<s)-1,C=u.p||new o(32768),R=u.h||new o(I+1),O=Math.ceil(s/3),N=2*O,A=function(t){return(e[t]^e[t+1]<<O^e[t+2]<<N)&I},P=new a(25e3),D=new o(288),b=new o(32),y=0,w=0,L=u.i||0,U=0,F=u.w||0,x=0;L+2<h;++L){var k=A(L),B=32767&L,G=R[k];if(C[B]=G,R[k]=B,F<=L){var W=h-L;if((y>7e3||U>24576)&&(W>423||!E)){T=q(e,_,0,P,D,b,w,U,x,L-x,T),U=y=w=0,x=L;for(var H=0;H<286;++H)D[H]=0;for(H=0;H<30;++H)b[H]=0}var Y=2,Q=0,K=f,j=B-G&32767;if(W>2&&k==A(L-j))for(var X=Math.min(m,W)-1,z=Math.min(32767,L),Z=Math.min(258,W);j<=z&&--K&&B!=G;){if(e[L+Y]==e[L+Y-j]){for(var J=0;J<Z&&e[L+J]==e[L+J-j];++J);if(J>Y){if(Y=J,Q=j,J>X)break;var ee=Math.min(j,J-2),te=0;for(H=0;H<ee;++H){var se=L-j+H&32767,ne=se-C[se]&32767;ne>te&&(te=ne,G=se)}}}j+=(B=G)-(G=C[B])&32767}if(Q){P[U++]=268435456|p[Y]<<18|S[Q];var re=31&p[Y],ie=31&S[Q];w+=c[re]+l[ie],++D[257+re],++b[ie],F=L+Y,++y}else P[U++]=e[L],++D[e[L]]}}for(L=Math.max(L,F);L<h;++L)P[U++]=e[L],++D[e[L]];T=q(e,_,E,P,D,b,w,U,x,L-x,T),E||(u.r=7&T|_[T/8|0]<<3,T-=7,u.h=R,u.p=C,u.i=L,u.w=F)}else{for(L=u.w||0;L<h+E;L+=65535){var oe=L+65535;oe>=h&&(_[T/8|0]=E,oe=h),T=$(_,T+1,e.subarray(L,oe))}u.i=h}return M(d,0,n+v(T)+r)},Q=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var s=t,n=9;--n;)s=(1&s&&-306674912)^s>>>1;e[t]=s}return e}(),K=function(){var e=-1;return{p:function(t){for(var s=e,n=0;n<t.length;++n)s=Q[255&s^t[n]]^s>>>8;e=s},d:function(){return~e}}},j=function(){var e=1,t=0;return{p:function(s){for(var n=e,r=t,i=0|s.length,o=0;o!=i;){for(var a=Math.min(o+2655,i);o<a;++o)r+=n+=s[o];n=(65535&n)+15*(n>>16),r=(65535&r)+15*(r>>16)}e=n,t=r},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},X=function(e,t,s,n,r){if(!r&&(r={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),a=new i(o.length+e.length);a.set(o),a.set(e,o.length),e=a,r.w=o.length}return Y(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,s,n,r)},z=function(e,t){var s={};for(var n in e)s[n]=e[n];for(var n in t)s[n]=t[n];return s},Z=function(e,t,s){for(var n=e(),r=e.toString(),i=r.slice(r.indexOf("[")+1,r.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<n.length;++o){var a=n[o],c=i[o];if("function"==typeof a){t+=";"+c+"=";var l=a.toString();if(a.prototype)if(-1!=l.indexOf("[native code]")){var u=l.indexOf(" ",8)+1;t+=l.slice(u,l.indexOf("(",u))}else for(var h in t+=l,a.prototype)t+=";"+c+".prototype."+h+"="+a.prototype[h].toString();else t+=l}else s[c]=a}return t},J=[],ee=function(e,t,s,n){if(!J[s]){for(var i="",o={},a=e.length-1,c=0;c<a;++c)i=Z(e[c],i,o);J[s]={c:Z(e[a],i,o),e:o}}var l=z({},J[s].e);return(0,r.default)(J[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",s,l,function(e){var t=[];for(var s in e)e[s].buffer&&t.push((e[s]=new e[s].constructor(e[s])).buffer);return t}(l),n)},te=function(){return[i,o,a,c,l,u,_,T,N,P,g,w,I,D,b,y,v,M,L,U,ye,ae,ce]},se=function(){return[i,o,a,c,l,u,p,S,O,C,A,R,g,V,H,I,F,x,k,B,G,W,$,q,v,M,Y,X,Ae,ae]},ne=function(){return[Te,me,Ee,K,Q]},re=function(){return[Se,ge]},ie=function(){return[fe,Ee,j]},oe=function(){return[Ie]},ae=function(e){return postMessage(e,[e.buffer])},ce=function(e){return e&&{out:e.size&&new i(e.size),dictionary:e.dictionary}},le=function(e,t,s,n,r,i){var o=ee(s,n,r,function(e,t){o.terminate(),i(e,t)});return o.postMessage([e,t],t.consume?[e.buffer]:[]),function(){o.terminate()}},ue=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}},he=function(e,t,s,n,r,i){var o,a=ee(e,n,r,function(e,s){e?(a.terminate(),t.ondata.call(t,e)):Array.isArray(s)?(s[1]&&a.terminate(),t.ondata.call(t,e,s[0],s[1])):i(s)});a.postMessage(s),t.push=function(e,s){t.ondata||L(5),o&&t.ondata(L(4,0,1),null,!!s),a.postMessage([e,o=s],[e.buffer])},t.terminate=function(){a.terminate()}},de=function(e,t){return e[t]|e[t+1]<<8},_e=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},pe=function(e,t){return _e(e,t)+4294967296*_e(e,t+4)},Ee=function(e,t,s){for(;s;++t)e[t]=s,s>>>=8},Te=function(e,t){var s=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Ee(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),s){e[3]=8;for(var n=0;n<=s.length;++n)e[n+10]=s.charCodeAt(n)}},Se=function(e){31==e[0]&&139==e[1]&&8==e[2]||L(6,"invalid gzip data");var t=e[3],s=10;4&t&&(s+=2+(e[10]|e[11]<<8));for(var n=(t>>3&1)+(t>>4&1);n>0;n-=!e[s++]);return s+(2&t)},ge=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},me=function(e){return 10+(e.filename?e.filename.length+1:0)},fe=function(e,t){var s=t.level,n=0==s?0:s<6?1:9==s?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var r=j();r.p(t.dictionary),Ee(e,2,r.d())}},Ie=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&L(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&L(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function Ce(e,t){return"function"==typeof e&&(t=e,e={}),this.ondata=t,e}var Re=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new i(98304),this.o.dictionary){var s=this.o.dictionary.subarray(-32768);this.b.set(s,32768-s.length),this.s.i=32768-s.length}}return e.prototype.p=function(e,t){this.ondata(X(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||L(5),this.s.l&&L(4);var s=e.length+this.s.z;if(s>this.b.length){if(s>2*this.b.length-32768){var n=new i(-32768&s);n.set(this.b.subarray(0,this.s.z)),this.b=n}var r=this.b.length-this.s.z;r&&(this.b.set(e.subarray(0,r),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(r),32768),this.s.z=e.length-r+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e}();t.Deflate=Re;var Oe=function(){return function(e,t){he([se,function(){return[ue,Re]}],this,Ce.call(this,e,t),function(e){var t=new Re(e.data);onmessage=ue(t)},6)}}();function Ne(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),le(e,t,[se],function(e){return ae(Ae(e.data[0],e.data[1]))},0,s)}function Ae(e,t){return X(e,t||{},0,0)}t.AsyncDeflate=Oe,t.deflate=Ne,t.deflateSync=Ae;var Pe=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var s=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:s?s.length:0},this.o=new i(32768),this.p=new i(0),s&&this.o.set(s)}return e.prototype.e=function(e){if(this.ondata||L(5),this.d&&L(4),this.p.length){if(e.length){var t=new i(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,s=U(this.p,this.s,this.o);this.ondata(M(s,t,this.s.b),this.d),this.o=M(s,this.s.b-32768),this.s.b=this.o.length,this.p=M(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();t.Inflate=Pe;var De=function(){return function(e,t){he([te,function(){return[ue,Pe]}],this,Ce.call(this,e,t),function(e){var t=new Pe(e.data);onmessage=ue(t)},7)}}();function be(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),le(e,t,[te],function(e){return ae(ye(e.data[0],ce(e.data[1])))},1,s)}function ye(e,t){return U(e,{i:2},t&&t.out,t&&t.dictionary)}t.AsyncInflate=De,t.inflate=be,t.inflateSync=ye;var ve=function(){function e(e,t){this.c=K(),this.l=0,this.v=1,Re.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,Re.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var s=X(e,this.o,this.v&&me(this.o),t&&8,this.s);this.v&&(Te(s,this.o),this.v=0),t&&(Ee(s,s.length-8,this.c.d()),Ee(s,s.length-4,this.l)),this.ondata(s,t)},e}();t.Gzip=ve,t.Compress=ve;var Me=function(){return function(e,t){he([se,ne,function(){return[ue,Re,ve]}],this,Ce.call(this,e,t),function(e){var t=new ve(e.data);onmessage=ue(t)},8)}}();function we(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),le(e,t,[se,ne,function(){return[Le]}],function(e){return ae(Le(e.data[0],e.data[1]))},2,s)}function Le(e,t){t||(t={});var s=K(),n=e.length;s.p(e);var r=X(e,t,me(t),8),i=r.length;return Te(r,t),Ee(r,i-8,s.d()),Ee(r,i-4,n),r}t.AsyncGzip=Me,t.AsyncCompress=Me,t.gzip=we,t.compress=we,t.gzipSync=Le,t.compressSync=Le;var Ue=function(){function e(e,t){this.v=1,this.r=0,Pe.call(this,e,t)}return e.prototype.push=function(e,t){if(Pe.prototype.e.call(this,e),this.r+=e.length,this.v){var s=this.p.subarray(this.v-1),n=s.length>3?Se(s):4;if(n>s.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-s.length);this.p=s.subarray(n),this.v=0}Pe.prototype.c.call(this,t),this.s.f&&!this.s.l&&(this.v=v(this.s.p)+9,this.s={i:0},this.o=new i(0),this.p.length&&this.push(new i(0),t))},e}();t.Gunzip=Ue;var Fe=function(){return function(e,t){var s=this;he([te,re,function(){return[ue,Pe,Ue]}],this,Ce.call(this,e,t),function(e){var t=new Ue(e.data);t.onmember=function(e){return postMessage(e)},onmessage=ue(t)},9,function(e){return s.onmember&&s.onmember(e)})}}();function xe(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),le(e,t,[te,re,function(){return[ke]}],function(e){return ae(ke(e.data[0],e.data[1]))},3,s)}function ke(e,t){var s=Se(e);return s+8>e.length&&L(6,"invalid gzip data"),U(e.subarray(s,-8),{i:2},t&&t.out||new i(ge(e)),t&&t.dictionary)}t.AsyncGunzip=Fe,t.gunzip=xe,t.gunzipSync=ke;var Be=function(){function e(e,t){this.c=j(),this.v=1,Re.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),Re.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var s=X(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(fe(s,this.o),this.v=0),t&&Ee(s,s.length-4,this.c.d()),this.ondata(s,t)},e}();t.Zlib=Be;var Ge=function(){return function(e,t){he([se,ie,function(){return[ue,Re,Be]}],this,Ce.call(this,e,t),function(e){var t=new Be(e.data);onmessage=ue(t)},10)}}();function We(e,t){t||(t={});var s=j();s.p(e);var n=X(e,t,t.dictionary?6:2,4);return fe(n,t),Ee(n,n.length-4,s.d()),n}t.AsyncZlib=Ge,t.zlib=function(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),le(e,t,[se,ie,function(){return[We]}],function(e){return ae(We(e.data[0],e.data[1]))},4,s)},t.zlibSync=We;var $e=function(){function e(e,t){Pe.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(Pe.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(Ie(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&L(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Pe.prototype.c.call(this,t)},e}();t.Unzlib=$e;var qe=function(){return function(e,t){he([te,oe,function(){return[ue,Pe,$e]}],this,Ce.call(this,e,t),function(e){var t=new $e(e.data);onmessage=ue(t)},11)}}();function Ve(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),le(e,t,[te,oe,function(){return[He]}],function(e){return ae(He(e.data[0],ce(e.data[1])))},5,s)}function He(e,t){return U(e.subarray(Ie(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}t.AsyncUnzlib=qe,t.unzlib=Ve,t.unzlibSync=He;var Ye=function(){function e(e,t){this.G=Ue,this.I=Pe,this.Z=$e,this.o=Ce.call(this,e,t)||{}}return e.prototype.push=function(e,t){if(this.ondata||L(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var s=new i(this.p.length+e.length);s.set(this.p),s.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var n=this,r=function(){n.ondata.apply(n,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o,r):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o,r):new this.Z(this.o,r),this.s.push(this.p,t),this.p=null}}},e}();t.Decompress=Ye;var Qe=function(){function e(e,t){this.G=Fe,this.I=De,this.Z=qe,Ye.call(this,e,t)}return e.prototype.push=function(e,t){Ye.prototype.push.call(this,e,t)},e}();t.AsyncDecompress=Qe,t.decompress=function(e,t,s){return s||(s=t,t={}),"function"!=typeof s&&L(7),31==e[0]&&139==e[1]&&8==e[2]?xe(e,t,s):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?be(e,t,s):Ve(e,t,s)},t.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?ke(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?ye(e,t):He(e,t)};var Ke=function(e,t,s,n){for(var r in e){var o=e[r],a=t+r,c=n;Array.isArray(o)&&(c=z(n,o[1]),o=o[0]),o instanceof i?s[a]=[o,c]:(s[a+="/"]=[new i(0),c],Ke(o,a,s,n))}},je="undefined"!=typeof TextEncoder&&new TextEncoder,Xe="undefined"!=typeof TextDecoder&&new TextDecoder,ze=0;try{Xe.decode(H,{stream:!0}),ze=1}catch(e){}var Ze=function(e){for(var t="",s=0;;){var n=e[s++],r=(n>127)+(n>223)+(n>239);if(s+r>e.length)return{s:t,r:M(e,s-1)};r?3==r?(n=((15&n)<<18|(63&e[s++])<<12|(63&e[s++])<<6|63&e[s++])-65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n)):t+=1&r?String.fromCharCode((31&n)<<6|63&e[s++]):String.fromCharCode((15&n)<<12|(63&e[s++])<<6|63&e[s++]):t+=String.fromCharCode(n)}},Je=function(){function e(e){this.ondata=e,ze?this.t=new TextDecoder:this.p=H}return e.prototype.push=function(e,t){if(this.ondata||L(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&L(8),this.t=null));this.p||L(4);var s=new i(this.p.length+e.length);s.set(this.p),s.set(e,this.p.length);var n=Ze(s),r=n.s,o=n.r;t?(o.length&&L(8),this.p=null):this.p=o,this.ondata(r,t)},e}();t.DecodeUTF8=Je;var et=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||L(5),this.d&&L(4),this.ondata(tt(e),this.d=t||!1)},e}();function tt(e,t){if(t){for(var s=new i(e.length),n=0;n<e.length;++n)s[n]=e.charCodeAt(n);return s}if(je)return je.encode(e);var r=e.length,o=new i(e.length+(e.length>>1)),a=0,c=function(e){o[a++]=e};for(n=0;n<r;++n){if(a+5>o.length){var l=new i(a+8+(r-n<<1));l.set(o),o=l}var u=e.charCodeAt(n);u<128||t?c(u):u<2048?(c(192|u>>6),c(128|63&u)):u>55295&&u<57344?(c(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++n))>>18),c(128|u>>12&63),c(128|u>>6&63),c(128|63&u)):(c(224|u>>12),c(128|u>>6&63),c(128|63&u))}return M(o,0,a)}function st(e,t){if(t){for(var s="",n=0;n<e.length;n+=16384)s+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return s}if(Xe)return Xe.decode(e);var r=Ze(e),i=r.s;return(s=r.r).length&&L(8),i}t.EncodeUTF8=et,t.strToU8=tt,t.strFromU8=st;var nt=function(e){return 1==e?3:e<6?2:9==e?1:0},rt=function(e,t){return t+30+de(e,t+26)+de(e,t+28)},it=function(e,t,s){var n=de(e,t+28),r=st(e.subarray(t+46,t+46+n),!(2048&de(e,t+8))),i=t+46+n,o=_e(e,t+20),a=s&&4294967295==o?ot(e,i):[o,_e(e,t+24),_e(e,t+42)],c=a[0],l=a[1],u=a[2];return[de(e,t+10),c,l,r,i+de(e,t+30)+de(e,t+32),u]},ot=function(e,t){for(;1!=de(e,t);t+=4+de(e,t+2));return[pe(e,t+12),pe(e,t+4),pe(e,t+20)]},at=function(e){var t=0;if(e)for(var s in e){var n=e[s].length;n>65535&&L(9),t+=n+4}return t},ct=function(e,t,s,n,r,i,o,a){var c=n.length,l=s.extra,u=a&&a.length,h=at(l);Ee(e,t,null!=o?33639248:67324752),t+=4,null!=o&&(e[t++]=20,e[t++]=s.os),e[t]=20,t+=2,e[t++]=s.flag<<1|(i<0&&8),e[t++]=r&&8,e[t++]=255&s.compression,e[t++]=s.compression>>8;var d=new Date(null==s.mtime?Date.now():s.mtime),_=d.getFullYear()-1980;if((_<0||_>119)&&L(10),Ee(e,t,_<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,-1!=i&&(Ee(e,t,s.crc),Ee(e,t+4,i<0?-i-2:i),Ee(e,t+8,s.size)),Ee(e,t+12,c),Ee(e,t+14,h),t+=16,null!=o&&(Ee(e,t,u),Ee(e,t+6,s.attrs),Ee(e,t+10,o),t+=14),e.set(n,t),t+=c,h)for(var p in l){var E=l[p],T=E.length;Ee(e,t,+p),Ee(e,t+2,T),e.set(E,t+4),t+=4+T}return u&&(e.set(a,t),t+=u),t},lt=function(e,t,s,n,r){Ee(e,t,101010256),Ee(e,t+8,s),Ee(e,t+10,s),Ee(e,t+12,n),Ee(e,t+16,r)},ut=function(){function e(e){this.filename=e,this.c=K(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||L(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();t.ZipPassThrough=ut;var ht=function(){function e(e,t){var s=this;t||(t={}),ut.call(this,e),this.d=new Re(t,function(e,t){s.ondata(null,e,t)}),this.compression=8,this.flag=nt(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){ut.prototype.push.call(this,e,t)},e}();t.ZipDeflate=ht;var dt=function(){function e(e,t){var s=this;t||(t={}),ut.call(this,e),this.d=new Oe(t,function(e,t,n){s.ondata(e,t,n)}),this.compression=8,this.flag=nt(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){ut.prototype.push.call(this,e,t)},e}();t.AsyncZipDeflate=dt;var _t=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||L(5),2&this.d)this.ondata(L(4+8*(1&this.d),0,1),null,!1);else{var s=tt(e.filename),n=s.length,r=e.comment,o=r&&tt(r),a=n!=e.filename.length||o&&r.length!=o.length,c=n+at(e.extra)+30;n>65535&&this.ondata(L(11,0,1),null,!1);var l=new i(c);ct(l,0,e,s,a,-1);var u=[l],h=function(){for(var e=0,s=u;e<s.length;e++){var n=s[e];t.ondata(null,n,!1)}u=[]},d=this.d;this.d=0;var _=this.u.length,p=z(e,{f:s,u:a,o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[_+1];e?e.r():t.d=1}d=1}}),E=0;e.ondata=function(s,n,r){if(s)t.ondata(s,n,r),t.terminate();else if(E+=n.length,u.push(n),r){var o=new i(16);Ee(o,0,134695760),Ee(o,4,e.crc),Ee(o,8,E),Ee(o,12,e.size),u.push(o),p.c=E,p.b=c+E+16,p.crc=e.crc,p.size=e.size,d&&p.r(),d=1}else d&&h()},this.u.push(p)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(L(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,s=0,n=0,r=this.u;n<r.length;n++){s+=46+(l=r[n]).f.length+at(l.extra)+(l.o?l.o.length:0)}for(var o=new i(s+22),a=0,c=this.u;a<c.length;a++){var l=c[a];ct(o,e,l,l.f,l.u,-l.c-2,t,l.o),e+=46+l.f.length+at(l.extra)+(l.o?l.o.length:0),t+=l.b}lt(o,e,this.u.length,s,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}();t.Zip=_t,t.zip=function(e,t,s){s||(s=t,t={}),"function"!=typeof s&&L(7);var n={};Ke(e,"",n,t);var r=Object.keys(n),o=r.length,a=0,c=0,l=o,u=new Array(o),h=[],d=function(){for(var e=0;e<h.length;++e)h[e]()},_=function(e,t){gt(function(){s(e,t)})};gt(function(){_=s});var p=function(){var e=new i(c+22),t=a,s=c-a;c=0;for(var n=0;n<l;++n){var r=u[n];try{var o=r.c.length;ct(e,c,r,r.f,r.u,o);var h=30+r.f.length+at(r.extra),d=c+h;e.set(r.c,d),ct(e,a,r,r.f,r.u,o,c,r.m),a+=16+h+(r.m?r.m.length:0),c=d+o}catch(e){return _(e,null)}}lt(e,a,u.length,s,t),_(null,e)};o||p();for(var E=function(e){var t=r[e],s=n[t],i=s[0],l=s[1],E=K(),T=i.length;E.p(i);var S=tt(t),g=S.length,m=l.comment,f=m&&tt(m),I=f&&f.length,C=at(l.extra),R=0==l.level?0:8,O=function(s,n){if(s)d(),_(s,null);else{var r=n.length;u[e]=z(l,{size:T,crc:E.d(),c:n,f:S,m:f,u:g!=t.length||f&&m.length!=I,compression:R}),a+=30+g+C+r,c+=76+2*(g+C)+(I||0)+r,--o||p()}};if(g>65535&&O(L(11,0,1),null),R)if(T<16e4)try{O(null,Ae(i,l))}catch(e){O(e,null)}else h.push(Ne(i,l,O));else O(null,i)},T=0;T<l;++T)E(T);return d},t.zipSync=function(e,t){t||(t={});var s={},n=[];Ke(e,"",s,t);var r=0,o=0;for(var a in s){var c=s[a],l=c[0],u=c[1],h=0==u.level?0:8,d=(O=tt(a)).length,_=u.comment,p=_&&tt(_),E=p&&p.length,T=at(u.extra);d>65535&&L(11);var S=h?Ae(l,u):l,g=S.length,m=K();m.p(l),n.push(z(u,{size:l.length,crc:m.d(),c:S,f:O,m:p,u:d!=a.length||p&&_.length!=E,o:r,compression:h})),r+=30+d+T+g,o+=76+2*(d+T)+(E||0)+g}for(var f=new i(o+22),I=r,C=o-r,R=0;R<n.length;++R){var O=n[R];ct(f,O.o,O,O.f,O.u,O.c.length);var N=30+O.f.length+at(O.extra);f.set(O.c,O.o+N),ct(f,r,O,O.f,O.u,O.c.length,O.o,O.m),r+=16+N+(O.m?O.m.length:0)}return lt(f,r,n.length,C,I),f};var pt=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();t.UnzipPassThrough=pt;var Et=function(){function e(){var e=this;this.i=new Pe(function(t,s){e.ondata(null,t,s)})}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}();t.UnzipInflate=Et;var Tt=function(){function e(e,t){var s=this;t<32e4?this.i=new Pe(function(e,t){s.ondata(null,e,t)}):(this.i=new De(function(e,t,n){s.ondata(e,t,n)}),this.terminate=this.i.terminate)}return e.prototype.push=function(e,t){this.i.terminate&&(e=M(e,0)),this.i.push(e,t)},e.compression=8,e}();t.AsyncUnzipInflate=Tt;var St=function(){function e(e){this.onfile=e,this.k=[],this.o={0:pt},this.p=H}return e.prototype.push=function(e,t){var s=this;if(this.onfile||L(5),this.p||L(4),this.c>0){var n=Math.min(this.c,e.length),r=e.subarray(0,n);if(this.c-=n,this.d?this.d.push(r,!this.c):this.k[0].push(r),(e=e.subarray(n)).length)return this.push(e,t)}else{var o=0,a=0,c=void 0,l=void 0;this.p.length?e.length?((l=new i(this.p.length+e.length)).set(this.p),l.set(e,this.p.length)):l=this.p:l=e;for(var u=l.length,h=this.c,d=h&&this.d,_=function(){var e,t=_e(l,a);if(67324752==t){o=1,c=a,p.d=null,p.c=0;var n=de(l,a+6),r=de(l,a+8),i=2048&n,d=8&n,_=de(l,a+26),E=de(l,a+28);if(u>a+30+_+E){var T=[];p.k.unshift(T),o=2;var S,g=_e(l,a+18),m=_e(l,a+22),f=st(l.subarray(a+30,a+=30+_),!i);4294967295==g?(e=d?[-2]:ot(l,a),g=e[0],m=e[1]):d&&(g=-1),a+=E,p.c=g;var I={name:f,compression:r,start:function(){if(I.ondata||L(5),g){var e=s.o[r];e||I.ondata(L(14,"unknown compression type "+r,1),null,!1),(S=g<0?new e(f):new e(f,g,m)).ondata=function(e,t,s){I.ondata(e,t,s)};for(var t=0,n=T;t<n.length;t++){var i=n[t];S.push(i,!1)}s.k[0]==T&&s.c?s.d=S:S.push(H,!0)}else I.ondata(null,H,!0)},terminate:function(){S&&S.terminate&&S.terminate()}};g>=0&&(I.size=g,I.originalSize=m),p.onfile(I)}return"break"}if(h){if(134695760==t)return c=a+=12+(-2==h&&8),o=3,p.c=0,"break";if(33639248==t)return c=a-=4,o=3,p.c=0,"break"}},p=this;a<u-4;++a){if("break"===_())break}if(this.p=H,h<0){var E=o?l.subarray(0,c-12-(-2==h&&8)-(134695760==_e(l,c-16)&&4)):l.subarray(0,a);d?d.push(E,!!o):this.k[+(2==o)].push(E)}if(2&o)return this.push(l.subarray(a),t);this.p=l.subarray(a)}t&&(this.c&&L(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();t.Unzip=St;var gt="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};t.unzip=function(e,t,s){s||(s=t,t={}),"function"!=typeof s&&L(7);var n=[],r=function(){for(var e=0;e<n.length;++e)n[e]()},o={},a=function(e,t){gt(function(){s(e,t)})};gt(function(){a=s});for(var c=e.length-22;101010256!=_e(e,c);--c)if(!c||e.length-c>65558)return a(L(13,0,1),null),r;var l=de(e,c+8);if(l){var u=l,h=_e(e,c+16),d=4294967295==h||65535==u;if(d){var _=_e(e,c-12);(d=101075792==_e(e,_))&&(u=l=_e(e,_+32),h=_e(e,_+48))}for(var p=t&&t.filter,E=function(t){var s=it(e,h,d),c=s[0],u=s[1],_=s[2],E=s[3],T=s[4],S=s[5],g=rt(e,S);h=T;var m=function(e,t){e?(r(),a(e,null)):(t&&(o[E]=t),--l||a(null,o))};if(!p||p({name:E,size:u,originalSize:_,compression:c}))if(c)if(8==c){var f=e.subarray(g,g+u);if(u<32e4)try{m(null,ye(f,{out:new i(_)}))}catch(e){m(e,null)}else n.push(be(f,{size:_},m))}else m(L(14,"unknown compression type "+c,1),null);else m(null,M(e,g,g+u));else m(null,null)},T=0;T<u;++T)E()}else a(null,{});return r},t.unzipSync=function(e,t){for(var s={},n=e.length-22;101010256!=_e(e,n);--n)(!n||e.length-n>65558)&&L(13);var r=de(e,n+8);if(!r)return{};var o=_e(e,n+16),a=4294967295==o||65535==r;if(a){var c=_e(e,n-12);(a=101075792==_e(e,c))&&(r=_e(e,c+32),o=_e(e,c+48))}for(var l=t&&t.filter,u=0;u<r;++u){var h=it(e,o,a),d=h[0],_=h[1],p=h[2],E=h[3],T=h[4],S=h[5],g=rt(e,S);o=T,l&&!l({name:E,size:_,originalSize:p,compression:d})||(d?8==d?s[E]=ye(e.subarray(g,g+_),{out:new i(p)}):L(14,"unknown compression type "+d):s[E]=M(e,g,g+_))}return s}},43:(e,t,s)=>{const n=s(178),r=s(5898),i=s(3450),o=s(4386),a=s(8205),{assert:c}=s(7444),{CapabilityType:l}=s(2484),{Check:u}=s(802),{CorrelatedRequest:h}=s(8165),{Destination:d}=s(9620),{ErrorResponseSubcodeMapper:_,ErrorSubcode:p,OperationError:E}=s(6706),{FsmEvent:T,State:S,StateMachine:g}=s(7414),{Hex:m}=s(9783),{LogFormatter:f}=s(2694),{Message:I,MessageOutcome:C,MessageDeliveryModeType:R}=s(6247),{P2PUtil:O}=s(7603),{SessionEvent:N}=s(8229),{SessionEventCode:A}=s(6334),{SessionEventName:P}=s(6324),{SessionFSMEvent:D}=s(1122),{SessionRequestType:b}=s(168),{SessionStateName:y}=s(6057),{SslDowngrade:v}=s(6415),{StatType:M,StatsByMode:w}=s(5747),{StringUtils:L}=s(968),{SubscriptionUpdateTimeoutMessages:U}=s(4356),{Codec:F}=s(769),{Convert:x}=s(9783),{anythingToBuffer:k}=x,{formatHexString:B}=m,{stripNullTerminate:G}=L,{STAT_TX_BYMODE_BYTES:W,STAT_TX_BYMODE_MSGS:$,STAT_RX_BYMODE_BYTES:q,STAT_RX_BYMODE_MSGS:V,STAT_TX_BYMODE_REDELIVERED:H,STAT_TX_BYMODE_BYTES_REDELIVERED:Y}=w,Q=s(3106);s(41);e.exports.SessionFSM=class extends g{constructor(e,t,s,r){super({name:"SessionFSM"});const i=this,o=this.logger=new f(function(...e){return[`[session-fsm=${i.sessionIdHex||"(N/A)"}]`,`[${i.getCurrentStateName()}]`,...e]}),{LOG_TRACE:l,LOG_DEBUG:u,LOG_INFO:h}=o;this.log=o.wrap(this.log,this),this._sessionProperties=e,this._session=t,this._sessionStatistics=s,this._hosts=r,this._consumers=new n.ConsumerFlows,this._flowInterfaceFactory=e=>({getCorrelationTag:this.getCorrelationTag.bind(this),incStat:this.incStat.bind(this),sendData:t=>this.send(t,e,!1),sendToTransport:t=>this.sendToTransport(t,e,!1),sendControl:t=>this.send(t,e,!0),enqueueRequest:this.enqueueOutstandingCorrelatedReq.bind(this),createDestinationFromDescriptor:t.createDestinationFromDescriptor.bind(t),createTemporaryDestination:t.createTemporaryDestination.bind(t),isCapable:t.isCapable.bind(t),getCapability:t.getCapability.bind(t),getCurrentStateName:this.getCurrentStateName.bind(this),updateQueueSubscription:t.updateQueueSubscription.bind(t),get sessionIdHex(){return i.sessionIdHex},get canAck(){return t.canAck}}),this._userBackpressured=!1,this.clearCurrentError(),this.initial(function(){return this.transitionTo(i.SessionDisconnected,e=>e.getStateMachine().reset())}),this.unhandledEventReaction(function(e){const t=i.getCurrentState();switch(e.getName()){case P.CREATE_SUBSCRIBER:return c(i._consumers,"collection has lifetime of FSM instance"),i._consumers.add(e.guaranteedFlowObject),this;case P.DISPOSE:return t.terminate(()=>i.disposeInternal());case P.FLOW_UP:return e.guaranteedFlowObject,this;default:return e.getName(),i.getCurrentStateName(),this}}),this.SessionConnecting=new S({name:y.CONNECTING,parentContext:i},{handleTransportDestroyed(){if(i.clearConnectTimer(),i._currentHost=i._hosts.getNextHost(),null===i._currentHost)return this.transitionToExitPoint(i.SessionConnecting,"ErrorExit");const{connectWaitTimeInMsecs:e}=i._hosts;return e>0&&!i._connectWaitTimer?(i._connectWaitTimer=setTimeout(()=>{i._connectWaitTimer=null,i.processEvent(new D({name:P.CONNECT_WAIT_TIMEOUT}))},e),this.transitionTo(i.WaitingForInterConnectTimeout)):this.transitionTo(i.WaitingForTransport)}}).entry(()=>{i.setConnectTimer()}).entryPoint("DisconnectTransport",function(){return i._hosts.reset({wasConnected:void 0,disconnected:!0}),i._connectFailEvent=A.DISCONNECTED,i._connectSuccessEvent=A.DISCONNECTED,this.transitionTo(i.DestroyingTransport)}).entryPoint("ReconnectTransport",function(){i._connectFailEvent=A.DOWN_ERROR,i._connectSuccessEvent=A.RECONNECTED_NOTICE;const e=0===i._sessionProperties._reconnectRetries;if(i._hosts.reset({wasConnected:!0,disconnected:e}),!e){const e=i._currentError||{},t=[e.eventText,e.responseCode,e.errorSubcode,void 0,e.eventReason];i.setPostEventAction(()=>{i.setConnectTimer(),i.emitSessionEvent(N.build(A.RECONNECTING_NOTICE,...t))})}return this.transitionTo(i.DestroyingTransport)}).initial(()=>(i.clearCurrentError(),i._connectFailEvent=A.CONNECT_FAILED_ERROR,i._connectSuccessEvent=A.UP_NOTICE,i._hosts.resolveHosts(e=>i._hosts?e?(i.setCurrentError({errorSubcode:p.UNRESOLVED_HOSTS,eventText:e}),i._hosts.reset({disconnected:!0}),this.processEvent(new D({name:P.EXCEPTION}))):(i._hosts.reset({wasConnected:!1}),i._currentHost=i._hosts.getNextHost(),this.processEvent(new D({name:P.DNS_RESOLUTION_COMPLETE}))):null),this.transitionTo(i.WaitingForDNS))).reaction(P.DNS_RESOLUTION_COMPLETE,function(){return this.transitionTo(i.WaitingForTransport)}).reaction(P.DISCONNECT,function(){return this.transitionToEntryPoint(i.SessionConnecting,"DisconnectTransport")}).reaction(P.CONNECT_TIMEOUT,function(){return i.setCurrentError({errorSubcode:p.TIMEOUT,eventText:"Connect timeout"}),this.transitionTo(i.DestroyingTransport)}).reaction(P.SEND_ERROR,function(e){return h(`SEND_ERROR reached SessionConnecting. ${e}`),i.setCurrentError(e),this.transitionTo(i.DestroyingTransport)}).reaction(P.EXCEPTION,function(e){return i.setCurrentError(e),this.transitionTo(i.DestroyingTransport)}).reaction(P.TRANSPORT_DESTROYED,function(e){return i.setCurrentError(e),h("TRANSPORT_DESTROYED event"),this.transitionTo(i.DestroyingTransport)}).exit(()=>{i.clearConnectTimer(),i._connectWaitTimer&&(clearTimeout(i._connectWaitTimer),i._connectWaitTimer=null)}).exitPoint("ConnectedExit",()=>(i.setPostEventAction(()=>{if(i.emitSessionEvent(N.build(i._connectSuccessEvent,`'${i._hosts.currentHostToString()}'`,200,0,null,null)),i._userBackpressured){const e=N.build(A.CAN_ACCEPT_DATA,"",null,0,null,"");i.emitSessionEvent(e),i._userBackpressured=!1}}),i.clearCurrentError(),this.transitionTo(i.SessionTransportUp))).exitPoint("ErrorExit",function(){return i.setPostEventAction(()=>{const e=i._currentError||{},t=[e.eventText,e.responseCode,e.errorSubcode,void 0,e.eventReason];i.emitSessionEvent(N.build(i._connectFailEvent,...t))}),this.transitionTo(i.SessionDisconnected)}),this.WaitingForDNS=new S({name:y.WAITING_FOR_DNS,parentContext:i.SessionConnecting}),this.DestroyingTransport=new S({name:y.DESTROYING_TRANSPORT,parentContext:i.SessionConnecting}).entry(()=>{h("Connecting, disposing transport"),i.clearConnectTimer(),i.destroyTransportSession("Disconnecting session",0)}).reaction(P.TRANSPORT_DESTROYED,function(e){return i.setCurrentError(e),i.SessionConnecting.handleTransportDestroyed.call(this)}),this.WaitingForInterConnectTimeout=new S({name:y.WAITING_FOR_INTERCONNECT_TIMEOUT,parentContext:i.SessionConnecting}).reaction(P.CONNECT_WAIT_TIMEOUT,function(){return this.transitionTo(i.WaitingForTransport)}),this.WaitingForTransport=new S({name:y.WAITING_FOR_TRANSPORT,parentContext:i.SessionConnecting}).initial(()=>{const e="Cannot establish transport session: creation failed";i.setConnectTimer(),i.clearCurrentError();try{i.initTransport()}catch(t){return this.setCurrentError({eventText:t.message===e?e:`${e}: ${t.message}`,errorSubcode:t.subcode||p.INTERNAL_ERROR,eventReason:t}),i.SessionConnecting.handleTransportDestroyed.call(this)}return this.transitionTo(i.WaitingForTransportUp)}),this.WaitingForTransportUp=new S({name:y.WAITING_FOR_TRANSPORT_UP,parentContext:this.WaitingForTransport}).entry(()=>{this._justEntered=!0}).initial(()=>{if(!this._justEntered)return this;this._justEntered=!1;const e="Cannot establish transport session: connection failed";try{const t=i._transport.connect();if(t!==a.TransportReturnCode.OK)throw new E(e,p.CONNECTION_ERROR,a.TransportReturnCode.describe(t));h(`Attempting to connect session '${i.sessionId}' to ${i._hosts.currentHostToString()}`)}catch(t){return this.setCurrentError({eventText:t.message===e?e:`${e}: ${t.message}`,errorSubcode:t.subcode||p.INTERNAL_ERROR,eventReason:t}),i.SessionConnecting.handleTransportDestroyed.call(this)}return this}).reaction(P.SEND_ERROR,function(e){return h(`SEND_ERROR while waiting for transport up, doing nothing. ${e}`),this.internalTransition(null)}).reaction(P.TRANSPORT_UP,function(e){i.sessionId=e.sessionId||"";if(i.sendClientCtrlLogin()===a.TransportReturnCode.OK)return this.transitionTo(i.WaitingForLogin);const t={eventText:"Failed to send Client Control Login",errorSubcode:p.LOGIN_FAILURE,responseCode:400};return i.setCurrentError(t),this.transitionTo(i.DestroyingTransport)}),this.WaitingForLogin=new S({name:y.WAITING_FOR_LOGIN,parentContext:i.SessionConnecting}).entry(()=>{i.setClientCtrlTimer()}).reaction(P.TRANSPORT_PROTOCOL_CLIENTCTRL,function(e){const t=e.smfMsg,s=t.getResponse(),n=s.responseCode,r={responseCode:n};if(i._responseCode=n,200===n)if(i.checkNoLocal(t)){if(i.checkCompressedSsl(t))return i.updateReadonlySessionProps(t),this.transitionTo(i.WaitForTransportChange);Object.assign(r,{eventText:"Compressed TLS is not supported by the Solace Message Router",errorSubcode:p.COMPRESSED_TLS_NOT_SUPPORTED})}else Object.assign(r,{eventText:"No Local is not supported by the Solace Message Router",errorSubcode:p.NO_LOCAL_NOT_SUPPORTED});else{const e=_.getErrorSubcode(n,s.responseString),t=e===p.UNKNOWN_ERROR?p.LOGIN_FAILURE:e;h(`Login failed. Subcode: ${t} respCode: ${n} respString: ${s.responseString}`),Object.assign(r,{eventText:s.responseString,errorSubcode:t})}return i.setCurrentError(r),this.transitionTo(i.DestroyingTransport)}).reaction(P.DOWNGRADE_TIMEOUT,function(){return i._transport.requestDowngrade&&!1!==i._transport.requestDowngrade("ClientCtrl timeout",p.TIMEOUT)?this.transitionTo(i.WaitingForTransportUp):(i.setCurrentError({eventText:"ClientCtrl timeout",errorSubcode:p.TIMEOUT}),this.transitionTo(i.DestroyingTransport))}).exit(()=>{i.clearClientCtrlTimer()}),this.WaitForTransportChange=new S({name:y.WAITING_FOR_TRANSPORT_CHANGE,parentContext:i.SessionConnecting}).initial(function(){const e=i.updateTransportCompression(function(e){this._transport=e,this.processEvent(new D({name:P.TRANSPORT_CHANGE_DONE}))}.bind(i));return null===e?this:(i._transport=e,this.transitionTo(i.ReapplyingSubscriptions))}).reaction(P.TRANSPORT_CHANGE_DONE,function(){return this.transitionTo(i.ReapplyingSubscriptions)}),this.ReapplyingSubscriptions=new S({name:y.REAPPLYING_SUBSCRIPTIONS,parentContext:i.SessionConnecting}).entry(()=>{h("ReapplyingSubscriptions: entry"),i.copySubscriptionCacheKeys()}).initial(function(){return!0===i.reapplySubscriptions()?this.transitionTo(i.WaitForSubConfirm):this.transitionTo(i.WaitForCanAcceptData)}).reaction(P.SUBSCRIBE_TIMEOUT,function(){const e=p.TIMEOUT;return i.setCurrentError({eventText:"Subscription timeout while reapplying",errorSubcode:e}),this.transitionTo(i.DestroyingTransport)}).exit(function(){return i.clearSubscriptionCacheKeys(),this}),this.WaitForSubConfirm=new S({name:y.WAITING_FOR_SUBCONFIRM,parentContext:i.ReapplyingSubscriptions}).reaction(P.TRANSPORT_PROTOCOL_SMP,function(e){const t=e.smfMsg.smfHeader,s=G(e.smfMsg.encodedUtf8Subscription),n=t.pm_respcode,r=t.pm_respstr;if(200!==n){const e=_.getErrorSubcode(n,r);return h(`Waiting for subscription confirmation, got ${n} (${e}) '${r}' on subscription ${s}`),i.setCurrentError({eventText:r,responseCode:n,errorSubcode:e}),this.transitionTo(i.DestroyTransport)}return i._session.canConnectPublisher&&i._defaultPublisher&&i._defaultPublisher.isBindWaiting()?this.transitionTo(i.WaitingForMessagePublisher):this.transitionToExitPoint(i.SessionConnecting,"ConnectedExit")}),this.WaitForCanAcceptData=new S({name:y.WAITING_FOR_CAN_ACCEPT_DATA,parentContext:i.ReapplyingSubscriptions}).reaction(P.TRANSPORT_PROTOCOL_SMP,function(e){const t=e.smfMsg.smfHeader,s=G(e.smfMsg.encodedUtf8Subscription),n=t.pm_respcode,r=t.pm_respstr;if(200!==n){const e=_.getErrorSubcode(n,r);return i.setCurrentError({eventText:r,responseCode:n,errorSubcode:e}),this.transitionTo(i.DestroyingTransport)}return h(`Unexpected 200 OK response to subscription add for ${s}`),this.internalTransition(null)}).reaction(P.TRANSPORT_CAN_ACCEPT_DATA,function(){return!0===i.reapplySubscriptions()?this.transitionTo(i.WaitForSubConfirm):this.internalTransition(null)}),this.WaitingForMessagePublisher=new S({name:y.WAITING_FOR_PUBFLOW,parentContext:i.SessionConnecting}).entry(()=>{i._defaultPublisher.connect(),i.sendPublisherSessionUpEvent(i._defaultPublisher)}).reaction(P.FLOW_UP,function(){return i._defaultPublisher.isBindWaiting()?this.internalTransition(null):this.transitionToExitPoint(i.SessionConnecting,"ConnectedExit")}).reaction(P.FLOW_FAILED,function(e){return i.setCurrentError({eventText:`Guaranteed Message Publisher Failed: ${e.eventText}`,errorSubcode:p.LOGIN_FAILURE}),this.transitionTo(i.DestroyingTransport)}),this.SessionTransportUp=new S({name:y.TRANSPORT_UP,parentContext:i}).entry(function(){return i.clearConnectTimer(),this}).initial(function(){return i._session.canConnectConsumer&&(i._consumers.flows.forEach(e=>i.sendConsumerSessionUpEvent(e)),i._consumers.reconnectingFlows.forEach(e=>i.sendConsumerSessionUpEvent(e))),this.transitionTo(i.FullyConnected)}).reaction(P.DISCONNECT,function(){return this.transitionTo(i.SessionDisconnecting)}).reaction(P.EXCEPTION,function(e){return i.setCurrentError(e),i.cleanupSession(),this.transitionToEntryPoint(i.SessionConnecting,"ReconnectTransport")}).reaction(P.SEND_ERROR,function(e){return i.setCurrentError(e),i.cleanupSession(),this.transitionToEntryPoint(i.SessionConnecting,"ReconnectTransport")}).reaction(P.TRANSPORT_DESTROYED,function(e){return i.setCurrentError(e),h("Received unsolicited TRANSPORT_DESTROYED event while transport is up"),i.cleanupSession(),this.transitionToEntryPoint(i.SessionConnecting,"ReconnectTransport")}).reaction(P.TRANSPORT_PROTOCOL_SMP,function(e){const t=e.smfMsg.smfHeader,s=G(e.smfMsg.encodedUtf8Subscription),n=t.pm_respcode,r=t.pm_respstr;return i.handleSubscriptionUpdateError(n,r,s,void 0,!1),this.internalTransition(null)}).reaction(P.TRANSPORT_CAN_ACCEPT_DATA,function(e){const t=N.build(A.CAN_ACCEPT_DATA,"",null,0,null,e.toString());return i.emitSessionEvent(t),i._userBackpressured=!1,this.internalTransition(null)}).reaction(P.CREATE_SUBSCRIBER,function(e){const t=i._consumers.add(e.guaranteedFlowObject);return i.sendConsumerSessionUpEvent(t),this}).exit(function(){return i.clearKeepAlive(),this}),this.FullyConnected=new S({name:y.FULLY_CONNECTED,parentContext:i.SessionTransportUp}).entry(()=>{i._connectFailEvent=A.DOWN_ERROR,i.scheduleKeepAlive()}),this.SessionDisconnected=new S({name:y.DISCONNECTED,parentContext:i}).reaction(P.DISCONNECT,function(){return i.setPostEventAction(()=>{i.emitSessionEvent(N.build(A.DISCONNECTED))}),this.internalTransition(null)}).reaction(P.CONNECT,function(){return this.transitionTo(i.SessionConnecting)}).reaction(P.EXCEPTION,function(){return this.internalTransition(null)}),this.SessionDisconnecting=new S({name:y.DISCONNECTING,parentContext:i}).initial(()=>(h(`Disconnecting session ${i}`),this.transitionTo(i.DisconnectingFlows))).reaction(P.DISCONNECT,function(){return this.internalTransition(null)}).reaction(P.EXCEPTION,function(e){return i.setCurrentError({errEvent:e}),i.cleanupSession(),this.transitionToEntryPoint(i.SessionConnecting,"DisconnectTransport")}).reaction(P.TRANSPORT_DESTROYED,function(){return h("Received unsolicited TRANSPORT_DESTROYED while disconnecting transport"),i.cleanupSession(),this.transitionToEntryPoint(i.SessionConnecting,"DisconnectTransport")}),this.DisconnectingFlows=new S({name:y.DISCONNECTING_FLOWS,parentContext:i.SessionDisconnecting},{gatherPendingFlows(){const{MessageConsumerEventName:e}=n;c(!this.isGathering),this.isGathering=!0;const t=(e,t,s)=>{if(c(e,"Trying to listen to undefined flow"),this.known.has(e))return;this.known.add(e),this.pending.add(e);const n=()=>{s.forEach(t=>e._removeListener(t,n)),this.pending.delete(e),this.isGathering||this.checkPendingFlows()};s.forEach(s=>t.call(e,s,n));try{e._disconnectSession()}catch(e){n()}};i._consumers&&i._consumers.flows.forEach(s=>{t(s,s._once,[e.DOWN,e.DOWN_ERROR])}),this.isGathering=!1},checkPendingFlows(){this.pending,0===this.pending.size&&(this.gatherPendingFlows(),0===this.pending.size&&this.proceed())},proceed(){this.known=null,this.pending=null,h("All flows disconnected"),i.processEvent(new T({name:P.FLOWS_DISCONNECTED}))}}).entry(function(){this.known=new Set,this.pending=new Set,this.checkPendingFlows()}).reaction(P.FLOWS_DISCONNECTED,function(){return this.transitionTo(i.FlushingTransport)}),this.FlushingTransport=new S({name:y.FLUSHING_TRANSPORT,parentContext:i.SessionDisconnecting},{flushTransport(){i.cleanupSession(),i.flushTransportSession(()=>this.onTransportFlushed()),this.sessionId=null},onTransportFlushed(){i.processEvent(new T({name:P.TRANSPORT_FLUSHED}))}}).entry(function(){h("Flushing transport"),this.flushTransport()}).reaction(P.TRANSPORT_FLUSHED,function(){return h("Handle Transport Flushed"),this.transitionToEntryPoint(i.SessionConnecting,"DisconnectTransport")})}addToSubscriptionCache(e){if(u.nothing(e)||!this._subscriptionCache)return;const{LOG_DEBUG:t}=this.logger,s=e.name;null===this._subscriptionCache[s]||void 0===this._subscriptionCache[s]?(this._subscriptionCache[s]=e,this._subscriptionCacheCount++):this._subscriptionCache[s]=e}cancelOutstandingCorrelatedReq(e){if(u.nothing(e)||!this._correlatedReqs)return null;const t=this._correlatedReqs[e];if(null==t)return null;const{LOG_DEBUG:s,LOG_ERROR:n}=this.logger;t.timer&&(clearTimeout(t.timer),t.timer=null);try{delete this._correlatedReqs[e]||n(`Cannot delete ctrl request ${e}`)}catch(t){n(`Cannot delete ctrl request ${e}`,t)}return t}cleanupSession(){const{LOG_INFO:e}=this.logger;e("Clean up session");const{ConsumerFSMEvent:t,ConsumerFSMEventNames:s}=n;this._correlatedReqs&&Object.keys(this._correlatedReqs).forEach(e=>this.cancelOutstandingCorrelatedReq(e)),this.clearConnectTimer(),this.clearClientCtrlTimer(),this.clearKeepAlive(),this._consumers.flows.forEach(e=>{e.processFSMEvent(new t({name:s.SESSION_DOWN}))}),this._consumers.reconnectingFlows.forEach(e=>{e.processFSMEvent(new t({name:s.SESSION_DOWN}))}),this._defaultPublisher&&this._defaultPublisher.processFSMEvent(new r.PublisherFSMEvent({name:r.PublisherFSMEventNames.SESSION_DOWN})),this._session.cleanupSession()}clearClientCtrlTimer(){this._clientCtrlTimer&&(clearTimeout(this._clientCtrlTimer),this._clientCtrlTimer=null)}clearConnectTimer(){this._connectTimer&&(clearTimeout(this._connectTimer),this._connectTimer=void 0)}clearKeepAlive(){const{LOG_INFO:e}=this.logger;this._keepAliveTimer&&(e("Cancel keepalive timer"),clearInterval(this._keepAliveTimer),this._keepAliveTimer=null),this.resetKeepAliveCounter()}checkNoLocal(e){let t=!0;if(!0===this._sessionProperties.noLocal){const s=e.getRouterCapabilities();t=!!s&&("boolean"==typeof s[l.NO_LOCAL]&&s[l.NO_LOCAL])}return t}checkCompressedSsl(e){const{LOG_TRACE:t}=th