TelegramPWA/dist/4100.6ac7f74a7bb36b38fbf7.js
Alexander Zinchuk da98756af6 [Build]
2025-10-11 19:11:21 +02:00

3 lines
10 KiB
JavaScript

/*! For license information please see 4100.6ac7f74a7bb36b38fbf7.js.LICENSE.txt */
(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[4100],{251:(e,t)=>{t.read=function(e,t,r,i,n){var o,s,h=8*n-i-1,a=(1<<h)-1,c=a>>1,u=-7,l=r?n-1:0,f=r?-1:1,y=e[t+l];for(l+=f,o=y&(1<<-u)-1,y>>=-u,u+=h;u>0;o=256*o+e[t+l],l+=f,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+l],l+=f,u-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:1/0*(y?-1:1);s+=Math.pow(2,i),o-=c}return(y?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,r,i,n,o){var s,h,a,c=8*o-n-1,u=(1<<c)-1,l=u>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:o-1,w=i?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(h=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),(t+=s+l>=1?f/a:f*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=u?(h=0,s=u):s+l>=1?(h=(t*a-1)*Math.pow(2,n),s+=l):(h=t*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;e[r+y]=255&h,y+=w,h/=256,n-=8);for(s=s<<n|h,c+=n;c>0;e[r+y]=255&s,y+=w,s/=256,c-=8);e[r+y-w]|=128*p}},7692:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>g,gj:()=>v});var i=new Uint8Array(256),n=new Uint8Array(256),o=new Uint32Array(256),s=new Uint32Array(256),h=new Uint32Array(256),a=new Uint32Array(256),c=new Uint32Array(256),u=new Uint32Array(256),l=new Uint32Array(256),f=new Uint32Array(256);function y(e,t){return e.charCodeAt(t)<<24^e.charCodeAt(t+1)<<16^e.charCodeAt(t+2)<<8^e.charCodeAt(t+3)}function w(e){if(e instanceof Uint32Array)return e;if("string"==typeof e){if(e.length%4!=0)for(var t=e.length%4;t<=4;t++)e+="\0x00";var r=new Uint32Array(e.length/4);for(t=0;t<e.length;t+=4)r[t/4]=y(e,t);return r}if(e instanceof Uint8Array){for(r=new Uint32Array(e.length/4),t=0;t<e.length;t+=4)r[t/4]=e[t]<<24^e[t+1]<<16^e[t+2]<<8^e[t+3];return r}throw new Error("Unable to create 32-bit words")}function p(e,t,r){void 0===r&&(r=e);for(var i=0;i<e.length;i++)r[i]=e[i]^t[i]}!function(){for(var e,t,r,y,w,p=new Uint8Array(256),d=new Uint8Array(256),v=0,g=0,_=0;_<256;_++)p[_]=_<<1^283*(_>>7),d[p[_]^_]=_;for(;!i[v];v^=e||1)r=(r=g^g<<1^g<<2^g<<3^g<<4)>>8^255&r^99,i[v]=r,n[r]=v,w=16843009*p[t=p[e=p[v]]]^65537*t^257*e^16843008*v,y=257*p[r]^16843008*r,o[v]=y=y<<24^y>>>8,s[v]=y=y<<24^y>>>8,h[v]=y=y<<24^y>>>8,a[v]=y=y<<24^y>>>8,c[r]=w=w<<24^w>>>8,u[r]=w=w<<24^w>>>8,l[r]=w=w<<24^w>>>8,f[r]=w=w<<24^w>>>8,g=d[g]||1}();var d=function(){function e(e){var t=w(e);if(4!==t.length&&6!==t.length&&8!==t.length)throw new Error("Invalid key size");this.encKey=new Uint32Array(4*t.length+28),this.decKey=new Uint32Array(4*t.length+28),this.encKey.set(t);for(var r,n=1,o=t.length;o<4*t.length+28;o++)r=this.encKey[o-1],(o%t.length===0||8===t.length&&o%t.length===4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],o%t.length===0&&(r=r<<8^r>>>24^n<<24,n=n<<1^283*(n>>7))),this.encKey[o]=this.encKey[o-t.length]^r;for(var s=0;o;s++,o--)r=this.encKey[3&s?o:o-4],this.decKey[s]=o<=4||s<4?r:c[i[r>>>24]]^u[i[r>>16&255]]^l[i[r>>8&255]]^f[i[255&r]]}return e.prototype.encrypt=function(e){for(var t,r,n,c=w(e),u=new Uint32Array(4),l=c[0]^this.encKey[0],f=c[1]^this.encKey[1],y=c[2]^this.encKey[2],p=c[3]^this.encKey[3],d=this.encKey.length/4-2,v=4,g=0;g<d;g++)t=o[l>>>24]^s[f>>16&255]^h[y>>8&255]^a[255&p]^this.encKey[v],r=o[f>>>24]^s[y>>16&255]^h[p>>8&255]^a[255&l]^this.encKey[v+1],n=o[y>>>24]^s[p>>16&255]^h[l>>8&255]^a[255&f]^this.encKey[v+2],p=o[p>>>24]^s[l>>16&255]^h[f>>8&255]^a[255&y]^this.encKey[v+3],l=t,f=r,y=n,v+=4;for(g=0;g<4;g++)u[g]=i[l>>>24]<<24^i[f>>16&255]<<16^i[y>>8&255]<<8^i[255&p]^this.encKey[v++],t=l,l=f,f=y,y=p,p=t;return u},e.prototype.decrypt=function(e){for(var t,r,i,o=w(e),s=new Uint32Array(4),h=o[0]^this.decKey[0],a=o[3]^this.decKey[1],y=o[2]^this.decKey[2],p=o[1]^this.decKey[3],d=this.decKey.length/4-2,v=4,g=0;g<d;g++)t=c[h>>>24]^u[a>>16&255]^l[y>>8&255]^f[255&p]^this.decKey[v],r=c[a>>>24]^u[y>>16&255]^l[p>>8&255]^f[255&h]^this.decKey[v+1],i=c[y>>>24]^u[p>>16&255]^l[h>>8&255]^f[255&a]^this.decKey[v+2],p=c[p>>>24]^u[h>>16&255]^l[a>>8&255]^f[255&y]^this.decKey[v+3],h=t,a=r,y=i,v+=4;for(g=0;g<4;g++)s[3&-g]=n[h>>>24]<<24^n[a>>16&255]<<16^n[y>>8&255]<<8^n[255&p]^this.decKey[v++],t=h,h=a,a=y,y=p,p=t;return s},e}(),v=function(){function e(e,t,r){void 0===r&&(r=16),this.key=w(e),this.iv=w(t),this.cipher=new d(e),this.blockSize=r/4}return e.prototype.encrypt=function(e,t){for(var r=w(e),i=t||new Uint32Array(r.length),n=this.iv.subarray(this.blockSize,this.iv.length),o=this.iv.subarray(0,this.blockSize),s=new Uint32Array(this.blockSize),h=0;h<r.length;h+=this.blockSize){var a=r.subarray(h,h+this.blockSize);p(a,o,s);var c=this.cipher.encrypt(s);p(c,n),n=a,o=c;for(var u=h,l=0;u<r.length&&l<4;u++,l++)i[u]=c[l]}return i},e.prototype.decrypt=function(e,t){for(var r=w(e),i=t||new Uint32Array(r.length),n=this.iv.subarray(this.blockSize,this.iv.length),o=this.iv.subarray(0,this.blockSize),s=new Uint32Array(this.blockSize),h=0;h<i.length;h+=this.blockSize){var a=r.subarray(h,h+this.blockSize);p(a,n,s);var c=this.cipher.decrypt(s);p(c,o),o=a,n=c;for(var u=h,l=0;u<i.length&&l<4;u++,l++)i[u]=c[l]}return i},e}();!function(){function e(e,t,r){if(void 0===r&&(r=16),this.offset=0,this.key=w(e),this.counter=w(t),this.cipher=new d(e),this.blockSize=r/4,4!==this.counter.length)throw new Error("AES-CTR mode counter must be 16 bytes length")}e.prototype.encrypt=function(e,t){for(var r=w(e),i=t||new Uint32Array(r.length),n=this.offset,o=0;o<r.length;o+=this.blockSize){for(var s=this.cipher.encrypt(this.counter),h=o,a=n;h<r.length&&a<this.blockSize;h++,a++)i[h]=s[a]^r[h];r.length-o>=this.blockSize&&this.incrementCounter(),n&&(o-=n,n=0)}return this.offset=(this.offset+r.length%4)%4,i},e.prototype.decrypt=function(e,t){return this.encrypt(e,t)},e.prototype.incrementCounter=function(){for(var e=this.counter.length-1;e>=0&&!(++this.counter[e]<4294967295);e--);}}();const g=d},46510:(e,t,r)=>{"use strict";function i(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function n(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r}r.d(t,{G:()=>n,g:()=>i}),"function"==typeof SuppressedError&&SuppressedError},51072:(e,t)=>{t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},55962:(e,t,r)=>{"use strict";r.d(t,{isTauri:()=>i}),r(46510);function i(){return!!(globalThis||window).isTauri}new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap},80129:(e,t,r)=>{"use strict";r.d(t,{eu:()=>s}),new Error("timeout while waiting for mutex to become available"),new Error("mutex already locked");const i=new Error("request for lock canceled");class n{constructor(e,t=i){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((r,i)=>{const n={resolve:r,reject:i,weight:e,priority:t},s=o(this._queue,e=>t<=e.priority);-1===s&&e<=this._value?this._dispatchItem(n):this._queue.splice(s+1,0,n)})}runExclusive(e){return t=this,r=arguments,n=function*(e,t=1,r=0){const[i,n]=yield this.acquire(t,r);try{return yield e(i)}finally{n()}},new((i=void 0)||(i=Promise))(function(e,o){function s(e){try{a(n.next(e))}catch(e){o(e)}}function h(e){try{a(n.throw(e))}catch(e){o(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i(function(e){e(r)})).then(s,h)}a((n=n.apply(t,r||[])).next())});var t,r,i,n}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){const r=o(e,e=>t.priority<=e.priority);e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})})}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 t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];if(!r)continue;const i=r.findIndex(t=>t.priority<=e);(-1===i?r:r.splice(0,i)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function o(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}class s{constructor(e){this._semaphore=new n(1,e)}acquire(){return e=this,t=arguments,i=function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t},new((r=void 0)||(r=Promise))(function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function h(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,h)}a((i=i.apply(e,t||[])).next())});var e,t,r,i}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}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=4100.6ac7f74a7bb36b38fbf7.js.map