montana/Russian/Site/messenger/dist/7604.d67d11e9e1fc5a6a5372.js
2026-05-18 18:05:32 +03:00

2 lines
18 KiB
JavaScript

(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[7604],{7692(e,r,t){"use strict";t.d(r,{Ay:()=>g,gj:()=>p});var n=new Uint8Array(256),i=new Uint8Array(256),a=new Uint32Array(256),o=new Uint32Array(256),s=new Uint32Array(256),u=new Uint32Array(256),h=new Uint32Array(256),c=new Uint32Array(256),f=new Uint32Array(256),l=new Uint32Array(256);function v(e,r){return e.charCodeAt(r)<<24^e.charCodeAt(r+1)<<16^e.charCodeAt(r+2)<<8^e.charCodeAt(r+3)}function w(e){if(e instanceof Uint32Array)return e;if("string"==typeof e){if(e.length%4!=0)for(var r=e.length%4;r<=4;r++)e+="\0x00";var t=new Uint32Array(e.length/4);for(r=0;r<e.length;r+=4)t[r/4]=v(e,r);return t}if(e instanceof Uint8Array){for(t=new Uint32Array(e.length/4),r=0;r<e.length;r+=4)t[r/4]=e[r]<<24^e[r+1]<<16^e[r+2]<<8^e[r+3];return t}throw new Error("Unable to create 32-bit words")}function y(e,r,t){void 0===t&&(t=e);for(var n=0;n<e.length;n++)t[n]=e[n]^r[n]}!function(){for(var e,r,t,v,w,y=new Uint8Array(256),d=new Uint8Array(256),p=0,g=0,m=0;m<256;m++)y[m]=m<<1^283*(m>>7),d[y[m]^m]=m;for(;!n[p];p^=e||1)t=(t=g^g<<1^g<<2^g<<3^g<<4)>>8^255&t^99,n[p]=t,i[t]=p,w=16843009*y[r=y[e=y[p]]]^65537*r^257*e^16843008*p,v=257*y[t]^16843008*t,a[p]=v=v<<24^v>>>8,o[p]=v=v<<24^v>>>8,s[p]=v=v<<24^v>>>8,u[p]=v=v<<24^v>>>8,h[t]=w=w<<24^w>>>8,c[t]=w=w<<24^w>>>8,f[t]=w=w<<24^w>>>8,l[t]=w=w<<24^w>>>8,g=d[g]||1}();var d=function(){function e(e){var r=w(e);if(4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key size");this.encKey=new Uint32Array(4*r.length+28),this.decKey=new Uint32Array(4*r.length+28),this.encKey.set(r);for(var t,i=1,a=r.length;a<4*r.length+28;a++)t=this.encKey[a-1],(a%r.length===0||8===r.length&&a%r.length===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r.length===0&&(t=t<<8^t>>>24^i<<24,i=i<<1^283*(i>>7))),this.encKey[a]=this.encKey[a-r.length]^t;for(var o=0;a;o++,a--)t=this.encKey[3&o?a:a-4],this.decKey[o]=a<=4||o<4?t:h[n[t>>>24]]^c[n[t>>16&255]]^f[n[t>>8&255]]^l[n[255&t]]}return e.prototype.encrypt=function(e){for(var r,t,i,h=w(e),c=new Uint32Array(4),f=h[0]^this.encKey[0],l=h[1]^this.encKey[1],v=h[2]^this.encKey[2],y=h[3]^this.encKey[3],d=this.encKey.length/4-2,p=4,g=0;g<d;g++)r=a[f>>>24]^o[l>>16&255]^s[v>>8&255]^u[255&y]^this.encKey[p],t=a[l>>>24]^o[v>>16&255]^s[y>>8&255]^u[255&f]^this.encKey[p+1],i=a[v>>>24]^o[y>>16&255]^s[f>>8&255]^u[255&l]^this.encKey[p+2],y=a[y>>>24]^o[f>>16&255]^s[l>>8&255]^u[255&v]^this.encKey[p+3],f=r,l=t,v=i,p+=4;for(g=0;g<4;g++)c[g]=n[f>>>24]<<24^n[l>>16&255]<<16^n[v>>8&255]<<8^n[255&y]^this.encKey[p++],r=f,f=l,l=v,v=y,y=r;return c},e.prototype.decrypt=function(e){for(var r,t,n,a=w(e),o=new Uint32Array(4),s=a[0]^this.decKey[0],u=a[3]^this.decKey[1],v=a[2]^this.decKey[2],y=a[1]^this.decKey[3],d=this.decKey.length/4-2,p=4,g=0;g<d;g++)r=h[s>>>24]^c[u>>16&255]^f[v>>8&255]^l[255&y]^this.decKey[p],t=h[u>>>24]^c[v>>16&255]^f[y>>8&255]^l[255&s]^this.decKey[p+1],n=h[v>>>24]^c[y>>16&255]^f[s>>8&255]^l[255&u]^this.decKey[p+2],y=h[y>>>24]^c[s>>16&255]^f[u>>8&255]^l[255&v]^this.decKey[p+3],s=r,u=t,v=n,p+=4;for(g=0;g<4;g++)o[3&-g]=i[s>>>24]<<24^i[u>>16&255]<<16^i[v>>8&255]<<8^i[255&y]^this.decKey[p++],r=s,s=u,u=v,v=y,y=r;return o},e}(),p=function(){function e(e,r,t){void 0===t&&(t=16),this.key=w(e),this.iv=w(r),this.cipher=new d(e),this.blockSize=t/4}return e.prototype.encrypt=function(e,r){for(var t=w(e),n=r||new Uint32Array(t.length),i=this.iv.subarray(this.blockSize,this.iv.length),a=this.iv.subarray(0,this.blockSize),o=new Uint32Array(this.blockSize),s=0;s<t.length;s+=this.blockSize){var u=t.subarray(s,s+this.blockSize);y(u,a,o);var h=this.cipher.encrypt(o);y(h,i),i=u,a=h;for(var c=s,f=0;c<t.length&&f<4;c++,f++)n[c]=h[f]}return n},e.prototype.decrypt=function(e,r){for(var t=w(e),n=r||new Uint32Array(t.length),i=this.iv.subarray(this.blockSize,this.iv.length),a=this.iv.subarray(0,this.blockSize),o=new Uint32Array(this.blockSize),s=0;s<n.length;s+=this.blockSize){var u=t.subarray(s,s+this.blockSize);y(u,i,o);var h=this.cipher.decrypt(o);y(h,a),a=u,i=h;for(var c=s,f=0;c<n.length&&f<4;c++,f++)n[c]=h[f]}return n},e}();!function(){function e(e,r,t){if(void 0===t&&(t=16),this.offset=0,this.key=w(e),this.counter=w(r),this.cipher=new d(e),this.blockSize=t/4,4!==this.counter.length)throw new Error("AES-CTR mode counter must be 16 bytes length")}e.prototype.encrypt=function(e,r){for(var t=w(e),n=r||new Uint32Array(t.length),i=this.offset,a=0;a<t.length;a+=this.blockSize){for(var o=this.cipher.encrypt(this.counter),s=a,u=i;s<t.length&&u<this.blockSize;s++,u++)n[s]=o[u]^t[s];t.length-a>=this.blockSize&&this.incrementCounter(),i&&(a-=i,i=0)}return this.offset=(this.offset+t.length%4)%4,n},e.prototype.decrypt=function(e,r){return this.encrypt(e,r)},e.prototype.incrementCounter=function(){for(var e=this.counter.length-1;e>=0&&!(++this.counter[e]<4294967295);e--);}}();const g=d},69861(e,r,t){"use strict";t.d(r,{Wt:()=>X,u3:()=>O});var n=Uint8Array,i=Uint16Array,a=Int32Array,o=new n([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]),s=new n([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 n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=function(e,r){for(var t=new i(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];var o=new a(t[30]);for(n=1;n<30;++n)for(var s=t[n];s<t[n+1];++s)o[s]=s-t[n]<<5|n;return{b:t,r:o}},c=h(o,2),f=c.b,l=c.r;f[28]=258,l[258]=28;for(var v=h(s,0),w=v.b,y=v.r,d=new i(32768),p=0;p<32768;++p){var g=(43690&p)>>1|(21845&p)<<1;g=(61680&(g=(52428&g)>>2|(13107&g)<<2))>>4|(3855&g)<<4,d[p]=((65280&g)>>8|(255&g)<<8)>>1}var m=function(e,r,t){for(var n=e.length,a=0,o=new i(r);a<n;++a)e[a]&&++o[e[a]-1];var s,u=new i(r);for(a=1;a<r;++a)u[a]=u[a-1]+o[a-1]<<1;if(t){s=new i(1<<r);var h=15-r;for(a=0;a<n;++a)if(e[a])for(var c=a<<4|e[a],f=r-e[a],l=u[e[a]-1]++<<f,v=l|(1<<f)-1;l<=v;++l)s[d[l]>>h]=c}else for(s=new i(n),a=0;a<n;++a)e[a]&&(s[a]=d[u[e[a]-1]++]>>15-e[a]);return s},b=new n(288);for(p=0;p<144;++p)b[p]=8;for(p=144;p<256;++p)b[p]=9;for(p=256;p<280;++p)b[p]=7;for(p=280;p<288;++p)b[p]=8;var _=new n(32);for(p=0;p<32;++p)_[p]=5;var k=m(b,9,0),A=m(b,9,1),U=m(_,5,0),E=m(_,5,1),K=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},M=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(7&r)&t},z=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(7&r)},S=function(e){return(e+7)/8|0},q=function(e,r,t){return(null==r||r<0)&&(r=0),(null==t||t>e.length)&&(t=e.length),new n(e.subarray(r,t))},x=["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"],T=function(e,r,t){var n=new Error(r||x[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,T),!t)throw n;return n},W=function(e,r,t){t<<=7&r;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8},C=function(e,r,t){t<<=7&r;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8,e[n+2]|=t>>16},I=function(e,r){for(var t=[],a=0;a<e.length;++a)e[a]&&t.push({s:a,f:e[a]});var o=t.length,s=t.slice();if(!o)return{t:N,l:0};if(1==o){var u=new n(t[0].s+1);return u[t[0].s]=1,{t:u,l:1}}t.sort(function(e,r){return e.f-r.f}),t.push({s:-1,f:25001});var h=t[0],c=t[1],f=0,l=1,v=2;for(t[0]={s:-1,f:h.f+c.f,l:h,r:c};l!=o-1;)h=t[t[f].f<t[v].f?f++:v++],c=t[f!=l&&t[f].f<t[v].f?f++:v++],t[l++]={s:-1,f:h.f+c.f,l:h,r:c};var w=s[0].s;for(a=1;a<o;++a)s[a].s>w&&(w=s[a].s);var y=new i(w+1),d=L(t[l-1],y,0);if(d>r){a=0;var p=0,g=d-r,m=1<<g;for(s.sort(function(e,r){return y[r.s]-y[e.s]||e.f-r.f});a<o;++a){var b=s[a].s;if(!(y[b]>r))break;p+=m-(1<<d-y[b]),y[b]=r}for(p>>=g;p>0;){var _=s[a].s;y[_]<r?p-=1<<r-y[_]++-1:++a}for(;a>=0&&p;--a){var k=s[a].s;y[k]==r&&(--y[k],++p)}d=r}return{t:new n(y),l:d}},L=function(e,r,t){return-1==e.s?Math.max(L(e.l,r,t+1),L(e.r,r,t+1)):r[e.s]=t},P=function(e){for(var r=e.length;r&&!e[--r];);for(var t=new i(++r),n=0,a=e[0],o=1,s=function(e){t[n++]=e},u=1;u<=r;++u)if(e[u]==a&&u!=r)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=e[u]}return{c:t.subarray(0,n),n:r}},j=function(e,r){for(var t=0,n=0;n<r.length;++n)t+=e[n]*r[n];return t},D=function(e,r,t){var n=t.length,i=S(r+2);e[i]=255&n,e[i+1]=n>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;a<n;++a)e[i+a+4]=t[a];return 8*(i+4+n)},F=function(e,r,t,n,a,h,c,f,l,v,w){W(r,w++,t),++a[256];for(var y=I(a,15),d=y.t,p=y.l,g=I(h,15),A=g.t,E=g.l,K=P(d),M=K.c,z=K.n,S=P(A),q=S.c,x=S.n,T=new i(19),L=0;L<M.length;++L)++T[31&M[L]];for(L=0;L<q.length;++L)++T[31&q[L]];for(var F=I(T,7),V=F.t,N=F.l,Q=19;Q>4&&!V[u[Q-1]];--Q);var R,$,O,X,B=v+5<<3,G=j(a,b)+j(h,_)+c,H=j(a,d)+j(h,A)+c+14+3*Q+j(T,V)+2*T[16]+3*T[17]+7*T[18];if(l>=0&&B<=G&&B<=H)return D(r,w,e.subarray(l,l+v));if(W(r,w,1+(H<G)),w+=2,H<G){R=m(d,p,0),$=d,O=m(A,E,0),X=A;var J=m(V,N,0);for(W(r,w,z-257),W(r,w+5,x-1),W(r,w+10,Q-4),w+=14,L=0;L<Q;++L)W(r,w+3*L,V[u[L]]);w+=3*Q;for(var Y=[M,q],Z=0;Z<2;++Z){var ee=Y[Z];for(L=0;L<ee.length;++L){var re=31&ee[L];W(r,w,J[re]),w+=V[re],re>15&&(W(r,w,ee[L]>>5&127),w+=ee[L]>>12)}}}else R=k,$=b,O=U,X=_;for(L=0;L<f;++L){var te=n[L];if(te>255){C(r,w,R[257+(re=te>>18&31)]),w+=$[re+257],re>7&&(W(r,w,te>>23&31),w+=o[re]);var ne=31&te;C(r,w,O[ne]),w+=X[ne],ne>3&&(C(r,w,te>>5&8191),w+=s[ne])}else C(r,w,R[te]),w+=$[te]}return C(r,w,R[256]),w+$[256]},V=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),N=new n(0),Q=function(){for(var e=new Int32Array(256),r=0;r<256;++r){for(var t=r,n=9;--n;)t=(1&t&&-306674912)^t>>>1;e[r]=t}return e}(),R=function(e,r,t,u,h){if(!h&&(h={l:1},r.dictionary)){var c=r.dictionary.subarray(-32768),f=new n(c.length+e.length);f.set(c),f.set(e,c.length),e=f,h.w=c.length}return function(e,r,t,u,h,c){var f=c.z||e.length,v=new n(u+f+5*(1+Math.ceil(f/7e3))+h),w=v.subarray(u,v.length-h),d=c.l,p=7&(c.r||0);if(r){p&&(w[0]=c.r>>3);for(var g=V[r-1],m=g>>13,b=8191&g,_=(1<<t)-1,k=c.p||new i(32768),A=c.h||new i(_+1),U=Math.ceil(t/3),E=2*U,K=function(r){return(e[r]^e[r+1]<<U^e[r+2]<<E)&_},M=new a(25e3),z=new i(288),x=new i(32),T=0,W=0,C=c.i||0,I=0,L=c.w||0,P=0;C+2<f;++C){var j=K(C),N=32767&C,Q=A[j];if(k[N]=Q,A[j]=N,L<=C){var R=f-C;if((T>7e3||I>24576)&&(R>423||!d)){p=F(e,w,0,M,z,x,W,I,P,C-P,p),I=T=W=0,P=C;for(var $=0;$<286;++$)z[$]=0;for($=0;$<30;++$)x[$]=0}var O=2,X=0,B=b,G=N-Q&32767;if(R>2&&j==K(C-G))for(var H=Math.min(m,R)-1,J=Math.min(32767,C),Y=Math.min(258,R);G<=J&&--B&&N!=Q;){if(e[C+O]==e[C+O-G]){for(var Z=0;Z<Y&&e[C+Z]==e[C+Z-G];++Z);if(Z>O){if(O=Z,X=G,Z>H)break;var ee=Math.min(G,Z-2),re=0;for($=0;$<ee;++$){var te=C-G+$&32767,ne=te-k[te]&32767;ne>re&&(re=ne,Q=te)}}}G+=(N=Q)-(Q=k[N])&32767}if(X){M[I++]=268435456|l[O]<<18|y[X];var ie=31&l[O],ae=31&y[X];W+=o[ie]+s[ae],++z[257+ie],++x[ae],L=C+O,++T}else M[I++]=e[C],++z[e[C]]}}for(C=Math.max(C,L);C<f;++C)M[I++]=e[C],++z[e[C]];p=F(e,w,d,M,z,x,W,I,P,C-P,p),d||(c.r=7&p|w[p/8|0]<<3,p-=7,c.h=A,c.p=k,c.i=C,c.w=L)}else{for(C=c.w||0;C<f+d;C+=65535){var oe=C+65535;oe>=f&&(w[p/8|0]=d,oe=f),p=D(w,p+1,e.subarray(C,oe))}c.i=f}return q(v,0,u+S(p)+h)}(e,null==r.level?6:r.level,null==r.mem?h.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+r.mem,t,u,h)},$=function(e,r,t){for(;t;++r)e[r]=t,t>>>=8};function O(e,r){r||(r={});var t=function(){var e=-1;return{p:function(r){for(var t=e,n=0;n<r.length;++n)t=Q[255&t^r[n]]^t>>>8;e=t},d:function(){return~e}}}(),n=e.length;t.p(e);var i,a=R(e,r,10+((i=r).filename?i.filename.length+1:0),8),o=a.length;return function(e,r){var t=r.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=r.level<2?4:9==r.level?2:0,e[9]=3,0!=r.mtime&&$(e,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),t){e[3]=8;for(var n=0;n<=t.length;++n)e[n+10]=t.charCodeAt(n)}}(a,r),$(a,o-8,t.d()),$(a,o-4,n),a}function X(e,r){var t,i,a=function(e){31==e[0]&&139==e[1]&&8==e[2]||T(6,"invalid gzip data");var r=e[3],t=10;4&r&&(t+=2+(e[10]|e[11]<<8));for(var n=(r>>3&1)+(r>>4&1);n>0;n-=!e[t++]);return t+(2&r)}(e);return a+8>e.length&&T(6,"invalid gzip data"),function(e,r,t,i){var a=e.length,h=i?i.length:0;if(!a||r.f&&!r.l)return t||new n(0);var c=!t,l=c||2!=r.i,v=r.i;c&&(t=new n(3*a));var y=function(e){var r=t.length;if(e>r){var i=new n(Math.max(2*r,e));i.set(t),t=i}},d=r.f||0,p=r.p||0,g=r.b||0,b=r.l,_=r.d,k=r.m,U=r.n,x=8*a;do{if(!b){d=M(e,p,1);var W=M(e,p+1,3);if(p+=3,!W){var C=e[($=S(p)+4)-4]|e[$-3]<<8,I=$+C;if(I>a){v&&T(0);break}l&&y(g+C),t.set(e.subarray($,I),g),r.b=g+=C,r.p=p=8*I,r.f=d;continue}if(1==W)b=A,_=E,k=9,U=5;else if(2==W){var L=M(e,p,31)+257,P=M(e,p+10,15)+4,j=L+M(e,p+5,31)+1;p+=14;for(var D=new n(j),F=new n(19),V=0;V<P;++V)F[u[V]]=M(e,p+3*V,7);p+=3*P;var N=K(F),Q=(1<<N)-1,R=m(F,N,1);for(V=0;V<j;){var $,O=R[M(e,p,Q)];if(p+=15&O,($=O>>4)<16)D[V++]=$;else{var X=0,B=0;for(16==$?(B=3+M(e,p,3),p+=2,X=D[V-1]):17==$?(B=3+M(e,p,7),p+=3):18==$&&(B=11+M(e,p,127),p+=7);B--;)D[V++]=X}}var G=D.subarray(0,L),H=D.subarray(L);k=K(G),U=K(H),b=m(G,k,1),_=m(H,U,1)}else T(1);if(p>x){v&&T(0);break}}l&&y(g+131072);for(var J=(1<<k)-1,Y=(1<<U)-1,Z=p;;Z=p){var ee=(X=b[z(e,p)&J])>>4;if((p+=15&X)>x){v&&T(0);break}if(X||T(2),ee<256)t[g++]=ee;else{if(256==ee){Z=p,b=null;break}var re=ee-254;if(ee>264){var te=o[V=ee-257];re=M(e,p,(1<<te)-1)+f[V],p+=te}var ne=_[z(e,p)&Y],ie=ne>>4;if(ne||T(3),p+=15&ne,H=w[ie],ie>3&&(te=s[ie],H+=z(e,p)&(1<<te)-1,p+=te),p>x){v&&T(0);break}l&&y(g+131072);var ae=g+re;if(g<H){var oe=h-H,se=Math.min(H,ae);for(oe+g<0&&T(3);g<se;++g)t[g]=i[oe+g]}for(;g<ae;++g)t[g]=t[g-H]}}r.l=b,r.p=Z,r.b=g,r.f=d,b&&(d=1,r.m=k,r.d=_,r.n=U)}while(!d);return g!=t.length&&c?q(t,0,g):t.subarray(0,g)}(e.subarray(a,-8),{i:2},r&&r.out||new n((i=(t=e).length,(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0)),r&&r.dictionary)}var B="undefined"!=typeof TextDecoder&&new TextDecoder;try{B.decode(N,{stream:!0})}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},51072(e,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n",r.homedir=function(){return"/"}},55962(e,r,t){"use strict";t.d(r,{isTauri:()=>n}),t(46510);function n(){return!!(globalThis||window).isTauri}new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap},46510(e,r,t){"use strict";function n(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function i(e,r,t,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!i:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,t):i?i.value=t:r.set(e,t),t}t.d(r,{G:()=>i,g:()=>n}),"function"==typeof SuppressedError&&SuppressedError},80129(e,r,t){"use strict";t.d(r,{eu:()=>o}),new Error("timeout while waiting for mutex to become available"),new Error("mutex already locked");const n=new Error("request for lock canceled");class i{constructor(e,r=n){this._value=e,this._cancelError=r,this._queue=[],this._weightedWaiters=[]}acquire(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{const i={resolve:t,reject:n,weight:e,priority:r},o=a(this._queue,e=>r<=e.priority);-1===o&&e<=this._value?this._dispatchItem(i):this._queue.splice(o+1,0,i)})}runExclusive(e){return r=this,t=arguments,i=function*(e,r=1,t=0){const[n,i]=yield this.acquire(r,t);try{return yield e(n)}finally{i()}},new((n=void 0)||(n=Promise))(function(e,a){function o(e){try{u(i.next(e))}catch(e){a(e)}}function s(e){try{u(i.throw(e))}catch(e){a(e)}}function u(r){var t;r.done?e(r.value):(t=r.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}u((i=i.apply(r,t||[])).next())});var r,t,n,i}waitForUnlock(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,r)?Promise.resolve():new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,r){const t=a(e,e=>r.priority<=e.priority);e.splice(t+1,0,r)}(this._weightedWaiters[e-1],{resolve:t,priority:r})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const r=this._value;this._value-=e.weight,e.resolve([r,this._newReleaser(e.weight)])}_newReleaser(e){let r=!1;return()=>{r||(r=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];r&&(r.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let r=this._value;r>0;r--){const t=this._weightedWaiters[r-1];if(!t)continue;const n=t.findIndex(r=>r.priority<=e);(-1===n?t:t.splice(0,n)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,r){return(0===this._queue.length||this._queue[0].priority<r)&&e<=this._value}}function a(e,r){for(let t=e.length-1;t>=0;t--)if(r(e[t]))return t;return-1}class o{constructor(e){this._semaphore=new i(1,e)}acquire(){return e=this,r=arguments,n=function*(e=0){const[,r]=yield this._semaphore.acquire(1,e);return r},new((t=void 0)||(t=Promise))(function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var r;e.done?i(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(o,s)}u((n=n.apply(e,r||[])).next())});var e,r,t,n}runExclusive(e,r=0){return this._semaphore.runExclusive(()=>e(),1,r)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}}}]);
//# sourceMappingURL=7604.d67d11e9e1fc5a6a5372.js.map