telegram.telepool.link
Open in
urlscan Pro
2606:4700:3033::ac43:c112
Public Scan
Submitted URL: http://telegram.telepool.link/mtproto.worker.a04c39423ada106790f8.chunk.js
Effective URL: https://telegram.telepool.link/mtproto.worker.a04c39423ada106790f8.chunk.js
Submission: On March 14 via api from US — Scanned from US
Effective URL: https://telegram.telepool.link/mtproto.worker.a04c39423ada106790f8.chunk.js
Submission: On March 14 via api from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
(()=>{"use strict";var e,t,a={410:(e,t,a)=>{a.d(t,{GO:()=>n,ZP:()=>i});const s=a(1267).Z.debug,n="undefined"!=typeof window?window:self,i=s},3447:(e,t,a)=>{a.d(t,{Z:()=>i});const s={14:{"1f6dd":4867,"1f6de":4916,"1f6df":4923,"1f7f0":62832,"1f979":183,"1f9cc":1557,"1fa7b":61332,"1fa7c":61330,"1faa9":51093,"1faaa":61364,"1faab":61189,"1faac":51085,"1fab7":2651,"1fab8":2631,"1fab9":2672,"1faba":2673,"1fac3":1520,"1fac4":1521,"1fac5":1505,"1fad7":3793,"1fad8":3707,"1fad9":3804,"1fae0":111,"1fae1":136,"1fae2":132,"1fae3":133,"1fae4":174,"1fae5":142,"1fae6":1385,"1fae7":61353,"1faf0":1341,"1faf1":1332,"1faf2":1333,"1faf3":1334,"1faf4":1335,"1faf5":1351,"1faf6":1360,"1faf1-1f3fb-200d-1faf2-1f3fc":0,"1faf1-1f3fb-200d-1faf2-1f3fd":0,"1faf1-1f3fb-200d-1faf2-1f3fe":0,"1faf1-1f3fb-200d-1faf2-1f3ff":0,"1faf1-1f3fc-200d-1faf2-1f3fb":0,"1faf1-1f3fc-200d-1faf2-1f3fd":0,"1faf1-1f3fc-200d-1faf2-1f3fe":0,"1faf1-1f3fc-200d-1faf2-1f3ff":0,"1faf1-1f3fd-200d-1faf2-1f3fb":0,"1faf1-1f3fd-200d-1faf2-1f3fc":0,"1faf1-1f3fd-200d-1faf2-1f3fe":0,"1faf1-1f3fd-200d-1faf2-1f3ff":0,"1faf1-1f3fe-200d-1faf2-1f3fb":0,"1faf1-1f3fe-200d-1faf2-1f3fc":0,"1faf1-1f3fe-200d-1faf2-1f3fd":0,"1faf1-1f3fe-200d-1faf2-1f3ff":0,"1faf1-1f3ff-200d-1faf2-1f3fb":0,"1faf1-1f3ff-200d-1faf2-1f3fc":0,"1faf1-1f3ff-200d-1faf2-1f3fd":0,"1faf1-1f3ff-200d-1faf2-1f3fe":0,"1fac3-1f3fb":0,"1fac3-1f3fc":0,"1fac3-1f3fd":0,"1fac3-1f3fe":0,"1fac3-1f3ff":0,"1fac4-1f3fb":0,"1fac4-1f3fc":0,"1fac4-1f3fd":0,"1fac4-1f3fe":0,"1fac4-1f3ff":0,"1fac5-1f3fb":0,"1fac5-1f3fc":0,"1fac5-1f3fd":0,"1fac5-1f3fe":0,"1fac5-1f3ff":0,"1faf0-1f3fb":0,"1faf0-1f3fc":0,"1faf0-1f3fd":0,"1faf0-1f3fe":0,"1faf0-1f3ff":0,"1faf1-1f3fb":0,"1faf1-1f3fc":0,"1faf1-1f3fd":0,"1faf1-1f3fe":0,"1faf1-1f3ff":0,"1faf2-1f3fb":0,"1faf2-1f3fc":0,"1faf2-1f3fd":0,"1faf2-1f3fe":0,"1faf2-1f3ff":0,"1faf3-1f3fb":0,"1faf3-1f3fc":0,"1faf3-1f3fd":0,"1faf3-1f3fe":0,"1faf3-1f3ff":0,"1faf4-1f3fb":0,"1faf4-1f3fc":0,"1faf4-1f3fd":0,"1faf4-1f3fe":0,"1faf4-1f3ff":0,"1faf5-1f3fb":0,"1faf5-1f3fc":0,"1faf5-1f3fd":0,"1faf5-1f3fe":0,"1faf5-1f3ff":0,"1faf6-1f3fb":0,"1faf6-1f3fc":0,"1faf6-1f3fd":0,"1faf6-1f3fe":0,"1faf6-1f3ff":0},"":{2049:62835,2122:62863,2139:62888,2194:62764,2195:62763,2196:62762,2197:62756,2198:62758,2199:62760,2328:61194,2600:4990,2601:4998,2602:41013,2603:41018,2604:41020,2611:62851,2614:41014,2615:3781,2618:2667,2620:1106,2622:62753,2623:62754,2626:62783,2638:62780,2639:177,2648:62788,2649:62789,2650:62796,2651:62797,2652:62798,2653:62799,2660:51095,2663:51098,2665:51096,2666:51097,2668:4865,2692:61297,2693:4922,2694:61300,2696:61311,2697:61319,2699:61309,2702:61284,2705:62850,2708:4931,2709:61245,2712:61259,2714:62852,2716:62828,2721:62779,2728:51029,2733:62858,2734:62859,2744:41017,2747:62860,2753:62836,2754:62837,2755:62838,2757:62839,2763:1137,2764:1141,2795:62829,2796:62830,2797:62831,2934:62767,2935:62768,3030:62840,3297:62912,3299:62913,"0023-20e3":62864,"002a-20e3":62865,"0030-20e3":62866,"0031-20e3":62867,"0032-20e3":62868,"0033-20e3":62869,"0034-20e3":62870,"0035-20e3":62871,"0036-20e3":62872,"0037-20e3":62873,"0038-20e3":62874,"0039-20e3":62875,"00a9":62861,"00ae":62862,"1f004":51101,"1f0cf":51100,"1f170":62882,"1f171":62884,"1f17e":62893,"1f17f":62895,"1f18e":62883,"1f191":62885,"1f192":62886,"1f193":62887,"1f194":62889,"1f195":62891,"1f196":62892,"1f197":62894,"1f198":62896,"1f199":62897,"1f19a":62898,"1f1e6-1f1e8":71594,"1f1e6-1f1e9":71595,"1f1e6-1f1ea":71596,"1f1e6-1f1eb":71597,"1f1e6-1f1ec":71598,"1f1e6-1f1ee":71599,"1f1e6-1f1f1":71600,"1f1e6-1f1f2":71601,"1f1e6-1f1f4":71602,"1f1e6-1f1f6":71603,"1f1e6-1f1f7":71604,"1f1e6-1f1f8":71605,"1f1e6-1f1f9":71606,"1f1e6-1f1fa":71607,"1f1e6-1f1fc":71608,"1f1e6-1f1fd":71609,"1f1e6-1f1ff":71610,"1f1e7-1f1e6":71611,"1f1e7-1f1e7":71612,"1f1e7-1f1e9":71613,"1f1e7-1f1ea":71614,"1f1e7-1f1eb":71615,"1f1e7-1f1ec":71616,"1f1e7-1f1ed":71617,"1f1e7-1f1ee":71618,"1f1e7-1f1ef":71619,"1f1e7-1f1f1":71620,"1f1e7-1f1f2":71621,"1f1e7-1f1f3":71622,"1f1e7-1f1f4":71623,"1f1e7-1f1f6":71624,"1f1e7-1f1f7":71625,"1f1e7-1f1f8":71626,"1f1e7-1f1f9":71627,"1f1e7-1f1fb":71628,"1f1e7-1f1fc":71629,"1f1e7-1f1fe":71630,"1f1e7-1f1ff":71631,"1f1e8-1f1e6":71632,"1f1e8-1f1e8":71633,"1f1e8-1f1e9":71634,"1f1e8-1f1eb":71635,"1f1e8-1f1ec":71636,"1f1e8-1f1ed":71637,"1f1e8-1f1ee":71638,"1f1e8-1f1f0":71639,"1f1e8-1f1f1":71640,"1f1e8-1f1f2":71641,"1f1e8-1f1f3":71642,"1f1e8-1f1f4":71643,"1f1e8-1f1f5":71644,"1f1e8-1f1f7":71645,"1f1e8-1f1fa":71646,"1f1e8-1f1fb":71647,"1f1e8-1f1fc":71648,"1f1e8-1f1fd":71649,"1f1e8-1f1fe":71650,"1f1e8-1f1ff":71651,"1f1e9-1f1ea":71652,"1f1e9-1f1ec":71653,"1f1e9-1f1ef":71654,"1f1e9-1f1f0":71655,"1f1e9-1f1f2":71656,"1f1e9-1f1f4":71657,"1f1e9-1f1ff":71658,"1f1ea-1f1e6":71659,"1f1ea-1f1e8":71660,"1f1ea-1f1ea":71661,"1f1ea-1f1ec":71662,"1f1ea-1f1ed":71663,"1f1ea-1f1f7":71664,"1f1ea-1f1f8":71665,"1f1ea-1f1f9":71666,"1f1ea-1f1fa":71667,"1f1eb-1f1ee":71668,"1f1eb-1f1ef":71669,"1f1eb-1f1f0":71670,"1f1eb-1f1f2":71671,"1f1eb-1f1f4":71672,"1f1eb-1f1f7":71673,"1f1ec-1f1e6":71674,"1f1ec-1f1e7":71675,"1f1ec-1f1e9":71676,"1f1ec-1f1ea":71677,"1f1ec-1f1eb":71678,"1f1ec-1f1ec":71679,"1f1ec-1f1ed":71680,"1f1ec-1f1ee":71681,"1f1ec-1f1f1":71682,"1f1ec-1f1f2":71683,"1f1ec-1f1f3":71684,"1f1ec-1f1f5":71685,"1f1ec-1f1f6":71686,"1f1ec-1f1f7":71687,"1f1ec-1f1f8":71688,"1f1ec-1f1f9":71689,"1f1ec-1f1fa":71690,"1f1ec-1f1fc":71691,"1f1ec-1f1fe":71692,"1f1ed-1f1f0":71693,"1f1ed-1f1f2":71694,"1f1ed-1f1f3":71695,"1f1ed-1f1f7":71696,"1f1ed-1f1f9":71697,"1f1ed-1f1fa":71698,"1f1ee-1f1e8":71699,"1f1ee-1f1e9":71700,"1f1ee-1f1ea":71701,"1f1ee-1f1f1":71702,"1f1ee-1f1f2":71703,"1f1ee-1f1f3":71704,"1f1ee-1f1f4":71705,"1f1ee-1f1f6":71706,"1f1ee-1f1f7":71707,"1f1ee-1f1f8":71708,"1f1ee-1f1f9":71709,"1f1ef-1f1ea":71710,"1f1ef-1f1f2":71711,"1f1ef-1f1f4":71712,"1f1ef-1f1f5":71713,"1f1f0-1f1ea":71714,"1f1f0-1f1ec":71715,"1f1f0-1f1ed":71716,"1f1f0-1f1ee":71717,"1f1f0-1f1f2":71718,"1f1f0-1f1f3":71719,"1f1f0-1f1f5":71720,"1f1f0-1f1f7":71721,"1f1f0-1f1fc":71722,"1f1f0-1f1fe":71723,"1f1f0-1f1ff":71724,"1f1f1-1f1e6":71725,"1f1f1-1f1e7":71726,"1f1f1-1f1e8":71727,"1f1f1-1f1ee":71728,"1f1f1-1f1f0":71729,"1f1f1-1f1f7":71730,"1f1f1-1f1f8":71731,"1f1f1-1f1f9":71732,"1f1f1-1f1fa":71733,"1f1f1-1f1fb":71734,"1f1f1-1f1fe":71735,"1f1f2-1f1e6":71736,"1f1f2-1f1e8":71737,"1f1f2-1f1e9":71738,"1f1f2-1f1ea":71739,"1f1f2-1f1eb":71740,"1f1f2-1f1ec":71741,"1f1f2-1f1ed":71742,"1f1f2-1f1f0":71743,"1f1f2-1f1f1":71744,"1f1f2-1f1f2":71745,"1f1f2-1f1f3":71746,"1f1f2-1f1f4":71747,"1f1f2-1f1f5":71748,"1f1f2-1f1f6":71749,"1f1f2-1f1f7":71750,"1f1f2-1f1f8":71751,"1f1f2-1f1f9":71752,"1f1f2-1f1fa":71753,"1f1f2-1f1fb":71754,"1f1f2-1f1fc":71755,"1f1f2-1f1fd":71756,"1f1f2-1f1fe":71757,"1f1f2-1f1ff":71758,"1f1f3-1f1e6":71759,"1f1f3-1f1e8":71760,"1f1f3-1f1ea":71761,"1f1f3-1f1eb":71762,"1f1f3-1f1ec":71763,"1f1f3-1f1ee":71764,"1f1f3-1f1f1":71765,"1f1f3-1f1f4":71766,"1f1f3-1f1f5":71767,"1f1f3-1f1f7":71768,"1f1f3-1f1fa":71769,"1f1f3-1f1ff":71770,"1f1f4-1f1f2":71771,"1f1f5-1f1e6":71772,"1f1f5-1f1ea":71773,"1f1f5-1f1eb":71774,"1f1f5-1f1ec":71775,"1f1f5-1f1ed":71776,"1f1f5-1f1f0":71777,"1f1f5-1f1f1":71778,"1f1f5-1f1f2":71779,"1f1f5-1f1f3":71780,"1f1f5-1f1f7":71781,"1f1f5-1f1f8":71782,"1f1f5-1f1f9":71783,"1f1f5-1f1fc":71784,"1f1f5-1f1fe":71785,"1f1f6-1f1e6":71786,"1f1f7-1f1ea":71787,"1f1f7-1f1f4":71788,"1f1f7-1f1f8":71789,"1f1f7-1f1fa":71790,"1f1f7-1f1fc":71791,"1f1f8-1f1e6":71792,"1f1f8-1f1e7":71793,"1f1f8-1f1e8":71794,"1f1f8-1f1e9":71795,"1f1f8-1f1ea":71796,"1f1f8-1f1ec":71797,"1f1f8-1f1ed":71798,"1f1f8-1f1ee":71799,"1f1f8-1f1ef":71800,"1f1f8-1f1f0":71801,"1f1f8-1f1f1":71802,"1f1f8-1f1f2":71803,"1f1f8-1f1f3":71804,"1f1f8-1f1f4":71805,"1f1f8-1f1f7":71806,"1f1f8-1f1f8":71807,"1f1f8-1f1f9":71808,"1f1f8-1f1fb":71809,"1f1f8-1f1fd":71810,"1f1f8-1f1fe":71811,"1f1f8-1f1ff":71812,"1f1f9-1f1e6":71813,"1f1f9-1f1e8":71814,"1f1f9-1f1e9":71815,"1f1f9-1f1eb":71816,"1f1f9-1f1ec":71817,"1f1f9-1f1ed":71818,"1f1f9-1f1ef":71819,"1f1f9-1f1f0":71820,"1f1f9-1f1f1":71821,"1f1f9-1f1f2":71822,"1f1f9-1f1f3":71823,"1f1f9-1f1f4":71824,"1f1f9-1f1f7":71825,"1f1f9-1f1f9":71826,"1f1f9-1f1fb":71827,"1f1f9-1f1fc":71828,"1f1f9-1f1ff":71829,"1f1fa-1f1e6":71830,"1f1fa-1f1ec":71831,"1f1fa-1f1f2":71832,"1f1fa-1f1f3":71833,"1f1fa-1f1f8":71834,"1f1fa-1f1fe":71835,"1f1fa-1f1ff":71836,"1f1fb-1f1e6":71837,"1f1fb-1f1e8":71838,"1f1fb-1f1ea":71839,"1f1fb-1f1ec":71840,"1f1fb-1f1ee":71841,"1f1fb-1f1f3":71842,"1f1fb-1f1fa":71843,"1f1fc-1f1eb":71844,"1f1fc-1f1f8":71845,"1f1fd-1f1f0":71846,"1f1fe-1f1ea":71847,"1f1fe-1f1f9":71848,"1f1ff-1f1e6":71849,"1f1ff-1f1f2":71850,"1f1ff-1f1fc":71851,"1f201":62899,"1f202":62900,"1f21a":62906,"1f22f":62903,"1f232":62907,"1f233":62911,"1f234":62910,"1f235":62915,"1f236":62902,"1f237":62901,"1f238":62909,"1f239":62905,"1f23a":62914,"1f250":62904,"1f251":62908,"1f300":41010,"1f301":4857,"1f302":41012,"1f303":4858,"1f304":4860,"1f305":4861,"1f306":4862,"1f307":4863,"1f308":41011,"1f309":4864,"1f30a":41023,"1f30b":4815,"1f30c":4997,"1f30d":4806,"1f30e":4807,"1f30f":4808,"1f310":4809,"1f311":4977,"1f312":4978,"1f313":4979,"1f314":4980,"1f315":4981,"1f316":4982,"1f317":4983,"1f318":4984,"1f319":4985,"1f31a":4986,"1f31b":4987,"1f31c":4988,"1f31d":4991,"1f31e":4992,"1f31f":4995,"1f320":4996,"1f321":4989,"1f324":41001,"1f325":41002,"1f326":41003,"1f327":41004,"1f328":41005,"1f329":41006,"1f32a":41007,"1f32b":41008,"1f32c":41009,"1f32d":3725,"1f32e":3727,"1f32f":3728,"1f330":3708,"1f331":2659,"1f332":2661,"1f333":2662,"1f334":2663,"1f335":2664,"1f336":3698,"1f337":2658,"1f338":2649,"1f339":2653,"1f33a":2655,"1f33b":2656,"1f33c":2657,"1f33d":3697,"1f33e":2665,"1f33f":2666,"1f340":2668,"1f341":2669,"1f342":2670,"1f343":2671,"1f344":3705,"1f345":3690,"1f346":3694,"1f347":3674,"1f348":3675,"1f349":3676,"1f34a":3677,"1f34b":3678,"1f34c":3679,"1f34d":3680,"1f34e":3682,"1f34f":3683,"1f350":3684,"1f351":3685,"1f352":3686,"1f353":3687,"1f354":3722,"1f355":3724,"1f356":3718,"1f357":3719,"1f358":3744,"1f359":3745,"1f35a":3746,"1f35b":3747,"1f35c":3748,"1f35d":3749,"1f35e":3709,"1f35f":3723,"1f360":3750,"1f361":3756,"1f362":3751,"1f363":3752,"1f364":3753,"1f365":3754,"1f366":3765,"1f367":3766,"1f368":3767,"1f369":3768,"1f36a":3769,"1f36b":3774,"1f36c":3775,"1f36d":3776,"1f36e":3777,"1f36f":3778,"1f370":3771,"1f371":3743,"1f372":3735,"1f373":3733,"1f374":3801,"1f375":3783,"1f376":3784,"1f377":3786,"1f378":3787,"1f379":3788,"1f37a":3789,"1f37b":3790,"1f37c":3779,"1f37d":3800,"1f37e":3785,"1f37f":3739,"1f380":51040,"1f381":51041,"1f382":3770,"1f383":51024,"1f384":51025,"1f385":1527,"1f386":51026,"1f387":51027,"1f388":51030,"1f389":51031,"1f38a":51032,"1f38b":51033,"1f38c":71588,"1f38d":51034,"1f38e":51035,"1f38f":51036,"1f390":51037,"1f391":51038,"1f392":61134,"1f393":61147,"1f396":51045,"1f397":51042,"1f399":61167,"1f39a":61168,"1f39b":61169,"1f39e":61203,"1f39f":51043,"1f3a0":4866,"1f3a1":4868,"1f3a2":4869,"1f3a3":51072,"1f3a4":61170,"1f3a5":61202,"1f3a6":62819,"1f3a7":61171,"1f3a8":51105,"1f3a9":61146,"1f3aa":4871,"1f3ab":51044,"1f3ac":61205,"1f3ad":51103,"1f3ae":51086,"1f3af":51078,"1f3b0":51088,"1f3b1":51081,"1f3b2":51089,"1f3b3":51060,"1f3b4":51102,"1f3b5":61165,"1f3b6":61166,"1f3b7":61173,"1f3b8":61175,"1f3b9":61176,"1f3ba":61177,"1f3bb":61178,"1f3bc":61164,"1f3bd":51074,"1f3be":51058,"1f3bf":51075,"1f3c0":51054,"1f3c1":71586,"1f3c2":1600,"1f3c3-200d-2640":1584,"1f3c3-200d-2642":1583,"1f3c3":1582,"1f3c4-200d-2640":1606,"1f3c4-200d-2642":1605,"1f3c4":1604,"1f3c5":51047,"1f3c6":51046,"1f3c7":1598,"1f3c8":51056,"1f3c9":51057,"1f3ca-200d-2640":1612,"1f3ca-200d-2642":1611,"1f3ca":1610,"1f3cb-200d-2640":1618,"1f3cb-200d-2642":1617,"1f3cb":1616,"1f3cc-200d-2640":1603,"1f3cc-200d-2642":1602,"1f3cc":1601,"1f3cd":4902,"1f3ce":4901,"1f3cf":51061,"1f3d0":51055,"1f3d1":51062,"1f3d2":51063,"1f3d3":51065,"1f3d4":4813,"1f3d5":4817,"1f3d6":4818,"1f3d7":4824,"1f3d8":4829,"1f3d9":4859,"1f3da":4830,"1f3db":4823,"1f3dc":4819,"1f3dd":4820,"1f3de":4821,"1f3df":4822,"1f3e0":4831,"1f3e1":4832,"1f3e2":4833,"1f3e3":4834,"1f3e4":4835,"1f3e5":4836,"1f3e6":4837,"1f3e7":62729,"1f3e8":4838,"1f3e9":4839,"1f3ea":4840,"1f3eb":4841,"1f3ec":4842,"1f3ed":4843,"1f3ee":61216,"1f3ef":4844,"1f3f0":4845,"1f3f3-200d-1f308":71591,"1f3f3-200d-26a7":71592,"1f3f3":71590,"1f3f4-200d-2620":71593,"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f":71852,"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f":71853,"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f":71854,"1f3f4":71589,"1f3f5":2652,"1f3f7":61234,"1f3f8":51066,"1f3f9":61303,"1f3fa":3805,"1f3fb":9525,"1f3fc":9526,"1f3fd":9527,"1f3fe":9528,"1f3ff":9529,"1f400":2576,"1f401":2575,"1f402":2556,"1f403":2557,"1f404":2558,"1f405":2547,"1f406":2548,"1f407":2579,"1f408-200d-2b1b":2544,"1f408":2543,"1f409":2618,"1f40a":2613,"1f40b":2622,"1f40c":2632,"1f40d":2616,"1f40e":2550,"1f40f":2563,"1f410":2565,"1f411":2564,"1f412":2531,"1f413":2596,"1f414":2595,"1f415-200d-1f9ba":2537,"1f415":2535,"1f416":2560,"1f417":2561,"1f418":2570,"1f419":2629,"1f41a":2630,"1f41b":2634,"1f41c":2635,"1f41d":2636,"1f41e":2638,"1f41f":2625,"1f420":2626,"1f421":2627,"1f422":2614,"1f423":2597,"1f424":2598,"1f425":2599,"1f426":2600,"1f427":2601,"1f428":2586,"1f429":2538,"1f42a":2566,"1f42b":2567,"1f42c":2623,"1f42d":2574,"1f42e":2555,"1f42f":2546,"1f430":2578,"1f431":2542,"1f432":2617,"1f433":2621,"1f434":2549,"1f435":2530,"1f436":2534,"1f437":2559,"1f438":2612,"1f439":2577,"1f43a":2539,"1f43b-200d-2744":2585,"1f43b":2584,"1f43c":2587,"1f43d":2562,"1f43e":2593,"1f43f":2580,"1f440":1381,"1f441-200d-1f5e8":1159,"1f441":1382,"1f442":1373,"1f443":1375,"1f444":1384,"1f445":1383,"1f446":1347,"1f447":1349,"1f448":1345,"1f449":1346,"1f44a":1355,"1f44b":1327,"1f44c":1336,"1f44d":1352,"1f44e":1353,"1f44f":1358,"1f450":1361,"1f451":61144,"1f452":61145,"1f453":61110,"1f454":61115,"1f455":61116,"1f456":61117,"1f457":61122,"1f458":61123,"1f459":61128,"1f45a":61129,"1f45b":61130,"1f45c":61131,"1f45d":61132,"1f45e":61136,"1f45f":61137,"1f460":61140,"1f461":61141,"1f462":61143,"1f463":1687,"1f464":1684,"1f465":1685,"1f466":1388,"1f467":1389,"1f468-200d-1f33e":1457,"1f468-200d-1f373":1460,"1f468-200d-1f37c":1524,"1f468-200d-1f393":1448,"1f468-200d-1f3a4":1478,"1f468-200d-1f3a8":1481,"1f468-200d-1f3eb":1451,"1f468-200d-1f3ed":1466,"1f468-200d-1f466-200d-1f466":1674,"1f468-200d-1f466":1673,"1f468-200d-1f467-200d-1f466":1676,"1f468-200d-1f467-200d-1f467":1677,"1f468-200d-1f467":1675,"1f468-200d-1f468-200d-1f466":1663,"1f468-200d-1f468-200d-1f466-200d-1f466":1666,"1f468-200d-1f468-200d-1f467":1664,"1f468-200d-1f468-200d-1f467-200d-1f466":1665,"1f468-200d-1f468-200d-1f467-200d-1f467":1667,"1f468-200d-1f469-200d-1f466":1658,"1f468-200d-1f469-200d-1f466-200d-1f466":1661,"1f468-200d-1f469-200d-1f467":1659,"1f468-200d-1f469-200d-1f467-200d-1f466":1660,"1f468-200d-1f469-200d-1f467-200d-1f467":1662,"1f468-200d-1f4bb":1475,"1f468-200d-1f4bc":1469,"1f468-200d-1f527":1463,"1f468-200d-1f52c":1472,"1f468-200d-1f680":1487,"1f468-200d-1f692":1490,"1f468-200d-1f9af":1574,"1f468-200d-1f9b0":1396,"1f468-200d-1f9b1":1397,"1f468-200d-1f9b2":1399,"1f468-200d-1f9b3":1398,"1f468-200d-1f9bc":1577,"1f468-200d-1f9bd":1580,"1f468-200d-2695":1445,"1f468-200d-2696":1454,"1f468-200d-2708":1484,"1f468-200d-2764-200d-1f468":1655,"1f468-200d-2764-200d-1f48b-200d-1f468":1651,"1f468":1392,"1f469-200d-1f33e":1458,"1f469-200d-1f373":1461,"1f469-200d-1f37c":1523,"1f469-200d-1f393":1449,"1f469-200d-1f3a4":1479,"1f469-200d-1f3a8":1482,"1f469-200d-1f3eb":1452,"1f469-200d-1f3ed":1467,"1f469-200d-1f466-200d-1f466":1679,"1f469-200d-1f466":1678,"1f469-200d-1f467-200d-1f466":1681,"1f469-200d-1f467-200d-1f467":1682,"1f469-200d-1f467":1680,"1f469-200d-1f469-200d-1f466":1668,"1f469-200d-1f469-200d-1f466-200d-1f466":1671,"1f469-200d-1f469-200d-1f467":1669,"1f469-200d-1f469-200d-1f467-200d-1f466":1670,"1f469-200d-1f469-200d-1f467-200d-1f467":1672,"1f469-200d-1f4bb":1476,"1f469-200d-1f4bc":1470,"1f469-200d-1f527":1464,"1f469-200d-1f52c":1473,"1f469-200d-1f680":1488,"1f469-200d-1f692":1491,"1f469-200d-1f9af":1575,"1f469-200d-1f9b0":1401,"1f469-200d-1f9b1":1403,"1f469-200d-1f9b2":1407,"1f469-200d-1f9b3":1405,"1f469-200d-1f9bc":1578,"1f469-200d-1f9bd":1581,"1f469-200d-2695":1446,"1f469-200d-2696":1455,"1f469-200d-2708":1485,"1f469-200d-2764-200d-1f468":1654,"1f469-200d-2764-200d-1f469":1656,"1f469-200d-2764-200d-1f48b-200d-1f468":1650,"1f469-200d-2764-200d-1f48b-200d-1f469":1652,"1f469":1400,"1f46a":1657,"1f46b":1647,"1f46c":1648,"1f46d":1646,"1f46e-200d-2640":1494,"1f46e-200d-2642":1493,"1f46e":1492,"1f46f-200d-2640":1590,"1f46f-200d-2642":1589,"1f46f":1588,"1f470-200d-2640":1518,"1f470-200d-2642":1517,"1f470":1516,"1f471-200d-2640":1409,"1f471-200d-2642":1410,"1f471":1391,"1f472":1511,"1f473-200d-2640":1510,"1f473-200d-2642":1509,"1f473":1508,"1f474":1412,"1f475":1413,"1f476":1386,"1f477-200d-2640":1504,"1f477-200d-2642":1503,"1f477":1502,"1f478":1507,"1f479":1109,"1f47a":1110,"1f47b":1111,"1f47c":1526,"1f47d":1112,"1f47e":1113,"1f47f":1104,"1f480":1105,"1f481-200d-2640":1428,"1f481-200d-2642":1427,"1f481":1426,"1f482-200d-2640":1500,"1f482-200d-2642":1499,"1f482":1498,"1f483":1585,"1f484":61152,"1f485":1366,"1f486-200d-2640":1560,"1f486-200d-2642":1559,"1f486":1558,"1f487-200d-2640":1563,"1f487-200d-2642":1562,"1f487":1561,"1f488":4870,"1f489":61326,"1f48a":61328,"1f48b":1127,"1f48c":1128,"1f48d":61153,"1f48e":61154,"1f48f":1649,"1f490":2648,"1f491":1653,"1f492":4846,"1f493":1133,"1f494":1138,"1f495":1135,"1f496":1131,"1f497":1132,"1f498":1129,"1f499":1145,"1f49a":1144,"1f49b":1143,"1f49c":1146,"1f49d":1130,"1f49e":1134,"1f49f":1136,"1f4a0":62946,"1f4a1":61214,"1f4a2":1151,"1f4a3":1157,"1f4a4":1163,"1f4a5":1152,"1f4a6":1154,"1f4a7":41022,"1f4a8":1155,"1f4a9":1107,"1f4aa":1368,"1f4ab":1153,"1f4ac":1158,"1f4ad":1162,"1f4ae":2650,"1f4af":1150,"1f4b0":61235,"1f4b1":62841,"1f4b2":62842,"1f4b3":61242,"1f4b4":61237,"1f4b5":61238,"1f4b6":61239,"1f4b7":61240,"1f4b8":61241,"1f4b9":61244,"1f4ba":4936,"1f4bb":61191,"1f4bc":61265,"1f4bd":61197,"1f4be":61198,"1f4bf":61199,"1f4c0":61200,"1f4c1":61266,"1f4c2":61267,"1f4c3":61227,"1f4c4":61229,"1f4c5":61269,"1f4c6":61270,"1f4c7":61273,"1f4c8":61274,"1f4c9":61275,"1f4ca":61276,"1f4cb":61277,"1f4cc":61278,"1f4cd":61279,"1f4ce":61280,"1f4cf":61282,"1f4d0":61283,"1f4d1":61232,"1f4d2":61226,"1f4d3":61225,"1f4d4":61218,"1f4d5":61219,"1f4d6":61220,"1f4d7":61221,"1f4d8":61222,"1f4d9":61223,"1f4da":61224,"1f4db":62847,"1f4dc":61228,"1f4dd":61264,"1f4de":61185,"1f4df":61186,"1f4e0":61187,"1f4e1":61325,"1f4e2":61159,"1f4e3":61160,"1f4e4":61249,"1f4e5":61250,"1f4e6":61251,"1f4e7":61246,"1f4e8":61247,"1f4e9":61248,"1f4ea":61253,"1f4eb":61252,"1f4ec":61254,"1f4ed":61255,"1f4ee":61256,"1f4ef":61161,"1f4f0":61230,"1f4f1":61182,"1f4f2":61183,"1f4f3":62823,"1f4f4":62824,"1f4f5":62751,"1f4f6":62822,"1f4f7":61207,"1f4f8":61208,"1f4f9":61209,"1f4fa":61206,"1f4fb":61172,"1f4fc":61210,"1f4fd":61204,"1f4ff":61151,"1f500":62801,"1f501":62802,"1f502":62803,"1f503":62769,"1f504":62770,"1f505":62820,"1f506":62821,"1f507":61155,"1f508":61156,"1f509":61157,"1f50a":61158,"1f50b":61188,"1f50c":61190,"1f50d":61211,"1f50e":61212,"1f50f":61290,"1f510":61291,"1f511":61292,"1f512":61288,"1f513":61289,"1f514":61162,"1f515":61163,"1f516":61233,"1f517":61313,"1f518":62947,"1f519":62771,"1f51a":62772,"1f51b":62773,"1f51c":62774,"1f51d":62775,"1f51e":62752,"1f51f":62876,"1f520":62877,"1f521":62878,"1f522":62879,"1f523":62880,"1f524":62881,"1f525":41021,"1f526":61215,"1f527":61306,"1f528":61294,"1f529":61308,"1f52a":3803,"1f52b":61301,"1f52c":61323,"1f52d":61324,"1f52e":51082,"1f52f":62787,"1f530":62848,"1f531":62846,"1f532":62949,"1f533":62948,"1f534":62916,"1f535":62920,"1f536":62940,"1f537":62941,"1f538":62942,"1f539":62943,"1f53a":62944,"1f53b":62945,"1f53c":62811,"1f53d":62813,"1f549":62778,"1f54a":2602,"1f54b":4854,"1f54c":4850,"1f54d":4852,"1f54e":62786,"1f550":4955,"1f551":4957,"1f552":4959,"1f553":4961,"1f554":4963,"1f555":4965,"1f556":4967,"1f557":4969,"1f558":4971,"1f559":4973,"1f55a":4975,"1f55b":4953,"1f55c":4956,"1f55d":4958,"1f55e":4960,"1f55f":4962,"1f560":4964,"1f561":4966,"1f562":4968,"1f563":4970,"1f564":4972,"1f565":4974,"1f566":4976,"1f567":4954,"1f56f":61213,"1f570":4952,"1f573":1156,"1f574":1587,"1f575-200d-2640":1497,"1f575-200d-2642":1496,"1f575":1495,"1f576":61111,"1f577":2641,"1f578":2642,"1f579":51087,"1f57a":1586,"1f587":61281,"1f58a":61261,"1f58b":61260,"1f58c":61262,"1f58d":61263,"1f590":1329,"1f595":1348,"1f596":1331,"1f5a4":1148,"1f5a5":61192,"1f5a8":61193,"1f5b1":61195,"1f5b2":61196,"1f5bc":51104,"1f5c2":61268,"1f5c3":61285,"1f5c4":61286,"1f5d1":61287,"1f5d2":61271,"1f5d3":61272,"1f5dc":61310,"1f5dd":61293,"1f5de":61231,"1f5e1":61299,"1f5e3":1683,"1f5e8":1160,"1f5ef":1161,"1f5f3":61257,"1f5fa":4810,"1f5fb":4816,"1f5fc":4847,"1f5fd":4848,"1f5fe":4811,"1f5ff":61362,"1f600":11,"1f601":14,"1f602":18,"1f603":12,"1f604":13,"1f605":16,"1f606":15,"1f607":114,"1f608":1103,"1f609":112,"1f60a":113,"1f60b":124,"1f60c":150,"1f60d":116,"1f60e":170,"1f60f":144,"1f610":139,"1f611":140,"1f612":145,"1f613":195,"1f614":151,"1f615":173,"1f616":192,"1f617":119,"1f618":118,"1f619":122,"1f61a":121,"1f61b":125,"1f61c":126,"1f61d":128,"1f61e":194,"1f61f":175,"1f620":1101,"1f621":1100,"1f622":189,"1f623":193,"1f624":199,"1f625":188,"1f626":184,"1f627":185,"1f628":186,"1f629":196,"1f62a":152,"1f62b":197,"1f62c":147,"1f62d":190,"1f62e-200d-1f4a8":148,"1f62e":178,"1f62f":179,"1f630":187,"1f631":191,"1f632":180,"1f633":181,"1f634":154,"1f635-200d-1f4ab":165,"1f635":164,"1f636-200d-1f32b":143,"1f636":141,"1f637":155,"1f638":1116,"1f639":1117,"1f63a":1115,"1f63b":1118,"1f63c":1119,"1f63d":1120,"1f63e":1123,"1f63f":1122,"1f640":1121,"1f641":176,"1f642":19,"1f643":110,"1f644":146,"1f645-200d-2640":1422,"1f645-200d-2642":1421,"1f645":1420,"1f646-200d-2640":1425,"1f646-200d-2642":1424,"1f646":1423,"1f647-200d-2640":1437,"1f647-200d-2642":1436,"1f647":1435,"1f648":1124,"1f649":1125,"1f64a":1126,"1f64b-200d-2640":1431,"1f64b-200d-2642":1430,"1f64b":1429,"1f64c":1359,"1f64d-200d-2640":1416,"1f64d-200d-2642":1415,"1f64d":1414,"1f64e-200d-2640":1419,"1f64e-200d-2642":1418,"1f64e":1417,"1f64f":1364,"1f680":4942,"1f681":4937,"1f682":4872,"1f683":4873,"1f684":4874,"1f685":4875,"1f686":4876,"1f687":4877,"1f688":4878,"1f689":4879,"1f68a":4880,"1f68b":4883,"1f68c":4884,"1f68d":4885,"1f68e":4886,"1f68f":4911,"1f690":4887,"1f691":4888,"1f692":4889,"1f693":4890,"1f694":4891,"1f695":4892,"1f696":4893,"1f697":4894,"1f698":4895,"1f699":4896,"1f69a":4898,"1f69b":4899,"1f69c":4900,"1f69d":4881,"1f69e":4882,"1f69f":4938,"1f6a0":4939,"1f6a1":4940,"1f6a2":4930,"1f6a3-200d-2640":1609,"1f6a3-200d-2642":1608,"1f6a3":1607,"1f6a4":4926,"1f6a5":4918,"1f6a6":4919,"1f6a7":4921,"1f6a8":4917,"1f6a9":71587,"1f6aa":61333,"1f6ab":62745,"1f6ac":61358,"1f6ad":62747,"1f6ae":62730,"1f6af":62748,"1f6b0":62731,"1f6b1":62749,"1f6b2":4907,"1f6b3":62746,"1f6b4-200d-2640":1621,"1f6b4-200d-2642":1620,"1f6b4":1619,"1f6b5-200d-2640":1624,"1f6b5-200d-2642":1623,"1f6b5":1622,"1f6b6-200d-2640":1566,"1f6b6-200d-2642":1565,"1f6b6":1564,"1f6b7":62750,"1f6b8":62743,"1f6b9":62733,"1f6ba":62734,"1f6bb":62735,"1f6bc":62736,"1f6bd":61340,"1f6be":62737,"1f6bf":61342,"1f6c0":1643,"1f6c1":61343,"1f6c2":62738,"1f6c3":62739,"1f6c4":62740,"1f6c5":62741,"1f6cb":61338,"1f6cc":1644,"1f6cd":61133,"1f6ce":4944,"1f6cf":61337,"1f6d0":62776,"1f6d1":4920,"1f6d2":61357,"1f6d5":4851,"1f6d6":4828,"1f6d7":61334,"1f6e0":61298,"1f6e1":61304,"1f6e2":4914,"1f6e3":4912,"1f6e4":4913,"1f6e5":4929,"1f6e9":4932,"1f6eb":4933,"1f6ec":4934,"1f6f0":4941,"1f6f3":4927,"1f6f4":4908,"1f6f5":4903,"1f6f6":4925,"1f6f7":51076,"1f6f8":4943,"1f6f9":4909,"1f6fa":4906,"1f6fb":4897,"1f6fc":4910,"1f7e0":62917,"1f7e1":62918,"1f7e2":62919,"1f7e3":62921,"1f7e4":62922,"1f7e5":62925,"1f7e6":62929,"1f7e7":62926,"1f7e8":62927,"1f7e9":62928,"1f7ea":62930,"1f7eb":62931,"1f90c":1337,"1f90d":1149,"1f90e":1147,"1f90f":1338,"1f910":137,"1f911":129,"1f912":156,"1f913":171,"1f914":135,"1f915":157,"1f916":1114,"1f917":130,"1f918":1343,"1f919":1344,"1f91a":1328,"1f91b":1356,"1f91c":1357,"1f91d":1363,"1f91e":1340,"1f91f":1342,"1f920":167,"1f921":1108,"1f922":158,"1f923":17,"1f924":153,"1f925":149,"1f926-200d-2640":1440,"1f926-200d-2642":1439,"1f926":1438,"1f927":160,"1f928":138,"1f929":117,"1f92a":127,"1f92b":134,"1f92c":1102,"1f92d":131,"1f92e":159,"1f92f":166,"1f930":1519,"1f931":1522,"1f932":1362,"1f933":1367,"1f934":1506,"1f935-200d-2640":1515,"1f935-200d-2642":1514,"1f935":1513,"1f936":1528,"1f937-200d-2640":1443,"1f937-200d-2642":1442,"1f937":1441,"1f938-200d-2640":1627,"1f938-200d-2642":1626,"1f938":1625,"1f939-200d-2640":1639,"1f939-200d-2642":1638,"1f939":1637,"1f93a":1597,"1f93c-200d-2640":1630,"1f93c-200d-2642":1629,"1f93c":1628,"1f93d-200d-2640":1633,"1f93d-200d-2642":1632,"1f93d":1631,"1f93e-200d-2640":1636,"1f93e-200d-2642":1635,"1f93e":1634,"1f93f":51073,"1f940":2654,"1f941":61180,"1f942":3791,"1f943":3792,"1f944":3802,"1f945":51069,"1f947":51048,"1f948":51049,"1f949":51050,"1f94a":51067,"1f94b":51068,"1f94c":51077,"1f94d":51064,"1f94e":51053,"1f94f":51059,"1f950":3710,"1f951":3693,"1f952":3700,"1f953":3721,"1f954":3695,"1f955":3696,"1f956":3711,"1f957":3738,"1f958":3734,"1f959":3730,"1f95a":3732,"1f95b":3780,"1f95c":3706,"1f95d":3689,"1f95e":3715,"1f95f":3757,"1f960":3758,"1f961":3759,"1f962":3799,"1f963":3737,"1f964":3794,"1f965":3692,"1f966":3702,"1f967":3773,"1f968":3713,"1f969":3720,"1f96a":3726,"1f96b":3742,"1f96c":3701,"1f96d":3681,"1f96e":3755,"1f96f":3714,"1f970":115,"1f971":198,"1f972":123,"1f973":168,"1f974":163,"1f975":161,"1f976":162,"1f977":1501,"1f978":169,"1f97a":182,"1f97b":61124,"1f97c":61113,"1f97d":61112,"1f97e":61138,"1f97f":61139,"1f980":3760,"1f981":2545,"1f982":2643,"1f983":2594,"1f984":2551,"1f985":2603,"1f986":2604,"1f987":2583,"1f988":2628,"1f989":2606,"1f98a":2540,"1f98b":2633,"1f98c":2553,"1f98d":2532,"1f98e":2615,"1f98f":2572,"1f990":3762,"1f991":3763,"1f992":2569,"1f993":2552,"1f994":2582,"1f995":2619,"1f996":2620,"1f997":2639,"1f998":2591,"1f999":2568,"1f99a":2610,"1f99b":2573,"1f99c":2611,"1f99d":2541,"1f99e":3761,"1f99f":2644,"1f9a0":2647,"1f9a1":2592,"1f9a2":2605,"1f9a3":2571,"1f9a4":2607,"1f9a5":2588,"1f9a6":2589,"1f9a7":2533,"1f9a8":2590,"1f9a9":2609,"1f9aa":3764,"1f9ab":2581,"1f9ac":2554,"1f9ad":2624,"1f9ae":2536,"1f9af":61312,"1f9b4":1380,"1f9b5":1371,"1f9b6":1372,"1f9b7":1379,"1f9b8-200d-2640":1532,"1f9b8-200d-2642":1531,"1f9b8":1530,"1f9b9-200d-2640":1535,"1f9b9-200d-2642":1534,"1f9b9":1533,"1f9ba":61114,"1f9bb":1374,"1f9bc":4905,"1f9bd":4904,"1f9be":1369,"1f9bf":1370,"1f9c0":3717,"1f9c1":3772,"1f9c2":3741,"1f9c3":3796,"1f9c4":3703,"1f9c5":3704,"1f9c6":3731,"1f9c7":3716,"1f9c8":3740,"1f9c9":3797,"1f9ca":3798,"1f9cb":3795,"1f9cd-200d-2640":1569,"1f9cd-200d-2642":1568,"1f9cd":1567,"1f9ce-200d-2640":1572,"1f9ce-200d-2642":1571,"1f9ce":1570,"1f9cf-200d-2640":1434,"1f9cf-200d-2642":1433,"1f9cf":1432,"1f9d0":172,"1f9d1-200d-1f33e":1456,"1f9d1-200d-1f373":1459,"1f9d1-200d-1f37c":1525,"1f9d1-200d-1f384":1529,"1f9d1-200d-1f393":1447,"1f9d1-200d-1f3a4":1477,"1f9d1-200d-1f3a8":1480,"1f9d1-200d-1f3eb":1450,"1f9d1-200d-1f3ed":1465,"1f9d1-200d-1f4bb":1474,"1f9d1-200d-1f4bc":1468,"1f9d1-200d-1f527":1462,"1f9d1-200d-1f52c":1471,"1f9d1-200d-1f680":1486,"1f9d1-200d-1f692":1489,"1f9d1-200d-1f91d-200d-1f9d1":1645,"1f9d1-200d-1f9af":1573,"1f9d1-200d-1f9b0":1402,"1f9d1-200d-1f9b1":1404,"1f9d1-200d-1f9b2":1408,"1f9d1-200d-1f9b3":1406,"1f9d1-200d-1f9bc":1576,"1f9d1-200d-1f9bd":1579,"1f9d1-200d-2695":1444,"1f9d1-200d-2696":1453,"1f9d1-200d-2708":1483,"1f9d1":1390,"1f9d2":1387,"1f9d3":1411,"1f9d4-200d-2640":1395,"1f9d4-200d-2642":1394,"1f9d4":1393,"1f9d5":1512,"1f9d6-200d-2640":1593,"1f9d6-200d-2642":1592,"1f9d6":1591,"1f9d7-200d-2640":1596,"1f9d7-200d-2642":1595,"1f9d7":1594,"1f9d8-200d-2640":1642,"1f9d8-200d-2642":1641,"1f9d8":1640,"1f9d9-200d-2640":1538,"1f9d9-200d-2642":1537,"1f9d9":1536,"1f9da-200d-2640":1541,"1f9da-200d-2642":1540,"1f9da":1539,"1f9db-200d-2640":1544,"1f9db-200d-2642":1543,"1f9db":1542,"1f9dc-200d-2640":1547,"1f9dc-200d-2642":1546,"1f9dc":1545,"1f9dd-200d-2640":1550,"1f9dd-200d-2642":1549,"1f9dd":1548,"1f9de-200d-2640":1553,"1f9de-200d-2642":1552,"1f9de":1551,"1f9df-200d-2640":1556,"1f9df-200d-2642":1555,"1f9df":1554,"1f9e0":1376,"1f9e1":1142,"1f9e2":61148,"1f9e3":61118,"1f9e4":61119,"1f9e5":61120,"1f9e6":61121,"1f9e7":51039,"1f9e8":51028,"1f9e9":51090,"1f9ea":61320,"1f9eb":61321,"1f9ec":61322,"1f9ed":4812,"1f9ee":61201,"1f9ef":61356,"1f9f0":61316,"1f9f1":4825,"1f9f2":61317,"1f9f3":4945,"1f9f4":61346,"1f9f5":51106,"1f9f6":51108,"1f9f7":61347,"1f9f8":51091,"1f9f9":61348,"1f9fa":61349,"1f9fb":61350,"1f9fc":61352,"1f9fd":61355,"1f9fe":61243,"1f9ff":51084,"1fa70":61142,"1fa71":61125,"1fa72":61126,"1fa73":61127,"1fa74":61135,"1fa78":61327,"1fa79":61329,"1fa7a":61331,"1fa80":51079,"1fa81":51080,"1fa82":4935,"1fa83":61302,"1fa84":51083,"1fa85":51092,"1fa86":51094,"1fa90":4993,"1fa91":61339,"1fa92":61345,"1fa93":61295,"1fa94":61217,"1fa95":61179,"1fa96":61149,"1fa97":61174,"1fa98":61181,"1fa99":61236,"1fa9a":61305,"1fa9b":61307,"1fa9c":61318,"1fa9d":61315,"1fa9e":61335,"1fa9f":61336,"1faa0":61341,"1faa1":51107,"1faa2":51109,"1faa3":61351,"1faa4":61344,"1faa5":61354,"1faa6":61360,"1faa7":61363,"1faa8":4826,"1fab0":2645,"1fab1":2646,"1fab2":2637,"1fab3":2640,"1fab4":2660,"1fab5":4827,"1fab6":2608,"1fac0":1377,"1fac1":1378,"1fac2":1686,"1fad0":3688,"1fad1":3699,"1fad2":3691,"1fad3":3712,"1fad4":3729,"1fad5":3736,"1fad6":3782,"203c":62834,"21a9":62765,"21aa":62766,"231a":4948,"231b":4946,"23cf":62818,"23e9":62805,"23ea":62809,"23eb":62812,"23ec":62814,"23ed":62806,"23ee":62810,"23ef":62807,"23f0":4949,"23f1":4950,"23f2":4951,"23f3":4947,"23f8":62815,"23f9":62816,"23fa":62817,"24c2":62890,"25aa":62938,"25ab":62939,"25b6":62804,"25c0":62808,"25fb":62935,"25fc":62934,"25fd":62937,"25fe":62936,"260e":61184,"261d":1350,"262a":62784,"262e":62785,"262f":62781,"263a":120,"264a":62790,"264b":62791,"264c":62792,"264d":62793,"264e":62794,"264f":62795,"265f":51099,"267b":62844,"267e":62833,"267f":62732,"269b":62777,"269c":62845,"26a0":62742,"26a1":41016,"26a7":62827,"26aa":62924,"26ab":62923,"26b0":61359,"26b1":61361,"26bd":51051,"26be":51052,"26c4":41019,"26c5":4999,"26c8":41e3,"26ce":62800,"26cf":61296,"26d1":61150,"26d3":61314,"26d4":62744,"26e9":4853,"26ea":4849,"26f0":4814,"26f1":41015,"26f2":4855,"26f3":51070,"26f4":4928,"26f5":4924,"26f7":1599,"26f8":51071,"26f9-200d-2640":1615,"26f9-200d-2642":1614,"26f9":1613,"26fa":4856,"26fd":4915,"270a":1354,"270b":1330,"270c":1339,"270d":1365,"270f":61258,"271d":62782,"274c":62853,"274e":62854,"2764-200d-1f525":1139,"2764-200d-1fa79":1140,"27a1":62757,"27b0":62855,"27bf":62856,"2b05":62761,"2b06":62755,"2b07":62759,"2b1b":62932,"2b1c":62933,"2b50":4994,"2b55":62849,"303d":62857,"1f385-1f3fb":0,"1f385-1f3fc":0,"1f385-1f3fd":0,"1f385-1f3fe":0,"1f385-1f3ff":0,"1f3c2-1f3fb":0,"1f3c2-1f3fc":0,"1f3c2-1f3fd":0,"1f3c2-1f3fe":0,"1f3c2-1f3ff":0,"1f3c3-1f3fb-200d-2640":0,"1f3c3-1f3fc-200d-2640":0,"1f3c3-1f3fd-200d-2640":0,"1f3c3-1f3fe-200d-2640":0,"1f3c3-1f3ff-200d-2640":0,"1f3c3-1f3fb-200d-2642":0,"1f3c3-1f3fc-200d-2642":0,"1f3c3-1f3fd-200d-2642":0,"1f3c3-1f3fe-200d-2642":0,"1f3c3-1f3ff-200d-2642":0,"1f3c3-1f3fb":0,"1f3c3-1f3fc":0,"1f3c3-1f3fd":0,"1f3c3-1f3fe":0,"1f3c3-1f3ff":0,"1f3c4-1f3fb-200d-2640":0,"1f3c4-1f3fc-200d-2640":0,"1f3c4-1f3fd-200d-2640":0,"1f3c4-1f3fe-200d-2640":0,"1f3c4-1f3ff-200d-2640":0,"1f3c4-1f3fb-200d-2642":0,"1f3c4-1f3fc-200d-2642":0,"1f3c4-1f3fd-200d-2642":0,"1f3c4-1f3fe-200d-2642":0,"1f3c4-1f3ff-200d-2642":0,"1f3c4-1f3fb":0,"1f3c4-1f3fc":0,"1f3c4-1f3fd":0,"1f3c4-1f3fe":0,"1f3c4-1f3ff":0,"1f3c7-1f3fb":0,"1f3c7-1f3fc":0,"1f3c7-1f3fd":0,"1f3c7-1f3fe":0,"1f3c7-1f3ff":0,"1f3ca-1f3fb-200d-2640":0,"1f3ca-1f3fc-200d-2640":0,"1f3ca-1f3fd-200d-2640":0,"1f3ca-1f3fe-200d-2640":0,"1f3ca-1f3ff-200d-2640":0,"1f3ca-1f3fb-200d-2642":0,"1f3ca-1f3fc-200d-2642":0,"1f3ca-1f3fd-200d-2642":0,"1f3ca-1f3fe-200d-2642":0,"1f3ca-1f3ff-200d-2642":0,"1f3ca-1f3fb":0,"1f3ca-1f3fc":0,"1f3ca-1f3fd":0,"1f3ca-1f3fe":0,"1f3ca-1f3ff":0,"1f3cb-1f3fb-200d-2640":0,"1f3cb-1f3fc-200d-2640":0,"1f3cb-1f3fd-200d-2640":0,"1f3cb-1f3fe-200d-2640":0,"1f3cb-1f3ff-200d-2640":0,"1f3cb-1f3fb-200d-2642":0,"1f3cb-1f3fc-200d-2642":0,"1f3cb-1f3fd-200d-2642":0,"1f3cb-1f3fe-200d-2642":0,"1f3cb-1f3ff-200d-2642":0,"1f3cb-1f3fb":0,"1f3cb-1f3fc":0,"1f3cb-1f3fd":0,"1f3cb-1f3fe":0,"1f3cb-1f3ff":0,"1f3cc-1f3fb-200d-2640":0,"1f3cc-1f3fc-200d-2640":0,"1f3cc-1f3fd-200d-2640":0,"1f3cc-1f3fe-200d-2640":0,"1f3cc-1f3ff-200d-2640":0,"1f3cc-1f3fb-200d-2642":0,"1f3cc-1f3fc-200d-2642":0,"1f3cc-1f3fd-200d-2642":0,"1f3cc-1f3fe-200d-2642":0,"1f3cc-1f3ff-200d-2642":0,"1f3cc-1f3fb":0,"1f3cc-1f3fc":0,"1f3cc-1f3fd":0,"1f3cc-1f3fe":0,"1f3cc-1f3ff":0,"1f442-1f3fb":0,"1f442-1f3fc":0,"1f442-1f3fd":0,"1f442-1f3fe":0,"1f442-1f3ff":0,"1f443-1f3fb":0,"1f443-1f3fc":0,"1f443-1f3fd":0,"1f443-1f3fe":0,"1f443-1f3ff":0,"1f446-1f3fb":0,"1f446-1f3fc":0,"1f446-1f3fd":0,"1f446-1f3fe":0,"1f446-1f3ff":0,"1f447-1f3fb":0,"1f447-1f3fc":0,"1f447-1f3fd":0,"1f447-1f3fe":0,"1f447-1f3ff":0,"1f448-1f3fb":0,"1f448-1f3fc":0,"1f448-1f3fd":0,"1f448-1f3fe":0,"1f448-1f3ff":0,"1f449-1f3fb":0,"1f449-1f3fc":0,"1f449-1f3fd":0,"1f449-1f3fe":0,"1f449-1f3ff":0,"1f44a-1f3fb":0,"1f44a-1f3fc":0,"1f44a-1f3fd":0,"1f44a-1f3fe":0,"1f44a-1f3ff":0,"1f44b-1f3fb":0,"1f44b-1f3fc":0,"1f44b-1f3fd":0,"1f44b-1f3fe":0,"1f44b-1f3ff":0,"1f44c-1f3fb":0,"1f44c-1f3fc":0,"1f44c-1f3fd":0,"1f44c-1f3fe":0,"1f44c-1f3ff":0,"1f44d-1f3fb":0,"1f44d-1f3fc":0,"1f44d-1f3fd":0,"1f44d-1f3fe":0,"1f44d-1f3ff":0,"1f44e-1f3fb":0,"1f44e-1f3fc":0,"1f44e-1f3fd":0,"1f44e-1f3fe":0,"1f44e-1f3ff":0,"1f44f-1f3fb":0,"1f44f-1f3fc":0,"1f44f-1f3fd":0,"1f44f-1f3fe":0,"1f44f-1f3ff":0,"1f450-1f3fb":0,"1f450-1f3fc":0,"1f450-1f3fd":0,"1f450-1f3fe":0,"1f450-1f3ff":0,"1f466-1f3fb":0,"1f466-1f3fc":0,"1f466-1f3fd":0,"1f466-1f3fe":0,"1f466-1f3ff":0,"1f467-1f3fb":0,"1f467-1f3fc":0,"1f467-1f3fd":0,"1f467-1f3fe":0,"1f467-1f3ff":0,"1f468-1f3fb-200d-1f33e":0,"1f468-1f3fc-200d-1f33e":0,"1f468-1f3fd-200d-1f33e":0,"1f468-1f3fe-200d-1f33e":0,"1f468-1f3ff-200d-1f33e":0,"1f468-1f3fb-200d-1f373":0,"1f468-1f3fc-200d-1f373":0,"1f468-1f3fd-200d-1f373":0,"1f468-1f3fe-200d-1f373":0,"1f468-1f3ff-200d-1f373":0,"1f468-1f3fb-200d-1f37c":0,"1f468-1f3fc-200d-1f37c":0,"1f468-1f3fd-200d-1f37c":0,"1f468-1f3fe-200d-1f37c":0,"1f468-1f3ff-200d-1f37c":0,"1f468-1f3fb-200d-1f393":0,"1f468-1f3fc-200d-1f393":0,"1f468-1f3fd-200d-1f393":0,"1f468-1f3fe-200d-1f393":0,"1f468-1f3ff-200d-1f393":0,"1f468-1f3fb-200d-1f3a4":0,"1f468-1f3fc-200d-1f3a4":0,"1f468-1f3fd-200d-1f3a4":0,"1f468-1f3fe-200d-1f3a4":0,"1f468-1f3ff-200d-1f3a4":0,"1f468-1f3fb-200d-1f3a8":0,"1f468-1f3fc-200d-1f3a8":0,"1f468-1f3fd-200d-1f3a8":0,"1f468-1f3fe-200d-1f3a8":0,"1f468-1f3ff-200d-1f3a8":0,"1f468-1f3fb-200d-1f3eb":0,"1f468-1f3fc-200d-1f3eb":0,"1f468-1f3fd-200d-1f3eb":0,"1f468-1f3fe-200d-1f3eb":0,"1f468-1f3ff-200d-1f3eb":0,"1f468-1f3fb-200d-1f3ed":0,"1f468-1f3fc-200d-1f3ed":0,"1f468-1f3fd-200d-1f3ed":0,"1f468-1f3fe-200d-1f3ed":0,"1f468-1f3ff-200d-1f3ed":0,"1f468-1f3fb-200d-1f4bb":0,"1f468-1f3fc-200d-1f4bb":0,"1f468-1f3fd-200d-1f4bb":0,"1f468-1f3fe-200d-1f4bb":0,"1f468-1f3ff-200d-1f4bb":0,"1f468-1f3fb-200d-1f4bc":0,"1f468-1f3fc-200d-1f4bc":0,"1f468-1f3fd-200d-1f4bc":0,"1f468-1f3fe-200d-1f4bc":0,"1f468-1f3ff-200d-1f4bc":0,"1f468-1f3fb-200d-1f527":0,"1f468-1f3fc-200d-1f527":0,"1f468-1f3fd-200d-1f527":0,"1f468-1f3fe-200d-1f527":0,"1f468-1f3ff-200d-1f527":0,"1f468-1f3fb-200d-1f52c":0,"1f468-1f3fc-200d-1f52c":0,"1f468-1f3fd-200d-1f52c":0,"1f468-1f3fe-200d-1f52c":0,"1f468-1f3ff-200d-1f52c":0,"1f468-1f3fb-200d-1f680":0,"1f468-1f3fc-200d-1f680":0,"1f468-1f3fd-200d-1f680":0,"1f468-1f3fe-200d-1f680":0,"1f468-1f3ff-200d-1f680":0,"1f468-1f3fb-200d-1f692":0,"1f468-1f3fc-200d-1f692":0,"1f468-1f3fd-200d-1f692":0,"1f468-1f3fe-200d-1f692":0,"1f468-1f3ff-200d-1f692":0,"1f468-1f3fb-200d-1f9af":0,"1f468-1f3fc-200d-1f9af":0,"1f468-1f3fd-200d-1f9af":0,"1f468-1f3fe-200d-1f9af":0,"1f468-1f3ff-200d-1f9af":0,"1f468-1f3fb-200d-1f9b0":0,"1f468-1f3fc-200d-1f9b0":0,"1f468-1f3fd-200d-1f9b0":0,"1f468-1f3fe-200d-1f9b0":0,"1f468-1f3ff-200d-1f9b0":0,"1f468-1f3fb-200d-1f9b1":0,"1f468-1f3fc-200d-1f9b1":0,"1f468-1f3fd-200d-1f9b1":0,"1f468-1f3fe-200d-1f9b1":0,"1f468-1f3ff-200d-1f9b1":0,"1f468-1f3fb-200d-1f9b2":0,"1f468-1f3fc-200d-1f9b2":0,"1f468-1f3fd-200d-1f9b2":0,"1f468-1f3fe-200d-1f9b2":0,"1f468-1f3ff-200d-1f9b2":0,"1f468-1f3fb-200d-1f9b3":0,"1f468-1f3fc-200d-1f9b3":0,"1f468-1f3fd-200d-1f9b3":0,"1f468-1f3fe-200d-1f9b3":0,"1f468-1f3ff-200d-1f9b3":0,"1f468-1f3fb-200d-1f9bc":0,"1f468-1f3fc-200d-1f9bc":0,"1f468-1f3fd-200d-1f9bc":0,"1f468-1f3fe-200d-1f9bc":0,"1f468-1f3ff-200d-1f9bc":0,"1f468-1f3fb-200d-1f9bd":0,"1f468-1f3fc-200d-1f9bd":0,"1f468-1f3fd-200d-1f9bd":0,"1f468-1f3fe-200d-1f9bd":0,"1f468-1f3ff-200d-1f9bd":0,"1f468-1f3fb-200d-2695":0,"1f468-1f3fc-200d-2695":0,"1f468-1f3fd-200d-2695":0,"1f468-1f3fe-200d-2695":0,"1f468-1f3ff-200d-2695":0,"1f468-1f3fb-200d-2696":0,"1f468-1f3fc-200d-2696":0,"1f468-1f3fd-200d-2696":0,"1f468-1f3fe-200d-2696":0,"1f468-1f3ff-200d-2696":0,"1f468-1f3fb-200d-2708":0,"1f468-1f3fc-200d-2708":0,"1f468-1f3fd-200d-2708":0,"1f468-1f3fe-200d-2708":0,"1f468-1f3ff-200d-2708":0,"1f468-1f3fb-200d-2764-200d-1f468-1f3fb":0,"1f468-1f3fb-200d-2764-200d-1f468-1f3fc":0,"1f468-1f3fb-200d-2764-200d-1f468-1f3fd":0,"1f468-1f3fb-200d-2764-200d-1f468-1f3fe":0,"1f468-1f3fb-200d-2764-200d-1f468-1f3ff":0,"1f468-1f3fc-200d-2764-200d-1f468-1f3fb":0,"1f468-1f3fc-200d-2764-200d-1f468-1f3fc":0,"1f468-1f3fc-200d-2764-200d-1f468-1f3fd":0,"1f468-1f3fc-200d-2764-200d-1f468-1f3fe":0,"1f468-1f3fc-200d-2764-200d-1f468-1f3ff":0,"1f468-1f3fd-200d-2764-200d-1f468-1f3fb":0,"1f468-1f3fd-200d-2764-200d-1f468-1f3fc":0,"1f468-1f3fd-200d-2764-200d-1f468-1f3fd":0,"1f468-1f3fd-200d-2764-200d-1f468-1f3fe":0,"1f468-1f3fd-200d-2764-200d-1f468-1f3ff":0,"1f468-1f3fe-200d-2764-200d-1f468-1f3fb":0,"1f468-1f3fe-200d-2764-200d-1f468-1f3fc":0,"1f468-1f3fe-200d-2764-200d-1f468-1f3fd":0,"1f468-1f3fe-200d-2764-200d-1f468-1f3fe":0,"1f468-1f3fe-200d-2764-200d-1f468-1f3ff":0,"1f468-1f3ff-200d-2764-200d-1f468-1f3fb":0,"1f468-1f3ff-200d-2764-200d-1f468-1f3fc":0,"1f468-1f3ff-200d-2764-200d-1f468-1f3fd":0,"1f468-1f3ff-200d-2764-200d-1f468-1f3fe":0,"1f468-1f3ff-200d-2764-200d-1f468-1f3ff":0,"1f468-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f468-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f468-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f468-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f468-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f468-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f468-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f468-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f468-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f468-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f468-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f468-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f468-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f468-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f468-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f468-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f468-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f468-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f468-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f468-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f468-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f468-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f468-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f468-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f468-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f468-1f3fb":0,"1f468-1f3fc":0,"1f468-1f3fd":0,"1f468-1f3fe":0,"1f468-1f3ff":0,"1f469-1f3fb-200d-1f33e":0,"1f469-1f3fc-200d-1f33e":0,"1f469-1f3fd-200d-1f33e":0,"1f469-1f3fe-200d-1f33e":0,"1f469-1f3ff-200d-1f33e":0,"1f469-1f3fb-200d-1f373":0,"1f469-1f3fc-200d-1f373":0,"1f469-1f3fd-200d-1f373":0,"1f469-1f3fe-200d-1f373":0,"1f469-1f3ff-200d-1f373":0,"1f469-1f3fb-200d-1f37c":0,"1f469-1f3fc-200d-1f37c":0,"1f469-1f3fd-200d-1f37c":0,"1f469-1f3fe-200d-1f37c":0,"1f469-1f3ff-200d-1f37c":0,"1f469-1f3fb-200d-1f393":0,"1f469-1f3fc-200d-1f393":0,"1f469-1f3fd-200d-1f393":0,"1f469-1f3fe-200d-1f393":0,"1f469-1f3ff-200d-1f393":0,"1f469-1f3fb-200d-1f3a4":0,"1f469-1f3fc-200d-1f3a4":0,"1f469-1f3fd-200d-1f3a4":0,"1f469-1f3fe-200d-1f3a4":0,"1f469-1f3ff-200d-1f3a4":0,"1f469-1f3fb-200d-1f3a8":0,"1f469-1f3fc-200d-1f3a8":0,"1f469-1f3fd-200d-1f3a8":0,"1f469-1f3fe-200d-1f3a8":0,"1f469-1f3ff-200d-1f3a8":0,"1f469-1f3fb-200d-1f3eb":0,"1f469-1f3fc-200d-1f3eb":0,"1f469-1f3fd-200d-1f3eb":0,"1f469-1f3fe-200d-1f3eb":0,"1f469-1f3ff-200d-1f3eb":0,"1f469-1f3fb-200d-1f3ed":0,"1f469-1f3fc-200d-1f3ed":0,"1f469-1f3fd-200d-1f3ed":0,"1f469-1f3fe-200d-1f3ed":0,"1f469-1f3ff-200d-1f3ed":0,"1f469-1f3fb-200d-1f4bb":0,"1f469-1f3fc-200d-1f4bb":0,"1f469-1f3fd-200d-1f4bb":0,"1f469-1f3fe-200d-1f4bb":0,"1f469-1f3ff-200d-1f4bb":0,"1f469-1f3fb-200d-1f4bc":0,"1f469-1f3fc-200d-1f4bc":0,"1f469-1f3fd-200d-1f4bc":0,"1f469-1f3fe-200d-1f4bc":0,"1f469-1f3ff-200d-1f4bc":0,"1f469-1f3fb-200d-1f527":0,"1f469-1f3fc-200d-1f527":0,"1f469-1f3fd-200d-1f527":0,"1f469-1f3fe-200d-1f527":0,"1f469-1f3ff-200d-1f527":0,"1f469-1f3fb-200d-1f52c":0,"1f469-1f3fc-200d-1f52c":0,"1f469-1f3fd-200d-1f52c":0,"1f469-1f3fe-200d-1f52c":0,"1f469-1f3ff-200d-1f52c":0,"1f469-1f3fb-200d-1f680":0,"1f469-1f3fc-200d-1f680":0,"1f469-1f3fd-200d-1f680":0,"1f469-1f3fe-200d-1f680":0,"1f469-1f3ff-200d-1f680":0,"1f469-1f3fb-200d-1f692":0,"1f469-1f3fc-200d-1f692":0,"1f469-1f3fd-200d-1f692":0,"1f469-1f3fe-200d-1f692":0,"1f469-1f3ff-200d-1f692":0,"1f469-1f3fb-200d-1f9af":0,"1f469-1f3fc-200d-1f9af":0,"1f469-1f3fd-200d-1f9af":0,"1f469-1f3fe-200d-1f9af":0,"1f469-1f3ff-200d-1f9af":0,"1f469-1f3fb-200d-1f9b0":0,"1f469-1f3fc-200d-1f9b0":0,"1f469-1f3fd-200d-1f9b0":0,"1f469-1f3fe-200d-1f9b0":0,"1f469-1f3ff-200d-1f9b0":0,"1f469-1f3fb-200d-1f9b1":0,"1f469-1f3fc-200d-1f9b1":0,"1f469-1f3fd-200d-1f9b1":0,"1f469-1f3fe-200d-1f9b1":0,"1f469-1f3ff-200d-1f9b1":0,"1f469-1f3fb-200d-1f9b2":0,"1f469-1f3fc-200d-1f9b2":0,"1f469-1f3fd-200d-1f9b2":0,"1f469-1f3fe-200d-1f9b2":0,"1f469-1f3ff-200d-1f9b2":0,"1f469-1f3fb-200d-1f9b3":0,"1f469-1f3fc-200d-1f9b3":0,"1f469-1f3fd-200d-1f9b3":0,"1f469-1f3fe-200d-1f9b3":0,"1f469-1f3ff-200d-1f9b3":0,"1f469-1f3fb-200d-1f9bc":0,"1f469-1f3fc-200d-1f9bc":0,"1f469-1f3fd-200d-1f9bc":0,"1f469-1f3fe-200d-1f9bc":0,"1f469-1f3ff-200d-1f9bc":0,"1f469-1f3fb-200d-1f9bd":0,"1f469-1f3fc-200d-1f9bd":0,"1f469-1f3fd-200d-1f9bd":0,"1f469-1f3fe-200d-1f9bd":0,"1f469-1f3ff-200d-1f9bd":0,"1f469-1f3fb-200d-2695":0,"1f469-1f3fc-200d-2695":0,"1f469-1f3fd-200d-2695":0,"1f469-1f3fe-200d-2695":0,"1f469-1f3ff-200d-2695":0,"1f469-1f3fb-200d-2696":0,"1f469-1f3fc-200d-2696":0,"1f469-1f3fd-200d-2696":0,"1f469-1f3fe-200d-2696":0,"1f469-1f3ff-200d-2696":0,"1f469-1f3fb-200d-2708":0,"1f469-1f3fc-200d-2708":0,"1f469-1f3fd-200d-2708":0,"1f469-1f3fe-200d-2708":0,"1f469-1f3ff-200d-2708":0,"1f469-1f3fb-200d-2764-200d-1f468-1f3fb":0,"1f469-1f3fb-200d-2764-200d-1f468-1f3fc":0,"1f469-1f3fb-200d-2764-200d-1f468-1f3fd":0,"1f469-1f3fb-200d-2764-200d-1f468-1f3fe":0,"1f469-1f3fb-200d-2764-200d-1f468-1f3ff":0,"1f469-1f3fc-200d-2764-200d-1f468-1f3fb":0,"1f469-1f3fc-200d-2764-200d-1f468-1f3fc":0,"1f469-1f3fc-200d-2764-200d-1f468-1f3fd":0,"1f469-1f3fc-200d-2764-200d-1f468-1f3fe":0,"1f469-1f3fc-200d-2764-200d-1f468-1f3ff":0,"1f469-1f3fd-200d-2764-200d-1f468-1f3fb":0,"1f469-1f3fd-200d-2764-200d-1f468-1f3fc":0,"1f469-1f3fd-200d-2764-200d-1f468-1f3fd":0,"1f469-1f3fd-200d-2764-200d-1f468-1f3fe":0,"1f469-1f3fd-200d-2764-200d-1f468-1f3ff":0,"1f469-1f3fe-200d-2764-200d-1f468-1f3fb":0,"1f469-1f3fe-200d-2764-200d-1f468-1f3fc":0,"1f469-1f3fe-200d-2764-200d-1f468-1f3fd":0,"1f469-1f3fe-200d-2764-200d-1f468-1f3fe":0,"1f469-1f3fe-200d-2764-200d-1f468-1f3ff":0,"1f469-1f3ff-200d-2764-200d-1f468-1f3fb":0,"1f469-1f3ff-200d-2764-200d-1f468-1f3fc":0,"1f469-1f3ff-200d-2764-200d-1f468-1f3fd":0,"1f469-1f3ff-200d-2764-200d-1f468-1f3fe":0,"1f469-1f3ff-200d-2764-200d-1f468-1f3ff":0,"1f469-1f3fb-200d-2764-200d-1f469-1f3fb":0,"1f469-1f3fb-200d-2764-200d-1f469-1f3fc":0,"1f469-1f3fb-200d-2764-200d-1f469-1f3fd":0,"1f469-1f3fb-200d-2764-200d-1f469-1f3fe":0,"1f469-1f3fb-200d-2764-200d-1f469-1f3ff":0,"1f469-1f3fc-200d-2764-200d-1f469-1f3fb":0,"1f469-1f3fc-200d-2764-200d-1f469-1f3fc":0,"1f469-1f3fc-200d-2764-200d-1f469-1f3fd":0,"1f469-1f3fc-200d-2764-200d-1f469-1f3fe":0,"1f469-1f3fc-200d-2764-200d-1f469-1f3ff":0,"1f469-1f3fd-200d-2764-200d-1f469-1f3fb":0,"1f469-1f3fd-200d-2764-200d-1f469-1f3fc":0,"1f469-1f3fd-200d-2764-200d-1f469-1f3fd":0,"1f469-1f3fd-200d-2764-200d-1f469-1f3fe":0,"1f469-1f3fd-200d-2764-200d-1f469-1f3ff":0,"1f469-1f3fe-200d-2764-200d-1f469-1f3fb":0,"1f469-1f3fe-200d-2764-200d-1f469-1f3fc":0,"1f469-1f3fe-200d-2764-200d-1f469-1f3fd":0,"1f469-1f3fe-200d-2764-200d-1f469-1f3fe":0,"1f469-1f3fe-200d-2764-200d-1f469-1f3ff":0,"1f469-1f3ff-200d-2764-200d-1f469-1f3fb":0,"1f469-1f3ff-200d-2764-200d-1f469-1f3fc":0,"1f469-1f3ff-200d-2764-200d-1f469-1f3fd":0,"1f469-1f3ff-200d-2764-200d-1f469-1f3fe":0,"1f469-1f3ff-200d-2764-200d-1f469-1f3ff":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fb":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fc":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fd":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3fe":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f468-1f3ff":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f469-1f3fb":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f469-1f3fc":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f469-1f3fd":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f469-1f3fe":0,"1f469-1f3fb-200d-2764-200d-1f48b-200d-1f469-1f3ff":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f469-1f3fb":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f469-1f3fc":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f469-1f3fd":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f469-1f3fe":0,"1f469-1f3fc-200d-2764-200d-1f48b-200d-1f469-1f3ff":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f469-1f3fb":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f469-1f3fc":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f469-1f3fd":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f469-1f3fe":0,"1f469-1f3fd-200d-2764-200d-1f48b-200d-1f469-1f3ff":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f469-1f3fb":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f469-1f3fc":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f469-1f3fd":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f469-1f3fe":0,"1f469-1f3fe-200d-2764-200d-1f48b-200d-1f469-1f3ff":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f469-1f3fb":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f469-1f3fc":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f469-1f3fd":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f469-1f3fe":0,"1f469-1f3ff-200d-2764-200d-1f48b-200d-1f469-1f3ff":0,"1f469-1f3fb":0,"1f469-1f3fc":0,"1f469-1f3fd":0,"1f469-1f3fe":0,"1f469-1f3ff":0,"1f46b-1f3fb":0,"1f46b-1f3fc":0,"1f46b-1f3fd":0,"1f46b-1f3fe":0,"1f46b-1f3ff":0,"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc":0,"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd":0,"1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe":0,"1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff":0,"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb":0,"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd":0,"1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe":0,"1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff":0,"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb":0,"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc":0,"1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe":0,"1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff":0,"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb":0,"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc":0,"1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd":0,"1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff":0,"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb":0,"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc":0,"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd":0,"1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe":0,"1f46c-1f3fb":0,"1f46c-1f3fc":0,"1f46c-1f3fd":0,"1f46c-1f3fe":0,"1f46c-1f3ff":0,"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc":0,"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd":0,"1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe":0,"1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff":0,"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb":0,"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd":0,"1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe":0,"1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff":0,"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb":0,"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc":0,"1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe":0,"1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff":0,"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb":0,"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc":0,"1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd":0,"1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff":0,"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb":0,"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc":0,"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd":0,"1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe":0,"1f46d-1f3fb":0,"1f46d-1f3fc":0,"1f46d-1f3fd":0,"1f46d-1f3fe":0,"1f46d-1f3ff":0,"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc":0,"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd":0,"1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe":0,"1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff":0,"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb":0,"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd":0,"1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe":0,"1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff":0,"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb":0,"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc":0,"1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe":0,"1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff":0,"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb":0,"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc":0,"1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd":0,"1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff":0,"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb":0,"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc":0,"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd":0,"1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe":0,"1f46e-1f3fb-200d-2640":0,"1f46e-1f3fc-200d-2640":0,"1f46e-1f3fd-200d-2640":0,"1f46e-1f3fe-200d-2640":0,"1f46e-1f3ff-200d-2640":0,"1f46e-1f3fb-200d-2642":0,"1f46e-1f3fc-200d-2642":0,"1f46e-1f3fd-200d-2642":0,"1f46e-1f3fe-200d-2642":0,"1f46e-1f3ff-200d-2642":0,"1f46e-1f3fb":0,"1f46e-1f3fc":0,"1f46e-1f3fd":0,"1f46e-1f3fe":0,"1f46e-1f3ff":0,"1f470-1f3fb-200d-2640":0,"1f470-1f3fc-200d-2640":0,"1f470-1f3fd-200d-2640":0,"1f470-1f3fe-200d-2640":0,"1f470-1f3ff-200d-2640":0,"1f470-1f3fb-200d-2642":0,"1f470-1f3fc-200d-2642":0,"1f470-1f3fd-200d-2642":0,"1f470-1f3fe-200d-2642":0,"1f470-1f3ff-200d-2642":0,"1f470-1f3fb":0,"1f470-1f3fc":0,"1f470-1f3fd":0,"1f470-1f3fe":0,"1f470-1f3ff":0,"1f471-1f3fb-200d-2640":0,"1f471-1f3fc-200d-2640":0,"1f471-1f3fd-200d-2640":0,"1f471-1f3fe-200d-2640":0,"1f471-1f3ff-200d-2640":0,"1f471-1f3fb-200d-2642":0,"1f471-1f3fc-200d-2642":0,"1f471-1f3fd-200d-2642":0,"1f471-1f3fe-200d-2642":0,"1f471-1f3ff-200d-2642":0,"1f471-1f3fb":0,"1f471-1f3fc":0,"1f471-1f3fd":0,"1f471-1f3fe":0,"1f471-1f3ff":0,"1f472-1f3fb":0,"1f472-1f3fc":0,"1f472-1f3fd":0,"1f472-1f3fe":0,"1f472-1f3ff":0,"1f473-1f3fb-200d-2640":0,"1f473-1f3fc-200d-2640":0,"1f473-1f3fd-200d-2640":0,"1f473-1f3fe-200d-2640":0,"1f473-1f3ff-200d-2640":0,"1f473-1f3fb-200d-2642":0,"1f473-1f3fc-200d-2642":0,"1f473-1f3fd-200d-2642":0,"1f473-1f3fe-200d-2642":0,"1f473-1f3ff-200d-2642":0,"1f473-1f3fb":0,"1f473-1f3fc":0,"1f473-1f3fd":0,"1f473-1f3fe":0,"1f473-1f3ff":0,"1f474-1f3fb":0,"1f474-1f3fc":0,"1f474-1f3fd":0,"1f474-1f3fe":0,"1f474-1f3ff":0,"1f475-1f3fb":0,"1f475-1f3fc":0,"1f475-1f3fd":0,"1f475-1f3fe":0,"1f475-1f3ff":0,"1f476-1f3fb":0,"1f476-1f3fc":0,"1f476-1f3fd":0,"1f476-1f3fe":0,"1f476-1f3ff":0,"1f477-1f3fb-200d-2640":0,"1f477-1f3fc-200d-2640":0,"1f477-1f3fd-200d-2640":0,"1f477-1f3fe-200d-2640":0,"1f477-1f3ff-200d-2640":0,"1f477-1f3fb-200d-2642":0,"1f477-1f3fc-200d-2642":0,"1f477-1f3fd-200d-2642":0,"1f477-1f3fe-200d-2642":0,"1f477-1f3ff-200d-2642":0,"1f477-1f3fb":0,"1f477-1f3fc":0,"1f477-1f3fd":0,"1f477-1f3fe":0,"1f477-1f3ff":0,"1f478-1f3fb":0,"1f478-1f3fc":0,"1f478-1f3fd":0,"1f478-1f3fe":0,"1f478-1f3ff":0,"1f47c-1f3fb":0,"1f47c-1f3fc":0,"1f47c-1f3fd":0,"1f47c-1f3fe":0,"1f47c-1f3ff":0,"1f481-1f3fb-200d-2640":0,"1f481-1f3fc-200d-2640":0,"1f481-1f3fd-200d-2640":0,"1f481-1f3fe-200d-2640":0,"1f481-1f3ff-200d-2640":0,"1f481-1f3fb-200d-2642":0,"1f481-1f3fc-200d-2642":0,"1f481-1f3fd-200d-2642":0,"1f481-1f3fe-200d-2642":0,"1f481-1f3ff-200d-2642":0,"1f481-1f3fb":0,"1f481-1f3fc":0,"1f481-1f3fd":0,"1f481-1f3fe":0,"1f481-1f3ff":0,"1f482-1f3fb-200d-2640":0,"1f482-1f3fc-200d-2640":0,"1f482-1f3fd-200d-2640":0,"1f482-1f3fe-200d-2640":0,"1f482-1f3ff-200d-2640":0,"1f482-1f3fb-200d-2642":0,"1f482-1f3fc-200d-2642":0,"1f482-1f3fd-200d-2642":0,"1f482-1f3fe-200d-2642":0,"1f482-1f3ff-200d-2642":0,"1f482-1f3fb":0,"1f482-1f3fc":0,"1f482-1f3fd":0,"1f482-1f3fe":0,"1f482-1f3ff":0,"1f483-1f3fb":0,"1f483-1f3fc":0,"1f483-1f3fd":0,"1f483-1f3fe":0,"1f483-1f3ff":0,"1f485-1f3fb":0,"1f485-1f3fc":0,"1f485-1f3fd":0,"1f485-1f3fe":0,"1f485-1f3ff":0,"1f486-1f3fb-200d-2640":0,"1f486-1f3fc-200d-2640":0,"1f486-1f3fd-200d-2640":0,"1f486-1f3fe-200d-2640":0,"1f486-1f3ff-200d-2640":0,"1f486-1f3fb-200d-2642":0,"1f486-1f3fc-200d-2642":0,"1f486-1f3fd-200d-2642":0,"1f486-1f3fe-200d-2642":0,"1f486-1f3ff-200d-2642":0,"1f486-1f3fb":0,"1f486-1f3fc":0,"1f486-1f3fd":0,"1f486-1f3fe":0,"1f486-1f3ff":0,"1f487-1f3fb-200d-2640":0,"1f487-1f3fc-200d-2640":0,"1f487-1f3fd-200d-2640":0,"1f487-1f3fe-200d-2640":0,"1f487-1f3ff-200d-2640":0,"1f487-1f3fb-200d-2642":0,"1f487-1f3fc-200d-2642":0,"1f487-1f3fd-200d-2642":0,"1f487-1f3fe-200d-2642":0,"1f487-1f3ff-200d-2642":0,"1f487-1f3fb":0,"1f487-1f3fc":0,"1f487-1f3fd":0,"1f487-1f3fe":0,"1f487-1f3ff":0,"1f48f-1f3fb":0,"1f48f-1f3fc":0,"1f48f-1f3fd":0,"1f48f-1f3fe":0,"1f48f-1f3ff":0,"1f9d1-1f3fb-200d-2764-200d-1f48b-200d-1f9d1-1f3fc":0,"1f9d1-1f3fb-200d-2764-200d-1f48b-200d-1f9d1-1f3fd":0,"1f9d1-1f3fb-200d-2764-200d-1f48b-200d-1f9d1-1f3fe":0,"1f9d1-1f3fb-200d-2764-200d-1f48b-200d-1f9d1-1f3ff":0,"1f9d1-1f3fc-200d-2764-200d-1f48b-200d-1f9d1-1f3fb":0,"1f9d1-1f3fc-200d-2764-200d-1f48b-200d-1f9d1-1f3fd":0,"1f9d1-1f3fc-200d-2764-200d-1f48b-200d-1f9d1-1f3fe":0,"1f9d1-1f3fc-200d-2764-200d-1f48b-200d-1f9d1-1f3ff":0,"1f9d1-1f3fd-200d-2764-200d-1f48b-200d-1f9d1-1f3fb":0,"1f9d1-1f3fd-200d-2764-200d-1f48b-200d-1f9d1-1f3fc":0,"1f9d1-1f3fd-200d-2764-200d-1f48b-200d-1f9d1-1f3fe":0,"1f9d1-1f3fd-200d-2764-200d-1f48b-200d-1f9d1-1f3ff":0,"1f9d1-1f3fe-200d-2764-200d-1f48b-200d-1f9d1-1f3fb":0,"1f9d1-1f3fe-200d-2764-200d-1f48b-200d-1f9d1-1f3fc":0,"1f9d1-1f3fe-200d-2764-200d-1f48b-200d-1f9d1-1f3fd":0,"1f9d1-1f3fe-200d-2764-200d-1f48b-200d-1f9d1-1f3ff":0,"1f9d1-1f3ff-200d-2764-200d-1f48b-200d-1f9d1-1f3fb":0,"1f9d1-1f3ff-200d-2764-200d-1f48b-200d-1f9d1-1f3fc":0,"1f9d1-1f3ff-200d-2764-200d-1f48b-200d-1f9d1-1f3fd":0,"1f9d1-1f3ff-200d-2764-200d-1f48b-200d-1f9d1-1f3fe":0,"1f491-1f3fb":0,"1f491-1f3fc":0,"1f491-1f3fd":0,"1f491-1f3fe":0,"1f491-1f3ff":0,"1f9d1-1f3fb-200d-2764-200d-1f9d1-1f3fc":0,"1f9d1-1f3fb-200d-2764-200d-1f9d1-1f3fd":0,"1f9d1-1f3fb-200d-2764-200d-1f9d1-1f3fe":0,"1f9d1-1f3fb-200d-2764-200d-1f9d1-1f3ff":0,"1f9d1-1f3fc-200d-2764-200d-1f9d1-1f3fb":0,"1f9d1-1f3fc-200d-2764-200d-1f9d1-1f3fd":0,"1f9d1-1f3fc-200d-2764-200d-1f9d1-1f3fe":0,"1f9d1-1f3fc-200d-2764-200d-1f9d1-1f3ff":0,"1f9d1-1f3fd-200d-2764-200d-1f9d1-1f3fb":0,"1f9d1-1f3fd-200d-2764-200d-1f9d1-1f3fc":0,"1f9d1-1f3fd-200d-2764-200d-1f9d1-1f3fe":0,"1f9d1-1f3fd-200d-2764-200d-1f9d1-1f3ff":0,"1f9d1-1f3fe-200d-2764-200d-1f9d1-1f3fb":0,"1f9d1-1f3fe-200d-2764-200d-1f9d1-1f3fc":0,"1f9d1-1f3fe-200d-2764-200d-1f9d1-1f3fd":0,"1f9d1-1f3fe-200d-2764-200d-1f9d1-1f3ff":0,"1f9d1-1f3ff-200d-2764-200d-1f9d1-1f3fb":0,"1f9d1-1f3ff-200d-2764-200d-1f9d1-1f3fc":0,"1f9d1-1f3ff-200d-2764-200d-1f9d1-1f3fd":0,"1f9d1-1f3ff-200d-2764-200d-1f9d1-1f3fe":0,"1f4aa-1f3fb":0,"1f4aa-1f3fc":0,"1f4aa-1f3fd":0,"1f4aa-1f3fe":0,"1f4aa-1f3ff":0,"1f574-1f3fb":0,"1f574-1f3fc":0,"1f574-1f3fd":0,"1f574-1f3fe":0,"1f574-1f3ff":0,"1f575-1f3fb-200d-2640":0,"1f575-1f3fc-200d-2640":0,"1f575-1f3fd-200d-2640":0,"1f575-1f3fe-200d-2640":0,"1f575-1f3ff-200d-2640":0,"1f575-1f3fb-200d-2642":0,"1f575-1f3fc-200d-2642":0,"1f575-1f3fd-200d-2642":0,"1f575-1f3fe-200d-2642":0,"1f575-1f3ff-200d-2642":0,"1f575-1f3fb":0,"1f575-1f3fc":0,"1f575-1f3fd":0,"1f575-1f3fe":0,"1f575-1f3ff":0,"1f57a-1f3fb":0,"1f57a-1f3fc":0,"1f57a-1f3fd":0,"1f57a-1f3fe":0,"1f57a-1f3ff":0,"1f590-1f3fb":0,"1f590-1f3fc":0,"1f590-1f3fd":0,"1f590-1f3fe":0,"1f590-1f3ff":0,"1f595-1f3fb":0,"1f595-1f3fc":0,"1f595-1f3fd":0,"1f595-1f3fe":0,"1f595-1f3ff":0,"1f596-1f3fb":0,"1f596-1f3fc":0,"1f596-1f3fd":0,"1f596-1f3fe":0,"1f596-1f3ff":0,"1f645-1f3fb-200d-2640":0,"1f645-1f3fc-200d-2640":0,"1f645-1f3fd-200d-2640":0,"1f645-1f3fe-200d-2640":0,"1f645-1f3ff-200d-2640":0,"1f645-1f3fb-200d-2642":0,"1f645-1f3fc-200d-2642":0,"1f645-1f3fd-200d-2642":0,"1f645-1f3fe-200d-2642":0,"1f645-1f3ff-200d-2642":0,"1f645-1f3fb":0,"1f645-1f3fc":0,"1f645-1f3fd":0,"1f645-1f3fe":0,"1f645-1f3ff":0,"1f646-1f3fb-200d-2640":0,"1f646-1f3fc-200d-2640":0,"1f646-1f3fd-200d-2640":0,"1f646-1f3fe-200d-2640":0,"1f646-1f3ff-200d-2640":0,"1f646-1f3fb-200d-2642":0,"1f646-1f3fc-200d-2642":0,"1f646-1f3fd-200d-2642":0,"1f646-1f3fe-200d-2642":0,"1f646-1f3ff-200d-2642":0,"1f646-1f3fb":0,"1f646-1f3fc":0,"1f646-1f3fd":0,"1f646-1f3fe":0,"1f646-1f3ff":0,"1f647-1f3fb-200d-2640":0,"1f647-1f3fc-200d-2640":0,"1f647-1f3fd-200d-2640":0,"1f647-1f3fe-200d-2640":0,"1f647-1f3ff-200d-2640":0,"1f647-1f3fb-200d-2642":0,"1f647-1f3fc-200d-2642":0,"1f647-1f3fd-200d-2642":0,"1f647-1f3fe-200d-2642":0,"1f647-1f3ff-200d-2642":0,"1f647-1f3fb":0,"1f647-1f3fc":0,"1f647-1f3fd":0,"1f647-1f3fe":0,"1f647-1f3ff":0,"1f64b-1f3fb-200d-2640":0,"1f64b-1f3fc-200d-2640":0,"1f64b-1f3fd-200d-2640":0,"1f64b-1f3fe-200d-2640":0,"1f64b-1f3ff-200d-2640":0,"1f64b-1f3fb-200d-2642":0,"1f64b-1f3fc-200d-2642":0,"1f64b-1f3fd-200d-2642":0,"1f64b-1f3fe-200d-2642":0,"1f64b-1f3ff-200d-2642":0,"1f64b-1f3fb":0,"1f64b-1f3fc":0,"1f64b-1f3fd":0,"1f64b-1f3fe":0,"1f64b-1f3ff":0,"1f64c-1f3fb":0,"1f64c-1f3fc":0,"1f64c-1f3fd":0,"1f64c-1f3fe":0,"1f64c-1f3ff":0,"1f64d-1f3fb-200d-2640":0,"1f64d-1f3fc-200d-2640":0,"1f64d-1f3fd-200d-2640":0,"1f64d-1f3fe-200d-2640":0,"1f64d-1f3ff-200d-2640":0,"1f64d-1f3fb-200d-2642":0,"1f64d-1f3fc-200d-2642":0,"1f64d-1f3fd-200d-2642":0,"1f64d-1f3fe-200d-2642":0,"1f64d-1f3ff-200d-2642":0,"1f64d-1f3fb":0,"1f64d-1f3fc":0,"1f64d-1f3fd":0,"1f64d-1f3fe":0,"1f64d-1f3ff":0,"1f64e-1f3fb-200d-2640":0,"1f64e-1f3fc-200d-2640":0,"1f64e-1f3fd-200d-2640":0,"1f64e-1f3fe-200d-2640":0,"1f64e-1f3ff-200d-2640":0,"1f64e-1f3fb-200d-2642":0,"1f64e-1f3fc-200d-2642":0,"1f64e-1f3fd-200d-2642":0,"1f64e-1f3fe-200d-2642":0,"1f64e-1f3ff-200d-2642":0,"1f64e-1f3fb":0,"1f64e-1f3fc":0,"1f64e-1f3fd":0,"1f64e-1f3fe":0,"1f64e-1f3ff":0,"1f64f-1f3fb":0,"1f64f-1f3fc":0,"1f64f-1f3fd":0,"1f64f-1f3fe":0,"1f64f-1f3ff":0,"1f6a3-1f3fb-200d-2640":0,"1f6a3-1f3fc-200d-2640":0,"1f6a3-1f3fd-200d-2640":0,"1f6a3-1f3fe-200d-2640":0,"1f6a3-1f3ff-200d-2640":0,"1f6a3-1f3fb-200d-2642":0,"1f6a3-1f3fc-200d-2642":0,"1f6a3-1f3fd-200d-2642":0,"1f6a3-1f3fe-200d-2642":0,"1f6a3-1f3ff-200d-2642":0,"1f6a3-1f3fb":0,"1f6a3-1f3fc":0,"1f6a3-1f3fd":0,"1f6a3-1f3fe":0,"1f6a3-1f3ff":0,"1f6b4-1f3fb-200d-2640":0,"1f6b4-1f3fc-200d-2640":0,"1f6b4-1f3fd-200d-2640":0,"1f6b4-1f3fe-200d-2640":0,"1f6b4-1f3ff-200d-2640":0,"1f6b4-1f3fb-200d-2642":0,"1f6b4-1f3fc-200d-2642":0,"1f6b4-1f3fd-200d-2642":0,"1f6b4-1f3fe-200d-2642":0,"1f6b4-1f3ff-200d-2642":0,"1f6b4-1f3fb":0,"1f6b4-1f3fc":0,"1f6b4-1f3fd":0,"1f6b4-1f3fe":0,"1f6b4-1f3ff":0,"1f6b5-1f3fb-200d-2640":0,"1f6b5-1f3fc-200d-2640":0,"1f6b5-1f3fd-200d-2640":0,"1f6b5-1f3fe-200d-2640":0,"1f6b5-1f3ff-200d-2640":0,"1f6b5-1f3fb-200d-2642":0,"1f6b5-1f3fc-200d-2642":0,"1f6b5-1f3fd-200d-2642":0,"1f6b5-1f3fe-200d-2642":0,"1f6b5-1f3ff-200d-2642":0,"1f6b5-1f3fb":0,"1f6b5-1f3fc":0,"1f6b5-1f3fd":0,"1f6b5-1f3fe":0,"1f6b5-1f3ff":0,"1f6b6-1f3fb-200d-2640":0,"1f6b6-1f3fc-200d-2640":0,"1f6b6-1f3fd-200d-2640":0,"1f6b6-1f3fe-200d-2640":0,"1f6b6-1f3ff-200d-2640":0,"1f6b6-1f3fb-200d-2642":0,"1f6b6-1f3fc-200d-2642":0,"1f6b6-1f3fd-200d-2642":0,"1f6b6-1f3fe-200d-2642":0,"1f6b6-1f3ff-200d-2642":0,"1f6b6-1f3fb":0,"1f6b6-1f3fc":0,"1f6b6-1f3fd":0,"1f6b6-1f3fe":0,"1f6b6-1f3ff":0,"1f6c0-1f3fb":0,"1f6c0-1f3fc":0,"1f6c0-1f3fd":0,"1f6c0-1f3fe":0,"1f6c0-1f3ff":0,"1f6cc-1f3fb":0,"1f6cc-1f3fc":0,"1f6cc-1f3fd":0,"1f6cc-1f3fe":0,"1f6cc-1f3ff":0,"1f90c-1f3fb":0,"1f90c-1f3fc":0,"1f90c-1f3fd":0,"1f90c-1f3fe":0,"1f90c-1f3ff":0,"1f90f-1f3fb":0,"1f90f-1f3fc":0,"1f90f-1f3fd":0,"1f90f-1f3fe":0,"1f90f-1f3ff":0,"1f918-1f3fb":0,"1f918-1f3fc":0,"1f918-1f3fd":0,"1f918-1f3fe":0,"1f918-1f3ff":0,"1f919-1f3fb":0,"1f919-1f3fc":0,"1f919-1f3fd":0,"1f919-1f3fe":0,"1f919-1f3ff":0,"1f91a-1f3fb":0,"1f91a-1f3fc":0,"1f91a-1f3fd":0,"1f91a-1f3fe":0,"1f91a-1f3ff":0,"1f91b-1f3fb":0,"1f91b-1f3fc":0,"1f91b-1f3fd":0,"1f91b-1f3fe":0,"1f91b-1f3ff":0,"1f91c-1f3fb":0,"1f91c-1f3fc":0,"1f91c-1f3fd":0,"1f91c-1f3fe":0,"1f91c-1f3ff":0,"1f91d-1f3fb":0,"1f91d-1f3fc":0,"1f91d-1f3fd":0,"1f91d-1f3fe":0,"1f91d-1f3ff":0,"1f91e-1f3fb":0,"1f91e-1f3fc":0,"1f91e-1f3fd":0,"1f91e-1f3fe":0,"1f91e-1f3ff":0,"1f91f-1f3fb":0,"1f91f-1f3fc":0,"1f91f-1f3fd":0,"1f91f-1f3fe":0,"1f91f-1f3ff":0,"1f926-1f3fb-200d-2640":0,"1f926-1f3fc-200d-2640":0,"1f926-1f3fd-200d-2640":0,"1f926-1f3fe-200d-2640":0,"1f926-1f3ff-200d-2640":0,"1f926-1f3fb-200d-2642":0,"1f926-1f3fc-200d-2642":0,"1f926-1f3fd-200d-2642":0,"1f926-1f3fe-200d-2642":0,"1f926-1f3ff-200d-2642":0,"1f926-1f3fb":0,"1f926-1f3fc":0,"1f926-1f3fd":0,"1f926-1f3fe":0,"1f926-1f3ff":0,"1f930-1f3fb":0,"1f930-1f3fc":0,"1f930-1f3fd":0,"1f930-1f3fe":0,"1f930-1f3ff":0,"1f931-1f3fb":0,"1f931-1f3fc":0,"1f931-1f3fd":0,"1f931-1f3fe":0,"1f931-1f3ff":0,"1f932-1f3fb":0,"1f932-1f3fc":0,"1f932-1f3fd":0,"1f932-1f3fe":0,"1f932-1f3ff":0,"1f933-1f3fb":0,"1f933-1f3fc":0,"1f933-1f3fd":0,"1f933-1f3fe":0,"1f933-1f3ff":0,"1f934-1f3fb":0,"1f934-1f3fc":0,"1f934-1f3fd":0,"1f934-1f3fe":0,"1f934-1f3ff":0,"1f935-1f3fb-200d-2640":0,"1f935-1f3fc-200d-2640":0,"1f935-1f3fd-200d-2640":0,"1f935-1f3fe-200d-2640":0,"1f935-1f3ff-200d-2640":0,"1f935-1f3fb-200d-2642":0,"1f935-1f3fc-200d-2642":0,"1f935-1f3fd-200d-2642":0,"1f935-1f3fe-200d-2642":0,"1f935-1f3ff-200d-2642":0,"1f935-1f3fb":0,"1f935-1f3fc":0,"1f935-1f3fd":0,"1f935-1f3fe":0,"1f935-1f3ff":0,"1f936-1f3fb":0,"1f936-1f3fc":0,"1f936-1f3fd":0,"1f936-1f3fe":0,"1f936-1f3ff":0,"1f937-1f3fb-200d-2640":0,"1f937-1f3fc-200d-2640":0,"1f937-1f3fd-200d-2640":0,"1f937-1f3fe-200d-2640":0,"1f937-1f3ff-200d-2640":0,"1f937-1f3fb-200d-2642":0,"1f937-1f3fc-200d-2642":0,"1f937-1f3fd-200d-2642":0,"1f937-1f3fe-200d-2642":0,"1f937-1f3ff-200d-2642":0,"1f937-1f3fb":0,"1f937-1f3fc":0,"1f937-1f3fd":0,"1f937-1f3fe":0,"1f937-1f3ff":0,"1f938-1f3fb-200d-2640":0,"1f938-1f3fc-200d-2640":0,"1f938-1f3fd-200d-2640":0,"1f938-1f3fe-200d-2640":0,"1f938-1f3ff-200d-2640":0,"1f938-1f3fb-200d-2642":0,"1f938-1f3fc-200d-2642":0,"1f938-1f3fd-200d-2642":0,"1f938-1f3fe-200d-2642":0,"1f938-1f3ff-200d-2642":0,"1f938-1f3fb":0,"1f938-1f3fc":0,"1f938-1f3fd":0,"1f938-1f3fe":0,"1f938-1f3ff":0,"1f939-1f3fb-200d-2640":0,"1f939-1f3fc-200d-2640":0,"1f939-1f3fd-200d-2640":0,"1f939-1f3fe-200d-2640":0,"1f939-1f3ff-200d-2640":0,"1f939-1f3fb-200d-2642":0,"1f939-1f3fc-200d-2642":0,"1f939-1f3fd-200d-2642":0,"1f939-1f3fe-200d-2642":0,"1f939-1f3ff-200d-2642":0,"1f939-1f3fb":0,"1f939-1f3fc":0,"1f939-1f3fd":0,"1f939-1f3fe":0,"1f939-1f3ff":0,"1f93d-1f3fb-200d-2640":0,"1f93d-1f3fc-200d-2640":0,"1f93d-1f3fd-200d-2640":0,"1f93d-1f3fe-200d-2640":0,"1f93d-1f3ff-200d-2640":0,"1f93d-1f3fb-200d-2642":0,"1f93d-1f3fc-200d-2642":0,"1f93d-1f3fd-200d-2642":0,"1f93d-1f3fe-200d-2642":0,"1f93d-1f3ff-200d-2642":0,"1f93d-1f3fb":0,"1f93d-1f3fc":0,"1f93d-1f3fd":0,"1f93d-1f3fe":0,"1f93d-1f3ff":0,"1f93e-1f3fb-200d-2640":0,"1f93e-1f3fc-200d-2640":0,"1f93e-1f3fd-200d-2640":0,"1f93e-1f3fe-200d-2640":0,"1f93e-1f3ff-200d-2640":0,"1f93e-1f3fb-200d-2642":0,"1f93e-1f3fc-200d-2642":0,"1f93e-1f3fd-200d-2642":0,"1f93e-1f3fe-200d-2642":0,"1f93e-1f3ff-200d-2642":0,"1f93e-1f3fb":0,"1f93e-1f3fc":0,"1f93e-1f3fd":0,"1f93e-1f3fe":0,"1f93e-1f3ff":0,"1f977-1f3fb":0,"1f977-1f3fc":0,"1f977-1f3fd":0,"1f977-1f3fe":0,"1f977-1f3ff":0,"1f9b5-1f3fb":0,"1f9b5-1f3fc":0,"1f9b5-1f3fd":0,"1f9b5-1f3fe":0,"1f9b5-1f3ff":0,"1f9b6-1f3fb":0,"1f9b6-1f3fc":0,"1f9b6-1f3fd":0,"1f9b6-1f3fe":0,"1f9b6-1f3ff":0,"1f9b8-1f3fb-200d-2640":0,"1f9b8-1f3fc-200d-2640":0,"1f9b8-1f3fd-200d-2640":0,"1f9b8-1f3fe-200d-2640":0,"1f9b8-1f3ff-200d-2640":0,"1f9b8-1f3fb-200d-2642":0,"1f9b8-1f3fc-200d-2642":0,"1f9b8-1f3fd-200d-2642":0,"1f9b8-1f3fe-200d-2642":0,"1f9b8-1f3ff-200d-2642":0,"1f9b8-1f3fb":0,"1f9b8-1f3fc":0,"1f9b8-1f3fd":0,"1f9b8-1f3fe":0,"1f9b8-1f3ff":0,"1f9b9-1f3fb-200d-2640":0,"1f9b9-1f3fc-200d-2640":0,"1f9b9-1f3fd-200d-2640":0,"1f9b9-1f3fe-200d-2640":0,"1f9b9-1f3ff-200d-2640":0,"1f9b9-1f3fb-200d-2642":0,"1f9b9-1f3fc-200d-2642":0,"1f9b9-1f3fd-200d-2642":0,"1f9b9-1f3fe-200d-2642":0,"1f9b9-1f3ff-200d-2642":0,"1f9b9-1f3fb":0,"1f9b9-1f3fc":0,"1f9b9-1f3fd":0,"1f9b9-1f3fe":0,"1f9b9-1f3ff":0,"1f9bb-1f3fb":0,"1f9bb-1f3fc":0,"1f9bb-1f3fd":0,"1f9bb-1f3fe":0,"1f9bb-1f3ff":0,"1f9cd-1f3fb-200d-2640":0,"1f9cd-1f3fc-200d-2640":0,"1f9cd-1f3fd-200d-2640":0,"1f9cd-1f3fe-200d-2640":0,"1f9cd-1f3ff-200d-2640":0,"1f9cd-1f3fb-200d-2642":0,"1f9cd-1f3fc-200d-2642":0,"1f9cd-1f3fd-200d-2642":0,"1f9cd-1f3fe-200d-2642":0,"1f9cd-1f3ff-200d-2642":0,"1f9cd-1f3fb":0,"1f9cd-1f3fc":0,"1f9cd-1f3fd":0,"1f9cd-1f3fe":0,"1f9cd-1f3ff":0,"1f9ce-1f3fb-200d-2640":0,"1f9ce-1f3fc-200d-2640":0,"1f9ce-1f3fd-200d-2640":0,"1f9ce-1f3fe-200d-2640":0,"1f9ce-1f3ff-200d-2640":0,"1f9ce-1f3fb-200d-2642":0,"1f9ce-1f3fc-200d-2642":0,"1f9ce-1f3fd-200d-2642":0,"1f9ce-1f3fe-200d-2642":0,"1f9ce-1f3ff-200d-2642":0,"1f9ce-1f3fb":0,"1f9ce-1f3fc":0,"1f9ce-1f3fd":0,"1f9ce-1f3fe":0,"1f9ce-1f3ff":0,"1f9cf-1f3fb-200d-2640":0,"1f9cf-1f3fc-200d-2640":0,"1f9cf-1f3fd-200d-2640":0,"1f9cf-1f3fe-200d-2640":0,"1f9cf-1f3ff-200d-2640":0,"1f9cf-1f3fb-200d-2642":0,"1f9cf-1f3fc-200d-2642":0,"1f9cf-1f3fd-200d-2642":0,"1f9cf-1f3fe-200d-2642":0,"1f9cf-1f3ff-200d-2642":0,"1f9cf-1f3fb":0,"1f9cf-1f3fc":0,"1f9cf-1f3fd":0,"1f9cf-1f3fe":0,"1f9cf-1f3ff":0,"1f9d1-1f3fb-200d-1f33e":0,"1f9d1-1f3fc-200d-1f33e":0,"1f9d1-1f3fd-200d-1f33e":0,"1f9d1-1f3fe-200d-1f33e":0,"1f9d1-1f3ff-200d-1f33e":0,"1f9d1-1f3fb-200d-1f373":0,"1f9d1-1f3fc-200d-1f373":0,"1f9d1-1f3fd-200d-1f373":0,"1f9d1-1f3fe-200d-1f373":0,"1f9d1-1f3ff-200d-1f373":0,"1f9d1-1f3fb-200d-1f37c":0,"1f9d1-1f3fc-200d-1f37c":0,"1f9d1-1f3fd-200d-1f37c":0,"1f9d1-1f3fe-200d-1f37c":0,"1f9d1-1f3ff-200d-1f37c":0,"1f9d1-1f3fb-200d-1f384":0,"1f9d1-1f3fc-200d-1f384":0,"1f9d1-1f3fd-200d-1f384":0,"1f9d1-1f3fe-200d-1f384":0,"1f9d1-1f3ff-200d-1f384":0,"1f9d1-1f3fb-200d-1f393":0,"1f9d1-1f3fc-200d-1f393":0,"1f9d1-1f3fd-200d-1f393":0,"1f9d1-1f3fe-200d-1f393":0,"1f9d1-1f3ff-200d-1f393":0,"1f9d1-1f3fb-200d-1f3a4":0,"1f9d1-1f3fc-200d-1f3a4":0,"1f9d1-1f3fd-200d-1f3a4":0,"1f9d1-1f3fe-200d-1f3a4":0,"1f9d1-1f3ff-200d-1f3a4":0,"1f9d1-1f3fb-200d-1f3a8":0,"1f9d1-1f3fc-200d-1f3a8":0,"1f9d1-1f3fd-200d-1f3a8":0,"1f9d1-1f3fe-200d-1f3a8":0,"1f9d1-1f3ff-200d-1f3a8":0,"1f9d1-1f3fb-200d-1f3eb":0,"1f9d1-1f3fc-200d-1f3eb":0,"1f9d1-1f3fd-200d-1f3eb":0,"1f9d1-1f3fe-200d-1f3eb":0,"1f9d1-1f3ff-200d-1f3eb":0,"1f9d1-1f3fb-200d-1f3ed":0,"1f9d1-1f3fc-200d-1f3ed":0,"1f9d1-1f3fd-200d-1f3ed":0,"1f9d1-1f3fe-200d-1f3ed":0,"1f9d1-1f3ff-200d-1f3ed":0,"1f9d1-1f3fb-200d-1f4bb":0,"1f9d1-1f3fc-200d-1f4bb":0,"1f9d1-1f3fd-200d-1f4bb":0,"1f9d1-1f3fe-200d-1f4bb":0,"1f9d1-1f3ff-200d-1f4bb":0,"1f9d1-1f3fb-200d-1f4bc":0,"1f9d1-1f3fc-200d-1f4bc":0,"1f9d1-1f3fd-200d-1f4bc":0,"1f9d1-1f3fe-200d-1f4bc":0,"1f9d1-1f3ff-200d-1f4bc":0,"1f9d1-1f3fb-200d-1f527":0,"1f9d1-1f3fc-200d-1f527":0,"1f9d1-1f3fd-200d-1f527":0,"1f9d1-1f3fe-200d-1f527":0,"1f9d1-1f3ff-200d-1f527":0,"1f9d1-1f3fb-200d-1f52c":0,"1f9d1-1f3fc-200d-1f52c":0,"1f9d1-1f3fd-200d-1f52c":0,"1f9d1-1f3fe-200d-1f52c":0,"1f9d1-1f3ff-200d-1f52c":0,"1f9d1-1f3fb-200d-1f680":0,"1f9d1-1f3fc-200d-1f680":0,"1f9d1-1f3fd-200d-1f680":0,"1f9d1-1f3fe-200d-1f680":0,"1f9d1-1f3ff-200d-1f680":0,"1f9d1-1f3fb-200d-1f692":0,"1f9d1-1f3fc-200d-1f692":0,"1f9d1-1f3fd-200d-1f692":0,"1f9d1-1f3fe-200d-1f692":0,"1f9d1-1f3ff-200d-1f692":0,"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb":0,"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc":0,"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd":0,"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe":0,"1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff":0,"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb":0,"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc":0,"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd":0,"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe":0,"1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff":0,"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb":0,"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc":0,"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd":0,"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe":0,"1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff":0,"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb":0,"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc":0,"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd":0,"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe":0,"1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff":0,"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb":0,"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc":0,"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd":0,"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe":0,"1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff":0,"1f9d1-1f3fb-200d-1f9af":0,"1f9d1-1f3fc-200d-1f9af":0,"1f9d1-1f3fd-200d-1f9af":0,"1f9d1-1f3fe-200d-1f9af":0,"1f9d1-1f3ff-200d-1f9af":0,"1f9d1-1f3fb-200d-1f9b0":0,"1f9d1-1f3fc-200d-1f9b0":0,"1f9d1-1f3fd-200d-1f9b0":0,"1f9d1-1f3fe-200d-1f9b0":0,"1f9d1-1f3ff-200d-1f9b0":0,"1f9d1-1f3fb-200d-1f9b1":0,"1f9d1-1f3fc-200d-1f9b1":0,"1f9d1-1f3fd-200d-1f9b1":0,"1f9d1-1f3fe-200d-1f9b1":0,"1f9d1-1f3ff-200d-1f9b1":0,"1f9d1-1f3fb-200d-1f9b2":0,"1f9d1-1f3fc-200d-1f9b2":0,"1f9d1-1f3fd-200d-1f9b2":0,"1f9d1-1f3fe-200d-1f9b2":0,"1f9d1-1f3ff-200d-1f9b2":0,"1f9d1-1f3fb-200d-1f9b3":0,"1f9d1-1f3fc-200d-1f9b3":0,"1f9d1-1f3fd-200d-1f9b3":0,"1f9d1-1f3fe-200d-1f9b3":0,"1f9d1-1f3ff-200d-1f9b3":0,"1f9d1-1f3fb-200d-1f9bc":0,"1f9d1-1f3fc-200d-1f9bc":0,"1f9d1-1f3fd-200d-1f9bc":0,"1f9d1-1f3fe-200d-1f9bc":0,"1f9d1-1f3ff-200d-1f9bc":0,"1f9d1-1f3fb-200d-1f9bd":0,"1f9d1-1f3fc-200d-1f9bd":0,"1f9d1-1f3fd-200d-1f9bd":0,"1f9d1-1f3fe-200d-1f9bd":0,"1f9d1-1f3ff-200d-1f9bd":0,"1f9d1-1f3fb-200d-2695":0,"1f9d1-1f3fc-200d-2695":0,"1f9d1-1f3fd-200d-2695":0,"1f9d1-1f3fe-200d-2695":0,"1f9d1-1f3ff-200d-2695":0,"1f9d1-1f3fb-200d-2696":0,"1f9d1-1f3fc-200d-2696":0,"1f9d1-1f3fd-200d-2696":0,"1f9d1-1f3fe-200d-2696":0,"1f9d1-1f3ff-200d-2696":0,"1f9d1-1f3fb-200d-2708":0,"1f9d1-1f3fc-200d-2708":0,"1f9d1-1f3fd-200d-2708":0,"1f9d1-1f3fe-200d-2708":0,"1f9d1-1f3ff-200d-2708":0,"1f9d1-1f3fb":0,"1f9d1-1f3fc":0,"1f9d1-1f3fd":0,"1f9d1-1f3fe":0,"1f9d1-1f3ff":0,"1f9d2-1f3fb":0,"1f9d2-1f3fc":0,"1f9d2-1f3fd":0,"1f9d2-1f3fe":0,"1f9d2-1f3ff":0,"1f9d3-1f3fb":0,"1f9d3-1f3fc":0,"1f9d3-1f3fd":0,"1f9d3-1f3fe":0,"1f9d3-1f3ff":0,"1f9d4-1f3fb-200d-2640":0,"1f9d4-1f3fc-200d-2640":0,"1f9d4-1f3fd-200d-2640":0,"1f9d4-1f3fe-200d-2640":0,"1f9d4-1f3ff-200d-2640":0,"1f9d4-1f3fb-200d-2642":0,"1f9d4-1f3fc-200d-2642":0,"1f9d4-1f3fd-200d-2642":0,"1f9d4-1f3fe-200d-2642":0,"1f9d4-1f3ff-200d-2642":0,"1f9d4-1f3fb":0,"1f9d4-1f3fc":0,"1f9d4-1f3fd":0,"1f9d4-1f3fe":0,"1f9d4-1f3ff":0,"1f9d5-1f3fb":0,"1f9d5-1f3fc":0,"1f9d5-1f3fd":0,"1f9d5-1f3fe":0,"1f9d5-1f3ff":0,"1f9d6-1f3fb-200d-2640":0,"1f9d6-1f3fc-200d-2640":0,"1f9d6-1f3fd-200d-2640":0,"1f9d6-1f3fe-200d-2640":0,"1f9d6-1f3ff-200d-2640":0,"1f9d6-1f3fb-200d-2642":0,"1f9d6-1f3fc-200d-2642":0,"1f9d6-1f3fd-200d-2642":0,"1f9d6-1f3fe-200d-2642":0,"1f9d6-1f3ff-200d-2642":0,"1f9d6-1f3fb":0,"1f9d6-1f3fc":0,"1f9d6-1f3fd":0,"1f9d6-1f3fe":0,"1f9d6-1f3ff":0,"1f9d7-1f3fb-200d-2640":0,"1f9d7-1f3fc-200d-2640":0,"1f9d7-1f3fd-200d-2640":0,"1f9d7-1f3fe-200d-2640":0,"1f9d7-1f3ff-200d-2640":0,"1f9d7-1f3fb-200d-2642":0,"1f9d7-1f3fc-200d-2642":0,"1f9d7-1f3fd-200d-2642":0,"1f9d7-1f3fe-200d-2642":0,"1f9d7-1f3ff-200d-2642":0,"1f9d7-1f3fb":0,"1f9d7-1f3fc":0,"1f9d7-1f3fd":0,"1f9d7-1f3fe":0,"1f9d7-1f3ff":0,"1f9d8-1f3fb-200d-2640":0,"1f9d8-1f3fc-200d-2640":0,"1f9d8-1f3fd-200d-2640":0,"1f9d8-1f3fe-200d-2640":0,"1f9d8-1f3ff-200d-2640":0,"1f9d8-1f3fb-200d-2642":0,"1f9d8-1f3fc-200d-2642":0,"1f9d8-1f3fd-200d-2642":0,"1f9d8-1f3fe-200d-2642":0,"1f9d8-1f3ff-200d-2642":0,"1f9d8-1f3fb":0,"1f9d8-1f3fc":0,"1f9d8-1f3fd":0,"1f9d8-1f3fe":0,"1f9d8-1f3ff":0,"1f9d9-1f3fb-200d-2640":0,"1f9d9-1f3fc-200d-2640":0,"1f9d9-1f3fd-200d-2640":0,"1f9d9-1f3fe-200d-2640":0,"1f9d9-1f3ff-200d-2640":0,"1f9d9-1f3fb-200d-2642":0,"1f9d9-1f3fc-200d-2642":0,"1f9d9-1f3fd-200d-2642":0,"1f9d9-1f3fe-200d-2642":0,"1f9d9-1f3ff-200d-2642":0,"1f9d9-1f3fb":0,"1f9d9-1f3fc":0,"1f9d9-1f3fd":0,"1f9d9-1f3fe":0,"1f9d9-1f3ff":0,"1f9da-1f3fb-200d-2640":0,"1f9da-1f3fc-200d-2640":0,"1f9da-1f3fd-200d-2640":0,"1f9da-1f3fe-200d-2640":0,"1f9da-1f3ff-200d-2640":0,"1f9da-1f3fb-200d-2642":0,"1f9da-1f3fc-200d-2642":0,"1f9da-1f3fd-200d-2642":0,"1f9da-1f3fe-200d-2642":0,"1f9da-1f3ff-200d-2642":0,"1f9da-1f3fb":0,"1f9da-1f3fc":0,"1f9da-1f3fd":0,"1f9da-1f3fe":0,"1f9da-1f3ff":0,"1f9db-1f3fb-200d-2640":0,"1f9db-1f3fc-200d-2640":0,"1f9db-1f3fd-200d-2640":0,"1f9db-1f3fe-200d-2640":0,"1f9db-1f3ff-200d-2640":0,"1f9db-1f3fb-200d-2642":0,"1f9db-1f3fc-200d-2642":0,"1f9db-1f3fd-200d-2642":0,"1f9db-1f3fe-200d-2642":0,"1f9db-1f3ff-200d-2642":0,"1f9db-1f3fb":0,"1f9db-1f3fc":0,"1f9db-1f3fd":0,"1f9db-1f3fe":0,"1f9db-1f3ff":0,"1f9dc-1f3fb-200d-2640":0,"1f9dc-1f3fc-200d-2640":0,"1f9dc-1f3fd-200d-2640":0,"1f9dc-1f3fe-200d-2640":0,"1f9dc-1f3ff-200d-2640":0,"1f9dc-1f3fb-200d-2642":0,"1f9dc-1f3fc-200d-2642":0,"1f9dc-1f3fd-200d-2642":0,"1f9dc-1f3fe-200d-2642":0,"1f9dc-1f3ff-200d-2642":0,"1f9dc-1f3fb":0,"1f9dc-1f3fc":0,"1f9dc-1f3fd":0,"1f9dc-1f3fe":0,"1f9dc-1f3ff":0,"1f9dd-1f3fb-200d-2640":0,"1f9dd-1f3fc-200d-2640":0,"1f9dd-1f3fd-200d-2640":0,"1f9dd-1f3fe-200d-2640":0,"1f9dd-1f3ff-200d-2640":0,"1f9dd-1f3fb-200d-2642":0,"1f9dd-1f3fc-200d-2642":0,"1f9dd-1f3fd-200d-2642":0,"1f9dd-1f3fe-200d-2642":0,"1f9dd-1f3ff-200d-2642":0,"1f9dd-1f3fb":0,"1f9dd-1f3fc":0,"1f9dd-1f3fd":0,"1f9dd-1f3fe":0,"1f9dd-1f3ff":0,"261d-1f3fb":0,"261d-1f3fc":0,"261d-1f3fd":0,"261d-1f3fe":0,"261d-1f3ff":0,"26f9-1f3fb-200d-2640":0,"26f9-1f3fc-200d-2640":0,"26f9-1f3fd-200d-2640":0,"26f9-1f3fe-200d-2640":0,"26f9-1f3ff-200d-2640":0,"26f9-1f3fb-200d-2642":0,"26f9-1f3fc-200d-2642":0,"26f9-1f3fd-200d-2642":0,"26f9-1f3fe-200d-2642":0,"26f9-1f3ff-200d-2642":0,"26f9-1f3fb":0,"26f9-1f3fc":0,"26f9-1f3fd":0,"26f9-1f3fe":0,"26f9-1f3ff":0,"270a-1f3fb":0,"270a-1f3fc":0,"270a-1f3fd":0,"270a-1f3fe":0,"270a-1f3ff":0,"270b-1f3fb":0,"270b-1f3fc":0,"270b-1f3fd":0,"270b-1f3fe":0,"270b-1f3ff":0,"270c-1f3fb":0,"270c-1f3fc":0,"270c-1f3fd":0,"270c-1f3fe":0,"270c-1f3ff":0,"270d-1f3fb":0,"270d-1f3fc":0,"270d-1f3fd":0,"270d-1f3fe":0,"270d-1f3ff":0}},n=s[""];for(const e in s)e&&Object.assign(n,s[e]);const i=n},4762:(e,t,a)=>{a.d(t,{IS_FIREFOX:()=>r,IS_SAFARI:()=>i});var s=a(6761);const n=navigator?navigator.userAgent:null,i=(navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i),navigator.userAgent.toLowerCase().indexOf("android"),/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&s.Z.MSStream,!!("safari"in s.Z)||!(!n||!(/\b(iPad|iPhone|iPod)\b/.test(n)||n.match("Safari")&&!n.match("Chrome")))),r=navigator.userAgent.toLowerCase().indexOf("firefox")>-1;(void 0===navigator.maxTouchPoints||navigator.maxTouchPoints>0)&&navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i)},467:(e,t,a)=>{a.d(t,{ZP:()=>o,gV:()=>p});var s=a(5813);const n=/[`~!@#$%^&*()\-_=+\[\]\\|{}'";:\/?.>,<]+/g,i=/^\s+|\s$/g,r={й:"q",ц:"w",у:"e",к:"r",е:"t",н:"y",г:"u",ш:"i",щ:"o",з:"p",Ñ…:"[",ÑŠ:"]",Ñ„:"a",Ñ‹:"s",в:"d",а:"f",п:"g",Ñ€:"h",о:"j",л:"k",д:"l",ж:";",Ñ:"'",Ñ:"z",ч:"x",Ñ:"c",м:"v",и:"b",Ñ‚:"n",ÑŒ:"m",б:",",ÑŽ:".",".":"/"};function o(e,t=!0){return p(e,{clearBadChars:!0,latinize:t,ignoreCase:!0})}function p(e,t={}){const a=t.includeTag&&"%"===e.charAt(0),o=e;return t.clearBadChars&&(e=function(e){return e.replace(n,"").replace(i,"")}(e)),t.latinize&&(e=function(e){return e.replace(/[^A-Za-z0-9]/g,(e=>{const t=s.Z[e];return null!=t?t:e}))}(e)),t.ignoreCase&&(e=e.toLowerCase()),a&&(e="%"+e),t.latinize&&(e+=""+function(e){return e.toLowerCase().replace(/[\wа-Ñ]/g,(e=>{const t=r[e];return null!=t?t:e}))}(o)),e}},8801:(e,t,a)=>{a.d(t,{P:()=>n,q:()=>i});const s="_";function n(e,t){const a=""["".length-1]||"";let n;switch(e._){case"inputPhotoFileLocation":n=["photo",""[0],e.id,e.thumb_size].filter(Boolean).join(s);break;case"inputDocumentFileLocation":n=["document",""[0],e.id,e.thumb_size].filter(Boolean).join(s);break;case"inputPeerPhotoFileLocation":n=["peerPhoto",e.photo_id,e.pFlags.big?"big":"small"].join(s);break;case"inputStickerSetThumb":n=["stickerSetThumb",e.stickerset.id||e.stickerset.short_name||e.stickerset.emoticon||e.stickerset._,e.thumb_version].join(s);break;case"inputFileLocation":n=[e.volume_id,e.local_id].join(s);break;case"inputWebFileLocation":n=["webFile",e.url].join(s);break;default:console.error("Unrecognized location:",e),n=""}return n+((null==t?void 0:t.downloadId)?"_download":"")+(a?"."+a:a)}function i(e,t){return e+"/"+encodeURIComponent(JSON.stringify(t))}},677:(e,t,a)=>{a.d(t,{Ki:()=>o,RP:()=>i,X:()=>r});const s=new Set(["all","web","webk"]),n=new Set;function i(e){return e.find((e=>s.has(e.platform)&&!n.has(e.reason)))}function r(e){return!!i(e)}function o(e){n.clear(),e.forEach((e=>{n.add(e)}))}},2946:(e,t,a)=>{a.d(t,{Z:()=>i});var s=a(5880),n=a(1507);function i(e){if(void 0!==e&&e.isPeerId&&e.isPeerId())return e;if((0,s.Z)(e)){const t=e.user_id;if(void 0!==t)return t.toPeerId(!1);const a=e.channel_id||e.chat_id;return void 0!==a?a.toPeerId(!0):n.NM}if(!e)return n.NM;const t="u"===e.charAt(0),a=e.substr(1).split("_");return t?a[0].toPeerId():(a[0]||"").toPeerId(!0)}},6666:(e,t,a)=>{a.d(t,{C:()=>o,Z:()=>p});var s=a(1267),n=a(5471),i=a(5953),r=a(5003);class o{constructor(e){(0,i.Z)(this,e),s.Z.test&&(this.name+="_test"),this.storageIsAvailable=!0,this.log=(0,r.kg)(["IDB",e.name].join("-")),this.log("constructor"),this.openDatabase(!0),o.INSTANCES.push(this)}isAvailable(){return this.storageIsAvailable}openDatabase(e=!1){if(this.openDbPromise&&!e)return this.openDbPromise;const t=(e,t)=>{var a;const s=Array.from(e.indexNames);for(const t of s)e.deleteIndex(t);if(null===(a=t.indexes)||void 0===a?void 0:a.length)for(const a of t.indexes)e.indexNames.contains(a.indexName)||e.createIndex(a.indexName,a.keyPath,a.objectParameters)};try{var a=indexedDB.open(this.name,this.version);if(!a)return Promise.reject()}catch(e){return this.log.error("error opening db",e.message),this.storageIsAvailable=!1,Promise.reject(e)}let s=!1;return setTimeout((()=>{s||a.onerror((0,n.Z)("IDB_CREATE_TIMEOUT"))}),3e3),this.openDbPromise=new Promise(((e,n)=>{a.onsuccess=t=>{s=!0;const i=a.result;let r=!1;this.log("Opened"),i.onerror=e=>{this.storageIsAvailable=!1,this.log.error("Error creating/accessing IndexedDB database",e),n(e)},i.onclose=e=>{this.log.error("closed:",e),!r&&this.openDatabase()},i.onabort=e=>{this.log.error("abort:",e);const t=e.target;this.openDatabase(r=!0),t.onerror&&t.onerror(e),i.close()},i.onversionchange=e=>{this.log.error("onversionchange, lol?")},e(this.db=i)},a.onerror=e=>{s=!0,this.storageIsAvailable=!1,this.log.error("Error creating/accessing IndexedDB database",e),n(e)},a.onupgradeneeded=e=>{s=!0,this.log.warn("performing idb upgrade from",e.oldVersion,"to",e.newVersion);const a=e.target,n=a.result;this.stores.forEach((e=>{if(n.objectStoreNames.contains(e.name)){const s=a.transaction.objectStore(e.name);t(s,e)}else((e,a)=>{const s=e.createObjectStore(a.name);t(s,a)})(n,e)}))}}))}static create(e){var t;return null!==(t=this.INSTANCES.find((t=>t.name===e.name)))&&void 0!==t?t:new o(e)}static closeDatabases(e){this.INSTANCES.forEach((t=>{if(e&&e===t)return;const a=t.db;a&&(a.onclose=()=>{},a.close())}))}}o.INSTANCES=[];class p{constructor(e,t){this.storeName=t,this.log=(0,r.kg)(["IDB",e.name,t].join("-")),this.idb=o.create(e)}delete(e,t){const a=Array.isArray(e);return a||(e=[].concat(e)),this.getObjectStore("readwrite",(t=>{const s=e.map((e=>t.delete(e)));return a?s:s[0]}),"",t)}clear(e){return this.getObjectStore("readwrite",(e=>e.clear()),"",e)}save(e,t,a){const s=Array.isArray(e);return s||(e=[].concat(e),t=[].concat(t)),this.getObjectStore("readwrite",(a=>{const n=e.map(((e,s)=>a.put(t[s],e)));return s?n:n[0]}),"",a)}get(e,t){const a=Array.isArray(e);if(a){if(!e.length)return Promise.resolve([])}else{if(!e)return;e=[].concat(e)}return this.getObjectStore("readonly",(t=>{const s=e.map((e=>t.get(e)));return a?s:s[0]}),"",t)}getObjectStore(e,t,a,s=this.storeName){let n;return a&&(n=performance.now(),this.log(a+": start")),this.idb.openDatabase().then((i=>new Promise(((r,o)=>{const p=i.transaction([s],e),d=()=>{clearTimeout(l),o(p.error)},f=()=>{clearTimeout(l),a&&this.log(a+": end",performance.now()-n);const e=h.map((e=>e.result));r(g?e:e[0])};p.onerror=d;const c="readwrite"===e;c&&(p.oncomplete=()=>f());const l=setTimeout((()=>{this.log.error("transaction not finished",p,a)}),1e4),m=t(p.objectStore(s)),g=Array.isArray(m),h=g?m:[].concat(m);if(c)return;const u=h.length;let y=u;const _=()=>{p.error||--y||f()};for(let e=0;e<u;++e){const t=h[e];t.onerror=d,t.onsuccess=_}}))))}getAll(e){return this.getObjectStore("readonly",(e=>e.getAll()),"",e)}}},9092:(e,t,a)=>{a.d(t,{r:()=>Ks,H:()=>zs}),a(690),a(4110);var s=a(8630);let n;function i(){return n}function r(e){return n=e}var o=a(1507),p=a(3241),d=a(410),f=a(3206),c=a(1352);class l extends p.Z{constructor(){super(),this.myId=o.NM,this.connectionStatus={},this.premium=!1,this.addEventListener("user_auth",(({id:e})=>{this.myId=e.toPeerId()})),this.addEventListener("premium_toggle_private",(({isNew:e,isPremium:t})=>{this.premium=t,this.dispatchEventSingle("premium_toggle",t)})),this.addEventListener("connection_status_change",(e=>{this.connectionStatus[e.name]=e})),this.dispatchEvent=(e,...t)=>{super.dispatchEvent(e,...t),f.Z.getInstance().invokeVoid("event",{name:e,args:t})},c.kC||this.addEventListener("settings_updated",(({settings:e})=>{this.settings=e}))}getConnectionStatus(){return this.connectionStatus}getPremium(){return this.premium}dispatchEventSingle(...e){super.dispatchEvent(...e)}}const m=new l;d.GO.rootScope=m;const g=m;var h=a(7922),u=a(9750);const y=new class{constructor(){this.state={},this.storage=h.Z}getState(){return Promise.resolve(this.state)}setByKey(e,t){!function(e,t,a){const s=t.split(".");(0,u.Z)(e,s.slice(0,-1).join("."))[s.pop()]=a}(this.state,e,t);const a=e.split(".")[0];"settings"===a&&g.dispatchEvent("settings_updated",{key:e,value:t,settings:this.state.settings}),this.pushToState(a,this.state[a])}pushToState(e,t,a=!0,s){a&&(this.state[e]=t),this.setKeyValueToStorage(e,t,s)}setKeyValueToStorage(e,t=this.state[e],a){f.Z.getInstance().invokeVoid("mirror",{name:"state",key:e,value:t}),this.storage.set({[e]:t},a)}};var _=a(4159),v=a(3725),P=a(5418),b=a(1267),M=a(1655),S=a(5003);class I{constructor(e,t,a){this.dcId=e,this.url=t,this.pending=[],this.debug=b.Z.debug&&!1;let s=S.v9.Error|S.v9.Log;this.debug&&(s|=S.v9.Debug),this.log=(0,S.kg)(`HTTP-${e}`+a,s),this.log("constructor"),this.connected=!1}_send(e,t){const a=e.length;return this.debug&&this.log.debug("-> body length to send:",a),fetch(this.url,{method:"POST",body:e,mode:t}).then((e=>{if(200!==e.status&&!t)throw e.arrayBuffer().then((e=>{this.log.error("not 200",new TextDecoder("utf-8").decode(new Uint8Array(e)))})),e;return this.setConnected(!0),e.arrayBuffer().then((e=>new Uint8Array(e)))}),(e=>{throw this.setConnected(!1),e}))}setConnected(e){this.connected===e||this.destroyed||(this.connected=e,Z.setTransportValue("https",e))}destroy(){this.setConnected(!1),this.destroyed=!0,this.pending.forEach((e=>e.reject())),this.pending.length=0}send(e){if(this.networker)return this._send(e);{const t=new Promise(((t,a)=>{this.pending.push({resolve:t,reject:a,body:e})}));return this.releasePending(),t}}releasePending(){return e=this,t=void 0,s=function*(){if(!this.releasing){this.releasing=!0;for(let e=0;e<this.pending.length;++e){const t=this.pending[e],{body:a,resolve:s}=t;try{s(yield this._send(a)),this.pending.splice(e,1)}catch(e){this.log.error("Send plain request error:",e),yield(0,P.Z)(5e3)}--e}this.releasing=!1}},new((a=void 0)||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}));var e,t,a,s}}class C extends p.Z{constructor(e,t,a){super(),this.dcId=e,this.url=t,this.debug=b.Z.debug&&!1,this.handleOpen=()=>{this.log("opened"),this.debug&&this.log.debug("sending init packet"),this.dispatchEvent("open")},this.handleError=e=>{this.log.error("handleError",e),this.close()},this.handleClose=e=>{this.log("closed",e),this.removeListeners(),this.dispatchEvent("close")},this.handleMessage=e=>{this.debug&&this.log.debug("<-","handleMessage",e.data.byteLength),this.dispatchEvent("message",e.data)},this.send=e=>{this.debug&&this.log.debug("-> body length to send:",e.length),this.ws.send(e)};let s=S.v9.Error|S.v9.Log;return this.debug&&(s|=S.v9.Debug),this.log=(0,S.kg)(`WS-${e}`+a,s),this.log("constructor"),this.connect(),this}removeListeners(){this.ws&&(this.ws.removeEventListener("open",this.handleOpen),this.ws.removeEventListener("close",this.handleClose),this.ws.removeEventListener("error",this.handleError),this.ws.removeEventListener("message",this.handleMessage),this.ws=void 0)}connect(){this.ws=new WebSocket(this.url,"binary"),this.ws.binaryType="arraybuffer",this.ws.addEventListener("open",this.handleOpen),this.ws.addEventListener("close",this.handleClose),this.ws.addEventListener("error",this.handleError),this.ws.addEventListener("message",this.handleMessage)}close(){if(this.ws){this.log("close execution");try{this.ws.close()}catch(e){}this.handleClose()}}}function w(e){if(!crypto||!("getRandomValues"in crypto))throw new Error("NO_SECURE_RANDOM");return crypto.getRandomValues(e),e}var k=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class A{constructor(){this._process=(e,t)=>s.Z.invokeCryptoNew({method:"aes-ctr-process",args:[{id:this.id,data:e,operation:t}],transfer:[e.buffer]})}init(e){return k(this,void 0,void 0,(function*(){void 0!==this.idPromise&&this.release();const t=new Uint8Array(64);for(w(t);;){const e=t[3]<<24|t[2]<<16|t[1]<<8|t[0],a=t[7]<<24|t[6]<<16|t[5]<<8|t[4];if(239!==t[0]&&1145128264!==e&&1414745936!==e&&542393671!==e&&1230262351!==e&&4008636142!==e&&3722304989!==e&&0!==a)break;w(t)}const a=t.slice().reverse(),n=t.slice(8,40),i=t.slice(40,56),r=a.slice(8,40),o=a.slice(40,56),p=this.idPromise=s.Z.invokeCrypto("aes-ctr-prepare",{encKey:n,encIv:i,decKey:r,decIv:o});this.process=(e,t)=>k(this,void 0,void 0,(function*(){return yield p,this._process(e,t)})),this.id=yield p,this.process=this._process,t.set(e.obfuscateTag,56);const d=yield this.encode(t.slice());return t.set(d.slice(56,64),56),t}))}encode(e){return this.process(e,"encrypt")}decode(e){return this.process(e,"decrypt")}release(){return k(this,void 0,void 0,(function*(){const e=this.idPromise;if(void 0===e)return;this.id=void 0,this.idPromise=void 0;const t=yield e;s.Z.invokeCrypto("aes-ctr-destroy",t)}))}destroy(){this.release()}}const U=new class{constructor(){this.tag=239,this.obfuscateTag=new Uint8Array([this.tag,this.tag,this.tag,this.tag])}encodePacket(e){const t=e.byteLength>>2;let a;return a=t<127?new Uint8Array([t]):new Uint8Array([127,255&t,t>>8&255,t>>16&255]),a.concat(e)}readPacket(e){let t=e[0];return t>=127?(t=e[1]|e[2]<<8|e[3]<<16,e.slice(4,t<<3)):e.slice(1,t<<3)}};var D=a(9174);function E(e){const t=e.length,a=new Array(t);for(let s=0;s<t;++s)a[s]=(e[s]<16?"0":"")+(e[s]||0).toString(16);return a.join("")}var T=a(6761),F=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class R{constructor(e,t,a,s,n){this.Connection=e,this.dcId=t,this.url=a,this.logSuffix=s,this.retryTimeout=n,this.codec=U,this.obfuscation=new A,this.pending=[],this.debug=b.Z.debug&&!1,this.connected=!1,this.autoReconnect=!0,this.onOpen=()=>F(this,void 0,void 0,(function*(){this.connected=!0,Z.setTransportOpened("websocket");const e=yield this.obfuscation.init(this.codec);this.connected&&(this.connection.send(e),this.networker&&(this.pending.length=0,this.networker.setConnectionStatus(D.Q.Connected),this.networker.cleanupSent(),this.networker.resend()),setTimeout((()=>{this.releasePending()}),0))})),this.onMessage=e=>F(this,void 0,void 0,(function*(){let t=yield this.obfuscation.decode(new Uint8Array(e));if(t=this.codec.readPacket(t),this.networker)return this.debug&&this.log.debug("redirecting to networker",t.length),void this.networker.parseResponse(t).then((e=>{this.debug&&this.log.debug("redirecting to networker response:",e);try{this.networker.processMessage(e.response,e.messageId,e.sessionId)}catch(e){this.log.error("handleMessage networker processMessage error",e)}})).catch((e=>{this.log.error("handleMessage networker parseResponse error",e)}));const a=this.pending.shift();a?a.resolve(t):this.debug&&this.log.debug("no pending for res:",E(t))})),this.onClose=()=>{let e,t;if(this.clear(),this.autoReconnect){const a=Date.now(),s=a-this.lastCloseTime;e=!isNaN(s)&&s<this.retryTimeout?this.retryTimeout-s:0,t=a+e}this.networker&&(this.networker.setConnectionStatus(D.Q.Closed,t),this.pending.length=0),this.autoReconnect?(this.log("will try to reconnect after timeout:",e/1e3),this.reconnectTimeout=T.Z.setTimeout(this.reconnect,e)):this.log("reconnect isn't needed")},this.reconnect=()=>{if(void 0!==this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),!this.connection){if(this.log("trying to reconnect..."),this.lastCloseTime=Date.now(),this.networker)this.networker.setConnectionStatus(D.Q.Connecting);else for(const e of this.pending)e.bodySent&&(e.bodySent=!1);this.connect()}};let i=S.v9.Error|S.v9.Log;this.debug&&(i|=S.v9.Debug),this.log=(0,S.kg)(`TCP-${t}`+s,i),this.log("constructor"),this.connect()}clear(){this.connected&&Z.setTransportClosed("websocket"),this.connected=!1,this.connection&&(this.connection.removeEventListener("open",this.onOpen),this.connection.removeEventListener("close",this.onClose),this.connection.removeEventListener("message",this.onMessage),this.connection=void 0)}forceReconnect(){this.close(),this.reconnect()}destroy(){this.setAutoReconnect(!1),this.close(),this.obfuscation&&this.obfuscation.destroy(),this.pending.forEach((e=>{e.reject&&e.reject()})),this.pending.length=0}close(){const e=this.connection;if(e){const t=this.connected;this.clear(),t&&(e.addEventListener("message",this.onMessage),e.addEventListener("close",(()=>{e.removeEventListener("message",this.onMessage)}),{once:!0}),e.close())}}setAutoReconnect(e){this.autoReconnect=e,e?this.connection||void 0!==this.reconnectTimeout||this.reconnect():void 0!==this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0)}connect(){this.connection&&this.close(),this.connection=new this.Connection(this.dcId,this.url,this.logSuffix),this.connection.addEventListener("open",this.onOpen),this.connection.addEventListener("close",this.onClose),this.connection.addEventListener("message",this.onMessage)}changeUrl(e){this.url!==e&&(this.url=e,this.forceReconnect())}encodeBody(e){const t=this.codec.encodePacket(e);return this.obfuscation.encode(t)}send(e){this.debug&&this.log.debug("-> body length to pending:",e.length);const t=void 0;if(!this.networker){const a=new Promise(((a,s)=>{this.pending.push({resolve:a,reject:s,body:e,encoded:t})}));return this.releasePending(),a}this.pending.push({body:e,encoded:t}),this.releasePending()}releasePending(){var e;return F(this,void 0,void 0,(function*(){if(!this.connected||this.releasingPending)return;this.releasingPending=!0;let t=this.pending.length,a=!1;for(let s=0;s<t;++s){const n=this.pending[s];if(!n)break;const{body:i,bodySent:r}=n;if(i&&!r){this.debug&&this.log.debug("-> body length to send:",i.length);const r=null!==(e=n.encoded)&&void 0!==e?e:n.encoded=yield this.encodeBody(i);if(!this.connected)break;this.connection.send(r),n.resolve?n.bodySent=!0:(this.pending.splice(s--,1),t--),a=!0}}this.releasingPending=void 0,this.pending.length&&a&&this.releasePending()}))}}const x=b.Z.test?"_test":"";function B(e){return"client"===e?"":"-1"}function V(e,t,a){const s=B(t),n="client"!==t?"apiws"+x+(a?"_premium":""):"apiws"+x;return`wss://${_.Z.suffix.toLowerCase()}ws${e}${s}.web.telegram.org/${n}`}class O{constructor(){this.sslSubdomains=["pluto","venus","aurora","vesta","flora"],this.dcOptions=b.Z.test?[{id:1,host:"149.154.175.10",port:80},{id:2,host:"149.154.167.40",port:80},{id:3,host:"149.154.175.117",port:80}]:[{id:1,host:"149.154.175.50",port:80},{id:2,host:"149.154.167.50",port:80},{id:3,host:"149.154.175.100",port:80},{id:4,host:"149.154.167.91",port:80},{id:5,host:"149.154.171.5",port:80}],this.chosenServers={},this.transportSocket=(e,t,a)=>{const s=V(e,t,a);let n;return n=C,new R(n,e,s,"upload"===t?"-U":"download"===t?"-D":"",1e4)},this.transportHTTP=(e,t,a)=>{let s;if(b.Z.ssl||!b.Z.http){const a=B(t);s="https://"+(this.sslSubdomains[e-1]+a)+".web.telegram.org/"+(b.Z.test?"apiw_test1":"apiw1")}else for(const t of this.dcOptions)if(t.id===e){s="http://"+t.host+(80!==t.port?":"+t.port:"")+"/apiw1";break}return new I(e,s,"upload"===t?"-U":"download"===t?"-D":"")}}chooseServer(e,t="client",a=b.Z.transport,s=!0,n){this.chosenServers.hasOwnProperty(a)||(this.chosenServers[a]={client:{},download:{},upload:{}});const i=this.chosenServers[a][t];e in i||(i[e]=[]);const r=i[e];if(!r.length||!s){let i;return i=("websocket"===a?this.transportSocket:this.transportHTTP)(e,t,n),i?(s&&r.push(i),i):(console.error("No chosenServer!",e),null)}return r[0]}static removeTransport(e,t){for(const a in e)for(const s in e[a])for(const n in e[a][s]){const i=e[a][s][n];(0,M.Z)(i,t)}}}var L=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class N extends p.Z{constructor(){super(!0),this.opened=new Map,this.addEventListener("change",(e=>{e.get("websocket")||this.waitForWebSocket()}))}pingTransports(){var e;return L(this,void 0,void 0,(function*(){const t=null!==(e=this.dcConfigurator)&&void 0!==e?e:this.dcConfigurator=new O,a=this.transports={https:t.chooseServer(_.Z.baseDcId,"client","https",!1),websocket:t.chooseServer(_.Z.baseDcId,"client","websocket",!1)},s=(0,v.Z)();this.transports.https._send(new Uint8Array,"no-cors").then((()=>s.resolve(!0)),(()=>s.resolve(!1))),setTimeout((()=>s.resolve(!1)),2e3);const n=(0,v.Z)(),i=a.websocket;i.setAutoReconnect(!1),i.connection.addEventListener("close",(()=>n.resolve(!1)),{once:!0}),i.connection.addEventListener("open",(()=>n.resolve(!0)),{once:!0}),setTimeout((()=>{n.isFulfilled||n.isRejected||(i.connection&&i.connection.close(),n.resolve(!1))}),2e3);const[r,o]=yield Promise.all([s,n]);for(const e in a)a[e].destroy();return{https:r||this.opened.get("https")>0,websocket:o||this.opened.get("websocket")>0}}))}waitForWebSocket(){return L(this,void 0,void 0,(function*(){if(!this.pinging){for(this.pinging=!0;;){const{https:e,websocket:t}=yield this.pingTransports();if((e||t)&&this.dispatchEvent("transport",t||!e?"websocket":"https"),t)break;yield(0,P.Z)(1e4)}this.pinging=!1}}))}setTransportValue(e,t){let a=this.opened.get(e)||0;a+=t?1:-1,this.opened.set(e,a),this.dispatchEvent("change",this.opened)}setTransportOpened(e){return this.setTransportValue(e,!0)}setTransportClosed(e){return this.setTransportValue(e,!1)}}const Z=new N,j=(0,v.Z)();var q=a(6654);class G{setManagers(e){Object.assign(this,e)}}var H=a(3127),W=a(3989),z=a(5466);let K;function J(e){return null!=K?K:K=function(e){return t=this,a=void 0,n=function*(){const t=(0,z.$)((0,S.kg)("STORAGES-LOADER")),a=Object.keys(e),s=a.map((a=>{const s=e[a].getAll();return t(s,"storage "+a)})),n={},i=yield Promise.all(s);for(let e=0,t=a.length;e<t;++e)n[a[e]]=i[e];i.splice(0,a.length);const r=yield j;if(r.size){for(const e of r)n[e].length=0;r.clear()}return n},new((s=void 0)||(s=Promise))((function(e,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(r,o)}p((n=n.apply(t,a||[])).next())}));var t,a,s,n}(e)}class $ extends G{constructor(){super(),this.log=(0,S.kg)("STORAGES"),this.storages=function(){const e=["users","chats","dialogs"],t={};for(const a of e)t[a]=new W.Z(H.Z,a);return t}()}loadStorages(){return J(this.storages)}loadStorage(e){return t=this,a=void 0,n=function*(){return this.loadStorages().then((t=>({storage:this.storages[e],results:t[e]})))},new((s=void 0)||(s=Promise))((function(e,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(r,o)}p((n=n.apply(t,a||[])).next())}));var t,a,s,n}}class Q extends G{getState(){return this.apiManager.invokeApi("account.getPassword").then((e=>e))}updateSettings(e={}){return this.getState().then((t=>{let a,s;const n={password:null,new_settings:{_:"account.passwordInputSettings",hint:e.hint,email:e.email}};a=e.currentPassword?this.cryptoWorker.invokeCrypto("computeSRP",e.currentPassword,t,!1):Promise.resolve({_:"inputCheckPasswordEmpty"});const i=t.new_algo,r=new Uint8Array(i.salt1.length+32);return w(r),r.set(i.salt1,0),i.salt1=r,s=e.newPassword?this.cryptoWorker.invokeCrypto("computeSRP",e.newPassword,t,!0):Promise.resolve(new Uint8Array),Promise.all([a,s]).then((e=>(n.password=e[0],n.new_settings.new_algo=i,n.new_settings.new_password_hash=e[1],this.apiManager.invokeApi("account.updatePasswordSettings",n))))}))}getInputCheckPassword(e,t){return this.cryptoWorker.invokeCrypto("computeSRP",e,t,!1)}check(e,t,a={}){return this.getInputCheckPassword(e,t).then((e=>this.apiManager.invokeApi("auth.checkPassword",{password:e},a).then((e=>("auth.authorization"===e._&&this.apiManager.setUser(e.user),e)))))}confirmPasswordEmail(e){return this.apiManager.invokeApi("account.confirmPasswordEmail",{code:e})}resendPasswordEmail(){return this.apiManager.invokeApi("account.resendPasswordEmail")}cancelPasswordEmail(){return this.apiManager.invokeApi("account.cancelPasswordEmail")}}var Y=a(6848),X=a(5471);class ee extends G{constructor(){super(...arguments),this.contexts=new Map,this.links={},this.log=(0,S.kg)("RD",void 0,!0)}saveContext(e,t,a){[a,e]=this.getContexts(e),a||(a=new Set,this.contexts.set(e,a)),this.links[E(e)]=e;for(const e of a)if((0,Y.Z)(e,t))return;a.add(t)}getReferenceByLink(e){return this.links[E(e)]}getContexts(e){return[this.contexts.get(e)||(e=this.getReferenceByLink(e)||e,this.contexts.get(e)),e]}getContext(e){const t=this.getContexts(e);return t[0]?[t[0].values().next().value,t[1]]:void 0}deleteContext(e,t,a){if([a,e]=this.getContexts(e),a)for(const s of a)if((0,Y.Z)(s,t))return a.delete(s),a.size||(this.contexts.delete(e),delete this.links[E(e)]),!0;return!1}refreshReference(e,t){if(this.log("refreshReference: start",e.slice(),t),!t){const a=this.getContext(e);if(!a)return this.log("refreshReference: got no context for reference:",e.slice()),Promise.reject("NO_CONTEXT");[t,e]=a}let a;switch(null==t?void 0:t.type){case"message":a=this.appMessagesManager.reloadMessages(t.peerId,t.messageId,!0);break;case"emojiesSounds":a=this.refreshEmojiesSoundsPromise||this.appStickersManager.getAnimatedEmojiSounds(!0).then((()=>{this.refreshEmojiesSoundsPromise=void 0}));break;case"userFull":a=Promise.resolve(this.appProfileManager.getProfile(t.userId,!0));break;case"customEmoji":a=this.appEmojiManager.getCustomEmojiDocuments([t.docId]);break;case"attachMenuBotIcon":a=this.appAttachMenuBotsManager.getAttachMenuBot(t.botId,!0);break;case"wallPaper":a=this.appThemesManager.getWallPaperById(t.wallPaperId);break;default:return this.log.warn("refreshReference: not implemented context",t),Promise.reject()}const s=E(e);return this.log("refreshReference: refreshing reference:",s),a.then((()=>{const a=E(e);if(this.log("refreshReference: refreshed, reference before:",s,"after:",a),s!==a)return e;this.deleteContext(e,t);const n=this.getContext(e);if(n)return this.refreshReference(e,n[0]);throw this.log.error("refreshReference: no new context, reference before:",s,"after:",a,t),(0,X.Z)("NO_NEW_CONTEXT")}))}}var te=a(7298),ae=a(7381),se=a(252),ne=a(7625),ie=a(6519);function re(e,t){if(!e)return t;for(var a in e)t.hasOwnProperty(a)||delete e[a];for(var a in t)e[a]=t[a];return e}var oe=a(2790),pe=a(3781),de=a(3385),fe=a(5880),ce=a(8050),le=a(2946);function me(e){var t,a;const s=[e.fromId,e.viaBotId,e.fwdFromId],n=e.media;if(n){const e=n.user_id;void 0!==e&&s.push(e.toPeerId());const t=n.results,a=null==t?void 0:t.recent_voters;(null==a?void 0:a.length)&&s.push(...a.map((e=>e.toPeerId())))}const i=null===(t=e.reactions)||void 0===t?void 0:t.recent_reactions;(null==i?void 0:i.length)&&s.push(...i.map((e=>(0,le.Z)(e.peer_id))));const r=e.action;if(r){const e=[...r.users||[],r.user_id,r.inviter_id];s.push(...e.filter(Boolean).map((e=>e.toPeerId())));const t=[r.channel_id,r.chat_id];s.push(...t.filter(Boolean).map((e=>e.toPeerId(!0))))}const o=null===(a=e.replies)||void 0===a?void 0:a.recent_repliers;return(null==o?void 0:o.length)&&s.push(...o.map((e=>(0,le.Z)(e)))),new Set(s.filter(Boolean))}var ge=a(8027);function he(e,t,a){return e[t]=a}var ue=a(8938);const ye=void 0;class _e extends G{constructor(){super(...arguments),this.clear=(e=!1)=>{if(e){this.allDialogsLoaded={},this.pinnedOrders={};for(const e of o.DZ)this.pinnedOrders[e]=[]}else{this.storage.clear(),this.allDialogsLoaded={},this.saveAllDialogsLoaded(),this.pinnedOrders=Object.assign({},this.pinnedOrders);for(const e of o.DZ)this.resetPinnedOrder(e);this.savePinnedOrders()}this.forumTopics=new Map,this.folders={},this.dialogsOffsetDate={},this.dialogsNum=0,this.dialogsIndex=new ae.Z({clearBadChars:!0,ignoreCase:!0,latinize:!0,includeTag:!0}),this.cachedResults={query:"",count:0,dialogs:[],folderId:0}},this.onUpdateFolderPeers=e=>{e.folder_peers.forEach((e=>{var t;const{folder_id:a,peer:s}=e,n=this.appPeersManager.getPeerId(s),i=this.dropDialog(n)[0];i&&((null===(t=i.pFlags)||void 0===t?void 0:t.pinned)&&this.handleDialogUnpinning(i,a),i.folder_id=a,this.generateIndexForDialog(i),this.pushDialog({dialog:i})),this.appMessagesManager.scheduleHandleNewDialogs(n,i)}))},this.onUpdateDialogPinned=e=>{var t;const a=null!==(t=e.folder_id)&&void 0!==t?t:o.J$,s=this.appPeersManager.getPeerId(e.peer.peer),n=this.getDialogOnly(s);this.handleDialogTogglePinned(n,e.pFlags.pinned,a)},this.onUpdateChannelPinnedTopic=e=>{const t=e.channel_id.toPeerId(!0),a=(0,pe.Z)(e.topic_id),s=this.getForumTopic(t,a);s&&this.handleDialogTogglePinned(s,e.pFlags.pinned,this.getFilterIdForForum(s))},this.onUpdatePinnedDialogs=e=>{var t;const a=null!==(t=e.folder_id)&&void 0!==t?t:o.J$;e.order?this.handleDialogsPinned(a,e.order.map((e=>this.appPeersManager.getPeerId(e.peer)))):this.apiManager.invokeApi("messages.getPinnedDialogs",{folder_id:a}).then((e=>{this.applyDialogs(e),this.handleDialogsPinned(a,e.dialogs.map((e=>e.peerId)))}))},this.onUpdateChannelPinnedTopics=e=>{return t=this,a=void 0,n=function*(){const t=e.channel_id.toPeerId(!0);if(!this.forumTopics.get(t))return;const a=t;if(e.order){const t=e.order.map((e=>(0,pe.Z)(e)));this.handleDialogsPinned(a,t)}else{const e=yield this.apiManager.getLimit("topicPin",!0),s=this.apiManager.invokeApi("channels.getForumTopics",{channel:this.appChatsManager.getChannelInput(t.toChatId()),limit:e,offset_date:0,offset_id:0,offset_topic:0}),n=(yield this.processTopics(t,s)).topics.filter((e=>e.pFlags.pinned));this.handleDialogsPinned(a,n.map((e=>e.id)))}},new((s=void 0)||(s=Promise))((function(e,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(r,o)}p((n=n.apply(t,a||[])).next())}));var t,a,s,n}}after(){this.clear(!0),this.rootScope.addEventListener("language_change",(()=>{const e=this.appUsersManager.getSelf().id.toPeerId(!1);if(this.getDialogOnly(e)){const t=this.appPeersManager.getPeerSearchText(e);this.dialogsIndex.indexObject(e,t)}}));const e=e=>{const t=this.getCachedDialogs(!1);for(let a=0;a<t.length;++a)this.processDialogForFilter(t[a],e)};return this.rootScope.addEventListener("filter_order",(()=>{const e=this.getCachedDialogs(!1);for(const e in this.folders)+e>1&&delete this.folders[e];for(let t=0;t<e.length;++t){const a=e[t];this.processDialogForFilters(a)}})),this.rootScope.addEventListener("filter_update",e),this.rootScope.addEventListener("filter_new",e),this.rootScope.addEventListener("filter_delete",(e=>{const t=this.getCachedDialogs(!1),a=this.getDialogIndexKeyByFilterId(e.id);for(let e=0;e<t.length;++e)delete t[e][a];delete this.folders[e.id]})),this.rootScope.addEventListener("dialog_notify_settings",(e=>{this.processChangedUnreadOrUnmuted(e.peerId)})),this.rootScope.addEventListener("chat_update",(e=>{const t=this.appChatsManager.getChat(e),a=e.toPeerId(!0);t.pFlags.left&&this.getDialogOnly(a)&&this.dropDialogOnDeletion(a)})),this.rootScope.addEventListener("chat_toggle_forum",(({chatId:e,enabled:t})=>{const a=e.toPeerId(!0);t||this.flushForumTopicsCache(a),this.processChangedUnreadOrUnmuted(a)})),this.apiUpdatesManager.addMultipleEventsListeners({updateFolderPeers:this.onUpdateFolderPeers,updateDialogPinned:this.onUpdateDialogPinned,updateChannelPinnedTopic:this.onUpdateChannelPinnedTopic,updatePinnedDialogs:this.onUpdatePinnedDialogs,updateChannelPinnedTopics:this.onUpdateChannelPinnedTopics}),Promise.all([this.appStateManager.getState(),this.appStoragesManager.loadStorage("dialogs")]).then((([e,{results:t,storage:a}])=>{this.storage=a,this.dialogs=this.storage.getCache();for(const t of o.DZ){const a=e.pinnedOrders[t];if(!a)continue;const s=this.getPinnedOrders(t);s.splice(0,s.length,...a)}t.length&&W.Z.freezeSaving(this.setDialogsFromState.bind(this,t),["chats","dialogs","messages","users"]),this.allDialogsLoaded=e.allDialogsLoaded||{},t.length&&this.appDraftsManager.addMissedDialogs()}))}setDialogsFromState(e){for(let t=0,a=e.length;t<a;++t){const a=e[t];if(a){a.top_message=(0,oe.Z)(a.top_message),a.topMessage&&this.appMessagesManager.saveMessages([a.topMessage]);for(let e=0;e<=21;++e)delete a[`index_${e}`];this.saveDialog({dialog:a,ignoreOffsetDate:!0}),this.appMessagesManager.getMessageByPeer(a.peerId,a.top_message)||this.appMessagesManager.reloadConversation(a.peerId)}}}isDialogsLoaded(e){return!!this.allDialogsLoaded[e]}setDialogsLoaded(e,t){const a=this.isFilterIdForForum(e);e===ye&&t?(this.allDialogsLoaded[o.J$]=t,this.allDialogsLoaded[o.Zi]=t):(a&&(0,ge.Z)(this.allDialogsLoaded,[e]),this.allDialogsLoaded[e]=t),a||(Array.from(o.DZ).every((e=>this.allDialogsLoaded[e]))&&(this.allDialogsLoaded[void 0]=!0),this.saveAllDialogsLoaded())}saveAllDialogsLoaded(){this.appStateManager.pushToState("allDialogsLoaded",this.allDialogsLoaded)}handleDialogUnpinning(e,t){delete e.pFlags.pinned,(0,M.Z)(this.getPinnedOrders(t),this.isFilterIdForForum(t)?e.id:e.peerId),this.savePinnedOrders()}savePinnedOrders(){this.appStateManager.pushToState("pinnedOrders",this.pinnedOrders)}resetPinnedOrder(e){this.getPinnedOrders(e).length=0}getPinnedOrders(e){let t=this.pinnedOrders[e];return!t&&this.isFilterIdForForum(e)&&((0,ge.Z)(this.pinnedOrders,[e]),t=this.pinnedOrders[e]=[]),t}isDialogPinned(e,t){const a=this.filtersStorage.getFilter(t);let s;return s=a?-1!==a.pinnedPeerIds.indexOf(e):!!this.getDialogOnly(e).pFlags.pinned,s}getOffsetDate(e){const t=this.dialogsOffsetDate[e]||0;return e!==ye||t?t:Math.min(...Array.from(o.DZ).sort(((e,t)=>e-t)))}generateFolder(e){const t={dialogs:[],id:e,unreadMessagesCount:0,unreadPeerIds:new Set,unreadUnmutedPeerIds:new Set};return(0,ge.Z)(t,["dispatchUnreadTimeout"]),t}getFolder(e){var t,a;return null!==(t=(a=this.folders)[e])&&void 0!==t?t:a[e]=this.generateFolder(e)}isFilterIdForForum(e){return e&&e<0}getFilterIdForForum(e){return e.peerId}getDialogKey(e){return this.isTopic(e)?e.id:e.peerId}getFolderDialogs(e,t=!0){if(e===ye)return this.getCachedDialogs(t);const a=this.getFolder(e);return this.isFilterIdForForum(e)?t?a.dialogs.filter((e=>!e.pFlags.hidden)):a.dialogs:t?a.dialogs.filter((e=>void 0===e.migratedTo)):a.dialogs}getNextDialog(e,t,a){const s=this.getFolderDialogs(a,!0);let n;if(e){const a=s.findIndex((t=>t.peerId===e));-1!==a&&(n=s[t?a+1:a-1])}else t&&(n=s[0]);return n}getDialogIndexKeyByFilterId(e){if(this.isFilterIdForForum(e))return(0,de.Z)();if(o.DZ.has(e))return(0,de.Z)(e);const t=this.filtersStorage.getFilter(e);return(0,de.Z)(t.localId)}isDialogUnmuted(e){return!this.appNotificationsManager.isPeerLocalMuted({peerId:e.peerId,respectType:!0,threadId:this.isTopic(e)?e.id:void 0})}getFolderUnreadCount(e){const t=this.getFolder(e);return{unreadUnmutedCount:t.unreadUnmutedPeerIds.size,unreadCount:t.unreadPeerIds.size}}getCachedDialogs(e){const t=Array.from(o.DZ).map((t=>this.getFolderDialogs(t,e)));return[].concat(...t)}setDialogIndexInFilter(e,t,a){var s,n;let i;const r=this.isTopic(e),p=r||o.DZ.has(a.id);if(this.filtersStorage.testDialogForFilter(e,a)){const t=r?this.getPinnedOrders(this.getFilterIdForForum(e)):a.pinnedPeerIds,o=this.getDialogKey(e),d=t.indexOf(o);i=-1!==d?this.generateDialogIndex(this.generateDialogPinnedDateByIndex(t.length-1-d),!0):(null===(s=e.pFlags)||void 0===s?void 0:s.pinned)||p?this.generateIndexForDialog(e,!0,void 0,!p):null!==(n=(0,ce.Z)(e))&&void 0!==n?n:this.generateIndexForDialog(e,!0)}return he(e,t,i)}getDialog(e,t,a,s=!0){const n=[];a&&(t=e),void 0===t?n.push(...Array.from(o.DZ).map((e=>this.getFolder(e).dialogs))):n.push(this.getFolderDialogs(t,!1));const i=a?e=>e.id===a:t=>t.peerId===e;for(const e of n){let t=0,a=0;for(let n=e.length;t<n;++t){const n=e[t];if(i(n))return[n,t-a];s&&(n.pFlags.hidden||void 0!==n.migratedTo)&&++a}}return[]}getDialogOnly(e){return this.dialogs[e]}getDialogOrTopic(e,t){return t?this.getForumTopic(e,t):this.dialogs[e]}getDialogIndex(e,t,a){const s=(0,fe.Z)(e)?e:this.getDialogOrTopic(e,a);return(0,ce.Z)(s,t)}generateDialogIndex(e,t){return null!=e||(e=(0,te.Z)(!0)+this.timeManager.getServerTimeOffset()),65536*e+(t?0:65535&++this.dialogsNum)}isTopic(e){return"id"in e}processDialogForFilters(e,t){if(this.isTopic(e))return void this.processDialogForFilter(e,void 0,t);const a=this.filtersStorage.getFilters();for(const s in a){const n=a[s];this.processDialogForFilter(e,n,t)}}processDialogForFilter(e,t,a){const s=this.isTopic(e),n=s?this.getFilterIdForForum(e):t.id,i=s?"index_0":this.getDialogIndexKeyByFilterId(n),r=this.getFolder(n).dialogs,p=s?t=>t.id===e.id:t=>t.peerId===e.peerId,d=r.findIndex(p),f=r[d],c=this.getDialogIndex(f,i);a&&n>o.Zi&&(a=void 0);const l=a?void 0:this.setDialogIndexInFilter(e,i,t);return c!==l&&(!!c!=!!l&&this.prepareFolderUnreadCountModifyingByDialog(n,e,!!l),-1!==d&&r.splice(d,1),l&&(0,ie.Z)(r,e,(e=>this.getDialogIndex(e,i)),-1),!0)}prepareDialogUnreadCountModifying(e,t){const a=this.isTopic(e),s=[],n=a?this.getFilterIdForForum(e):e.folder_id;if(s.push(this.prepareFolderUnreadCountModifyingByDialog(n,e,t)),!a){const a=this.filtersStorage.getFilters();for(const n in a){const i=a[n];this.filtersStorage.testDialogForFilter(e,i)&&s.push(this.prepareFolderUnreadCountModifyingByDialog(i.id,e,t))}}return()=>!t&&s.forEach((e=>e()))}prepareFolderUnreadCountModifyingByDialog(e,t,a){const s=this.appMessagesManager.getDialogUnreadCount(t),n=this.isDialogUnmuted(t);if(void 0===a)return()=>{const a=this.appMessagesManager.getDialogUnreadCount(t),n=this.isDialogUnmuted(t),i=a-s;this.modifyFolderUnreadCount(e,i,!!a,a&&n,t)};{const i=a?s:-s;this.modifyFolderUnreadCount(e,i,!!s,s&&n,t)}}modifyFolderUnreadCount(e,t,a,s,n){var i;const{peerId:r}=n,o=this.appPeersManager.isForum(r),p=this.isTopic(n);if(o&&!p){const i=this.getForumUnreadCount(r);if(i instanceof Promise)return void i.then((({count:t,hasUnmuted:a})=>{n=this.getDialogOnly(r);const s=this.getFolder(e);n&&this.appPeersManager.isForum(r)&&s&&s.dialogs.some((e=>e.peerId===r))&&this.modifyFolderUnreadCount(e,0,!1,!1,n)}));t=0,a=i.count>0,s=i.hasUnmuted}const d=this.getFolder(e);t&&(d.unreadMessagesCount=Math.max(0,d.unreadMessagesCount+t));const f=this.getDialogKey(n);a?d.unreadPeerIds.add(f):d.unreadPeerIds.delete(f),s?d.unreadUnmutedPeerIds.add(f):d.unreadUnmutedPeerIds.delete(f),null!==(i=d.dispatchUnreadTimeout)&&void 0!==i||(d.dispatchUnreadTimeout=T.Z.setTimeout((()=>{d.dispatchUnreadTimeout=void 0;const e=Object.assign({},d);delete e.dialogs,this.rootScope.dispatchEvent("folder_unread",e),p&&this.processChangedUnreadOrUnmuted(r)}),0))}processChangedUnreadOrUnmuted(e){const t=this.getDialogOnly(e);t&&(this.processDialogForFilters(t),this.prepareDialogUnreadCountModifying(t)(),this.rootScope.dispatchEvent("dialog_unread",{peerId:e,dialog:t}))}generateIndexForDialog(e,t,a,s){var n;if(!t)return;const i=this.isTopic(e);let r,o=0;if(e.pFlags.hidden)o=this.generateDialogPinnedDateByIndex(4095),r=!0;else if(e.pFlags.pinned&&!s)o=this.generateDialogPinnedDate(e),r=!0;else{if(a||(a=this.appMessagesManager.getMessageByPeer(e.peerId,e.top_message)),o=(null==a?void 0:a.date)||o,!i){const t=this.appPeersManager.isChannel(e.peerId)&&e.peerId.toChatId();if(t){const e=this.appChatsManager.getChat(t);(!o||e.date&&e.date>o)&&(o=e.date)}}"draftMessage"===(null===(n=e.draft)||void 0===n?void 0:n._)&&e.draft.date>o&&(o=e.draft.date)}o||(o=(0,te.Z)(!0));const p=this.generateDialogIndex(o,r);if(t)return p;he(e,(0,de.Z)(e.folder_id),p)}generateDialogPinnedDateByIndex(e){return 2147418112+(65535&e)}generateDialogPinnedDate(e){const t=this.isTopic(e),a=this.getPinnedOrders(t?this.getFilterIdForForum(e):e.folder_id),s=this.getDialogKey(e);let n=a.indexOf(s);return-1===n&&(a.unshift(s),n=0,t||this.savePinnedOrders()),this.generateDialogPinnedDateByIndex(a.length-1-n)}setDialogToState(e){if(this.isTopic(e))return;const{peerId:t,pts:a}=e,s=this.appMessagesManager.getHistoryStorage(t),n=this.appMessagesManager.getHistoryMessagesStorage(t),i=s.history.slice;let r;for(let e=0,a=i.length;e<a;++e){const a=i[e],s=this.appMessagesManager.getMessageFromStorage(n,a);if(s&&!s.pFlags.is_outgoing){r=s;const e=me(s);this.peersStorage.requestPeersForKey(e,`topMessage_${t}`);break}}if(e.topMessage=r,t.isAnyChat()&&a){const s=this.apiUpdatesManager.getChannelState(t.toChatId(),a).pts;e.pts=s}this.storage.set({[t]:e}),this.peersStorage.requestPeer(t,"dialog")}pushDialog({dialog:e,offsetDate:t,ignoreOffsetDate:a,saveGlobalOffset:s}){const n=this.isTopic(e),{folder_id:i,peerId:r}=e;if(n?this.getForumTopicsCache(r).topics.set(e.id,e):this.dialogs[r]=e,null!=t||(t=this.getDialogOffsetDate(e)),this.processDialogForFilters(e),t&&!e.pFlags.pinned){if(!n&&s){const e=this.dialogsOffsetDate[void 0];(!e||t<e)&&(this.dialogsOffsetDate[void 0]=t)}const o=n?this.getFilterIdForForum(e):i,p=this.dialogsOffsetDate[o];if(!p||t<p){if(!a&&!this.isDialogsLoaded(o))return void this.dropDialog(r,n?this.getDialogKey(e):void 0,!0);this.dialogsOffsetDate[o]=t}}this.setDialogToState(e)}dropDialogFromFolders(e,t){const a=this.getDialog(e,void 0,t,!1),[s,n]=a;if(s){const a=t?this.getFilterIdForForum(s):s.folder_id,n=void 0!==(0,M.Z)(this.getPinnedOrders(a),this.getDialogKey(s));this.processDialogForFilters(s,!0),this.dialogsIndex.indexObject(e,""),n&&this.savePinnedOrders()}return a}dropDialog(e,t,a){const s=this.getDialogOrTopic(e,t),n=this.dropDialogFromFolders(e,t);return s&&(a||(t?this.getForumTopicsCache(e).topics.delete(t):delete this.dialogs[e]),this.clearDialogFromState(s,a)),n}clearDialogFromState(e,t){if("forumTopic"===e._)return;const{peerId:a}=e;this.peersStorage.requestPeersForKey([],`topMessage_${a}`),this.peersStorage.releasePeer(a,"dialog"),this.storage.delete(a,t)}dropDialogWithEvent(e,t){const a=this.dropDialog(e,t);return a.length&&this.rootScope.dispatchEvent("dialog_drop",a[0]),a}dropDialogOnDeletion(e,t){this.dropDialogWithEvent(e,t),this.rootScope.dispatchEvent("peer_deleted",e)}applyDialogs(e,t){const a="messages.forumTopics"===e._,s=e.dialogs||e.topics;a?this.processTopics(t,e):(0,ne.Z)(e.dialogs,((t,a)=>{"dialogFolder"===t._&&e.dialogs.splice(a,1)})),(0,ue.Z)(s),this.appUsersManager.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),this.appMessagesManager.saveMessages(e.messages);const n=new Map;s.forEach((e=>{var t,s;const i=this.appPeersManager.getPeerId(e.peer);let r=e.top_message;const o=this.appMessagesManager.pendingTopMsgs[i];if(o){const t=this.appMessagesManager.getMessageByPeer(i,o),a=this.appMessagesManager.getMessageByPeer(i,r);(!r||t&&(!a||(null==t?void 0:t.date)>(null==a?void 0:a.date)))&&(e.top_message=r=o,this.appMessagesManager.getHistoryStorage(i).maxId=o)}if(r||"draftMessage"===(null===(t=e.draft)||void 0===t?void 0:t._)){if(this.saveDialog({dialog:e})){const t=(e=>{let t=n.get(e);return t||n.set(e,t={}),t})(i);a?(null!==(s=t.topics)&&void 0!==s?s:t.topics=new Map).set(e.id,e):t.dialog=e}}else this.dropDialogWithEvent(i,a?this.getDialogKey(e):void 0);const p=this.appMessagesManager.getUpdateAfterReloadKey(i,a?this.getDialogKey(e):void 0),d=this.appMessagesManager.newUpdatesAfterReloadToHandle[p];if(void 0!==d){for(const e of d)d.delete(e),this.apiUpdatesManager.saveUpdate(e);d.size||delete this.appMessagesManager.newUpdatesAfterReloadToHandle[p]}})),n.size&&this.rootScope.dispatchEvent("dialogs_multiupdate",n)}getDialogOffsetDate(e){const t=this.appMessagesManager.getMessageByPeer(e.peerId,e.top_message);return(null==t?void 0:t.date)||0}canSaveDialogByPeerId(e){if(e.isAnyChat()){const t=this.appChatsManager.getChat(e.toChatId());if("channelForbidden"===t._||t.pFlags.left)return!1}return!0}saveDialog({dialog:e,folderId:t,ignoreOffsetDate:a,saveGlobalOffset:s}){var n,i;const r=this.isTopic(e),p=!r,d=r?e.id=(0,pe.Z)(e.id):void 0;r||null!=t||(t=null!==(n=e.folder_id)&&void 0!==n?n:o.J$);const f=this.appPeersManager.getPeerId(e.peer);if(!f)return console.error("saveConversation no peerId???",e,t),!1;if(r||"dialog"===e._||console.error("saveConversation not regular dialog",e,Object.assign({},e)),p&&!this.canSaveDialogByPeerId(f))return!1;const c=this.appPeersManager.isChannel(f)?f.toChatId():o.NM;if(p){const e=this.appPeersManager.getPeerSearchText(f);this.dialogsIndex.indexObject(f,e)}const l=this.getDialogOrTopic(f,d);let m,g;if(e.top_message){m=(0,pe.Z)(e.top_message);const t=(null==l?void 0:l.top_message)&&this.appMessagesManager.getMessageByPeer(f,l.top_message);(null===(i=null==t?void 0:t.pFlags)||void 0===i?void 0:i.is_outgoing)&&l.top_message>=m&&(m=l.top_message),g=this.appMessagesManager.getMessageByPeer(f,m)}else m=this.appMessagesManager.generateTempMessageId(f),g={_:"message",id:m,mid:m,from_id:this.appPeersManager.getOutputPeer(this.appUsersManager.getSelf().id.toPeerId(!1)),peer_id:this.appPeersManager.getOutputPeer(f),deleted:!0,pFlags:{out:!0},date:0,message:""},this.appMessagesManager.saveMessages([g],{isOutgoing:!0});if((null==g?void 0:g.pFlags)||this.appMessagesManager.log.error("saveConversation no message:",e,g),p&&!c&&f.isAnyChat()){const t=this.appChatsManager.getChat(f.toChatId());if(t&&t.migrated_to&&t.pFlags.deactivated){const a=this.appPeersManager.getPeerId(t.migrated_to);this.appMessagesManager.migratedFromTo[f]=a,this.appMessagesManager.migratedToFrom[a]=f,e.migratedTo=a}}if(e.top_message=m,e.read_inbox_max_id=(0,pe.Z)(l&&!e.read_inbox_max_id?l.read_inbox_max_id:e.read_inbox_max_id),e.read_outbox_max_id=(0,pe.Z)(l&&!e.read_outbox_max_id?l.read_outbox_max_id:e.read_outbox_max_id),p&&void 0===e.folder_id&&"dialog"===e._&&(e.folder_id=l?l.folder_id:t),e.draft=this.appDraftsManager.saveDraft({peerId:f,threadId:d,draft:e.draft}),e.peerId=f,g&&g.pFlags.is_outgoing){const t=g.pFlags.out;m>e[t?"read_outbox_max_id":"read_inbox_max_id"]?(g.pFlags.unread=!0,e.unread_count||t||++e.unread_count):delete g.pFlags.unread}const h=this.appMessagesManager.getHistoryStorage(f,d),u=h.history.slice;if(u.length?u.isEnd(se.D.Bottom)||(h.history.insertSlice([m]).setEnd(se.D.Bottom),h.count||(h.count=1),this.appMessagesManager.mergeReplyKeyboard(h,g)&&this.rootScope.dispatchEvent("history_reply_markup",{peerId:f})):(h.history.unshift(m),h.count||(h.count=1),this.appMessagesManager.mergeReplyKeyboard(h,g)&&this.rootScope.dispatchEvent("history_reply_markup",{peerId:f})),h.maxId=m,h.readMaxId=e.read_inbox_max_id,h.readOutboxMaxId=e.read_outbox_max_id,this.appNotificationsManager.savePeerSettings({peerId:f,threadId:r?e.id:void 0,settings:e.notify_settings}),p&&c&&e.pts&&this.apiUpdatesManager.addChannelState(c,e.pts),this.generateIndexForDialog(e),l){const t=this.dialogsStorage.prepareDialogUnreadCountModifying(l);re(l,e),t()}return this.pushDialog({dialog:e,offsetDate:null==g?void 0:g.date,ignoreOffsetDate:a,saveGlobalOffset:s}),r&&this.processTopicUpdate(e,l),!0}processTopicUpdate(e,t){if(!t)return;const{peerId:a,id:s}=e,n=e.icon_emoji_id!==t.icon_emoji_id,i=e.title!==t.title,r=n||i;n&&this.rootScope.dispatchEvent("avatar_update",{peerId:a,threadId:s}),r&&this.rootScope.dispatchEvent("peer_title_edit",{peerId:a,threadId:s})}getDialogs(e){const{query:t="",offsetIndex:a,limit:s=20,filterId:n=o.J$,skipMigrated:i=!1}=e,r=this.isFilterIdForForum(n);if(!r&&!o.DZ.has(n)){const t=[],a=this.appUsersManager.fillContacts();a.cached||t.push(a.promise);const s=this.filtersStorage.reloadMissingPeerIds(n);if(s&&t.push(s),t.length)return Promise.all(t).then((()=>this.getDialogs(e)))}const p=o.DZ.has(n)&&!this.getOffsetDate(n)||r?n:ye;let d=this.getFolderDialogs(n,i);const f=this.getDialogIndexKeyByFilterId(n);if(t&&!r){if(!s||this.cachedResults.query!==t||this.cachedResults.folderId!==n){this.cachedResults.query=t,this.cachedResults.folderId=n;const e=this.dialogsIndex.search(t),a=[];for(const t in this.dialogs){const s=this.dialogs[t];e.has(s.peerId)&&s.folder_id===n&&a.push(s)}a.sort(((e,t)=>this.getDialogIndex(t,f)-this.getDialogIndex(e,f))),this.cachedResults.dialogs=a,this.cachedResults.count=a.length}d=this.cachedResults.dialogs}else this.cachedResults.query="";let c=0;if(a>0)for(let e=d.length;c<e&&!(a>this.getDialogIndex(d[c],f));++c);const l=this.isDialogsLoaded(p),m=d.length>=c+s;if(t||l||m){const e=d.slice(c,c+s);return{dialogs:e,count:l?d.length:null,isTopEnd:d.length&&(e[0]&&e[0]===d[0]||this.getDialogIndex(d[0],f)<a),isEnd:(t||l)&&c+s>=d.length}}return this.appMessagesManager.getTopMessages({limit:s,folderId:p}).then((e=>{if(i&&(d=this.getFolderDialogs(n,i)),c=0,a>0)for(let e=d.length;c<e&&!(a>this.getDialogIndex(d[c],f));++c);const t=d.slice(c,c+s);return{dialogs:t,count:void 0===e.count?d.length:e.count,isTopEnd:d.length&&(t[0]&&t[0]===d[0]||this.getDialogIndex(d[0],f)<a),isEnd:e.isEnd}}))}flushForumTopicsCache(e){const t=this.forumTopics.get(e);if(!t)return;const a=this.folders[e];a&&(a.dispatchUnreadTimeout&&clearTimeout(a.dispatchUnreadTimeout),delete this.allDialogsLoaded[e],delete this.pinnedOrders[e],delete this.dialogsOffsetDate[e],delete this.folders[e]),t.topics.clear()}getForumTopicsCache(e){let t=this.forumTopics.get(e);return t||(t={topics:new Map,deletedTopics:new Set,getTopicPromises:new Map},this.forumTopics.set(e,t)),t}getForumTopicById(e,t){var a;if(!this.appPeersManager.isForum(e))return Promise.reject((0,X.Z)("CHANNEL_FORUM_MISSING"));const s=this.getForumTopicsCache(e);let n;if(t){if(n=s.getTopicPromises.get(t),n)return n;if(s.deletedTopics.has(t))return Promise.resolve(void 0);s.getTopicPromises.set(t,n=(0,v.Z)())}return null!==(a=s.getTopicsPromise)&&void 0!==a||(s.getTopicsPromise=(0,P.Z)(0).then((()=>{const t={},a=[];for(const[e,n]of s.getTopicPromises)t[e]=n,a.push((0,oe.Z)(e));s.getTopicPromises.clear();const n=()=>{for(const e in t)t[e].resolve(void 0),s.deletedTopics.add(+e)};if(this.getForumTopicsCache(e)===s)return this.apiManager.invokeApi("channels.getForumTopicsByID",{channel:this.appChatsManager.getChannelInput(e.toChatId()),topics:a}).then((a=>{if(this.getForumTopicsCache(e)===s)return this.applyDialogs(a,e),a.topics.forEach((a=>{"forumTopic"===a._&&(t[a.id].resolve(a),delete t[e])})),a}),(()=>{})).then((()=>{n(),s.getTopicsPromise=void 0,s.getTopicPromises.size&&this.getForumTopicById(e)}));n()}))),n||s.getTopicsPromise}getForumTopic(e,t){var a;const s=this.forumTopics.get(e);return null===(a=null==s?void 0:s.topics)||void 0===a?void 0:a.get(t)}getForumTopicOrReload(e,t){var a;const s=this.getForumTopic(e,t);if(s)return s;const n=this.getForumTopicsCache(e);return(null===(a=null==n?void 0:n.deletedTopics)||void 0===a?void 0:a.has(t))?void 0:this.getForumTopicById(e,t)}processTopics(e,t){return(0,q.Z)(t,(t=>{"pts"in t&&this.apiUpdatesManager.addChannelState(e.toChatId(),t.pts);const a=this.appPeersManager.getOutputPeer(e);return t.topics=t.topics.map((e=>{if("forumTopicDeleted"!==e._)return e.peer=a,e.id=(0,pe.Z)(e.id),e})).filter(Boolean),t}))}processTopicsPromise(e,t){return t.then((t=>(this.processTopics(e,t),t)))}getForumUnreadCount(e){if(!this.appPeersManager.isForum(e))return;const t=this.getFolder(e),a=t.dialogs.length>=20||this.isDialogsLoaded(e)?t.dialogs.slice(0,20):(0,q.Z)(this.getDialogs({filterId:e,limit:20}),(e=>e.dialogs));return(0,q.Z)(a,(e=>({count:e.reduce(((e,t)=>e+ +!!t.unread_count),0),hasUnmuted:e.some((e=>e.unread_count&&this.isDialogUnmuted(e)))})))}handleDialogTogglePinned(e,t,a){e&&(t?e.pFlags.pinned=!0:this.handleDialogUnpinning(e,a),this.generateIndexForDialog(e)),this.appMessagesManager.scheduleHandleNewDialogs(e.peerId,e)}handleDialogsPinned(e,t){const a=this.isFilterIdForForum(e);this.resetPinnedOrder(e),this.getPinnedOrders(e).push(...t),this.savePinnedOrders(),t.reverse();const s={};t.forEach((t=>{s[t]=!0;const n=a?e:t,i=a?t:void 0,r=this.getDialogOrTopic(n,i);this.appMessagesManager.scheduleHandleNewDialogs(n,r),r&&(r.pFlags.pinned=!0,this.generateIndexForDialog(r))}));const n=this.getFolderDialogs(e,!1);for(const e of n){if(!e.pFlags.pinned)break;s[this.getDialogKey(e)]||(delete e.pFlags.pinned,this.generateIndexForDialog(e),this.appMessagesManager.scheduleHandleNewDialogs(e.peerId,e))}}}var ve=a(8479),Pe=a(4064),be=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const Me=[["pinned_peers","pinnedPeerIds"],["exclude_peers","excludePeerIds"],["include_peers","includePeerIds"]],Se=o.DZ.size,Ie={_:"dialogFilter",pFlags:{},flags:0,id:0,title:"",exclude_peers:[],include_peers:[],pinned_peers:[],excludePeerIds:[],includePeerIds:[],pinnedPeerIds:[]};class Ce extends G{constructor(){super(...arguments),this.clear=e=>{if(e){this.filters={},this.filtersArr=[],this.reloadedPeerIds=new Set,this.localFilters={};for(const e of o.DZ)this.localFilters[e]=this.generateLocalFilter(e)}else this.reloadedPeerIds.clear(),this.clearFilters();this.localId=o.Gu},this.onUpdateDialogFilter=e=>{e.filter?this.saveDialogFilter(e.filter):this.filters[e.id]&&(this.rootScope.dispatchEvent("filter_delete",this.filters[e.id]),delete this.filters[e.id],(0,Pe.Z)(this.filtersArr,(t=>t.id===e.id))),this.pushToState()},this.onUpdateDialogFilters=e=>{const t=(0,ve.Z)(this.filters);this.getDialogFilters(!0).then((e=>{for(const a in t){const t=+a;e.find((e=>e.id===t))||this.onUpdateDialogFilter({_:"updateDialogFilter",id:t})}this.onUpdateDialogFilterOrder({_:"updateDialogFilterOrder",order:e.map((e=>e.id))})}))},this.onUpdateDialogFilterOrder=e=>{const t=e.order.slice();t.includes(o.Zi)||t.splice(t[0]===o.J$?1:0,0,o.Zi),this.localId=o.Gu,t.forEach((e=>{const t=this.filters[e];delete t.localId,this.setLocalId(t)})),this.rootScope.dispatchEvent("filter_order",t),this.pushToState()}}after(){return this.clear(!0),this.apiUpdatesManager.addMultipleEventsListeners({updateDialogFilter:this.onUpdateDialogFilter,updateDialogFilters:this.onUpdateDialogFilters,updateDialogFilterOrder:this.onUpdateDialogFilterOrder}),this.rootScope.addEventListener("premium_toggle",(()=>{this.onUpdateDialogFilters({_:"updateDialogFilters"})})),this.appStateManager.getState().then((e=>{this.prependFilters(e.filtersArr).map((e=>{this.saveDialogFilter(e,!1,!0)}))}))}prependFilters(e){e=e.slice();const t=this.localFilters[o.J$],a=this.localFilters[o.Zi],s=e.findIndex((e=>"dialogFilterDefault"===e._||e.id===o.J$));return-1!==s?e[s]=t:e.unshift(t),(0,Pe.Z)(e,(e=>e.id===o.Zi)),e.splice(e[0]===t?1:0,0,a),this.localId=o.Gu,e.forEach((e=>{delete e.localId})),e}generateLocalFilter(e){const t=Object.assign(Object.assign({},(0,ve.Z)(Ie)),{id:e});return e===o.J$?t.pFlags.exclude_archived=!0:e===o.Zi&&(t.pFlags.exclude_unarchived=!0),o.DZ.has(e)&&(t.pinnedPeerIds=this.dialogsStorage.getPinnedOrders(e)),t}pushToState(){this.appStateManager.pushToState("filtersArr",this.filtersArr)}testDialogForFilter(e,t){if(!t)return!0;if(o.DZ.has(t.id))return e.folder_id===t.id&&this.dialogsStorage.canSaveDialogByPeerId(e.peerId);const a=e.peerId;if(!this.appMessagesManager.getDialogOnly(a))return!1;if(t.excludePeerIds.includes(a))return!1;if(t.includePeerIds.includes(a))return!0;const s=t.pFlags;if(s.exclude_archived&&e.folder_id===o.Zi)return!1;if(s.exclude_read&&!this.appMessagesManager.isDialogUnread(e))return!1;if(s.exclude_muted&&this.appNotificationsManager.isPeerLocalMuted({peerId:a})&&(!e.unread_mentions_count||!e.unread_count))return!1;if(this.appPeersManager.isAnyChat(a)){if(s.broadcasts&&this.appPeersManager.isBroadcast(a))return!0;if(s.groups&&this.appPeersManager.isAnyGroup(a))return!0}else{const e=a.toUserId();if(this.appUsersManager.isBot(e))return!!s.bots;if(s.non_contacts&&!this.appUsersManager.isContact(e))return!0;if(s.contacts&&this.appUsersManager.isContact(e))return!0}return!1}testDialogForFilterId(e,t){return this.testDialogForFilter(e,this.filters[t])}getFilter(e){return this.filters[e]}getFilters(){return this.filters}clearFilters(){const e=this.getFilters();for(const t in e)o.DZ.has(+t)||this.onUpdateDialogFilter({_:"updateDialogFilter",id:+t})}toggleDialogPin(e,t){return be(this,void 0,void 0,(function*(){const a=this.filters[t],s=a.pinnedPeerIds.indexOf(e),n=-1!==s;if(n&&(a.pinned_peers.splice(s,1),a.pinnedPeerIds.splice(s,1)),!n){if(a.pinned_peers.length>=(yield this.apiManager.getLimit("folderPin")))return Promise.reject((0,X.Z)("PINNED_DIALOGS_TOO_MUCH"));a.pinned_peers.unshift(this.appPeersManager.getInputPeerById(e)),a.pinnedPeerIds.unshift(e)}return this.updateDialogFilter(a)}))}createDialogFilter(e,t){const a=Math.max(1,...Object.keys(this.filters).map((e=>+e)));return(e=(0,ve.Z)(e)).id=a+1,this.updateDialogFilter(e,void 0,t)}updateDialogFilter(e,t=!1,a=!1){const s=t?0:1;return this.apiManager.invokeApi("messages.updateDialogFilter",{flags:s,id:e.id,filter:t?void 0:this.getOutputDialogFilter(e)}).then((s=>{if(this.onUpdateDialogFilter({_:"updateDialogFilter",id:e.id,filter:t?void 0:e}),a){const t=[];for(const e in this.filters){const a=this.filters[e];++a.localId,t.push(a)}e.localId=o.Gu;const a=t.sort(((e,t)=>e.localId-t.localId)).map((e=>e.id));this.onUpdateDialogFilterOrder({_:"updateDialogFilterOrder",order:a})}}))}updateDialogFiltersOrder(e){return this.apiManager.invokeApi("messages.updateDialogFiltersOrder",{order:e}).then((()=>{this.onUpdateDialogFilterOrder({_:"updateDialogFilterOrder",order:e})}))}getOutputDialogFilter(e){const t=(0,ve.Z)(e);return this.filterIncludedPinnedPeers(e),t}filterIncludedPinnedPeers(e){(0,ne.Z)(e.includePeerIds,((t,a)=>{e.pinnedPeerIds.includes(t)&&(e.include_peers.splice(a,1),e.includePeerIds.splice(a,1))}))}reloadMissingPeerIds(e,t="pinned_peers"){const a=this.getFilter(e),s=null==a?void 0:a[t];if(!(null==s?void 0:s.length))return;const n=s.filter((e=>{const t=this.appPeersManager.getPeerId(e),a=this.reloadedPeerIds.has(t),s=this.appMessagesManager.getDialogOnly(t);return!a&&!s}));if(!n.length)return;const i=n.map((e=>{const t=this.appPeersManager.getPeerId(e);return this.appMessagesManager.reloadConversation(e).then((e=>(this.reloadedPeerIds.add(t),e?void 0:t)))}));return Promise.all(i).then((e=>{(e=e.filter(Boolean)).length}))}getDialogFilters(e=!1){return be(this,void 0,void 0,(function*(){const t=Object.keys(this.filters);if(t.length>Se&&!e)return t.map((e=>this.filters[e])).sort(((e,t)=>e.localId-t.localId));const a=yield this.apiManager.invokeApiSingle("messages.getDialogFilters");return this.prependFilters(a).map((t=>this.saveDialogFilter(t,e))).filter(Boolean)}))}getSuggestedDialogsFilters(){return this.apiManager.invokeApi("messages.getSuggestedDialogFilters")}saveDialogFilter(e,t=!0,a){"dialogFilterDefault"===e._&&(e=this.localFilters[o.J$]),(0,ue.Z)(e),o.DZ.has(e.id)||(Me.forEach((([t,a])=>{(0,ue.Z)(e),e[a]=e[t].map((e=>this.appPeersManager.getPeerId(e)))})),this.filterIncludedPinnedPeers(e),e.include_peers=e.pinned_peers.concat(e.include_peers),e.includePeerIds=e.pinnedPeerIds.concat(e.includePeerIds));const s=this.filters[e.id];return s?Object.assign(s,e):this.filters[e.id]=e,this.setLocalId(e),a||(t?this.rootScope.dispatchEvent("filter_update",e):s||this.rootScope.dispatchEvent("filter_new",e)),e}setLocalId(e){void 0!==e.localId?e.localId>=this.localId&&(this.localId=e.localId+1):(e.localId=this.localId++,(0,Pe.Z)(this.filtersArr,(t=>t.id===e.id)),this.filtersArr.push(e),this.pushToState())}isFilterIdAvailable(e){return be(this,void 0,void 0,(function*(){if(o.DZ.has(e))return!0;const t=yield this.apiManager.getLimit("folders");return this.filtersArr.filter((e=>!o.DZ.has(e.id))).slice(0,t).some((t=>t.id===e))}))}}var we=a(6690),ke=a(2821);function Ae(e,t){t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((a=>{const s=Object.getOwnPropertyDescriptor(t.prototype,a)||Object.create(null);"constructor"!==a&&Object.defineProperty(e.prototype,a,s)}))}))}class Ue{constructor(){this.updatesState={pendingPtsUpdates:[],pendingSeqUpdates:{},syncPending:null,syncLoading:null},this.channelStates={},this.attached=!1,this.log=(0,S.kg)("UPDATES",S.v9.Error|S.v9.Warn|S.v9.Log),this.debug=d.ZP,this.subscriptions={},this.processUpdateMessage=(e,t={})=>{const a={date:e.date,seq:e.seq,seqStart:e.seq_start};switch(this.debug&&this.log.debug("processUpdateMessage",e),e._){case"updatesTooLong":case"new_session_created":this.forceGetDifference();break;case"updateShort":this.processUpdate(e.update,a);break;case"updateShortMessage":case"updateShortChatMessage":{(0,ue.Z)(e),this.debug&&this.log.debug("updateShortMessage | updateShortChatMessage",Object.assign({},e));const t=e.pFlags.out,s=e.from_id||(t?this.appPeersManager.peerId:e.user_id),n=e.chat_id?e.chat_id.toPeerId(!0):e.user_id.toPeerId(!1)||this.appPeersManager.peerId;this.processUpdate({_:"updateNewMessage",message:{_:"message",pFlags:e.pFlags,id:e.id,from_id:this.appPeersManager.getOutputPeer(s.toPeerId()),peer_id:this.appPeersManager.getOutputPeer(n),date:e.date,message:e.message,fwd_from:e.fwd_from,reply_to:e.reply_to,entities:e.entities},pts:e.pts,pts_count:e.pts_count},a);break}case"updatesCombined":case"updates":this.appUsersManager.saveApiUsers(e.users,t.override),this.appChatsManager.saveApiChats(e.chats,t.override),e.updates.forEach((e=>{this.processUpdate(e,a)}));break;default:this.log.warn("Unknown update message",e)}},this._constructor(!1)}setProxy(){const e=this;this.updatesState=new Proxy(this.updatesState,{set:function(t,a,s){return t[a]=s,e.saveUpdatesState(),!0}})}saveUpdatesState(){const e=this.updatesState;this.appStateManager.pushToState("updates",{seq:e.seq,pts:e.pts,date:e.date})}popPendingSeqUpdate(){var e;const t=this.updatesState,a=t.seq+1,s=t.pendingSeqUpdates[a];if(!s)return!1;const n=s.updates;for(let e=0,t=n.length;e<t;++e)this.saveUpdate(n[e]);return t.seq=s.seq,s.date&&t.date<s.date&&(t.date=s.date),delete t.pendingSeqUpdates[a],!this.popPendingSeqUpdate()&&(null===(e=t.syncPending)||void 0===e?void 0:e.seqAwaiting)&&t.seq>=t.syncPending.seqAwaiting&&(t.syncPending.ptsAwaiting?delete t.syncPending.seqAwaiting:this.clearStatePendingSync(t)),!0}popPendingPtsUpdate(e){const t=e?this.getChannelState(e):this.updatesState;if(!t.pendingPtsUpdates.length)return!1;t.pendingPtsUpdates.sort(((e,t)=>e.pts-t.pts));let a=t.pts,s=0,n=0;for(let e=0,i=t.pendingPtsUpdates.length;e<i;++e){const i=t.pendingPtsUpdates[e];a+=i.pts_count,a>=i.pts&&(s=i.pts,n=e)}if(!s)return!1;this.debug&&this.log.debug("pop pending pts updates",s,t.pendingPtsUpdates.slice(0,n+1)),t.pts=s;for(let e=0;e<=n;++e){const a=t.pendingPtsUpdates[e];this.saveUpdate(a)}return t.pendingPtsUpdates.splice(0,n+1),!t.pendingPtsUpdates.length&&t.syncPending&&(t.syncPending.seqAwaiting?delete t.syncPending.ptsAwaiting:this.clearStatePendingSync(t)),!0}forceGetDifference(){this.updatesState.syncLoading||this.getDifference()}processLocalUpdate(e){this.processUpdateMessage({_:"updateShort",update:e})}getDifference(e=!1){const t=this.updatesState,a=t.syncLoading;a||(t.pendingSeqUpdates={},t.pendingPtsUpdates=[]),this.clearStatePendingSync(t);const s=this.apiManager.invokeApi("updates.getDifference",{pts:t.pts,pts_total_limit:e?1200:void 0,date:t.date,qts:-1},{timeout:2147483647}).then((a=>{if(this.debug&&this.log.debug("Get diff result",a),"updates.differenceEmpty"===a._)return this.debug&&this.log.debug("apply empty diff",a.seq),t.date=a.date,void(t.seq=a.seq);if(e&&this.rootScope.dispatchEvent("state_synchronizing"),"updates.differenceTooLong"!==a._){this.appUsersManager.saveApiUsers(a.users),this.appChatsManager.saveApiChats(a.chats),a.other_updates.forEach((e=>{switch(e._){case"updateChannelTooLong":case"updateNewChannelMessage":case"updateEditChannelMessage":return void this.processUpdate(e)}this.saveUpdate(e)})),a.new_messages.forEach((e=>{this.saveUpdate({_:"updateNewMessage",message:e,pts:t.pts,pts_count:0})}));const e="updates.difference"===a._?a.state:a.intermediate_state;t.seq=e.seq,t.pts=e.pts,t.date=e.date}else t.pts=a.pts,t.date=(0,te.Z)(!0)+this.timeManager.getServerTimeOffset(),delete t.seq,this.channelStates={},this.log.warn("getDifference:",a._),this.onDifferenceTooLong();if("updates.differenceSlice"===a._)return this.getDifference();this.debug&&this.log.debug("finished get diff")}));return a||this.justAName(t,s),s}clearStatePendingSync(e){e.syncPending&&(clearTimeout(e.syncPending.timeout),e.syncPending=null)}getChannelDifference(e){const t=this.getChannelState(e),a=t.syncLoading;a||(t.pendingPtsUpdates=[]),this.clearStatePendingSync(t);const s=this.debug?this.log.bindPrefix("getChannelDifference-"+e):void 0,n=this.apiManager.invokeApi("updates.getChannelDifference",{channel:this.appChatsManager.getChannelInput(e),filter:{_:"channelMessagesFilterEmpty"},pts:t.pts,limit:1e3},{timeout:2147483647}).then((a=>{if(null==s||s.debug("diff result",a),t.pts="pts"in a?a.pts:void 0,t.lastDifferenceTime=Date.now(),"updates.channelDifferenceEmpty"!==a._){if("updates.channelDifferenceTooLong"===a._)return delete this.channelStates[e],void this.saveUpdate({_:"updateChannelReload",channel_id:e});if(this.appUsersManager.saveApiUsers(a.users),this.appChatsManager.saveApiChats(a.chats),null==s||s.debug("applying",a.other_updates.length,"channel other updates"),a.other_updates.forEach((e=>{this.saveUpdate(e)})),null==s||s.debug("applying",a.new_messages.length,"channel new messages"),a.new_messages.forEach((e=>{this.saveUpdate({_:"updateNewChannelMessage",message:e,pts:t.pts,pts_count:0})})),null==s||s.debug("apply channel diff",t.pts),"updates.channelDifference"===a._&&!a.pFlags.final)return this.getChannelDifference(e);null==s||s.debug("finished channel get diff")}}));return a||this.justAName(t,n,e),n}onDifferenceTooLong(){this.appUsersManager.clear(),this.appChatsManager.clear(),this.appMessagesManager.clear(),this.rootScope.dispatchEvent("state_cleared")}justAName(e,t,a){e.syncLoading=t,this.rootScope.dispatchEvent("state_synchronizing",a),t.then((()=>{e.syncLoading=null,this.rootScope.dispatchEvent("state_synchronized",a)}),(()=>{e.syncLoading=null}))}addChannelState(e,t){var a,s;if(!t)throw new Error("Add channel state without pts "+e);return null!==(a=(s=this.channelStates)[e])&&void 0!==a?a:s[e]={pts:t,pendingPtsUpdates:[],syncPending:null,syncLoading:null}}getChannelState(e,t){return void 0===this.channelStates[e]&&this.addChannelState(e,t),this.channelStates[e]}processUpdate(e,t={}){var a,s,n,i;let r;switch(e._){case"updateNewChannelMessage":case"updateEditChannelMessage":r=this.appPeersManager.getPeerId(e.message.peer_id).toChatId();break;case"updateChannelTooLong":if(r=e.channel_id,!(r in this.channelStates))return!1;break;default:"channel_id"in e&&"pts"in e&&(r=e.channel_id)}const{pts:o,pts_count:p}=e,d=r?this.getChannelState(r,o):this.updatesState;if(d.syncLoading)return!1;if("updateChannelTooLong"===e._)return(!d.lastPtsUpdateTime||d.lastPtsUpdateTime<Date.now()-6)&&this.getChannelDifference(r),!1;if("updateNewMessage"===e._||"updateEditMessage"===e._||"updateNewChannelMessage"===e._||"updateEditChannelMessage"===e._){const t=e.message,s=this.appPeersManager.getPeerId(t.peer_id),n=t.fwd_from||{};let i;if(t.from_id&&!this.appUsersManager.hasUser(this.appPeersManager.getPeerId(t.from_id),t.pFlags.post)&&(i="author")||n.from_id&&!this.appUsersManager.hasUser(this.appPeersManager.getPeerId(n.from_id),!!n.from_id.channel_id)&&(i="fwdAuthor")||(null===(a=n.from_id)||void 0===a?void 0:a.channel_id)&&!this.appChatsManager.hasChat(n.from_id.channel_id,!0)&&(i="fwdChannel")||s.isUser()&&!this.appUsersManager.hasUser(s)&&(i="toPeer User")||s.isAnyChat()&&!this.appChatsManager.hasChat(s.toChatId())&&(i="toPeer Chat"))return this.log.warn("Not enough data for message update",s,i,t),r&&this.appChatsManager.hasChat(r)?this.getChannelDifference(r):this.forceGetDifference(),!1}else if(r&&!this.appChatsManager.hasChat(r))return!1;let f,c;if(o){if(d.pts+(p||0)<o)return this.debug&&this.log.warn("Pts hole",d,e,r&&this.appChatsManager.getChat(r)),d.pendingPtsUpdates.push(e),d.syncPending||d.syncLoading||(d.syncPending={timeout:T.Z.setTimeout((()=>{d.syncPending=null,d.syncLoading||(r?this.getChannelDifference(r):this.getDifference())}),6)}),d.syncPending.ptsAwaiting=!0,!1;if(o>d.pts)d.pts=o,f=!0,d.lastPtsUpdateTime=Date.now();else if(p)return!1;r&&t.date&&this.updatesState.date<t.date&&(this.updatesState.date=t.date)}else if(!r&&t.seq>0){const a=t.seq,r=t.seqStart||a;if(r!==d.seq+1&&r>d.seq)return this.debug&&this.log.warn("Seq hole",d,null===(s=d.syncPending)||void 0===s?void 0:s.seqAwaiting),null!==(n=(i=d.pendingSeqUpdates)[r])&&void 0!==n||(i[r]={seq:a,date:t.date,updates:[]}),d.pendingSeqUpdates[r].updates.push(e),d.syncPending||(d.syncPending={timeout:T.Z.setTimeout((()=>{d.syncPending=null,d.syncLoading||this.getDifference()}),6)}),(!d.syncPending.seqAwaiting||d.syncPending.seqAwaiting<r)&&(d.syncPending.seqAwaiting=r),!1;d.seq!==a&&(d.seq=a,t.date&&d.date<t.date&&(d.date=t.date),c=!0)}this.saveUpdate(e),f?this.popPendingPtsUpdate(r):c&&this.popPendingSeqUpdate()}saveUpdate(e){this.dispatchEvent(e._,e)}subscribeToChannelUpdates(e){var t,a,s;const n=null!==(t=(s=this.subscriptions)[e])&&void 0!==t?t:s[e]={count:0};++n.count;const i=()=>{const t=this.getChannelState(e);t.syncLoading||t.lastDifferenceTime&&!(Date.now()-t.lastDifferenceTime>2500)||this.getChannelDifference(e)};null!==(a=n.interval)&&void 0!==a||(n.interval=T.Z.setInterval(i,3e3)),i()}unsubscribeFromChannelUpdates(e,t){const a=this.subscriptions[e];!(null==a?void 0:a.interval)||--a.count&&!t||(clearInterval(a.interval),a.interval=void 0,delete this.subscriptions[e])}attach(e){this.attached||(this.log("attach"),this.attached=!0,this.appStateManager.getState().then((({updates:t})=>{const a=this.appStateManager.newVersion;t&&t.pts&&t.date?(Object.assign(this.updatesState,t),this.log("will get difference",Object.assign({},t)),this.getDifference(!0)):(this.log("will get new state"),this.updatesState.syncLoading=new Promise((e=>{this.apiManager.invokeApi("updates.getState",{},{noErrorBox:!0}).then((t=>{this.updatesState.seq=t.seq,this.updatesState.pts=t.pts,this.updatesState.date=t.date,this.saveUpdatesState(),this.updatesState.syncLoading=null,e()}))}))),this.apiManager.setUpdatesProcessor(this.processUpdateMessage),this.setProxy(),a&&this.updatesState.syncLoading.then((()=>{return t=this,s=void 0,i=function*(){const t={en:"was updated to version",ru:"обновлён до верÑии"},s=e=>{fetch(`changelogs/${e}_${a.split(" ")[0]}.md`).then((e=>200===e.status&&e.ok&&e.text()||Promise.reject())).then((s=>{const n=t[e]||t.en;s=`**Telegram Web${_.Z.suffix} ${n} ${a}**\n\n`+s;const i=[],r={_:"updateServiceNotification",entities:i,message:(0,ke.Z)(s,i),type:"local",pFlags:{},inbox_date:(0,te.Z)(!0),media:void 0};this.processLocalUpdate(r)}))},n=(0,we.Z)([e,"en"]);for(const e of n)try{yield s(e);break}catch(e){}},new((n=void 0)||(n=Promise))((function(e,a){function r(e){try{p(i.next(e))}catch(e){a(e)}}function o(e){try{p(i.throw(e))}catch(e){a(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof n?a:new n((function(e){e(a)}))).then(r,o)}p((i=i.apply(t,s||[])).next())}));var t,s,n,i}))})))}}Ae(Ue,[p.Z,G]);class De extends G{constructor(){super(...arguments),this.savedAvatarURLs={}}after(){this.rootScope.addEventListener("avatar_update",(({peerId:e,threadId:t})=>{t||this.removeFromAvatarsCache(e)}))}isAvatarCached(e,t){const a=this.savedAvatarURLs[e];return void 0===t?!!a:!(!a||!a[t]||a[t]instanceof Promise)}removeFromAvatarsCache(e){this.savedAvatarURLs[e]&&delete this.savedAvatarURLs[e]}loadAvatar(e,t,a){var s,n;const i=null!==(s=(n=this.savedAvatarURLs)[e])&&void 0!==s?s:n[e]={};if(i[a])return i[a];{const s={_:"inputPeerPhotoFileLocation",pFlags:{},peer:this.appPeersManager.getInputPeerById(e),photo_id:t.photo_id},n={dcId:t.dc_id,location:s};"photo_big"===a&&(s.pFlags.big=!0,n.limitPart=524288);const r=this.apiFileManager.download(n);return i[a]=r.then((e=>i[a]=URL.createObjectURL(e)))}}}var Ee=a(144),Te=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class Fe extends G{after(){this.calls=new Map,i().IS_CALL_SUPPORTED&&this.apiUpdatesManager.addMultipleEventsListeners({updatePhoneCall:e=>{this.saveCall(e.phone_call)},updatePhoneCallSignalingData:e=>{this.rootScope.dispatchEvent("call_signaling",{callId:e.phone_call_id,data:e.data})}})}computeKey(e,t,a){return this.cryptoWorker.invokeCrypto("compute-dh-key",e,t,a)}saveCall(e){const t="phoneCallDiscarded"===e._,a=this.calls.get(e.id);return a?(re(a,e),t&&this.calls.delete(e.id),e=a):t||this.calls.set(e.id,e),this.rootScope.dispatchEvent("call_update",e),e}getCall(e){return this.calls.get(e)}getCallInput(e){const t=this.getCall(e);return{_:"inputPhoneCall",id:t.id,access_hash:t.access_hash}}savePhonePhoneCall(e){return this.appUsersManager.saveApiUsers(e.users),this.saveCall(e.phone_call)}generateDh(){return this.apiManager.invokeApi("messages.getDhConfig",{version:0,random_length:256}).then((e=>this.cryptoWorker.invokeCrypto("generate-dh",e)))}requestCall(e,t,a,s){return Te(this,void 0,void 0,(function*(){const n=yield this.apiManager.invokeApi("phone.requestCall",{user_id:this.appUsersManager.getUserInput(e),protocol:t,video:s,random_id:(0,Ee.d)(32),g_a_hash:a});return this.savePhonePhoneCall(n)}))}discardCall(e,t,a,s){return Te(this,void 0,void 0,(function*(){if(!this.getCall(e))return;const n=yield this.apiManager.invokeApi("phone.discardCall",{video:s,peer:this.getCallInput(e),duration:t,reason:{_:a},connection_id:"0"});this.apiUpdatesManager.processUpdateMessage(n)}))}}var Re=a(7120),xe=a(2566),Be=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class Ve extends G{constructor(){super(...arguments),this.clear=(e=!1)=>{if(e)this.chats={};else for(const e in this.chats)if(e&&!this.peersStorage.isPeerNeeded(e.toPeerId(!0))){const t=this.chats[e];this.appUsersManager.modifyUsernamesCache(t,!1),this.storage.delete(e),delete this.chats[e]}},this.onChatUpdated=(e,t)=>{var a;this.apiUpdatesManager.processUpdateMessage(t),(null===(a=null==t?void 0:t.updates)||void 0===a?void 0:a.length)&&this.isChannel(e)&&this.rootScope.dispatchEvent("invalidate_participants",e)},this.onUpdateChannelParticipant=e=>{this.apiManager.clearCache("channels.getParticipants",(t=>t.channel.channel_id===e.channel_id)),this.rootScope.dispatchEvent("chat_participant",e)},this.onUpdateChatDefaultBannedRights=e=>{const t=this.appPeersManager.getPeerId(e.peer).toChatId(),a=this.chats[t];a&&(a.default_banned_rights=e.default_banned_rights,this.rootScope.dispatchEvent("chat_update",t))}}after(){return this.clear(!0),this.apiUpdatesManager.addMultipleEventsListeners({updateChannelParticipant:this.onUpdateChannelParticipant,updateChatDefaultBannedRights:this.onUpdateChatDefaultBannedRights}),Promise.all([this.appStateManager.getState(),this.appStoragesManager.loadStorage("chats")]).then((([e,{results:t,storage:a}])=>{this.storage=a,this.saveApiChats(t),this.peersStorage.addEventListener("peerNeeded",(e=>{e.isUser()||this.storage.getFromCache(e.toChatId())||this.storage.set({[e.toChatId()]:this.getChat(e.toChatId())})})),this.peersStorage.addEventListener("peerUnneeded",(e=>{!e.isUser()&&this.storage.getFromCache(e.toChatId())&&this.storage.delete(e.toChatId())}))}))}saveApiChats(e,t){e.saved||(e.saved=!0,e.forEach((e=>this.saveApiChat(e,t))))}saveApiChat(e,t){var a,s,n,i,r;if(!e||"chatEmpty"===e._)return;const o=this.chats[e.id];if(null!==(a=(r=e).pFlags)&&void 0!==a||(r.pFlags={}),e.pFlags.min&&void 0!==o)return;"channel"===e._&&void 0===e.participants_count&&void 0!==o&&o.participants_count&&(e.participants_count=o.participants_count),"chatPhotoEmpty"===(null===(s=e.photo)||void 0===s?void 0:s._)&&delete e.photo;const p=this.appUsersManager.setUsernameToCache(e,o),d=e.id.toPeerId(!0);if(void 0===o)this.chats[e.id]=e;else{const t=null===(n=o.photo)||void 0===n?void 0:n.photo_id,a=null===(i=e.photo)||void 0===i?void 0:i.photo_id,s=o.pFlags.forum!==e.pFlags.forum,r=t!==a||s,f=o.title!==e.title||p,c=o.pFlags.verified!==e.pFlags.verified||o.pFlags.scam!==e.pFlags.scam||o.pFlags.fake!==e.pFlags.fake;re(o,e),this.rootScope.dispatchEvent("chat_update",e.id),r&&this.rootScope.dispatchEvent("avatar_update",{peerId:d}),(f||c)&&this.rootScope.dispatchEvent("peer_title_edit",{peerId:d}),s&&this.rootScope.dispatchEvent("chat_toggle_forum",{chatId:e.id,enabled:!!e.pFlags.forum})}this.peersStorage.isPeerNeeded(d)&&this.storage.set({[e.id]:e})}getChat(e){return this.chats[e]}hasRights(e,t,a,s){return(0,Re.Z)(this.getChat(e),t,a,s)}editChatDefaultBannedRights(e,t){const a=this.getChat(e);return a.default_banned_rights&&a.default_banned_rights.until_date===t.until_date&&(0,Y.Z)(a.default_banned_rights.pFlags,t.pFlags)?Promise.resolve():this.apiManager.invokeApi("messages.editChatDefaultBannedRights",{peer:this.appPeersManager.getInputPeerById(e.toPeerId(!0)),banned_rights:t}).then(this.onChatUpdated.bind(this,e))}isChannel(e){const t=this.chats[e];return!(!t||"channel"!==t._&&"channelForbidden"!==t._)}isMegagroup(e){var t;const a=this.chats[e];return!!(null===(t=null==a?void 0:a.pFlags)||void 0===t?void 0:t.megagroup)}isForum(e){var t;const a=this.chats[e];return!!(null===(t=null==a?void 0:a.pFlags)||void 0===t?void 0:t.forum)}isBroadcast(e){return this.isChannel(e)&&!this.isMegagroup(e)}isInChat(e){let t=!0;const a=this.getChat(e);return(!a||"channelForbidden"===a._||"chatForbidden"===a._||"chatEmpty"===a._||a.pFlags.left||a.pFlags.deactivated)&&(t=!1),t}getChannelInput(e){const t=this.getChat(e);return t&&t.access_hash?{_:"inputChannel",channel_id:e,access_hash:t.access_hash||"0"}:{_:"inputChannelEmpty"}}getInputPeer(e){return this.isChannel(e)?this.getChannelInputPeer(e):this.getChatInputPeer(e)}getChatInputPeer(e){return{_:"inputPeerChat",chat_id:e}}getChannelInputPeer(e){return{_:"inputPeerChannel",channel_id:e,access_hash:this.getChat(e).access_hash||0}}hasChat(e,t){const a=this.chats[e];return(0,fe.Z)(a)&&(t||!a.pFlags.min)}getChatString(e){const t=this.getChat(e);return this.isChannel(e)?(this.isMegagroup(e)?"s":"c")+e+"_"+t.access_hash:"g"+e}createChannel(e){return this.apiManager.invokeApi("channels.createChannel",e).then((e=>(this.apiUpdatesManager.processUpdateMessage(e),e.chats[0].id)))}inviteToChannel(e,t){const a=this.getChannelInput(e),s=t.map((e=>this.appUsersManager.getUserInput(e)));return this.apiManager.invokeApi("channels.inviteToChannel",{channel:a,users:s}).then(this.onChatUpdated.bind(this,e))}createChat(e,t){return this.apiManager.invokeApi("messages.createChat",{users:t.map((e=>this.appUsersManager.getUserInput(e))),title:e}).then((e=>(this.apiUpdatesManager.processUpdateMessage(e),e.chats[0].id)))}leaveChannel(e){return this.apiManager.invokeApi("channels.leaveChannel",{channel:this.getChannelInput(e)}).then(this.onChatUpdated.bind(this,e))}joinChannel(e){return this.apiManager.invokeApi("channels.joinChannel",{channel:this.getChannelInput(e)}).then(this.onChatUpdated.bind(this,e))}addChatUser(e,t,a=100){return this.apiManager.invokeApi("messages.addChatUser",{chat_id:e,user_id:this.appUsersManager.getUserInput(t),fwd_limit:a}).then(this.onChatUpdated.bind(this,e))}deleteChatUser(e,t){return this.apiManager.invokeApi("messages.deleteChatUser",{chat_id:e,user_id:this.appUsersManager.getUserInput(t)}).then(this.onChatUpdated.bind(this,e))}leaveChat(e){return this.deleteChatUser(e,this.appUsersManager.getSelf().id)}leave(e){return this.isChannel(e)?this.leaveChannel(e):this.leaveChat(e)}delete(e){return this.isChannel(e)?this.deleteChannel(e):this.deleteChat(e)}deleteChannel(e){return this.apiManager.invokeApi("channels.deleteChannel",{channel:this.getChannelInput(e)}).then(this.onChatUpdated.bind(this,e))}deleteChat(e){return this.apiManager.invokeApi("messages.deleteChat",{chat_id:e})}migrateChat(e){const t=this.getChat(e);return"channel"===t._?Promise.resolve(t.id):this.apiManager.invokeApi("messages.migrateChat",{chat_id:e}).then((t=>(this.onChatUpdated(e,t),t.updates.find((e=>"updateChannel"===e._)).channel_id)))}updateUsername(e,t,a){const s=this.apiManager.invokeApi("channels.updateUsername",{channel:this.getChannelInput(e),username:t});return this.refreshChatAfterRequest(e,s,a)}editPhoto(e,t){const a={_:"inputChatUploadedPhoto",file:t};let s;return s=this.isChannel(e)?this.apiManager.invokeApi("channels.editPhoto",{channel:this.getChannelInput(e),photo:a}):this.apiManager.invokeApi("messages.editChatPhoto",{chat_id:e,photo:a}),s.then(this.onChatUpdated.bind(this,e))}editTitle(e,t){let a;return a=this.isChannel(e)?this.apiManager.invokeApi("channels.editTitle",{channel:this.getChannelInput(e),title:t}):this.apiManager.invokeApi("messages.editChatTitle",{chat_id:e,title:t}),a.then(this.onChatUpdated.bind(this,e))}editAbout(e,t){const a=e.toPeerId(!0);return this.apiManager.invokeApi("messages.editChatAbout",{peer:this.appPeersManager.getInputPeerById(a),about:t}).then((e=>(e&&this.rootScope.dispatchEvent("peer_bio_edit",a),e)))}editBanned(e,t,a){return Be(this,void 0,void 0,(function*(){const s="object"!=typeof t?t:(0,xe.Z)(t),n=this.isChannel(e);if(!n){const t=yield this.migrateChat(e);e=t}return this.apiManager.invokeApi("channels.editBanned",{channel:this.getChannelInput(e),participant:this.appPeersManager.getInputPeerById(s),banned_rights:a}).then((i=>{if(this.onChatUpdated(e,i),"object"==typeof t){const i=(0,te.Z)(!0);this.apiUpdatesManager.processLocalUpdate({_:"updateChannelParticipant",channel_id:e,date:i,actor_id:void 0,qts:void 0,user_id:s,prev_participant:n?t:void 0,new_participant:Object.keys(a.pFlags).length?{_:"channelParticipantBanned",date:i,banned_rights:a,kicked_by:this.appUsersManager.getSelf().id,peer:this.appPeersManager.getOutputPeer(s),pFlags:{}}:void 0})}}))}))}clearChannelParticipantBannedRights(e,t){return this.editBanned(e,t,{_:"chatBannedRights",until_date:0,pFlags:{}})}kickFromChannel(e,t){return this.editBanned(e,t,{_:"chatBannedRights",until_date:0,pFlags:{view_messages:!0}})}kickFromChat(e,t){return this.isChannel(e)?this.kickFromChannel(e,t):this.deleteChatUser(e,(0,fe.Z)(t)?(0,xe.Z)(t):t.toUserId())}resolveChannel(e){return this.apiManager.invokeApiSingle("channels.getChannels",{id:[{_:"inputChannel",channel_id:e,access_hash:"0"}]}).then((e=>{this.saveApiChats(e.chats)}))}togglePreHistoryHidden(e,t){return this.migrateChat(e).then((e=>this.apiManager.invokeApi("channels.togglePreHistoryHidden",{channel:this.getChannelInput(e),enabled:t}).then(this.onChatUpdated.bind(this,e))))}toggleSignatures(e,t){return this.apiManager.invokeApi("channels.toggleSignatures",{channel:this.getChannelInput(e),enabled:t}).then(this.onChatUpdated.bind(this,e))}toggleNoForwards(e,t){return this.apiManager.invokeApi("messages.toggleNoForwards",{peer:this.getInputPeer(e),enabled:t}).then(this.onChatUpdated.bind(this,e))}setChatAvailableReactions(e,t){const a=this.appProfileManager.getCachedFullChat(e);return a&&(a.available_reactions=t,this.rootScope.dispatchEvent("chat_full_update",e)),this.apiManager.invokeApi("messages.setChatAvailableReactions",{peer:this.getInputPeer(e),available_reactions:t}).then(this.onChatUpdated.bind(this,e))}getSendAs(e){return this.apiManager.invokeApiSingleProcess({method:"channels.getSendAs",params:{peer:this.getChannelInputPeer(e)},processResult:e=>(this.appUsersManager.saveApiUsers(e.users),this.saveApiChats(e.chats),e.peers)})}importChatInvite(e){return this.apiManager.invokeApi("messages.importChatInvite",{hash:e}).then((e=>(this.apiUpdatesManager.processUpdateMessage(e),e.chats[0].id)))}checkUsername(e,t){return this.apiManager.invokeApi("channels.checkUsername",{channel:this.getChannelInput(e),username:t})}getSponsoredMessage(e){return this.apiManager.invokeApiCacheable("channels.getSponsoredMessages",{channel:this.getChannelInput(e)},{cacheSeconds:300}).then((e=>{if("messages.sponsoredMessages"===e._){this.appUsersManager.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats);const t=e.messages.shift();e.messages.push(t)}return e}))}viewSponsoredMessage(e,t){return this.apiManager.invokeApiSingle("channels.viewSponsoredMessage",{channel:this.getChannelInput(e),random_id:t})}checkChatInvite(e){return this.apiManager.invokeApi("messages.checkChatInvite",{hash:e}).then((e=>(e.chat&&this.saveApiChat(e.chat,!0),e)))}toggleUsername(e,t,a){const s=this.apiManager.invokeApi("channels.toggleUsername",{channel:this.getChannelInput(e),username:t,active:a});return this.refreshChatAfterRequest(e,s)}reorderUsernames(e,t){const a=this.apiManager.invokeApi("channels.reorderUsernames",{channel:this.getChannelInput(e),order:t});return this.refreshChatAfterRequest(e,a)}deactivateAllUsernames(e,t){const a=this.apiManager.invokeApi("channels.deactivateAllUsernames",{channel:this.getChannelInput(e)});return this.refreshChatAfterRequest(e,a,t)}makeChannelPrivate(e){const t=[this.updateUsername(e,"",!0),this.deactivateAllUsernames(e,!0)],a=Promise.all(t).then((()=>!0));return this.refreshChatAfterRequest(e,a)}refreshChatAfterRequest(e,t,a){return a?t:t.then((t=>this.getChannels([e]).then((()=>t))))}getChannels(e){return this.apiManager.invokeApi("channels.getChannels",{id:e.map((e=>this.getChannelInput(e)))}).then((e=>{this.saveApiChats(e.chats)}))}toggleForum(e,t){return this.migrateChat(e).then((e=>this.apiManager.invokeApi("channels.toggleForum",{channel:this.getChannelInput(e),enabled:t}).then(this.onChatUpdated.bind(this,e))))}editForumTopic(e){const{chatId:t,topicId:a,title:s,iconEmojiId:n,closed:i,hidden:r}=e;return this.apiManager.invokeApi("channels.editForumTopic",{channel:this.getChannelInput(t),topic_id:(0,oe.Z)(a),title:s,icon_emoji_id:n,closed:i,hidden:r}).then(this.onChatUpdated.bind(this,t))}createForumTopic(e){return Be(this,void 0,void 0,(function*(){const{chatId:t,title:a,iconColor:s,iconEmojiId:n}=e,i=yield this.appProfileManager.getChannelFull(t),r=i.default_send_as&&this.appPeersManager.getInputPeerById(this.appPeersManager.getPeerId(i.default_send_as));return this.apiManager.invokeApi("channels.createForumTopic",{channel:this.getChannelInput(t),title:a,icon_color:s,icon_emoji_id:n,random_id:(0,Ee.a)(),send_as:r}).then((e=>{this.onChatUpdated(t,e);const a=e.updates.find((e=>"updateNewChannelMessage"===e._));return(0,pe.Z)(a.message.id)}))}))}updatePinnedForumTopic(e,t,a){return this.apiManager.invokeApi("channels.updatePinnedForumTopic",{channel:this.getChannelInput(e),topic_id:(0,oe.Z)(t),pinned:a}).then(this.onChatUpdated.bind(this,e))}}a(4762);var Oe,Le=a(5953),Ne=a(9005),Ze=a(6637),je=a(2423);function qe(e,t){(0,Ze.Z)(e)||(e="https://"+e);const a={url:e};let s,n,i,r;if(s=e.match(/^(?:https?:\/\/)?(?:(.+?)\.)?(?:(?:web|k|z)\.)?t(?:elegram)?\.me(?:\/(.+))?/)){const t=new URL(e);let a=s[1];a&&o.BX.has(s[1])&&(a=void 0),a&&(t.pathname=a+("/"===t.pathname?"":t.pathname));const n=t.pathname.slice(1),i=n.split("/");if(i[0]&&"$"===i[0][0]&&i[0].length>1)r="invoice";else if(/^\W/.test(n)&&!je.kO.test(n))r="joinchat";else switch(i[0]){case"joinchat":case"addstickers":case"addemoji":case"voicechat":case"invoice":if(1!==i.length&&!a){r=i[0];break}default:if(i[1]&&i[1].match(/^\d+(?:\?(?:comment|thread)=\d+)?$/)||1===i.length){r="im";break}}}else(n=e.match(/^(?:https?:\/\/)?telesco\.pe\/([^/?]+)\/(\d+)/))?r="im":(i=e.match(/tg:(?:\/\/)?(.+?)(?:\?|$)/))&&(r="tg_"+i[1]);return window[r]||(r=void 0),a.onclick=r,a}d.GO&&(d.GO.wrapUrl=qe),function(e){let t,s;function n(t){e.lastRequestedLangCode=t,e.lastRequestedNormalizedLangCode=t.split("-")[0]}function i(){if("h12"===e.timeFormat)try{const t=P({hour:"numeric",minute:"numeric",hour12:!0}),a=new Date;a.setHours(0);const s=t.format(a);e.amPmCache.am=s.split(/\s/)[1],a.setHours(12);const n=t.format(a);e.amPmCache.pm=n.split(/\s/)[1]}catch(t){console.error("cannot get am/pm",t),e.amPmCache={am:"AM",pm:"PM"}}}function r(){const e=_.Z.langPackCode;return n(e),Promise.all([a.e(104).then(a.bind(a,9104)),a.e(301).then(a.bind(a,9301)),a.e(8).then(a.bind(a,9179))]).then((([t,a,s])=>{const n=[];return p(t.default,n),p(a.default,n),f({_:"langPackDifference",from_version:0,lang_code:e,strings:n,version:0,local:!0,countries:s.default})}))}function o(t,s){e.requestedServerLanguage=!0;const n=g.managers;return Promise.all([n.apiManager.invokeApiCacheable("langpack.getLangPack",{lang_code:t,lang_pack:"web"}),!1,a.e(104).then(a.bind(a,9104)),a.e(301).then(a.bind(a,9301)),n.apiManager.invokeApiCacheable("help.getCountriesList",{lang_code:t,hash:0}),e.polyfillPromise])}function p(e,t=[]){for(const a in e){const s=e[a];"string"==typeof s?t.push({_:"langPackString",key:a,value:s}):t.push(Object.assign({_:"langPackStringPluralized",key:a},s))}return t}function f(e){return e.appVersion=_.Z.langPackVersion,h.Z.set({langPack:e}).then((()=>(c(e),e)))}function c(a){const s=e.lastRequestedLangCode;if(a.lang_code===s){try{t=new Intl.PluralRules(e.lastRequestedNormalizedLangCode)}catch(a){console.error("pluralRules error",a),t=new Intl.PluralRules(e.lastRequestedNormalizedLangCode.split("-",1)[0])}try{t=new Intl.PluralRules(a.lang_code)}catch(e){console.error("pluralRules error",e),t=new Intl.PluralRules(a.lang_code.split("-",1)[0])}e.strings.clear();for(const t of a.strings)e.strings.set(t.key,t);a.countries&&(e.countriesList.length=0,e.countriesList.push(...a.countries.countries),a.countries.countries.forEach((t=>{if(t.name){const a=t.default_name;e.strings.set(a,{_:"langPackString",key:a,value:t.name})}}))),e.lastAppliedLangCode!==s&&(g.dispatchEvent("language_change",s),e.lastAppliedLangCode=s,v.clear(),i()),Array.from(document.querySelectorAll(".i18n")).forEach((t=>{const a=e.weakMap.get(t);a&&a.update()}))}}function l(e,t,a={i:0}){const s=[];let n=0;return e.replace(/(\*\*|__)(.+?)\1|(\n)|(\[.+?\]\(.*?\))|un\d|%\d\$.|%./g,((e,i,r,o,p,d,f)=>{if(s.push(f.slice(n,d)),i){let e;switch(i){case"**":e=document.createElement("b");break;case"__":e=document.createElement("i")}e.append(...l(r,t,a)),s.push(e)}else if(o)s.push(document.createElement("br"));else if(p){const e=p.lastIndexOf("]"),n=p.slice(1,e),i=p.slice(e+2,p.length-1);let r;if(i&&(0,Ze.Z)(i)){r=document.createElement("a");const e=qe(i);r.href=e.url,e.onclick&&r.setAttribute("onclick",e.onclick),r.target="_blank"}else r=t[a.i++],r instanceof DocumentFragment&&(r=r.firstChild),"string"!=typeof r&&(r.textContent="");const o=l(n,t,a);"string"==typeof r?s.push(...o):(r.append(...o),s.push(r))}else t&&function(e,t,a){const s=t[a.i++];Array.isArray(s)?e.push(...s):e.push(s)}(s,t,a);return n=d+e.length,""})),n!==e.length&&s.push(e.slice(n)),s}function m(a,s=!1,n){const i=e.strings.get(a);let r;if(i)if("langPackStringPluralized"===i._&&(null==n?void 0:n.length)){let e=n[0];"string"==typeof e&&(e=+e.replace(/\D/g,"")),r=i[t.select(e)+"_value"]||i.other_value}else r="langPackString"===i._?i.value:a;else r=a;const o=l(r,n);return s?o.map((e=>e instanceof Node?e.textContent:e)).join(""):o}e.strings=new Map,e.countriesList=[],e.requestedServerLanguage=!1,e.isRTL=!1,e.setRTL=function(t){e.isRTL=t},e.getCacheLangPack=function(){return s||(s=Promise.all([h.Z.get("langPack"),e.polyfillPromise]).then((([t])=>t?(d.ZP,e.lastRequestedLangCode||n(t.lang_code),c(t),t):r())).finally((()=>{s=void 0})))},e.setTimeFormat=function(t,a=!!e.timeFormat&&e.timeFormat!==t){e.timeFormat=t,i(),a&&(v.clear(),Array.from(document.querySelectorAll(".i18n")).forEach((t=>{const a=e.weakMap.get(t);a instanceof b&&a.update()})))},e.loadLocalLangPack=r,e.loadLangPack=o,e.getStrings=function(e,t){return g.managers.apiManager.invokeApi("langpack.getStrings",{lang_pack:_.Z.langPack,lang_code:e,keys:t})},e.formatLocalStrings=p,e.getLangPack=function(e,t){return n(e),o(e).then((([e,t,a,s,n,i])=>{let r=[];return[a,s].forEach((e=>{p(e.default,r)})),r=r.concat(...[e.strings,t.strings].filter(Boolean)),e.strings=r,e.countries=n,f(e)}))},e.saveLangPack=f,e.polyfillPromise="undefined"!=typeof Intl&&void 0!==Intl.PluralRules?Promise.resolve():a.e(642).then(a.bind(a,4642)).then((e=>{window.Intl=Object.assign("undefined"!=typeof Intl?Intl:{},e.default)})),e.applyLangPack=c,e.superFormatter=l,e.format=m,e.weakMap=new WeakMap;class u{constructor(t){this.element=(null==t?void 0:t.element)||document.createElement("span"),this.element.classList.add("i18n"),this.property=null==t?void 0:t.property,t&&(t.key||t.date)&&this.update(t),e.weakMap.set(this.element,this)}}class y extends u{constructor(e={}){var t;super(Object.assign(Object.assign({},e),{property:null!==(t=e.property)&&void 0!==t?t:"innerHTML"}))}update(e){if((0,Le.Z)(this,e),"innerHTML"===this.property)this.element.textContent="",this.element.append(...m(this.key,!1,this.args));else{const e=this.element[this.property],t=m(this.key,!0,this.args);void 0===e?this.element.dataset[this.property]=t:this.element[this.property]=t}}compareAndUpdate(e){if(this.key!==e.key||!(0,Y.Z)(this.args,e.args))return this.update(e)}}e.IntlElement=y;const v=new Map;function P(t={}){const a=JSON.stringify(t);let s=v.get(a);return s||(s=new Intl.DateTimeFormat(e.lastRequestedNormalizedLangCode+"-u-hc-"+e.timeFormat,t),v.set(a,s)),s}e.amPmCache={am:"AM",pm:"PM"};class b extends u{constructor(e){var t;super(Object.assign(Object.assign({},e),{property:null!==(t=e.property)&&void 0!==t?t:"textContent"})),this.element.setAttribute("dir","auto")}update(t){let a;if((0,Le.Z)(this,t),this.options.hour&&this.options.minute&&2===Object.keys(this.options).length){const t=this.date.getHours();a=("0"+("h12"===e.timeFormat?t%12||12:t)).slice(-2)+":"+("0"+this.date.getMinutes()).slice(-2),"h12"===e.timeFormat&&(a+=" "+(t<12?e.amPmCache.am:e.amPmCache.pm))}else{const e=P(this.options);a=(0,Ne.Z)(e.format(this.date))}this.element[this.property]=a}}e.IntlDateElement=b,e.i18n=function(e,t){return new y({key:e,args:t}).element},e.i18n_=function(e){return new y(e).element},e._i18n=function(e,t,a,s){return new y({element:e,key:t,args:a,property:s}).element}}(Oe||(Oe={}));const Ge=Oe;Oe.i18n,Oe.i18n_,Oe._i18n,d.GO.I18n=Oe;const He=["January","February","March","April","May","June","July","August","September","October","November","December"],We=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ze=86400,Ke=e=>{const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-a);const s=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-s.getTime())/ze+1)/7)};d.GO&&(d.GO.formatDateAccordingToTodayNew=function(e){const t=new Date,a=t.getTime()/1e3|0,s=e.getTime()/1e3|0,n={};return a-s<ze&&t.getDate()===e.getDate()?n.hour=n.minute="2-digit":t.getFullYear()!==e.getFullYear()?(n.year=n.day="numeric",n.month="2-digit"):a-s<604800&&Ke(t)===Ke(e)?n.weekday="short":(n.month="short",n.day="numeric"),new Ge.IntlDateElement({date:e,options:n}).element});const Je=2013,$e=new RegExp("20[0-9]{1,2}"),Qe=new RegExp("(\\w{3,}) ([0-9]{0,4})","i"),Ye=new RegExp("([0-9]{0,4}) (\\w{2,})","i"),Xe=new RegExp("^([0-9]{1,4})(\\.| |/|\\-)([0-9]{1,4})$","i"),et=new RegExp("^([0-9]{1,2})(\\.| |/|\\-)([0-9]{1,2})(\\.| |/|\\-)([0-9]{1,4})$","i"),tt=[31,29,31,30,31,30,31,31,30,31,30,31];function at(e,t,a){const s=(new Date).getFullYear(),n=Date.now();if(a>=Je&&a<=s){const s=new Date;s.setFullYear(a,t,1),s.setHours(0,0,0);const i=s.getTime();if(i>n)return;s.setMonth(s.getMonth()+1);const r=s.getTime()-1;e.push({title:nt(i),minDate:i,maxDate:r})}}function st(e,t,a){if(pt(t,a)){const n=(new Date).getFullYear(),i=Date.now();for(let r=n;r>=Je;r--){if(1===a&&28===t&&((s=r)%4!=0||s%100==0)&&s%400!=0)continue;const o=new Date;o.setFullYear(r,a,t+1),o.setHours(0,0,0);const p=o.getTime();if(p>i)continue;o.setFullYear(r,a,t+2),o.setHours(0,0,0);const d=o.getTime()-1;r===n?e.push({title:it(p),minDate:p,maxDate:d}):e.push({title:rt(p),minDate:p,maxDate:d})}}var s}function nt(e){const t=new Date(e);return He[t.getMonth()].slice(0,3)+" "+t.getFullYear()}function it(e){const t=new Date(e);return He[t.getMonth()].slice(0,3)+" "+t.getDate()}function rt(e){const t=new Date(e);return("0"+t.getDate()).slice(-2)+"."+("0"+(t.getMonth()+1)).slice(-2)+"."+t.getFullYear()}function ot(e){const t=new Date(e);return We[t.getDay()]}function pt(e,t){return t>=0&&t<12&&e>=0&&e<tt[t]}function dt(e){e=e.toLowerCase();for(let t=0;t<12;t++)if(0===He[t].toLowerCase().indexOf(e))return t;return-1}function ft(e,t,a){"byteLength"in a[e]&&(a[e]=[...a[e]]),t&&t[e]!==a[e]&&(t[e].length=a[e].length,a[e].forEach(((a,s)=>{t[e][s]=a})),a[e]=t[e])}d.GO.fillTipDates=function(e,t){const a=e.trim().toLowerCase();if(a.length<3)return;if(0==="today".indexOf(a)){const e=new Date,a=e.getFullYear(),s=e.getMonth(),n=e.getDate();e.setFullYear(a,s,n),e.setHours(0,0,0);const i=e.getTime();e.setFullYear(a,s,n+1),e.setHours(0,0,0);const r=e.getTime()-1;return void t.push({title:"Today",minDate:i,maxDate:r})}if(0==="yesterday".indexOf(a)){const e=new Date,a=e.getFullYear(),s=e.getMonth(),n=e.getDate();e.setFullYear(a,s,n),e.setHours(0,0,0);const i=e.getTime()-864e5;e.setFullYear(a,s,n+1),e.setHours(0,0,0);const r=e.getTime()-86400001;return void t.push({title:"Yesterday",minDate:i,maxDate:r})}const s=function(e){const t=new Date;if(e.length<=3)return-1;for(let a=0;a<7;a++)if(t.setDate(t.getDate()+1),0===ot(t.getTime()).toLowerCase().indexOf(e))return t.getDay();return-1}(a);if(s>=0){const e=new Date,a=e.getTime(),n=s-e.getDay();e.setDate(e.getDate()+n),e.getTime()>a&&e.setTime(e.getTime()-6048e5);const i=e.getFullYear(),r=e.getMonth(),o=e.getDate();e.setFullYear(i,r,o),e.setHours(0,0,0);const p=e.getTime();e.setFullYear(i,r,o+1),e.setHours(0,0,0);const d=e.getTime()-1;return void t.push({title:ot(p),minDate:p,maxDate:d})}let n;if(null===(n=Xe.exec(a)))if(null===(n=et.exec(a)))if(null===(n=$e.exec(a))){if(null!==(n=Qe.exec(a))){const e=n[1],a=n[2],s=dt(e);if(s>=0){const e=+a;if(e>0&&e<=31)return void st(t,e-1,s);if(e>=Je)return void at(t,s,e)}}if(null!==(n=Ye.exec(a))){const e=n[1],a=dt(n[2]);if(a>=0){const s=+e;if(s>0&&s<=31)return void st(t,s-1,a);s>=Je&&at(t,a,s)}}}else{let e=+a;const s=(new Date).getFullYear();if(e<Je){e=Je;for(let a=s;a>=e;a--){const e=new Date;e.setFullYear(a,0,1),e.setHours(0,0,0);const s=e.getTime();e.setFullYear(a+1,0,1),e.setHours(0,0,0);const n=e.getTime()-1;t.push({title:""+a,minDate:s,maxDate:n})}}else if(e<=s){const a=new Date;a.setFullYear(e,0,1),a.setHours(0,0,0);const s=a.getTime();a.setFullYear(e+1,0,1),a.setHours(0,0,0);const n=a.getTime()-1;t.push({title:""+e,minDate:s,maxDate:n})}}else{const e=n[1],a=n[3],s=n[5];if(!n[2]===n[4])return;const i=parseInt(e),r=parseInt(a)-1;let o=parseInt(s);o>=10&&o<=99&&(o+=2e3);const p=(new Date).getFullYear();if(pt(i-1,r)&&o>=Je&&o<=p){const e=new Date;e.setFullYear(o,r,i),e.setHours(0,0,0);const a=e.getTime();e.setFullYear(o,r,i+1),e.setHours(0,0,0);const s=e.getTime()-1;return void t.push({title:rt(a),minDate:a,maxDate:s})}}else{const e=n[1],a=n[3],s=parseInt(e),i=parseInt(a);if(s>0&&s<=31){if(i>=Je&&s<=12)return void at(t,s-1,i);i<=12&&st(t,s-1,i-1)}else s>=Je&&i<=12&&at(t,i-1,s)}};var ct=a(2491),lt=a(7072),mt=a(8801),gt=a(6658);const ht={pdf:"application/pdf",tgv:"application/x-tgwallpattern",tgs:"application/x-tgsticker",json:"application/json",wav:"audio/wav",mp3:"audio/mpeg",ogg:"audio/ogg",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",svg:"image/svg+xml"},ut={};for(const e in ht)ut[ht[e]]=e;let yt=0;class _t extends G{constructor(){super(...arguments),this.onServiceWorkerFail=()=>{for(const e in this.docs){const t=this.docs[e];t.supportsStreaming&&(delete t.supportsStreaming,this.thumbsStorage.deleteCacheContext(t))}}}after(){this.docs={},this.stickerCachedThumbs={},this.uploadingWallPapers={},f.Z.getInstance().addEventListener("serviceWorkerOnline",(e=>{e||this.onServiceWorkerFail()}))}saveDoc(e,t){if(!e||"documentEmpty"===e._)return;const a=this.docs[e.id];e.file_reference&&(ft("file_reference",a,e),this.referenceDatabase.saveContext(e.file_reference,t)),a||(this.docs[e.id]=e);for(let t=0,a=e.attributes.length;t<a;++t){const a=e.attributes[t];switch(a._){case"documentAttributeFilename":e.file_name=(0,ct.Z)(a.file_name);break;case"documentAttributeAudio":if("round"===e.type)break;e.duration=a.duration,e.type=a.pFlags.voice&&"audio/ogg"===e.mime_type?"voice":"audio";break;case"documentAttributeVideo":e.duration=a.duration,e.w=a.w,e.h=a.h,a.pFlags.round_message?e.type="round":e.type="video";break;case"documentAttributeCustomEmoji":case"documentAttributeSticker":if(void 0!==a.alt&&(e.stickerEmojiRaw=a.alt),a.stickerset&&("inputStickerSetEmpty"===a.stickerset._?delete a.stickerset:"inputStickerSetID"===a.stickerset._&&(e.stickerSetInput=a.stickerset)),"image/webp"===e.mime_type&&(e.thumbs||i().IS_WEBP_SUPPORTED))e.type="sticker",e.sticker=1;else if("video/webm"===e.mime_type){if(!i().IS_WEBM_SUPPORTED)break;e.type="sticker",e.sticker=3,e.animated=!0}break;case"documentAttributeImageSize":e.type="photo",e.w=a.w,e.h=a.h;break;case"documentAttributeAnimated":"image/gif"!==e.mime_type&&"video/mp4"!==e.mime_type||(e.type="gif"),e.animated=!0}}if(e.mime_type)e.mime_type===ht.pdf?e.type="pdf":e.mime_type===ht.gif?e.type="gif":"application/x-tgsticker"===e.mime_type&&"AnimatedSticker.tgs"===e.file_name&&(e.type="sticker",e.animated=!0,e.sticker=2);else{const t=(e.file_name||"").split(".").pop(),a=t&&ht[t.toLowerCase()];if(a)e.mime_type=a;else switch(e.type){case"gif":case"video":case"round":e.mime_type="video/mp4";break;case"sticker":e.mime_type="image/webp";break;case"audio":e.mime_type="audio/mpeg";break;case"voice":e.mime_type="audio/ogg";break;default:e.mime_type="application/octet-stream"}}if("voice"===e.type||"round"===e.type){const t=e.attributes.find((e=>"documentAttributeFilename"===e._)),a=t&&t.file_name.split(".").pop(),s=((e,t={})=>{const a=t.monthAsNumber?".":" ",s=("0"+e.getHours()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)+(t.noSeconds?"":":"+("0"+e.getSeconds()).slice(-2));return(t.leadingZero?("0"+e.getDate()).slice(-2):e.getDate())+a+(t.monthAsNumber?("0"+(e.getMonth()+1)).slice(-2):He[e.getMonth()])+a+e.getFullYear()+(t.noTime?"":", "+s)})(new Date(1e3*e.date),{monthAsNumber:!0,leadingZero:!0}).replace(/[:\.]/g,"-").replace(", ","_");e.file_name=`${e.type}_${s}${a?"."+a:""}`}return zs()&&("gif"===e.type&&e.size>8e6||"audio"===e.type||"video"===e.type)?(e.supportsStreaming=!0,this.thumbsStorage.getCacheContext(e).url||this.thumbsStorage.setCacheContextURL(e,void 0,function(e,t=!1,a){let s;return s=t?"download":a?"thumb":e.supportsStreaming?"stream":"document",(0,mt.q)(s,(0,gt.Z)(e,a))}(e),0)):e.supportsStreaming=!1,e.file_name||(e.file_name=""),a?Object.assign(a,e):e}getDoc(e){return(0,fe.Z)(e)?e:this.docs[e]}downloadDoc(e,t,a){return this.apiFileManager.downloadMedia({media:e,queueId:t,onlyCache:a})}getLottieCachedThumb(e,t){const a=this.stickerCachedThumbs[e];return a&&a[t]}saveLottiePreview(e,t,a,s,n){var i,r,o;const p=this.getDoc(e);if(!p)return;const d=null!==(i=(r=this.stickerCachedThumbs)[o=p.id])&&void 0!==i?i:r[o]={},f=d[n];f&&f.w>=a&&f.h>=s||(d[n]={url:URL.createObjectURL(t),w:a,h:s})}saveWebPConvertedStrippedThumb(e,t){const a=this.getDoc(e);if(!a)return;const s=a.thumbs&&a.thumbs.find((e=>"photoStrippedSize"===e._));s&&(a.pFlags.stickerThumbConverted=!0,s.bytes=t)}prepareWallPaperUpload(e){const t="wallpaper-upload-"+ ++yt,a={_:"photoSize",h:0,w:0,location:{},size:e.size,type:o.Pt};let s={_:"document",access_hash:"",attributes:[],dc_id:0,file_reference:[],id:t,mime_type:e.type,size:e.size,date:(0,te.Z)(!0),pFlags:{},thumbs:[a],file_name:e.name};s=this.saveDoc(s);const n=this.thumbsStorage.setCacheContextURL(s,void 0,URL.createObjectURL(e),e.size),i={_:"wallPaper",access_hash:"",document:s,id:t,slug:t,pFlags:{}};return this.uploadingWallPapers[t]={cacheContext:n,file:e},i}uploadWallPaper(e){const{cacheContext:t,file:a}=this.uploadingWallPapers[e];return delete this.uploadingWallPapers[e],this.apiFileManager.upload({file:a,fileName:a.name}).then((e=>this.apiManager.invokeApi("account.uploadWallPaper",{file:e,mime_type:a.type,settings:{_:"wallPaperSettings",pFlags:{}}}).then((e=>((0,ue.Z)(e),e.document=this.saveDoc(e.document),this.thumbsStorage.setCacheContextURL(e.document,void 0,t.url,t.downloaded),e)))))}getGifs(){return this.apiManager.invokeApiHashable({method:"messages.getSavedGifs",processResult:e=>((0,ue.Z)(e),e.gifs.map((e=>this.saveDoc(e))))})}requestDocPart(e,t,a,s){const n=this.getDoc(e);return n?this.apiFileManager.requestFilePart(t,(0,lt.Z)(n),a,s):Promise.reject((0,X.Z)("NO_DOC"))}}var vt=a(6034);class Pt extends G{constructor(){super(...arguments),this.drafts={}}after(){this.apiUpdatesManager.addMultipleEventsListeners({updateDraftMessage:e=>{const t=this.appPeersManager.getPeerId(e.peer);this.saveDraft({peerId:t,threadId:e.threadId,draft:e.draft,notify:!0})}}),h.Z.get("drafts").then((e=>{this.drafts=e||{}}))}getKey(e,t){return e+(t?"_"+t:"")}getDraft(e,t){return this.drafts[this.getKey(e,t)]}addMissedDialogs(){return this.getAllDrafts().then((()=>{for(const e in this.drafts){if(-1!==e.indexOf("_"))continue;const t=e.toPeerId();this.appMessagesManager.getDialogOnly(t)||this.appMessagesManager.reloadConversation(t)}}))}getAllDrafts(){var e;return null!==(e=this.getAllDraftPromise)&&void 0!==e?e:this.getAllDraftPromise=this.apiManager.invokeApi("messages.getAllDrafts").then((e=>{(this.apiUpdatesManager.updatesState.syncLoading||Promise.resolve()).then((()=>{this.apiUpdatesManager.processUpdateMessage(e)}))}))}saveDraft({peerId:e,threadId:t,draft:a,notify:s,force:n}){const i=this.processApiDraft(a),r=this.getKey(e,t);return i?this.drafts[r]=i:delete this.drafts[r],h.Z.set({drafts:this.drafts}),s&&this.rootScope.dispatchEvent("draft_updated",{peerId:e,threadId:t,draft:i,force:n}),i}isEmptyDraft(e){return"draftMessage"!==(null==e?void 0:e._)||!(void 0!==e.reply_to_msg_id&&e.reply_to_msg_id>0)&&!e.message.length}processApiDraft(e){if(e&&"draftMessage"===e._)return e.reply_to_msg_id&&(e.reply_to_msg_id=(0,pe.Z)(e.reply_to_msg_id)),e}syncDraft(e,t,a,s=!0,n=!1){const i=this.getDraft(e,t);if((0,vt.Z)(i,a))return!0;const r={peer:this.appPeersManager.getInputPeerById(e),message:""};let o;if(this.isEmptyDraft(a))o={_:"draftMessageEmpty"};else{(0,ue.Z)(a);const e=a.message,t=a.entities;a.reply_to_msg_id&&(r.reply_to_msg_id=(0,oe.Z)(a.reply_to_msg_id)),(null==t?void 0:t.length)&&(r.entities=this.appMessagesManager.getInputEntities(t)),a.pFlags.no_webpage&&(r.no_webpage=a.pFlags.no_webpage),r.message=e}t&&(r.top_msg_id=(0,oe.Z)(t));const p=o||a;return p.date=(0,te.Z)(!0)+this.timeManager.getServerTimeOffset(),this.saveDraft({peerId:e,threadId:t,draft:p,notify:!0,force:n}),!s||this.apiManager.invokeApi("messages.saveDraft",r)}clearAllDrafts(){return this.apiManager.invokeApi("messages.clearAllDrafts").then((e=>{if(e)for(const e in this.drafts){const[t,a]=e.split("_");this.rootScope.dispatchEvent("draft_updated",{peerId:t.toPeerId(),threadId:a?+a:void 0,draft:void 0})}}))}clearDraft(e,t){const a={_:"draftMessageEmpty"};t?this.syncDraft(e,t,a,!1,!0):this.saveDraft({peerId:e,threadId:t,draft:a,notify:!0,force:!0})}setDraft(e,t,a,s){const n={_:"draftMessage",date:(0,te.Z)(!0),message:a,pFlags:{},entities:s};t?this.syncDraft(e,t,n,!1,!0):this.saveDraft({peerId:e,threadId:t,draft:n,notify:!0,force:!0})}}var bt=a(946),Mt=a(7746);const St={keywords:{},version:0,langCode:_.Z.langPackCode};class It extends G{constructor(){super(...arguments),this.keywordLangPacks={},this.indexedLangPacks={},this.getKeywordsPromises={},this.recent={},this.getRecentEmojisPromises={},this.getCustomEmojiDocumentPromises=new Map}getEmojiKeywords(e=_.Z.langPackCode){const t=this.getKeywordsPromises[e];if(t)return t;const a="emojiKeywords_"+e;return this.getKeywordsPromises[e]=h.Z.get(a).then((t=>((0,fe.Z)(t)||(t={}),(0,bt.Z)(St,t),t.langCode=e,this.keywordLangPacks[e]=t,this.apiManager.invokeApi("messages.getEmojiKeywordsDifference",{lang_code:t.langCode,from_version:t.version}).then((e=>{t.version=e.version;const s=t.keywords,n=e.keywords;for(let e=0,t=n.length;e<t;++e){const{keyword:t,emoticons:a}=n[e];s[t]=a}return h.Z.set({[a]:t}),t}),(()=>t)))))}getBothEmojiKeywords(){const e=[this.getEmojiKeywords()];return this.networkerFactory.language!==_.Z.langPackCode&&e.push(this.getEmojiKeywords(this.networkerFactory.language)),this.recent.native||e.push(this.getRecentEmojis("native")),Promise.all(e)}indexEmojis(){this.index||(this.index=new ae.Z(void 0,2));for(const e in this.keywordLangPacks){if(this.indexedLangPacks[e])continue;const t=this.keywordLangPacks[e].keywords;for(const e in t){const a=t[e];this.index.indexObject(a,e)}this.indexedLangPacks[e]=!0}}searchEmojis(e){let t;if(this.indexEmojis(),(e=e.toLowerCase().replace(/_/g," ")).trim()){const a=this.index.search(e);t=Array.from(a).reduce(((e,t)=>e.concat(t)),[])}else t=this.recent.native.concat(It.POPULAR_EMOJI).slice(0,32);return t=Array.from(new Set(t)),t}getRecentEmojis(e){var t;const a=this.getRecentEmojisPromises;return null!==(t=a[e])&&void 0!==t?t:a[e]=this.appStateManager.getState().then((t=>{let a=[];if("native"===e){const{recentEmoji:e}=t;a=Array.isArray(e)&&e.length?e:It.POPULAR_EMOJI}else{const{recentCustomEmoji:e}=t;a=Array.isArray(e)&&e.length?e:[]}return this.recent[e]=a}))}pushRecentEmoji(e){const t=e.docId?"custom":"native";e.emoji=(0,Mt.Z)(e.emoji),this.getRecentEmojis(t).then((a=>{const s=e.docId||e.emoji;(0,M.Z)(a,s),a.unshift(s),a.splice(32,a.length-32),this.appStateManager.pushToState("custom"===t?"recentCustomEmoji":"recentEmoji",a),this.rootScope.dispatchEvent("emoji_recent",e)}))}getCustomEmojiDocuments(e){return e.length?this.apiManager.invokeApi("messages.getCustomEmojiDocuments",{document_id:e}).then((e=>e.map((e=>this.appDocsManager.saveDoc(e,{type:"customEmoji",docId:e.id}))))):Promise.resolve([])}getCachedCustomEmojiDocuments(e){return e.map((e=>this.appDocsManager.getDoc(e)))}setDebouncedGetCustomEmojiDocuments(){!this.getCustomEmojiDocumentsPromise&&this.getCustomEmojiDocumentPromises.size&&(this.getCustomEmojiDocumentsPromise=(0,P.Z)(0).then((()=>{const e=[...this.getCustomEmojiDocumentPromises.keys()],t=[];do{const a=e.splice(0,100),s=this.getCustomEmojiDocuments(a).then((e=>{e.forEach(((e,t)=>{const s=a[t],n=this.getCustomEmojiDocumentPromises.get(s);this.getCustomEmojiDocumentPromises.delete(s),n.resolve(e)}))}));t.push(s)}while(e.length);return Promise.all(t)})).finally((()=>{this.getCustomEmojiDocumentsPromise=void 0,this.setDebouncedGetCustomEmojiDocuments()})))}getCustomEmojiDocument(e){let t=this.getCustomEmojiDocumentPromises.get(e);if(t)return t;return this.appDocsManager.getDoc(e)||(t=(0,v.Z)(),this.getCustomEmojiDocumentPromises.set(e,t),this.setDebouncedGetCustomEmojiDocuments(),t)}getCustomEmojis(){return this.appStickersManager.getEmojiStickers()}}It.POPULAR_EMOJI=["😂","😘","â¤ï¸","ðŸ˜","😊","ðŸ˜","ðŸ‘","☺ï¸","😔","😄","ðŸ˜","💋","😒","😳","😜","🙈","😉","😃","😢","ðŸ˜","😱","😡","ðŸ˜","😞","😅","😚","🙊","😌","😀","😋","😆","👌","ðŸ˜","😕"];var Ct=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class wt extends G{after(){this.log=(0,S.kg)("GROUP-CALLS"),this.groupCalls=new Map,this.participants=new Map,this.nextOffsets=new Map,this.apiUpdatesManager.addMultipleEventsListeners({updateGroupCall:e=>{this.saveGroupCall(e.call,e.chat_id)},updateGroupCallParticipants:e=>{this.saveGroupCall(e.call);const t=e.call.id;this.saveApiParticipants(t,e.participants)}}),this.rootScope.addEventListener("group_call_update",(e=>{"groupCallDiscarded"===e._&&this.participants.delete(e.id)}))}getCachedParticipants(e){let t=this.participants.get(e);return t||this.participants.set(e,t=new Map),t}prepareToSavingNextOffset(e){const t=this.nextOffsets,a=t.get(e);return{nextOffset:a,setNextOffset:s=>{t.get(e)===a&&t.set(e,s)}}}saveApiParticipant(e,t,a){const s=this.getCachedParticipants(e),n=(0,le.Z)(t.peer),i=s.get(n),r=t.pFlags.left;if(!i&&r)return;t.pFlags.muted||t.pFlags.can_self_unmute||(t.pFlags.can_self_unmute=!0),i?(re(i,t),t=i):s.set(n,t);const o=this.getGroupCall(e);if("groupCall"===(null==o?void 0:o._)){let e=!1;r?(--o.participants_count,e=!0):!t.pFlags.just_joined||i||t.pFlags.self||(++o.participants_count,e=!0),e&&this.rootScope.dispatchEvent("group_call_update",o)}r&&s.delete(n),this.rootScope.dispatchEvent("group_call_participant",{groupCallId:e,participant:t})}saveApiParticipants(e,t,a){t.saved||(t.saved=!0,t.forEach((t=>this.saveApiParticipant(e,t,a))))}editParticipant(e,t,a){return Ct(this,void 0,void 0,(function*(){this.saveApiParticipant(e,t);const s=t.pFlags.self?o.NM:(0,le.Z)(t.peer),n=yield this.apiManager.invokeApiSingle("phone.editGroupCallParticipant",{call:this.getGroupCallInput(e),participant:s===o.NM?this.appPeersManager.getInputPeerSelf():this.appPeersManager.getInputPeerById(s),muted:a.muted,volume:a.volume,raise_hand:a.raiseHand,video_paused:a.videoPaused,video_stopped:a.videoStopped,presentation_paused:a.presentationPaused});this.apiUpdatesManager.processUpdateMessage(n)}))}getGroupCall(e){return this.groupCalls.get(e)}getGroupCallFull(e,t){return Ct(this,void 0,void 0,(function*(){const a=this.getGroupCall(e);if(a&&"inputGroupCall"!==a._&&!t)return a;const s=this.getCachedParticipants(e).size?0:100;return this.apiManager.invokeApiSingleProcess({method:"phone.getGroupCall",params:{call:this.getGroupCallInput(e),limit:s},processResult:t=>{this.appUsersManager.saveApiUsers(t.users),this.appChatsManager.saveApiChats(t.chats),this.saveApiParticipants(e,t.participants,!0);const a=this.saveGroupCall(t.call);return s&&void 0===this.nextOffsets.get(e)&&this.nextOffsets.set(e,t.participants_next_offset),a}})}))}saveGroupCall(e,t){const a=this.groupCalls.get(e.id),s="inputGroupCall"!==e._&&(!a||"groupCallDiscarded"!==a._);return a?(s&&re(a,e),e=a):this.groupCalls.set(e.id,e),s&&this.rootScope.dispatchEvent("group_call_update",e),e}createGroupCall(e,t,a){return Ct(this,void 0,void 0,(function*(){const s=yield this.apiManager.invokeApi("phone.createGroupCall",{peer:this.appPeersManager.getInputPeerById(e.toPeerId(!0)),random_id:(0,Ee.d)(32),schedule_date:t,title:a});return this.apiUpdatesManager.processUpdateMessage(s),s.updates.find((e=>"updateGroupCall"===e._)).call}))}getGroupCallInput(e){const t=this.getGroupCall(e);return{_:"inputGroupCall",id:t.id,access_hash:t.access_hash}}getGroupCallParticipants(e){return Ct(this,void 0,void 0,(function*(){const{nextOffset:t,setNextOffset:a}=this.prepareToSavingNextOffset(e);return""!==t&&(yield this.apiManager.invokeApiSingleProcess({method:"phone.getGroupParticipants",params:{call:this.getGroupCallInput(e),ids:[],sources:[],offset:t||"",limit:100},processResult:t=>{const s=t.count===t.participants.length?"":t.next_offset;this.appChatsManager.saveApiChats(t.chats),this.appUsersManager.saveApiUsers(t.users),this.saveApiParticipants(e,t.participants),a(s)}})),{participants:this.getCachedParticipants(e),isEnd:""===this.nextOffsets.get(e)}}))}hangUp(e,t){const a=this.getGroupCallInput(e);let s;return s="boolean"==typeof t&&t?this.apiManager.invokeApi("phone.discardGroupCall",{call:a}):"number"==typeof t?this.apiManager.invokeApi("phone.leaveGroupCall",{call:a,source:t}):this.apiManager.invokeApi("phone.joinGroupCall",{call:a,join_as:this.appPeersManager.getInputPeerSelf(),muted:!0,video_stopped:!0,params:{_:"dataJSON",data:""}}),s.then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}joinGroupCall(e,t,a){return Ct(this,void 0,void 0,(function*(){const s=this.getGroupCallInput(e);let n;if("main"===a.type){const i={call:s,join_as:this.appPeersManager.getInputPeerSelf(),params:t,muted:a.isMuted,video_stopped:!a.joinVideo};n=this.apiManager.invokeApi("phone.joinGroupCall",i),this.log(`[api] joinGroupCall id=${e}`,i)}else{const a={call:s,params:t};n=this.apiManager.invokeApi("phone.joinGroupCallPresentation",a),this.log(`[api] joinGroupCallPresentation id=${e}`,a)}const i=yield n;return this.apiUpdatesManager.processUpdateMessage(i),i.updates.find((e=>"updateGroupCallConnection"===e._))}))}leaveGroupCallPresentation(e){return this.apiManager.invokeApi("phone.leaveGroupCallPresentation",{call:this.getGroupCallInput(e)}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}}function kt(e){return{_:"inputPhoto",id:e.id,access_hash:e.access_hash,file_reference:e.file_reference}}function At(e){return{_:"inputMediaPhoto",id:kt(e),ttl_seconds:0,pFlags:{}}}var Ut=a(515);function Dt(e){return{_:"inputMediaDocument",id:{_:"inputDocument",id:e.id,access_hash:e.access_hash,file_reference:e.file_reference},ttl_seconds:0,pFlags:{}}}class Et extends G{constructor(){super(...arguments),this.inlineResults={},this.setHash={}}getGeoInput(e){return"geoPoint"===e._?{_:"inputGeoPoint",lat:e.lat,long:e.long,accuracy_radius:e.accuracy_radius}:{_:"inputGeoPointEmpty"}}getInlineResults(e,t,a="",s="",n){return this.apiManager.invokeApi("messages.getInlineBotResults",{bot:this.appUsersManager.getUserInput(t),peer:this.appPeersManager.getInputPeerById(e),query:a,geo_point:n?this.getGeoInput(n):void 0,offset:s},{stopTime:-1,noErrorBox:!0}).then((e=>{const t=e.query_id;return e.results.forEach((e=>{"botInlineMediaResult"===e._&&(e.document&&(e.document=this.appDocsManager.saveDoc(e.document)),e.photo&&(e.photo=this.appPhotosManager.savePhoto(e.photo))),this.inlineResults[(0,Ut.Z)(t,e.id)]=e})),e}))}pushPopularBot(e){this.appUsersManager.getTopPeers("bots_inline").then((t=>{const a=e.toPeerId(),s=t.findIndex((e=>e.id===a));let n;n=-1!==s?t[s]:{id:a,rating:0},++n.rating,(0,ie.Z)(t,n,"rating"),this.appStateManager.setKeyValueToStorage("topPeersCache")}))}switchToPM(e,t,a){return this.setHash[t]={peerId:e,time:Date.now()},this.appMessagesManager.startBot(t,void 0,a)}checkSwitchReturn(e){return t=this,a=void 0,n=function*(){const t=this.appUsersManager.getUser(e);if(!t||!t.pFlags.bot||!t.bot_inline_placeholder)return;const a=this.setHash[e];return a&&(delete this.setHash[e],Date.now()-a.time<36e5)?a.peerId:void 0},new((s=void 0)||(s=Promise))((function(e,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(r,o)}p((n=n.apply(t,a||[])).next())}));var t,a,s,n}switchInlineQuery(e,t,a,s){this.appDraftsManager.setDraft(e,t,"@"+this.appPeersManager.getPeerUsername(a.toPeerId())+" "+s)}callbackButtonClick(e,t,a){return this.apiManager.invokeApi("messages.getBotCallbackAnswer",{peer:this.appPeersManager.getInputPeerById(e),msg_id:(0,oe.Z)(t),data:a.data},{stopTime:-1,noErrorBox:!0})}sendInlineResult(e,t,a,s={}){const n=this.inlineResults[a];if(!n)return;this.pushPopularBot(t);const i=a.split("_"),r=i.shift(),o=i.join("_");if(s.viaBotId=t,s.queryId=r,s.resultId=o,n.send_message.reply_markup&&(s.replyMarkup=n.send_message.reply_markup),"botInlineMessageText"===n.send_message._)s.entities=n.send_message.entities,this.appMessagesManager.sendText(e,n.send_message.message,s);else{let t,a,i="";const r=n.send_message;switch(r._){case"botInlineMessageMediaAuto":if(i=r.message,"botInlineMediaResult"===n._){const{document:e,photo:a}=n;t=e?Dt(e):At(a)}break;case"botInlineMessageMediaGeo":t={_:"inputMediaGeoPoint",geo_point:this.getGeoInput(r.geo)},s.geoPoint=r.geo;break;case"botInlineMessageMediaVenue":t={_:"inputMediaVenue",geo_point:this.getGeoInput(r.geo),title:r.title,address:r.address,provider:r.provider,venue_id:r.venue_id,venue_type:r.venue_type},s.geoPoint=r.geo;break;case"botInlineMessageMediaContact":t={_:"inputMediaContact",phone_number:r.phone_number,first_name:r.first_name,last_name:r.last_name,vcard:r.vcard};break;case"botInlineMessageMediaInvoice":a={_:"messageMediaInvoice",title:r.title,description:r.description,photo:r.photo,currency:r.currency,total_amount:r.total_amount,pFlags:{shipping_address_requested:r.pFlags.shipping_address_requested,test:r.pFlags.test},start_param:void 0}}!t&&a&&(t={_:"messageMediaPending",messageMedia:a}),this.appMessagesManager.sendOther(e,t,s)}}}var Tt=a(7082);class Ft{constructor(){this.tempNum=0}generateTempMessageId(e){const t=++this.tempNum;return(0,pe.Z)(e)+(t&Tt.o-1)}}var Rt=a(4421),xt=a(3624),Bt=a(7401);function Vt(e,t){if(e.length<t)return[e];let a=0,s=0,n=0;const i=[],r=r=>{let o=e.slice(s,r);const p=n++;o.length>t&&(Vt(o.slice(t),t).forEach((e=>{i[n++]=e})),o=o.slice(0,t)),s=r,a=0,i[p]=(i[p]||"")+o};let o=0;for(;;){let s=e.indexOf(" ",o);if(-1===s){o!==e.length-1&&r();break}s+=" ".length;const n=s-o;a+n>t&&r(a),o=s,a+=n}return i}var Ot=a(5701),Lt=a(7667),Nt=a(6241),Zt=a(6535),jt=a(6566),qt=a(2202),Gt=a(319);const Ht=new class{constructor(){this.tabs=new Map}start(){f.Z.getInstance().addEventListener("tabState",((e,t)=>{this.tabs.get(t).state=e}))}getTabs(){return[...this.tabs.values()].filter((e=>!!e.state))}addTab(e){const t={source:e,state:void 0};this.tabs.set(e,t)}deleteTab(e){this.tabs.delete(e)}};d.GO&&(d.GO.appTabsManager=Ht);const Wt=Ht;var zt=a(2381),Kt=a(13);function Jt(e){return{_:"inputDocument",id:e.id,access_hash:e.access_hash,file_reference:e.file_reference}}var $t=a(5285),Qt=a(5102);function Yt(e,t,a){a?e[t]=!0:delete e[t]}var Xt=a(4993),ea=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const ta=e=>{e()};class aa extends G{constructor(){super(...arguments),this.pendingByRandomId={},this.pendingByMessageId={},this.pendingAfterMsgs={},this.pendingTopMsgs={},this.tempFinalizeCallbacks={},this.sendSmthLazyLoadQueue=new Rt.Z(10),this.needSingleMessages=new Map,this.extendedMedia=new Map,this.maxSeenId=0,this.migratedFromTo={},this.migratedToFrom={},this.newDialogsToHandle=new Map,this.newUpdatesAfterReloadToHandle={},this.notificationsToHandle={},this.reloadConversationsPeers=new Map,this.log=(0,S.kg)("MESSAGES",S.v9.Error|S.v9.Debug|S.v9.Log|S.v9.Warn),this.groupedTempId=0,this.typings={},this.unreadMentions={},this.goToNextMentionPromises={},this.batchUpdates={},this.clear=e=>{this.middleware?this.middleware.clean():(this.middleware=(0,xt.k)(),this.uploadFilePromises={}),this.messagesStorageByPeerId={},this.groupedMessagesStorage={},this.scheduledMessagesStorage={},this.historiesStorage={},this.threadsStorage={},this.searchesStorage={},this.pinnedMessages={},this.threadsServiceMessagesIdsStorage={},this.threadsToReplies={},this.dialogsStorage&&this.dialogsStorage.clear(e),this.filtersStorage&&this.filtersStorage.clear(e)},this.handleNewDialogs=()=>{let e=0;const t=new Map,a=a=>{var s;const{peerId:n}=a;this.dialogsStorage.pushDialog({dialog:a}),this.appPeersManager.isChannel(n)||(e=Math.max(e,a.top_message||0));let i=t.get(n);i||t.set(n,i={}),"forumTopic"===a._?(null!==(s=i.topics)&&void 0!==s?s:i.topics=new Map).set(a.id,a):i.dialog=a};for(const[e,t]of this.newDialogsToHandle){const s="dialog"in t,{dialog:n,topics:i}=t;s&&(n?this.dialogsStorage.getDialogOnly(e)&&a(n):this.reloadConversation(e.toPeerId())),i&&(null==i||i.forEach(((t,s)=>{t?this.dialogsStorage.getForumTopic(e,s)&&a(t):this.dialogsStorage.getForumTopicById(e,s)})))}0!==e&&this.incrementMaxSeenId(e),this.rootScope.dispatchEvent("dialogs_multiupdate",t),this.newDialogsToHandle.clear()},this.handleNotifications=()=>{T.Z.clearTimeout(this.notificationsHandlePromise),this.notificationsHandlePromise=void 0;for(const e in this.notificationsToHandle){const[t,a]=e.split("_"),s=this.notificationsToHandle[e];this.getNotifyPeerSettings(t.toPeerId(),a?+a:void 0).then((({muted:e,peerTypeNotifySettings:t})=>{const a=s.topMessage;e&&!a.pFlags.mentioned||!a.pFlags.unread||a.pFlags.unread&&this.notifyAboutMessage(a,{fwdCount:s.fwdCount,peerTypeNotifySettings:t})}))}this.notificationsToHandle={}},this.onUpdateMessageId=e=>{const t=e.random_id;if(!this.pendingByRandomId[t])return;const a=(0,pe.Z)(e.id);this.pendingByMessageId[a]=t},this.onUpdateNewMessage=e=>{var t,a,s,n;const i=e.message,r=this.getMessagePeer(i),p=this.getHistoryMessagesStorage(r),d="updateNewDiscussionMessage"===e._;this.saveMessages([i],{storage:this.createMessageStorage(r,"history")});const f=this.appPeersManager.isForum(r),c=this.getThreadKey(i),l=c?+c.split("_")[1]:void 0,m=this.dialogsStorage.getDialogOrTopic(r,d?l:void 0);if((!m||this.reloadConversationsPeers.has(r))&&!d){let t=!0;if(r.isAnyChat()&&(t=this.appChatsManager.isInChat(r.toChatId())),t)return void this.handleNewUpdateAfterReload(r,e)}if(l&&!d){const e=null===(t=this.threadsStorage[r])||void 0===t?void 0:t[l],a={_:"updateNewDiscussionMessage",message:i};this.appChatsManager.isForum(r.toChatId())&&!this.dialogsStorage.getForumTopic(r,l)?this.handleNewUpdateAfterReload(r,a,l):e&&this.onUpdateNewMessage(a)}if("messageService"===i._){const{action:e}=i;if("messageActionPaymentSent"===e._&&i.reply_to&&this.rootScope.dispatchEvent("payment_sent",{peerId:i.reply_to.reply_to_peer_id?this.appPeersManager.getPeerId(i.reply_to.reply_to_peer_id):i.peerId,mid:i.reply_to_mid,receiptMessage:i}),"messageActionTopicEdit"===e._&&!d){const t=this.dialogsStorage.getForumTopic(r,l);if(t){const a=(0,ve.Z)(t);void 0!==e.title&&(t.title=e.title),void 0!==e.closed&&Yt(t.pFlags,"closed",e.closed),void 0!==e.hidden&&Yt(t.pFlags,"hidden",e.hidden),void 0!==e.icon_emoji_id&&(t.icon_emoji_id=e.icon_emoji_id),this.scheduleHandleNewDialogs(r,t),this.dialogsStorage.processTopicUpdate(t,a)}else this.dialogsStorage.getForumTopicById(r,l)}}this.saveMessages([i],{storage:p}),this.checkPendingMessage(i);const g=this.getHistoryStorage(r,d?l:void 0);d||this.updateMessageRepliesIfNeeded(i);const h=e.ignoreExisting;if(g.history.findSlice(i.mid)){if(!h)return!1}else{const e=g.history.first;if(e.isEnd(se.D.Bottom)){let t=0;for(const a=e.length;t<a&&!(i.mid>e[t]);++t);e.splice(t,0,i.mid)}else g.history.unshift(i.mid);null!==g.count&&++g.count}(!g.maxId||i.mid>g.maxId)&&(g.maxId=i.mid),this.mergeReplyKeyboard(g,i)&&this.rootScope.dispatchEvent("history_reply_markup",{peerId:r});const u=i.fromId;if(u.isUser()&&!i.pFlags.out&&i.from_id){this.appUsersManager.forceUserOnline(u,i.date);const e={_:"sendMessageCancelAction"};let t;t=r.isUser()?{_:"updateUserTyping",action:e,user_id:u}:this.appPeersManager.isChannel(r)?{_:"updateChannelUserTyping",action:e,channel_id:r.toChatId(),from_id:this.appPeersManager.getOutputPeer(u),top_msg_id:l?(0,oe.Z)(l):void 0}:{_:"updateChatUserTyping",action:e,chat_id:r.toChatId(),from_id:this.appPeersManager.getOutputPeer(u)},this.apiUpdatesManager.processLocalUpdate(t)}this.handleNewMessage(i);const y="forumTopic"===(null==m?void 0:m._);if(d&&!y||!m)return;const _=!i.pFlags.out&&i.pFlags.unread;if(_&&i.mid>m.top_message){const e=this.dialogsStorage.prepareDialogUnreadCountModifying(m);++m.unread_count,i.pFlags.mentioned&&(++m.unread_mentions_count,this.modifyCachedMentions(r,i.mid,!0,y?l:void 0)),e()}if(i.mid>=m.top_message&&this.setDialogTopMessage(i,m),(!d&&!f||y)&&_){const e=c||r,t=null!==(a=(n=this.notificationsToHandle)[e])&&void 0!==a?a:n[e]={fwdCount:0,fromId:o.NM};t.fromId!==u&&(t.fromId=u,t.fwdCount=0),i.fwd_from&&++t.fwdCount,t.topMessage=i,null!==(s=this.notificationsHandlePromise)&&void 0!==s||(this.notificationsHandlePromise=T.Z.setTimeout(this.handleNotifications,0))}},this.onUpdateMessageReactions=e=>{const{peer:t,msg_id:a,reactions:s}=e,n=(0,pe.Z)(a),i=this.appPeersManager.getPeerId(t),r=this.getMessageByPeer(i,n);if("message"!==(null==r?void 0:r._))return;const o=null==s?void 0:s.recent_reactions;if((null==o?void 0:o.length)&&r.pFlags.out){const e=o[o.length-1],t=r.reactions,a=null==t?void 0:t.recent_reactions;this.appPeersManager.getPeerId(e.peer_id)===this.appPeersManager.peerId||a&&!(a.length<=o.length)||a&&(0,Y.Z)(e,a[a.length-1])||this.getNotifyPeerSettings(i).then((({muted:t,peerTypeNotifySettings:a})=>{a.show_previews&&this.notifyAboutMessage(r,{peerReaction:e,peerTypeNotifySettings:a})}))}const p=r.peerId+"_"+r.mid;this.pushBatchUpdate("messages_reactions",this.batchUpdateReactions,p,(()=>(0,ve.Z)(r.reactions))),r.reactions=s,e.local||this.setDialogToStateIfMessageIsTop(r)},this.onUpdateDialogUnreadMark=e=>{const t=this.appPeersManager.getPeerId(e.peer.peer),a=this.getDialogOnly(t);if(a){const s=this.dialogsStorage.prepareDialogUnreadCountModifying(a);e.pFlags.unread?a.pFlags.unread_mark=!0:delete a.pFlags.unread_mark,s(),this.dialogsStorage.setDialogToState(a),this.rootScope.dispatchEvent("dialogs_multiupdate",new Map([[t,{dialog:a}]]))}else this.scheduleHandleNewDialogs(t)},this.onUpdateEditMessage=e=>{var t,a;const s=e.message,n=this.getMessagePeer(s),i=(0,pe.Z)(s.id),r=this.getHistoryMessagesStorage(n);if(!r.has(i))return;const o=this.getMessageFromStorage(r,i);this.saveMessages([s],{storage:r});const p=this.getMessageFromStorage(r,i);this.handleEditedMessage(o,p,r);const d=this.getDialogOnly(n),f=(null==d?void 0:d.top_message)===i;if(s.clear_history)f&&this.rootScope.dispatchEvent("dialog_flush",{peerId:n,dialog:d});else{let e=!0;if("message"===(null==o?void 0:o._)&&!(0,Y.Z)(o.reactions,p.reactions)){const t=p.reactions;p.reactions=o.reactions,this.apiUpdatesManager.processLocalUpdate({_:"updateMessageReactions",peer:this.appPeersManager.getOutputPeer(n),msg_id:s.id,reactions:t}),e=!1}e&&this.rootScope.dispatchEvent("message_edit",{storageKey:r.key,peerId:n,mid:i,message:s}),f&&this.dialogsStorage.setDialogToState(d);const c=new Map,l=()=>{let e=c.get(n);return e||c.set(n,e={}),e};(f||s.grouped_id)&&d&&(l().dialog=d);const m=this.getThreadKey(s);if(m){const e=+m.split("_")[1],s=this.dialogsStorage.getForumTopic(n,e);s&&(null!==(t=(a=l()).topics)&&void 0!==t?t:a.topics=new Map).set(e,s)}c.size&&this.rootScope.dispatchEvent("dialogs_multiupdate",c)}},this.onUpdateReadHistory=e=>{const t=e.channel_id,a=(0,pe.Z)(e.max_id||e.read_max_id),s=(0,pe.Z)(e.top_msg_id),n=t?t.toPeerId(!0):this.appPeersManager.getPeerId(e.peer),i="updateReadHistoryOutbox"===e._||"updateReadChannelOutbox"===e._||"updateReadChannelDiscussionOutbox"===e._||void 0,r=!!t&&this.appChatsManager.isForum(t),o=this.getHistoryMessagesStorage(n),p=(0,Bt.Z)(o,"desc"),d=s&&r?this.dialogsStorage.getForumTopic(n,s):this.getDialogOnly(n),f=e.still_unread_count;let c=0,l=0,m=!1;const g=this.getHistoryStorage(n,s);if(n.isUser()&&i&&this.appUsersManager.forceUserOnline(n.toUserId()),s){const e=this.threadsToReplies[n+"_"+s];if(e){const[t,a]=e.split("_");this.updateMessage(t.toPeerId(),+a,"replies_updated")}}const h=d&&this.dialogsStorage.prepareDialogUnreadCountModifying(d),u=this.getReadMaxIdIfUnread(n,s);for(let e=0,t=p.length;e<t;e++){const t=p[e];if(t>a)continue;const g=o.get(t);if(g.pFlags.out!==i)continue;const h=(0,Xt.Z)(g,r);if(!s||h===s){if(!(g.pFlags.unread||u&&u<t))break;delete g.pFlags.unread,m||(m=!0),!g.pFlags.out&&d&&(void 0===f&&(c=--d.unread_count),g.pFlags.mentioned&&(l=--d.unread_mentions_count,this.modifyCachedMentions(n,g.mid,!1))),this.rootScope.dispatchEvent("notification_cancel","msg"+t)}}if(i?g.readOutboxMaxId=a:g.readMaxId=a,d){if(i?d.read_outbox_max_id=a:d.read_inbox_max_id=a,!i){let e;void 0!==f?e=f:c<0||a>=d.top_message||!u?e=0:c&&d.top_message>a&&(e=c),void 0!==e&&(d.unread_count=e),(l<0||!d.unread_count)&&(d.unread_mentions_count=0)}null==h||h(),this.dialogsStorage.processDialogForFilters(d),this.rootScope.dispatchEvent("dialog_unread",{peerId:n,dialog:d}),this.dialogsStorage.setDialogToState(d),m||void 0!==f||i||!d.unread_count||("forumTopic"===d._?this.dialogsStorage.getForumTopicById(n,s):this.reloadConversation(n))}if(m&&this.rootScope.dispatchEvent("messages_read"),!s&&t){const e=n+"_";for(const t in this.threadsToReplies)if(0===t.indexOf(e)){const[e,a]=this.threadsToReplies[t].split("_");this.rootScope.dispatchEvent("replies_updated",this.getMessageByPeer(e.toPeerId(),+a))}}},this.onUpdateReadMessagesContents=e=>{const t=e.channel_id,a=e.top_msg_id,s=a?(0,pe.Z)(a):void 0,n=e.messages.map((e=>(0,pe.Z)(e))),i=t?t.toPeerId(!0):this.findPeerIdByMids(n);for(let e=0,t=n.length;e<t;++e){const t=n[e],a=this.getMessageByPeer(i,t);a?a.pFlags.media_unread&&(delete a.pFlags.media_unread,this.setDialogToStateIfMessageIsTop(a),!a.pFlags.out&&a.pFlags.mentioned&&this.modifyCachedMentions(i,t,!1,s)):this.fixDialogUnreadMentionsIfNoMessage(i,s)}this.rootScope.dispatchEvent("messages_media_read",{peerId:i,mids:n})},this.onUpdateChannelAvailableMessages=e=>{const t=e.channel_id.toPeerId(!0),a=this.getHistoryStorage(t).history.slice,s=(0,pe.Z)(e.available_min_id),n=a.filter((e=>e<=s));e.messages=n,this.onUpdateDeleteMessages(e)},this.onUpdateDeleteMessages=e=>{var t;const a=e.channel_id,s=e.messages.map((e=>(0,pe.Z)(e))),n=a?a.toPeerId(!0):this.findPeerIdByMids(s);if(!n)return;this.apiManager.clearCache("messages.getSearchCounters",(e=>this.appPeersManager.getPeerId(e.peer)===n));const i=new Set,r=new Map;for(const e of s){const a=this.getMessageByPeer(n,e),s=this.getThreadKey(a);if(!s)continue;const o=+s.split("_")[1];if((null===(t=this.threadsStorage[n])||void 0===t?void 0:t[o])&&(i.add(s),!r.has(o))){const e=this.dialogsStorage.getForumTopic(n,o);e&&r.set(o,e)}}const o=this.handleDeletedMessages(n,this.getHistoryMessagesStorage(n),s),p=Array.from(i).map((e=>{const[t,a]=e.split("_");return this.getHistoryStorage(t.toPeerId(),+a)}));[this.getHistoryStorage(n),...p].forEach((e=>{for(const t of o.msgs)e.history.delete(t);o.count&&e.count&&(e.count=Math.max(0,e.count-o.count))})),this.rootScope.dispatchEvent("history_delete",{peerId:n,msgs:o.msgs});const d=[...r.values()],f=this.getDialogOnly(n);f&&d.unshift(f),d.forEach((e=>{const t="forumTopic"===e._,a=o.unreadMentions||o.unread,s=a&&this.dialogsStorage.prepareDialogUnreadCountModifying(e);if(o.unread&&(e.unread_count=Math.max(0,e.unread_count-o.unread)),o.unreadMentions&&(e.unread_mentions_count=e.unread_count?Math.max(0,e.unread_mentions_count-o.unreadMentions):0),a&&(s(),t||this.rootScope.dispatchEvent("dialog_unread",{peerId:n,dialog:e})),o.msgs.has(e.top_message)){const a=this.getHistoryStorage(e.peerId,t?e.id:void 0).history.first;if(a.isEnd(se.D.Bottom)&&a.length){const t=a[0],s=this.getMessageByPeer(n,t);this.setDialogTopMessage(s,e)}else t?this.dialogsStorage.getForumTopicById(n,e.id):this.reloadConversation(n)}}))},this.onUpdateChannel=e=>{const t=e.channel_id,a=t.toPeerId(!0),s=this.appChatsManager.getChat(t),n=this.appChatsManager.isInChat(t);(!!(0,Qt.Z)(s)[0]||!s.pFlags.left)!=(void 0!==this.historiesStorage[a])&&(delete this.historiesStorage[a],this.rootScope.dispatchEvent("history_forbidden",a)),!!this.getDialogOnly(a)!==n&&(n?this.reloadConversation(a):this.dialogsStorage.dropDialogOnDeletion(a)),this.rootScope.dispatchEvent("channel_update",t)},this.onUpdateChannelReload=e=>{const t=e.channel_id.toPeerId(!0);this.flushStoragesByPeerId(t),Promise.all([this.reloadConversation(t)]).then((()=>{this.rootScope.dispatchEvent("history_reload",t)}))},this.onUpdateChannelMessageViews=e=>{var t;const a=e.views,s=null!==(t=e.peerId)&&void 0!==t?t:e.channel_id.toPeerId(!0),n=(0,pe.Z)(e.id),i=this.getMessageByPeer(s,n);void 0!==(null==i?void 0:i.views)&&i.views<a&&(i.views=a,this.pushBatchUpdate("messages_views",this.batchUpdateViews,i.peerId+"_"+i.mid),this.setDialogToStateIfMessageIsTop(i))},this.onUpdateServiceNotification=e=>{var t;if(null===(t=e.pFlags)||void 0===t?void 0:t.popup)return void this.rootScope.dispatchEvent("service_notification",e);const a=o.yF,s=a,n=this.generateTempMessageId(s),i={_:"message",id:n,from_id:this.appPeersManager.getOutputPeer(a),peer_id:this.appPeersManager.getOutputPeer(s),pFlags:{unread:!0},date:(e.inbox_date||(0,te.Z)(!0))+this.timeManager.getServerTimeOffset(),message:e.message,media:e.media,entities:e.entities};this.appUsersManager.hasUser(a)||this.appUsersManager.saveApiUsers([{_:"user",id:a,pFlags:{verified:!0},access_hash:"0",first_name:"Telegram",phone:"42777"}]),this.saveMessages([i],{isOutgoing:!0}),e.inbox_date&&(this.pendingTopMsgs[s]=n,this.onUpdateNewMessage({_:"updateNewMessage",message:i,pts:void 0,pts_count:void 0}))},this.onUpdatePinnedMessages=e=>{const t="updatePinnedChannelMessages"===e._?e.channel_id:void 0,a=t?t.toPeerId(!0):this.appPeersManager.getPeerId(e.peer),s=e.messages.map((e=>(0,pe.Z)(e))),n=this.getHistoryMessagesStorage(a),i=s.filter((e=>!n.has(e)));(i.length?Promise.all(i.map((e=>this.reloadMessages(a,e)))):Promise.resolve()).finally((()=>{var t;const i=null===(t=e.pFlags)||void 0===t?void 0:t.pinned;if(i)for(const e of s)n.get(e).pFlags.pinned=!0;else for(const e of s)delete n.get(e).pFlags.pinned;delete this.pinnedMessages[this.getPinnedMessagesKey(a)],this.appStateManager.getState().then((e=>{delete e.hiddenPinnedMessages[a],this.rootScope.dispatchEvent("peer_pinned_messages",{peerId:a,mids:s,pinned:i})}))}))},this.onUpdateNotifySettings=e=>{const{peer:t,notify_settings:a}=e,s="notifyForumTopic"===t._;if("notifyPeer"!==t._&&!s)return;const n=this.appPeersManager.getPeerId(t.peer),i=this.dialogsStorage.getDialogOrTopic(n,s?(0,pe.Z)(t.top_msg_id):void 0);i&&(i.notify_settings=a,this.rootScope.dispatchEvent("dialog_notify_settings",i),this.dialogsStorage.setDialogToState(i))},this.onUpdateNewScheduledMessage=e=>{const t=e.message,a=this.getMessagePeer(t),s=this.scheduledMessagesStorage[a];if(!s)return;const n=(0,pe.Z)(t.id),i=this.getMessageFromStorage(s,n);this.saveMessages([t],{storage:s,isScheduled:!0});const r=this.getMessageFromStorage(s,n);i?(this.handleEditedMessage(i,r,s),this.rootScope.dispatchEvent("message_edit",{storageKey:s.key,peerId:a,mid:t.mid,message:t})):this.checkPendingMessage(t)||this.rootScope.dispatchEvent("scheduled_new",t)},this.onUpdateDeleteScheduledMessages=e=>{const t=this.appPeersManager.getPeerId(e.peer),a=this.scheduledMessagesStorage[t];if(a){const s=e.messages.map((e=>(0,pe.Z)(e)));this.handleDeletedMessages(t,a,s),this.rootScope.dispatchEvent("scheduled_delete",{peerId:t,mids:s})}},this.onUpdateMessageExtendedMedia=e=>{var t;const a=this.appPeersManager.getPeerId(e.peer),s=(0,pe.Z)(e.msg_id),n=this.getHistoryMessagesStorage(a);if(!n.has(s))return;const i=this.getMessageFromStorage(n,s),r=i.media;"messageExtendedMedia"!==(null===(t=r.extended_media)||void 0===t?void 0:t._)&&(r.extended_media=e.extended_media,this.onUpdateEditMessage({_:"updateEditMessage",message:i,pts:0,pts_count:0}))},this.onUpdateTranscribedAudio=e=>{const t=this.appPeersManager.getPeerId(e.peer),a=e.text,s=(0,pe.Z)(e.msg_id);this.rootScope.dispatchEvent("message_transcribed",{peerId:t,mid:s,text:a,pending:e.pFlags.pending})},this.batchUpdateViews=e=>{const t=[],a=this.getMessagesFromMap(e);for(const[e]of a)t.push({peerId:e.peerId,mid:e.mid,views:e.views});return t},this.batchUpdateReactions=e=>{var t,a,s;const n=[],i=this.getMessagesFromMap(e);for(const[e,r]of i){const i=null!==(a=null===(t=e.reactions)||void 0===t?void 0:t.results)&&void 0!==a?a:[],o=null!==(s=null==r?void 0:r.results)&&void 0!==s?s:[],p=i.filter((t=>{const a=o.find((e=>(0,$t.Z)(e.reaction,t.reaction)));return e.pFlags.out&&(!a||t.count>a.count)||void 0!==t.chosen_order&&(!a||void 0===a.chosen_order)}));n.push({message:e,changedResults:p})}return n}}after(){return this.clear(!0),this.apiUpdatesManager.addMultipleEventsListeners({updateMessageID:this.onUpdateMessageId,updateNewDiscussionMessage:this.onUpdateNewMessage,updateNewMessage:this.onUpdateNewMessage,updateNewChannelMessage:this.onUpdateNewMessage,updateDialogUnreadMark:this.onUpdateDialogUnreadMark,updateEditMessage:this.onUpdateEditMessage,updateEditChannelMessage:this.onUpdateEditMessage,updateMessageReactions:this.onUpdateMessageReactions,updateReadChannelDiscussionInbox:this.onUpdateReadHistory,updateReadChannelDiscussionOutbox:this.onUpdateReadHistory,updateReadHistoryInbox:this.onUpdateReadHistory,updateReadHistoryOutbox:this.onUpdateReadHistory,updateReadChannelInbox:this.onUpdateReadHistory,updateReadChannelOutbox:this.onUpdateReadHistory,updateChannelReadMessagesContents:this.onUpdateReadMessagesContents,updateReadMessagesContents:this.onUpdateReadMessagesContents,updateChannelAvailableMessages:this.onUpdateChannelAvailableMessages,updateDeleteMessages:this.onUpdateDeleteMessages,updateDeleteChannelMessages:this.onUpdateDeleteMessages,updateChannel:this.onUpdateChannel,updateChannelReload:this.onUpdateChannelReload,updateChannelMessageViews:this.onUpdateChannelMessageViews,updateServiceNotification:this.onUpdateServiceNotification,updatePinnedMessages:this.onUpdatePinnedMessages,updatePinnedChannelMessages:this.onUpdatePinnedMessages,updateNotifySettings:this.onUpdateNotifySettings,updateNewScheduledMessage:this.onUpdateNewScheduledMessage,updateDeleteScheduledMessages:this.onUpdateDeleteScheduledMessages,updateMessageExtendedMedia:this.onUpdateMessageExtendedMedia,updateTranscribedAudio:this.onUpdateTranscribedAudio}),this.rootScope.addEventListener("notify_peer_type_settings",(({key:e,settings:t})=>{let a;a="notifyUsers"===e?e=>e.peerId.isUser():"notifyBroadcasts"===e?e=>this.appPeersManager.isBroadcast(e.peerId):e=>this.appPeersManager.isAnyGroup(e.peerId),this.dialogsStorage.getFolderDialogs(0).concat(this.dialogsStorage.getFolderDialogs(1)).filter(a).forEach((e=>{this.rootScope.dispatchEvent("dialog_notify_settings",e)}))})),this.rootScope.addEventListener("webpage_updated",(({id:e,msgs:t})=>{t.forEach((({peerId:t,mid:a,isScheduled:s})=>{const n=s?this.getScheduledMessagesStorage(t):this.getHistoryMessagesStorage(t),i=this.getMessageFromStorage(n,a);i&&(i.media={_:"messageMediaWebPage",webpage:this.appWebPagesManager.getCachedWebPage(e)},this.rootScope.dispatchEvent("message_edit",{storageKey:n.key,peerId:t,mid:a,message:i}))}))})),this.rootScope.addEventListener("draft_updated",(({peerId:e,threadId:t,draft:a})=>{const s=this.dialogsStorage.getDialogOrTopic(e,t);if(s){s.draft=a;let t=!1;a||(0,oe.Z)(s.top_message)?(this.dialogsStorage.generateIndexForDialog(s),this.dialogsStorage.pushDialog({dialog:s})):(this.dialogsStorage.dropDialog(e),t=!0),this.rootScope.dispatchEvent("dialog_draft",{peerId:e,dialog:s,drop:t,draft:a})}else if(t){const a=this.appChatsManager.getChat(e.toChatId());a?a.pFlags.forum&&this.dialogsStorage.getForumTopicById(e,t):this.reloadConversation(e)}else this.reloadConversation(e)})),this.rootScope.addEventListener("poll_update",(({poll:e})=>{const t=this.appPollsManager.pollToMessages[e.id];if(t)for(const e of t){const[t,a]=e.split("_"),s=this.getMessageByPeer(t.toPeerId(),+a);s&&this.setDialogToStateIfMessageIsTop(s)}})),this.rootScope.addEventListener("chat_toggle_forum",(({chatId:e,enabled:t})=>{const a=e.toPeerId(!0);if(!t){delete this.threadsStorage[a];for(const e in this.pinnedMessages)+e===a&&e.startsWith(a+"_")&&delete this.pinnedMessages[e]}})),this.batchUpdatesDebounced=(0,Ot.Z)((()=>{for(const e in this.batchUpdates){const t=this.batchUpdates[e];delete this.batchUpdates[e];const a=t.callback(t.batch);!a||a instanceof Array&&!a.length||rootScope.dispatchEvent(e,a)}}),33,!1,!0),this.appStateManager.getState().then((e=>{e.maxSeenMsgId&&(this.maxSeenId=e.maxSeenMsgId)}))}getInputEntities(e){const t=(0,ve.Z)(e);return t.forEach((e=>{"messageEntityMentionName"===e._&&(e._="inputMessageEntityMentionName",e.user_id=this.appUsersManager.getUserInput(e.user_id))})),t}invokeAfterMessageIsSent(e,t,a){var s,n,i;const r=null!==(s=(i=this.tempFinalizeCallbacks)[e])&&void 0!==s?s:i[e]={},o=null!==(n=r[t])&&void 0!==n?n:r[t]={deferred:(0,v.Z)()};return o.callback=a,o.deferred}editMessage(e,t,a={}){const{mid:s,peerId:n}=e;if(e.pFlags.is_outgoing)return this.invokeAfterMessageIsSent(s,"edit",(e=>this.editMessage(e,t,a)));const i=a.entities||[];t&&(t=(0,ke.Z)(t,i));const r=a.scheduleDate||(e.pFlags.is_scheduled?e.date:void 0);return this.apiManager.invokeApi("messages.editMessage",{peer:this.appPeersManager.getInputPeerById(n),id:e.id,message:t,media:a.newMedia,entities:i.length?this.getInputEntities(i):void 0,no_webpage:a.noWebPage,schedule_date:r}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}),(e=>{if(this.log.error("editMessage error:",e),!e||"MESSAGE_NOT_MODIFIED"!==e.type)return e&&"MESSAGE_EMPTY"===e.type&&(e.handled=!0),Promise.reject(e);e.handled=!0}))}transcribeAudio(e){return ea(this,void 0,void 0,(function*(){const{id:t,peerId:a}=e,s=t=>{this.apiUpdatesManager.processLocalUpdate({_:"updateTranscribedAudio",msg_id:e.id,peer:this.appPeersManager.getOutputPeer(a),pFlags:t.pFlags,text:t.text,transcription_id:t.transcription_id})};return this.apiManager.invokeApiSingleProcess({method:"messages.transcribeAudio",params:{peer:this.appPeersManager.getInputPeerById(a),msg_id:t},processResult:e=>(s(e),e),processError:e=>{throw"TRANSCRIPTION_FAILED"!==e.type&&"MSG_VOICE_MISSING"!==e.type||s({_:"messages.transcribedAudio",transcription_id:0,text:"",pFlags:{}}),e}})}))}sendText(e,t,a={}){var s,n;return ea(this,void 0,void 0,(function*(){if(!t.trim())return;null!==(s=a.entities)&&void 0!==s||(a.entities=[]),a.threadId&&!a.replyToMsgId&&(a.replyToMsgId=a.threadId);const i=(yield this.apiManager.getConfig()).message_length_max,r=Vt(t,i);t=r[0],r.length>1&&("webPage"!==(null===(n=a.webPage)||void 0===n?void 0:n._)||t.includes(a.webPage.url)||delete a.webPage),e=this.appPeersManager.getPeerMigratedTo(e)||e;const o=a.entities;a.viaBotId||(t=(0,ke.Z)(t,o));let p=this.getInputEntities(o);p.length||(p=void 0);const d=this.generateOutgoingMessage(e,a);d.entities=o,d.message=t;const f=a.replyToMsgId?(0,oe.Z)(a.replyToMsgId):void 0,c=this.appPeersManager.isChannel(e);a.webPage&&(d.media={_:"messageMediaWebPage",webpage:a.webPage});const l=e=>{this.onMessagesSendError([d],e),this.rootScope.dispatchEvent("messages_pending")};d.send=()=>{l();const s={};this.pendingAfterMsgs[e]&&(s.afterMessageId=this.pendingAfterMsgs[e].messageId);const n=a.sendAsPeerId?this.appPeersManager.getInputPeerById(a.sendAsPeerId):void 0;let i;return i=a.viaBotId?this.apiManager.invokeApiAfter("messages.sendInlineBotResult",{peer:this.appPeersManager.getInputPeerById(e),random_id:d.random_id,reply_to_msg_id:f||void 0,query_id:a.queryId,id:a.resultId,clear_draft:a.clearDraft,send_as:n},s):this.apiManager.invokeApiAfter("messages.sendMessage",{no_webpage:a.noWebPage,peer:this.appPeersManager.getInputPeerById(e),message:t,random_id:d.random_id,reply_to_msg_id:f||void 0,entities:p,clear_draft:a.clearDraft,schedule_date:a.scheduleDate||void 0,silent:a.silent,send_as:n,update_stickersets_order:a.updateStickersetOrder},s),this.pendingAfterMsgs[e]=s,i.then((e=>{if("updateShortSentMessage"===e._){const t=d.promise;delete d.promise;const s=(0,ve.Z)(d);(0,ge.Z)(d,["promise"]),d.promise=t,s.date=e.date,s.id=e.id,s.media=e.media,s.entities=e.entities,this.wrapMessageEntities(s),e.pFlags.out&&(s.pFlags.out=!0),e={_:"updates",users:[],chats:[],seq:0,date:void 0,updates:[{_:"updateMessageID",random_id:d.random_id,id:s.id},{_:a.scheduleDate?"updateNewScheduledMessage":c?"updateNewChannelMessage":"updateNewMessage",message:s,pts:e.pts,pts_count:e.pts_count}]}}else e.updates&&e.updates.forEach((e=>{"updateDraftMessage"===e._&&(e.local=!0)}));this.apiUpdatesManager.processUpdateMessage(e),d.promise.resolve()}),(e=>{throw l(e),d.promise.reject(e),e})).finally((()=>{this.pendingAfterMsgs[e]===s&&delete this.pendingAfterMsgs[e]}))},this.beforeMessageSending(d,{isScheduled:!!a.scheduleDate||void 0,threadId:a.threadId,clearDraft:a.clearDraft,sequential:!0});const m=[d.promise];for(let t=1;t<r.length;++t)m.push(this.sendText(e,r[t],a));return Promise.all(m).then(Gt.Z)}))}sendFile(e,t){const a=t.file;e=this.appPeersManager.getPeerMigratedTo(e)||e;const s=this.generateOutgoingMessage(e,t),n=t.replyToMsgId?(0,oe.Z)(t.replyToMsgId):void 0;let r,p;const d="mime_type"in a?a.mime_type:a.type,f=a instanceof File?a.name:"",c=!(a instanceof File||a instanceof Blob);let l=t.caption||"";this.log("sendFile",a,d);const m=t.entities||[];l&&(l=(0,ke.Z)(l,m));const g=[],h=i().IMAGE_MIME_TYPES_SUPPORTED.has(d),u=t.strippedBytes&&{_:"photoStrippedSize",bytes:t.strippedBytes,type:"i"};let y,_,P;if(c)r="document",p="";else if(0===d.indexOf("audio/")||["video/ogg"].indexOf(d)>=0){r="audio",p="audio."+("ogg"===d.split("/")[1]?"ogg":"mp3"),P="sendMessageUploadAudioAction",t.isVoiceMessage&&(r="voice",s.pFlags.media_unread=!0);const e={_:"documentAttributeAudio",pFlags:{voice:t.isVoiceMessage||void 0},waveform:t.waveform,duration:t.duration||void 0};g.push(e)}else if(t.isMedia)if(h){r="photo",p="photo."+d.split("/")[1],P="sendMessageUploadPhotoAction";const e={_:"photoSize",w:t.width,h:t.height,type:o.Pt,location:null,size:a.size};y={_:"photo",id:""+s.id,sizes:[e],w:t.width,h:t.height},u&&y.sizes.unshift(u);const n=this.thumbsStorage.getCacheContext(y,e.type);n.downloaded=a.size,n.url=t.objectURL||"",y=this.appPhotosManager.savePhoto(y)}else if(i().VIDEO_MIME_TYPES_SUPPORTED.has(d)){r="video",p="video.mp4",P="sendMessageUploadVideoAction";const e={_:"documentAttributeVideo",pFlags:{round_message:t.isRoundMessage||void 0,supports_streaming:!0},duration:t.duration,w:t.width,h:t.height};g.push(e),t.noSound&&a.size>10240&&a.size<10485760&&g.push({_:"documentAttributeAnimated"})}else r="document",p="document."+d.split("/")[1],P="sendMessageUploadDocumentAction";else r="document",p="document."+d.split("/")[1],P="sendMessageUploadDocumentAction";if(g.push({_:"documentAttributeFilename",file_name:f||p}),-1!==["document","video","audio","voice"].indexOf(r)&&!c){const e=[];if(_={_:"document",id:""+s.id,duration:t.duration,attributes:g,w:t.width,h:t.height,thumbs:e,mime_type:d,size:a.size},t.objectURL){const e=this.thumbsStorage.getCacheContext(_);e.downloaded=a.size,e.url=t.objectURL}let n;if(h)g.push({_:"documentAttributeImageSize",w:t.width,h:t.height}),n={_:"photoSize",w:t.width,h:t.height,type:o.Pt,size:a.size};else if("video"===r&&t.thumb){n={_:"photoSize",w:t.thumb.size.width,h:t.thumb.size.height,type:"local-thumb",size:t.thumb.blob.size};const e=this.thumbsStorage.getCacheContext(_,n.type);e.downloaded=n.size,e.url=t.thumb.url}n&&e.push(n),u&&e.unshift(u),_=this.appDocsManager.saveDoc(_)}this.log("sendFile",r,p,a.type,t);const b=(0,v.Z)(),M=c?void 0:{_:y?"messageMediaPhoto":"messageMediaDocument",pFlags:{},photo:y,document:_};M&&((0,ge.Z)(M,["promise"]),M.promise=b,t.spoiler&&(M.pFlags.spoiler=!0)),s.entities=m,s.message=l,s.media=c?{_:"messageMediaDocument",pFlags:{},document:a}:M;const S=c?void 0:(0,qt.Z)(a);s.uploadingFileName=S,S&&(this.uploadFilePromises[S]=b);const I=e=>{this.onMessagesSendError([s],e),this.rootScope.dispatchEvent("messages_pending")};let C=!1,w=null;s.send=()=>{if(c){const e={_:"inputMediaDocument",id:Jt(a),pFlags:{}};b.resolve(e)}else if(a instanceof File||a instanceof Blob){const n=()=>{var n;let i;return C&&!s.error||(C=!1,w=this.apiFileManager.upload({file:a,fileName:S}),w.catch((a=>{C||(this.log("cancelling upload",M),this.cancelPendingMessage(s.random_id),this.setTyping(e,{_:"sendMessageCancelAction"},void 0,t.threadId),b.reject(a))})),w.addNotifyListener((a=>{const s=Math.max(1,Math.floor(100*a.done/a.total));P&&this.setTyping(e,{_:P,progress:0|s},void 0,t.threadId),b.notifyAll(a)})),b.notifyAll({done:0,total:a.size})),"video"===r&&t.objectURL&&(null===(n=t.thumb)||void 0===n?void 0:n.blob)&&(i=this.apiFileManager.upload({file:t.thumb.blob})),w&&w.then((e=>ea(this,void 0,void 0,(function*(){let a;if(e.name=p,C=!0,a="photo"===r?{_:"inputMediaUploadedPhoto",file:e,pFlags:{spoiler:t.spoiler||void 0}}:{_:"inputMediaUploadedDocument",file:e,mime_type:d,pFlags:{force_file:"sendMessageUploadDocumentAction"===P||void 0,spoiler:t.spoiler||void 0},attributes:g},i)try{const e=yield i;a.thumb=e}catch(e){this.log.error("sendFile thumb upload error:",e)}b.resolve(a)}))),(e=>{throw I(e),e})),b};t.isGroupedItem?n():this.sendSmthLazyLoadQueue.push({load:n})}return b},this.beforeMessageSending(s,{isGroupedItem:t.isGroupedItem,isScheduled:!!t.scheduleDate||void 0,threadId:t.threadId,clearDraft:t.clearDraft,processAfter:t.processAfter}),t.isGroupedItem||(b.then((a=>(this.setTyping(e,{_:"sendMessageCancelAction"},void 0,t.threadId),this.apiManager.invokeApi("messages.sendMedia",{background:t.background,peer:this.appPeersManager.getInputPeerById(e),media:a,message:l,random_id:s.random_id,reply_to_msg_id:n,schedule_date:t.scheduleDate,silent:t.silent,entities:m,clear_draft:t.clearDraft,send_as:t.sendAsPeerId?this.appPeersManager.getInputPeerById(t.sendAsPeerId):void 0,update_stickersets_order:t.updateStickersetOrder}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}),(e=>{if("photo"===r&&400===e.code&&("PHOTO_INVALID_DIMENSIONS"===e.type||"PHOTO_SAVE_FILE_INVALID"===e.type))return e.handled=!0,r="document",void s.send();throw I(e),e}))))),b.then(s.promise.resolve,s.promise.reject));const k={message:s};return(0,ge.Z)(k,["promise"]),k.promise=b,k}sendAlbum(e,t){return ea(this,void 0,void 0,(function*(){if(t.threadId&&!t.replyToMsgId&&(t.replyToMsgId=t.threadId),1===t.sendFileDetails.length)return this.sendFile(e,Object.assign(Object.assign({},t),t.sendFileDetails[0]));e=this.appPeersManager.getPeerMigratedTo(e)||e;const a=t.replyToMsgId?(0,oe.Z)(t.replyToMsgId):void 0;let s=t.caption||"",n=t.entities||[];s&&(s=(0,ke.Z)(s,n)),this.log("sendAlbum",t);const i=""+ ++this.groupedTempId,r=[],o=e=>{r.push(e)},p=t.sendFileDetails.map(((r,p)=>{const d=Object.assign({isGroupedItem:!0,isMedia:t.isMedia,scheduleDate:t.scheduleDate,silent:t.silent,replyToMsgId:a,threadId:t.threadId,sendAsPeerId:t.sendAsPeerId,groupId:i,processAfter:o},r);return 0===p&&(d.caption=s,d.entities=n),this.sendFile(e,d).message}));t.clearDraft&&r.push((()=>{this.appDraftsManager.clearDraft(e,t.threadId)})),r.forEach((e=>{e()}));const d=(e,t)=>{this.onMessagesSendError([e],t),this.rootScope.dispatchEvent("messages_pending")},f=this.appPeersManager.getInputPeerById(e),c=s=>{this.setTyping(e,{_:"sendMessageCancelAction"},void 0,t.threadId);const n=(0,v.Z)();return this.sendSmthLazyLoadQueue.push({load:()=>this.apiManager.invokeApi("messages.sendMultiMedia",{peer:f,multi_media:s,reply_to_msg_id:a,schedule_date:t.scheduleDate,silent:t.silent,clear_draft:t.clearDraft,send_as:t.sendAsPeerId?this.appPeersManager.getInputPeerById(t.sendAsPeerId):void 0,update_stickersets_order:t.updateStickersetOrder}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e),n.resolve()}),(e=>{p.forEach((t=>d(t,e))),n.reject(e)}))}),n},l=p.map((e=>e.send().then((e=>Promise.all([e,this.apiManager.invokeApi("messages.uploadMedia",{peer:f,media:e})]))).then((([t,a])=>{let i;if("messageMediaPhoto"===a._){const e=this.appPhotosManager.savePhoto(a.photo);i=At(e)}else if("messageMediaDocument"===a._){const e=this.appDocsManager.saveDoc(a.document);i=Dt(e)}["pFlags","ttl_seconds"].forEach((e=>{var a;i[e]=null!==(a=t[e])&&void 0!==a?a:i[e]}));const r={_:"inputSingleMedia",media:i,random_id:e.random_id,message:s,entities:n};return s&&(s="",n=[]),r})).catch((t=>{throw this.log.error("sendAlbum upload item error:",t,e),d(e,t),t}))));return Promise.all(l).then((e=>c(e.filter(Boolean))))}))}sendContact(e,t){return this.sendOther(e,this.appUsersManager.getContactMediaInput(t))}sendOther(e,t,a={}){var s;e=this.appPeersManager.getPeerMigratedTo(e)||e;const n=this.generateOutgoingMessage(e,a),i=a.replyToMsgId?(0,oe.Z)(a.replyToMsgId):void 0;let r;switch(t._){case"inputMediaPoll":{const e=""+n.id;t.poll.id=e,this.appPollsManager.savePoll(t.poll,{_:"pollResults",flags:4,total_voters:0,pFlags:{},recent_voters:[]});const{poll:a,results:s}=this.appPollsManager.getPoll(e);r={_:"messageMediaPoll",poll:a,results:s};break}case"inputMediaPhoto":r={_:"messageMediaPhoto",photo:this.appPhotosManager.getPhoto(t.id.id),pFlags:{}};break;case"inputMediaDocument":r={_:"messageMediaDocument",document:this.appDocsManager.getDoc(t.id.id),pFlags:{}};break;case"inputMediaContact":r={_:"messageMediaContact",phone_number:t.phone_number,first_name:t.first_name,last_name:t.last_name,user_id:null!==(s=t.user_id)&&void 0!==s?s:"0",vcard:t.vcard};break;case"inputMediaGeoPoint":r={_:"messageMediaGeo",geo:a.geoPoint};break;case"inputMediaVenue":r={_:"messageMediaVenue",geo:a.geoPoint,title:t.title,address:t.address,provider:t.provider,venue_id:t.venue_id,venue_type:t.venue_type};break;case"messageMediaPending":r=t.messageMedia}n.media=r;const o=e=>{this.onMessagesSendError([n],e),this.rootScope.dispatchEvent("messages_pending")};return n.send=()=>{const s={};this.pendingAfterMsgs[e]&&(s.afterMessageId=this.pendingAfterMsgs[e].messageId);const r=a.sendAsPeerId?this.appPeersManager.getInputPeerById(a.sendAsPeerId):void 0;let p;return p=a.viaBotId?this.apiManager.invokeApiAfter("messages.sendInlineBotResult",{peer:this.appPeersManager.getInputPeerById(e),random_id:n.random_id,reply_to_msg_id:i||void 0,query_id:a.queryId,id:a.resultId,clear_draft:a.clearDraft,schedule_date:a.scheduleDate,silent:a.silent,send_as:r},s):this.apiManager.invokeApiAfter("messages.sendMedia",{peer:this.appPeersManager.getInputPeerById(e),media:t,random_id:n.random_id,reply_to_msg_id:i||void 0,message:"",clear_draft:a.clearDraft,schedule_date:a.scheduleDate,silent:a.silent,send_as:r,update_stickersets_order:a.updateStickersetOrder},s),this.pendingAfterMsgs[e]=s,p.then((e=>{e.updates&&e.updates.forEach((e=>{"updateDraftMessage"===e._&&(e.local=!0)})),this.apiUpdatesManager.processUpdateMessage(e)}),(e=>{throw o(e),e})).finally((()=>{this.pendingAfterMsgs[e]===s&&delete this.pendingAfterMsgs[e]}))},this.beforeMessageSending(n,{isScheduled:!!a.scheduleDate||void 0,threadId:a.threadId,clearDraft:a.clearDraft,sequential:!0}),n.promise}beforeMessageSending(e,t={}){const a=e.id,s=this.getMessagePeer(e),n=t.isScheduled?this.getScheduledMessagesStorage(s):this.getHistoryMessagesStorage(s);e.storageKey=n.key;const i=[];if(t.isScheduled)this.saveMessages([e],{storage:n,isScheduled:!0,isOutgoing:!0}),i.push((()=>{this.rootScope.dispatchEvent("scheduled_new",e)}));else{const r=[this.getHistoryStorage(s),t.threadId?this.getHistoryStorage(s,t.threadId):void 0];for(const e of r)e&&e.history.unshift(a);if(this.saveMessages([e],{storage:n,isOutgoing:!0}),this.setDialogTopMessage(e),t.threadId){const a=this.dialogsStorage.getForumTopic(s,t.threadId);a&&this.setDialogTopMessage(e,a)}i.push((()=>{this.rootScope.dispatchEvent("history_append",{storageKey:n.key,message:e})}))}const r=this.pendingByRandomId[e.random_id]={peerId:s,tempId:a,threadId:t.threadId,storage:n,sequential:t.sequential};return this.pendingTopMsgs[s]=a,!t.isGroupedItem&&e.send&&i.push((()=>{t.clearDraft&&this.appDraftsManager.clearDraft(s,t.threadId),e.send()})),i.length&&(t.processAfter||ta)((()=>{for(const e of i)e()})),r}generateOutgoingMessage(e,t){let a;t.threadId&&!t.replyToMsgId&&(t.replyToMsgId=t.threadId);const s=this.appPeersManager.isBroadcast(e);if(s&&this.appPeersManager.getPeer(e).pFlags.signatures){const e=this.appUsersManager.getSelf();a=e.first_name+(e.last_name?" "+e.last_name:"")}const n={_:"message",id:this.generateTempMessageId(e),from_id:t.sendAsPeerId?this.appPeersManager.getOutputPeer(t.sendAsPeerId):this.generateFromId(e),peer_id:this.appPeersManager.getOutputPeer(e),post_author:a,pFlags:this.generateFlags(e),date:t.scheduleDate||(0,te.Z)(!0)+this.timeManager.getServerTimeOffset(),message:"",grouped_id:t.groupId,random_id:(0,Ee.a)(),reply_to:this.generateReplyHeader(e,t.replyToMsgId,t.threadId),via_bot_id:t.viaBotId,reply_markup:t.replyMarkup,replies:this.generateReplies(e),views:s&&1,pending:!0};return(0,ge.Z)(n,["send","promise"]),void 0===t.groupId&&(n.promise=(0,v.Z)()),n}generateReplyHeader(e,t,a){const s=this.appPeersManager.isForum(e);if(s&&!a){const s=this.getMessageByPeer(e,t);s&&(a=(0,Xt.Z)(s,!0))}const n={_:"messageReplyHeader",reply_to_msg_id:t||a,pFlags:{}};return a&&s&&o.Ox!==a&&(n.pFlags.forum_topic=!0),a&&n.reply_to_msg_id!==a&&(n.reply_to_top_id=a),n}generateReplies(e){let t;if(this.appPeersManager.isBroadcast(e)){const a=this.appProfileManager.getCachedFullChat(e.toChatId());(null==a?void 0:a.linked_chat_id)&&(t={_:"messageReplies",flags:1,pFlags:{comments:!0},channel_id:a.linked_chat_id,replies:0,replies_pts:0})}return t}generateFromId(e){return this.appPeersManager.isAnyChat(e)&&(this.appPeersManager.isBroadcast(e)||this.isAnonymousSending(e))?void 0:this.appPeersManager.getOutputPeer(this.appUsersManager.getSelf().id.toPeerId())}generateFlags(e){const t={};return e!==this.appUsersManager.getSelf().id&&(t.out=!0,this.appPeersManager.isChannel(e)||this.appUsersManager.isBot(e)||(t.unread=!0)),this.appPeersManager.isBroadcast(e)&&(t.post=!0),t}generateForwardHeader(e,t){const a=this.appUsersManager.getSelf().id.toPeerId(),s=t.fromId;if(s===a&&t.peerId===a&&!t.fwd_from)return;const n={_:"messageFwdHeader",flags:0,date:t.date,pFlags:{}};let i=!1;if(t.fwd_from)n.from_id=t.fwd_from.from_id,n.from_name=t.fwd_from.from_name,n.post_author=t.fwd_from.post_author;else{if(n.post_author=t.post_author,s.isUser()){const e=this.appProfileManager.getCachedFullUser(s.toUserId());(null==e?void 0:e.private_forward_name)&&(n.from_name=e.private_forward_name,i=!0)}i||(n.from_id=this.appPeersManager.getOutputPeer(s))}return this.appPeersManager.isBroadcast(t.peerId)&&(t.post_author&&(n.post_author=t.post_author),n.channel_post=t.id),e!==a||i||(n.saved_from_msg_id=t.id,n.saved_from_peer=this.appPeersManager.getOutputPeer(t.peerId)),n}generateFakeAvatarMessage(e,t){const a=Number.MAX_SAFE_INTEGER,s={_:"messageService",pFlags:{},action:{_:"messageActionChannelEditPhoto",photo:t},id:a,peer_id:this.appPeersManager.getOutputPeer(e),mid:a,peerId:e,date:t.date,fromId:e};return this.getHistoryMessagesStorage(e).set(a,s),s}getUploadPromise(e){return this.uploadFilePromises[e]}isAnonymousSending(e){var t,a;return!!e.isAnyChat()&&(null===(a=null===(t=this.appPeersManager.getPeer(e).admin_rights)||void 0===t?void 0:t.pFlags)||void 0===a?void 0:a.anonymous)}setDialogTopMessage(e,t=this.getDialogOnly(e.peerId)){t&&(t.top_message=e.mid,this.getHistoryStorage(e.peerId,"forumTopic"===t._?t.id:void 0).maxId=e.mid,this.dialogsStorage.generateIndexForDialog(t,!1,e),this.scheduleHandleNewDialogs(e.peerId,t))}cancelPendingMessage(e){const t=this.pendingByRandomId[e];if(t){const{peerId:a,tempId:s,storage:n}=t,i=this.getHistoryStorage(a);return this.apiUpdatesManager.processLocalUpdate({_:"updateDeleteMessages",messages:[s],pts:void 0,pts_count:void 0}),i.history.delete(s),delete this.pendingByRandomId[e],n.delete(s),!0}return!1}fillConversations(e=undefined){return ea(this,void 0,void 0,(function*(){const t=this.middleware.get();for(;!this.dialogsStorage.isDialogsLoaded(e);){const a=yield this.getTopMessages({limit:100,folderId:e});if(!t()||a.isEnd)break}}))}getReadMaxIdIfUnread(e,t){var a,s,n;const i=this.getHistoryStorage(e,t);if(t&&!this.appChatsManager.isForum(e.toChatId())){const t=this.getHistoryStorage(e),n=Math.max(null!==(a=t.readMaxId)&&void 0!==a?a:0,i.readMaxId),r=this.getMessageByPeer(e,i.maxId);return!(null===(s=null==r?void 0:r.pFlags)||void 0===s?void 0:s.out)&&n<i.maxId?n:0}{const t=this.getMessageByPeer(e,i.maxId),a=e.isUser()?Math.max(i.readMaxId,i.readOutboxMaxId):i.readMaxId;return!(null===(n=null==t?void 0:t.pFlags)||void 0===n?void 0:n.out)&&a<i.maxId&&(0,oe.Z)(a)?a:0}}getTopMessages({limit:e,folderId:t}){let a=0,s=this.dialogsStorage.getOffsetDate(t);s&&(a=65536*s,s+=this.timeManager.getServerTimeOffset());const n=this.middleware.get(),i=this.dialogsStorage.isFilterIdForForum(t)?t:void 0,r=r=>{if(!n()||"messages.dialogsNotModified"===r._)return null;d.ZP&&this.log("messages.getDialogs result:",r),i||s||t===ye||this.dialogsStorage.resetPinnedOrder(t),i||s||this.appDraftsManager.addMissedDialogs(),this.appUsersManager.saveApiUsers(r.users),this.appChatsManager.saveApiChats(r.chats),this.saveMessages(r.messages);let p=!!s,c=!1;const l=new Map,m=t===ye?o.J$:t,g=!!i||t===ye,h=r.dialogs||r.topics;if((0,ne.Z)(h,(e=>{var t,s;if(e)if(i||null!==(t=(s=e).folder_id)&&void 0!==t||(s.folder_id=m),this.dialogsStorage.saveDialog({dialog:e,ignoreOffsetDate:!0,saveGlobalOffset:g}),void 0!==e.peerId)if(p||this.appPeersManager.isChannel(e.peerId||this.appPeersManager.getPeerId(e.peer))||(this.incrementMaxSeenId(e.top_message),p=!0),a&&(0,ce.Z)(e)>a&&(this.scheduleHandleNewDialogs(e.peerId,e),c=!0),i||(0,oe.Z)(e.read_inbox_max_id)||(0,oe.Z)(e.read_outbox_max_id)){if(e.top_message){const t=this.getMessageByPeer(e.peerId,e.top_message);t&&(this.setMessageUnreadByDialog(t,e),this.dialogsStorage.setDialogToState(e))}}else l.set(e.peerId,{dialog:e}),this.log.error("noIdsDialogs",e,f);else this.log.error("bugged dialog?",e)})),l.size){const e=[...l.keys()],t=e.map((e=>this.reloadConversation(e)));Promise.all(t).then((()=>{this.rootScope.dispatchEvent("dialogs_multiupdate",l);for(let t=0;t<e.length;++t){const a=e[t];this.rootScope.dispatchEvent("dialog_unread",{peerId:a,dialog:this.getDialogOnly(a)})}}))}const u=r.count,y=this.dialogsStorage.getFolderDialogs(t,!1);let _=0;for(let e=0,t=y.length;e<t;++e){const t=y[e];(0,oe.Z)(t.top_message)?++_:this.log.error("something strange with dialog",t)}const v=!u||_>=u||!h.length;v&&this.dialogsStorage.setDialogsLoaded(t,!0),c?this.scheduleHandleNewDialogs():this.rootScope.dispatchEvent("dialogs_multiupdate",new Map);const P=h,b=100===e?P:P.slice(0,e);return{isEnd:v&&b[b.length-1]===P[P.length-1],count:u,dialogs:b}};let p,f;return p=i?this.apiManager.invokeApiSingleProcess({method:"channels.getForumTopics",params:f={channel:this.appChatsManager.getChannelInput(i.toChatId()),limit:100,offset_date:s,offset_id:0,offset_topic:0},options:{noErrorBox:!0},processResult:e=>(e=this.dialogsStorage.processTopics(i,e),r(e))}):this.apiManager.invokeApiSingleProcess({method:"messages.getDialogs",params:f={folder_id:t,offset_date:s,offset_id:0,offset_peer:this.appPeersManager.getInputPeerById(undefined),limit:100,hash:"0"},options:{noErrorBox:!0},processResult:r}),p}forwardMessages(e,t,a,s={}){return ea(this,void 0,void 0,(function*(){delete s.replyToMsgId,delete s.threadId,e=this.appPeersManager.getPeerMigratedTo(e)||e;for(let n=0,i=(a=a.slice().sort(((e,t)=>e-t))).length;n<i;++n){const r=a[n],o=this.getMessageByPeer(t,r);o.pFlags.is_outgoing&&(this.sendText(e,o.message,{entities:o.entities,scheduleDate:s.scheduleDate,silent:s.silent}),a.splice(n--,1),--i)}if(!a.length)return Promise.resolve();const n=yield this.apiManager.getConfig(),i=a.splice(n.forwarded_count_max,a.length-n.forwarded_count_max);s.dropCaptions&&(s.dropAuthor=!0);const r={},o=[],p=a.map((n=>{var i,p,d,f,c;const l=this.getMessageByPeer(t,n),m=this.generateOutgoingMessage(e,s);o.push(m.id);const g=["entities","media"];s.dropAuthor||(m.fwd_from=this.generateForwardHeader(e,l),g.push("views","forwards"),(null===(i=m.fwd_from)||void 0===i?void 0:i.from_name)&&e===this.appPeersManager.peerId&&delete m.from_id),s.dropCaptions&&l.media||g.push("message");const h=null===(p=l.reply_to)||void 0===p?void 0:p.reply_to_msg_id,u=a.indexOf(h);if(h&&-1!==u){const e=o[u];m.reply_to={_:"messageReplyHeader",reply_to_msg_id:e,pFlags:{}}}g.forEach((e=>{m[e]=(0,ve.Z)(l[e])}));const y=null===(d=m.media)||void 0===d?void 0:d.document;return y&&(["round","voice"].includes(y.type)&&(m.pFlags.media_unread=!0),y.sticker&&!this.rootScope.premium&&(0,Kt.Z)(y)&&(m.media.pFlags.nopremium=!0)),l.grouped_id&&(null!==(f=r[c=l.grouped_id])&&void 0!==f?f:r[c]={tempId:""+ ++this.groupedTempId,messages:[]}).messages.push(m),m}));for(const e in r){const t=r[e];t.messages.length>1&&t.messages.forEach((e=>{e.grouped_id=t.tempId}))}p.forEach((e=>{this.beforeMessageSending(e,{isScheduled:!!s.scheduleDate||void 0,sequential:!0})}));const d={};this.pendingAfterMsgs[e]&&(d.afterMessageId=this.pendingAfterMsgs[e].messageId);const f=this.apiManager.invokeApiAfter("messages.forwardMessages",{from_peer:this.appPeersManager.getInputPeerById(t),id:a.map((e=>(0,oe.Z)(e))),random_id:p.map((e=>e.random_id)),to_peer:this.appPeersManager.getInputPeerById(e),with_my_score:s.withMyScore,silent:s.silent,schedule_date:s.scheduleDate,drop_author:s.dropAuthor,drop_media_captions:s.dropCaptions,send_as:s.sendAsPeerId?this.appPeersManager.getInputPeerById(s.sendAsPeerId):void 0},d).then((e=>{this.log("forwardMessages updates:",e),this.apiUpdatesManager.processUpdateMessage(e)}),(e=>{throw this.onMessagesSendError(p,e),e})).finally((()=>{this.pendingAfterMsgs[e]===d&&delete this.pendingAfterMsgs[e]}));this.pendingAfterMsgs[e]=d;const c=[f];return i.length&&c.push(this.forwardMessages(e,t,i,s)),Promise.all(c).then(Gt.Z)}))}generateEmptyMessage(e){}onMessagesSendError(e,t){e.forEach((e=>{if(e.error!==t)if(t){e.error=t,this.rootScope.dispatchEvent("message_error",{storageKey:e.storageKey,tempId:e.mid,error:t});const a=this.getDialogOnly(e.peerId);a&&this.rootScope.dispatchEvent("dialog_unread",{peerId:e.peerId,dialog:a})}else delete e.error}))}getMessagesStorageByKey(e){const t=e.split("_"),a=+t[0];return"scheduled"===t[1]?this.getScheduledMessagesStorage(a):this.getHistoryMessagesStorage(a)}getMessageFromStorage(e,t){return"string"==typeof e&&(e=this.getMessagesStorageByKey(e)),e&&e.get(t)}createMessageStorage(e,t){const a=new Map;return a.peerId=e,a.type=t,a.key=`${e}_${t}`,a}getHistoryMessagesStorage(e){var t,a;return null!==(t=(a=this.messagesStorageByPeerId)[e])&&void 0!==t?t:a[e]=this.createMessageStorage(e,"history")}getMessagesStorage(e){return"object"==typeof e?e:this.getMessagesStorageByKey(e)}getMessageById(e){for(const t in this.messagesStorageByPeerId){if(this.appPeersManager.isChannel(t.toPeerId()))continue;const a=this.messagesStorageByPeerId[t].get(e);if(a)return a}return this.getMessageFromStorage(null,e)}getMessageByPeer(e,t){return e?this.getMessageFromStorage(this.getHistoryMessagesStorage(e),t):this.getMessageById(t)}getMessagePeer(e){return e.peer_id&&this.appPeersManager.getPeerId(e.peer_id)||o.NM}getDialogOnly(e){return this.dialogsStorage.getDialogOnly(e)}cantForwardDeleteMids(e,t){const a=this.getMessagesStorage(e);let s=!t.length,n=!t.length;for(const e of t){const t=this.getMessageFromStorage(a,e);if(s||(s=!this.canForward(t)),n||(n=!this.canDeleteMessage(t)),s&&n)break}return{cantForward:s,cantDelete:n}}reloadConversationOrTopic(e,t){t?this.dialogsStorage.getForumTopicById(e,t):this.reloadConversation(e)}reloadConversation(e){let t;if(void 0!==e){const a=this.appPeersManager.getPeerId(e);this.log.warn("reloadConversation",a);let s=this.reloadConversationsPeers.get(a);if(s&&(t=s.promise),t)return t;t=(0,v.Z)(),this.reloadConversationsPeers.set(a,s={inputDialogPeer:this.appPeersManager.getInputDialogPeerById(e),promise:t})}return this.reloadConversationsPromise||(this.reloadConversationsPromise=(0,P.Z)(0).then((()=>{const e=[],t={};for(const[a,{inputDialogPeer:s,promise:n}]of this.reloadConversationsPeers)e.push(s),t[a]=n;const a=()=>{for(const e in t)this.reloadConversationsPeers.delete(+e),t[e].resolve(void 0)};return(()=>ea(this,void 0,void 0,(function*(){for(;;){const t=yield this.apiManager.invokeApi("messages.getPeerDialogs",{peers:e}),a=this.apiUpdatesManager.updatesState,{state:s}=t;if(!a.pts||a.pts===s.pts)return t;yield(0,P.Z)(500)}})))().then((e=>{for(const e in t)this.reloadConversationsPeers.delete(+e);this.dialogsStorage.applyDialogs(e),e.dialogs.forEach((e=>{const a=e.peerId;a&&(t[a].resolve(e),delete t[a])}))}),Gt.Z).then((()=>{a(),this.reloadConversationsPromise=null,this.reloadConversationsPeers.size&&this.reloadConversation()}))}))),t||this.reloadConversationsPromise}doFlushHistory(e,t,a,s){let n;const i=n=>(this.apiUpdatesManager.processUpdateMessage({_:"updateShort",update:{_:"updatePts",pts:n.pts,pts_count:n.pts_count}}),!n.offset||this.doFlushHistory(e,t,a,s));return n=s?this.apiManager.invokeApiSingleProcess({method:"channels.deleteTopicHistory",params:{channel:this.appChatsManager.getChannelInput(e.toChatId()),top_msg_id:(0,oe.Z)(s)},processResult:i}):this.apiManager.invokeApiSingleProcess({method:"messages.deleteHistory",params:{just_clear:t,revoke:a,peer:this.appPeersManager.getInputPeerById(e),max_id:0},processResult:i}),n}flushHistory(e,t,a,s){return ea(this,void 0,void 0,(function*(){if(this.appPeersManager.isChannel(e)&&!s){const t=this.getHistory(e,0,1),a=yield t,s=e.toChatId(),n=a.history[0]||0;return this.apiManager.invokeApiSingle("channels.deleteHistory",{channel:this.appChatsManager.getChannelInput(s),max_id:(0,oe.Z)(n)}).then((e=>(e&&this.apiUpdatesManager.processLocalUpdate({_:"updateChannelAvailableMessages",channel_id:s,available_min_id:n}),e)))}return this.doFlushHistory(e,t,a,s).then((()=>{if(s||this.flushStoragesByPeerId(e),t)this.rootScope.dispatchEvent("dialog_flush",{peerId:e,dialog:this.getDialogOnly(e)});else{const t=this.getTypingKey(e,s);if(delete this.notificationsToHandle[t],delete this.typings[t],!s){const t=this.reloadConversationsPeers.get(e);t&&(this.reloadConversationsPeers.delete(e),t.promise.resolve(void 0))}this.dialogsStorage.dropDialogOnDeletion(e,s)}}))}))}flushStoragesByPeerId(e){[this.historiesStorage,this.threadsStorage,this.searchesStorage,this.pendingAfterMsgs,this.pendingTopMsgs].forEach((t=>{delete t[e]}));for(const t in this.pinnedMessages)(+t===e||t.startsWith(e+"_"))&&delete this.pinnedMessages[t];const t=this.needSingleMessages.get(e);if(t){for(const[e,a]of t)a.resolve(this.generateEmptyMessage(e));t.clear()}[this.messagesStorageByPeerId,this.scheduledMessagesStorage].forEach((t=>{const a=t[e];a&&a.clear()})),this.dialogsStorage.flushForumTopicsCache(e)}hidePinnedMessages(e){return Promise.all([this.appStateManager.getState(),this.getPinnedMessage(e)]).then((([t,a])=>{t.hiddenPinnedMessages[e]=a.maxId,this.rootScope.dispatchEvent("peer_pinned_hidden",{peerId:e,maxId:a.maxId})}))}getPinnedMessagesKey(e,t){return e+(t?"_"+t:"")}getPinnedMessage(e,t){var a,s,n;const i=null!==(a=(s=this.pinnedMessages)[n=this.getPinnedMessagesKey(e,t)])&&void 0!==a?a:s[n]={};return i.promise?i.promise:i.maxId?Promise.resolve(i):i.promise=this.getSearch({peerId:e,inputFilter:{_:"inputMessagesFilterPinned"},maxId:0,limit:1,threadId:t}).then((e=>{var t;return i.count=e.count,i.maxId=null===(t=e.history[0])||void 0===t?void 0:t.mid,i})).finally((()=>{delete i.promise}))}getPinnedMessagesCount(e,t){var a;return null===(a=this.pinnedMessages[this.getPinnedMessagesKey(e,t)])||void 0===a?void 0:a.count}getPinnedMessagesMaxId(e,t){var a;return null===(a=this.pinnedMessages[this.getPinnedMessagesKey(e,t)])||void 0===a?void 0:a.maxId}updatePinnedMessage(e,t,a,s,n){return this.apiManager.invokeApi("messages.updatePinnedMessage",{peer:this.appPeersManager.getInputPeerById(e),unpin:a,silent:s,pm_oneside:n,id:(0,oe.Z)(t)}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}unpinAllMessages(e){return this.apiManager.invokeApiSingle("messages.unpinAllMessages",{peer:this.appPeersManager.getInputPeerById(e)}).then((t=>(this.apiUpdatesManager.processUpdateMessage({_:"updateShort",update:{_:"updatePts",pts:t.pts,pts_count:t.pts_count}}),t.offset?this.unpinAllMessages(e):(this.getHistoryMessagesStorage(e).forEach((e=>{e.pFlags.pinned&&delete e.pFlags.pinned})),this.rootScope.dispatchEvent("peer_pinned_messages",{peerId:e,unpinAll:!0}),delete this.pinnedMessages[this.getPinnedMessagesKey(e)],!0))))}getAlbumText(e){const t=this.groupedMessagesStorage[e];return(0,zt.Z)(Array.from(t.values()))}getGroupsFirstMessage(e){if(!(null==e?void 0:e.grouped_id))return e;const t=this.groupedMessagesStorage[e.grouped_id];let a=Number.MAX_SAFE_INTEGER;for(const[e,s]of t)s.mid<a&&(a=s.mid);return this.getMessageFromStorage(t,a)}getMidsByAlbum(e,t="asc"){return(0,Bt.Z)(this.groupedMessagesStorage[e],t)}getMessagesByAlbum(e){const t=this.getMidsByAlbum(e,"asc"),a=this.groupedMessagesStorage[e];return t.map((e=>this.getMessageFromStorage(a,e)))}getMidsByMessage(e){return e?e.grouped_id?this.getMidsByAlbum(e.grouped_id):[e.mid]:[]}filterMessages(e,t){const a=[];if(e.grouped_id){const s=this.groupedMessagesStorage[e.grouped_id];for(const[e,n]of s)t(n)&&a.push(n)}else t(e)&&a.push(e);return a}generateTempMessageId(e){const t=this.getDialogOnly(e);return this.appMessagesIdsManager.generateTempMessageId((null==t?void 0:t.top_message)||0)}setMessageUnreadByDialog(e,t=this.getDialogOnly(e.peerId)){t&&e.mid&&e.mid>t[e.pFlags.out?"read_outbox_max_id":"read_inbox_max_id"]&&(e.pFlags.unread=!0)}saveMessage(e,t={}){var a,s,n,i,r;if(!e||"messageEmpty"===e._)return;null!==(a=e.pFlags)&&void 0!==a||(e.pFlags={});const p=this.getMessagePeer(e),d=t.storage||this.getHistoryMessagesStorage(p),f="peerChannel"===e.peer_id._,c=f&&this.appChatsManager.isBroadcast(p.toChatId()),l="message"===e._;t.isOutgoing&&(e.pFlags.is_outgoing=!0);const m=(0,pe.Z)(e.id);e.mid=m,l&&(t.isScheduled&&(e.pFlags.is_scheduled=!0),e.grouped_id&&(null!==(s=(i=this.groupedMessagesStorage)[r=e.grouped_id])&&void 0!==s?s:i[r]=this.createMessageStorage(p,"grouped")).set(m,e),e.via_bot_id&&(e.viaBotId=e.via_bot_id));const g=e.reply_to;g&&(g.reply_to_msg_id&&(g.reply_to_msg_id=e.reply_to_mid=(0,pe.Z)(g.reply_to_msg_id)),g.reply_to_top_id&&(g.reply_to_top_id=(0,pe.Z)(g.reply_to_top_id)));const h=l&&e.replies;h&&(h.max_id&&(h.max_id=(0,pe.Z)(h.max_id)),h.read_max_id&&(h.read_max_id=(0,pe.Z)(h.read_max_id)));const u=!!p;u||(e.date-=this.timeManager.getServerTimeOffset());const y=this.appPeersManager.peerId,_=l&&e.fwd_from;if(e.peerId=p,e.fromId=p===y?_?_.from_id?this.appPeersManager.getPeerId(_.from_id):o.NM:y:e.pFlags.post||!e.from_id?p:this.appPeersManager.getPeerId(e.from_id),this.setMessageUnreadByDialog(e),_){_.saved_from_msg_id&&(_.saved_from_msg_id=(0,pe.Z)(_.saved_from_msg_id)),_.channel_post&&(_.channel_post=(0,pe.Z)(_.channel_post));const t=_.saved_from_peer||_.from_id,a=_.saved_from_msg_id||_.channel_post;if(t&&a){const s=this.appPeersManager.getPeerId(t),n=(0,pe.Z)(a);e.savedFrom=s+"_"+n}e.fwdFromId=this.appPeersManager.getPeerId(_.from_id),u||(_.date-=this.timeManager.getServerTimeOffset())}const v={type:"message",peerId:p,messageId:m};let P=!1;const b=l&&e.media;if(b)switch(b._){case"messageMediaEmpty":delete e.media;break;case"messageMediaPhoto":b.ttl_seconds?P=!0:b.photo=this.appPhotosManager.savePhoto(b.photo,v),b.photo||delete e.media;break;case"messageMediaPoll":{const t=this.appPollsManager.savePoll(b.poll,b.results,e);b.poll=t.poll,b.results=t.results;break}case"messageMediaDocument":if(b.ttl_seconds)P=!0;else{const e=b.document;b.document=this.appDocsManager.saveDoc(e,v),b.document||"documentEmpty"===e._||(P=!0)}break;case"messageMediaWebPage":{const a=this.appWebPagesManager.getMessageKeyForPendingWebPage(p,m,t.isScheduled);b.webpage=this.appWebPagesManager.saveWebPage(b.webpage,a,v),b.webpage||delete e.media;break}case"messageMediaInvoice":{b.photo=this.appWebDocsManager.saveWebDocument(b.photo);const e=b.extended_media;if("messageExtendedMedia"===(null==e?void 0:e._)){const t=e.media;t.photo=this.appPhotosManager.savePhoto(t.photo,v),t.document=this.appDocsManager.saveDoc(t.document,v)}break}case"messageMediaUnsupported":P=!0}if(l&&P&&(e.media={_:"messageMediaUnsupported"},e.message="",delete e.entities,delete e.totalEntities),!l&&e.action){const t=e.action,a=e.fromId===this.appUsersManager.getSelf().id?"You":"";let s,i;switch(t.photo&&(t.photo=this.appPhotosManager.savePhoto(t.photo,v)),t.document&&(t.document=this.appDocsManager.saveDoc(t.photo,v)),t._){case"messageActionChatEditPhoto":(null===(n=t.photo)||void 0===n?void 0:n.video_sizes)?t._=c?"messageActionChannelEditVideo":"messageActionChatEditVideo":c&&(t._="messageActionChannelEditPhoto");break;case"messageActionGroupCall":{let e;this.appGroupCallsManager.saveGroupCall(t.call),e=void 0===t.duration?"started":"ended",c||(e+="_by"+a),t.type=e;break}case"messageActionChatEditTitle":c&&(t._="messageActionChannelEditTitle");break;case"messageActionChatDeletePhoto":c&&(t._="messageActionChannelDeletePhoto");break;case"messageActionChatAddUser":1===t.users.length?(t.user_id=t.users[0],e.fromId===t.user_id&&(t._=f?"messageActionChatJoined"+a:"messageActionChatReturn"+a)):t.users.length>1&&(t._="messageActionChatAddUsers");break;case"messageActionChatDeleteUser":e.fromId===t.user_id&&(t._="messageActionChatLeave"+a);break;case"messageActionChannelMigrateFrom":s=t.chat_id.toPeerId(!0),i=p;break;case"messageActionChatMigrateTo":s=p,i=t.channel_id.toPeerId(!0);break;case"messageActionHistoryClear":e.clear_history=!0,delete e.pFlags.out,delete e.pFlags.unread;break;case"messageActionPhoneCall":t.type=(t.pFlags.video?"video_":"")+(void 0!==t.duration?e.pFlags.out?"out_":"in_":"")+(void 0!==t.duration?"ok":"phoneCallDiscardReasonMissed"===t.reason._?"missed":"cancelled")}s&&i&&!this.migratedFromTo[s]&&!this.migratedToFrom[i]&&this.migrateChecks(s,i)}return l&&e.message.length&&!e.totalEntities&&this.wrapMessageEntities(e),d.set(m,e),e}saveMessages(e,t={}){return e.saved||(e.saved=!0,e.forEach(((e,a,s)=>{s[a]=this.saveMessage(e,t)}))),e}getFirstMessageToEdit(e,t){return ea(this,void 0,void 0,(function*(){const a=this.getHistoryStorage(e,t).history.slice;if(a.isEnd(se.D.Bottom)&&a.length){let t;const s=this.appPeersManager.peerId;for(const n of a){const a=this.getMessageByPeer(e,n);if((s===e?a.fromId===s:a.pFlags.out)&&(yield this.canEditMessage(a,"text"))){t=a;break}}return t}}))}wrapMessageEntities(e){const t=e.entities?e.entities.slice():[];e.message=(0,Mt.Z)(e.message,t);const a=(0,Zt.Z)(e.message);e.totalEntities=(0,Nt.Z)(t,a)}reportMessages(e,t,a,s){return this.apiManager.invokeApiSingle("messages.report",{peer:this.appPeersManager.getInputPeerById(e),id:t.map((e=>(0,oe.Z)(e))),reason:{_:a},message:s})}startBot(e,t,a){const s=t?t.toPeerId(!0):e.toPeerId();if(a){const t=(0,Ee.a)();return this.apiManager.invokeApi("messages.startBot",{bot:this.appUsersManager.getUserInput(e),peer:this.appPeersManager.getInputPeerById(s),random_id:t,start_param:a}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}const n="/start";if(t){let a;return a=this.appChatsManager.isChannel(t)?this.appChatsManager.inviteToChannel(t,[e]):this.appChatsManager.addChatUser(t,e,0),a.catch((e=>{if("USER_ALREADY_PARTICIPANT"!=(null==e?void 0:e.type))throw e;e.handled=!0})).then((()=>this.sendText(s,n+"@"+this.appPeersManager.getPeerUsername(e.toPeerId()))))}return this.sendText(s,n)}editPeerFolders(e,t){this.apiManager.invokeApi("folders.editPeerFolders",{folder_peers:e.map((e=>({_:"inputFolderPeer",peer:this.appPeersManager.getInputPeerById(e),folder_id:t})))}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}getFilter(e){return this.filtersStorage.getFilter(e)}toggleDialogPin(e){var t;return ea(this,void 0,void 0,(function*(){const{peerId:a,topicId:s,filterId:n=(s?a:void 0)}=e;if(void 0===n)throw new Error("No filterId");if(n>1)return this.filtersStorage.toggleDialogPin(a,n);const i=this.dialogsStorage.getDialogOrTopic(a,s);if(!i)throw void 0;const r=!(null===(t=i.pFlags)||void 0===t?void 0:t.pinned)||void 0;if(r){const e=yield this.apiManager.getLimit(s?"topicPin":1===n?"folderPin":"pin");if(this.dialogsStorage.getPinnedOrders(n).length>=e)throw(0,X.Z)(s?"PINNED_TOO_MUCH":"PINNED_DIALOGS_TOO_MUCH")}return s?this.appChatsManager.updatePinnedForumTopic(a.toChatId(),s,r):this.apiManager.invokeApi("messages.toggleDialogPin",{peer:this.appPeersManager.getInputDialogPeerById(a),pinned:r}).then((e=>{const t=r?{pinned:r}:{};this.apiUpdatesManager.saveUpdate({_:"updateDialogPinned",peer:this.appPeersManager.getDialogPeer(a),folder_id:n,pFlags:t})}))}))}markDialogUnread(e,t){var a;const s=this.getDialogOnly(e);if(!s)return Promise.reject();const n=!t&&!(null===(a=s.pFlags)||void 0===a?void 0:a.unread_mark)||void 0;return this.apiManager.invokeApi("messages.markDialogUnread",{peer:this.appPeersManager.getInputDialogPeerById(e),unread:n}).then((t=>{if(t){const t=n?{unread:n}:{};this.onUpdateDialogUnreadMark({_:"updateDialogUnreadMark",peer:this.appPeersManager.getDialogPeer(e),pFlags:t})}}))}migrateChecks(e,t){if(!this.migratedFromTo[e]&&!this.migratedToFrom[t]&&this.appChatsManager.hasChat(t.toChatId())){const a=this.appChatsManager.getChat(e.toChatId());(null==a?void 0:a.migrated_to)&&a.migrated_to.channel_id===t.toChatId()&&(this.migratedFromTo[e]=t,this.migratedToFrom[t]=e,this.rootScope.dispatchEvent("dialog_migrate",{migrateFrom:e,migrateTo:t}),this.dialogsStorage.dropDialogWithEvent(e))}}canMessageBeEdited(e,t){var a,s;if(null===(a=null==e?void 0:e.pFlags)||void 0===a?void 0:a.is_outgoing)return!1;const n=["messageMediaPhoto","messageMediaDocument","messageMediaWebPage"];return"poll"===t&&n.push("messageMediaPoll"),!(!e||"message"!==e._||e.deleted||e.fwd_from||e.via_bot_id||e.media&&-1===n.indexOf(e.media._)||e.fromId&&this.appUsersManager.isBot(e.fromId)||"messageMediaDocument"===(null===(s=e.media)||void 0===s?void 0:s._)&&(e.media.document.sticker||"round"===e.media.document.type))}canEditMessage(e,t="text"){var a;return ea(this,void 0,void 0,(function*(){if(!e||!this.canMessageBeEdited(e,t))return!1;if(this.getMessagePeer(e)===this.appUsersManager.getSelf().id)return!0;const{peerId:s}=e;return!(!(this.appPeersManager.isBroadcast(s)?this.appChatsManager.hasRights(s.toChatId(),"edit_messages"):(!s.isAnyChat()||"text"!==t||this.appChatsManager.hasRights(s.toChatId(),"send_plain")||this.appChatsManager.hasRights(s.toChatId(),"send_media"))&&e.pFlags.out)||"peerChannel"!==e.peer_id._&&e.date<(0,te.Z)(!0)-(yield this.apiManager.getConfig()).edit_time_limit&&"messageMediaPoll"!==(null===(a=e.media)||void 0===a?void 0:a._))}))}canDeleteMessage(e){return e&&(e.peerId.isUser()||e.pFlags.out||"chat"===this.appChatsManager.getChat(e.peerId.toChatId())._||this.appChatsManager.hasRights(e.peerId.toChatId(),"delete_messages"))&&(!e.pFlags.is_outgoing||!!e.error)}getReplyKeyboard(e){return this.getHistoryStorage(e).replyMarkup}mergeReplyKeyboard(e,t){var a,s;if(!t)return!1;const n=t.reply_markup;if(!n&&!(null===(a=t.pFlags)||void 0===a?void 0:a.out)&&!t.action)return!1;if("replyInlineMarkup"===(null==n?void 0:n._))return!1;const i=e.replyMarkup;if(n)return!(i&&i.mid>=t.mid||n.pFlags.selective||(e.maxOutId&&t.mid<e.maxOutId&&n.pFlags.single_use&&(n.pFlags.hidden=!0),n.mid=t.mid,"replyKeyboardHide"!==n._&&(n.fromId=this.appPeersManager.getPeerId(t.from_id)),e.replyMarkup=n,0));if(t.pFlags.out)if(i){if((0,ue.Z)(i),i.pFlags.single_use&&!i.pFlags.hidden&&(t.mid>i.mid||t.pFlags.is_outgoing)&&t.message)return i.pFlags.hidden=!0,!0}else(!e.maxOutId||t.mid>e.maxOutId)&&(e.maxOutId=t.mid);return(0,ue.Z)(t),!("messageActionChatDeleteUser"!==(null===(s=t.action)||void 0===s?void 0:s._)||!(i?t.action.user_id===i.fromId:this.appUsersManager.isBot(t.action.user_id))||(e.replyMarkup={_:"replyKeyboardHide",mid:t.mid,pFlags:{}},0))}getSearchStorage(e,t){return this.searchesStorage[e]||(this.searchesStorage[e]={}),this.searchesStorage[e][t]||(this.searchesStorage[e][t]={history:[]}),this.searchesStorage[e][t]}getSearchCounters(e,t,a=!0,s){return this.appPeersManager.isPeerRestricted(e)?Promise.resolve(t.map((e=>({_:"messages.searchCounter",pFlags:{},filter:e,count:0})))):(a?this.apiManager.invokeApiCacheable:this.apiManager.invokeApi).bind(this.apiManager)("messages.getSearchCounters",{peer:this.appPeersManager.getInputPeerById(e),filters:t,top_msg_id:s?(0,oe.Z)(s):void 0})}filterMessagesByInputFilterFromStorage(e,t,a,s){const n=this.getMessagesStorage(a);return(0,jt.Z)(e,t.map((e=>n.get(e))),s)}getSearch({peerId:e,query:t,inputFilter:a,maxId:s,limit:n,nextRate:i,backLimit:r,threadId:o,folderId:p,minDate:f,maxDate:c}){if(this.appPeersManager.isPeerRestricted(e))return Promise.resolve({count:0,offset_id_offset:0,next_rate:void 0,history:[]});t||(t=""),a||(a={_:"inputMessagesFilterEmpty"}),void 0===n&&(n=20),i||(i=0),r||(r=0),f=f?f/1e3|0:0,c=c?c/1e3|0:0;let l=[];r&&(n+=r);let m;if(!e||r||s||t||1===n||o||(m=this.getHistoryStorage(e),l=this.filterMessagesByInputFilterFromStorage(a._,m.history.slice,this.getHistoryMessagesStorage(e),n)),l.length){if(!(l.length<n))return Promise.resolve({count:0,next_rate:0,offset_id_offset:0,history:l});s=l[l.length-1].mid,n-=l.length}const g=this.apiManager.invokeApi.bind(this.apiManager);let h;if(e&&!i&&void 0===p)h=g("messages.search",{peer:this.appPeersManager.getInputPeerById(e),q:t||"",filter:a,min_date:f,max_date:c,limit:n,offset_id:(0,oe.Z)(s)||0,add_offset:r?-r:0,max_id:0,min_id:0,hash:"",top_msg_id:(0,oe.Z)(o)||0},{noErrorBox:!0});else{let r,o=0;const d=s&&this.getMessageByPeer(e,s);d&&d.date&&(o=d.id,r=this.getMessagePeer(d)),h=g("messages.searchGlobal",{q:t,filter:a,min_date:f,max_date:c,offset_rate:i,offset_peer:this.appPeersManager.getInputPeerById(r),offset_id:o,limit:n,folder_id:p},{noErrorBox:!0})}return h.then((e=>{this.appUsersManager.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),this.saveMessages(e.messages),d.ZP&&this.log("getSearch result:",a,e);const t=e.count||l.length+e.messages.length;return e.messages.forEach((e=>{const t=this.getMessagePeer(e);if(t.isAnyChat()){const e=this.appChatsManager.getChat(t.toChatId());e.migrated_to&&this.migrateChecks(t,e.migrated_to.channel_id.toPeerId(!0))}l.push(e)})),{count:t,offset_id_offset:e.offset_id_offset||0,next_rate:e.next_rate,history:l}}))}subscribeRepliesThread(e,t){const a=e+"_"+t;for(const e in this.threadsToReplies)if(this.threadsToReplies[e]===a)return;this.getDiscussionMessage(e,t)}generateThreadServiceStartMessage(e){const t=e.peerId+"_"+e.mid;if(this.threadsServiceMessagesIdsStorage[t])return;const a=(0,oe.Z)(Math.max(...this.getMidsByMessage(e))),s={_:"messageService",pFlags:{is_single:!0},id:this.appMessagesIdsManager.generateTempMessageId(a),date:e.date,from_id:{_:"peerUser",user_id:o.NM},peer_id:e.peer_id,action:{_:"messageActionDiscussionStarted"},reply_to:this.generateReplyHeader(e.peerId,e.id)};this.saveMessages([s],{isOutgoing:!0}),this.threadsServiceMessagesIdsStorage[t]=s.mid}getThreadServiceMessageId(e,t){return this.threadsServiceMessagesIdsStorage[e+"_"+t]}getDiscussionMessage(e,t){return this.apiManager.invokeApiSingle("messages.getDiscussionMessage",{peer:this.appPeersManager.getInputPeerById(e),msg_id:(0,oe.Z)(t)}).then((a=>{var s;this.appChatsManager.saveApiChats(a.chats),this.appUsersManager.saveApiUsers(a.users),this.saveMessages(a.messages);const n=this.getMessageWithReplies(a.messages[0]),i=n.peerId+"_"+n.mid;this.generateThreadServiceStartMessage(n);const r=this.getHistoryStorage(n.peerId,n.mid),o=a.max_id=(0,pe.Z)(a.max_id)||0;a.read_inbox_max_id=r.readMaxId=(0,pe.Z)(null!==(s=a.read_inbox_max_id)&&void 0!==s?s:n.mid),a.read_outbox_max_id=r.readOutboxMaxId=(0,pe.Z)(a.read_outbox_max_id)||0;const p=r.history.first;return r.maxId&&r.maxId<o&&p.isEnd(se.D.Bottom)&&p.unsetEnd(se.D.Bottom),r.maxId=o,this.threadsToReplies[i]=e+"_"+t,n}))}handleNewMessage(e){this.rootScope.dispatchEvent("history_multiappend",e)}scheduleHandleNewDialogs(e,t){var a,s;if(void 0!==e){let s=this.newDialogsToHandle.get(e);s||this.newDialogsToHandle.set(e,s={});const n="object"==typeof t;!t||n&&"dialog"===t._?s.dialog=t:(null!==(a=s.topics)&&void 0!==a||(s.topics=new Map),n?s.topics.set(t.id,t):s.topics.set(t,void 0))}return null!==(s=this.newDialogsHandlePromise)&&void 0!==s?s:this.newDialogsHandlePromise=(0,P.Z)(0).then((()=>{this.newDialogsHandlePromise=void 0,this.handleNewDialogs()}))}deleteMessages(e,t,a,s){var n,i;return ea(this,void 0,void 0,(function*(){let r;const o=this.appPeersManager.isChannel(e),p=o&&e.toChatId();if(o&&!s){const a=this.appChatsManager.getChat(p);if(!a.pFlags.creator&&!(null===(i=null===(n=a.admin_rights)||void 0===n?void 0:n.pFlags)||void 0===i?void 0:i.delete_messages)&&!(t=t.filter((t=>!!this.getMessageByPeer(e,t).pFlags.out))).length)return}const d=yield this.apiManager.getConfig(),f=t.splice(d.forwarded_count_max,t.length-d.forwarded_count_max),c=t.map((e=>{const t=(0,oe.Z)(e);return(0,pe.Z)(t)===e&&t})).filter(Boolean);r=o?this.apiManager.invokeApi("channels.deleteMessages",{channel:this.appChatsManager.getChannelInput(p),id:c}).then((e=>{this.apiUpdatesManager.processLocalUpdate({_:"updateDeleteChannelMessages",channel_id:p,messages:t,pts:e.pts,pts_count:e.pts_count})})):this.apiManager.invokeApi("messages.deleteMessages",{revoke:a,id:c}).then((e=>{this.apiUpdatesManager.processLocalUpdate({_:"updateDeleteMessages",messages:t,pts:e.pts,pts_count:e.pts_count})}));const l=[r];return f.length&&l.push(this.deleteMessages(e,f,a,!0)),Promise.all(l).then(Gt.Z)}))}readHistory(e,t=0,a,s=!1){if(this.log("readHistory:",e,t,a),!this.getReadMaxIdIfUnread(e,a)){if(a&&!s){const t=this.dialogsStorage.getForumTopic(e,a);(0,oe.Z)(t.read_inbox_max_id)||(s=!0)}if(!s){const t=this.appChatsManager.isForum(e.toChatId())&&a?this.dialogsStorage.getForumTopic(e,a):this.getDialogOnly(e);t&&this.isDialogUnread(t)&&(s=!0)}if(!s)return this.log("readHistory: isn't unread"),Promise.resolve()}const n=this.getHistoryStorage(e,a);if(n.triedToReadMaxId>=t)return Promise.resolve();let i;return a?(n.readPromise||(i=this.apiManager.invokeApi("messages.readDiscussion",{peer:this.appPeersManager.getInputPeerById(e),msg_id:(0,oe.Z)(a),read_max_id:(0,oe.Z)(t)})),this.apiUpdatesManager.processLocalUpdate({_:"updateReadChannelDiscussionInbox",channel_id:e.toChatId(),top_msg_id:a,read_max_id:t})):this.appPeersManager.isChannel(e)?(n.readPromise||(i=this.apiManager.invokeApi("channels.readHistory",{channel:this.appChatsManager.getChannelInput(e.toChatId()),max_id:(0,oe.Z)(t)})),this.apiUpdatesManager.processLocalUpdate({_:"updateReadChannelInbox",max_id:t,channel_id:e.toChatId(),still_unread_count:void 0,pts:void 0})):(n.readPromise||(i=this.apiManager.invokeApi("messages.readHistory",{peer:this.appPeersManager.getInputPeerById(e),max_id:(0,oe.Z)(t)}).then((e=>{this.apiUpdatesManager.processUpdateMessage({_:"updateShort",update:{_:"updatePts",pts:e.pts,pts_count:e.pts_count}})}))),this.apiUpdatesManager.processLocalUpdate({_:"updateReadHistoryInbox",max_id:t,peer:this.appPeersManager.getOutputPeer(e),still_unread_count:void 0,pts:void 0,pts_count:void 0})),this.rootScope.dispatchEvent("notification_reset",this.appPeersManager.getPeerString(e)),n.readPromise?n.readPromise:(n.triedToReadMaxId=t,i.finally((()=>{delete n.readPromise;const{readMaxId:s}=n;this.log("readHistory: promise finally",t,s),s>t&&this.readHistory(e,s,a,!0)})),n.readPromise=i)}readAllHistory(e,t,a=!1){const s=this.getHistoryStorage(e,t);s.maxId&&this.readHistory(e,s.maxId,t,a)}getUnreadMentionsKey(e,t){return e+(t?`_${t}`:"")}fixDialogUnreadMentionsIfNoMessage(e,t){const a=this.dialogsStorage.getDialogOrTopic(e,t);(null==a?void 0:a.unread_mentions_count)&&this.reloadConversationOrTopic(e)}modifyCachedMentions(e,t,a,s){const n=this.unreadMentions[this.getUnreadMentionsKey(e,s)];n&&(a?n.first.isEnd(se.D.Top)&&n.insertSlice([t]):n.delete(t))}fixUnreadMentionsCountIfNeeded(e,t,a){const s=this.dialogsStorage.getDialogOrTopic(e,a);!t.length&&(null==s?void 0:s.unread_mentions_count)&&this.reloadConversationOrTopic(e)}goToNextMention(e,t){var a,s;const n=this.getUnreadMentionsKey(e,t),i=this.goToNextMentionPromises[n];if(i)return i;const r=null!==(a=(s=this.unreadMentions)[e])&&void 0!==a?a:s[e]=new se.Z,o=r.length,p=r.first.isEnd(se.D.Top);if(!o&&p)return this.fixUnreadMentionsCountIfNeeded(e,r,t),Promise.resolve();let d=Promise.resolve();return!p&&o<25&&(d=this.loadNextMentions(e,t)),this.goToNextMentionPromises[n]=d.then((()=>{const a=r.last,s=a&&a[a.length-1];if(s)return r.delete(s),s;this.fixUnreadMentionsCountIfNeeded(e,r,t)})).finally((()=>{delete this.goToNextMentionPromises[n]}))}loadNextMentions(e,t){const a=this.unreadMentions[e],s=a.first[0]||1;return this.getUnreadMentions(e,s,-50,50,void 0,void 0,t).then((e=>{this.mergeHistoryResult(a,e,1===s?0:s,50,-50)}))}getUnreadMentions(e,t,a,s,n=0,i=0,r){return this.apiManager.invokeApiSingleProcess({method:"messages.getUnreadMentions",params:{peer:this.appPeersManager.getInputPeerById(e),offset_id:(0,oe.Z)(t),add_offset:a,limit:s,max_id:(0,oe.Z)(n),min_id:(0,oe.Z)(i),top_msg_id:r?(0,oe.Z)(r):void 0},processResult:e=>((0,ue.Z)(e),this.appUsersManager.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),this.saveMessages(e.messages),e)})}readMessages(e,t){if(!t.length)return Promise.resolve();let a,s;if(t=t.map((e=>(0,oe.Z)(e))),e.isAnyChat()&&this.appPeersManager.isChannel(e)){const n=e.toChatId();s={_:"updateChannelReadMessagesContents",channel_id:n,messages:t},a=this.apiManager.invokeApi("channels.readMessageContents",{channel:this.appChatsManager.getChannelInput(n),id:t})}else s={_:"updateReadMessagesContents",messages:t,pts:void 0,pts_count:void 0},a=this.apiManager.invokeApi("messages.readMessageContents",{id:t}).then((e=>{s.pts=e.pts,s.pts_count=e.pts_count,this.apiUpdatesManager.processLocalUpdate(s)}));return this.apiUpdatesManager.processLocalUpdate(s),a}getHistoryStorage(e,t){var a,s,n,i,r,o;return t?null!==(s=(r=null!==(a=(i=this.threadsStorage)[e])&&void 0!==a?a:i[e]={})[t])&&void 0!==s?s:r[t]={count:null,history:new se.Z}:null!==(n=(o=this.historiesStorage)[e])&&void 0!==n?n:o[e]={count:null,history:new se.Z}}getHistoryStorageTransferable(e,t){const a=this.getHistoryStorage(e,t),{count:s,history:n,maxId:i,readMaxId:r,readOutboxMaxId:o,maxOutId:p,replyMarkup:d}=a;return{count:s,history:void 0,historySerialized:n.toJSON(),maxId:i,readMaxId:r,readOutboxMaxId:o,maxOutId:p,replyMarkup:d}}getNotifyPeerSettings(e,t){const a=this.appPeersManager.getInputNotifyPeerById({peerId:e,ignorePeerId:!0,threadId:t});return Promise.all([this.appNotificationsManager.getNotifyPeerTypeSettings(),this.appNotificationsManager.getNotifySettings(a)]).then((([a,s])=>({muted:this.appNotificationsManager.isPeerLocalMuted({peerId:e,respectType:!0,threadId:t}),peerTypeNotifySettings:s})))}getUpdateAfterReloadKey(e,t){return e+(t?"_"+t:"")}handleNewUpdateAfterReload(e,t,a){var s,n,i;const r=null!==(s=(n=this.newUpdatesAfterReloadToHandle)[i=this.getUpdateAfterReloadKey(e,a)])&&void 0!==s?s:n[i]=new Set;r.has(t)?this.log.error("here we go again",e):(t.ignoreExisting=!0,r.add(t),this.scheduleHandleNewDialogs(e,a))}setDialogToStateIfMessageIsTop(e){this.isMessageIsTopMessage(e)&&this.dialogsStorage.setDialogToState(this.getDialogOnly(e.peerId))}isMessageIsTopMessage(e){const t=this.getDialogOnly(e.peerId);return t&&t.top_message===e.mid}updateMessageRepliesIfNeeded(e){try{const t=this.getThreadKey(e);if(t){const e=this.threadsToReplies[t];if(e){const[t,a]=e.split("_");this.updateMessage(t.toPeerId(),+a,"replies_updated")}}}catch(t){this.log.error("incrementMessageReplies err",t,e)}}getThreadKey(e){var t;let a="";if(null===(t=null==e?void 0:e.peerId)||void 0===t?void 0:t.isAnyChat()){const t=(0,Xt.Z)(e,this.appChatsManager.isForum(e.peerId.toChatId()));t&&(a=e.peerId+"_"+t)}return a}updateMessage(e,t,a){return this.reloadMessages(e,t,!0).then((()=>{const s=this.getMessageByPeer(e,t);if(s)return a&&this.rootScope.dispatchEvent(a,s),s}))}checkPendingMessage(e){const t=this.pendingByMessageId[e.mid];let a;if(t){const s=this.pendingByRandomId[t];(a=this.finalizePendingMessage(t,e))&&this.rootScope.dispatchEvent("history_update",{storageKey:s.storage.key,message:e,sequential:s.sequential}),delete this.pendingByMessageId[e.mid]}return a}mutePeer(e){if(!(e=this.appNotificationsManager.validatePeerSettings(e)))return;const{peerId:t,muteUntil:a,threadId:s}=e,n={_:"inputPeerNotifySettings"};n.mute_until=a;const i=this.appPeersManager.getInputPeerById(t);return this.appNotificationsManager.updateNotifySettings(s?{_:"inputNotifyForumTopic",peer:i,top_msg_id:(0,oe.Z)(s)}:{_:"inputNotifyPeer",peer:i},n)}togglePeerMute({peerId:e,mute:t,threadId:a}){return void 0===t&&(t=!this.appNotificationsManager.isPeerLocalMuted({peerId:e,respectType:!1,threadId:a})),this.mutePeer({peerId:e,muteUntil:t?o.rU:0,threadId:a})}findPeerIdByMids(e){for(let t=e.length-1;t>=0;--t){const a=e[t],s=this.getMessageById(a);if(s)return s.peerId}}canSendToPeer(e,t,a="send_messages"){var s;if(this.appPeersManager.isPeerRestricted(e))return!1;if(e.isAnyChat()){const n=e.toChatId();if(t){const a=this.dialogsStorage.getForumTopic(e,t);if((null===(s=null==a?void 0:a.pFlags)||void 0===s?void 0:s.closed)&&!this.appChatsManager.hasRights(n,"manage_topics"))return!1}const i=this.appChatsManager.getChat(n);return this.appChatsManager.hasRights(n,a,void 0,!!t)&&(!i.pFlags.left||!!t)}return this.appUsersManager.canSendToUser(e)}finalizePendingMessage(e,t){const a=this.pendingByRandomId[e];if(!a)return;const{peerId:s,tempId:n,threadId:i,storage:r}=a;[this.getHistoryStorage(s),i?this.getHistoryStorage(s,i):void 0].filter(Boolean).forEach((e=>{e.history.delete(n)}));const o=this.getMessageFromStorage(r,n);return o&&(delete t.pFlags.is_outgoing,delete t.pending,delete t.error,delete t.random_id,delete t.send),this.rootScope.dispatchEvent("messages_pending"),delete this.pendingByRandomId[e],this.finalizePendingMessageCallbacks(r,n,t),o}finalizePendingMessageCallbacks(e,t,a){const s=this.tempFinalizeCallbacks[t];if(void 0!==s){for(const e in s){const{deferred:t,callback:n}=s[e];n(a).then(t.resolve,t.reject)}delete this.tempFinalizeCallbacks[t]}if(a.media){(0,ue.Z)(a);const{photo:e,document:s}=a.media;if(e){const a=this.appPhotosManager.getPhoto(""+t);if(a){const t=e.sizes[e.sizes.length-1],s=this.thumbsStorage.getCacheContext(e,t.type),n=this.thumbsStorage.getCacheContext(a,o.Pt);Object.assign(s,n);const i=e.sizes[e.sizes.length-1],r=(0,Lt.Z)(e,i);(0,mt.P)(r.location)}}else if(s){const e=this.appDocsManager.getDoc(""+t);if(e){const t=this.thumbsStorage.getCacheContext(e);if(e.type&&"sticker"!==e.type&&"image/gif"!==e.mime_type&&t.url){const e=this.thumbsStorage.getCacheContext(s);Object.assign(e,t),n=s,(0,mt.P)((0,lt.Z)(n,undefined),{fileName:n.file_name})}}}else a.media.poll&&(delete this.appPollsManager.polls[t],delete this.appPollsManager.results[t])}var n;const i=this.getMessageFromStorage(e,t);e.delete(t),!i.reply_markup&&a.reply_markup&&setTimeout((()=>{this.getMessageFromStorage(e,a.mid)&&this.rootScope.dispatchEvent("message_edit",{storageKey:e.key,peerId:a.peerId,mid:a.mid,message:a})}),0),this.handleReleasingMessage(i,e),this.rootScope.dispatchEvent("message_sent",{storageKey:e.key,tempId:t,tempMessage:i,mid:a.mid,message:a})}incrementMaxSeenId(e){if(!e||this.maxSeenId&&!(e>this.maxSeenId))return!1;this.maxSeenId=e,this.appStateManager.pushToState("maxSeenMsgId",e),this.apiManager.invokeApi("messages.receivedMessages",{max_id:(0,oe.Z)(e)})}getMessageReactionsListAndReadParticipants(e,t,a,s,n,i){var r,o;return ea(this,void 0,void 0,(function*(){const p={reactions:[],count:0,next_offset:void 0},d=yield this.canViewMessageReadParticipants(e);return null!=t||(t=d?100:50),Promise.all([!d||a||n?[]:this.getMessageReadParticipants(e.peerId,e.mid).catch((()=>[])),(null===(o=null===(r=e.reactions)||void 0===r?void 0:r.recent_reactions)||void 0===o?void 0:o.length)&&!i?this.appReactionsManager.getMessageReactionsList(e.peerId,e.mid,t,a,s).catch((e=>p)):p]).then((([e,t])=>{const a=e.slice();(0,ne.Z)(a,(({user_id:e},a,s)=>{t.reactions.some((t=>this.appPeersManager.getPeerId(t.peer_id)===e.toPeerId()))&&s.splice(a,1)}));let s=t.reactions.map((e=>({peerId:this.appPeersManager.getPeerId(e.peer_id),reaction:e.reaction,date:e.date})));return s=s.concat(a.map((({user_id:e,date:t})=>({date:t,peerId:e.toPeerId()})))),{reactions:t.reactions,reactionsCount:t.count,readParticipantDates:e,combined:s,nextOffset:t.next_offset}}))}))}getMessageReadParticipants(e,t){return this.apiManager.invokeApiSingle("messages.getMessageReadParticipants",{peer:this.appPeersManager.getInputPeerById(e),msg_id:(0,oe.Z)(t)}).then((e=>(e.forEach((e=>e.user_id=e.user_id.toUserId())),e)))}canViewMessageReadParticipants(e){return ea(this,void 0,void 0,(function*(){if("message"!==(null==e?void 0:e._)||e.pFlags.is_outgoing||!e.pFlags.out||!this.appPeersManager.isAnyGroup(e.peerId))return!1;const t=this.appChatsManager.getChat(e.peerId.toChatId()),a=yield this.apiManager.getAppConfig();return t.participants_count<=a.chat_read_mark_size_threshold&&(0,te.Z)(!0)-e.date<a.chat_read_mark_expire_period}))}incrementMessageViews(e,t){if(t.length)return this.apiManager.invokeApiSingle("messages.getMessagesViews",{peer:this.appPeersManager.getInputPeerById(e),id:t.map((e=>(0,oe.Z)(e))),increment:!0}).then((a=>{const s=new Array(t.length);for(let n=0,i=t.length;n<i;++n)s[n]={_:"updateChannelMessageViews",channel_id:o.NM,peerId:e,id:t[n],views:a.views[n].views};this.apiUpdatesManager.processUpdateMessage({_:"updates",updates:s,chats:a.chats,users:a.users})}))}notifyAboutMessage(e,t={}){const a=this.getMessagePeer(e);if(this.appPeersManager.isPeerRestricted(a))return;const s=Wt.getTabs();let n=s.find((e=>{const{chatPeerIds:t}=e.state;return t[t.length-1]===a}));!n&&s.length&&(s.sort(((e,t)=>e.state.idleStartTime-t.state.idleStartTime)),n=s[0].state.idleStartTime?s[s.length-1]:s[0]),f.Z.getInstance().invokeVoid("notificationBuild",Object.assign({message:e},t),null==n?void 0:n.source)}getScheduledMessagesStorage(e){var t,a;return null!==(t=(a=this.scheduledMessagesStorage)[e])&&void 0!==t?t:a[e]=this.createMessageStorage(e,"scheduled")}getScheduledMessageByPeer(e,t){return this.getMessageFromStorage(this.getScheduledMessagesStorage(e),t)}getScheduledMessages(e){if(!this.canSendToPeer(e))return;const t=this.getScheduledMessagesStorage(e);return t.size?[...t.keys()]:this.apiManager.invokeApiSingle("messages.getScheduledHistory",{peer:this.appPeersManager.getInputPeerById(e),hash:""}).then((t=>{if("messages.messagesNotModified"!==t._){this.appUsersManager.saveApiUsers(t.users),this.appChatsManager.saveApiChats(t.chats);const a=this.getScheduledMessagesStorage(e);return this.saveMessages(t.messages,{storage:a,isScheduled:!0}),[...a.keys()]}return[]}))}sendScheduledMessages(e,t){return this.apiManager.invokeApi("messages.sendScheduledMessages",{peer:this.appPeersManager.getInputPeerById(e),id:t.map((e=>(0,oe.Z)(e)))}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}deleteScheduledMessages(e,t){return this.apiManager.invokeApi("messages.deleteScheduledMessages",{peer:this.appPeersManager.getInputPeerById(e),id:t.map((e=>(0,oe.Z)(e)))}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e)}))}getMessageWithReplies(e){return this.filterMessages(e,(e=>!!e.replies))[0]}getMessageWithCommentReplies(e){if(e.peerId!==o.hj){const t=null==(e=this.getMessageWithReplies(e))?void 0:e.replies;if(!t||!t.pFlags.comments||t.channel_id.toChatId()===o.IA)return}return e}isFetchIntervalNeeded(e){return e.isAnyChat()&&(!this.appChatsManager.isInChat(e.toChatId())||this.appChatsManager.isForum(e.toChatId()))}getNewHistory(e,t){var a;return ea(this,void 0,void 0,(function*(){if(!this.isFetchIntervalNeeded(e))return;const s=this.getHistoryStorage(e,t),n=s.history.slice;if(!n.isEnd(se.D.Bottom))return;delete s.maxId,n.unsetEnd(se.D.Bottom);const i=yield this.getHistory(e,null!==(a=n[0])&&void 0!==a?a:1,0,50,t);for(let t=0,a=i.history.length;t<a;++t)this.handleNewMessage(this.getMessageByPeer(e,i.history[t]));return{isBottomEnd:s.history.slice.isEnd(se.D.Bottom)}}))}getHistory(e,t=0,a,s,n){const i=this.getHistoryStorage(e,n);if(this.appPeersManager.isPeerRestricted(e)){const e=i.history.first;e.setEnd(se.D.Both);const t=e.slice(0,0);return t.setEnd(se.D.Both),{count:0,history:Array.from(t),isEnd:t.getEnds(),offsetIdOffset:0}}let r=0;s&&(r=-s,a+=s);const o=i.history.sliceMe(t,r,a);return!o||o.slice.length!==a&&(o.fulfilled&se.D.Both)!==se.D.Both?this.fillHistoryStorage(e,t,a,r,i,n).then((()=>{const e=i.history.sliceMe(t,r,a),s=(null==e?void 0:e.slice)||i.history.constructSlice();return{count:i.count,history:Array.from(s),isEnd:s.getEnds(),offsetIdOffset:(null==e?void 0:e.offsetIdOffset)||i.count}})):{count:i.count,history:Array.from(o.slice),isEnd:o.slice.getEnds(),offsetIdOffset:o.offsetIdOffset}}isHistoryResultEnd(e,t,a,s){const{offset_id_offset:n,messages:i}=e,r=i.map((e=>e.mid)),o=e.count||i.length,p=a<0?t+a:t,d=Math.abs(a);let f=n,c=!1,l=!1;if(void 0!==f)c=f>=o-p||o<p,l=!f||a<0&&f+a<=0;else if(s&&(0,oe.Z)(s)){let e=0;for(const t=r.length;e<t&&!(s>r[e]);++e);const t=r.includes(s),a=i.length-e,n=t?e-1:e;p&&(c=a<p),d&&(l=n<(t?d-1:d)),(c||l)&&(f=c?o-a:n)}else i.length>=o&&(c=!0,l=!0);return null!=f||(f=0),{count:o,offsetIdOffset:f,isTopEnd:c,isBottomEnd:l,mids:r}}mergeHistoryResult(e,t,a,s,n){const{messages:i}=t,r=this.isHistoryResultEnd(t,s,n,a),{count:o,offsetIdOffset:p,isTopEnd:d,isBottomEnd:f,mids:c}=r;if(a&&(0,oe.Z)(a)&&!c.includes(a)&&p<o){let e=0;for(const t=c.length;e<t&&!(a>c[e]);++e);c.splice(e,0,a)}const l=e.insertSlice(c)||e.slice;return d&&l.setEnd(se.D.Top),f&&l.setEnd(se.D.Bottom),Object.assign({slice:l,mids:c,messages:i},r)}fillHistoryStorage(e,t,a,s,n,i){const r=n.maxId;return this.requestHistory(e,t,a,s,void 0,i).then((i=>{const{count:o,isBottomEnd:p,slice:d,messages:f}=this.mergeHistoryResult(n.history,i,t,a,s);n.count=o;for(let t=0,a=f.length;t<a;++t){const a=f[t];this.mergeReplyKeyboard(n,a)&&this.rootScope.dispatchEvent("history_reply_markup",{peerId:e})}if(p){const t=d[0];if(n.maxId===r){const a=n.history.first;a!==d&&n.history.deleteSlice(a),n.maxId!==t&&(n.maxId=d[0],this.reloadConversation(e))}}}))}requestHistory(e,t,a=0,s=0,n=0,i=0){const r={peer:this.appPeersManager.getInputPeerById(e),offset_id:(0,oe.Z)(t)||0,offset_date:n,add_offset:s,limit:a,max_id:0,min_id:0,hash:0};return i&&(r.msg_id=(0,oe.Z)(i)||0),this.apiManager.invokeApiSingle(i?"messages.getReplies":"messages.getHistory",r,{noErrorBox:!0}).then((r=>{d.ZP&&this.log("requestHistory result:",e,r,t,a,s),this.appUsersManager.saveApiUsers(r.users),this.appChatsManager.saveApiChats(r.chats),this.saveMessages(r.messages),"pts"in r&&this.apiUpdatesManager.addChannelState(e.toChatId(),r.pts);let o=r.messages.length,p=r.count;o&&!r.messages[o-1]&&(r.messages.splice(o-1,1),o--,p--);const f=this.getHistoryStorage(e,i),c=r.messages[o-1];if(o&&c.grouped_id){const t=f.history.findSlice(c.mid);if(t&&t.slice.length+r.messages.length<p)return this.requestHistory(e,c.mid,10,0,n,i).then((e=>r))}return r}),(t=>{if("CHANNEL_PRIVATE"===t.type){let t=this.appChatsManager.getChat(e.toChatId());"channel"===t._&&(t={_:"channelForbidden",id:e.toChatId(),access_hash:t.access_hash,title:t.title,pFlags:t.pFlags}),this.apiUpdatesManager.processUpdateMessage({_:"updates",updates:[{_:"updateChannel",channel_id:e.toChatId()}],chats:[t],users:[]})}throw t}))}fetchSingleMessages(){return this.fetchSingleMessagesPromise?this.fetchSingleMessagesPromise:this.fetchSingleMessagesPromise=(0,P.Z)(0).then((()=>{const e=[];for(const[t,a]of this.needSingleMessages){const s=[...a.keys()],n=s.map((e=>({_:"inputMessageID",id:(0,oe.Z)(e)})));let i;i=t.isAnyChat()&&this.appPeersManager.isChannel(t)?this.apiManager.invokeApiSingle("channels.getMessages",{channel:this.appChatsManager.getChannelInput(t.toChatId()),id:n}):this.apiManager.invokeApiSingle("messages.getMessages",{id:n});const r=i.then((e=>{(0,ue.Z)(e),this.appUsersManager.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats);const t=this.saveMessages(e.messages);for(let e=0;e<t.length;++e){const s=t[e];if(!s)continue;const n=(0,pe.Z)(s.id);a.get(n).resolve(s),a.delete(n)}if(a.size)for(const[e,t]of a)t.resolve(this.generateEmptyMessage(e))})).finally((()=>{this.rootScope.dispatchEvent("messages_downloaded",{peerId:t,mids:s})}));e.push(r)}return this.needSingleMessages.clear(),Promise.all(e).then(Gt.Z,Gt.Z).then((()=>{this.fetchSingleMessagesPromise=void 0,this.needSingleMessages.size&&this.fetchSingleMessages()}))}))}reloadMessages(e,t,a){if(Array.isArray(t))return Promise.all(t.map((t=>this.reloadMessages(e,t,a))));const s=this.getMessageByPeer(e,t);if(s&&!a)return this.rootScope.dispatchEvent("messages_downloaded",{peerId:e,mids:[t]}),Promise.resolve(s);{let a=this.needSingleMessages.get(e);a||this.needSingleMessages.set(e,a=new Map);let s=a.get(t);return s||(s=(0,v.Z)(),a.set(t,s),this.fetchSingleMessages(),s)}}getExtendedMedia(e,t){let a=this.extendedMedia.get(e);a||this.extendedMedia.set(e,a=new Map);const s=(0,v.Z)(),n=[],i=t.map((t=>{let i=a.get(t);return i||(a.set(t,i=s),n.push(t),i.then((()=>{a.delete(t),a.size||this.extendedMedia.get(e)!==a||this.extendedMedia.delete(e)}))),i}));return n.length?this.apiManager.invokeApi("messages.getExtendedMedia",{peer:this.appPeersManager.getInputPeerById(e),id:n.map((e=>(0,oe.Z)(e)))}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e),s.resolve()})):s.resolve(),Promise.all(i)}fetchMessageReplyTo(e){if(!e.reply_to_mid)return Promise.resolve(this.generateEmptyMessage(0));const t=e.reply_to.reply_to_peer_id?this.appPeersManager.getPeerId(e.reply_to.reply_to_peer_id):e.peerId;return this.reloadMessages(t,e.reply_to_mid).then((t=>{if(t||delete(e=this.getMessageByPeer(e.peerId,e.mid)).reply_to_mid,"messageService"===e._){const t=e.peerId;this.rootScope.dispatchEvent("message_edit",{storageKey:`${t}_history`,peerId:t,mid:e.mid,message:e}),this.isMessageIsTopMessage(e)&&this.rootScope.dispatchEvent("dialogs_multiupdate",new Map([[t,{dialog:this.getDialogOnly(t)}]]))}return t}))}getTypingKey(e,t){return t?`${e}_${t}`:e}setTyping(e,t,a,s){var n;s&&!this.appPeersManager.isForum(e)&&(s=void 0);const i=this.getTypingKey(e,s);let r=this.typings[i];return e&&this.canSendToPeer(e)&&e!==this.appPeersManager.peerId&&(a||(null===(n=null==r?void 0:r.action)||void 0===n?void 0:n._)!==t._)?((null==r?void 0:r.timeout)&&clearTimeout(r.timeout),r=this.typings[i]={action:t},this.apiManager.invokeApi("messages.setTyping",{peer:this.appPeersManager.getInputPeerById(e),action:t,top_msg_id:s?(0,oe.Z)(s):void 0}).finally((()=>{r===this.typings[i]&&(r.timeout=T.Z.setTimeout((()=>{delete this.typings[i]}),6e3))}))):Promise.resolve(!1)}handleReleasingMessage(e,t){const a=e.media;if(a){const s=a.webpage||a,n=s.photo||s.document;if((null==n?void 0:n.file_reference)&&this.referenceDatabase.deleteContext(n.file_reference,{type:"message",peerId:e.peerId,messageId:e.mid}),"webpage"in a&&a.webpage){const s=this.getScheduledMessagesStorage(e.peerId)===t,n=this.appWebPagesManager.getMessageKeyForPendingWebPage(e.peerId,e.mid,s);this.appWebPagesManager.deleteWebPageFromPending(a.webpage,n)}a.poll&&this.appPollsManager.updatePollToMessage(e,!1)}}handleDeletedMessages(e,t,a){const s={count:0,unread:0,unreadMentions:0,msgs:new Set};for(const n of a){const a=this.getMessageFromStorage(t,n);if(!a){this.fixDialogUnreadMentionsIfNoMessage(e);continue}this.handleReleasingMessage(a,t),this.updateMessageRepliesIfNeeded(a),a.pFlags.out||a.pFlags.is_outgoing||!a.pFlags.unread||(++s.unread,this.rootScope.dispatchEvent("notification_cancel","msg"+n),a.pFlags.mentioned&&(++s.unreadMentions,this.modifyCachedMentions(e,n,!1))),++s.count,s.msgs.add(n),a.deleted=!0;const i=a.grouped_id;if(i){const e=this.groupedMessagesStorage[i];e&&(e.delete(n),s.albums||(s.albums={}),(s.albums[i]||(s.albums[i]=new Set)).add(n),e.size||(delete s.albums,delete this.groupedMessagesStorage[i]))}t.delete(n)}if(s.albums)for(const e in s.albums)this.dispatchAlbumEdit(e,t,[...s.albums[e]]);return s}handleEditedMessage(e,t,a){var s;if("message"===e._){if(null===(s=e.media)||void 0===s?void 0:s.webpage){const t=this.appWebPagesManager.getMessageKeyForPendingWebPage(e.peerId,e.mid,!!e.pFlags.is_scheduled);this.appWebPagesManager.deleteWebPageFromPending(e.media.webpage,t)}const t=e.grouped_id;t&&this.dispatchAlbumEdit(t,a,[])}}dispatchAlbumEdit(e,t,a){const s=this.getMidsByAlbum(e).map((e=>this.getMessageFromStorage(t,e)));this.rootScope.dispatchEvent("album_edit",{peerId:s[0].peerId,groupId:e,deletedMids:a||[],messages:s})}getDialogUnreadCount(e){var t;let a=e.unread_count;if(!this.dialogsStorage.isTopic(e)&&this.appPeersManager.isForum(e.peerId)){const t=this.dialogsStorage.getForumUnreadCount(e.peerId);a=t instanceof Promise?0:t.count}return a||+!!(null===(t=e.pFlags)||void 0===t?void 0:t.unread_mark)}isDialogUnread(e){return!!this.getDialogUnreadCount(e)}canForward(e){return"message"===(null==e?void 0:e._)&&!e.pFlags.noforwards&&!this.appPeersManager.noForwards(e.peerId)}pushBatchUpdate(e,t,a,s){let n=this.batchUpdates[e];n||(n=this.batchUpdates[e]={callback:t,batch:new Map}),n.batch.has(a)||(n.batch.set(a,s?s():void 0),this.batchUpdatesDebounced())}getMessagesFromMap(e){const t=new Map;for(const[a,s]of e){const[e,n]=a.split("_"),i=this.getMessageByPeer(e.toPeerId(),+n);i&&t.set(i,s)}return t}saveDefaultSendAs(e,t){return this.appProfileManager.getCachedFullChat(e.toChatId()).default_send_as=this.appPeersManager.getOutputPeer(t),this.apiManager.invokeApi("messages.saveDefaultSendAs",{peer:this.appPeersManager.getInputPeerById(e),send_as:this.appPeersManager.getInputPeerById(t)})}}var sa=a(6724);function na(e){const t=e.replace("input","");return t[0].toLowerCase()+t.slice(1)}class ia extends G{constructor(){super(...arguments),this.peerSettings={notifyPeer:{},notifyUsers:null,notifyChats:null,notifyBroadcasts:null,notifyForumTopic:{}},this.checkMuteUntil=()=>{void 0!==this.checkMuteUntilTimeout&&(clearTimeout(this.checkMuteUntilTimeout),this.checkMuteUntilTimeout=void 0);const e=(0,te.Z)(!0);let t=o.rU;const a=a=>{if(a instanceof Promise)return!1;const s=a.mute_until;return!!s&&(s<=e?(a.mute_until=0,!0):(s<t&&(t=s),!1))};["notifyPeer","notifyForumTopic"].forEach((e=>{for(const t in this.peerSettings[e]){const s=this.peerSettings[e][t];if(a(s)){const[e,a]=t.split("_"),n=this.appPeersManager.getOutputPeer(e.toPeerId());this.apiUpdatesManager.saveUpdate({_:"updateNotifySettings",peer:a?{_:"notifyForumTopic",peer:n,top_msg_id:+a}:{_:"notifyPeer",peer:n},notify_settings:s})}}}));const s=Math.min(18e5,1e3*(t-e));this.checkMuteUntilTimeout=T.Z.setTimeout(this.checkMuteUntil,s)}}after(){return this.checkMuteUntilThrottled=(0,sa.Z)(this.checkMuteUntil,1e3,!1),this.apiUpdatesManager.addMultipleEventsListeners({updateNotifySettings:e=>{const{peer:t}=e,a="notifyForumTopic"===t._,s="notifyPeer"===t._||a,n=s&&this.appPeersManager.getPeerId(t.peer),i=s?void 0:t._;this.savePeerSettings({key:i,peerId:n,threadId:a?(0,pe.Z)(t.top_msg_id):void 0,settings:e.notify_settings}),this.rootScope.dispatchEvent("notify_settings",e)}}),this.appStateManager.getState().then((e=>{if(e.notifySettings)for(const t in e.notifySettings)(0,ue.Z)(t),this.savePeerSettings({key:t,settings:e.notifySettings[t]})}))}getNotifySettings(e){let t,a=na(e._),s=this.peerSettings[a];return"inputNotifyPeer"===e._&&(t=a=this.appPeersManager.getPeerId(e.peer),s=s[a]),s||((s||this.peerSettings)[a]=this.apiManager.invokeApi("account.getNotifySettings",{peer:e}).then((e=>(this.savePeerSettings({key:a,peerId:t,settings:e}),e))))}getNotifyPeerTypeSettings(){if(this.getNotifyPeerTypePromise)return this.getNotifyPeerTypePromise;const e=["inputNotifyBroadcasts","inputNotifyUsers","inputNotifyChats"].map((e=>this.getNotifySettings({_:e})));return this.getNotifyPeerTypePromise=Promise.all(e)}updateNotifySettings(e,t){return this.apiManager.invokeApi("account.updateNotifySettings",{peer:e,settings:t}).then((a=>{a&&this.apiUpdatesManager.processLocalUpdate({_:"updateNotifySettings",peer:Object.assign(Object.assign({},e),{_:na(e._)}),notify_settings:Object.assign(Object.assign({},t),{_:"peerNotifySettings"})})}))}getContactSignUpNotification(){return this.notifyContactsSignUp?this.notifyContactsSignUp:this.notifyContactsSignUp=this.apiManager.invokeApi("account.getContactSignUpNotification")}setContactSignUpNotification(e){this.apiManager.invokeApi("account.setContactSignUpNotification",{silent:e}).then((t=>{this.notifyContactsSignUp=Promise.resolve(!e)}))}getPeerKey(e,t){return e+(t?"_"+t:"")}savePeerSettings({key:e,peerId:t,threadId:a,settings:s}){let n;t&&(e=this.getPeerKey(t,a),n=this.peerSettings[a?"notifyForumTopic":"notifyPeer"]),(n||this.peerSettings)[e]=s,t?this.checkMuteUntilThrottled():(this.rootScope.dispatchEvent("notify_peer_type_settings",{key:e,settings:s}),this.appStateManager.getState().then((t=>{const a=t.notifySettings;a[e]=s,this.appStateManager.pushToState("notifySettings",a)})))}isMuted(e){return"peerNotifySettings"===e._&&(e.silent||void 0!==e.mute_until&&1e3*e.mute_until>(0,te.Z)())}getPeerMuted(e){const t=this.getNotifySettings({_:"inputNotifyPeer",peer:this.appPeersManager.getInputPeerById(e)});return(t instanceof Promise?t:Promise.resolve(t)).then((e=>this.isMuted(e)))}getPeerLocalSettings({peerId:e,respectType:t=!0,threadId:a}){const s={_:"peerNotifySettings"},n=this.getPeerKey(e,a),i=this.peerSettings[a?"notifyForumTopic":"notifyPeer"][n];if(!i||i instanceof Promise||Object.assign(s,i),t){const t=na(this.appPeersManager.getInputNotifyPeerById({peerId:e,ignorePeerId:!0,threadId:a})._),n=this.peerSettings[t];if(n&&!(n instanceof Promise))for(const e in n)void 0===s[e]&&(s[e]=n[e])}return s}validatePeerSettings(e){if(e.peerId!==this.appPeersManager.peerId)return e.threadId&&!this.appPeersManager.isForum(e.peerId)&&(e.threadId=void 0),e}isPeerLocalMuted(e){if(!(e=this.validatePeerSettings(e)))return!1;if(e.threadId){const t=this.getPeerLocalSettings(Object.assign(Object.assign({},e),{respectType:!1}));return void 0!==t.silent||void 0!==t.mute_until?this.isMuted(t):this.isPeerLocalMuted(Object.assign(Object.assign({},e),{threadId:void 0}))}const t=this.getPeerLocalSettings(e);return this.isMuted(t)}}var ra=a(677),oa=a(617),pa=a(7361),da=a(7419),fa=a(7256);class ca extends G{get peerId(){return this.appUsersManager.userId.toPeerId()}canPinMessage(e){return e.isUser()||this.appChatsManager.hasRights(e.toChatId(),"pin_messages")}getPeerPhoto(e){const t=this.getPeer(e);return(0,fa.Z)(t)}getPeerMigratedTo(e){if(e.isUser())return!1;const t=this.appChatsManager.getChat(e.toChatId()),a=null==t?void 0:t.migrated_to;return!(!a||!t.pFlags.deactivated)&&(0,le.Z)(a)}getOutputPeer(e){if(e.isUser())return{_:"peerUser",user_id:e.toUserId()};const t=e.toChatId();return this.appChatsManager.isChannel(t)?{_:"peerChannel",channel_id:t}:{_:"peerChat",chat_id:t}}getPeerString(e){return e.isUser()?this.appUsersManager.getUserString(e.toUserId()):this.appChatsManager.getChatString(e.toChatId())}getPeerUsername(e){return this.getPeerActiveUsernames(e)[0]||""}getPeerActiveUsernames(e){const t=this.getPeer(e);return(0,Qt.Z)(t)}getPeer(e){return e.isUser()?this.appUsersManager.getUser(e.toUserId()):this.appChatsManager.getChat(e.toChatId())}getPeerId(e){return(0,le.Z)(e)||(0,fe.Z)(e)&&"inputPeerSelf"===e._&&this.peerId||o.NM}getDialogPeer(e){return{_:"dialogPeer",peer:this.getOutputPeer(e)}}isChannel(e){return!e.isUser()&&this.appChatsManager.isChannel(e.toChatId())}isMegagroup(e){return!e.isUser()&&this.appChatsManager.isMegagroup(e.toChatId())}isForum(e){return!e.isUser()&&this.appChatsManager.isForum(e.toChatId())}isAnyGroup(e){return!e.isUser()&&!this.appChatsManager.isBroadcast(e.toChatId())}isBroadcast(e){return this.isChannel(e)&&!this.isMegagroup(e)}isBot(e){return e.isUser()&&this.appUsersManager.isBot(e.toUserId())}isContact(e){return e.isUser()&&this.appUsersManager.isContact(e.toUserId())}isUser(e){return(0,oa.Z)(e)}isAnyChat(e){return(0,pa.Z)(e)}isPeerRestricted(e){return(0,da.Z)(this.getPeer(e))}getRestrictionReasonText(e){const t=this.getPeer(e),a=t.restriction_reason?(0,ra.RP)(t.restriction_reason):void 0;return a?a.text:e.isUser()?"This user is restricted":"This chat is restricted"}getInputNotifyPeerById({peerId:e,ignorePeerId:t,threadId:a}){return t?e.isUser()?{_:"inputNotifyUsers"}:this.isBroadcast(e)?{_:"inputNotifyBroadcasts"}:{_:"inputNotifyChats"}:a?{_:"inputNotifyForumTopic",peer:this.getInputPeerById(e),top_msg_id:(0,oe.Z)(a)}:{_:"inputNotifyPeer",peer:this.getInputPeerById(e)}}getInputPeerById(e){if(!e)return{_:"inputPeerEmpty"};if(!e.isUser()){const t=e.toChatId();return this.appChatsManager.getInputPeer(t)}const t=e.toUserId();return this.appUsersManager.getUserInputPeer(t)}getInputPeerSelf(){return{_:"inputPeerSelf"}}getInputDialogPeerById(e){return{_:"inputDialogPeer",peer:(0,fe.Z)(e)?e:this.getInputPeerById(e)}}getPeerSearchText(e){let t;return t=this.isUser(e)?"%pu "+this.appUsersManager.getUserSearchText(e.toUserId()):"%pg "+(this.appChatsManager.getChat(e.toChatId()).title||""),t}getDialogType(e){return this.isMegagroup(e)?"megagroup":this.isChannel(e)?"channel":this.isUser(e)?e===this.peerId?"saved":"chat":"group"}getDeleteButtonText(e){switch(this.getDialogType(e)){case"channel":return this.appChatsManager.hasRights(e.toChatId(),"delete_chat")?"ChannelDelete":"ChatList.Context.LeaveChannel";case"megagroup":case"group":return this.appChatsManager.hasRights(e.toChatId(),"delete_chat")?"DeleteMega":"ChatList.Context.LeaveGroup";default:return"ChatList.Context.DeleteChat"}}noForwards(e){var t;return!e.isUser()&&!!(null===(t=this.appChatsManager.getChat(e.toChatId()).pFlags)||void 0===t?void 0:t.noforwards)}}class la extends G{constructor(){super(...arguments),this.photos={}}savePhoto(e,t){var a;if(!e||"photoEmpty"===e._)return;const s=this.photos[e.id];if(e.file_reference&&(ft("file_reference",s,e),this.referenceDatabase.saveContext(e.file_reference,t)),null===(a=e.sizes)||void 0===a?void 0:a.length){e.sizes.sort(((e,t)=>(e.size||(e.sizes?1/0:0))-(t.size||(t.sizes?1/0:0))));const t=e.sizes[e.sizes.length-1];"photoSizeProgressive"===t._&&(t.size=t.sizes[t.sizes.length-1])}return s?Object.assign(s,e):this.photos[e.id]=e}getUserPhotos(e,t="0",a=20){const s=this.appUsersManager.getUserInput(e);return this.apiManager.invokeApiCacheable("photos.getUserPhotos",{user_id:s,offset:0,limit:a,max_id:t},{cacheSeconds:60}).then((a=>{this.appUsersManager.saveApiUsers(a.users);const s=a.photos.map(((t,s)=>(a.photos[s]=this.savePhoto(t,{type:"profilePhoto",peerId:e.toPeerId()}),t.id)));if("0"!==t&&t){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}return{count:a.count||s.length,photos:s}}))}getPhoto(e){return(0,fe.Z)(e)?e:this.photos[e]}}class ma extends G{constructor(){super(...arguments),this.polls={},this.results={},this.pollToMessages={},this.log=(0,S.kg)("POLLS",S.v9.Error)}after(){this.apiUpdatesManager.addMultipleEventsListeners({updateMessagePoll:e=>{this.log("updateMessagePoll:",e);let t=e.poll||this.polls[e.poll_id];if(!t)return;let a=e.results;const s=this.savePoll(t,a);t=s.poll,a=s.results,this.rootScope.dispatchEvent("poll_update",{poll:t,results:a})}})}savePoll(e,t,a){a&&this.updatePollToMessage(a,!0);const s=e.id;return this.polls[s]?(e=Object.assign(this.polls[s],e),t=this.saveResults(e,t)):(this.polls[s]=e,e.chosenIndexes=[],t=this.saveResults(e,t)),{poll:e,results:t}}saveResults(e,t){var a;return this.results[e.id]?t=Object.assign(this.results[e.id],t):this.results[e.id]=t,t.pFlags.min||(e.chosenIndexes.length=0,(null===(a=null==t?void 0:t.results)||void 0===a?void 0:a.length)&&t.results.forEach(((t,a)=>{var s;(null===(s=t.pFlags)||void 0===s?void 0:s.chosen)&&e.chosenIndexes.push(a)}))),t}getPoll(e){return{poll:this.polls[e],results:this.results[e]}}getInputMediaPoll(e,t,a,s){return a?(s||(s=[]),a=(0,ke.Z)(a,s)):a=void 0,{_:"inputMediaPoll",poll:e,correct_answers:t,solution:a,solution_entities:a?s:void 0}}updatePollToMessage(e,t){const{id:a}=e.media.poll;let s=this.pollToMessages[a];if(!t&&!s)return;s||(s=this.pollToMessages[a]=new Set);const n=e.peerId+"_"+e.mid;t?s.add(n):s.delete(n),t||s.size||(delete this.polls[a],delete this.results[a],delete this.pollToMessages[a])}sendVote(e,t){const a=e.media.poll,s=t.map((e=>a.answers[e].option)),n=e.mid,i=e.peerId,r=this.appPeersManager.getInputPeerById(i);return e.pFlags.is_outgoing?this.appMessagesManager.invokeAfterMessageIsSent(n,"sendVote",(e=>(this.log("invoke sendVote callback"),this.sendVote(e,t)))):this.apiManager.invokeApi("messages.sendVote",{peer:r,msg_id:(0,oe.Z)(e.mid),options:s}).then((e=>{this.log("sendVote updates:",e),this.apiUpdatesManager.processUpdateMessage(e)}))}getResults(e){const t=this.appPeersManager.getInputPeerById(e.peerId);return this.apiManager.invokeApi("messages.getPollResults",{peer:t,msg_id:(0,oe.Z)(e.mid)}).then((e=>{this.apiUpdatesManager.processUpdateMessage(e),this.log("getResults updates:",e)}))}getVotes(e,t,a,s=20){return this.apiManager.invokeApi("messages.getPollVotes",{peer:this.appPeersManager.getInputPeerById(e.peerId),id:(0,oe.Z)(e.mid),option:t,offset:a,limit:s}).then((e=>(this.log("getPollVotes messages:",e),this.appUsersManager.saveApiUsers(e.users),e)))}stopPoll(e){const t=e.media.poll;if(t.pFlags.closed)return Promise.resolve();const a=(0,ve.Z)(t);return a.pFlags.closed=!0,this.appMessagesManager.editMessage(e,void 0,{newMedia:this.getInputMediaPoll(a)}).then((()=>{}),(e=>{this.log.error("stopPoll error:",e)}))}}class ga extends G{constructor(){super(...arguments),this.privacy={}}after(){this.apiUpdatesManager.addMultipleEventsListeners({updatePrivacy:e=>{const t=e.key._;this.privacy[t]=e.rules,this.rootScope.dispatchEvent("privacy_update",e)}})}setPrivacy(e,t){return this.apiManager.invokeApi("account.setPrivacy",{key:{_:e},rules:t}).then((a=>(this.appUsersManager.saveApiUsers(a.users),this.appChatsManager.saveApiChats(a.chats),this.apiUpdatesManager.processLocalUpdate({_:"updatePrivacy",key:{_:na(e)},rules:t.map((e=>{const t={};return Object.assign(t,e),t._=na(t._),t}))}),a.rules)))}getPrivacy(e){const t=na(e),a=this.privacy[t];return a?Promise.resolve(a):this.privacy[t]=this.apiManager.invokeApi("account.getPrivacy",{key:{_:e}}).then((e=>(this.appUsersManager.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),this.privacy[t]=e.rules)))}getGlobalPrivacySettings(){return this.apiManager.invokeApi("account.getGlobalPrivacySettings")}setGlobalPrivacySettings(e){return this.apiManager.invokeApi("account.setGlobalPrivacySettings",{settings:e})}}var ha=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const ua=18e4;class ya extends G{constructor(){super(...arguments),this.usersFull={},this.chatsFull={},this.fullExpiration={},this.onUpdateChatParticipants=e=>{const t=e.participants;if("chatParticipants"!==t._)return;const a=t.chat_id,s=this.chatsFull[a];void 0!==s&&(s.participants=t,this.rootScope.dispatchEvent("chat_full_update",a))},this.onUpdateChatParticipantAdd=e=>{const t=this.chatsFull[e.chat_id];if(void 0===t)return;const a=t.participants,s=a.participants||[];for(let t=0,a=s.length;t<a;t++)if(s[t].user_id===e.user_id)return;s.push({_:"chatParticipant",user_id:e.user_id,inviter_id:e.inviter_id,date:(0,te.Z)(!0)}),a.version=e.version,this.rootScope.dispatchEvent("chat_full_update",e.chat_id)},this.onUpdateChatParticipantDelete=e=>{const t=this.chatsFull[e.chat_id];if(void 0===t)return;const a=t.participants,s=a.participants||[];for(let t=0,n=s.length;t<n;t++)if(s[t].user_id===e.user_id)return s.splice(t,1),a.version=e.version,void this.rootScope.dispatchEvent("chat_full_update",e.chat_id)},this.onUpdateUserTyping=e=>{var t,a;const s=e.user_id?e.user_id.toPeerId():this.appPeersManager.getPeerId(e.from_id);if(this.appPeersManager.peerId===s||"speakingInGroupCallAction"===e.action._)return;const n=e.top_msg_id,i=n?(0,pe.Z)(n):void 0,r=this.appPeersManager.getPeerId(e),o=this.getTypingsKey(r,i),p=null!==(t=(a=this.typingsInPeer)[o])&&void 0!==t?t:a[o]=[];let d=p.find((e=>e.userId===s));const f=()=>{delete d.timeout;const e=p.indexOf(d);-1!==e&&p.splice(e,1),this.rootScope.dispatchEvent("peer_typings",{peerId:r,threadId:i,typings:p}),p.length||delete this.typingsInPeer[o]};if(void 0!==(null==d?void 0:d.timeout)&&clearTimeout(d.timeout),"sendMessageCancelAction"===e.action._){if(!d)return;return void f()}d||(d={userId:s},p.push(d)),d.action=e.action;const c=this.appUsersManager.hasUser(s);c?this.appUsersManager.forceUserOnline(s):"updateChatUserTyping"===e._&&e.chat_id&&this.appChatsManager.hasChat(e.chat_id)&&!this.appChatsManager.isChannel(e.chat_id)&&Promise.resolve(this.getChatFull(e.chat_id)).then((()=>{void 0!==d.timeout&&this.appUsersManager.hasUser(s)&&this.rootScope.dispatchEvent("peer_typings",{peerId:r,threadId:i,typings:p})})),d.timeout=T.Z.setTimeout(f,6e3),c&&this.rootScope.dispatchEvent("peer_typings",{peerId:r,threadId:i,typings:p})},this.onUpdatePeerBlocked=e=>{const t=this.appPeersManager.getPeerId(e.peer_id);if(this.appPeersManager.isUser(t)){const a=t.toUserId(),s=this.usersFull[a];s&&(e.blocked?s.pFlags.blocked=!0:delete s.pFlags.blocked),this.rootScope.dispatchEvent("user_full_update",a)}this.rootScope.dispatchEvent("peer_block",{peerId:t,blocked:e.blocked})}}after(){this.apiUpdatesManager.addMultipleEventsListeners({updateChatParticipants:this.onUpdateChatParticipants,updateChatParticipantAdd:this.onUpdateChatParticipantAdd,updateChatParticipantDelete:this.onUpdateChatParticipantDelete,updateUserTyping:this.onUpdateUserTyping,updateChatUserTyping:this.onUpdateUserTyping,updateChannelUserTyping:this.onUpdateUserTyping,updatePeerBlocked:this.onUpdatePeerBlocked}),this.rootScope.addEventListener("chat_update",(e=>{var t,a;const s=this.chatsFull[e],n=this.appChatsManager.getChat(e);if(!s||!n)return;let i=!1;!!s.call!=!!(null===(t=n.pFlags)||void 0===t?void 0:t.call_active)&&(i=!0);const{photo:r}=n;if(r){const e="chatPhotoEmpty"!==r._;(e!==!(!s.chat_photo||"photoEmpty"===s.chat_photo._)||e&&r.photo_id!==(null===(a=s.chat_photo)||void 0===a?void 0:a.id))&&(i=!0)}i&&this.refreshFullPeer(e.toPeerId(!0))})),this.rootScope.addEventListener("channel_update",(e=>{this.refreshFullPeer(e.toPeerId(!0))})),this.rootScope.addEventListener("chat_full_update",(e=>{this.rootScope.dispatchEvent("peer_full_update",e.toPeerId(!0))})),this.rootScope.addEventListener("user_full_update",(e=>{this.rootScope.dispatchEvent("peer_full_update",e.toPeerId(!1))})),this.rootScope.addEventListener("invalidate_participants",(e=>{this.invalidateChannelParticipants(e)})),this.typingsInPeer={}}getProfile(e,t){return this.usersFull[e]&&!t&&Date.now()<this.fullExpiration[e.toPeerId()]?this.usersFull[e]:this.apiManager.invokeApiSingleProcess({method:"users.getFullUser",params:{id:this.appUsersManager.getUserInput(e)},processResult:t=>{this.appChatsManager.saveApiChats(t.chats,!0),this.appUsersManager.saveApiUsers(t.users);const a=t.full_user,s=e.toPeerId(!1);a.profile_photo&&(a.profile_photo=this.appPhotosManager.savePhoto(a.profile_photo,{type:"profilePhoto",peerId:s}));const n=a.bot_info;if(n){const t={type:"userFull",userId:e};n.description_document=this.appDocsManager.saveDoc(n.description_document,t),n.description_photo=this.appPhotosManager.savePhoto(n.description_photo,t)}return this.appNotificationsManager.savePeerSettings({peerId:s,settings:a.notify_settings}),this.usersFull[e]=a,this.fullExpiration[s]=Date.now()+ua,this.rootScope.dispatchEvent("user_full_update",e),a}})}getProfileByPeerId(e,t){return this.appPeersManager.isAnyChat(e)?this.getChatFull(e.toChatId(),t):this.getProfile(e.toUserId(),t)}getCachedFullChat(e){return this.chatsFull[e]}getCachedFullUser(e){return this.usersFull[e]}getCachedProfileByPeerId(e){return e.isUser()?this.getCachedFullUser(e.toUserId()):this.getCachedFullChat(e.toChatId())}getFullPhoto(e){return ha(this,void 0,void 0,(function*(){const t=yield this.getProfileByPeerId(e);switch(t._){case"userFull":return t.profile_photo;case"channelFull":case"chatFull":return t.chat_photo}}))}getChatFull(e,t){if(this.appChatsManager.isChannel(e))return this.getChannelFull(e,t);const a=e.toPeerId(!0),s=this.chatsFull[e];if(s&&!t&&Date.now()<this.fullExpiration[a]){const t=this.appChatsManager.getChat(e);if(t.pFlags.left||t.pFlags.deactivated||t.version===s.participants.version)return s}return this.apiManager.invokeApiSingleProcess({method:"messages.getFullChat",params:{chat_id:e},processResult:t=>{this.appChatsManager.saveApiChats(t.chats,!0),this.appUsersManager.saveApiUsers(t.users);const s=t.full_chat;return s&&s.chat_photo&&s.chat_photo.id&&(s.chat_photo=this.appPhotosManager.savePhoto(s.chat_photo,{type:"profilePhoto",peerId:a})),s.call&&this.appGroupCallsManager.saveGroupCall(s.call,e),this.appNotificationsManager.savePeerSettings({peerId:a,settings:s.notify_settings}),this.chatsFull[e]=s,this.fullExpiration[a]=Date.now()+ua,this.rootScope.dispatchEvent("chat_full_update",e),s}})}getChatInviteLink(e,t){return ha(this,void 0,void 0,(function*(){const a=yield this.getChatFull(e);return!t&&a.exported_invite&&"chatInviteExported"==a.exported_invite._?a.exported_invite.link:this.apiManager.invokeApi("messages.exportChatInvite",{peer:this.appPeersManager.getInputPeerById(e.toPeerId(!0))}).then((t=>(void 0!==this.chatsFull[e]&&(this.chatsFull[e].exported_invite=t),t.link)))}))}getParticipants(e,t={_:"channelParticipantsRecent"},a=200,s=0){return this.appChatsManager.isChannel(e)?this.getChannelParticipants(e,t,a,s):(0,q.Z)(this.getChatFull(e),(e=>{const a=e.participants;if("chatParticipants"!==a._)throw(0,X.Z)("CHAT_PRIVATE");if("channelParticipantsSearch"===t._&&t.q.trim()){const e=this.appUsersManager.createSearchIndex();a.participants.forEach((t=>{const a=t.user_id;e.indexObject(a,this.appUsersManager.getUserSearchText(a))}));const s=e.search(t.q),n=a.participants.filter((e=>s.has(e.user_id)));return Object.assign(Object.assign({},a),{participants:n})}return a}))}getParticipant(e,t){return this.appChatsManager.isChannel(e)?this.getChannelParticipant(e,t):Promise.resolve(this.getParticipants(e)).then((e=>{(0,ue.Z)(e);const a=e.participants.find((e=>{if((0,xe.Z)(e)===t)return e}));if(!a)throw(0,X.Z)("USER_NOT_PARTICIPANT");return a}))}getChannelParticipants(e,t={_:"channelParticipantsRecent"},a=200,s=0){if(!this.appChatsManager.hasRights(e,"view_participants"))throw(0,X.Z)("CHAT_ADMIN_REQUIRED");const n=this.apiManager.invokeApiCacheable("channels.getParticipants",{channel:this.appChatsManager.getChannelInput(e),filter:t,offset:s,limit:a,hash:"0"},{cacheSeconds:60,syncIfHasResult:!0});return(0,q.Z)(n,(e=>(this.appUsersManager.saveApiUsers(e.users),e)))}getChannelParticipant(e,t){return this.apiManager.invokeApiSingle("channels.getParticipant",{channel:this.appChatsManager.getChannelInput(e),participant:this.appPeersManager.getInputPeerById(t)}).then((e=>(this.appUsersManager.saveApiUsers(e.users),e.participant)))}getChannelFull(e,t){const a=e.toPeerId(!0);return void 0!==this.chatsFull[e]&&!t&&Date.now()<this.fullExpiration[a]?this.chatsFull[e]:this.apiManager.invokeApiSingleProcess({method:"channels.getFullChannel",params:{channel:this.appChatsManager.getChannelInput(e)},processResult:t=>{this.appChatsManager.saveApiChats(t.chats,!0),this.appUsersManager.saveApiUsers(t.users);const s=t.full_chat;return s&&s.chat_photo.id&&(s.chat_photo=this.appPhotosManager.savePhoto(s.chat_photo,{type:"profilePhoto",peerId:a})),s.call&&this.appGroupCallsManager.saveGroupCall(s.call,e),this.appNotificationsManager.savePeerSettings({peerId:a,settings:s.notify_settings}),this.chatsFull[e]=s,this.fullExpiration[a]=Date.now()+ua,this.rootScope.dispatchEvent("chat_full_update",e),s},processError:t=>{if("CHANNEL_PRIVATE"===t.type){const t=this.appChatsManager.getChat(e);this.apiUpdatesManager.processUpdateMessage({_:"updates",updates:[{_:"updateChannel",channel_id:e}],chats:["channelForbidden"===t._?t:{_:"channelForbidden",id:e,access_hash:t.access_hash,title:t.title,pFlags:t.pFlags}],users:[]})}throw t}})}getMentions(e,t,a){const s=e=>{"@"===t.charAt(0)&&(t=t.slice(1));const a=new ae.Z({ignoreCase:!0}),s=new Map;e.forEach((e=>{a.indexObject(e.id,this.appUsersManager.getUserSearchText(e.id)),s.set(e.id,e.rating)}));const n=Array.from(a.search(t));return n.sort(((e,t)=>s.get(t)-s.get(e))),n};let n;return n=this.appChatsManager.isChannel(e)?Promise.resolve(this.getChannelParticipants(e,{_:"channelParticipantsMentions",q:t,top_msg_id:(0,oe.Z)(a)},50,0)).then((e=>e.participants.map((e=>(0,xe.Z)(e))))):e?Promise.resolve(this.getChatFull(e)).then((e=>e.participants.participants.map((e=>e.user_id.toPeerId())))):Promise.resolve([]),Promise.all([this.appUsersManager.getTopPeers("bots_inline").catch((()=>[])),n]).then((e=>{const t=e[0].concat(e[1].map((e=>({id:e,rating:0}))));return s(t)}))}invalidateChannelParticipants(e){this.apiManager.clearCache("channels.getParticipants",(t=>t.channel.channel_id===e)),this.refreshFullPeer(e.toPeerId(!0))}refreshFullPeer(e){if(e.isUser()){const t=e.toUserId();delete this.usersFull[t],this.rootScope.dispatchEvent("user_full_update",t)}else{const t=e.toChatId();delete this.chatsFull[t],this.rootScope.dispatchEvent("chat_full_update",t)}}updateProfile(e,t,a){return this.apiManager.invokeApi("account.updateProfile",{first_name:e,last_name:t,about:a}).then((e=>{if(this.appUsersManager.saveApiUser(e),void 0!==a){const t=e.id.toPeerId(),s=this.usersFull[e.id];s&&(s.about=a),this.rootScope.dispatchEvent("peer_bio_edit",t)}return this.getProfile(e.id,!0)}))}uploadProfilePhoto(e){return this.apiManager.invokeApi("photos.uploadProfilePhoto",{file:e}).then((e=>{const t=e.photo;if(!e.users.length){const a=t.sizes.find((e=>"photoStrippedSize"===e._));e.users.push(Object.assign(Object.assign({},this.appUsersManager.getSelf()),{photo:{_:"userProfilePhoto",dc_id:t.dc_id,photo_id:t.id,stripped_thumb:null==a?void 0:a.bytes,pFlags:{}}}))}this.appUsersManager.saveApiUsers(e.users);const a=this.appPeersManager.peerId;this.appPhotosManager.savePhoto(e.photo,{type:"profilePhoto",peerId:a});const s=a.toUserId();this.apiUpdatesManager.processLocalUpdate({_:"updateUser",user_id:s})}))}deletePhotos(e){return this.apiManager.invokeApiSingle("photos.deletePhotos",{id:e.map((e=>kt(this.appPhotosManager.getPhoto(e))))}).then((e=>{}))}verifyParticipantForOnlineCount(e){const t=this.appUsersManager.getUser(e.user_id);return!(!t||!t.status||"userStatusOnline"!==t.status._)}reduceParticipantsForOnlineCount(e){return e.reduce(((e,t)=>e+ +this.verifyParticipantForOnlineCount(t)),0)}getOnlines(e){var t;return ha(this,void 0,void 0,(function*(){if(this.appChatsManager.isBroadcast(e))return 1;const a=yield this.getChatFull(e);if(this.appChatsManager.isMegagroup(e)){if(a.participants_count<=100){const t=yield this.getChannelParticipants(e,{_:"channelParticipantsRecent"},100);return this.reduceParticipantsForOnlineCount(t.participants)}const s=yield this.apiManager.invokeApiCacheable("messages.getOnlines",{peer:this.appChatsManager.getChannelInputPeer(e)},{cacheSeconds:60});return null!==(t=s.onlines)&&void 0!==t?t:1}const s=a.participants;return(null==s?void 0:s.participants)?this.reduceParticipantsForOnlineCount(s.participants):1}))}getTypingsKey(e,t){return e+(t?`_${t}`:"")}getPeerTypings(e,t){return this.typingsInPeer[this.getTypingsKey(e,t)]}canGiftPremium(e){var t;const a=this.appUsersManager.getUser(e);return!(null===(t=null==a?void 0:a.pFlags)||void 0===t?void 0:t.premium)&&(0,q.Z)(this.getProfile(e),(t=>{var a;const s=this.appUsersManager.getUser(e);return!!t.premium_gifts&&!(null===(a=null==s?void 0:s.pFlags)||void 0===a?void 0:a.premium)}))}}function _a(e,t){return e.some((e=>e instanceof Promise))?Promise.all(e).then(t):t(e)}var va=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const Pa=["static_icon","appear_animation","select_animation","activate_animation","effect_animation","around_animation","center_icon"],ba={type:"reactions"};class Ma extends G{after(){this.rootScope.addEventListener("language_change",(()=>{this.availableReactions=void 0,this.getAvailableReactions()})),this.sendReactionPromises=new Map,this.lastSendingTimes=new Map,this.rootScope.addEventListener("user_auth",(()=>{setTimeout((()=>{Promise.resolve(this.getAvailableReactions()).then((e=>va(this,void 0,void 0,(function*(){for(let t=0,a=e.length;t<a;++t){const a=e[t];if(yield Promise.all([a.around_animation&&this.apiFileManager.downloadMedia({media:a.around_animation}),a.static_icon&&this.apiFileManager.downloadMedia({media:a.static_icon}),a.appear_animation&&this.apiFileManager.downloadMedia({media:a.appear_animation}),a.center_icon&&this.apiFileManager.downloadMedia({media:a.center_icon})]),t>15)break;yield(0,P.Z)(1e3)}}))))}),7500)}))}getAvailableReactions(){return this.availableReactions?this.availableReactions:this.apiManager.invokeApiSingleProcess({method:"messages.getAvailableReactions",processResult:e=>{(0,ue.Z)(e);const t=this.availableReactions=e.reactions;for(const e of t)for(const t of Pa)e[t]&&(e[t]=this.appDocsManager.saveDoc(e[t],ba));return t},params:{hash:0}})}getActiveAvailableReactions(){return(0,q.Z)(this.getAvailableReactions(),(e=>e.filter((e=>!e.pFlags.inactive))))}getAvailableReactionsForPeer(e){const t=this.getActiveAvailableReactions();return e.isUser()?this.unshiftQuickReaction(t):_a([t,this.appProfileManager.getChatFull(e.toChatId()),this.getQuickReaction()],(([e,t,a])=>{var s;const n=null!==(s=t.available_reactions)&&void 0!==s?s:{_:"chatReactionsNone"};let i=[];return"chatReactionsAll"===n._?i=e:"chatReactionsSome"===n._&&(i=n.reactions.map((t=>e.find((e=>e.reaction===t.emoticon)))).filter(Boolean)),this.unshiftQuickReactionInner(i,a)}))}unshiftQuickReactionInner(e,t){if(t&&"reactionEmoji"!==t._&&"availableReaction"!==t._)return e;const a=t.emoticon||t.reaction,s=(0,Pe.Z)(e,(e=>e.reaction===a));return s&&e.unshift(s),e}unshiftQuickReaction(e,t=this.getQuickReaction()){return _a([e,t],(([e,t])=>this.unshiftQuickReactionInner(e,t)))}getAvailableReactionsByMessage(e){var t;if(!e)return[];const a=(null===(t=e.fwd_from)||void 0===t?void 0:t.channel_post)&&this.appPeersManager.isMegagroup(e.peerId)&&e.fwdFromId||e.peerId;return this.getAvailableReactionsForPeer(a)}isReactionActive(e){return!!this.availableReactions&&!!this.availableReactions.find((t=>t.reaction===e))}getQuickReaction(){return _a([this.apiManager.getConfig(),this.getAvailableReactions()],(([e,t])=>{const a=e.reactions_default;return"reactionEmoji"===(null==a?void 0:a._)?t.find((e=>e.reaction===a.emoticon)):a}))}getReactionCached(e){return this.availableReactions.find((t=>t.reaction===e))}getReaction(e){return(0,q.Z)(this.getAvailableReactions(),(()=>this.getReactionCached(e)))}getMessagesReactions(e,t){return this.apiManager.invokeApiSingleProcess({method:"messages.getMessagesReactions",params:{id:t.map((e=>(0,oe.Z)(e))),peer:this.appPeersManager.getInputPeerById(e)},processResult:e=>{this.apiUpdatesManager.processUpdateMessage(e)}})}getMessageReactionsList(e,t,a,s,n){return this.apiManager.invokeApiSingleProcess({method:"messages.getMessageReactionsList",params:{peer:this.appPeersManager.getInputPeerById(e),id:(0,oe.Z)(t),limit:a,reaction:s,offset:n},processResult:e=>(this.appUsersManager.saveApiUsers(e.users),e)})}setDefaultReaction(e){return this.apiManager.invokeApi("messages.setDefaultReaction",{reaction:e}).then((t=>va(this,void 0,void 0,(function*(){if(t){const t=yield this.apiManager.getConfig();t&&(t.reactions_default=e),this.rootScope.dispatchEvent("quick_reaction",e)}return t}))))}sendReaction(e,t,a){var s,n;return va(this,void 0,void 0,(function*(){"availableReaction"===t._&&(t={_:"reactionEmoji",emoticon:t.reaction});const i=yield this.apiManager.getLimit("reactions"),r=e.peerId+"_"+e.mid;if(this.lastSendingTimes.get(r))return;this.lastSendingTimes.set(r,Date.now()),setTimeout((()=>{this.lastSendingTimes.delete(r)}),333);const{peerId:o,mid:p}=e,d=this.appPeersManager.peerId,f=e=>{--e.count,delete e.chosen_order,(0,$t.Z)(t,e.reaction)&&(t=void 0),e.count||(0,M.Z)(l.results,e),l.recent_reactions&&(0,Pe.Z)(l.recent_reactions,(t=>(0,$t.Z)(t.reaction,e.reaction)&&this.appPeersManager.getPeerId(t.peer_id)===d)),l.results.length||(l=void 0)},c=(null===(n=null===(s=e.reactions)||void 0===s?void 0:s.pFlags)||void 0===n?void 0:n.can_see_list)||!this.appPeersManager.isBroadcast(e.peerId)||e.peerId.isUser();e.reactions||(e.reactions={_:"messageReactions",results:[],recent_reactions:c?[]:void 0,pFlags:{can_see_list:c||void 0}});let l=a?e.reactions:(0,ve.Z)(e.reactions);const m=l.results.filter((e=>void 0!==e.chosen_order));m.sort(((e,t)=>t.chosen_order-e.chosen_order));const g=[],h=m.findIndex((e=>(0,$t.Z)(e.reaction,t)));-1!==h&&g.push(...m.splice(h,1)),g.push(...m.splice(i-+(-1===h))),g.forEach((e=>{m.forEach((t=>{t.chosen_order>e.chosen_order&&--t.chosen_order})),f(e)}));const u=m.length;if(m.forEach(((e,t)=>{e.chosen_order=u-1-t})),t){l||(l={_:"messageReactions",results:[],pFlags:{}},c&&(l.pFlags.can_see_list=!0));let e=l.results.findIndex((e=>(0,$t.Z)(e.reaction,t))),a=-1!==e&&l.results[e];if(a||(a={_:"reactionCount",count:0,reaction:t},e=l.results.push(a)-1),++a.count,a.chosen_order=m.length?m[0].chosen_order+1:0,m.unshift(a),!l.recent_reactions&&c&&(l.recent_reactions=[]),l.recent_reactions){const e={_:"messagePeerReaction",reaction:t,peer_id:this.appPeersManager.getOutputPeer(d),pFlags:{},date:(0,te.Z)(!0)};this.appPeersManager.isMegagroup(o),l.recent_reactions.unshift(e),l.recent_reactions=l.recent_reactions.slice(0,3)}}const y=this.availableReactions;if(l&&(null==y?void 0:y.length)){const e=new Map;y.forEach(((t,a)=>{e.set(t.reaction,a)})),l.results.sort(((t,a)=>{var s,n;const i=t.reaction.document_id||t.reaction.emoticon,r=a.reaction.document_id||a.reaction.emoticon;return a.count-t.count||(null!==(s=e.get(i))&&void 0!==s?s:0)-(null!==(n=e.get(r))&&void 0!==n?n:0)}))}if(a)return e.reactions=l,this.rootScope.dispatchEvent("messages_reactions",[{message:e,changedResults:[]}]),Promise.resolve();this.apiUpdatesManager.processLocalUpdate({_:"updateMessageReactions",peer:e.peer_id,msg_id:e.id,reactions:l,local:!0});const _=[o,p].join("-"),v=(0,oe.Z)(p),P=this.apiManager.invokeApi("messages.sendReaction",{peer:this.appPeersManager.getInputPeerById(o),msg_id:v,reaction:m.map((e=>e.reaction))}).then((e=>{(0,ue.Z)(e);const t=e.updates.findIndex((e=>"updateEditMessage"===e._||"updateEditChannelMessage"===e._));if(-1!==t){const a=e.updates[t];e.updates[t]={_:"updateMessageReactions",msg_id:v,peer:this.appPeersManager.getOutputPeer(o),reactions:a.message.reactions,pts:a.pts,pts_count:a.pts_count}}this.apiUpdatesManager.processUpdateMessage(e)})).catch((t=>{var a;"REACTION_INVALID"===t.type&&this.sendReactionPromises.get(_)===P&&this.sendReaction(e,null===(a=m[0])||void 0===a?void 0:a.reaction,!0)})).finally((()=>{this.sendReactionPromises.get(_)===P&&this.sendReactionPromises.delete(_)}));return this.sendReactionPromises.set(_,P),P}))}}var Sa=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const Ia={EMOJI:"inputStickerSetAnimatedEmoji",EMOJI_ANIMATIONS:"inputStickerSetAnimatedEmojiAnimations",PREMIUM_GIFTS:"inputStickerSetPremiumGifts",GENERIC_ANIMATIONS:"inputStickerSetEmojiGenericAnimations",DEFAULT_STATUSES:"inputStickerSetEmojiDefaultStatuses",DEFAULT_TOPIC_ICONS:"inputStickerSetEmojiDefaultTopicIcons"},Ca=new Set(Object.values(Ia));class wa extends G{constructor(){super(...arguments),this.storage=new W.Z(H.Z,"stickerSets"),this.clear=e=>{this.getStickerSetPromises={},this.getStickersByEmoticonsPromises={},this.sounds={},this.names={}},this.processAllStickersResult=e=>((0,ue.Z)(e),(0,ne.Z)(e.sets,((e,t,a)=>{e.pFlags.videos&&!i().IS_WEBM_SUPPORTED&&a.splice(t,1)})),e)}after(){this.clear(!0),this.rootScope.addEventListener("user_auth",(()=>{var e;setTimeout((()=>{this.getAnimatedEmojiStickerSet()}),1e3),this.getGreetingStickersPromise||null!==(e=this.getGreetingStickersTimeout)&&void 0!==e||(this.getGreetingStickersTimeout=T.Z.setTimeout((()=>{this.getGreetingStickersTimeout=void 0,this.getGreetingSticker(!0)}),5e3))})),this.rootScope.addEventListener("app_config",(()=>this.onStickersUpdated("faved",!0))),this.apiUpdatesManager.addMultipleEventsListeners({updateNewStickerSet:e=>{const t=e.stickerset;this.saveStickerSet(t,t.set.id),this.rootScope.dispatchEvent("stickers_installed",t.set)},updateRecentStickers:()=>this.onStickersUpdated("recent",!0),updateFavedStickers:()=>this.onStickersUpdated("faved",!0),updateMoveStickerSetToTop:e=>{this.rootScope.dispatchEvent("stickers_top",e.stickerset)},updateStickerSetsOrder:e=>{this.rootScope.dispatchEvent("stickers_order",{type:e.pFlags.emojis?"emojis":e.pFlags.masks?"masks":"stickers",order:e.order})}})}onStickersUpdated(e,t){return Sa(this,void 0,void 0,(function*(){const a=yield"faved"===e?this.getFavedStickersStickers(t):this.getRecentStickersStickers(t);this.rootScope.dispatchEvent("stickers_updated",{type:e,stickers:a})}))}getGreetingSticker(e=!1){return this.getGreetingStickersTimeout&&(clearTimeout(this.getGreetingStickersTimeout),this.getGreetingStickersTimeout=void 0),this.getGreetingStickersPromise||(this.getGreetingStickersPromise=this.getStickersByEmoticon("👋âï¸",!1).then((e=>{if(!e.length)throw"NO_STICKERS";this.greetingStickers=e.slice(),this.greetingStickers.sort(((e,t)=>Math.random()-Math.random()))}))),this.getGreetingStickersPromise.then((()=>{let t;return e||(t=this.greetingStickers.shift(),this.greetingStickers.push(t)),this.apiFileManager.downloadMedia({media:this.greetingStickers[0]}),t}))}saveStickers(e){(0,ne.Z)(e,((t,a)=>{(t=this.appDocsManager.saveDoc(t))?e[a]=t:e.splice(a,1)}))}canUseStickerSetCache(e,t){var a;return e&&(null===(a=e.documents)||void 0===a?void 0:a.length)&&(Date.now()-e.refreshTime<36e5||t)}getStickerSet(e,t={}){let{id:a}=e;if(e.access_hash||(e=this.names[a]||e,a=e.id),this.getStickerSetPromises[a])return this.getStickerSetPromises[a];if(!t.overwrite){const e=this.storage.getFromCache(a);if(this.canUseStickerSetCache(e,t.useCache))return e}const s=this.getStickerSetPromises[a]=new Promise((n=>Sa(this,void 0,void 0,(function*(){if(!t.overwrite){const e=yield this.storage.get(a);if(this.canUseStickerSetCache(e,t.useCache))return this.saveStickers(e.documents),n(e),void(this.getStickerSetPromises[a]===s&&delete this.getStickerSetPromises[a])}try{const s=yield this.apiManager.invokeApi("messages.getStickerSet",{stickerset:this.getStickerSetInput(e),hash:0}),i=t.saveById?a:s.set.id;this.saveStickerSet(s,i),n(s)}catch(e){n(null)}this.getStickerSetPromises[a]===s&&delete this.getStickerSetPromises[a]}))));return s}getLocalStickerSet(e){return this.getStickerSet({id:e},{saveById:!0})}getAnimatedEmojiStickerSet(){return Promise.all([this.getLocalStickerSet(Ia.EMOJI),this.getLocalStickerSet(Ia.EMOJI_ANIMATIONS),this.getAnimatedEmojiSounds()]).then((([e,t])=>({emoji:e,animations:t})))}getAnimatedEmojiSounds(e){if(this.getAnimatedEmojiSoundsPromise&&!e)return this.getAnimatedEmojiSoundsPromise;const t=this.getAnimatedEmojiSoundsPromise=Promise.all([this.apiManager.getAppConfig(e),this.apiManager.getConfig()]).then((([e,a])=>{if(this.getAnimatedEmojiSoundsPromise===t)for(const t in e.emojies_sounds){const s=e.emojies_sounds[t],n=atob(s.file_reference_base64.replace(/-/g,"+").replace(/_/g,"/")),i=new Uint8Array(n.length);for(let e=0,t=i.length;e<t;++e)i[e]=n[e].charCodeAt(0);const r=this.appDocsManager.saveDoc({_:"document",pFlags:{},flags:0,id:s.id,access_hash:s.access_hash,attributes:[{_:"documentAttributeAudio",duration:1,pFlags:{voice:!0}}],date:0,dc_id:a.this_dc,file_reference:i,mime_type:"audio/ogg"},{type:"emojiesSounds"});this.sounds[t]=r}}));return t}getRecentStickers(e){return Sa(this,void 0,void 0,(function*(){return yield this.apiManager.invokeApiHashable({method:"messages.getRecentStickers",processResult:e=>((0,ue.Z)(e),this.recentStickers=e.stickers,this.saveStickers(e.stickers),e),overwrite:e})}))}getRecentStickersStickers(e){if(e)this.recentStickers=void 0;else if(this.recentStickers)return this.recentStickers;return this.getRecentStickers(e).then((()=>this.recentStickers))}saveRecentSticker(e,t,a){const s=this.appDocsManager.getDoc(e);if((0,Pe.Z)(this.recentStickers,(t=>t.id===e)),!t){this.recentStickers.unshift(s);const e=(0,Mt.Z)(s.stickerEmojiRaw);for(const t in this.getStickersByEmoticonsPromises)this.getStickersByEmoticonsPromises[t].then((a=>{const n=(0,Pe.Z)(a,(e=>e.id===s.id));n?a.unshift(n):t.includes(e)&&a.unshift(s)}))}return this.rootScope.dispatchEvent("sticker_updated",{type:"recent",faved:!t,document:s}),t&&this.onStickersUpdated("recent",!1),this.apiManager.invokeApi("messages.saveRecentSticker",{id:Jt(s),unsave:t,attached:a})}cleanEmoji(e){return e.replace(/\ufe0f/g,"").replace(/ðŸ»|ðŸ¼|ðŸ½|ðŸ¾|ðŸ¿/g,"")}getAnimatedEmojiSticker(e,t){const a=t?Ia.EMOJI_ANIMATIONS:Ia.EMOJI,s=this.storage.getFromCache(a);if(!(null==s?void 0:s.documents))return;t&&["🧡","💛","💚","💙","💜","🖤","ðŸ¤","🤎"].includes(e)&&(e="â¤ï¸"),e=this.cleanEmoji(e);const n=s.packs.find((t=>t.emoticon===e));return n?this.appDocsManager.getDoc(n.documents[0]):void 0}getAnimatedEmojiSoundDocument(e){return this.sounds[this.cleanEmoji(e)]}preloadAnimatedEmojiSticker(e){const t=this.getAnimatedEmojiStickerSet().then((()=>this.getAnimatedEmojiSticker(e)));return Promise.all([t,this.preloadAnimatedEmojiStickerAnimation(e)]).then((([e,t])=>({doc:e,animation:null==t?void 0:t.doc,sound:null==t?void 0:t.sound})))}preloadAnimatedEmojiStickerAnimation(e){return this.getAnimatedEmojiStickerSet().then((()=>this.getAnimatedEmojiSticker(e,!0))).then((t=>{if(!t)return;const a=this.getAnimatedEmojiSoundDocument(e);return Promise.all([this.preloadSticker(t.id),a?this.preloadSticker(a.id):void 0]).then((()=>({doc:t,sound:a})))}))}preloadSticker(e,t){var a;const s=this.appDocsManager.getDoc(e);return this.apiFileManager.downloadMedia({media:s,thumb:t?null===(a=s.video_thumbs)||void 0===a?void 0:a[0]:void 0})}saveStickerSet(e,t){const a={_:"messages.stickerSet",set:e.set,packs:e.packs,documents:e.documents,keywords:e.keywords};let s=this.storage.getFromCache(t);s?Object.assign(s,a):s=this.storage.setToCache(t,a),s.set.short_name&&(this.names[s.set.short_name]=this.getStickerSetInput(a.set)),this.saveStickers(e.documents);const n=s.set.installed_date||Ca.has(t);s.refreshTime=Date.now(),this.storage.set({[t]:s},!n)}getStickerSetThumbDownloadOptions(e){var t;const a=e.thumbs.find((e=>"photoSize"===e._)),s=e.thumb_dc_id,n=null===(t=e.pFlags)||void 0===t?void 0:t.animated;return{dcId:s,location:{_:"inputStickerSetThumb",stickerset:this.getStickerSetInput(e),thumb_version:e.thumb_version},size:a.size,mimeType:n?"application/x-tgsticker":"image/webp"}}getStickerSetInput(e){return Ca.has(e.id)?{_:e.id}:e.access_hash?{_:"inputStickerSetID",id:e.id,access_hash:e.access_hash}:{_:"inputStickerSetShortName",short_name:""+e.id}}getFeaturedStickers(){return Sa(this,void 0,void 0,(function*(){return(yield this.apiManager.invokeApiHashable({method:"messages.getFeaturedStickers",processResult:e=>((0,ue.Z)(e),(0,ne.Z)(e.sets,((e,t,a)=>{e.set.pFlags.videos&&!i().IS_WEBM_SUPPORTED&&a.splice(t,1)})),e.sets.forEach((e=>{this.saveStickerSet({set:e.set,documents:[],packs:[],keywords:[]},e.set.id)})),e)})).sets}))}getPromoPremiumStickers(){return this.getStickersByEmoticon("âï¸âï¸",!1)}getPremiumStickers(){return this.getStickersByEmoticon("📂âï¸",!1)}getFavedStickers(e){return this.apiManager.invokeApiHashable({method:"messages.getFavedStickers",processResult:e=>((0,ue.Z)(e),this.saveStickers(e.stickers),this.favedStickers=e.stickers,e),overwrite:e})}getFavedStickersStickers(e){if(e)this.favedStickers=void 0;else if(this.favedStickers)return this.favedStickers;return this.getFavedStickers(e).then((()=>this.favedStickers))}getFavedStickersLimit(){return this.apiManager.getLimit("favedStickers")}faveSticker(e,t){return Sa(this,void 0,void 0,(function*(){this.favedStickers||(yield this.getFavedStickersStickers());const a=yield this.getFavedStickersLimit(),s=this.appDocsManager.getDoc(e);return(0,Pe.Z)(this.favedStickers,(e=>e.id===s.id)),t||(this.favedStickers.unshift(s),this.favedStickers.splice(a,this.favedStickers.length-a)),this.rootScope.dispatchEvent("sticker_updated",{type:"faved",faved:!t,document:s}),this.apiManager.invokeApi("messages.faveSticker",{id:Jt(s),unfave:t}).then((()=>{t&&this.onStickersUpdated("faved",!0)}))}))}toggleStickerSet(e){return Sa(this,void 0,void 0,(function*(){if((e=this.storage.getFromCache(e.id).set).installed_date){if(yield this.apiManager.invokeApi("messages.uninstallStickerSet",{stickerset:this.getStickerSetInput(e)}))return delete e.installed_date,this.rootScope.dispatchEvent("stickers_deleted",e),this.storage.delete(e.id,!0),!0}else if(yield this.apiManager.invokeApi("messages.installStickerSet",{stickerset:this.getStickerSetInput(e),archived:!1}))return e.installed_date=(0,te.Z)(!0),this.rootScope.dispatchEvent("stickers_installed",e),!0;return!1}))}toggleStickerSets(e){return Promise.all(e.map((e=>this.toggleStickerSet(e))))}searchStickerSets(e,t=!0){return Sa(this,void 0,void 0,(function*(){const a=t?1:0,s=yield this.apiManager.invokeApiHashable({method:"messages.searchStickerSets",params:{flags:a,exclude_featured:t||void 0,q:e},processResult:e=>((0,ue.Z)(e),(0,ne.Z)(e.sets,((e,t,a)=>{e.set.pFlags.videos&&!i().IS_WEBM_SUPPORTED&&a.splice(t,1)})),e.sets.forEach((e=>{this.saveStickerSet({set:e.set,documents:[],packs:[],keywords:[]},e.set.id)})),e)}),n=[],r=this.storage.getCache();for(const t in r){const{set:a}=r[t];a.title.toLowerCase().includes(e.toLowerCase())&&!s.sets.find((e=>e.set.id===a.id))&&n.push({_:"stickerSetCovered",set:a,cover:null})}return s.sets.concat(n)}))}getAllStickers(){return this.apiManager.invokeApiHashable({method:"messages.getAllStickers",processResult:this.processAllStickersResult})}getEmojiStickers(){return this.apiManager.invokeApiHashable({method:"messages.getEmojiStickers",processResult:this.processAllStickersResult})}preloadStickerSets(){return this.getAllStickers().then((e=>{const t=e.sets;return Promise.all(t.map((e=>this.getStickerSet(e,{useCache:!0}))))}))}getStickersByEmoticon(e,t=!0,a=!0){const s=(e=(0,Mt.Z)(e))+(t?"1":"0")+(a?"1":"0");return this.getStickersByEmoticonsPromises[s]?this.getStickersByEmoticonsPromises[s]:this.getStickersByEmoticonsPromises[s]=Promise.all([a?this.apiManager.invokeApiHashable({method:"messages.getStickers",params:{emoticon:e},processResult:e=>e}):void 0,t?this.preloadStickerSets():[],t?this.getRecentStickers():void 0]).then((([t,a,s])=>{const n=t?t.stickers.map((e=>this.appDocsManager.saveDoc(e))):[],r=[],o=[],p=t=>{for(const a of t)if((0,Mt.Z)(a.emoticon).includes(e))for(const e of a.documents){const t=this.appDocsManager.getDoc(e);(t.animated?r:o).push(t)}};if(s){p(s.packs);const e=s.stickers;[r,o].forEach((t=>{t.sort(((t,a)=>e.indexOf(t)-e.indexOf(a)))}))}for(const e of a)p(e.packs);const d=[...new Set(r.concat(o,n))];return(0,ne.Z)(d,((e,t,a)=>{(3===e.sticker&&!i().IS_WEBM_SUPPORTED||!this.rootScope.premium&&(0,Kt.Z)(e))&&a.splice(t,1)})),d}))}clearRecentStickers(){return this.recentStickers&&(this.recentStickers.length=0,this.onStickersUpdated("recent",!1)),this.apiManager.invokeApi("messages.clearRecentStickers")}reorderStickerSets(e,t,a){return this.apiManager.invokeApi("messages.reorderStickerSets",{emojis:t,masks:a,order:e}).then((()=>{this.apiUpdatesManager.processLocalUpdate({_:"updateStickerSetsOrder",order:e,pFlags:{emojis:t||void 0,masks:a||void 0}})}))}}var ka=a(467),Aa=a(8493);class Ua extends G{constructor(){super(...arguments),this.clear=(e=!1)=>{if(e)this.users={},this.usernames={};else for(const e in this.users){if(!e)continue;const t=e.toPeerId();if(!this.peersStorage.isPeerNeeded(t)){const t=this.users[e];this.modifyUsernamesCache(t,!1),this.storage.delete(e),delete this.users[e]}}this.getTopPeersPromises={},this.contactsIndex=this.createSearchIndex(),this.contactsFillPromise=void 0,this.contactsList=new Set,this.updatedContactsList=!1},this.updateUsersStatuses=()=>{const e=(0,te.Z)(!0);for(const t in this.users){const a=this.users[t];this.updateUserStatus(a,e)}}}after(){return this.clear(!0),setInterval(this.updateUsersStatuses,6e4),this.rootScope.addEventListener("state_synchronized",this.updateUsersStatuses),this.apiUpdatesManager.addMultipleEventsListeners({updateUserStatus:e=>{const t=e.user_id,a=this.users[t];a&&(a.status=e.status,a.status&&("expires"in a.status&&(a.status.expires-=this.timeManager.getServerTimeOffset()),"was_online"in a.status&&(a.status.was_online-=this.timeManager.getServerTimeOffset())),this.rootScope.dispatchEvent("user_update",t),this.setUserToStateIfNeeded(a))},updateUserName:e=>{const t=e.user_id,a=this.users[t];a&&(this.forceUserOnline(t),this.saveApiUser(Object.assign(Object.assign({},a),{first_name:e.first_name,last_name:e.last_name,username:void 0,usernames:e.usernames}),!0))}}),this.rootScope.addEventListener("language_change",(e=>{const t=this.getSelf().id;this.contactsIndex.indexObject(t,this.getUserSearchText(t))})),Promise.all([this.appStateManager.getState(),this.appStoragesManager.loadStorage("users")]).then((([e,{results:t,storage:a}])=>{this.storage=a,this.saveApiUsers(t);for(let a=0,s=t.length;a<s;++a){const s=t[a];s&&e.contactsListCachedTime&&(s.pFlags.contact||s.pFlags.mutual_contact)&&(this.pushContact(s.id),this.contactsFillPromise||(this.contactsFillPromise=(0,v.Z)(),this.contactsFillPromise.resolve(this.contactsList)))}const s=e.recentSearch||[];for(let e=0,t=s.length;e<t;++e)this.peersStorage.requestPeer(s[e],"recentSearch");this.peersStorage.addEventListener("peerNeeded",(e=>{if(!this.appPeersManager.isUser(e))return;const t=e.toUserId();this.storage.getFromCache(t)||this.storage.set({[t]:this.getUser(t)})})),this.peersStorage.addEventListener("peerUnneeded",(e=>{if(!this.appPeersManager.isUser(e))return;const t=e.toUserId();this.storage.getFromCache(t)&&this.storage.delete(t)}))}))}get userId(){return this.rootScope.myId.toUserId()}onContactsModified(e){e&&this.appStateManager.pushToState("contactsListCachedTime",(0,te.Z)(!0))}pushRecentSearch(e){return this.appStateManager.getState().then((t=>{const a=t.recentSearch||[];if(a[0]!==e){(0,M.Z)(a,e),a.unshift(e),a.length>20&&(a.length=20),this.appStateManager.pushToState("recentSearch",a);for(const e of a)this.peersStorage.requestPeer(e,"recentSearch")}}))}clearRecentSearch(){return this.appStateManager.getState().then((e=>{const t=e.recentSearch||[];for(const e of t)this.peersStorage.releasePeer(e,"recentSearch");t.length=0,this.appStateManager.pushToState("recentSearch",t)}))}fillContacts(){var e;if(this.contactsFillPromise&&this.updatedContactsList)return{cached:this.contactsFillPromise.isFulfilled,promise:this.contactsFillPromise};this.updatedContactsList=!0;const t=(0,v.Z)();return this.apiManager.invokeApi("contacts.getContacts").then((e=>{"contacts.contacts"===e._&&(this.contactsList.clear(),this.saveApiUsers(e.users),e.contacts.forEach((e=>{this.pushContact(e.user_id)})),this.onContactsModified(!0),this.contactsFillPromise=t),t.resolve(this.contactsList)}),(()=>{this.updatedContactsList=!1})),{cached:null===(e=this.contactsFillPromise)||void 0===e?void 0:e.isFulfilled,promise:this.contactsFillPromise||(this.contactsFillPromise=t)}}resolveUsername(e){"@"===e[0]&&(e=e.slice(1)),e=e.toLowerCase();const t=this.usernames[e];return t?this.appPeersManager.getPeer(t):this.apiManager.invokeApiSingleProcess({method:"contacts.resolveUsername",params:{username:e},processResult:e=>this.processResolvedPeer(e)})}resolveUserByUsername(e){return(0,q.Z)(this.resolveUsername(e),(e=>"user"===(null==e?void 0:e._)?e:void 0))}processResolvedPeer(e){return this.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),this.appPeersManager.getPeer((0,le.Z)(e.peer))}resolvePhone(e){return this.apiManager.invokeApi("contacts.resolvePhone",{phone:e}).then((e=>this.processResolvedPeer(e)))}pushContact(e){this.contactsList.add(e),this.contactsIndex.indexObject(e,this.getUserSearchText(e)),this.peersStorage.requestPeer(e.toPeerId(),"contact")}popContact(e){this.contactsList.delete(e),this.contactsIndex.indexObject(e,""),this.peersStorage.releasePeer(e.toPeerId(),"contact")}getUserSearchText(e){const t=this.users[e];return t?[t.first_name,t.last_name,t.phone,...(0,Qt.Z)(t),t.pFlags.self?"Saved Messages":""].filter(Boolean).join(" "):""}getContacts(e,t=!1,a="name"){return this.fillContacts().promise.then((s=>{let n=[...s];if(e){const t=this.contactsIndex.search(e);n=[...n].filter((e=>t.has(e)))}"name"===a?n.sort(((e,t)=>{const a=(this.users[e]||{}).sortName||"",s=(this.users[t]||{}).sortName||"";return a.localeCompare(s)})):"online"===a&&n.sort(((e,t)=>{const a=this.getUserStatusForSort(this.getUser(e).status);return this.getUserStatusForSort(this.getUser(t).status)-a}));const i=this.userId;return(0,M.Z)(n,i),t&&this.testSelfSearch(e)&&n.unshift(i),n}))}getContactsPeerIds(e,t,a,s){return this.getContacts(e,t,a).then((e=>{const t=e.map((e=>e.toPeerId(!1)));return s?t.slice(0,s):t}))}toggleBlock(e,t){return this.apiManager.invokeApiSingle(t?"contacts.block":"contacts.unblock",{id:this.appPeersManager.getInputPeerById(e)}).then((a=>(a&&this.apiUpdatesManager.processLocalUpdate({_:"updatePeerBlocked",peer_id:this.appPeersManager.getOutputPeer(e),blocked:t}),a)))}testSelfSearch(e){const t=this.getSelf(),a=this.createSearchIndex();return a.indexObject(t.id,this.getUserSearchText(t.id)),a.search(e).has(t.id)}createSearchIndex(){return new ae.Z({clearBadChars:!0,ignoreCase:!0,latinize:!0,includeTag:!0})}saveApiUsers(e,t){e.saved||(e.saved=!0,e.forEach((e=>this.saveApiUser(e,t))))}modifyUsernamesCache(e,t){const a=(0,Qt.Z)(e);if(!a.length)return;const s=a.map((e=>function(e){return e&&e.toLowerCase()||""}(e)));t?s.forEach((t=>{this.usernames[t]=e.id.toPeerId("user"!==e._)})):s.forEach((e=>{delete this.usernames[e]}))}setUsernameToCache(e,t){return!(t&&t.username===e.username&&(0,Y.Z)(t.usernames,e.usernames)||(this.modifyUsernamesCache(t,!1),this.modifyUsernamesCache(e,!0),0))}saveApiUser(e,t){var a,s,n,i;if(!e||"userEmpty"===e._)return;const r=e.id,o=this.users[r];if(null!==(a=e.pFlags)&&void 0!==a||(e.pFlags={}),e.pFlags.min&&void 0!==o)return;const p=this.setUsernameToCache(e,o);if(o&&void 0!==o.sortName&&o.first_name===e.first_name&&o.last_name===e.last_name)e.sortName=o.sortName;else{const t=e.first_name+(e.last_name?" "+e.last_name:"");e.sortName=e.pFlags.deleted?"":(0,ka.ZP)(t,!1)}if(e.status&&(e.status.expires&&(e.status.expires-=this.timeManager.getServerTimeOffset()),e.status.was_online&&(e.status.was_online-=this.timeManager.getServerTimeOffset())),"userProfilePhotoEmpty"===(null===(s=e.photo)||void 0===s?void 0:s._)&&delete e.photo,void 0===o)this.users[r]=e;else{const t=e.first_name!==o.first_name||e.last_name!==o.last_name||p,a=(null===(n=o.photo)||void 0===n?void 0:n.photo_id)!==(null===(i=e.photo)||void 0===i?void 0:i.photo_id),s=o.pFlags.premium!==e.pFlags.premium||o.pFlags.verified!==e.pFlags.verified||o.pFlags.scam!==e.pFlags.scam||o.pFlags.fake!==e.pFlags.fake,d=!!o.pFlags.contact,f=!!e.pFlags.contact;re(o,e),this.rootScope.dispatchEvent("user_update",r),d!==f&&this.onContactUpdated(r,f,d),a&&this.rootScope.dispatchEvent("avatar_update",{peerId:e.id.toPeerId()}),(t||s)&&this.rootScope.dispatchEvent("peer_title_edit",{peerId:e.id.toPeerId()})}this.checkPremium(e,o),this.setUserToStateIfNeeded(e)}checkPremium(e,t){if(e.pFlags.self){const a=!!e.pFlags.premium;this.rootScope.premium!==a&&this.rootScope.dispatchEvent("premium_toggle_private",{isNew:!t,isPremium:a})}}setUserToStateIfNeeded(e){this.peersStorage.isPeerNeeded(e.id.toPeerId())&&this.storage.set({[e.id]:e})}isUserOnlineVisible(e){return this.getUserStatusForSort(e)>3}getUserStatusForSort(e){if("object"!=typeof e){const t=this.getUser(e);e=null==t?void 0:t.status}if(e){const t="userStatusOnline"===e._?e.expires:"userStatusOffline"===e._?e.was_online:0;if(t)return t;switch(e._){case"userStatusRecently":return 3;case"userStatusLastWeek":return 2;case"userStatusLastMonth":return 1}}return 0}getUser(e){return(0,fe.Z)(e)?e:this.users[e]}getUserStatus(e){return this.isRegularUser(e)&&!this.users[e].pFlags.self&&this.users[e].status}getUserPhone(e){return t=this,a=void 0,n=function*(){const t=this.getUser(e);if(!(null==t?void 0:t.phone))return;const a=yield this.apiManager.getAppConfig();return{phone:t.phone,isAnonymous:a.fragment_prefixes.some((e=>t.phone.startsWith(e)))}},new((s=void 0)||(s=Promise))((function(e,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(r,o)}p((n=n.apply(t,a||[])).next())}));var t,a,s,n}getSelf(){return this.getUser(this.userId)}isBot(e){return this.users[e]&&!!this.users[e].pFlags.bot}isAttachMenuBot(e){return this.isBot(e)&&!!this.users[e].pFlags.bot_attach_menu}isContact(e){return this.contactsList.has(e)||!(!this.users[e]||!this.users[e].pFlags.contact)}isRegularUser(e){const t=this.users[e];return t&&!this.isBot(e)&&!t.pFlags.deleted&&!t.pFlags.support}isNonContactUser(e){return this.isRegularUser(e)&&!this.isContact(e)&&e!==this.userId}hasUser(e,t){const a=this.users[e];return(0,fe.Z)(a)&&(t||!a.pFlags.min)}getUserString(e){const t=this.getUser(e);return"u"+e+(t.access_hash?"_"+t.access_hash:"")}getUserInput(e){const t=this.getUser(e);return t.pFlags&&t.pFlags.self?{_:"inputUserSelf"}:{_:"inputUser",user_id:e,access_hash:t.access_hash}}getUserInputPeer(e){return{_:"inputPeerUser",user_id:e,access_hash:this.getUser(e).access_hash}}getContactMediaInput(e){const t=this.getUser(e);return{_:"inputMediaContact",first_name:t.first_name,last_name:t.last_name,phone_number:t.phone,vcard:"",user_id:e}}updateUserStatus(e,t=(0,te.Z)(!0)){e.status&&"userStatusOnline"===e.status._&&e.status.expires<t&&(e.status={_:"userStatusOffline",was_online:e.status.expires},this.rootScope.dispatchEvent("user_update",e.id),this.setUserToStateIfNeeded(e))}forceUserOnline(e,t){if(this.isBot(e))return;const a=(0,te.Z)(!0);if(t){if(a-t>=60)return}else if(this.apiUpdatesManager.updatesState.syncLoading)return;const s=this.getUser(e);!(null==s?void 0:s.status)||"userStatusOnline"===s.status._||"userStatusEmpty"===s.status._||s.pFlags.support||s.pFlags.deleted||(s.status={_:"userStatusOnline",expires:a+60},this.rootScope.dispatchEvent("user_update",e),this.setUserToStateIfNeeded(s))}importContact(e,t,a){return this.importContacts([{first_name:e,last_name:t,phones:[a]}]).then((e=>{if(!e.length){const e=new Error;throw e.type="NO_USER",e}return e[0]}))}importContacts(e){const t=[];for(let a=0;a<e.length;++a)for(let s=0;s<e[a].phones.length;++s)t.push({_:"inputPhoneContact",client_id:(a<<16|s).toString(10),phone:e[a].phones[s],first_name:e[a].first_name,last_name:e[a].last_name});return this.apiManager.invokeApi("contacts.importContacts",{contacts:t}).then((e=>(this.saveApiUsers(e.users),e.imported.map((e=>(this.onContactUpdated(e.user_id,!0),e.user_id))))))}getTopPeers(e){return this.getTopPeersPromises[e]?this.getTopPeersPromises[e]:this.getTopPeersPromises[e]=this.appStateManager.getState().then((t=>{const a=t.topPeersCache[e];return a&&a.cachedTime+864e5>Date.now()&&a.peers?a.peers:this.apiManager.invokeApi("contacts.getTopPeers",{[e]:!0,offset:0,limit:15,hash:"0"}).then((a=>{let s=[];return"contacts.topPeers"===a._&&(this.saveApiUsers(a.users),this.appChatsManager.saveApiChats(a.chats),a.categories.length&&(s=a.categories[0].peers.map((e=>{const t=(0,le.Z)(e.peer);return this.peersStorage.requestPeer(t,"topPeer"),{id:t,rating:e.rating}})))),t.topPeersCache[e]={peers:s,cachedTime:Date.now()},this.appStateManager.pushToState("topPeersCache",t.topPeersCache),s}))}))}getBlocked(e=0,t=0){return this.apiManager.invokeApiSingle("contacts.getBlocked",{offset:e,limit:t}).then((e=>(this.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),{count:"contacts.blocked"===e._?e.users.length+e.chats.length:e.count,peerIds:e.users.map((e=>e.id.toPeerId())).concat(e.chats.map((e=>e.id.toPeerId(!0))))})))}getLocated(e,t,a,s=!1,n=0){const i={_:"inputGeoPoint",lat:e,long:t,accuracy_radius:a};return this.apiManager.invokeApi("contacts.getLocated",{geo_point:i,background:s}).then((e=>(this.apiUpdatesManager.processUpdateMessage(e),e)))}searchContacts(e,t=20){const a=(0,Zt.Z)(e);if(a.length&&a[0].length===e.trim().length&&"messageEntityUrl"===a[0]._)try{const t=new URL(qe(e).url).pathname.slice(1);t&&(e=t)}catch(e){}return this.apiManager.invokeApiCacheable("contacts.search",{q:e,limit:t},{cacheSeconds:60}).then((e=>(this.saveApiUsers(e.users),this.appChatsManager.saveApiChats(e.chats),{my_results:(0,we.Z)(e.my_results.map((e=>(0,le.Z)(e)))),results:e.results.map((e=>(0,le.Z)(e)))})))}onContactUpdated(e,t,a=this.isContact(e)){t!==a&&(t?this.pushContact(e):this.popContact(e),this.onContactsModified(),this.rootScope.dispatchEvent("contacts_update",e))}updateUsername(e){return this.apiManager.invokeApi("account.updateUsername",{username:e}).then((e=>{this.saveApiUser(e)}))}setUserStatus(e,t){if(this.isBot(e))return;const a=this.users[e];if(a){const s=t?{_:"userStatusOffline",was_online:(0,te.Z)(!0)}:{_:"userStatusOnline",expires:(0,te.Z)(!0)+50};a.status=s,this.rootScope.dispatchEvent("user_update",e),this.setUserToStateIfNeeded(a)}}updateMyOnlineStatus(e){return this.setUserStatus(this.getSelf().id,e),this.apiManager.invokeApiSingle("account.updateStatus",{offline:e})}addContact(e,t,a,s,n){return this.apiManager.invokeApi("contacts.addContact",{id:this.getUserInput(e),first_name:t,last_name:a,phone:s,add_phone_privacy_exception:n}).then((t=>{this.apiUpdatesManager.processUpdateMessage(t,{override:!0}),this.onContactUpdated(e,!0)}))}deleteContacts(e){return this.apiManager.invokeApi("contacts.deleteContacts",{id:e.map((e=>this.getUserInput(e)))}).then((t=>{this.apiUpdatesManager.processUpdateMessage(t,{override:!0}),e.forEach((e=>{this.onContactUpdated(e,!1)}))}))}checkUsername(e){return this.apiManager.invokeApi("account.checkUsername",{username:e})}toggleUsername(e,t){return this.apiManager.invokeApi("account.toggleUsername",{username:e,active:t})}reorderUsernames(e){return this.apiManager.invokeApi("account.reorderUsernames",{order:e})}canSendToUser(e){return(0,Aa.Z)(this.getUser(e))}getCommonChats(e,t=100,a){return this.apiManager.invokeApiSingleProcess({method:"messages.getCommonChats",params:{user_id:this.getUserInput(e),limit:t,max_id:null!=a?a:0},processResult:e=>(this.appChatsManager.saveApiChats(e.chats),e)})}}const Da=new Set(["photo","video","gif","document"]);class Ea extends G{constructor(){super(...arguments),this.webpages={},this.pendingWebPages={}}after(){this.apiUpdatesManager.addMultipleEventsListeners({updateWebPage:e=>{this.saveWebPage(e.webpage)}})}saveWebPage(e,t,a){var s,n;if("webPageNotModified"===e._||"webPageEmpty"===e._)return;const{id:i}=e,r=this.webpages[i],o=r&&r._===e._&&r.hash==r.hash;if("webPage"===e._){"photo"===(null===(s=e.photo)||void 0===s?void 0:s._)?e.photo=this.appPhotosManager.savePhoto(e.photo,a):delete e.photo,"document"===(null===(n=e.document)||void 0===n?void 0:n._)?e.document=this.appDocsManager.saveDoc(e.document,a):("document"===e.type&&delete e.type,delete e.document);const t=e.site_name,i=e.title||e.author||t||"";t&&i===t&&delete e.site_name,Da.has(e.type)||e.description||!e.photo||(e.type="photo")}let p=this.pendingWebPages[i];if(t&&(p||(p=this.pendingWebPages[i]=new Set),p.add(t)),void 0===r?this.webpages[i]=e:re(r,e),!t&&void 0!==p&&o){const e=[];p.forEach((t=>{const[a,s,n]=t.split("_");e.push({peerId:a.toPeerId(),mid:+s,isScheduled:!!n})})),this.rootScope.dispatchEvent("webpage_updated",{id:i,msgs:e})}return e}getMessageKeyForPendingWebPage(e,t,a){return e+"_"+t+(a?"_s":"")}deleteWebPageFromPending(e,t){const a=e.id;if(!a)return;const s=this.pendingWebPages[a];s&&s.has(t)&&(s.delete(t),s.size||delete this.pendingWebPages[a])}getCachedWebPage(e){return this.webpages[e]}getWebPage(e){return this.apiManager.invokeApiHashable({method:"messages.getWebPage",processResult:e=>this.saveWebPage(e),params:{url:e}})}}var Ta=a(5936),Fa=a(3019);function Ra(e){return(0,Fa.Z)(e,"readAsArrayBuffer")}var xa=a(1243),Ba=a(7086);function Va(e){return encodeURIComponent(e).replace(/['()]/g,escape).replace(/\*/g,"%2A")}class Oa{constructor(e,t){this.serviceMessagePort=e,this.downloadId=t,this.serviceMessagePort=Ks()}write(e,t){return a=this,s=void 0,i=function*(){return this.serviceMessagePort.invoke("downloadChunk",{id:this.downloadId,chunk:e})},new((n=void 0)||(n=Promise))((function(e,t){function r(e){try{p(i.next(e))}catch(e){t(e)}}function o(e){try{p(i.throw(e))}catch(e){t(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof n?a:new n((function(e){e(a)}))).then(r,o)}p((i=i.apply(a,s||[])).next())}));var a,s,n,i}finalize(e){return this.serviceMessagePort.invoke("downloadFinalize",this.downloadId).then((()=>{}))}}class La{getFile(e){return Promise.reject((0,X.Z)("NO_ENTRY_FOUND"))}prepareWriting({fileName:e,downloadId:t,size:a}){const s=Object.assign({"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+Va(e)},a?{"Content-Length":a}:{}),n=Ks(),i=n.invoke("download",{headers:s,id:t}),r=(0,v.Z)();return r.cancel=()=>{r.reject((0,X.Z)("DOWNLOAD_CANCELED"))},r.catch((()=>{Ks().invoke("downloadCancel",t)})),i.then(r.resolve,r.reject),{deferred:r,getWriter:()=>new Oa(n,t)}}}var Na=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const Za=131072,ja=new Set(["DOWNLOAD_CANCELED","UPLOAD_CANCELED","UNKNOWN","NO_NEW_CONTEXT"]);class qa extends G{constructor(){super(...arguments),this.cacheStorage=new Ta.Z("cachedFiles"),this.downloadStorage=new La,this.downloadPromises={},this.uploadPromises={},this.downloadPulls={},this.downloadActives={},this.refreshReferencePromises={},this.log=(0,S.kg)("AFM",S.v9.Error|S.v9.Log),this.tempId=0,this.queueId=0,this.debug=b.Z.debug,this.maxUploadParts=4e3,this.maxDownloadParts=8e3,this.uncompressTGS=(e,t)=>this.cryptoWorker.invokeCrypto("gzipUncompress",e.slice().buffer,!1),this.uncompressTGV=(e,t)=>{const a=e.slice().buffer;return i().IS_FIREFOX?this.cryptoWorker.invokeCrypto("gzipUncompress",a,!0).then((e=>function(e){const t=e.indexOf("<svg");0!==t&&(e=e.slice(t));const[a,s,n,i]=e.match(/viewBox="(.+?)"/)[1].split(" ");return e.replace(/>/,` width="${n}" height="${i}">`).replace(/[^\x00-\x7F]/g,"")}(e))).then((e=>(new TextEncoder).encode(e))):this.cryptoWorker.invokeCrypto("gzipUncompress",a,!1)},this.convertWebp=(e,t)=>f.Z.getInstance().invoke("convertWebp",{fileName:t,bytes:e}),this.convertOpus=(e,t)=>f.Z.getInstance().invoke("convertOpus",{fileName:t,bytes:e})}after(){setInterval((()=>{for(const e in this.refreshReferencePromises){const{deferred:t}=this.refreshReferencePromises[e];(t.isFulfilled||t.isRejected)&&delete this.refreshReferencePromises[e]}}),18e5),this.rootScope.addEventListener("config",(e=>{this.webFileDcId=e.webfile_dc_id})),this.rootScope.addEventListener("app_config",(e=>{this.maxUploadParts=this.rootScope.premium?e.upload_max_fileparts_premium:e.upload_max_fileparts_default,this.maxDownloadParts=e.upload_max_fileparts_premium}))}downloadRequest(e,t,a,s,n=0){void 0===this.downloadPulls[e]&&(this.downloadPulls[e]=[],this.downloadActives[e]=0);const i=this.downloadPulls[e],r=new Promise(((e,r)=>{i.push({id:t,queueId:n,cb:a,deferred:{resolve:e,reject:r},activeDelta:s})}));return setTimeout((()=>{this.downloadCheck(e)}),0),r}downloadCheck(e){const t=this.downloadPulls[e],a=this.rootScope.premium?224:36;if(this.downloadActives[e]>=a||!(null==t?void 0:t.length))return!1;const s=(0,Pe.Z)(t,(e=>0===e.queueId))||(0,Pe.Z)(t,(e=>e.queueId===this.queueId))||t.shift(),n=s.activeDelta||1;this.downloadActives[e]+=n;const i=s.cb();i.then((()=>{this.downloadActives[e]-=n,this.downloadCheck(e)}),(t=>{(null==t?void 0:t.type)&&ja.has(t.type)||this.log.error("downloadCheck error:",t),this.downloadActives[e]-=n,this.downloadCheck(e)})).finally((()=>{i.then(s.deferred.resolve,s.deferred.reject)}))}setQueueId(e){this.queueId=e}getFileStorage(){return this.cacheStorage}cancelDownload(e){const t=[this.downloadPromises[e],this.uploadPromises[e]].filter(Boolean);let a=!1;for(let e=0,s=t.length;e<s;++e){const s=t[e];!s||s.isRejected||s.isFulfilled||(s.cancel(),a=!0)}return a}requestWebFilePart(e,t,a,s,n=0,i=0,r){return this.downloadRequest(e,n,(()=>Na(this,void 0,void 0,(function*(){if(null==r||r(),"url"in t){const e=t.url;if(this.isLocalWebFile(e))return fetch(e).then((e=>e.arrayBuffer())).then((t=>{const a=e.split(".").pop(),s=ht[a]||"application/octet-stream";return{_:"upload.webFile",size:t.byteLength,mime_type:s,file_type:{_:"storage.fileUnknown"},mtime:0,bytes:new Uint8Array(t)}}))}return this.apiManager.invokeApi("upload.getWebFile",{location:t,offset:a,limit:s},{dcId:e,fileDownload:!0})}))),this.getDelta(s),i)}requestFilePart(e,t,a,s,n=0,i=0,r){return this.downloadRequest(e,n,(()=>Na(this,void 0,void 0,(function*(){null==r||r();const n=()=>Na(this,void 0,void 0,(function*(){var i;null==r||r();const o=null===(i=t.file_reference)||void 0===i?void 0:i.slice();return this.apiManager.invokeApi("upload.getFile",{location:t,offset:a,limit:s},{dcId:e,fileDownload:!0}).catch((e=>{if(null==r||r(),"FILE_REFERENCE_EXPIRED"===e.type)return this.refreshReference(t,o).then(n);throw e}))}));(0,ue.Z)(t);const i=t.file_reference;if(i&&!t.checkedReference){t.checkedReference=!0;const e=E(i);if(this.refreshReferencePromises[e])return this.refreshReference(t,i).then(n)}return n()}))),this.getDelta(s),i)}getDelta(e){return e/Za}getLimitPart(e,t){if(!e)return 524288;let a=Za;const s=t?this.maxUploadParts:this.maxDownloadParts,n=t?524288:1048576;for(;e/a>s&&a<n;)a*=2;return a}refreshReference(e,t,a=E(t)){let s=this.refreshReferencePromises[a];if(!s){const e=(0,v.Z)();s=this.refreshReferencePromises[a]={deferred:e},this.referenceDatabase.refreshReference(t).then((t=>{a===E(t)&&e.reject((0,X.Z)("REFERENCE_IS_NOT_REFRESHED")),e.resolve(t)}),e.reject)}return s.deferred.then((t=>{e.file_reference=t}))}isDownloading(e){return!!this.downloadPromises[e]}getDownload(e){return this.downloadPromises[e]}getUpload(e){return this.uploadPromises[e]}getConvertMethod(e){let t;return"application/x-tgwallpattern"===e?(t=this.uncompressTGV,e="image/svg+xml"):"image/webp"!==e||i().IS_WEBP_SUPPORTED?"application/x-tgsticker"===e?(t=this.uncompressTGS,e="application/json"):"audio/ogg"!==e||i().IS_OPUS_SUPPORTED||(t=this.convertOpus,e="audio/wav"):(t=this.convertWebp,e="image/png"),{mimeType:e,process:t}}allocateDeferredPromises(e,t,a){const s=[];let n,i=e,r=Promise.resolve();do{n=(0,v.Z)(),s.push({offset:i,writePromise:r,writeDeferred:n}),r=n,i+=a}while(i<t);return s}isLocalWebFile(e){return e.startsWith("assets/")}download(e){var t,a;const s=null!==(t=e.size)&&void 0!==t?t:0,{dcId:n,location:i}=e;let{downloadId:r}=e;r&&!Ks()&&(this.log.error("download fallback to blob",e),r=void 0);const p=e.mimeType,d=this.getConvertMethod(p),{process:f}=d;e.mimeType=d.mimeType||"image/jpeg";const c=(0,Ba.Z)(e),l=r?(0,Ba.Z)(Object.assign(Object.assign({},(0,ve.Z)(e)),{downloadId:void 0})):c,m=this.getFileStorage(),g=r?this.downloadStorage:void 0;let h=r?void 0:this.downloadPromises[c];if(this.debug&&this.log("downloadFile",c,e),h)return h;const u=(e,t)=>{if(!(null==e?void 0:e.error))for(const a of I)e&&e!==a||(a.error=t,a.deferred.reject(t))},y="inputWebFileLocation"===i._,_=y&&this.isLocalWebFile(i.url),v=this.tempId++,P=_?s:e.limitPart||this.getLimitPart(s,!1);let b,M,S=m.getFile.bind(m);const I=[],C=s||P,w=(e,t)=>{const{deferred:a}=e,s=u.bind(null,e);a.cancel=()=>a.reject((0,X.Z)("DOWNLOAD_CANCELED")),a.catch((t=>{var a,n;s(t),null===(n=null===(a=e.writer)||void 0===a?void 0:a.truncate)||void 0===n||n.call(a)})).finally((()=>{this.downloadPromises[t]===a&&delete this.downloadPromises[t],delete e.writer})),this.downloadPromises[t]=a,I.push(e)};if(m&&(!g||C<=o.Iw)&&(b=m.prepareWriting(l,C,e.mimeType),w(b,l)),g){let t=e.fileName;if(!t){t=l;const a=ut[e.mimeType];a&&(t+="."+a)}M=g.prepareWriting({fileName:t,downloadId:r,size:C}),w(M,c),b&&M.deferred.catch((e=>b.deferred.reject(e)))}h=null!==(a=null==M?void 0:M.deferred)&&void 0!==a?a:b.deferred,g&&f&&(S=g.getFile.bind(g)),S(l).then((e=>Na(this,void 0,void 0,(function*(){if(k(),M){const t=M.writer=M.getWriter();k();const a=yield function(e){return Ra(e).then((e=>new Uint8Array(e)))}(e);k(),yield t.write(a),k(),M.deferred.resolve(yield t.finalize())}b&&b.deferred.resolve(e)})))).catch((t=>Na(this,void 0,void 0,(function*(){if(e.onlyCache)return void u(null,t);I.forEach((e=>{e.writer=e.getWriter()}));const a=(y?this.requestWebFilePart:this.requestFilePart).bind(this);y&&void 0===this.webFileDcId&&!_&&(yield this.apiManager.getConfig(),k());const r=this.allocateDeferredPromises(0,s,P),p={done:0,offset:0,total:s,fileName:c},d=()=>{try{k(),p.done=g,this.rootScope.dispatchEvent("download_progress",p)}catch(e){}},m=(0,sa.Z)(d,50,!0);let g=0;const h=()=>Na(this,void 0,void 0,(function*(){const{offset:t,writePromise:p,writeDeferred:y}=r.shift();try{k();performance.now();const u=yield a(n,i,t,P,v,e.queueId,k),_=(performance.now(),u.bytes);r.length&&h();const b=_.byteLength;this.debug&&this.log("downloadFile requestFilePart result:",c,u);const M=t+P>=s||!b;if(b){g+=b,M?d():m();performance.now();yield p,k(),performance.now(),performance.now(),yield Promise.all(I.map((({writer:e})=>null==e?void 0:e.write(_,t)))),k()}if(M&&(!s||g<s)&&I.forEach((({writer:e})=>{var t;return null===(t=null==e?void 0:e.trim)||void 0===t?void 0:t.call(e,g)})),M&&f){const e=I.filter((({writer:e})=>(null==e?void 0:e.getParts)&&e.replaceParts)).map((({writer:e})=>Na(this,void 0,void 0,(function*(){const t=e.getParts(),a=yield f(t,l);e.replaceParts(a)}))));yield Promise.all(e),k()}if(y.resolve(),M){const e=g<=o.Iw;I.forEach((t=>{const{deferred:a,writer:s}=t;if(a.isFulfilled||a.isRejected||!s)return;const n=s.finalize(e);a.resolve(n)}))}}catch(e){u(null,e)}}));for(let e=0,t=Math.min(1/0,r.length);e<t;++e)h()})))).catch(Gt.Z);const k=()=>{if(I.reduce(((e,t)=>e+ +!!t.error),0)===I.length)throw I[0].error};return h}downloadMedia(e){let{media:t,thumb:a}=e;const s="photo"===t._;if(s&&!a)return Promise.reject("preloadPhoto photoEmpty!");const n="document"===t._;n?t=this.appDocsManager.getDoc(t.id):s&&(t=this.appPhotosManager.getPhoto(t.id));const{fileName:i,downloadOptions:r}=(0,xa.Z)(e);let o=this.getDownload(i);return o||(o=this.download(r),n&&!a&&(this.rootScope.dispatchEvent("document_downloading",t.id),o.then((()=>{this.rootScope.dispatchEvent("document_downloaded",t.id)})).catch(Gt.Z))),o}downloadMediaURL(e){const{media:t,thumb:a}=e;let s=this.thumbsStorage.getCacheContext(t,null==a?void 0:a.type);return(!a||s.downloaded>=("size"in a?a.size:0))&&s.url?Promise.resolve(s.url):this.downloadMedia(e).then((e=>{if(!s.downloaded||s.downloaded<e.size){const a=URL.createObjectURL(e);s=this.thumbsStorage.setCacheContextURL(t,s.type,a,e.size)}return s.url}))}downloadMediaVoid(e){return this.downloadMedia(e).then(Gt.Z)}delete(e){return delete this.downloadPromises[e],this.getFileStorage().delete(e)}upload({file:e,fileName:t}){t||(t=(0,qt.Z)(e));const a=e.size,s=a>=10485760,n=this.getLimitPart(a,!0),i=this.getDelta(n),r=Math.ceil(a/n),o=(0,Ee.a)(),p={_:s?"inputFileBig":"inputFile",id:o,parts:r,name:t,md5_checksum:""},d=(0,v.Z)();if(r>this.maxUploadParts)return d.reject((0,X.Z)("FILE_TOO_BIG")),d;let f=!1,c=!1,l=e=>{"UPLOAD_CANCELED"!==(null==e?void 0:e.type)&&this.log.error("Up Error",e),d.reject(e),f=!0,l=Gt.Z};const m=s?"upload.saveBigFilePart":"upload.saveFilePart",g=this.tempId++,h=this,u=function*(){let u=0,y=0;for(let v=0;v<a;v+=n){const P=u++;yield h.downloadRequest("upload",g,(()=>Na(this,void 0,void 0,(function*(){_();const i=e.slice(v,v+n),g=yield Ra(i);return _(),h.debug&&h.log("Upload file part, isBig:",s,P,g.byteLength,new Uint8Array(g).length,new Uint8Array(g).slice().length),h.apiManager.invokeApi(m,{file_id:o,file_part:P,file_total_parts:r,bytes:g},{fileUpload:!0}).then((()=>{if(f)return;++y;const e={done:y*n,offset:v,total:a,fileName:t};d.notify(e),y>=r&&(d.resolve(p),c=!0)}),l)}))),i).catch(l)}}(),y=()=>{if(f)return;const e=u.next();e.done||f||e.value.then(y)};for(let e=0,t=Math.min(1/0,r);e<t;++e)y();const _=()=>{if(f)throw(0,X.Z)("UPLOAD_CANCELED")};return d.cancel=()=>{f||c||(f=!0,l((0,X.Z)("UPLOAD_CANCELED")))},d.notify=e=>{this.rootScope.dispatchEvent("download_progress",e)},d.finally((()=>{this.uploadPromises[t]===d&&delete this.uploadPromises[t]})),this.uploadPromises[t]=d}}var Ga=a(7487),Ha=a(6666),Wa=a(3306);class za extends G{constructor(){super(),this.hashes={},this.apiPromisesSingleProcess={},this.apiPromisesSingle={},this.apiPromisesCacheable={},this.afterMessageIdTemp=0}setUser(e){return this.setUserAuth(e.id)}invokeApiAfter(e,t={},a={}){let s=a;return s.prepareTempMessageId=""+ ++this.afterMessageIdTemp,s=Object.assign({},a),a.messageId=s.prepareTempMessageId,this.invokeApi(e,t,s)}invokeApiHashable(e){var t,a;null!==(t=e.params)&&void 0!==t||(e.params={}),null!==(a=e.options)&&void 0!==a||(e.options={});const{params:s,options:n,method:i,overwrite:r}=e,o=JSON.stringify(s);let p;return this.hashes[i]&&(p=this.hashes[i][o],p&&(r?(delete this.hashes[i][o],p=void 0):s.hash=p.hash)),this.invokeApiSingleProcess({method:i,processResult:t=>{if(t._.includes("NotModified"))return p.result;if(t.hash){const e=t.hash;this.hashes[i]||(this.hashes[i]={}),p=this.hashes[i][o]={hash:e,result:t}}if(e.processResult){const a=e.processResult(t);return p?p.result=a:a}return t},params:s,options:n})}invokeApiSingle(e,t={},a={}){const s=e+"-"+JSON.stringify(t),n=this.apiPromisesSingle;return n[s]?n[s]:n[s]=this.invokeApi(e,t,a).finally((()=>{delete n[s]}))}invokeApiSingleProcess(e){var t,a,s;null!==(t=e.params)&&void 0!==t||(e.params={}),null!==(a=e.options)&&void 0!==a||(e.options={});const{method:n,processResult:i,processError:r,params:o,options:p}=e,d=this.apiPromisesSingleProcess,f=p.cacheKey||JSON.stringify(o),c=null!==(s=d[n])&&void 0!==s?s:d[n]=new Map,l=c.get(f);if(l)return l;const m=()=>{const e=c.get(f);return e===h?void 0:e},g=this.invokeApi(n,o,p).then((e=>m()||i(e)),(e=>{const t=m();if(t)return t;if(!r)throw e;return r(e)})),h=g.finally((()=>{c.get(f)===h&&(c.delete(f),c.size||delete d[n])}));return c.set(f,h),h}invokeApiCacheable(e,t={},a={}){var s,n;const i=null!==(s=(n=this.apiPromisesCacheable)[e])&&void 0!==s?s:n[e]={},r=JSON.stringify(t);let o,p=i[r];if(p&&(!a.override||!p.fulfilled)){if(a.syncIfHasResult){if(p.hasOwnProperty("result"))return p.result;if(p.hasOwnProperty("error"))throw p.error}return p.promise}a.override&&((null==p?void 0:p.timeout)&&(clearTimeout(p.timeout),delete p.timeout),delete a.override),a.cacheSeconds&&(o=T.Z.setTimeout((()=>{i[r]===p&&delete i[r]}),1e3*a.cacheSeconds),delete a.cacheSeconds);const d=this.invokeApi(e,t,a);return d.then((e=>{p.result=e}),(e=>{p.error=e})),p=i[r]={timestamp:Date.now(),fulfilled:!1,timeout:o,promise:d,params:t},d}clearCache(e,t){const a=this.apiPromisesCacheable[e];if(a)for(const e in a){const s=a[e];try{t(s.params)&&(s.timeout&&clearTimeout(s.timeout),delete a[e])}catch(e){}}}getConfig(e){return this.config&&!e?this.config:this.invokeApiSingleProcess({method:"help.getConfig",params:{},processResult:e=>(this.config=e,this.rootScope.dispatchEvent("config",e),e),options:{overwrite:e}})}getAppConfig(e){return this.appConfig&&!e?this.appConfig:this.invokeApiSingleProcess({method:"help.getAppConfig",params:{hash:0},processResult:e=>{var t;(0,ue.Z)(e);const a=e.config;return this.appConfig=a,(0,ra.Ki)(null!==(t=a.ignore_restriction_reasons)&&void 0!==t?t:[]),this.rootScope.dispatchEvent("app_config",a),a},options:{overwrite:e}})}getLimit(e,t){return(0,q.Z)(this.getAppConfig(),(a=>{null!=t||(t=this.rootScope.premium);const s={pin:["dialogs_pinned_limit_default","dialogs_pinned_limit_premium"],folderPin:["dialogs_folder_pinned_limit_default","dialogs_folder_pinned_limit_premium"],folders:["dialog_filters_limit_default","dialog_filters_limit_premium"],favedStickers:["stickers_faved_limit_default","stickers_faved_limit_premium"],reactions:["reactions_user_max_default","reactions_user_max_premium"],bio:["about_length_limit_default","about_length_limit_premium"],topicPin:"topics_pinned_limit",caption:["caption_length_limit_default","caption_length_limit_premium"]}[e];return a[Array.isArray(s)?s[t?1:0]:s]}))}}var Ka=a(8453),Ja=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class $a extends za{constructor(){super(),this.log=(0,S.kg)("API"),this.cachedNetworkers={},this.cachedExportPromise={},this.gettingNetworkers={},this.baseDcId=0,this.afterMessageTempIds={},this.transportType=b.Z.transport,Z.addEventListener("transport",(e=>{this.changeTransportType(e)})),setInterval((()=>{this.getConfig(!0)}),997e4)}after(){this.apiUpdatesManager.addMultipleEventsListeners({updateConfig:()=>{this.getConfig(!0),this.getAppConfig(!0)}}),this.rootScope.addEventListener("user_auth",(()=>{this.config&&this.apiUpdatesManager.processLocalUpdate({_:"updateConfig"})})),this.rootScope.addEventListener("premium_toggle",(e=>{this.iterateNetworkers((({networker:t,connectionType:a,dcId:s,transportType:n})=>{if("client"===a||"websocket"!==n)return;const i=t.transport;if(i){if(i.connection){const t=V(s,a,e);i.changeUrl(t)}}else this.log.error("wow what, no transport?",t)}))}))}getTransportType(e){return this.transportType}iterateNetworkers(e){for(const t in this.cachedNetworkers){const a=this.cachedNetworkers[t];for(const s in a){const n=a[s];for(const a in n)n[a].forEach(((n,i,r)=>{e({networker:n,dcId:+a,connectionType:s,transportType:t,index:i,array:r})}))}}}chooseServer(e,t,a){return this.dcConfigurator.chooseServer(e,t,a,"client"===t,this.rootScope.premium)}changeTransportType(e){const t=this.transportType;if(t===e)return;this.log("changing transport from",t,"to",e);const a=this.cachedNetworkers[t],s=this.cachedNetworkers[e];this.cachedNetworkers[e]=a,this.cachedNetworkers[t]=s,this.transportType=e;for(const a in this.gettingNetworkers){const s=this.gettingNetworkers[a];delete this.gettingNetworkers[a];const n=a.replace(t,e);this.gettingNetworkers[n]=s,this.log("changed networker getKey from",a,"to",n)}this.iterateNetworkers((e=>{const t=this.getTransportType(e.connectionType),a=this.chooseServer(e.dcId,e.connectionType,t);this.changeNetworkerTransport(e.networker,a)}))}getBaseDcId(){return Ja(this,void 0,void 0,(function*(){if(this.baseDcId)return this.baseDcId;const e=yield Ga.Z.get("dc");return this.baseDcId||(e?this.baseDcId=e:this.setBaseDcId(_.Z.baseDcId)),this.baseDcId}))}setUserAuth(e){return Ja(this,void 0,void 0,(function*(){if("string"!=typeof e&&"number"!=typeof e||(e={dcID:0,date:(0,te.Z)(!0),id:e.toPeerId(!1)}),this.rootScope.dispatchEvent("user_auth",e),!e.dcID){const t=yield this.getBaseDcId();e.dcID=t}Ga.Z.set({user_auth:e})}))}setBaseDcId(e){const t=this.baseDcId;t&&this.getNetworker(t).then((e=>{this.setOnDrainIfNeeded(e)})),this.baseDcId=e,Ga.Z.set({dc:this.baseDcId})}logOut(){return Ja(this,void 0,void 0,(function*(){if(this.loggingOut)return;this.loggingOut=!0;const e=[];for(let t=1;t<=5;t++)e.push("dc"+t+"_auth_key");const t=yield Promise.all(e.map((e=>Ga.Z.get(e)))),a=[];for(let e=0;e<t.length;e++)t[e]&&a.push(this.invokeApi("auth.logOut",{},{dcId:e+1,ignoreErrors:!0}));const s=()=>Ja(this,void 0,void 0,(function*(){this.baseDcId=void 0,yield(0,Ka.Z)(!1,!0),Ha.C.closeDatabases(),this.rootScope.dispatchEvent("logging_out")}));return setTimeout(s,1e3),Promise.all(a).catch((e=>{e.handled=!0})).finally(s)}))}generateNetworkerGetKey(e,t,a){return[e,t,a].join("-")}getNetworker(e,t={}){const a=t.fileDownload?"download":t.fileUpload?"upload":"client",n=this.getTransportType(a);this.cachedNetworkers[n]||(this.cachedNetworkers[n]={client:{},download:{},upload:{}});const i=this.cachedNetworkers[n][a];e in i||(i[e]=[]);const r=i[e],o="client"===a||"https"===n?1:this.rootScope.premium?6:3;if(r.length>=o){let e=o-1,t=!1;for(;e>=0;--e)if(r[e].isOnline){t=!0;break}const a=r.splice(t?e:o-1,1)[0];return r.unshift(a),Promise.resolve(a)}let p=this.generateNetworkerGetKey(e,n,a);if(this.gettingNetworkers[p])return this.gettingNetworkers[p];const d=`dc${e}_auth_key`,f=`dc${e}_server_salt`;let c=this.chooseServer(e,a,n);return this.gettingNetworkers[p]=Promise.all([d,f].map((e=>Ga.Z.get(e)))).then((([i,o])=>Ja(this,void 0,void 0,(function*(){let l,m;if(i&&512===i.length){o&&16===o.length||(o="AAAAAAAAAAAAAAAA");const a=(0,Wa.Z)(i),n=(yield s.Z.invokeCrypto("sha1",a)).slice(-8),r=(0,Wa.Z)(o);l=this.networkerFactory.getNetworker(e,a,n,r,t)}else try{const a=yield this.authorizer.auth(e);Ga.Z.set({[d]:E(a.authKey),[f]:E(a.serverSalt)}),l=this.networkerFactory.getNetworker(e,a.authKey,a.authKeyId,a.serverSalt,t)}catch(e){m=e}const g=this.getTransportType(a);if(g!==n&&(p=this.generateNetworkerGetKey(e,g,a),c.destroy(),O.removeTransport(this.dcConfigurator.chosenServers,c),l&&(c=this.chooseServer(e,a,g)),this.log("transport has been changed during authorization from",n,"to",g)),delete this.gettingNetworkers[p],m)throw this.log("get networker error",m,m.stack),m;return this.changeNetworkerTransport(l,c),r.unshift(l),this.setOnDrainIfNeeded(l),l}))))}getNetworkerVoid(e){return this.getNetworker(e).then(Gt.Z,Gt.Z)}changeNetworkerTransport(e,t){const a=e.transport;a&&O.removeTransport(this.dcConfigurator.chosenServers,a),e.changeTransport(t)}onNetworkerDrain(e){this.log("networker drain",e.dcId),e.onDrain=void 0,this.changeNetworkerTransport(e),e.destroy(),this.networkerFactory.removeNetworker(e),O.removeTransport(this.cachedNetworkers,e)}setOnDrainIfNeeded(e){e.onDrain||(e.isFileNetworker?Promise.resolve(!0):this.getBaseDcId().then((t=>e.dcId!==t))).then((t=>{e.onDrain||t&&(e.onDrain=()=>this.onNetworkerDrain(e),e.setDrainTimeout())}))}setUpdatesProcessor(e){this.updatesProcessor=e,this.networkerFactory.setUpdatesProcessor(e)}invokeApi(e,t={},a={}){const s=(0,v.Z)();let n,i,{afterMessageId:r,prepareTempMessageId:o}=a;if(o&&s.then((()=>{delete this.afterMessageTempIds[o]})),d.GO){const n=Date.now(),r=T.Z.setInterval((()=>{i&&i.isStopped()||this.log.error("Request is still processing:",e,t,a,"time:",(Date.now()-n)/1e3)}),5e3);s.catch(Gt.Z).finally((()=>{clearInterval(r)}))}const p=(new Error).stack||"empty stack",f=()=>{if(r){const e=this.afterMessageTempIds[r];e&&(a.afterMessageId=e.messageId)}const p=i.wrapApiCall(e,t,a);return o&&(this.afterMessageTempIds[o]={messageId:a.messageId,promise:s}),p.catch((s=>{var i;if("FILE_REFERENCE_EXPIRED"!==s.type&&this.log.error("Error",s.code,s.type,this.baseDcId,n,e,t),401===s.code&&this.baseDcId===n)throw"SESSION_PASSWORD_NEEDED"!==s.type&&(Ga.Z.delete("dc"),Ga.Z.delete("user_auth")),s;if(401===s.code&&this.baseDcId&&n!==this.baseDcId){if(void 0===this.cachedExportPromise[n]){const e=new Promise(((e,t)=>{this.invokeApi("auth.exportAuthorization",{dc_id:n},{noErrorBox:!0}).then((a=>{this.invokeApi("auth.importAuthorization",{id:a.id,bytes:a.bytes},{dcId:n,noErrorBox:!0}).then(e,t)}),t)}));this.cachedExportPromise[n]=e}return this.cachedExportPromise[n].then((()=>f()))}if(303!==s.code){if(400===s.code&&0===s.type.indexOf("FILE_MIGRATE")){const i=+s.type.match(/^(FILE_MIGRATE_)(\d+)/)[2];if(i!==n)return a.dcId=i,this.invokeApi(e,t,a);throw s}if(400===s.code&&"CONNECTION_NOT_INITED"===s.type)return this.networkerFactory.unsetConnectionInited(),f();if(a.rawError||420!==s.code){if(!a.rawError&&["MSG_WAIT_FAILED","MSG_WAIT_TIMEOUT"].includes(s.type)){const e=this.afterMessageTempIds[r];return r=void 0,delete a.afterMessageId,e?e.promise.then((()=>f())):f()}if(a.rawError||500!==s.code){if("UNKNOWN"===s.type||"MTPROTO_CLUSTER_INVALID"===s.type)return(0,P.Z)(1e3).then((()=>f()));throw s}{const e=Date.now();if(a.stopTime&&e>=a.stopTime)throw s;return a.waitTime=a.waitTime?Math.min(60,1.5*a.waitTime):1,(0,P.Z)(1e3*a.waitTime).then((()=>f()))}}{const e=+s.type.match(/^FLOOD_WAIT_(\d+)/)[1]||1;if(e>(null!==(i=a.floodMaxTimeout)&&void 0!==i?i:60)&&!a.prepareTempMessageId)throw s;return(0,P.Z)(1e3*e).then((()=>f()))}}{const i=+s.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_)(\d+)/)[2];if(i!==n)return a.dcId?a.dcId=i:this.setBaseDcId(i),this.invokeApi(e,t,a)}}))};let c;return c=(n=a.dcId||this.baseDcId)?this.getNetworker(n,a):this.getBaseDcId().then((e=>this.getNetworker(n=e,a))),c.then((e=>{i=e;const t=f();return i.attachPromise(s,a),t})).then(s.resolve).catch((t=>Ja(this,void 0,void 0,(function*(){if(t?(0,fe.Z)(t)||(t={message:t}):t={type:"ERROR_EMPTY"},(401===t.code&&"SESSION_REVOKED"===t.type||406===t.code&&"AUTH_KEY_DUPLICATED"===t.type)&&this.logOut(),a.ignoreErrors)throw t;throw 406===t.code&&(t.handled=!0),a.noErrorBox||(t.input=e,t.stack=p||t.originalError&&t.originalError.stack||t.stack||(new Error).stack,setTimeout((()=>{t.handled||(401===t.code&&this.logOut(),t.handled=!0)}),100)),t})))).catch(s.reject),s}}class Qa{constructor(){this.neededPeers=new Map,this.singlePeerMap=new Map,this._constructor(!1)}after(){this.rootScope.addEventListener("user_auth",(()=>{this.requestPeer(this.appPeersManager.peerId,"self")}))}requestPeer(e,t){let a=this.neededPeers.get(e);a&&a.has(t)||(a||(a=new Set,this.neededPeers.set(e,a)),a.add(t),this.dispatchEvent("peerNeeded",e))}releasePeer(e,t){const a=this.neededPeers.get(e);a&&(a.delete(t),a.size||(this.neededPeers.delete(e),this.dispatchEvent("peerUnneeded",e)))}requestPeersForKey(e,t){Array.isArray(e)&&(e=new Set(e));let a=this.singlePeerMap.get(t);if(a){for(const s of a)e.has(s)||(this.releasePeer(s,t),a.delete(s));if(!a.size&&!e.size)return void this.singlePeerMap.delete(t)}if(e.size){a||(a=new Set,this.singlePeerMap.set(t,a));for(const s of e)a.has(s)||(this.requestPeer(s,t),a.add(s))}}isPeerNeeded(e){return this.neededPeers.has(e)}}Ae(Qa,[p.Z,G]);const Ya=Qa,Xa=o.Pt;class es{constructor(){this.thumbsCache={}}getKey(e){var t;return e._+(null!==(t=e.id)&&void 0!==t?t:e.url)}getCacheContext(e,t=Xa){var a,s,n,i;const r=null!==(a=(n=this.thumbsCache)[i=this.getKey(e)])&&void 0!==a?a:n[i]={};return null!==(s=r[t])&&void 0!==s?s:r[t]={downloaded:0,url:"",type:t}}setCacheContextURL(e,t=Xa,a,s=0){const n=this.getCacheContext(e,t);return n.url=a,n.downloaded=s,n}deleteCacheContext(e,t=Xa){const a=this.thumbsCache[this.getKey(e)];a&&delete a[t]}}const ts={MTProto:{constructors:[{id:481674261,predicate:"vector",params:[],type:"Vector t"},{id:85337187,predicate:"resPQ",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"pq",type:"bytes"},{name:"server_public_key_fingerprints",type:"Vector<long>"}],type:"ResPQ"},{id:-1443537003,predicate:"p_q_inner_data_dc",params:[{name:"pq",type:"bytes"},{name:"p",type:"bytes"},{name:"q",type:"bytes"},{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce",type:"int256"},{name:"dc",type:"int"}],type:"P_Q_inner_data"},{id:1459478408,predicate:"p_q_inner_data_temp_dc",params:[{name:"pq",type:"bytes"},{name:"p",type:"bytes"},{name:"q",type:"bytes"},{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce",type:"int256"},{name:"dc",type:"int"},{name:"expires_in",type:"int"}],type:"P_Q_inner_data"},{id:-790100132,predicate:"server_DH_params_ok",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"encrypted_answer",type:"bytes"}],type:"Server_DH_Params"},{id:-1249309254,predicate:"server_DH_inner_data",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"g",type:"int"},{name:"dh_prime",type:"bytes"},{name:"g_a",type:"bytes"},{name:"server_time",type:"int"}],type:"Server_DH_inner_data"},{id:1715713620,predicate:"client_DH_inner_data",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"retry_id",type:"long"},{name:"g_b",type:"bytes"}],type:"Client_DH_Inner_Data"},{id:1003222836,predicate:"dh_gen_ok",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash1",type:"int128"}],type:"Set_client_DH_params_answer"},{id:1188831161,predicate:"dh_gen_retry",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash2",type:"int128"}],type:"Set_client_DH_params_answer"},{id:-1499615742,predicate:"dh_gen_fail",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash3",type:"int128"}],type:"Set_client_DH_params_answer"},{id:1973679973,predicate:"bind_auth_key_inner",params:[{name:"nonce",type:"long"},{name:"temp_auth_key_id",type:"long"},{name:"perm_auth_key_id",type:"long"},{name:"temp_session_id",type:"long"},{name:"expires_at",type:"int"}],type:"BindAuthKeyInner"},{id:-212046591,predicate:"rpc_result",params:[{name:"req_msg_id",type:"long"},{name:"result",type:"Object"}],type:"RpcResult"},{id:558156313,predicate:"rpc_error",params:[{name:"error_code",type:"int"},{name:"error_message",type:"string"}],type:"RpcError"},{id:1579864942,predicate:"rpc_answer_unknown",params:[],type:"RpcDropAnswer"},{id:-847714938,predicate:"rpc_answer_dropped_running",params:[],type:"RpcDropAnswer"},{id:-1539647305,predicate:"rpc_answer_dropped",params:[{name:"msg_id",type:"long"},{name:"seq_no",type:"int"},{name:"bytes",type:"int"}],type:"RpcDropAnswer"},{id:155834844,predicate:"future_salt",params:[{name:"valid_since",type:"int"},{name:"valid_until",type:"int"},{name:"salt",type:"long"}],type:"FutureSalt"},{id:-1370486635,predicate:"future_salts",params:[{name:"req_msg_id",type:"long"},{name:"now",type:"int"},{name:"salts",type:"vector<future_salt>"}],type:"FutureSalts"},{id:880243653,predicate:"pong",params:[{name:"msg_id",type:"long"},{name:"ping_id",type:"long"}],type:"Pong"},{id:-501201412,predicate:"destroy_session_ok",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:1658015945,predicate:"destroy_session_none",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:-1631450872,predicate:"new_session_created",params:[{name:"first_msg_id",type:"long"},{name:"unique_id",type:"long"},{name:"server_salt",type:"long"}],type:"NewSession"},{id:1945237724,predicate:"msg_container",params:[{name:"messages",type:"vector<%Message>"}],type:"MessageContainer"},{id:1538843921,predicate:"message",params:[{name:"msg_id",type:"long"},{name:"seqno",type:"int"},{name:"bytes",type:"int"},{name:"body",type:"Object"}],type:"Message"},{id:-530561358,predicate:"msg_copy",params:[{name:"orig_message",type:"Message"}],type:"MessageCopy"},{id:812830625,predicate:"gzip_packed",params:[{name:"packed_data",type:"bytes"}],type:"Object"},{id:1658238041,predicate:"msgs_ack",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgsAck"},{id:-1477445615,predicate:"bad_msg_notification",params:[{name:"bad_msg_id",type:"long"},{name:"bad_msg_seqno",type:"int"},{name:"error_code",type:"int"}],type:"BadMsgNotification"},{id:-307542917,predicate:"bad_server_salt",params:[{name:"bad_msg_id",type:"long"},{name:"bad_msg_seqno",type:"int"},{name:"error_code",type:"int"},{name:"new_server_salt",type:"long"}],type:"BadMsgNotification"},{id:2105940488,predicate:"msg_resend_req",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgResendReq"},{id:-630588590,predicate:"msgs_state_req",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgsStateReq"},{id:81704317,predicate:"msgs_state_info",params:[{name:"req_msg_id",type:"long"},{name:"info",type:"bytes"}],type:"MsgsStateInfo"},{id:-1933520591,predicate:"msgs_all_info",params:[{name:"msg_ids",type:"Vector<long>"},{name:"info",type:"bytes"}],type:"MsgsAllInfo"},{id:661470918,predicate:"msg_detailed_info",params:[{name:"msg_id",type:"long"},{name:"answer_msg_id",type:"long"},{name:"bytes",type:"int"},{name:"status",type:"int"}],type:"MsgDetailedInfo"},{id:-2137147681,predicate:"msg_new_detailed_info",params:[{name:"answer_msg_id",type:"long"},{name:"bytes",type:"int"},{name:"status",type:"int"}],type:"MsgDetailedInfo"},{id:-161422892,predicate:"destroy_auth_key_ok",params:[],type:"DestroyAuthKeyRes"},{id:178201177,predicate:"destroy_auth_key_none",params:[],type:"DestroyAuthKeyRes"},{id:-368010477,predicate:"destroy_auth_key_fail",params:[],type:"DestroyAuthKeyRes"}],methods:[{id:-1099002127,method:"req_pq_multi",params:[{name:"nonce",type:"int128"}],type:"ResPQ"},{id:-686627650,method:"req_DH_params",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"p",type:"bytes"},{name:"q",type:"bytes"},{name:"public_key_fingerprint",type:"long"},{name:"encrypted_data",type:"bytes"}],type:"Server_DH_Params"},{id:-184262881,method:"set_client_DH_params",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"encrypted_data",type:"bytes"}],type:"Set_client_DH_params_answer"},{id:1491380032,method:"rpc_drop_answer",params:[{name:"req_msg_id",type:"long"}],type:"RpcDropAnswer"},{id:-1188971260,method:"get_future_salts",params:[{name:"num",type:"int"}],type:"FutureSalts"},{id:2059302892,method:"ping",params:[{name:"ping_id",type:"long"}],type:"Pong"},{id:-213746804,method:"ping_delay_disconnect",params:[{name:"ping_id",type:"long"},{name:"disconnect_delay",type:"int"}],type:"Pong"},{id:-414113498,method:"destroy_session",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:-1835453025,method:"http_wait",params:[{name:"max_delay",type:"int"},{name:"wait_after",type:"int"},{name:"max_wait",type:"int"}],type:"HttpWait"},{id:-784117408,method:"destroy_auth_key",params:[],type:"DestroyAuthKeyRes"}]},API:{constructors:[{id:-1132882121,predicate:"boolFalse",params:[],type:"Bool"},{id:-1720552011,predicate:"boolTrue",params:[],type:"Bool"},{id:1072550713,predicate:"true",params:[],type:"True"},{id:481674261,predicate:"vector",params:[],type:"Vector t"},{id:-994444869,predicate:"error",params:[{name:"code",type:"int"},{name:"text",type:"string"}],type:"Error"},{id:1450380236,predicate:"null",params:[],type:"Null"},{id:2134579434,predicate:"inputPeerEmpty",params:[],type:"InputPeer"},{id:2107670217,predicate:"inputPeerSelf",params:[],type:"InputPeer"},{id:900291769,predicate:"inputPeerChat",params:[{name:"chat_id",type:"long"}],type:"InputPeer"},{id:-1182234929,predicate:"inputUserEmpty",params:[],type:"InputUser"},{id:-138301121,predicate:"inputUserSelf",params:[],type:"InputUser"},{id:-208488460,predicate:"inputPhoneContact",params:[{name:"client_id",type:"long"},{name:"phone",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"InputContact"},{id:-181407105,predicate:"inputFile",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"name",type:"string"},{name:"md5_checksum",type:"string"}],type:"InputFile"},{id:-1771768449,predicate:"inputMediaEmpty",params:[],type:"InputMedia"},{id:505969924,predicate:"inputMediaUploadedPhoto",params:[{name:"flags",type:"#"},{name:"spoiler",type:"flags.2?true"},{name:"file",type:"InputFile"},{name:"stickers",type:"flags.0?Vector<InputDocument>"},{name:"ttl_seconds",type:"flags.1?int"}],type:"InputMedia"},{id:-1279654347,predicate:"inputMediaPhoto",params:[{name:"flags",type:"#"},{name:"spoiler",type:"flags.1?true"},{name:"id",type:"InputPhoto"},{name:"ttl_seconds",type:"flags.0?int"}],type:"InputMedia"},{id:-104578748,predicate:"inputMediaGeoPoint",params:[{name:"geo_point",type:"InputGeoPoint"}],type:"InputMedia"},{id:-122978821,predicate:"inputMediaContact",params:[{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"vcard",type:"string"}],type:"InputMedia"},{id:480546647,predicate:"inputChatPhotoEmpty",params:[],type:"InputChatPhoto"},{id:-1110593856,predicate:"inputChatUploadedPhoto",params:[{name:"flags",type:"#"},{name:"file",type:"flags.0?InputFile"},{name:"video",type:"flags.1?InputFile"},{name:"video_start_ts",type:"flags.2?double"},{name:"video_emoji_markup",type:"flags.3?VideoSize"}],type:"InputChatPhoto"},{id:-1991004873,predicate:"inputChatPhoto",params:[{name:"id",type:"InputPhoto"}],type:"InputChatPhoto"},{id:-457104426,predicate:"inputGeoPointEmpty",params:[],type:"InputGeoPoint"},{id:1210199983,predicate:"inputGeoPoint",params:[{name:"flags",type:"#"},{name:"lat",type:"double"},{name:"long",type:"double"},{name:"accuracy_radius",type:"flags.0?int"}],type:"InputGeoPoint"},{id:483901197,predicate:"inputPhotoEmpty",params:[],type:"InputPhoto"},{id:1001634122,predicate:"inputPhoto",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"}],type:"InputPhoto"},{id:-539317279,predicate:"inputFileLocation",params:[{name:"volume_id",type:"long"},{name:"local_id",type:"int"},{name:"secret",type:"long"},{name:"file_reference",type:"bytes"}],type:"InputFileLocation"},{id:1498486562,predicate:"peerUser",params:[{name:"user_id",type:"long"}],type:"Peer"},{id:918946202,predicate:"peerChat",params:[{name:"chat_id",type:"long"}],type:"Peer"},{id:-1432995067,predicate:"storage.fileUnknown",params:[],type:"storage.FileType"},{id:1086091090,predicate:"storage.filePartial",params:[],type:"storage.FileType"},{id:8322574,predicate:"storage.fileJpeg",params:[],type:"storage.FileType"},{id:-891180321,predicate:"storage.fileGif",params:[],type:"storage.FileType"},{id:172975040,predicate:"storage.filePng",params:[],type:"storage.FileType"},{id:-1373745011,predicate:"storage.filePdf",params:[],type:"storage.FileType"},{id:1384777335,predicate:"storage.fileMp3",params:[],type:"storage.FileType"},{id:1258941372,predicate:"storage.fileMov",params:[],type:"storage.FileType"},{id:-1278304028,predicate:"storage.fileMp4",params:[],type:"storage.FileType"},{id:276907596,predicate:"storage.fileWebp",params:[],type:"storage.FileType"},{id:-742634630,predicate:"userEmpty",params:[{name:"id",type:"long"}],type:"User"},{id:1326562017,predicate:"userProfilePhotoEmpty",params:[],type:"UserProfilePhoto"},{id:-2100168954,predicate:"userProfilePhoto",params:[{name:"flags",type:"#"},{name:"has_video",type:"flags.0?true"},{name:"personal",type:"flags.2?true"},{name:"photo_id",type:"long"},{name:"stripped_thumb",type:"flags.1?bytes"},{name:"dc_id",type:"int"}],type:"UserProfilePhoto"},{id:164646985,predicate:"userStatusEmpty",params:[],type:"UserStatus"},{id:-306628279,predicate:"userStatusOnline",params:[{name:"expires",type:"int"}],type:"UserStatus"},{id:9203775,predicate:"userStatusOffline",params:[{name:"was_online",type:"int"}],type:"UserStatus"},{id:693512293,predicate:"chatEmpty",params:[{name:"id",type:"long"}],type:"Chat"},{id:1103884886,predicate:"chat",params:[{name:"flags",type:"#"},{name:"creator",type:"flags.0?true"},{name:"left",type:"flags.2?true"},{name:"deactivated",type:"flags.5?true"},{name:"call_active",type:"flags.23?true"},{name:"call_not_empty",type:"flags.24?true"},{name:"noforwards",type:"flags.25?true"},{name:"id",type:"long"},{name:"title",type:"string"},{name:"photo",type:"ChatPhoto"},{name:"participants_count",type:"int"},{name:"date",type:"int"},{name:"version",type:"int"},{name:"migrated_to",type:"flags.6?InputChannel"},{name:"admin_rights",type:"flags.14?ChatAdminRights"},{name:"default_banned_rights",type:"flags.18?ChatBannedRights"}],type:"Chat"},{id:1704108455,predicate:"chatForbidden",params:[{name:"id",type:"long"},{name:"title",type:"string"}],type:"Chat"},{id:-908914376,predicate:"chatFull",params:[{name:"flags",type:"#"},{name:"can_set_username",type:"flags.7?true"},{name:"has_scheduled",type:"flags.8?true"},{name:"translations_disabled",type:"flags.19?true"},{name:"id",type:"long"},{name:"about",type:"string"},{name:"participants",type:"ChatParticipants"},{name:"chat_photo",type:"flags.2?Photo"},{name:"notify_settings",type:"PeerNotifySettings"},{name:"exported_invite",type:"flags.13?ExportedChatInvite"},{name:"bot_info",type:"flags.3?Vector<BotInfo>"},{name:"pinned_msg_id",type:"flags.6?int"},{name:"folder_id",type:"flags.11?int"},{name:"call",type:"flags.12?InputGroupCall"},{name:"ttl_period",type:"flags.14?int"},{name:"groupcall_default_join_as",type:"flags.15?Peer"},{name:"theme_emoticon",type:"flags.16?string"},{name:"requests_pending",type:"flags.17?int"},{name:"recent_requesters",type:"flags.17?Vector<long>"},{name:"available_reactions",type:"flags.18?ChatReactions"}],type:"ChatFull"},{id:-1070776313,predicate:"chatParticipant",params:[{name:"user_id",type:"long"},{name:"inviter_id",type:"long"},{name:"date",type:"int"}],type:"ChatParticipant"},{id:-2023500831,predicate:"chatParticipantsForbidden",params:[{name:"flags",type:"#"},{name:"chat_id",type:"long"},{name:"self_participant",type:"flags.0?ChatParticipant"}],type:"ChatParticipants"},{id:1018991608,predicate:"chatParticipants",params:[{name:"chat_id",type:"long"},{name:"participants",type:"Vector<ChatParticipant>"},{name:"version",type:"int"}],type:"ChatParticipants"},{id:935395612,predicate:"chatPhotoEmpty",params:[],type:"ChatPhoto"},{id:476978193,predicate:"chatPhoto",params:[{name:"flags",type:"#"},{name:"has_video",type:"flags.0?true"},{name:"photo_id",type:"long"},{name:"stripped_thumb",type:"flags.1?bytes"},{name:"dc_id",type:"int"}],type:"ChatPhoto"},{id:-1868117372,predicate:"messageEmpty",params:[{name:"flags",type:"#"},{name:"id",type:"int"},{name:"peer_id",type:"flags.0?Peer"}],type:"Message"},{id:940666592,predicate:"message",params:[{name:"flags",type:"#"},{name:"out",type:"flags.1?true"},{name:"mentioned",type:"flags.4?true"},{name:"media_unread",type:"flags.5?true"},{name:"silent",type:"flags.13?true"},{name:"post",type:"flags.14?true"},{name:"from_scheduled",type:"flags.18?true"},{name:"legacy",type:"flags.19?true"},{name:"edit_hide",type:"flags.21?true"},{name:"pinned",type:"flags.24?true"},{name:"noforwards",type:"flags.26?true"},{name:"id",type:"int"},{name:"from_id",type:"flags.8?Peer"},{name:"peer_id",type:"Peer"},{name:"fwd_from",type:"flags.2?MessageFwdHeader"},{name:"via_bot_id",type:"flags.11?long"},{name:"reply_to",type:"flags.3?MessageReplyHeader"},{name:"date",type:"int"},{name:"message",type:"string"},{name:"media",type:"flags.9?MessageMedia"},{name:"reply_markup",type:"flags.6?ReplyMarkup"},{name:"entities",type:"flags.7?Vector<MessageEntity>"},{name:"views",type:"flags.10?int"},{name:"forwards",type:"flags.10?int"},{name:"replies",type:"flags.23?MessageReplies"},{name:"edit_date",type:"flags.15?int"},{name:"post_author",type:"flags.16?string"},{name:"grouped_id",type:"flags.17?long"},{name:"reactions",type:"flags.20?MessageReactions"},{name:"restriction_reason",type:"flags.22?Vector<RestrictionReason>"},{name:"ttl_period",type:"flags.25?int"}],type:"Message"},{id:721967202,predicate:"messageService",params:[{name:"flags",type:"#"},{name:"out",type:"flags.1?true"},{name:"mentioned",type:"flags.4?true"},{name:"media_unread",type:"flags.5?true"},{name:"silent",type:"flags.13?true"},{name:"post",type:"flags.14?true"},{name:"legacy",type:"flags.19?true"},{name:"id",type:"int"},{name:"from_id",type:"flags.8?Peer"},{name:"peer_id",type:"Peer"},{name:"reply_to",type:"flags.3?MessageReplyHeader"},{name:"date",type:"int"},{name:"action",type:"MessageAction"},{name:"ttl_period",type:"flags.25?int"}],type:"Message"},{id:1038967584,predicate:"messageMediaEmpty",params:[],type:"MessageMedia"},{id:1766936791,predicate:"messageMediaPhoto",params:[{name:"flags",type:"#"},{name:"spoiler",type:"flags.3?true"},{name:"photo",type:"flags.0?Photo"},{name:"ttl_seconds",type:"flags.2?int"}],type:"MessageMedia"},{id:1457575028,predicate:"messageMediaGeo",params:[{name:"geo",type:"GeoPoint"}],type:"MessageMedia"},{id:1882335561,predicate:"messageMediaContact",params:[{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"vcard",type:"string"},{name:"user_id",type:"long"}],type:"MessageMedia"},{id:-1618676578,predicate:"messageMediaUnsupported",params:[],type:"MessageMedia"},{id:-1230047312,predicate:"messageActionEmpty",params:[],type:"MessageAction"},{id:-1119368275,predicate:"messageActionChatCreate",params:[{name:"title",type:"string"},{name:"users",type:"Vector<long>"}],type:"MessageAction"},{id:-1247687078,predicate:"messageActionChatEditTitle",params:[{name:"title",type:"string"}],type:"MessageAction"},{id:2144015272,predicate:"messageActionChatEditPhoto",params:[{name:"photo",type:"Photo"}],type:"MessageAction"},{id:-1780220945,predicate:"messageActionChatDeletePhoto",params:[],type:"MessageAction"},{id:365886720,predicate:"messageActionChatAddUser",params:[{name:"users",type:"Vector<long>"}],type:"MessageAction"},{id:-1539362612,predicate:"messageActionChatDeleteUser",params:[{name:"user_id",type:"long"}],type:"MessageAction"},{id:-712374074,predicate:"dialog",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.2?true"},{name:"unread_mark",type:"flags.3?true"},{name:"peer",type:"Peer"},{name:"top_message",type:"int"},{name:"read_inbox_max_id",type:"int"},{name:"read_outbox_max_id",type:"int"},{name:"unread_count",type:"int"},{name:"unread_mentions_count",type:"int"},{name:"unread_reactions_count",type:"int"},{name:"notify_settings",type:"PeerNotifySettings"},{name:"pts",type:"flags.0?int"},{name:"draft",type:"flags.1?DraftMessage"},{name:"folder_id",type:"flags.4?int"},{name:"ttl_period",type:"flags.5?int"}],type:"Dialog"},{id:590459437,predicate:"photoEmpty",params:[{name:"id",type:"long"}],type:"Photo"},{id:-82216347,predicate:"photo",params:[{name:"flags",type:"#"},{name:"has_stickers",type:"flags.0?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"},{name:"date",type:"int"},{name:"sizes",type:"Vector<PhotoSize>"},{name:"video_sizes",type:"flags.1?Vector<VideoSize>"},{name:"dc_id",type:"int"}],type:"Photo"},{id:236446268,predicate:"photoSizeEmpty",params:[{name:"type",type:"string"}],type:"PhotoSize"},{id:1976012384,predicate:"photoSize",params:[{name:"type",type:"string"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"size",type:"int"}],type:"PhotoSize"},{id:35527382,predicate:"photoCachedSize",params:[{name:"type",type:"string"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"bytes",type:"bytes"}],type:"PhotoSize"},{id:286776671,predicate:"geoPointEmpty",params:[],type:"GeoPoint"},{id:-1297942941,predicate:"geoPoint",params:[{name:"flags",type:"#"},{name:"long",type:"double"},{name:"lat",type:"double"},{name:"access_hash",type:"long"},{name:"accuracy_radius",type:"flags.0?int"}],type:"GeoPoint"},{id:1577067778,predicate:"auth.sentCode",params:[{name:"flags",type:"#"},{name:"type",type:"auth.SentCodeType"},{name:"phone_code_hash",type:"string"},{name:"next_type",type:"flags.1?auth.CodeType"},{name:"timeout",type:"flags.2?int"}],type:"auth.SentCode"},{id:782418132,predicate:"auth.authorization",params:[{name:"flags",type:"#"},{name:"setup_password_required",type:"flags.1?true"},{name:"otherwise_relogin_days",type:"flags.1?int"},{name:"tmp_sessions",type:"flags.0?int"},{name:"future_auth_token",type:"flags.2?bytes"},{name:"user",type:"User"}],type:"auth.Authorization"},{id:-1271602504,predicate:"auth.exportedAuthorization",params:[{name:"id",type:"long"},{name:"bytes",type:"bytes"}],type:"auth.ExportedAuthorization"},{id:-1195615476,predicate:"inputNotifyPeer",params:[{name:"peer",type:"InputPeer"}],type:"InputNotifyPeer"},{id:423314455,predicate:"inputNotifyUsers",params:[],type:"InputNotifyPeer"},{id:1251338318,predicate:"inputNotifyChats",params:[],type:"InputNotifyPeer"},{id:-551616469,predicate:"inputPeerNotifySettings",params:[{name:"flags",type:"#"},{name:"show_previews",type:"flags.0?Bool"},{name:"silent",type:"flags.1?Bool"},{name:"mute_until",type:"flags.2?int"},{name:"sound",type:"flags.3?NotificationSound"}],type:"InputPeerNotifySettings"},{id:-1472527322,predicate:"peerNotifySettings",params:[{name:"flags",type:"#"},{name:"show_previews",type:"flags.0?Bool"},{name:"silent",type:"flags.1?Bool"},{name:"mute_until",type:"flags.2?int"},{name:"ios_sound",type:"flags.3?NotificationSound"},{name:"android_sound",type:"flags.4?NotificationSound"},{name:"other_sound",type:"flags.5?NotificationSound"}],type:"PeerNotifySettings"},{id:-1525149427,predicate:"peerSettings",params:[{name:"flags",type:"#"},{name:"report_spam",type:"flags.0?true"},{name:"add_contact",type:"flags.1?true"},{name:"block_contact",type:"flags.2?true"},{name:"share_contact",type:"flags.3?true"},{name:"need_contacts_exception",type:"flags.4?true"},{name:"report_geo",type:"flags.5?true"},{name:"autoarchived",type:"flags.7?true"},{name:"invite_members",type:"flags.8?true"},{name:"request_chat_broadcast",type:"flags.10?true"},{name:"geo_distance",type:"flags.6?int"},{name:"request_chat_title",type:"flags.9?string"},{name:"request_chat_date",type:"flags.9?int"}],type:"PeerSettings"},{id:-1539849235,predicate:"wallPaper",params:[{name:"id",type:"long"},{name:"flags",type:"#"},{name:"creator",type:"flags.0?true"},{name:"default",type:"flags.1?true"},{name:"pattern",type:"flags.3?true"},{name:"dark",type:"flags.4?true"},{name:"access_hash",type:"long"},{name:"slug",type:"string"},{name:"document",type:"Document"},{name:"settings",type:"flags.2?WallPaperSettings"}],type:"WallPaper"},{id:1490799288,predicate:"inputReportReasonSpam",params:[],type:"ReportReason"},{id:505595789,predicate:"inputReportReasonViolence",params:[],type:"ReportReason"},{id:777640226,predicate:"inputReportReasonPornography",params:[],type:"ReportReason"},{id:-1376497949,predicate:"inputReportReasonChildAbuse",params:[],type:"ReportReason"},{id:-1041980751,predicate:"inputReportReasonOther",params:[],type:"ReportReason"},{id:-120378643,predicate:"userFull",params:[{name:"flags",type:"#"},{name:"blocked",type:"flags.0?true"},{name:"phone_calls_available",type:"flags.4?true"},{name:"phone_calls_private",type:"flags.5?true"},{name:"can_pin_message",type:"flags.7?true"},{name:"has_scheduled",type:"flags.12?true"},{name:"video_calls_available",type:"flags.13?true"},{name:"voice_messages_forbidden",type:"flags.20?true"},{name:"translations_disabled",type:"flags.23?true"},{name:"id",type:"long"},{name:"about",type:"flags.1?string"},{name:"settings",type:"PeerSettings"},{name:"personal_photo",type:"flags.21?Photo"},{name:"profile_photo",type:"flags.2?Photo"},{name:"fallback_photo",type:"flags.22?Photo"},{name:"notify_settings",type:"PeerNotifySettings"},{name:"bot_info",type:"flags.3?BotInfo"},{name:"pinned_msg_id",type:"flags.6?int"},{name:"common_chats_count",type:"int"},{name:"folder_id",type:"flags.11?int"},{name:"ttl_period",type:"flags.14?int"},{name:"theme_emoticon",type:"flags.15?string"},{name:"private_forward_name",type:"flags.16?string"},{name:"bot_group_admin_rights",type:"flags.17?ChatAdminRights"},{name:"bot_broadcast_admin_rights",type:"flags.18?ChatAdminRights"},{name:"premium_gifts",type:"flags.19?Vector<PremiumGiftOption>"}],type:"UserFull"},{id:341499403,predicate:"contact",params:[{name:"user_id",type:"long"},{name:"mutual",type:"Bool"}],type:"Contact"},{id:-1052885936,predicate:"importedContact",params:[{name:"user_id",type:"long"},{name:"client_id",type:"long"}],type:"ImportedContact"},{id:383348795,predicate:"contactStatus",params:[{name:"user_id",type:"long"},{name:"status",type:"UserStatus"}],type:"ContactStatus"},{id:-1219778094,predicate:"contacts.contactsNotModified",params:[],type:"contacts.Contacts"},{id:-353862078,predicate:"contacts.contacts",params:[{name:"contacts",type:"Vector<Contact>"},{name:"saved_count",type:"int"},{name:"users",type:"Vector<User>"}],type:"contacts.Contacts"},{id:2010127419,predicate:"contacts.importedContacts",params:[{name:"imported",type:"Vector<ImportedContact>"},{name:"popular_invites",type:"Vector<PopularContact>"},{name:"retry_contacts",type:"Vector<long>"},{name:"users",type:"Vector<User>"}],type:"contacts.ImportedContacts"},{id:182326673,predicate:"contacts.blocked",params:[{name:"blocked",type:"Vector<PeerBlocked>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"contacts.Blocked"},{id:-513392236,predicate:"contacts.blockedSlice",params:[{name:"count",type:"int"},{name:"blocked",type:"Vector<PeerBlocked>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"contacts.Blocked"},{id:364538944,predicate:"messages.dialogs",params:[{name:"dialogs",type:"Vector<Dialog>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Dialogs"},{id:1910543603,predicate:"messages.dialogsSlice",params:[{name:"count",type:"int"},{name:"dialogs",type:"Vector<Dialog>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Dialogs"},{id:-1938715001,predicate:"messages.messages",params:[{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Messages"},{id:978610270,predicate:"messages.messagesSlice",params:[{name:"flags",type:"#"},{name:"inexact",type:"flags.1?true"},{name:"count",type:"int"},{name:"next_rate",type:"flags.0?int"},{name:"offset_id_offset",type:"flags.2?int"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Messages"},{id:1694474197,predicate:"messages.chats",params:[{name:"chats",type:"Vector<Chat>"}],type:"messages.Chats"},{id:-438840932,predicate:"messages.chatFull",params:[{name:"full_chat",type:"ChatFull"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.ChatFull"},{id:-1269012015,predicate:"messages.affectedHistory",params:[{name:"pts",type:"int"},{name:"pts_count",type:"int"},{name:"offset",type:"int"}],type:"messages.AffectedHistory"},{id:1474492012,predicate:"inputMessagesFilterEmpty",params:[],type:"MessagesFilter"},{id:-1777752804,predicate:"inputMessagesFilterPhotos",params:[],type:"MessagesFilter"},{id:-1614803355,predicate:"inputMessagesFilterVideo",params:[],type:"MessagesFilter"},{id:1458172132,predicate:"inputMessagesFilterPhotoVideo",params:[],type:"MessagesFilter"},{id:-1629621880,predicate:"inputMessagesFilterDocument",params:[],type:"MessagesFilter"},{id:2129714567,predicate:"inputMessagesFilterUrl",params:[],type:"MessagesFilter"},{id:-3644025,predicate:"inputMessagesFilterGif",params:[],type:"MessagesFilter"},{id:522914557,predicate:"updateNewMessage",params:[{name:"message",type:"Message"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:1318109142,predicate:"updateMessageID",params:[{name:"id",type:"int"},{name:"random_id",type:"long"}],type:"Update"},{id:-1576161051,predicate:"updateDeleteMessages",params:[{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-1071741569,predicate:"updateUserTyping",params:[{name:"user_id",type:"long"},{name:"action",type:"SendMessageAction"}],type:"Update"},{id:-2092401936,predicate:"updateChatUserTyping",params:[{name:"chat_id",type:"long"},{name:"from_id",type:"Peer"},{name:"action",type:"SendMessageAction"}],type:"Update"},{id:125178264,predicate:"updateChatParticipants",params:[{name:"participants",type:"ChatParticipants"}],type:"Update"},{id:-440534818,predicate:"updateUserStatus",params:[{name:"user_id",type:"long"},{name:"status",type:"UserStatus"}],type:"Update"},{id:-1484486364,predicate:"updateUserName",params:[{name:"user_id",type:"long"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"usernames",type:"Vector<Username>"}],type:"Update"},{id:-1519637954,predicate:"updates.state",params:[{name:"pts",type:"int"},{name:"qts",type:"int"},{name:"date",type:"int"},{name:"seq",type:"int"},{name:"unread_count",type:"int"}],type:"updates.State"},{id:1567990072,predicate:"updates.differenceEmpty",params:[{name:"date",type:"int"},{name:"seq",type:"int"}],type:"updates.Difference"},{id:16030880,predicate:"updates.difference",params:[{name:"new_messages",type:"Vector<Message>"},{name:"new_encrypted_messages",type:"Vector<EncryptedMessage>"},{name:"other_updates",type:"Vector<Update>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"state",type:"updates.State"}],type:"updates.Difference"},{id:-1459938943,predicate:"updates.differenceSlice",params:[{name:"new_messages",type:"Vector<Message>"},{name:"new_encrypted_messages",type:"Vector<EncryptedMessage>"},{name:"other_updates",type:"Vector<Update>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"intermediate_state",type:"updates.State"}],type:"updates.Difference"},{id:-484987010,predicate:"updatesTooLong",params:[],type:"Updates"},{id:826001400,predicate:"updateShortMessage",params:[{name:"flags",type:"#"},{name:"out",type:"flags.1?true"},{name:"mentioned",type:"flags.4?true"},{name:"media_unread",type:"flags.5?true"},{name:"silent",type:"flags.13?true"},{name:"id",type:"int"},{name:"user_id",type:"long"},{name:"message",type:"string"},{name:"pts",type:"int"},{name:"pts_count",type:"int"},{name:"date",type:"int"},{name:"fwd_from",type:"flags.2?MessageFwdHeader"},{name:"via_bot_id",type:"flags.11?long"},{name:"reply_to",type:"flags.3?MessageReplyHeader"},{name:"entities",type:"flags.7?Vector<MessageEntity>"},{name:"ttl_period",type:"flags.25?int"}],type:"Updates"},{id:1299050149,predicate:"updateShortChatMessage",params:[{name:"flags",type:"#"},{name:"out",type:"flags.1?true"},{name:"mentioned",type:"flags.4?true"},{name:"media_unread",type:"flags.5?true"},{name:"silent",type:"flags.13?true"},{name:"id",type:"int"},{name:"from_id",type:"long"},{name:"chat_id",type:"long"},{name:"message",type:"string"},{name:"pts",type:"int"},{name:"pts_count",type:"int"},{name:"date",type:"int"},{name:"fwd_from",type:"flags.2?MessageFwdHeader"},{name:"via_bot_id",type:"flags.11?long"},{name:"reply_to",type:"flags.3?MessageReplyHeader"},{name:"entities",type:"flags.7?Vector<MessageEntity>"},{name:"ttl_period",type:"flags.25?int"}],type:"Updates"},{id:2027216577,predicate:"updateShort",params:[{name:"update",type:"Update"},{name:"date",type:"int"}],type:"Updates"},{id:1918567619,predicate:"updatesCombined",params:[{name:"updates",type:"Vector<Update>"},{name:"users",type:"Vector<User>"},{name:"chats",type:"Vector<Chat>"},{name:"date",type:"int"},{name:"seq_start",type:"int"},{name:"seq",type:"int"}],type:"Updates"},{id:1957577280,predicate:"updates",params:[{name:"updates",type:"Vector<Update>"},{name:"users",type:"Vector<User>"},{name:"chats",type:"Vector<Chat>"},{name:"date",type:"int"},{name:"seq",type:"int"}],type:"Updates"},{id:-1916114267,predicate:"photos.photos",params:[{name:"photos",type:"Vector<Photo>"},{name:"users",type:"Vector<User>"}],type:"photos.Photos"},{id:352657236,predicate:"photos.photosSlice",params:[{name:"count",type:"int"},{name:"photos",type:"Vector<Photo>"},{name:"users",type:"Vector<User>"}],type:"photos.Photos"},{id:539045032,predicate:"photos.photo",params:[{name:"photo",type:"Photo"},{name:"users",type:"Vector<User>"}],type:"photos.Photo"},{id:157948117,predicate:"upload.file",params:[{name:"type",type:"storage.FileType"},{name:"mtime",type:"int"},{name:"bytes",type:"bytes"}],type:"upload.File"},{id:414687501,predicate:"dcOption",params:[{name:"flags",type:"#"},{name:"ipv6",type:"flags.0?true"},{name:"media_only",type:"flags.1?true"},{name:"tcpo_only",type:"flags.2?true"},{name:"cdn",type:"flags.3?true"},{name:"static",type:"flags.4?true"},{name:"this_port_only",type:"flags.5?true"},{name:"id",type:"int"},{name:"ip_address",type:"string"},{name:"port",type:"int"},{name:"secret",type:"flags.10?bytes"}],type:"DcOption"},{id:-870702050,predicate:"config",params:[{name:"flags",type:"#"},{name:"default_p2p_contacts",type:"flags.3?true"},{name:"preload_featured_stickers",type:"flags.4?true"},{name:"revoke_pm_inbox",type:"flags.6?true"},{name:"blocked_mode",type:"flags.8?true"},{name:"force_try_ipv6",type:"flags.14?true"},{name:"date",type:"int"},{name:"expires",type:"int"},{name:"test_mode",type:"Bool"},{name:"this_dc",type:"int"},{name:"dc_options",type:"Vector<DcOption>"},{name:"dc_txt_domain_name",type:"string"},{name:"chat_size_max",type:"int"},{name:"megagroup_size_max",type:"int"},{name:"forwarded_count_max",type:"int"},{name:"online_update_period_ms",type:"int"},{name:"offline_blur_timeout_ms",type:"int"},{name:"offline_idle_timeout_ms",type:"int"},{name:"online_cloud_timeout_ms",type:"int"},{name:"notify_cloud_delay_ms",type:"int"},{name:"notify_default_delay_ms",type:"int"},{name:"push_chat_period_ms",type:"int"},{name:"push_chat_limit",type:"int"},{name:"edit_time_limit",type:"int"},{name:"revoke_time_limit",type:"int"},{name:"revoke_pm_time_limit",type:"int"},{name:"rating_e_decay",type:"int"},{name:"stickers_recent_limit",type:"int"},{name:"channels_read_media_period",type:"int"},{name:"tmp_sessions",type:"flags.0?int"},{name:"call_receive_timeout_ms",type:"int"},{name:"call_ring_timeout_ms",type:"int"},{name:"call_connect_timeout_ms",type:"int"},{name:"call_packet_timeout_ms",type:"int"},{name:"me_url_prefix",type:"string"},{name:"autoupdate_url_prefix",type:"flags.7?string"},{name:"gif_search_username",type:"flags.9?string"},{name:"venue_search_username",type:"flags.10?string"},{name:"img_search_username",type:"flags.11?string"},{name:"static_maps_provider",type:"flags.12?string"},{name:"caption_length_max",type:"int"},{name:"message_length_max",type:"int"},{name:"webfile_dc_id",type:"int"},{name:"suggested_lang_code",type:"flags.2?string"},{name:"lang_pack_version",type:"flags.2?int"},{name:"base_lang_pack_version",type:"flags.2?int"},{name:"reactions_default",type:"flags.15?Reaction"},{name:"autologin_token",type:"flags.16?string"}],type:"Config"},{id:-1910892683,predicate:"nearestDc",params:[{name:"country",type:"string"},{name:"this_dc",type:"int"},{name:"nearest_dc",type:"int"}],type:"NearestDc"},{id:-860107216,predicate:"help.appUpdate",params:[{name:"flags",type:"#"},{name:"can_not_skip",type:"flags.0?true"},{name:"id",type:"int"},{name:"version",type:"string"},{name:"text",type:"string"},{name:"entities",type:"Vector<MessageEntity>"},{name:"document",type:"flags.1?Document"},{name:"url",type:"flags.2?string"},{name:"sticker",type:"flags.3?Document"}],type:"help.AppUpdate"},{id:-1000708810,predicate:"help.noAppUpdate",params:[],type:"help.AppUpdate"},{id:415997816,predicate:"help.inviteText",params:[{name:"message",type:"string"}],type:"help.InviteText"},{id:314359194,predicate:"updateNewEncryptedMessage",params:[{name:"message",type:"EncryptedMessage"},{name:"qts",type:"int"}],type:"Update"},{id:386986326,predicate:"updateEncryptedChatTyping",params:[{name:"chat_id",type:"int"}],type:"Update"},{id:-1264392051,predicate:"updateEncryption",params:[{name:"chat",type:"EncryptedChat"},{name:"date",type:"int"}],type:"Update"},{id:956179895,predicate:"updateEncryptedMessagesRead",params:[{name:"chat_id",type:"int"},{name:"max_date",type:"int"},{name:"date",type:"int"}],type:"Update"},{id:-1417756512,predicate:"encryptedChatEmpty",params:[{name:"id",type:"int"}],type:"EncryptedChat"},{id:1722964307,predicate:"encryptedChatWaiting",params:[{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"}],type:"EncryptedChat"},{id:1223809356,predicate:"encryptedChatRequested",params:[{name:"flags",type:"#"},{name:"folder_id",type:"flags.0?int"},{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"},{name:"g_a",type:"bytes"}],type:"EncryptedChat"},{id:1643173063,predicate:"encryptedChat",params:[{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"},{name:"g_a_or_b",type:"bytes"},{name:"key_fingerprint",type:"long"}],type:"EncryptedChat"},{id:505183301,predicate:"encryptedChatDiscarded",params:[{name:"flags",type:"#"},{name:"history_deleted",type:"flags.0?true"},{name:"id",type:"int"}],type:"EncryptedChat"},{id:-247351839,predicate:"inputEncryptedChat",params:[{name:"chat_id",type:"int"},{name:"access_hash",type:"long"}],type:"InputEncryptedChat"},{id:-1038136962,predicate:"encryptedFileEmpty",params:[],type:"EncryptedFile"},{id:-1476358952,predicate:"encryptedFile",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"size",type:"long"},{name:"dc_id",type:"int"},{name:"key_fingerprint",type:"int"}],type:"EncryptedFile"},{id:406307684,predicate:"inputEncryptedFileEmpty",params:[],type:"InputEncryptedFile"},{id:1690108678,predicate:"inputEncryptedFileUploaded",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"md5_checksum",type:"string"},{name:"key_fingerprint",type:"int"}],type:"InputEncryptedFile"},{id:1511503333,predicate:"inputEncryptedFile",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputEncryptedFile"},{id:-182231723,predicate:"inputEncryptedFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputFileLocation"},{id:-317144808,predicate:"encryptedMessage",params:[{name:"random_id",type:"long"},{name:"chat_id",type:"int"},{name:"date",type:"int"},{name:"bytes",type:"bytes"},{name:"file",type:"EncryptedFile"}],type:"EncryptedMessage"},{id:594758406,predicate:"encryptedMessageService",params:[{name:"random_id",type:"long"},{name:"chat_id",type:"int"},{name:"date",type:"int"},{name:"bytes",type:"bytes"}],type:"EncryptedMessage"},{id:-1058912715,predicate:"messages.dhConfigNotModified",params:[{name:"random",type:"bytes"}],type:"messages.DhConfig"},{id:740433629,predicate:"messages.dhConfig",params:[{name:"g",type:"int"},{name:"p",type:"bytes"},{name:"version",type:"int"},{name:"random",type:"bytes"}],type:"messages.DhConfig"},{id:1443858741,predicate:"messages.sentEncryptedMessage",params:[{name:"date",type:"int"}],type:"messages.SentEncryptedMessage"},{id:-1802240206,predicate:"messages.sentEncryptedFile",params:[{name:"date",type:"int"},{name:"file",type:"EncryptedFile"}],type:"messages.SentEncryptedMessage"},{id:-95482955,predicate:"inputFileBig",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"name",type:"string"}],type:"InputFile"},{id:767652808,predicate:"inputEncryptedFileBigUploaded",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"key_fingerprint",type:"int"}],type:"InputEncryptedFile"},{id:1037718609,predicate:"updateChatParticipantAdd",params:[{name:"chat_id",type:"long"},{name:"user_id",type:"long"},{name:"inviter_id",type:"long"},{name:"date",type:"int"},{name:"version",type:"int"}],type:"Update"},{id:-483443337,predicate:"updateChatParticipantDelete",params:[{name:"chat_id",type:"long"},{name:"user_id",type:"long"},{name:"version",type:"int"}],type:"Update"},{id:-1906403213,predicate:"updateDcOptions",params:[{name:"dc_options",type:"Vector<DcOption>"}],type:"Update"},{id:1530447553,predicate:"inputMediaUploadedDocument",params:[{name:"flags",type:"#"},{name:"nosound_video",type:"flags.3?true"},{name:"force_file",type:"flags.4?true"},{name:"spoiler",type:"flags.5?true"},{name:"file",type:"InputFile"},{name:"thumb",type:"flags.2?InputFile"},{name:"mime_type",type:"string"},{name:"attributes",type:"Vector<DocumentAttribute>"},{name:"stickers",type:"flags.0?Vector<InputDocument>"},{name:"ttl_seconds",type:"flags.1?int"}],type:"InputMedia"},{id:860303448,predicate:"inputMediaDocument",params:[{name:"flags",type:"#"},{name:"spoiler",type:"flags.2?true"},{name:"id",type:"InputDocument"},{name:"ttl_seconds",type:"flags.0?int"},{name:"query",type:"flags.1?string"}],type:"InputMedia"},{id:-1666158377,predicate:"messageMediaDocument",params:[{name:"flags",type:"#"},{name:"nopremium",type:"flags.3?true"},{name:"spoiler",type:"flags.4?true"},{name:"document",type:"flags.0?Document"},{name:"ttl_seconds",type:"flags.2?int"}],type:"MessageMedia"},{id:1928391342,predicate:"inputDocumentEmpty",params:[],type:"InputDocument"},{id:448771445,predicate:"inputDocument",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"}],type:"InputDocument"},{id:-1160743548,predicate:"inputDocumentFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"},{name:"thumb_size",type:"string"}],type:"InputFileLocation"},{id:922273905,predicate:"documentEmpty",params:[{name:"id",type:"long"}],type:"Document"},{id:-1881881384,predicate:"document",params:[{name:"flags",type:"#"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"},{name:"date",type:"int"},{name:"mime_type",type:"string"},{name:"size",type:"long"},{name:"thumbs",type:"flags.0?Vector<PhotoSize>"},{name:"video_thumbs",type:"flags.1?Vector<VideoSize>"},{name:"dc_id",type:"int"},{name:"attributes",type:"Vector<DocumentAttribute>"}],type:"Document"},{id:398898678,predicate:"help.support",params:[{name:"phone_number",type:"string"},{name:"user",type:"User"}],type:"help.Support"},{id:-1613493288,predicate:"notifyPeer",params:[{name:"peer",type:"Peer"}],type:"NotifyPeer"},{id:-1261946036,predicate:"notifyUsers",params:[],type:"NotifyPeer"},{id:-1073230141,predicate:"notifyChats",params:[],type:"NotifyPeer"},{id:-1094555409,predicate:"updateNotifySettings",params:[{name:"peer",type:"NotifyPeer"},{name:"notify_settings",type:"PeerNotifySettings"}],type:"Update"},{id:381645902,predicate:"sendMessageTypingAction",params:[],type:"SendMessageAction"},{id:-44119819,predicate:"sendMessageCancelAction",params:[],type:"SendMessageAction"},{id:-1584933265,predicate:"sendMessageRecordVideoAction",params:[],type:"SendMessageAction"},{id:-378127636,predicate:"sendMessageUploadVideoAction",params:[{name:"progress",type:"int"}],type:"SendMessageAction"},{id:-718310409,predicate:"sendMessageRecordAudioAction",params:[],type:"SendMessageAction"},{id:-212740181,predicate:"sendMessageUploadAudioAction",params:[{name:"progress",type:"int"}],type:"SendMessageAction"},{id:-774682074,predicate:"sendMessageUploadPhotoAction",params:[{name:"progress",type:"int"}],type:"SendMessageAction"},{id:-1441998364,predicate:"sendMessageUploadDocumentAction",params:[{name:"progress",type:"int"}],type:"SendMessageAction"},{id:393186209,predicate:"sendMessageGeoLocationAction",params:[],type:"SendMessageAction"},{id:1653390447,predicate:"sendMessageChooseContactAction",params:[],type:"SendMessageAction"},{id:-1290580579,predicate:"contacts.found",params:[{name:"my_results",type:"Vector<Peer>"},{name:"results",type:"Vector<Peer>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"contacts.Found"},{id:-337352679,predicate:"updateServiceNotification",params:[{name:"flags",type:"#"},{name:"popup",type:"flags.0?true"},{name:"inbox_date",type:"flags.1?int"},{name:"type",type:"string"},{name:"message",type:"string"},{name:"media",type:"MessageMedia"},{name:"entities",type:"Vector<MessageEntity>"}],type:"Update"},{id:-496024847,predicate:"userStatusRecently",params:[],type:"UserStatus"},{id:129960444,predicate:"userStatusLastWeek",params:[],type:"UserStatus"},{id:2011940674,predicate:"userStatusLastMonth",params:[],type:"UserStatus"},{id:-298113238,predicate:"updatePrivacy",params:[{name:"key",type:"PrivacyKey"},{name:"rules",type:"Vector<PrivacyRule>"}],type:"Update"},{id:1335282456,predicate:"inputPrivacyKeyStatusTimestamp",params:[],type:"InputPrivacyKey"},{id:-1137792208,predicate:"privacyKeyStatusTimestamp",params:[],type:"PrivacyKey"},{id:218751099,predicate:"inputPrivacyValueAllowContacts",params:[],type:"InputPrivacyRule"},{id:407582158,predicate:"inputPrivacyValueAllowAll",params:[],type:"InputPrivacyRule"},{id:320652927,predicate:"inputPrivacyValueAllowUsers",params:[{name:"users",type:"Vector<InputUser>"}],type:"InputPrivacyRule"},{id:195371015,predicate:"inputPrivacyValueDisallowContacts",params:[],type:"InputPrivacyRule"},{id:-697604407,predicate:"inputPrivacyValueDisallowAll",params:[],type:"InputPrivacyRule"},{id:-1877932953,predicate:"inputPrivacyValueDisallowUsers",params:[{name:"users",type:"Vector<InputUser>"}],type:"InputPrivacyRule"},{id:-123988,predicate:"privacyValueAllowContacts",params:[],type:"PrivacyRule"},{id:1698855810,predicate:"privacyValueAllowAll",params:[],type:"PrivacyRule"},{id:-1198497870,predicate:"privacyValueAllowUsers",params:[{name:"users",type:"Vector<long>"}],type:"PrivacyRule"},{id:-125240806,predicate:"privacyValueDisallowContacts",params:[],type:"PrivacyRule"},{id:-1955338397,predicate:"privacyValueDisallowAll",params:[],type:"PrivacyRule"},{id:-463335103,predicate:"privacyValueDisallowUsers",params:[{name:"users",type:"Vector<long>"}],type:"PrivacyRule"},{id:1352683077,predicate:"account.privacyRules",params:[{name:"rules",type:"Vector<PrivacyRule>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"account.PrivacyRules"},{id:-1194283041,predicate:"accountDaysTTL",params:[{name:"days",type:"int"}],type:"AccountDaysTTL"},{id:88680979,predicate:"updateUserPhone",params:[{name:"user_id",type:"long"},{name:"phone",type:"string"}],type:"Update"},{id:1815593308,predicate:"documentAttributeImageSize",params:[{name:"w",type:"int"},{name:"h",type:"int"}],type:"DocumentAttribute"},{id:297109817,predicate:"documentAttributeAnimated",params:[],type:"DocumentAttribute"},{id:1662637586,predicate:"documentAttributeSticker",params:[{name:"flags",type:"#"},{name:"mask",type:"flags.1?true"},{name:"alt",type:"string"},{name:"stickerset",type:"InputStickerSet"},{name:"mask_coords",type:"flags.0?MaskCoords"}],type:"DocumentAttribute"},{id:250621158,predicate:"documentAttributeVideo",params:[{name:"flags",type:"#"},{name:"round_message",type:"flags.0?true"},{name:"supports_streaming",type:"flags.1?true"},{name:"duration",type:"int"},{name:"w",type:"int"},{name:"h",type:"int"}],type:"DocumentAttribute"},{id:-1739392570,predicate:"documentAttributeAudio",params:[{name:"flags",type:"#"},{name:"voice",type:"flags.10?true"},{name:"duration",type:"int"},{name:"title",type:"flags.0?string"},{name:"performer",type:"flags.1?string"},{name:"waveform",type:"flags.2?bytes"}],type:"DocumentAttribute"},{id:358154344,predicate:"documentAttributeFilename",params:[{name:"file_name",type:"string"}],type:"DocumentAttribute"},{id:-244016606,predicate:"messages.stickersNotModified",params:[],type:"messages.Stickers"},{id:816245886,predicate:"messages.stickers",params:[{name:"hash",type:"long"},{name:"stickers",type:"Vector<Document>"}],type:"messages.Stickers"},{id:313694676,predicate:"stickerPack",params:[{name:"emoticon",type:"string"},{name:"documents",type:"Vector<long>"}],type:"StickerPack"},{id:-395967805,predicate:"messages.allStickersNotModified",params:[],type:"messages.AllStickers"},{id:-843329861,predicate:"messages.allStickers",params:[{name:"hash",type:"long"},{name:"sets",type:"Vector<StickerSet>"}],type:"messages.AllStickers"},{id:-1667805217,predicate:"updateReadHistoryInbox",params:[{name:"flags",type:"#"},{name:"folder_id",type:"flags.0?int"},{name:"peer",type:"Peer"},{name:"max_id",type:"int"},{name:"still_unread_count",type:"int"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:791617983,predicate:"updateReadHistoryOutbox",params:[{name:"peer",type:"Peer"},{name:"max_id",type:"int"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-2066640507,predicate:"messages.affectedMessages",params:[{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"messages.AffectedMessages"},{id:2139689491,predicate:"updateWebPage",params:[{name:"webpage",type:"WebPage"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-350980120,predicate:"webPageEmpty",params:[{name:"id",type:"long"}],type:"WebPage"},{id:-981018084,predicate:"webPagePending",params:[{name:"id",type:"long"},{name:"date",type:"int"}],type:"WebPage"},{id:-392411726,predicate:"webPage",params:[{name:"flags",type:"#"},{name:"id",type:"long"},{name:"url",type:"string"},{name:"display_url",type:"string"},{name:"hash",type:"int"},{name:"type",type:"flags.0?string"},{name:"site_name",type:"flags.1?string"},{name:"title",type:"flags.2?string"},{name:"description",type:"flags.3?string"},{name:"photo",type:"flags.4?Photo"},{name:"embed_url",type:"flags.5?string"},{name:"embed_type",type:"flags.5?string"},{name:"embed_width",type:"flags.6?int"},{name:"embed_height",type:"flags.6?int"},{name:"duration",type:"flags.7?int"},{name:"author",type:"flags.8?string"},{name:"document",type:"flags.9?Document"},{name:"cached_page",type:"flags.10?Page"},{name:"attributes",type:"flags.12?Vector<WebPageAttribute>"}],type:"WebPage"},{id:-1557277184,predicate:"messageMediaWebPage",params:[{name:"webpage",type:"WebPage"}],type:"MessageMedia"},{id:-1392388579,predicate:"authorization",params:[{name:"flags",type:"#"},{name:"current",type:"flags.0?true"},{name:"official_app",type:"flags.1?true"},{name:"password_pending",type:"flags.2?true"},{name:"encrypted_requests_disabled",type:"flags.3?true"},{name:"call_requests_disabled",type:"flags.4?true"},{name:"hash",type:"long"},{name:"device_model",type:"string"},{name:"platform",type:"string"},{name:"system_version",type:"string"},{name:"api_id",type:"int"},{name:"app_name",type:"string"},{name:"app_version",type:"string"},{name:"date_created",type:"int"},{name:"date_active",type:"int"},{name:"ip",type:"string"},{name:"country",type:"string"},{name:"region",type:"string"}],type:"Authorization"},{id:1275039392,predicate:"account.authorizations",params:[{name:"authorization_ttl_days",type:"int"},{name:"authorizations",type:"Vector<Authorization>"}],type:"account.Authorizations"},{id:-1787080453,predicate:"account.password",params:[{name:"flags",type:"#"},{name:"has_recovery",type:"flags.0?true"},{name:"has_secure_values",type:"flags.1?true"},{name:"has_password",type:"flags.2?true"},{name:"current_algo",type:"flags.2?PasswordKdfAlgo"},{name:"srp_B",type:"flags.2?bytes"},{name:"srp_id",type:"flags.2?long"},{name:"hint",type:"flags.3?string"},{name:"email_unconfirmed_pattern",type:"flags.4?string"},{name:"new_algo",type:"PasswordKdfAlgo"},{name:"new_secure_algo",type:"SecurePasswordKdfAlgo"},{name:"secure_random",type:"bytes"},{name:"pending_reset_date",type:"flags.5?int"},{name:"login_email_pattern",type:"flags.6?string"}],type:"account.Password"},{id:-1705233435,predicate:"account.passwordSettings",params:[{name:"flags",type:"#"},{name:"email",type:"flags.0?string"},{name:"secure_settings",type:"flags.1?SecureSecretSettings"}],type:"account.PasswordSettings"},{id:-1036572727,predicate:"account.passwordInputSettings",params:[{name:"flags",type:"#"},{name:"new_algo",type:"flags.0?PasswordKdfAlgo"},{name:"new_password_hash",type:"flags.0?bytes"},{name:"hint",type:"flags.0?string"},{name:"email",type:"flags.1?string"},{name:"new_secure_settings",type:"flags.2?SecureSecretSettings"}],type:"account.PasswordInputSettings"},{id:326715557,predicate:"auth.passwordRecovery",params:[{name:"email_pattern",type:"string"}],type:"auth.PasswordRecovery"},{id:-1052959727,predicate:"inputMediaVenue",params:[{name:"geo_point",type:"InputGeoPoint"},{name:"title",type:"string"},{name:"address",type:"string"},{name:"provider",type:"string"},{name:"venue_id",type:"string"},{name:"venue_type",type:"string"}],type:"InputMedia"},{id:784356159,predicate:"messageMediaVenue",params:[{name:"geo",type:"GeoPoint"},{name:"title",type:"string"},{name:"address",type:"string"},{name:"provider",type:"string"},{name:"venue_id",type:"string"},{name:"venue_type",type:"string"}],type:"MessageMedia"},{id:-1551583367,predicate:"receivedNotifyMessage",params:[{name:"id",type:"int"},{name:"flags",type:"int"}],type:"ReceivedNotifyMessage"},{id:179611673,predicate:"chatInviteExported",params:[{name:"flags",type:"#"},{name:"revoked",type:"flags.0?true"},{name:"permanent",type:"flags.5?true"},{name:"request_needed",type:"flags.6?true"},{name:"link",type:"string"},{name:"admin_id",type:"long"},{name:"date",type:"int"},{name:"start_date",type:"flags.4?int"},{name:"expire_date",type:"flags.1?int"},{name:"usage_limit",type:"flags.2?int"},{name:"usage",type:"flags.3?int"},{name:"requested",type:"flags.7?int"},{name:"title",type:"flags.8?string"}],type:"ExportedChatInvite"},{id:1516793212,predicate:"chatInviteAlready",params:[{name:"chat",type:"Chat"}],type:"ChatInvite"},{id:806110401,predicate:"chatInvite",params:[{name:"flags",type:"#"},{name:"channel",type:"flags.0?true"},{name:"broadcast",type:"flags.1?true"},{name:"public",type:"flags.2?true"},{name:"megagroup",type:"flags.3?true"},{name:"request_needed",type:"flags.6?true"},{name:"title",type:"string"},{name:"about",type:"flags.5?string"},{name:"photo",type:"Photo"},{name:"participants_count",type:"int"},{name:"participants",type:"flags.4?Vector<User>"}],type:"ChatInvite"},{id:51520707,predicate:"messageActionChatJoinedByLink",params:[{name:"inviter_id",type:"long"}],type:"MessageAction"},{id:1757493555,predicate:"updateReadMessagesContents",params:[{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-4838507,predicate:"inputStickerSetEmpty",params:[],type:"InputStickerSet"},{id:-1645763991,predicate:"inputStickerSetID",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputStickerSet"},{id:-2044933984,predicate:"inputStickerSetShortName",params:[{name:"short_name",type:"string"}],type:"InputStickerSet"},{id:768691932,predicate:"stickerSet",params:[{name:"flags",type:"#"},{name:"archived",type:"flags.1?true"},{name:"official",type:"flags.2?true"},{name:"masks",type:"flags.3?true"},{name:"animated",type:"flags.5?true"},{name:"videos",type:"flags.6?true"},{name:"emojis",type:"flags.7?true"},{name:"installed_date",type:"flags.0?int"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"title",type:"string"},{name:"short_name",type:"string"},{name:"thumbs",type:"flags.4?Vector<PhotoSize>"},{name:"thumb_dc_id",type:"flags.4?int"},{name:"thumb_version",type:"flags.4?int"},{name:"thumb_document_id",type:"flags.8?long"},{name:"count",type:"int"},{name:"hash",type:"int"}],type:"StickerSet"},{id:1846886166,predicate:"messages.stickerSet",params:[{name:"set",type:"StickerSet"},{name:"packs",type:"Vector<StickerPack>"},{name:"keywords",type:"Vector<StickerKeyword>"},{name:"documents",type:"Vector<Document>"}],type:"messages.StickerSet"},{id:-1885878744,predicate:"user",params:[{name:"flags",type:"#"},{name:"self",type:"flags.10?true"},{name:"contact",type:"flags.11?true"},{name:"mutual_contact",type:"flags.12?true"},{name:"deleted",type:"flags.13?true"},{name:"bot",type:"flags.14?true"},{name:"bot_chat_history",type:"flags.15?true"},{name:"bot_nochats",type:"flags.16?true"},{name:"verified",type:"flags.17?true"},{name:"restricted",type:"flags.18?true"},{name:"min",type:"flags.20?true"},{name:"bot_inline_geo",type:"flags.21?true"},{name:"support",type:"flags.23?true"},{name:"scam",type:"flags.24?true"},{name:"apply_min_photo",type:"flags.25?true"},{name:"fake",type:"flags.26?true"},{name:"bot_attach_menu",type:"flags.27?true"},{name:"premium",type:"flags.28?true"},{name:"attach_menu_enabled",type:"flags.29?true"},{name:"flags2",type:"#"},{name:"id",type:"long"},{name:"access_hash",type:"flags.0?long"},{name:"first_name",type:"flags.1?string"},{name:"last_name",type:"flags.2?string"},{name:"username",type:"flags.3?string"},{name:"phone",type:"flags.4?string"},{name:"photo",type:"flags.5?UserProfilePhoto"},{name:"status",type:"flags.6?UserStatus"},{name:"bot_info_version",type:"flags.14?int"},{name:"restriction_reason",type:"flags.18?Vector<RestrictionReason>"},{name:"bot_inline_placeholder",type:"flags.19?string"},{name:"lang_code",type:"flags.22?string"},{name:"emoji_status",type:"flags.30?EmojiStatus"},{name:"usernames",type:"flags2.0?Vector<Username>"}],type:"User"},{id:-1032140601,predicate:"botCommand",params:[{name:"command",type:"string"},{name:"description",type:"string"}],type:"BotCommand"},{id:-1892676777,predicate:"botInfo",params:[{name:"flags",type:"#"},{name:"user_id",type:"flags.0?long"},{name:"description",type:"flags.1?string"},{name:"description_photo",type:"flags.4?Photo"},{name:"description_document",type:"flags.5?Document"},{name:"commands",type:"flags.2?Vector<BotCommand>"},{name:"menu_button",type:"flags.3?BotMenuButton"}],type:"BotInfo"},{id:-1560655744,predicate:"keyboardButton",params:[{name:"text",type:"string"}],type:"KeyboardButton"},{id:2002815875,predicate:"keyboardButtonRow",params:[{name:"buttons",type:"Vector<KeyboardButton>"}],type:"KeyboardButtonRow"},{id:-1606526075,predicate:"replyKeyboardHide",params:[{name:"flags",type:"#"},{name:"selective",type:"flags.2?true"}],type:"ReplyMarkup"},{id:-2035021048,predicate:"replyKeyboardForceReply",params:[{name:"flags",type:"#"},{name:"single_use",type:"flags.1?true"},{name:"selective",type:"flags.2?true"},{name:"placeholder",type:"flags.3?string"}],type:"ReplyMarkup"},{id:-2049074735,predicate:"replyKeyboardMarkup",params:[{name:"flags",type:"#"},{name:"resize",type:"flags.0?true"},{name:"single_use",type:"flags.1?true"},{name:"selective",type:"flags.2?true"},{name:"persistent",type:"flags.4?true"},{name:"rows",type:"Vector<KeyboardButtonRow>"},{name:"placeholder",type:"flags.3?string"}],type:"ReplyMarkup"},{id:-571955892,predicate:"inputPeerUser",params:[{name:"user_id",type:"long"},{name:"access_hash",type:"long"}],type:"InputPeer"},{id:-233744186,predicate:"inputUser",params:[{name:"user_id",type:"long"},{name:"access_hash",type:"long"}],type:"InputUser"},{id:-1148011883,predicate:"messageEntityUnknown",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-100378723,predicate:"messageEntityMention",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1868782349,predicate:"messageEntityHashtag",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1827637959,predicate:"messageEntityBotCommand",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1859134776,predicate:"messageEntityUrl",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1692693954,predicate:"messageEntityEmail",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-1117713463,predicate:"messageEntityBold",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-2106619040,predicate:"messageEntityItalic",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:681706865,predicate:"messageEntityCode",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1938967520,predicate:"messageEntityPre",params:[{name:"offset",type:"int"},{name:"length",type:"int"},{name:"language",type:"string"}],type:"MessageEntity"},{id:1990644519,predicate:"messageEntityTextUrl",params:[{name:"offset",type:"int"},{name:"length",type:"int"},{name:"url",type:"string"}],type:"MessageEntity"},{id:-1877614335,predicate:"updateShortSentMessage",params:[{name:"flags",type:"#"},{name:"out",type:"flags.1?true"},{name:"id",type:"int"},{name:"pts",type:"int"},{name:"pts_count",type:"int"},{name:"date",type:"int"},{name:"media",type:"flags.9?MessageMedia"},{name:"entities",type:"flags.7?Vector<MessageEntity>"},{name:"ttl_period",type:"flags.25?int"}],type:"Updates"},{id:-292807034,predicate:"inputChannelEmpty",params:[],type:"InputChannel"},{id:-212145112,predicate:"inputChannel",params:[{name:"channel_id",type:"long"},{name:"access_hash",type:"long"}],type:"InputChannel"},{id:-1566230754,predicate:"peerChannel",params:[{name:"channel_id",type:"long"}],type:"Peer"},{id:666680316,predicate:"inputPeerChannel",params:[{name:"channel_id",type:"long"},{name:"access_hash",type:"long"}],type:"InputPeer"},{id:-2094689180,predicate:"channel",params:[{name:"flags",type:"#"},{name:"creator",type:"flags.0?true"},{name:"left",type:"flags.2?true"},{name:"broadcast",type:"flags.5?true"},{name:"verified",type:"flags.7?true"},{name:"megagroup",type:"flags.8?true"},{name:"restricted",type:"flags.9?true"},{name:"signatures",type:"flags.11?true"},{name:"min",type:"flags.12?true"},{name:"scam",type:"flags.19?true"},{name:"has_link",type:"flags.20?true"},{name:"has_geo",type:"flags.21?true"},{name:"slowmode_enabled",type:"flags.22?true"},{name:"call_active",type:"flags.23?true"},{name:"call_not_empty",type:"flags.24?true"},{name:"fake",type:"flags.25?true"},{name:"gigagroup",type:"flags.26?true"},{name:"noforwards",type:"flags.27?true"},{name:"join_to_send",type:"flags.28?true"},{name:"join_request",type:"flags.29?true"},{name:"forum",type:"flags.30?true"},{name:"flags2",type:"#"},{name:"id",type:"long"},{name:"access_hash",type:"flags.13?long"},{name:"title",type:"string"},{name:"username",type:"flags.6?string"},{name:"photo",type:"ChatPhoto"},{name:"date",type:"int"},{name:"restriction_reason",type:"flags.9?Vector<RestrictionReason>"},{name:"admin_rights",type:"flags.14?ChatAdminRights"},{name:"banned_rights",type:"flags.15?ChatBannedRights"},{name:"default_banned_rights",type:"flags.18?ChatBannedRights"},{name:"participants_count",type:"flags.17?int"},{name:"usernames",type:"flags2.0?Vector<Username>"}],type:"Chat"},{id:399807445,predicate:"channelForbidden",params:[{name:"flags",type:"#"},{name:"broadcast",type:"flags.5?true"},{name:"megagroup",type:"flags.8?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"title",type:"string"},{name:"until_date",type:"flags.16?int"}],type:"Chat"},{id:2131196633,predicate:"contacts.resolvedPeer",params:[{name:"peer",type:"Peer"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"contacts.ResolvedPeer"},{id:-231385849,predicate:"channelFull",params:[{name:"flags",type:"#"},{name:"can_view_participants",type:"flags.3?true"},{name:"can_set_username",type:"flags.6?true"},{name:"can_set_stickers",type:"flags.7?true"},{name:"hidden_prehistory",type:"flags.10?true"},{name:"can_set_location",type:"flags.16?true"},{name:"has_scheduled",type:"flags.19?true"},{name:"can_view_stats",type:"flags.20?true"},{name:"blocked",type:"flags.22?true"},{name:"flags2",type:"#"},{name:"can_delete_channel",type:"flags2.0?true"},{name:"antispam",type:"flags2.1?true"},{name:"participants_hidden",type:"flags2.2?true"},{name:"translations_disabled",type:"flags2.3?true"},{name:"id",type:"long"},{name:"about",type:"string"},{name:"participants_count",type:"flags.0?int"},{name:"admins_count",type:"flags.1?int"},{name:"kicked_count",type:"flags.2?int"},{name:"banned_count",type:"flags.2?int"},{name:"online_count",type:"flags.13?int"},{name:"read_inbox_max_id",type:"int"},{name:"read_outbox_max_id",type:"int"},{name:"unread_count",type:"int"},{name:"chat_photo",type:"Photo"},{name:"notify_settings",type:"PeerNotifySettings"},{name:"exported_invite",type:"flags.23?ExportedChatInvite"},{name:"bot_info",type:"Vector<BotInfo>"},{name:"migrated_from_chat_id",type:"flags.4?long"},{name:"migrated_from_max_id",type:"flags.4?int"},{name:"pinned_msg_id",type:"flags.5?int"},{name:"stickerset",type:"flags.8?StickerSet"},{name:"available_min_id",type:"flags.9?int"},{name:"folder_id",type:"flags.11?int"},{name:"linked_chat_id",type:"flags.14?long"},{name:"location",type:"flags.15?ChannelLocation"},{name:"slowmode_seconds",type:"flags.17?int"},{name:"slowmode_next_send_date",type:"flags.18?int"},{name:"stats_dc",type:"flags.12?int"},{name:"pts",type:"int"},{name:"call",type:"flags.21?InputGroupCall"},{name:"ttl_period",type:"flags.24?int"},{name:"pending_suggestions",type:"flags.25?Vector<string>"},{name:"groupcall_default_join_as",type:"flags.26?Peer"},{name:"theme_emoticon",type:"flags.27?string"},{name:"requests_pending",type:"flags.28?int"},{name:"recent_requesters",type:"flags.28?Vector<long>"},{name:"default_send_as",type:"flags.29?Peer"},{name:"available_reactions",type:"flags.30?ChatReactions"}],type:"ChatFull"},{id:182649427,predicate:"messageRange",params:[{name:"min_id",type:"int"},{name:"max_id",type:"int"}],type:"MessageRange"},{id:-948520370,predicate:"messages.channelMessages",params:[{name:"flags",type:"#"},{name:"inexact",type:"flags.1?true"},{name:"pts",type:"int"},{name:"count",type:"int"},{name:"offset_id_offset",type:"flags.2?int"},{name:"messages",type:"Vector<Message>"},{name:"topics",type:"Vector<ForumTopic>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Messages"},{id:-1781355374,predicate:"messageActionChannelCreate",params:[{name:"title",type:"string"}],type:"MessageAction"},{id:277713951,predicate:"updateChannelTooLong",params:[{name:"flags",type:"#"},{name:"channel_id",type:"long"},{name:"pts",type:"flags.0?int"}],type:"Update"},{id:1666927625,predicate:"updateChannel",params:[{name:"channel_id",type:"long"}],type:"Update"},{id:1656358105,predicate:"updateNewChannelMessage",params:[{name:"message",type:"Message"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-1842450928,predicate:"updateReadChannelInbox",params:[{name:"flags",type:"#"},{name:"folder_id",type:"flags.0?int"},{name:"channel_id",type:"long"},{name:"max_id",type:"int"},{name:"still_unread_count",type:"int"},{name:"pts",type:"int"}],type:"Update"},{id:-1020437742,predicate:"updateDeleteChannelMessages",params:[{name:"channel_id",type:"long"},{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-232346616,predicate:"updateChannelMessageViews",params:[{name:"channel_id",type:"long"},{name:"id",type:"int"},{name:"views",type:"int"}],type:"Update"},{id:1041346555,predicate:"updates.channelDifferenceEmpty",params:[{name:"flags",type:"#"},{name:"final",type:"flags.0?true"},{name:"pts",type:"int"},{name:"timeout",type:"flags.1?int"}],type:"updates.ChannelDifference"},{id:-1531132162,predicate:"updates.channelDifferenceTooLong",params:[{name:"flags",type:"#"},{name:"final",type:"flags.0?true"},{name:"timeout",type:"flags.1?int"},{name:"dialog",type:"Dialog"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"updates.ChannelDifference"},{id:543450958,predicate:"updates.channelDifference",params:[{name:"flags",type:"#"},{name:"final",type:"flags.0?true"},{name:"pts",type:"int"},{name:"timeout",type:"flags.1?int"},{name:"new_messages",type:"Vector<Message>"},{name:"other_updates",type:"Vector<Update>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"updates.ChannelDifference"},{id:-1798033689,predicate:"channelMessagesFilterEmpty",params:[],type:"ChannelMessagesFilter"},{id:-847783593,predicate:"channelMessagesFilter",params:[{name:"flags",type:"#"},{name:"exclude_new_messages",type:"flags.1?true"},{name:"ranges",type:"Vector<MessageRange>"}],type:"ChannelMessagesFilter"},{id:-1072953408,predicate:"channelParticipant",params:[{name:"user_id",type:"long"},{name:"date",type:"int"}],type:"ChannelParticipant"},{id:900251559,predicate:"channelParticipantSelf",params:[{name:"flags",type:"#"},{name:"via_request",type:"flags.0?true"},{name:"user_id",type:"long"},{name:"inviter_id",type:"long"},{name:"date",type:"int"}],type:"ChannelParticipant"},{id:803602899,predicate:"channelParticipantCreator",params:[{name:"flags",type:"#"},{name:"user_id",type:"long"},{name:"admin_rights",type:"ChatAdminRights"},{name:"rank",type:"flags.0?string"}],type:"ChannelParticipant"},{id:-566281095,predicate:"channelParticipantsRecent",params:[],type:"ChannelParticipantsFilter"},{id:-1268741783,predicate:"channelParticipantsAdmins",params:[],type:"ChannelParticipantsFilter"},{id:-1548400251,predicate:"channelParticipantsKicked",params:[{name:"q",type:"string"}],type:"ChannelParticipantsFilter"},{id:-1699676497,predicate:"channels.channelParticipants",params:[{name:"count",type:"int"},{name:"participants",type:"Vector<ChannelParticipant>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"channels.ChannelParticipants"},{id:-541588713,predicate:"channels.channelParticipant",params:[{name:"participant",type:"ChannelParticipant"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"channels.ChannelParticipant"},{id:-462696732,predicate:"chatParticipantCreator",params:[{name:"user_id",type:"long"}],type:"ChatParticipant"},{id:-1600962725,predicate:"chatParticipantAdmin",params:[{name:"user_id",type:"long"},{name:"inviter_id",type:"long"},{name:"date",type:"int"}],type:"ChatParticipant"},{id:-674602590,predicate:"updateChatParticipantAdmin",params:[{name:"chat_id",type:"long"},{name:"user_id",type:"long"},{name:"is_admin",type:"Bool"},{name:"version",type:"int"}],type:"Update"},{id:-519864430,predicate:"messageActionChatMigrateTo",params:[{name:"channel_id",type:"long"}],type:"MessageAction"},{id:-365344535,predicate:"messageActionChannelMigrateFrom",params:[{name:"title",type:"string"},{name:"chat_id",type:"long"}],type:"MessageAction"},{id:-1328445861,predicate:"channelParticipantsBots",params:[],type:"ChannelParticipantsFilter"},{id:2013922064,predicate:"help.termsOfService",params:[{name:"flags",type:"#"},{name:"popup",type:"flags.0?true"},{name:"id",type:"DataJSON"},{name:"text",type:"string"},{name:"entities",type:"Vector<MessageEntity>"},{name:"min_age_confirm",type:"flags.1?int"}],type:"help.TermsOfService"},{id:1753886890,predicate:"updateNewStickerSet",params:[{name:"stickerset",type:"messages.StickerSet"}],type:"Update"},{id:196268545,predicate:"updateStickerSetsOrder",params:[{name:"flags",type:"#"},{name:"masks",type:"flags.0?true"},{name:"emojis",type:"flags.1?true"},{name:"order",type:"Vector<long>"}],type:"Update"},{id:834816008,predicate:"updateStickerSets",params:[{name:"flags",type:"#"},{name:"masks",type:"flags.0?true"},{name:"emojis",type:"flags.1?true"}],type:"Update"},{id:-402498398,predicate:"messages.savedGifsNotModified",params:[],type:"messages.SavedGifs"},{id:-2069878259,predicate:"messages.savedGifs",params:[{name:"hash",type:"long"},{name:"gifs",type:"Vector<Document>"}],type:"messages.SavedGifs"},{id:-1821035490,predicate:"updateSavedGifs",params:[],type:"Update"},{id:864077702,predicate:"inputBotInlineMessageMediaAuto",params:[{name:"flags",type:"#"},{name:"message",type:"string"},{name:"entities",type:"flags.1?Vector<MessageEntity>"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:1036876423,predicate:"inputBotInlineMessageText",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.0?true"},{name:"message",type:"string"},{name:"entities",type:"flags.1?Vector<MessageEntity>"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:-2000710887,predicate:"inputBotInlineResult",params:[{name:"flags",type:"#"},{name:"id",type:"string"},{name:"type",type:"string"},{name:"title",type:"flags.1?string"},{name:"description",type:"flags.2?string"},{name:"url",type:"flags.3?string"},{name:"thumb",type:"flags.4?InputWebDocument"},{name:"content",type:"flags.5?InputWebDocument"},{name:"send_message",type:"InputBotInlineMessage"}],type:"InputBotInlineResult"},{id:1984755728,predicate:"botInlineMessageMediaAuto",params:[{name:"flags",type:"#"},{name:"message",type:"string"},{name:"entities",type:"flags.1?Vector<MessageEntity>"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"BotInlineMessage"},{id:-1937807902,predicate:"botInlineMessageText",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.0?true"},{name:"message",type:"string"},{name:"entities",type:"flags.1?Vector<MessageEntity>"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"BotInlineMessage"},{id:295067450,predicate:"botInlineResult",params:[{name:"flags",type:"#"},{name:"id",type:"string"},{name:"type",type:"string"},{name:"title",type:"flags.1?string"},{name:"description",type:"flags.2?string"},{name:"url",type:"flags.3?string"},{name:"thumb",type:"flags.4?WebDocument"},{name:"content",type:"flags.5?WebDocument"},{name:"send_message",type:"BotInlineMessage"}],type:"BotInlineResult"},{id:-534646026,predicate:"messages.botResults",params:[{name:"flags",type:"#"},{name:"gallery",type:"flags.0?true"},{name:"query_id",type:"long"},{name:"next_offset",type:"flags.1?string"},{name:"switch_pm",type:"flags.2?InlineBotSwitchPM"},{name:"switch_webview",type:"flags.3?InlineBotWebView"},{name:"results",type:"Vector<BotInlineResult>"},{name:"cache_time",type:"int"},{name:"users",type:"Vector<User>"}],type:"messages.BotResults"},{id:1232025500,predicate:"updateBotInlineQuery",params:[{name:"flags",type:"#"},{name:"query_id",type:"long"},{name:"user_id",type:"long"},{name:"query",type:"string"},{name:"geo",type:"flags.0?GeoPoint"},{name:"peer_type",type:"flags.1?InlineQueryPeerType"},{name:"offset",type:"string"}],type:"Update"},{id:317794823,predicate:"updateBotInlineSend",params:[{name:"flags",type:"#"},{name:"user_id",type:"long"},{name:"query",type:"string"},{name:"geo",type:"flags.0?GeoPoint"},{name:"id",type:"string"},{name:"msg_id",type:"flags.1?InputBotInlineMessageID"}],type:"Update"},{id:1358283666,predicate:"inputMessagesFilterVoice",params:[],type:"MessagesFilter"},{id:928101534,predicate:"inputMessagesFilterMusic",params:[],type:"MessagesFilter"},{id:-1107622874,predicate:"inputPrivacyKeyChatInvite",params:[],type:"InputPrivacyKey"},{id:1343122938,predicate:"privacyKeyChatInvite",params:[],type:"PrivacyKey"},{id:1571494644,predicate:"exportedMessageLink",params:[{name:"link",type:"string"},{name:"html",type:"string"}],type:"ExportedMessageLink"},{id:1601666510,predicate:"messageFwdHeader",params:[{name:"flags",type:"#"},{name:"imported",type:"flags.7?true"},{name:"from_id",type:"flags.0?Peer"},{name:"from_name",type:"flags.5?string"},{name:"date",type:"int"},{name:"channel_post",type:"flags.2?int"},{name:"post_author",type:"flags.3?string"},{name:"saved_from_peer",type:"flags.4?Peer"},{name:"saved_from_msg_id",type:"flags.4?int"},{name:"psa_type",type:"flags.6?string"}],type:"MessageFwdHeader"},{id:457133559,predicate:"updateEditChannelMessage",params:[{name:"message",type:"Message"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-1799538451,predicate:"messageActionPinMessage",params:[],type:"MessageAction"},{id:1923290508,predicate:"auth.codeTypeSms",params:[],type:"auth.CodeType"},{id:1948046307,predicate:"auth.codeTypeCall",params:[],type:"auth.CodeType"},{id:577556219,predicate:"auth.codeTypeFlashCall",params:[],type:"auth.CodeType"},{id:1035688326,predicate:"auth.sentCodeTypeApp",params:[{name:"length",type:"int"}],type:"auth.SentCodeType"},{id:-1073693790,predicate:"auth.sentCodeTypeSms",params:[{name:"length",type:"int"}],type:"auth.SentCodeType"},{id:1398007207,predicate:"auth.sentCodeTypeCall",params:[{name:"length",type:"int"}],type:"auth.SentCodeType"},{id:-1425815847,predicate:"auth.sentCodeTypeFlashCall",params:[{name:"pattern",type:"string"}],type:"auth.SentCodeType"},{id:629866245,predicate:"keyboardButtonUrl",params:[{name:"text",type:"string"},{name:"url",type:"string"}],type:"KeyboardButton"},{id:901503851,predicate:"keyboardButtonCallback",params:[{name:"flags",type:"#"},{name:"requires_password",type:"flags.0?true"},{name:"text",type:"string"},{name:"data",type:"bytes"}],type:"KeyboardButton"},{id:-1318425559,predicate:"keyboardButtonRequestPhone",params:[{name:"text",type:"string"}],type:"KeyboardButton"},{id:-59151553,predicate:"keyboardButtonRequestGeoLocation",params:[{name:"text",type:"string"}],type:"KeyboardButton"},{id:90744648,predicate:"keyboardButtonSwitchInline",params:[{name:"flags",type:"#"},{name:"same_peer",type:"flags.0?true"},{name:"text",type:"string"},{name:"query",type:"string"}],type:"KeyboardButton"},{id:1218642516,predicate:"replyInlineMarkup",params:[{name:"rows",type:"Vector<KeyboardButtonRow>"}],type:"ReplyMarkup"},{id:911761060,predicate:"messages.botCallbackAnswer",params:[{name:"flags",type:"#"},{name:"alert",type:"flags.1?true"},{name:"has_url",type:"flags.3?true"},{name:"native_ui",type:"flags.4?true"},{name:"message",type:"flags.0?string"},{name:"url",type:"flags.2?string"},{name:"cache_time",type:"int"}],type:"messages.BotCallbackAnswer"},{id:-1177566067,predicate:"updateBotCallbackQuery",params:[{name:"flags",type:"#"},{name:"query_id",type:"long"},{name:"user_id",type:"long"},{name:"peer",type:"Peer"},{name:"msg_id",type:"int"},{name:"chat_instance",type:"long"},{name:"data",type:"flags.0?bytes"},{name:"game_short_name",type:"flags.1?string"}],type:"Update"},{id:649453030,predicate:"messages.messageEditData",params:[{name:"flags",type:"#"},{name:"caption",type:"flags.0?true"}],type:"messages.MessageEditData"},{id:-469536605,predicate:"updateEditMessage",params:[{name:"message",type:"Message"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-1768777083,predicate:"inputBotInlineMessageMediaGeo",params:[{name:"flags",type:"#"},{name:"geo_point",type:"InputGeoPoint"},{name:"heading",type:"flags.0?int"},{name:"period",type:"flags.1?int"},{name:"proximity_notification_radius",type:"flags.3?int"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:1098628881,predicate:"inputBotInlineMessageMediaVenue",params:[{name:"flags",type:"#"},{name:"geo_point",type:"InputGeoPoint"},{name:"title",type:"string"},{name:"address",type:"string"},{name:"provider",type:"string"},{name:"venue_id",type:"string"},{name:"venue_type",type:"string"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:-1494368259,predicate:"inputBotInlineMessageMediaContact",params:[{name:"flags",type:"#"},{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"vcard",type:"string"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:85477117,predicate:"botInlineMessageMediaGeo",params:[{name:"flags",type:"#"},{name:"geo",type:"GeoPoint"},{name:"heading",type:"flags.0?int"},{name:"period",type:"flags.1?int"},{name:"proximity_notification_radius",type:"flags.3?int"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"BotInlineMessage"},{id:-1970903652,predicate:"botInlineMessageMediaVenue",params:[{name:"flags",type:"#"},{name:"geo",type:"GeoPoint"},{name:"title",type:"string"},{name:"address",type:"string"},{name:"provider",type:"string"},{name:"venue_id",type:"string"},{name:"venue_type",type:"string"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"BotInlineMessage"},{id:416402882,predicate:"botInlineMessageMediaContact",params:[{name:"flags",type:"#"},{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"vcard",type:"string"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"BotInlineMessage"},{id:-1462213465,predicate:"inputBotInlineResultPhoto",params:[{name:"id",type:"string"},{name:"type",type:"string"},{name:"photo",type:"InputPhoto"},{name:"send_message",type:"InputBotInlineMessage"}],type:"InputBotInlineResult"},{id:-459324,predicate:"inputBotInlineResultDocument",params:[{name:"flags",type:"#"},{name:"id",type:"string"},{name:"type",type:"string"},{name:"title",type:"flags.1?string"},{name:"description",type:"flags.2?string"},{name:"document",type:"InputDocument"},{name:"send_message",type:"InputBotInlineMessage"}],type:"InputBotInlineResult"},{id:400266251,predicate:"botInlineMediaResult",params:[{name:"flags",type:"#"},{name:"id",type:"string"},{name:"type",type:"string"},{name:"photo",type:"flags.0?Photo"},{name:"document",type:"flags.1?Document"},{name:"title",type:"flags.2?string"},{name:"description",type:"flags.3?string"},{name:"send_message",type:"BotInlineMessage"}],type:"BotInlineResult"},{id:-1995686519,predicate:"inputBotInlineMessageID",params:[{name:"dc_id",type:"int"},{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputBotInlineMessageID"},{id:1763610706,predicate:"updateInlineBotCallbackQuery",params:[{name:"flags",type:"#"},{name:"query_id",type:"long"},{name:"user_id",type:"long"},{name:"msg_id",type:"InputBotInlineMessageID"},{name:"chat_instance",type:"long"},{name:"data",type:"flags.0?bytes"},{name:"game_short_name",type:"flags.1?string"}],type:"Update"},{id:1008755359,predicate:"inlineBotSwitchPM",params:[{name:"text",type:"string"},{name:"start_param",type:"string"}],type:"InlineBotSwitchPM"},{id:863093588,predicate:"messages.peerDialogs",params:[{name:"dialogs",type:"Vector<Dialog>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"state",type:"updates.State"}],type:"messages.PeerDialogs"},{id:-305282981,predicate:"topPeer",params:[{name:"peer",type:"Peer"},{name:"rating",type:"double"}],type:"TopPeer"},{id:-1419371685,predicate:"topPeerCategoryBotsPM",params:[],type:"TopPeerCategory"},{id:344356834,predicate:"topPeerCategoryBotsInline",params:[],type:"TopPeerCategory"},{id:104314861,predicate:"topPeerCategoryCorrespondents",params:[],type:"TopPeerCategory"},{id:-1122524854,predicate:"topPeerCategoryGroups",params:[],type:"TopPeerCategory"},{id:371037736,predicate:"topPeerCategoryChannels",params:[],type:"TopPeerCategory"},{id:-75283823,predicate:"topPeerCategoryPeers",params:[{name:"category",type:"TopPeerCategory"},{name:"count",type:"int"},{name:"peers",type:"Vector<TopPeer>"}],type:"TopPeerCategoryPeers"},{id:-567906571,predicate:"contacts.topPeersNotModified",params:[],type:"contacts.TopPeers"},{id:1891070632,predicate:"contacts.topPeers",params:[{name:"categories",type:"Vector<TopPeerCategoryPeers>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"contacts.TopPeers"},{id:-595914432,predicate:"messageEntityMentionName",params:[{name:"offset",type:"int"},{name:"length",type:"int"},{name:"user_id",type:"long"}],type:"MessageEntity"},{id:546203849,predicate:"inputMessageEntityMentionName",params:[{name:"offset",type:"int"},{name:"length",type:"int"},{name:"user_id",type:"InputUser"}],type:"MessageEntity"},{id:975236280,predicate:"inputMessagesFilterChatPhotos",params:[],type:"MessagesFilter"},{id:-1218471511,predicate:"updateReadChannelOutbox",params:[{name:"channel_id",type:"long"},{name:"max_id",type:"int"}],type:"Update"},{id:457829485,predicate:"updateDraftMessage",params:[{name:"flags",type:"#"},{name:"peer",type:"Peer"},{name:"top_msg_id",type:"flags.0?int"},{name:"draft",type:"DraftMessage"}],type:"Update"},{id:453805082,predicate:"draftMessageEmpty",params:[{name:"flags",type:"#"},{name:"date",type:"flags.0?int"}],type:"DraftMessage"},{id:-40996577,predicate:"draftMessage",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.1?true"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"message",type:"string"},{name:"entities",type:"flags.3?Vector<MessageEntity>"},{name:"date",type:"int"}],type:"DraftMessage"},{id:-1615153660,predicate:"messageActionHistoryClear",params:[],type:"MessageAction"},{id:-958657434,predicate:"messages.featuredStickersNotModified",params:[{name:"count",type:"int"}],type:"messages.FeaturedStickers"},{id:-1103615738,predicate:"messages.featuredStickers",params:[{name:"flags",type:"#"},{name:"premium",type:"flags.0?true"},{name:"hash",type:"long"},{name:"count",type:"int"},{name:"sets",type:"Vector<StickerSetCovered>"},{name:"unread",type:"Vector<long>"}],type:"messages.FeaturedStickers"},{id:1461528386,predicate:"updateReadFeaturedStickers",params:[],type:"Update"},{id:186120336,predicate:"messages.recentStickersNotModified",params:[],type:"messages.RecentStickers"},{id:-1999405994,predicate:"messages.recentStickers",params:[{name:"hash",type:"long"},{name:"packs",type:"Vector<StickerPack>"},{name:"stickers",type:"Vector<Document>"},{name:"dates",type:"Vector<int>"}],type:"messages.RecentStickers"},{id:-1706939360,predicate:"updateRecentStickers",params:[],type:"Update"},{id:1338747336,predicate:"messages.archivedStickers",params:[{name:"count",type:"int"},{name:"sets",type:"Vector<StickerSetCovered>"}],type:"messages.ArchivedStickers"},{id:946083368,predicate:"messages.stickerSetInstallResultSuccess",params:[],type:"messages.StickerSetInstallResult"},{id:904138920,predicate:"messages.stickerSetInstallResultArchive",params:[{name:"sets",type:"Vector<StickerSetCovered>"}],type:"messages.StickerSetInstallResult"},{id:1678812626,predicate:"stickerSetCovered",params:[{name:"set",type:"StickerSet"},{name:"cover",type:"Document"}],type:"StickerSetCovered"},{id:-1574314746,predicate:"updateConfig",params:[],type:"Update"},{id:861169551,predicate:"updatePtsChanged",params:[],type:"Update"},{id:-440664550,predicate:"inputMediaPhotoExternal",params:[{name:"flags",type:"#"},{name:"spoiler",type:"flags.1?true"},{name:"url",type:"string"},{name:"ttl_seconds",type:"flags.0?int"}],type:"InputMedia"},{id:-78455655,predicate:"inputMediaDocumentExternal",params:[{name:"flags",type:"#"},{name:"spoiler",type:"flags.1?true"},{name:"url",type:"string"},{name:"ttl_seconds",type:"flags.0?int"}],type:"InputMedia"},{id:872932635,predicate:"stickerSetMultiCovered",params:[{name:"set",type:"StickerSet"},{name:"covers",type:"Vector<Document>"}],type:"StickerSetCovered"},{id:-1361650766,predicate:"maskCoords",params:[{name:"n",type:"int"},{name:"x",type:"double"},{name:"y",type:"double"},{name:"zoom",type:"double"}],type:"MaskCoords"},{id:-1744710921,predicate:"documentAttributeHasStickers",params:[],type:"DocumentAttribute"},{id:1251549527,predicate:"inputStickeredMediaPhoto",params:[{name:"id",type:"InputPhoto"}],type:"InputStickeredMedia"},{id:70813275,predicate:"inputStickeredMediaDocument",params:[{name:"id",type:"InputDocument"}],type:"InputStickeredMedia"},{id:-1107729093,predicate:"game",params:[{name:"flags",type:"#"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"short_name",type:"string"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"Photo"},{name:"document",type:"flags.0?Document"}],type:"Game"},{id:1336154098,predicate:"inputBotInlineResultGame",params:[{name:"id",type:"string"},{name:"short_name",type:"string"},{name:"send_message",type:"InputBotInlineMessage"}],type:"InputBotInlineResult"},{id:1262639204,predicate:"inputBotInlineMessageGame",params:[{name:"flags",type:"#"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:-38694904,predicate:"messageMediaGame",params:[{name:"game",type:"Game"}],type:"MessageMedia"},{id:-750828557,predicate:"inputMediaGame",params:[{name:"id",type:"InputGame"}],type:"InputMedia"},{id:53231223,predicate:"inputGameID",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputGame"},{id:-1020139510,predicate:"inputGameShortName",params:[{name:"bot_id",type:"InputUser"},{name:"short_name",type:"string"}],type:"InputGame"},{id:1358175439,predicate:"keyboardButtonGame",params:[{name:"text",type:"string"}],type:"KeyboardButton"},{id:-1834538890,predicate:"messageActionGameScore",params:[{name:"game_id",type:"long"},{name:"score",type:"int"}],type:"MessageAction"},{id:1940093419,predicate:"highScore",params:[{name:"pos",type:"int"},{name:"user_id",type:"long"},{name:"score",type:"int"}],type:"HighScore"},{id:-1707344487,predicate:"messages.highScores",params:[{name:"scores",type:"Vector<HighScore>"},{name:"users",type:"Vector<User>"}],type:"messages.HighScores"},{id:1258196845,predicate:"updates.differenceTooLong",params:[{name:"pts",type:"int"}],type:"updates.Difference"},{id:791390623,predicate:"updateChannelWebPage",params:[{name:"channel_id",type:"long"},{name:"webpage",type:"WebPage"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:-1663561404,predicate:"messages.chatsSlice",params:[{name:"count",type:"int"},{name:"chats",type:"Vector<Chat>"}],type:"messages.Chats"},{id:-599948721,predicate:"textEmpty",params:[],type:"RichText"},{id:1950782688,predicate:"textPlain",params:[{name:"text",type:"string"}],type:"RichText"},{id:1730456516,predicate:"textBold",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:-653089380,predicate:"textItalic",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:-1054465340,predicate:"textUnderline",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:-1678197867,predicate:"textStrike",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:1816074681,predicate:"textFixed",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:1009288385,predicate:"textUrl",params:[{name:"text",type:"RichText"},{name:"url",type:"string"},{name:"webpage_id",type:"long"}],type:"RichText"},{id:-564523562,predicate:"textEmail",params:[{name:"text",type:"RichText"},{name:"email",type:"string"}],type:"RichText"},{id:2120376535,predicate:"textConcat",params:[{name:"texts",type:"Vector<RichText>"}],type:"RichText"},{id:324435594,predicate:"pageBlockUnsupported",params:[],type:"PageBlock"},{id:1890305021,predicate:"pageBlockTitle",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:-1879401953,predicate:"pageBlockSubtitle",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:-1162877472,predicate:"pageBlockAuthorDate",params:[{name:"author",type:"RichText"},{name:"published_date",type:"int"}],type:"PageBlock"},{id:-1076861716,predicate:"pageBlockHeader",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:-248793375,predicate:"pageBlockSubheader",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:1182402406,predicate:"pageBlockParagraph",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:-1066346178,predicate:"pageBlockPreformatted",params:[{name:"text",type:"RichText"},{name:"language",type:"string"}],type:"PageBlock"},{id:1216809369,predicate:"pageBlockFooter",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:-618614392,predicate:"pageBlockDivider",params:[],type:"PageBlock"},{id:-837994576,predicate:"pageBlockAnchor",params:[{name:"name",type:"string"}],type:"PageBlock"},{id:-454524911,predicate:"pageBlockList",params:[{name:"items",type:"Vector<PageListItem>"}],type:"PageBlock"},{id:641563686,predicate:"pageBlockBlockquote",params:[{name:"text",type:"RichText"},{name:"caption",type:"RichText"}],type:"PageBlock"},{id:1329878739,predicate:"pageBlockPullquote",params:[{name:"text",type:"RichText"},{name:"caption",type:"RichText"}],type:"PageBlock"},{id:391759200,predicate:"pageBlockPhoto",params:[{name:"flags",type:"#"},{name:"photo_id",type:"long"},{name:"caption",type:"PageCaption"},{name:"url",type:"flags.0?string"},{name:"webpage_id",type:"flags.0?long"}],type:"PageBlock"},{id:2089805750,predicate:"pageBlockVideo",params:[{name:"flags",type:"#"},{name:"autoplay",type:"flags.0?true"},{name:"loop",type:"flags.1?true"},{name:"video_id",type:"long"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:972174080,predicate:"pageBlockCover",params:[{name:"cover",type:"PageBlock"}],type:"PageBlock"},{id:-1468953147,predicate:"pageBlockEmbed",params:[{name:"flags",type:"#"},{name:"full_width",type:"flags.0?true"},{name:"allow_scrolling",type:"flags.3?true"},{name:"url",type:"flags.1?string"},{name:"html",type:"flags.2?string"},{name:"poster_photo_id",type:"flags.4?long"},{name:"w",type:"flags.5?int"},{name:"h",type:"flags.5?int"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:-229005301,predicate:"pageBlockEmbedPost",params:[{name:"url",type:"string"},{name:"webpage_id",type:"long"},{name:"author_photo_id",type:"long"},{name:"author",type:"string"},{name:"date",type:"int"},{name:"blocks",type:"Vector<PageBlock>"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:1705048653,predicate:"pageBlockCollage",params:[{name:"items",type:"Vector<PageBlock>"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:52401552,predicate:"pageBlockSlideshow",params:[{name:"items",type:"Vector<PageBlock>"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:1930545681,predicate:"webPageNotModified",params:[{name:"flags",type:"#"},{name:"cached_page_views",type:"flags.0?int"}],type:"WebPage"},{id:-88417185,predicate:"inputPrivacyKeyPhoneCall",params:[],type:"InputPrivacyKey"},{id:1030105979,predicate:"privacyKeyPhoneCall",params:[],type:"PrivacyKey"},{id:-580219064,predicate:"sendMessageGamePlayAction",params:[],type:"SendMessageAction"},{id:-2048646399,predicate:"phoneCallDiscardReasonMissed",params:[],type:"PhoneCallDiscardReason"},{id:-527056480,predicate:"phoneCallDiscardReasonDisconnect",params:[],type:"PhoneCallDiscardReason"},{id:1471006352,predicate:"phoneCallDiscardReasonHangup",params:[],type:"PhoneCallDiscardReason"},{id:-84416311,predicate:"phoneCallDiscardReasonBusy",params:[],type:"PhoneCallDiscardReason"},{id:1852826908,predicate:"updateDialogPinned",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.0?true"},{name:"folder_id",type:"flags.1?int"},{name:"peer",type:"DialogPeer"}],type:"Update"},{id:-99664734,predicate:"updatePinnedDialogs",params:[{name:"flags",type:"#"},{name:"folder_id",type:"flags.1?int"},{name:"order",type:"flags.0?Vector<DialogPeer>"}],type:"Update"},{id:2104790276,predicate:"dataJSON",params:[{name:"data",type:"string"}],type:"DataJSON"},{id:-2095595325,predicate:"updateBotWebhookJSON",params:[{name:"data",type:"DataJSON"}],type:"Update"},{id:-1684914010,predicate:"updateBotWebhookJSONQuery",params:[{name:"query_id",type:"long"},{name:"data",type:"DataJSON"},{name:"timeout",type:"int"}],type:"Update"},{id:-886477832,predicate:"labeledPrice",params:[{name:"label",type:"string"},{name:"amount",type:"long"}],type:"LabeledPrice"},{id:1048946971,predicate:"invoice",params:[{name:"flags",type:"#"},{name:"test",type:"flags.0?true"},{name:"name_requested",type:"flags.1?true"},{name:"phone_requested",type:"flags.2?true"},{name:"email_requested",type:"flags.3?true"},{name:"shipping_address_requested",type:"flags.4?true"},{name:"flexible",type:"flags.5?true"},{name:"phone_to_provider",type:"flags.6?true"},{name:"email_to_provider",type:"flags.7?true"},{name:"recurring",type:"flags.9?true"},{name:"currency",type:"string"},{name:"prices",type:"Vector<LabeledPrice>"},{name:"max_tip_amount",type:"flags.8?long"},{name:"suggested_tip_amounts",type:"flags.8?Vector<long>"},{name:"recurring_terms_url",type:"flags.9?string"}],type:"Invoice"},{id:-1900697899,predicate:"inputMediaInvoice",params:[{name:"flags",type:"#"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"flags.0?InputWebDocument"},{name:"invoice",type:"Invoice"},{name:"payload",type:"bytes"},{name:"provider",type:"string"},{name:"provider_data",type:"DataJSON"},{name:"start_param",type:"flags.1?string"},{name:"extended_media",type:"flags.2?InputMedia"}],type:"InputMedia"},{id:-368917890,predicate:"paymentCharge",params:[{name:"id",type:"string"},{name:"provider_charge_id",type:"string"}],type:"PaymentCharge"},{id:-1892568281,predicate:"messageActionPaymentSentMe",params:[{name:"flags",type:"#"},{name:"recurring_init",type:"flags.2?true"},{name:"recurring_used",type:"flags.3?true"},{name:"currency",type:"string"},{name:"total_amount",type:"long"},{name:"payload",type:"bytes"},{name:"info",type:"flags.0?PaymentRequestedInfo"},{name:"shipping_option_id",type:"flags.1?string"},{name:"charge",type:"PaymentCharge"}],type:"MessageAction"},{id:-156940077,predicate:"messageMediaInvoice",params:[{name:"flags",type:"#"},{name:"shipping_address_requested",type:"flags.1?true"},{name:"test",type:"flags.3?true"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"flags.0?WebDocument"},{name:"receipt_msg_id",type:"flags.2?int"},{name:"currency",type:"string"},{name:"total_amount",type:"long"},{name:"start_param",type:"string"},{name:"extended_media",type:"flags.4?MessageExtendedMedia"}],type:"MessageMedia"},{id:512535275,predicate:"postAddress",params:[{name:"street_line1",type:"string"},{name:"street_line2",type:"string"},{name:"city",type:"string"},{name:"state",type:"string"},{name:"country_iso2",type:"string"},{name:"post_code",type:"string"}],type:"PostAddress"},{id:-1868808300,predicate:"paymentRequestedInfo",params:[{name:"flags",type:"#"},{name:"name",type:"flags.0?string"},{name:"phone",type:"flags.1?string"},{name:"email",type:"flags.2?string"},{name:"shipping_address",type:"flags.3?PostAddress"}],type:"PaymentRequestedInfo"},{id:-1344716869,predicate:"keyboardButtonBuy",params:[{name:"text",type:"string"}],type:"KeyboardButton"},{id:-1776926890,predicate:"messageActionPaymentSent",params:[{name:"flags",type:"#"},{name:"recurring_init",type:"flags.2?true"},{name:"recurring_used",type:"flags.3?true"},{name:"currency",type:"string"},{name:"total_amount",type:"long"},{name:"invoice_slug",type:"flags.0?string"}],type:"MessageAction"},{id:-842892769,predicate:"paymentSavedCredentialsCard",params:[{name:"id",type:"string"},{name:"title",type:"string"}],type:"PaymentSavedCredentials"},{id:475467473,predicate:"webDocument",params:[{name:"url",type:"string"},{name:"access_hash",type:"long"},{name:"size",type:"int"},{name:"mime_type",type:"string"},{name:"attributes",type:"Vector<DocumentAttribute>"}],type:"WebDocument"},{id:-1678949555,predicate:"inputWebDocument",params:[{name:"url",type:"string"},{name:"size",type:"int"},{name:"mime_type",type:"string"},{name:"attributes",type:"Vector<DocumentAttribute>"}],type:"InputWebDocument"},{id:-1036396922,predicate:"inputWebFileLocation",params:[{name:"url",type:"string"},{name:"access_hash",type:"long"}],type:"InputWebFileLocation"},{id:568808380,predicate:"upload.webFile",params:[{name:"size",type:"int"},{name:"mime_type",type:"string"},{name:"file_type",type:"storage.FileType"},{name:"mtime",type:"int"},{name:"bytes",type:"bytes"}],type:"upload.WebFile"},{id:-1610250415,predicate:"payments.paymentForm",params:[{name:"flags",type:"#"},{name:"can_save_credentials",type:"flags.2?true"},{name:"password_missing",type:"flags.3?true"},{name:"form_id",type:"long"},{name:"bot_id",type:"long"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"flags.5?WebDocument"},{name:"invoice",type:"Invoice"},{name:"provider_id",type:"long"},{name:"url",type:"string"},{name:"native_provider",type:"flags.4?string"},{name:"native_params",type:"flags.4?DataJSON"},{name:"additional_methods",type:"flags.6?Vector<PaymentFormMethod>"},{name:"saved_info",type:"flags.0?PaymentRequestedInfo"},{name:"saved_credentials",type:"flags.1?Vector<PaymentSavedCredentials>"},{name:"users",type:"Vector<User>"}],type:"payments.PaymentForm"},{id:-784000893,predicate:"payments.validatedRequestedInfo",params:[{name:"flags",type:"#"},{name:"id",type:"flags.0?string"},{name:"shipping_options",type:"flags.1?Vector<ShippingOption>"}],type:"payments.ValidatedRequestedInfo"},{id:1314881805,predicate:"payments.paymentResult",params:[{name:"updates",type:"Updates"}],type:"payments.PaymentResult"},{id:1891958275,predicate:"payments.paymentReceipt",params:[{name:"flags",type:"#"},{name:"date",type:"int"},{name:"bot_id",type:"long"},{name:"provider_id",type:"long"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"flags.2?WebDocument"},{name:"invoice",type:"Invoice"},{name:"info",type:"flags.0?PaymentRequestedInfo"},{name:"shipping",type:"flags.1?ShippingOption"},{name:"tip_amount",type:"flags.3?long"},{name:"currency",type:"string"},{name:"total_amount",type:"long"},{name:"credentials_title",type:"string"},{name:"users",type:"Vector<User>"}],type:"payments.PaymentReceipt"},{id:-74456004,predicate:"payments.savedInfo",params:[{name:"flags",type:"#"},{name:"has_saved_credentials",type:"flags.1?true"},{name:"saved_info",type:"flags.0?PaymentRequestedInfo"}],type:"payments.SavedInfo"},{id:-1056001329,predicate:"inputPaymentCredentialsSaved",params:[{name:"id",type:"string"},{name:"tmp_password",type:"bytes"}],type:"InputPaymentCredentials"},{id:873977640,predicate:"inputPaymentCredentials",params:[{name:"flags",type:"#"},{name:"save",type:"flags.0?true"},{name:"data",type:"DataJSON"}],type:"InputPaymentCredentials"},{id:-614138572,predicate:"account.tmpPassword",params:[{name:"tmp_password",type:"bytes"},{name:"valid_until",type:"int"}],type:"account.TmpPassword"},{id:-1239335713,predicate:"shippingOption",params:[{name:"id",type:"string"},{name:"title",type:"string"},{name:"prices",type:"Vector<LabeledPrice>"}],type:"ShippingOption"},{id:-1246823043,predicate:"updateBotShippingQuery",params:[{name:"query_id",type:"long"},{name:"user_id",type:"long"},{name:"payload",type:"bytes"},{name:"shipping_address",type:"PostAddress"}],type:"Update"},{id:-1934976362,predicate:"updateBotPrecheckoutQuery",params:[{name:"flags",type:"#"},{name:"query_id",type:"long"},{name:"user_id",type:"long"},{name:"payload",type:"bytes"},{name:"info",type:"flags.0?PaymentRequestedInfo"},{name:"shipping_option_id",type:"flags.1?string"},{name:"currency",type:"string"},{name:"total_amount",type:"long"}],type:"Update"},{id:853188252,predicate:"inputStickerSetItem",params:[{name:"flags",type:"#"},{name:"document",type:"InputDocument"},{name:"emoji",type:"string"},{name:"mask_coords",type:"flags.0?MaskCoords"},{name:"keywords",type:"flags.1?string"}],type:"InputStickerSetItem"},{id:-1425052898,predicate:"updatePhoneCall",params:[{name:"phone_call",type:"PhoneCall"}],type:"Update"},{id:506920429,predicate:"inputPhoneCall",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputPhoneCall"},{id:1399245077,predicate:"phoneCallEmpty",params:[{name:"id",type:"long"}],type:"PhoneCall"},{id:-987599081,predicate:"phoneCallWaiting",params:[{name:"flags",type:"#"},{name:"video",type:"flags.6?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"},{name:"protocol",type:"PhoneCallProtocol"},{name:"receive_date",type:"flags.0?int"}],type:"PhoneCall"},{id:347139340,predicate:"phoneCallRequested",params:[{name:"flags",type:"#"},{name:"video",type:"flags.6?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"},{name:"g_a_hash",type:"bytes"},{name:"protocol",type:"PhoneCallProtocol"}],type:"PhoneCall"},{id:912311057,predicate:"phoneCallAccepted",params:[{name:"flags",type:"#"},{name:"video",type:"flags.6?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"},{name:"g_b",type:"bytes"},{name:"protocol",type:"PhoneCallProtocol"}],type:"PhoneCall"},{id:-1770029977,predicate:"phoneCall",params:[{name:"flags",type:"#"},{name:"p2p_allowed",type:"flags.5?true"},{name:"video",type:"flags.6?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"long"},{name:"participant_id",type:"long"},{name:"g_a_or_b",type:"bytes"},{name:"key_fingerprint",type:"long"},{name:"protocol",type:"PhoneCallProtocol"},{name:"connections",type:"Vector<PhoneConnection>"},{name:"start_date",type:"int"}],type:"PhoneCall"},{id:1355435489,predicate:"phoneCallDiscarded",params:[{name:"flags",type:"#"},{name:"need_rating",type:"flags.2?true"},{name:"need_debug",type:"flags.3?true"},{name:"video",type:"flags.6?true"},{name:"id",type:"long"},{name:"reason",type:"flags.0?PhoneCallDiscardReason"},{name:"duration",type:"flags.1?int"}],type:"PhoneCall"},{id:-1665063993,predicate:"phoneConnection",params:[{name:"flags",type:"#"},{name:"tcp",type:"flags.0?true"},{name:"id",type:"long"},{name:"ip",type:"string"},{name:"ipv6",type:"string"},{name:"port",type:"int"},{name:"peer_tag",type:"bytes"}],type:"PhoneConnection"},{id:-58224696,predicate:"phoneCallProtocol",params:[{name:"flags",type:"#"},{name:"udp_p2p",type:"flags.0?true"},{name:"udp_reflector",type:"flags.1?true"},{name:"min_layer",type:"int"},{name:"max_layer",type:"int"},{name:"library_versions",type:"Vector<string>"}],type:"PhoneCallProtocol"},{id:-326966976,predicate:"phone.phoneCall",params:[{name:"phone_call",type:"PhoneCall"},{name:"users",type:"Vector<User>"}],type:"phone.PhoneCall"},{id:-2134272152,predicate:"inputMessagesFilterPhoneCalls",params:[{name:"flags",type:"#"},{name:"missed",type:"flags.0?true"}],type:"MessagesFilter"},{id:-2132731265,predicate:"messageActionPhoneCall",params:[{name:"flags",type:"#"},{name:"video",type:"flags.2?true"},{name:"call_id",type:"long"},{name:"reason",type:"flags.0?PhoneCallDiscardReason"},{name:"duration",type:"flags.1?int"}],type:"MessageAction"},{id:2054952868,predicate:"inputMessagesFilterRoundVoice",params:[],type:"MessagesFilter"},{id:-1253451181,predicate:"inputMessagesFilterRoundVideo",params:[],type:"MessagesFilter"},{id:-1997373508,predicate:"sendMessageRecordRoundAction",params:[],type:"SendMessageAction"},{id:608050278,predicate:"sendMessageUploadRoundAction",params:[{name:"progress",type:"int"}],type:"SendMessageAction"},{id:-242427324,predicate:"upload.fileCdnRedirect",params:[{name:"dc_id",type:"int"},{name:"file_token",type:"bytes"},{name:"encryption_key",type:"bytes"},{name:"encryption_iv",type:"bytes"},{name:"file_hashes",type:"Vector<FileHash>"}],type:"upload.File"},{id:-290921362,predicate:"upload.cdnFileReuploadNeeded",params:[{name:"request_token",type:"bytes"}],type:"upload.CdnFile"},{id:-1449145777,predicate:"upload.cdnFile",params:[{name:"bytes",type:"bytes"}],type:"upload.CdnFile"},{id:-914167110,predicate:"cdnPublicKey",params:[{name:"dc_id",type:"int"},{name:"public_key",type:"string"}],type:"CdnPublicKey"},{id:1462101002,predicate:"cdnConfig",params:[{name:"public_keys",type:"Vector<CdnPublicKey>"}],type:"CdnConfig"},{id:-283684427,predicate:"pageBlockChannel",params:[{name:"channel",type:"Chat"}],type:"PageBlock"},{id:-892239370,predicate:"langPackString",params:[{name:"key",type:"string"},{name:"value",type:"string"}],type:"LangPackString"},{id:1816636575,predicate:"langPackStringPluralized",params:[{name:"flags",type:"#"},{name:"key",type:"string"},{name:"zero_value",type:"flags.0?string"},{name:"one_value",type:"flags.1?string"},{name:"two_value",type:"flags.2?string"},{name:"few_value",type:"flags.3?string"},{name:"many_value",type:"flags.4?string"},{name:"other_value",type:"string"}],type:"LangPackString"},{id:695856818,predicate:"langPackStringDeleted",params:[{name:"key",type:"string"}],type:"LangPackString"},{id:-209337866,predicate:"langPackDifference",params:[{name:"lang_code",type:"string"},{name:"from_version",type:"int"},{name:"version",type:"int"},{name:"strings",type:"Vector<LangPackString>"}],type:"LangPackDifference"},{id:-288727837,predicate:"langPackLanguage",params:[{name:"flags",type:"#"},{name:"official",type:"flags.0?true"},{name:"rtl",type:"flags.2?true"},{name:"beta",type:"flags.3?true"},{name:"name",type:"string"},{name:"native_name",type:"string"},{name:"lang_code",type:"string"},{name:"base_lang_code",type:"flags.1?string"},{name:"plural_code",type:"string"},{name:"strings_count",type:"int"},{name:"translated_count",type:"int"},{name:"translations_url",type:"string"}],type:"LangPackLanguage"},{id:1180041828,predicate:"updateLangPackTooLong",params:[{name:"lang_code",type:"string"}],type:"Update"},{id:1442983757,predicate:"updateLangPack",params:[{name:"difference",type:"LangPackDifference"}],type:"Update"},{id:885242707,predicate:"channelParticipantAdmin",params:[{name:"flags",type:"#"},{name:"can_edit",type:"flags.0?true"},{name:"self",type:"flags.1?true"},{name:"user_id",type:"long"},{name:"inviter_id",type:"flags.1?long"},{name:"promoted_by",type:"long"},{name:"date",type:"int"},{name:"admin_rights",type:"ChatAdminRights"},{name:"rank",type:"flags.2?string"}],type:"ChannelParticipant"},{id:1844969806,predicate:"channelParticipantBanned",params:[{name:"flags",type:"#"},{name:"left",type:"flags.0?true"},{name:"peer",type:"Peer"},{name:"kicked_by",type:"long"},{name:"date",type:"int"},{name:"banned_rights",type:"ChatBannedRights"}],type:"ChannelParticipant"},{id:338142689,predicate:"channelParticipantsBanned",params:[{name:"q",type:"string"}],type:"ChannelParticipantsFilter"},{id:106343499,predicate:"channelParticipantsSearch",params:[{name:"q",type:"string"}],type:"ChannelParticipantsFilter"},{id:-421545947,predicate:"channelAdminLogEventActionChangeTitle",params:[{name:"prev_value",type:"string"},{name:"new_value",type:"string"}],type:"ChannelAdminLogEventAction"},{id:1427671598,predicate:"channelAdminLogEventActionChangeAbout",params:[{name:"prev_value",type:"string"},{name:"new_value",type:"string"}],type:"ChannelAdminLogEventAction"},{id:1783299128,predicate:"channelAdminLogEventActionChangeUsername",params:[{name:"prev_value",type:"string"},{name:"new_value",type:"string"}],type:"ChannelAdminLogEventAction"},{id:1129042607,predicate:"channelAdminLogEventActionChangePhoto",params:[{name:"prev_photo",type:"Photo"},{name:"new_photo",type:"Photo"}],type:"ChannelAdminLogEventAction"},{id:460916654,predicate:"channelAdminLogEventActionToggleInvites",params:[{name:"new_value",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:648939889,predicate:"channelAdminLogEventActionToggleSignatures",params:[{name:"new_value",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:-370660328,predicate:"channelAdminLogEventActionUpdatePinned",params:[{name:"message",type:"Message"}],type:"ChannelAdminLogEventAction"},{id:1889215493,predicate:"channelAdminLogEventActionEditMessage",params:[{name:"prev_message",type:"Message"},{name:"new_message",type:"Message"}],type:"ChannelAdminLogEventAction"},{id:1121994683,predicate:"channelAdminLogEventActionDeleteMessage",params:[{name:"message",type:"Message"}],type:"ChannelAdminLogEventAction"},{id:405815507,predicate:"channelAdminLogEventActionParticipantJoin",params:[],type:"ChannelAdminLogEventAction"},{id:-124291086,predicate:"channelAdminLogEventActionParticipantLeave",params:[],type:"ChannelAdminLogEventAction"},{id:-484690728,predicate:"channelAdminLogEventActionParticipantInvite",params:[{name:"participant",type:"ChannelParticipant"}],type:"ChannelAdminLogEventAction"},{id:-422036098,predicate:"channelAdminLogEventActionParticipantToggleBan",params:[{name:"prev_participant",type:"ChannelParticipant"},{name:"new_participant",type:"ChannelParticipant"}],type:"ChannelAdminLogEventAction"},{id:-714643696,predicate:"channelAdminLogEventActionParticipantToggleAdmin",params:[{name:"prev_participant",type:"ChannelParticipant"},{name:"new_participant",type:"ChannelParticipant"}],type:"ChannelAdminLogEventAction"},{id:531458253,predicate:"channelAdminLogEvent",params:[{name:"id",type:"long"},{name:"date",type:"int"},{name:"user_id",type:"long"},{name:"action",type:"ChannelAdminLogEventAction"}],type:"ChannelAdminLogEvent"},{id:-309659827,predicate:"channels.adminLogResults",params:[{name:"events",type:"Vector<ChannelAdminLogEvent>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"channels.AdminLogResults"},{id:-368018716,predicate:"channelAdminLogEventsFilter",params:[{name:"flags",type:"#"},{name:"join",type:"flags.0?true"},{name:"leave",type:"flags.1?true"},{name:"invite",type:"flags.2?true"},{name:"ban",type:"flags.3?true"},{name:"unban",type:"flags.4?true"},{name:"kick",type:"flags.5?true"},{name:"unkick",type:"flags.6?true"},{name:"promote",type:"flags.7?true"},{name:"demote",type:"flags.8?true"},{name:"info",type:"flags.9?true"},{name:"settings",type:"flags.10?true"},{name:"pinned",type:"flags.11?true"},{name:"edit",type:"flags.12?true"},{name:"delete",type:"flags.13?true"},{name:"group_call",type:"flags.14?true"},{name:"invites",type:"flags.15?true"},{name:"send",type:"flags.16?true"},{name:"forums",type:"flags.17?true"}],type:"ChannelAdminLogEventsFilter"},{id:511092620,predicate:"topPeerCategoryPhoneCalls",params:[],type:"TopPeerCategory"},{id:-2143067670,predicate:"pageBlockAudio",params:[{name:"audio_id",type:"long"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:1558266229,predicate:"popularContact",params:[{name:"client_id",type:"long"},{name:"importers",type:"int"}],type:"PopularContact"},{id:1200788123,predicate:"messageActionScreenshotTaken",params:[],type:"MessageAction"},{id:-1634752813,predicate:"messages.favedStickersNotModified",params:[],type:"messages.FavedStickers"},{id:750063767,predicate:"messages.favedStickers",params:[{name:"hash",type:"long"},{name:"packs",type:"Vector<StickerPack>"},{name:"stickers",type:"Vector<Document>"}],type:"messages.FavedStickers"},{id:-451831443,predicate:"updateFavedStickers",params:[],type:"Update"},{id:-366410403,predicate:"updateChannelReadMessagesContents",params:[{name:"flags",type:"#"},{name:"channel_id",type:"long"},{name:"top_msg_id",type:"flags.0?int"},{name:"messages",type:"Vector<int>"}],type:"Update"},{id:-1040652646,predicate:"inputMessagesFilterMyMentions",params:[],type:"MessagesFilter"},{id:1887741886,predicate:"updateContactsReset",params:[],type:"Update"},{id:-1312568665,predicate:"channelAdminLogEventActionChangeStickerSet",params:[{name:"prev_stickerset",type:"InputStickerSet"},{name:"new_stickerset",type:"InputStickerSet"}],type:"ChannelAdminLogEventAction"},{id:-85549226,predicate:"messageActionCustomAction",params:[{name:"message",type:"string"}],type:"MessageAction"},{id:178373535,predicate:"inputPaymentCredentialsApplePay",params:[{name:"payment_data",type:"DataJSON"}],type:"InputPaymentCredentials"},{id:-419271411,predicate:"inputMessagesFilterGeo",params:[],type:"MessagesFilter"},{id:-530392189,predicate:"inputMessagesFilterContacts",params:[],type:"MessagesFilter"},{id:-1304443240,predicate:"updateChannelAvailableMessages",params:[{name:"channel_id",type:"long"},{name:"available_min_id",type:"int"}],type:"Update"},{id:1599903217,predicate:"channelAdminLogEventActionTogglePreHistoryHidden",params:[{name:"new_value",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:-1759532989,predicate:"inputMediaGeoLive",params:[{name:"flags",type:"#"},{name:"stopped",type:"flags.0?true"},{name:"geo_point",type:"InputGeoPoint"},{name:"heading",type:"flags.2?int"},{name:"period",type:"flags.1?int"},{name:"proximity_notification_radius",type:"flags.3?int"}],type:"InputMedia"},{id:-1186937242,predicate:"messageMediaGeoLive",params:[{name:"flags",type:"#"},{name:"geo",type:"GeoPoint"},{name:"heading",type:"flags.0?int"},{name:"period",type:"int"},{name:"proximity_notification_radius",type:"flags.1?int"}],type:"MessageMedia"},{id:1189204285,predicate:"recentMeUrlUnknown",params:[{name:"url",type:"string"}],type:"RecentMeUrl"},{id:-1188296222,predicate:"recentMeUrlUser",params:[{name:"url",type:"string"},{name:"user_id",type:"long"}],type:"RecentMeUrl"},{id:-1294306862,predicate:"recentMeUrlChat",params:[{name:"url",type:"string"},{name:"chat_id",type:"long"}],type:"RecentMeUrl"},{id:-347535331,predicate:"recentMeUrlChatInvite",params:[{name:"url",type:"string"},{name:"chat_invite",type:"ChatInvite"}],type:"RecentMeUrl"},{id:-1140172836,predicate:"recentMeUrlStickerSet",params:[{name:"url",type:"string"},{name:"set",type:"StickerSetCovered"}],type:"RecentMeUrl"},{id:235081943,predicate:"help.recentMeUrls",params:[{name:"urls",type:"Vector<RecentMeUrl>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"help.RecentMeUrls"},{id:-266911767,predicate:"channels.channelParticipantsNotModified",params:[],type:"channels.ChannelParticipants"},{id:1951620897,predicate:"messages.messagesNotModified",params:[{name:"count",type:"int"}],type:"messages.Messages"},{id:482797855,predicate:"inputSingleMedia",params:[{name:"flags",type:"#"},{name:"media",type:"InputMedia"},{name:"random_id",type:"long"},{name:"message",type:"string"},{name:"entities",type:"flags.0?Vector<MessageEntity>"}],type:"InputSingleMedia"},{id:-1493633966,predicate:"webAuthorization",params:[{name:"hash",type:"long"},{name:"bot_id",type:"long"},{name:"domain",type:"string"},{name:"browser",type:"string"},{name:"platform",type:"string"},{name:"date_created",type:"int"},{name:"date_active",type:"int"},{name:"ip",type:"string"},{name:"region",type:"string"}],type:"WebAuthorization"},{id:-313079300,predicate:"account.webAuthorizations",params:[{name:"authorizations",type:"Vector<WebAuthorization>"},{name:"users",type:"Vector<User>"}],type:"account.WebAuthorizations"},{id:-1502174430,predicate:"inputMessageID",params:[{name:"id",type:"int"}],type:"InputMessage"},{id:-1160215659,predicate:"inputMessageReplyTo",params:[{name:"id",type:"int"}],type:"InputMessage"},{id:-2037963464,predicate:"inputMessagePinned",params:[],type:"InputMessage"},{id:-1687559349,predicate:"messageEntityPhone",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1280209983,predicate:"messageEntityCashtag",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-988359047,predicate:"messageActionBotAllowed",params:[{name:"flags",type:"#"},{name:"attach_menu",type:"flags.1?true"},{name:"domain",type:"flags.0?string"},{name:"app",type:"flags.2?BotApp"}],type:"MessageAction"},{id:-55902537,predicate:"inputDialogPeer",params:[{name:"peer",type:"InputPeer"}],type:"InputDialogPeer"},{id:-445792507,predicate:"dialogPeer",params:[{name:"peer",type:"Peer"}],type:"DialogPeer"},{id:223655517,predicate:"messages.foundStickerSetsNotModified",params:[],type:"messages.FoundStickerSets"},{id:-1963942446,predicate:"messages.foundStickerSets",params:[{name:"hash",type:"long"},{name:"sets",type:"Vector<StickerSetCovered>"}],type:"messages.FoundStickerSets"},{id:-207944868,predicate:"fileHash",params:[{name:"offset",type:"long"},{name:"limit",type:"int"},{name:"hash",type:"bytes"}],type:"FileHash"},{id:-104284986,predicate:"webDocumentNoProxy",params:[{name:"url",type:"string"},{name:"size",type:"int"},{name:"mime_type",type:"string"},{name:"attributes",type:"Vector<DocumentAttribute>"}],type:"WebDocument"},{id:1968737087,predicate:"inputClientProxy",params:[{name:"address",type:"string"},{name:"port",type:"int"}],type:"InputClientProxy"},{id:-483352705,predicate:"help.termsOfServiceUpdateEmpty",params:[{name:"expires",type:"int"}],type:"help.TermsOfServiceUpdate"},{id:686618977,predicate:"help.termsOfServiceUpdate",params:[{name:"expires",type:"int"},{name:"terms_of_service",type:"help.TermsOfService"}],type:"help.TermsOfServiceUpdate"},{id:859091184,predicate:"inputSecureFileUploaded",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"md5_checksum",type:"string"},{name:"file_hash",type:"bytes"},{name:"secret",type:"bytes"}],type:"InputSecureFile"},{id:1399317950,predicate:"inputSecureFile",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputSecureFile"},{id:-876089816,predicate:"inputSecureFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputFileLocation"},{id:1679398724,predicate:"secureFileEmpty",params:[],type:"SecureFile"},{id:2097791614,predicate:"secureFile",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"size",type:"long"},{name:"dc_id",type:"int"},{name:"date",type:"int"},{name:"file_hash",type:"bytes"},{name:"secret",type:"bytes"}],type:"SecureFile"},{id:-1964327229,predicate:"secureData",params:[{name:"data",type:"bytes"},{name:"data_hash",type:"bytes"},{name:"secret",type:"bytes"}],type:"SecureData"},{id:2103482845,predicate:"securePlainPhone",params:[{name:"phone",type:"string"}],type:"SecurePlainData"},{id:569137759,predicate:"securePlainEmail",params:[{name:"email",type:"string"}],type:"SecurePlainData"},{id:-1658158621,predicate:"secureValueTypePersonalDetails",params:[],type:"SecureValueType"},{id:1034709504,predicate:"secureValueTypePassport",params:[],type:"SecureValueType"},{id:115615172,predicate:"secureValueTypeDriverLicense",params:[],type:"SecureValueType"},{id:-1596951477,predicate:"secureValueTypeIdentityCard",params:[],type:"SecureValueType"},{id:-1717268701,predicate:"secureValueTypeInternalPassport",params:[],type:"SecureValueType"},{id:-874308058,predicate:"secureValueTypeAddress",params:[],type:"SecureValueType"},{id:-63531698,predicate:"secureValueTypeUtilityBill",params:[],type:"SecureValueType"},{id:-1995211763,predicate:"secureValueTypeBankStatement",params:[],type:"SecureValueType"},{id:-1954007928,predicate:"secureValueTypeRentalAgreement",params:[],type:"SecureValueType"},{id:-1713143702,predicate:"secureValueTypePassportRegistration",params:[],type:"SecureValueType"},{id:-368907213,predicate:"secureValueTypeTemporaryRegistration",params:[],type:"SecureValueType"},{id:-1289704741,predicate:"secureValueTypePhone",params:[],type:"SecureValueType"},{id:-1908627474,predicate:"secureValueTypeEmail",params:[],type:"SecureValueType"},{id:411017418,predicate:"secureValue",params:[{name:"flags",type:"#"},{name:"type",type:"SecureValueType"},{name:"data",type:"flags.0?SecureData"},{name:"front_side",type:"flags.1?SecureFile"},{name:"reverse_side",type:"flags.2?SecureFile"},{name:"selfie",type:"flags.3?SecureFile"},{name:"translation",type:"flags.6?Vector<SecureFile>"},{name:"files",type:"flags.4?Vector<SecureFile>"},{name:"plain_data",type:"flags.5?SecurePlainData"},{name:"hash",type:"bytes"}],type:"SecureValue"},{id:-618540889,predicate:"inputSecureValue",params:[{name:"flags",type:"#"},{name:"type",type:"SecureValueType"},{name:"data",type:"flags.0?SecureData"},{name:"front_side",type:"flags.1?InputSecureFile"},{name:"reverse_side",type:"flags.2?InputSecureFile"},{name:"selfie",type:"flags.3?InputSecureFile"},{name:"translation",type:"flags.6?Vector<InputSecureFile>"},{name:"files",type:"flags.4?Vector<InputSecureFile>"},{name:"plain_data",type:"flags.5?SecurePlainData"}],type:"InputSecureValue"},{id:-316748368,predicate:"secureValueHash",params:[{name:"type",type:"SecureValueType"},{name:"hash",type:"bytes"}],type:"SecureValueHash"},{id:-391902247,predicate:"secureValueErrorData",params:[{name:"type",type:"SecureValueType"},{name:"data_hash",type:"bytes"},{name:"field",type:"string"},{name:"text",type:"string"}],type:"SecureValueError"},{id:12467706,predicate:"secureValueErrorFrontSide",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"bytes"},{name:"text",type:"string"}],type:"SecureValueError"},{id:-2037765467,predicate:"secureValueErrorReverseSide",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"bytes"},{name:"text",type:"string"}],type:"SecureValueError"},{id:-449327402,predicate:"secureValueErrorSelfie",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"bytes"},{name:"text",type:"string"}],type:"SecureValueError"},{id:2054162547,predicate:"secureValueErrorFile",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"bytes"},{name:"text",type:"string"}],type:"SecureValueError"},{id:1717706985,predicate:"secureValueErrorFiles",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"Vector<bytes>"},{name:"text",type:"string"}],type:"SecureValueError"},{id:871426631,predicate:"secureCredentialsEncrypted",params:[{name:"data",type:"bytes"},{name:"hash",type:"bytes"},{name:"secret",type:"bytes"}],type:"SecureCredentialsEncrypted"},{id:-1389486888,predicate:"account.authorizationForm",params:[{name:"flags",type:"#"},{name:"required_types",type:"Vector<SecureRequiredType>"},{name:"values",type:"Vector<SecureValue>"},{name:"errors",type:"Vector<SecureValueError>"},{name:"users",type:"Vector<User>"},{name:"privacy_policy_url",type:"flags.0?string"}],type:"account.AuthorizationForm"},{id:-2128640689,predicate:"account.sentEmailCode",params:[{name:"email_pattern",type:"string"},{name:"length",type:"int"}],type:"account.SentEmailCode"},{id:455635795,predicate:"messageActionSecureValuesSentMe",params:[{name:"values",type:"Vector<SecureValue>"},{name:"credentials",type:"SecureCredentialsEncrypted"}],type:"MessageAction"},{id:-648257196,predicate:"messageActionSecureValuesSent",params:[{name:"types",type:"Vector<SecureValueType>"}],type:"MessageAction"},{id:1722786150,predicate:"help.deepLinkInfoEmpty",params:[],type:"help.DeepLinkInfo"},{id:1783556146,predicate:"help.deepLinkInfo",params:[{name:"flags",type:"#"},{name:"update_app",type:"flags.0?true"},{name:"message",type:"string"},{name:"entities",type:"flags.1?Vector<MessageEntity>"}],type:"help.DeepLinkInfo"},{id:289586518,predicate:"savedPhoneContact",params:[{name:"phone",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"date",type:"int"}],type:"SavedContact"},{id:1304052993,predicate:"account.takeout",params:[{name:"id",type:"long"}],type:"account.Takeout"},{id:700340377,predicate:"inputTakeoutFileLocation",params:[],type:"InputFileLocation"},{id:-513517117,predicate:"updateDialogUnreadMark",params:[{name:"flags",type:"#"},{name:"unread",type:"flags.0?true"},{name:"peer",type:"DialogPeer"}],type:"Update"},{id:-253500010,predicate:"messages.dialogsNotModified",params:[{name:"count",type:"int"}],type:"messages.Dialogs"},{id:-1625153079,predicate:"inputWebFileGeoPointLocation",params:[{name:"geo_point",type:"InputGeoPoint"},{name:"access_hash",type:"long"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"zoom",type:"int"},{name:"scale",type:"int"}],type:"InputWebFileLocation"},{id:-1255369827,predicate:"contacts.topPeersDisabled",params:[],type:"contacts.TopPeers"},{id:-1685456582,predicate:"inputReportReasonCopyright",params:[],type:"ReportReason"},{id:-732254058,predicate:"passwordKdfAlgoUnknown",params:[],type:"PasswordKdfAlgo"},{id:4883767,predicate:"securePasswordKdfAlgoUnknown",params:[],type:"SecurePasswordKdfAlgo"},{id:-1141711456,predicate:"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000",params:[{name:"salt",type:"bytes"}],type:"SecurePasswordKdfAlgo"},{id:-2042159726,predicate:"securePasswordKdfAlgoSHA512",params:[{name:"salt",type:"bytes"}],type:"SecurePasswordKdfAlgo"},{id:354925740,predicate:"secureSecretSettings",params:[{name:"secure_algo",type:"SecurePasswordKdfAlgo"},{name:"secure_secret",type:"bytes"},{name:"secure_secret_id",type:"long"}],type:"SecureSecretSettings"},{id:982592842,predicate:"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow",params:[{name:"salt1",type:"bytes"},{name:"salt2",type:"bytes"},{name:"g",type:"int"},{name:"p",type:"bytes"}],type:"PasswordKdfAlgo"},{id:-1736378792,predicate:"inputCheckPasswordEmpty",params:[],type:"InputCheckPasswordSRP"},{id:-763367294,predicate:"inputCheckPasswordSRP",params:[{name:"srp_id",type:"long"},{name:"A",type:"bytes"},{name:"M1",type:"bytes"}],type:"InputCheckPasswordSRP"},{id:-2036501105,predicate:"secureValueError",params:[{name:"type",type:"SecureValueType"},{name:"hash",type:"bytes"},{name:"text",type:"string"}],type:"SecureValueError"},{id:-1592506512,predicate:"secureValueErrorTranslationFile",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"bytes"},{name:"text",type:"string"}],type:"SecureValueError"},{id:878931416,predicate:"secureValueErrorTranslationFiles",params:[{name:"type",type:"SecureValueType"},{name:"file_hash",type:"Vector<bytes>"},{name:"text",type:"string"}],type:"SecureValueError"},{id:-2103600678,predicate:"secureRequiredType",params:[{name:"flags",type:"#"},{name:"native_names",type:"flags.0?true"},{name:"selfie_required",type:"flags.1?true"},{name:"translation_required",type:"flags.2?true"},{name:"type",type:"SecureValueType"}],type:"SecureRequiredType"},{id:41187252,predicate:"secureRequiredTypeOneOf",params:[{name:"types",type:"Vector<SecureRequiredType>"}],type:"SecureRequiredType"},{id:-1078332329,predicate:"help.passportConfigNotModified",params:[],type:"help.PassportConfig"},{id:-1600596305,predicate:"help.passportConfig",params:[{name:"hash",type:"int"},{name:"countries_langs",type:"DataJSON"}],type:"help.PassportConfig"},{id:488313413,predicate:"inputAppEvent",params:[{name:"time",type:"double"},{name:"type",type:"string"},{name:"peer",type:"long"},{name:"data",type:"JSONValue"}],type:"InputAppEvent"},{id:-1059185703,predicate:"jsonObjectValue",params:[{name:"key",type:"string"},{name:"value",type:"JSONValue"}],type:"JSONObjectValue"},{id:1064139624,predicate:"jsonNull",params:[],type:"JSONValue"},{id:-952869270,predicate:"jsonBool",params:[{name:"value",type:"Bool"}],type:"JSONValue"},{id:736157604,predicate:"jsonNumber",params:[{name:"value",type:"double"}],type:"JSONValue"},{id:-1222740358,predicate:"jsonString",params:[{name:"value",type:"string"}],type:"JSONValue"},{id:-146520221,predicate:"jsonArray",params:[{name:"value",type:"Vector<JSONValue>"}],type:"JSONValue"},{id:-1715350371,predicate:"jsonObject",params:[{name:"value",type:"Vector<JSONObjectValue>"}],type:"JSONValue"},{id:-1311015810,predicate:"inputNotifyBroadcasts",params:[],type:"InputNotifyPeer"},{id:-703403793,predicate:"notifyBroadcasts",params:[],type:"NotifyPeer"},{id:-311786236,predicate:"textSubscript",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:-939827711,predicate:"textSuperscript",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:55281185,predicate:"textMarked",params:[{name:"text",type:"RichText"}],type:"RichText"},{id:483104362,predicate:"textPhone",params:[{name:"text",type:"RichText"},{name:"phone",type:"string"}],type:"RichText"},{id:136105807,predicate:"textImage",params:[{name:"document_id",type:"long"},{name:"w",type:"int"},{name:"h",type:"int"}],type:"RichText"},{id:504660880,predicate:"pageBlockKicker",params:[{name:"text",type:"RichText"}],type:"PageBlock"},{id:878078826,predicate:"pageTableCell",params:[{name:"flags",type:"#"},{name:"header",type:"flags.0?true"},{name:"align_center",type:"flags.3?true"},{name:"align_right",type:"flags.4?true"},{name:"valign_middle",type:"flags.5?true"},{name:"valign_bottom",type:"flags.6?true"},{name:"text",type:"flags.7?RichText"},{name:"colspan",type:"flags.1?int"},{name:"rowspan",type:"flags.2?int"}],type:"PageTableCell"},{id:-524237339,predicate:"pageTableRow",params:[{name:"cells",type:"Vector<PageTableCell>"}],type:"PageTableRow"},{id:-1085412734,predicate:"pageBlockTable",params:[{name:"flags",type:"#"},{name:"bordered",type:"flags.0?true"},{name:"striped",type:"flags.1?true"},{name:"title",type:"RichText"},{name:"rows",type:"Vector<PageTableRow>"}],type:"PageBlock"},{id:1869903447,predicate:"pageCaption",params:[{name:"text",type:"RichText"},{name:"credit",type:"RichText"}],type:"PageCaption"},{id:-1188055347,predicate:"pageListItemText",params:[{name:"text",type:"RichText"}],type:"PageListItem"},{id:635466748,predicate:"pageListItemBlocks",params:[{name:"blocks",type:"Vector<PageBlock>"}],type:"PageListItem"},{id:1577484359,predicate:"pageListOrderedItemText",params:[{name:"num",type:"string"},{name:"text",type:"RichText"}],type:"PageListOrderedItem"},{id:-1730311882,predicate:"pageListOrderedItemBlocks",params:[{name:"num",type:"string"},{name:"blocks",type:"Vector<PageBlock>"}],type:"PageListOrderedItem"},{id:-1702174239,predicate:"pageBlockOrderedList",params:[{name:"items",type:"Vector<PageListOrderedItem>"}],type:"PageBlock"},{id:1987480557,predicate:"pageBlockDetails",params:[{name:"flags",type:"#"},{name:"open",type:"flags.0?true"},{name:"blocks",type:"Vector<PageBlock>"},{name:"title",type:"RichText"}],type:"PageBlock"},{id:-1282352120,predicate:"pageRelatedArticle",params:[{name:"flags",type:"#"},{name:"url",type:"string"},{name:"webpage_id",type:"long"},{name:"title",type:"flags.0?string"},{name:"description",type:"flags.1?string"},{name:"photo_id",type:"flags.2?long"},{name:"author",type:"flags.3?string"},{name:"published_date",type:"flags.4?int"}],type:"PageRelatedArticle"},{id:370236054,predicate:"pageBlockRelatedArticles",params:[{name:"title",type:"RichText"},{name:"articles",type:"Vector<PageRelatedArticle>"}],type:"PageBlock"},{id:-1538310410,predicate:"pageBlockMap",params:[{name:"geo",type:"GeoPoint"},{name:"zoom",type:"int"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"caption",type:"PageCaption"}],type:"PageBlock"},{id:-1738178803,predicate:"page",params:[{name:"flags",type:"#"},{name:"part",type:"flags.0?true"},{name:"rtl",type:"flags.1?true"},{name:"v2",type:"flags.2?true"},{name:"url",type:"string"},{name:"blocks",type:"Vector<PageBlock>"},{name:"photos",type:"Vector<Photo>"},{name:"documents",type:"Vector<Document>"},{name:"views",type:"flags.3?int"}],type:"Page"},{id:-610373422,predicate:"inputPrivacyKeyPhoneP2P",params:[],type:"InputPrivacyKey"},{id:961092808,predicate:"privacyKeyPhoneP2P",params:[],type:"PrivacyKey"},{id:894777186,predicate:"textAnchor",params:[{name:"text",type:"RichText"},{name:"name",type:"string"}],type:"RichText"},{id:-1945767479,predicate:"help.supportName",params:[{name:"name",type:"string"}],type:"help.SupportName"},{id:-206688531,predicate:"help.userInfoEmpty",params:[],type:"help.UserInfo"},{id:32192344,predicate:"help.userInfo",params:[{name:"message",type:"string"},{name:"entities",type:"Vector<MessageEntity>"},{name:"author",type:"string"},{name:"date",type:"int"}],type:"help.UserInfo"},{id:-202219658,predicate:"messageActionContactSignUp",params:[],type:"MessageAction"},{id:-1398708869,predicate:"updateMessagePoll",params:[{name:"flags",type:"#"},{name:"poll_id",type:"long"},{name:"poll",type:"flags.0?Poll"},{name:"results",type:"PollResults"}],type:"Update"},{id:1823064809,predicate:"pollAnswer",params:[{name:"text",type:"string"},{name:"option",type:"bytes"}],type:"PollAnswer"},{id:-2032041631,predicate:"poll",params:[{name:"id",type:"long"},{name:"flags",type:"#"},{name:"closed",type:"flags.0?true"},{name:"public_voters",type:"flags.1?true"},{name:"multiple_choice",type:"flags.2?true"},{name:"quiz",type:"flags.3?true"},{name:"question",type:"string"},{name:"answers",type:"Vector<PollAnswer>"},{name:"close_period",type:"flags.4?int"},{name:"close_date",type:"flags.5?int"}],type:"Poll"},{id:997055186,predicate:"pollAnswerVoters",params:[{name:"flags",type:"#"},{name:"chosen",type:"flags.0?true"},{name:"correct",type:"flags.1?true"},{name:"option",type:"bytes"},{name:"voters",type:"int"}],type:"PollAnswerVoters"},{id:-591909213,predicate:"pollResults",params:[{name:"flags",type:"#"},{name:"min",type:"flags.0?true"},{name:"results",type:"flags.1?Vector<PollAnswerVoters>"},{name:"total_voters",type:"flags.2?int"},{name:"recent_voters",type:"flags.3?Vector<long>"},{name:"solution",type:"flags.4?string"},{name:"solution_entities",type:"flags.4?Vector<MessageEntity>"}],type:"PollResults"},{id:261416433,predicate:"inputMediaPoll",params:[{name:"flags",type:"#"},{name:"poll",type:"Poll"},{name:"correct_answers",type:"flags.0?Vector<bytes>"},{name:"solution",type:"flags.1?string"},{name:"solution_entities",type:"flags.1?Vector<MessageEntity>"}],type:"InputMedia"},{id:1272375192,predicate:"messageMediaPoll",params:[{name:"poll",type:"Poll"},{name:"results",type:"PollResults"}],type:"MessageMedia"},{id:-264117680,predicate:"chatOnlines",params:[{name:"onlines",type:"int"}],type:"ChatOnlines"},{id:1202287072,predicate:"statsURL",params:[{name:"url",type:"string"}],type:"StatsURL"},{id:-525288402,predicate:"photoStrippedSize",params:[{name:"type",type:"string"},{name:"bytes",type:"bytes"}],type:"PhotoSize"},{id:1605510357,predicate:"chatAdminRights",params:[{name:"flags",type:"#"},{name:"change_info",type:"flags.0?true"},{name:"post_messages",type:"flags.1?true"},{name:"edit_messages",type:"flags.2?true"},{name:"delete_messages",type:"flags.3?true"},{name:"ban_users",type:"flags.4?true"},{name:"invite_users",type:"flags.5?true"},{name:"pin_messages",type:"flags.7?true"},{name:"add_admins",type:"flags.9?true"},{name:"anonymous",type:"flags.10?true"},{name:"manage_call",type:"flags.11?true"},{name:"other",type:"flags.12?true"},{name:"manage_topics",type:"flags.13?true"}],type:"ChatAdminRights"},{id:-1626209256,predicate:"chatBannedRights",params:[{name:"flags",type:"#"},{name:"view_messages",type:"flags.0?true"},{name:"send_messages",type:"flags.1?true"},{name:"send_media",type:"flags.2?true"},{name:"send_stickers",type:"flags.3?true"},{name:"send_gifs",type:"flags.4?true"},{name:"send_games",type:"flags.5?true"},{name:"send_inline",type:"flags.6?true"},{name:"embed_links",type:"flags.7?true"},{name:"send_polls",type:"flags.8?true"},{name:"change_info",type:"flags.10?true"},{name:"invite_users",type:"flags.15?true"},{name:"pin_messages",type:"flags.17?true"},{name:"manage_topics",type:"flags.18?true"},{name:"send_photos",type:"flags.19?true"},{name:"send_videos",type:"flags.20?true"},{name:"send_roundvideos",type:"flags.21?true"},{name:"send_audios",type:"flags.22?true"},{name:"send_voices",type:"flags.23?true"},{name:"send_docs",type:"flags.24?true"},{name:"send_plain",type:"flags.25?true"},{name:"until_date",type:"int"}],type:"ChatBannedRights"},{id:1421875280,predicate:"updateChatDefaultBannedRights",params:[{name:"peer",type:"Peer"},{name:"default_banned_rights",type:"ChatBannedRights"},{name:"version",type:"int"}],type:"Update"},{id:-433014407,predicate:"inputWallPaper",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputWallPaper"},{id:1913199744,predicate:"inputWallPaperSlug",params:[{name:"slug",type:"string"}],type:"InputWallPaper"},{id:-1150621555,predicate:"channelParticipantsContacts",params:[{name:"q",type:"string"}],type:"ChannelParticipantsFilter"},{id:771095562,predicate:"channelAdminLogEventActionDefaultBannedRights",params:[{name:"prev_banned_rights",type:"ChatBannedRights"},{name:"new_banned_rights",type:"ChatBannedRights"}],type:"ChannelAdminLogEventAction"},{id:-1895328189,predicate:"channelAdminLogEventActionStopPoll",params:[{name:"message",type:"Message"}],type:"ChannelAdminLogEventAction"},{id:471437699,predicate:"account.wallPapersNotModified",params:[],type:"account.WallPapers"},{id:-842824308,predicate:"account.wallPapers",params:[{name:"hash",type:"long"},{name:"wallpapers",type:"Vector<WallPaper>"}],type:"account.WallPapers"},{id:-1390068360,predicate:"codeSettings",params:[{name:"flags",type:"#"},{name:"allow_flashcall",type:"flags.0?true"},{name:"current_number",type:"flags.1?true"},{name:"allow_app_hash",type:"flags.4?true"},{name:"allow_missed_call",type:"flags.5?true"},{name:"allow_firebase",type:"flags.7?true"},{name:"logout_tokens",type:"flags.6?Vector<bytes>"},{name:"token",type:"flags.8?string"},{name:"app_sandbox",type:"flags.8?Bool"}],type:"CodeSettings"},{id:499236004,predicate:"wallPaperSettings",params:[{name:"flags",type:"#"},{name:"blur",type:"flags.1?true"},{name:"motion",type:"flags.2?true"},{name:"background_color",type:"flags.0?int"},{name:"second_background_color",type:"flags.4?int"},{name:"third_background_color",type:"flags.5?int"},{name:"fourth_background_color",type:"flags.6?int"},{name:"intensity",type:"flags.3?int"},{name:"rotation",type:"flags.4?int"}],type:"WallPaperSettings"},{id:-1896171181,predicate:"autoDownloadSettings",params:[{name:"flags",type:"#"},{name:"disabled",type:"flags.0?true"},{name:"video_preload_large",type:"flags.1?true"},{name:"audio_preload_next",type:"flags.2?true"},{name:"phonecalls_less_data",type:"flags.3?true"},{name:"photo_size_max",type:"int"},{name:"video_size_max",type:"long"},{name:"file_size_max",type:"long"},{name:"video_upload_maxbitrate",type:"int"}],type:"AutoDownloadSettings"},{id:1674235686,predicate:"account.autoDownloadSettings",params:[{name:"low",type:"AutoDownloadSettings"},{name:"medium",type:"AutoDownloadSettings"},{name:"high",type:"AutoDownloadSettings"}],type:"account.AutoDownloadSettings"},{id:-709641735,predicate:"emojiKeyword",params:[{name:"keyword",type:"string"},{name:"emoticons",type:"Vector<string>"}],type:"EmojiKeyword"},{id:594408994,predicate:"emojiKeywordDeleted",params:[{name:"keyword",type:"string"},{name:"emoticons",type:"Vector<string>"}],type:"EmojiKeyword"},{id:1556570557,predicate:"emojiKeywordsDifference",params:[{name:"lang_code",type:"string"},{name:"from_version",type:"int"},{name:"version",type:"int"},{name:"keywords",type:"Vector<EmojiKeyword>"}],type:"EmojiKeywordsDifference"},{id:-1519029347,predicate:"emojiURL",params:[{name:"url",type:"string"}],type:"EmojiURL"},{id:-1275374751,predicate:"emojiLanguage",params:[{name:"lang_code",type:"string"}],type:"EmojiLanguage"},{id:-1529000952,predicate:"inputPrivacyKeyForwards",params:[],type:"InputPrivacyKey"},{id:1777096355,predicate:"privacyKeyForwards",params:[],type:"PrivacyKey"},{id:1461304012,predicate:"inputPrivacyKeyProfilePhoto",params:[],type:"InputPrivacyKey"},{id:-1777000467,predicate:"privacyKeyProfilePhoto",params:[],type:"PrivacyKey"},{id:1075322878,predicate:"inputPhotoFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"},{name:"thumb_size",type:"string"}],type:"InputFileLocation"},{id:-667654413,predicate:"inputPhotoLegacyFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"file_reference",type:"bytes"},{name:"volume_id",type:"long"},{name:"local_id",type:"int"},{name:"secret",type:"long"}],type:"InputFileLocation"},{id:925204121,predicate:"inputPeerPhotoFileLocation",params:[{name:"flags",type:"#"},{name:"big",type:"flags.0?true"},{name:"peer",type:"InputPeer"},{name:"photo_id",type:"long"}],type:"InputFileLocation"},{id:-1652231205,predicate:"inputStickerSetThumb",params:[{name:"stickerset",type:"InputStickerSet"},{name:"thumb_version",type:"int"}],type:"InputFileLocation"},{id:-11252123,predicate:"folder",params:[{name:"flags",type:"#"},{name:"autofill_new_broadcasts",type:"flags.0?true"},{name:"autofill_public_groups",type:"flags.1?true"},{name:"autofill_new_correspondents",type:"flags.2?true"},{name:"id",type:"int"},{name:"title",type:"string"},{name:"photo",type:"flags.3?ChatPhoto"}],type:"Folder"},{id:1908216652,predicate:"dialogFolder",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.2?true"},{name:"folder",type:"Folder"},{name:"peer",type:"Peer"},{name:"top_message",type:"int"},{name:"unread_muted_peers_count",type:"int"},{name:"unread_unmuted_peers_count",type:"int"},{name:"unread_muted_messages_count",type:"int"},{name:"unread_unmuted_messages_count",type:"int"}],type:"Dialog"},{id:1684014375,predicate:"inputDialogPeerFolder",params:[{name:"folder_id",type:"int"}],type:"InputDialogPeer"},{id:1363483106,predicate:"dialogPeerFolder",params:[{name:"folder_id",type:"int"}],type:"DialogPeer"},{id:-70073706,predicate:"inputFolderPeer",params:[{name:"peer",type:"InputPeer"},{name:"folder_id",type:"int"}],type:"InputFolderPeer"},{id:-373643672,predicate:"folderPeer",params:[{name:"peer",type:"Peer"},{name:"folder_id",type:"int"}],type:"FolderPeer"},{id:422972864,predicate:"updateFolderPeers",params:[{name:"folder_peers",type:"Vector<FolderPeer>"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:497305826,predicate:"inputUserFromMessage",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"user_id",type:"long"}],type:"InputUser"},{id:1536380829,predicate:"inputChannelFromMessage",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"channel_id",type:"long"}],type:"InputChannel"},{id:-1468331492,predicate:"inputPeerUserFromMessage",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"user_id",type:"long"}],type:"InputPeer"},{id:-1121318848,predicate:"inputPeerChannelFromMessage",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"channel_id",type:"long"}],type:"InputPeer"},{id:55761658,predicate:"inputPrivacyKeyPhoneNumber",params:[],type:"InputPrivacyKey"},{id:-778378131,predicate:"privacyKeyPhoneNumber",params:[],type:"PrivacyKey"},{id:-1472172887,predicate:"topPeerCategoryForwardUsers",params:[],type:"TopPeerCategory"},{id:-68239120,predicate:"topPeerCategoryForwardChats",params:[],type:"TopPeerCategory"},{id:84703944,predicate:"channelAdminLogEventActionChangeLinkedChat",params:[{name:"prev_value",type:"long"},{name:"new_value",type:"long"}],type:"ChannelAdminLogEventAction"},{id:-398136321,predicate:"messages.searchCounter",params:[{name:"flags",type:"#"},{name:"inexact",type:"flags.1?true"},{name:"filter",type:"MessagesFilter"},{name:"count",type:"int"}],type:"messages.SearchCounter"},{id:280464681,predicate:"keyboardButtonUrlAuth",params:[{name:"flags",type:"#"},{name:"text",type:"string"},{name:"fwd_text",type:"flags.0?string"},{name:"url",type:"string"},{name:"button_id",type:"int"}],type:"KeyboardButton"},{id:-802258988,predicate:"inputKeyboardButtonUrlAuth",params:[{name:"flags",type:"#"},{name:"request_write_access",type:"flags.0?true"},{name:"text",type:"string"},{name:"fwd_text",type:"flags.1?string"},{name:"url",type:"string"},{name:"bot",type:"InputUser"}],type:"KeyboardButton"},{id:-1831650802,predicate:"urlAuthResultRequest",params:[{name:"flags",type:"#"},{name:"request_write_access",type:"flags.0?true"},{name:"bot",type:"User"},{name:"domain",type:"string"}],type:"UrlAuthResult"},{id:-1886646706,predicate:"urlAuthResultAccepted",params:[{name:"url",type:"string"}],type:"UrlAuthResult"},{id:-1445536993,predicate:"urlAuthResultDefault",params:[],type:"UrlAuthResult"},{id:-2079962673,predicate:"inputPrivacyValueAllowChatParticipants",params:[{name:"chats",type:"Vector<long>"}],type:"InputPrivacyRule"},{id:-380694650,predicate:"inputPrivacyValueDisallowChatParticipants",params:[{name:"chats",type:"Vector<long>"}],type:"InputPrivacyRule"},{id:1796427406,predicate:"privacyValueAllowChatParticipants",params:[{name:"chats",type:"Vector<long>"}],type:"PrivacyRule"},{id:1103656293,predicate:"privacyValueDisallowChatParticipants",params:[{name:"chats",type:"Vector<long>"}],type:"PrivacyRule"},{id:-1672577397,predicate:"messageEntityUnderline",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-1090087980,predicate:"messageEntityStrike",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:34469328,predicate:"messageEntityBlockquote",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:1786671974,predicate:"updatePeerSettings",params:[{name:"peer",type:"Peer"},{name:"settings",type:"PeerSettings"}],type:"Update"},{id:-1078612597,predicate:"channelLocationEmpty",params:[],type:"ChannelLocation"},{id:547062491,predicate:"channelLocation",params:[{name:"geo_point",type:"GeoPoint"},{name:"address",type:"string"}],type:"ChannelLocation"},{id:-901375139,predicate:"peerLocated",params:[{name:"peer",type:"Peer"},{name:"expires",type:"int"},{name:"distance",type:"int"}],type:"PeerLocated"},{id:-1263546448,predicate:"updatePeerLocated",params:[{name:"peers",type:"Vector<PeerLocated>"}],type:"Update"},{id:241923758,predicate:"channelAdminLogEventActionChangeLocation",params:[{name:"prev_value",type:"ChannelLocation"},{name:"new_value",type:"ChannelLocation"}],type:"ChannelAdminLogEventAction"},{id:-606798099,predicate:"inputReportReasonGeoIrrelevant",params:[],type:"ReportReason"},{id:1401984889,predicate:"channelAdminLogEventActionToggleSlowMode",params:[{name:"prev_value",type:"int"},{name:"new_value",type:"int"}],type:"ChannelAdminLogEventAction"},{id:1148485274,predicate:"auth.authorizationSignUpRequired",params:[{name:"flags",type:"#"},{name:"terms_of_service",type:"flags.0?help.TermsOfService"}],type:"auth.Authorization"},{id:-666824391,predicate:"payments.paymentVerificationNeeded",params:[{name:"url",type:"string"}],type:"payments.PaymentResult"},{id:42402760,predicate:"inputStickerSetAnimatedEmoji",params:[],type:"InputStickerSet"},{id:967122427,predicate:"updateNewScheduledMessage",params:[{name:"message",type:"Message"}],type:"Update"},{id:-1870238482,predicate:"updateDeleteScheduledMessages",params:[{name:"peer",type:"Peer"},{name:"messages",type:"Vector<int>"}],type:"Update"},{id:-797791052,predicate:"restrictionReason",params:[{name:"platform",type:"string"},{name:"reason",type:"string"},{name:"text",type:"string"}],type:"RestrictionReason"},{id:1012306921,predicate:"inputTheme",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputTheme"},{id:-175567375,predicate:"inputThemeSlug",params:[{name:"slug",type:"string"}],type:"InputTheme"},{id:-1609668650,predicate:"theme",params:[{name:"flags",type:"#"},{name:"creator",type:"flags.0?true"},{name:"default",type:"flags.1?true"},{name:"for_chat",type:"flags.5?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"slug",type:"string"},{name:"title",type:"string"},{name:"document",type:"flags.2?Document"},{name:"settings",type:"flags.3?Vector<ThemeSettings>"},{name:"emoticon",type:"flags.6?string"},{name:"installs_count",type:"flags.4?int"}],type:"Theme"},{id:-199313886,predicate:"account.themesNotModified",params:[],type:"account.Themes"},{id:-1707242387,predicate:"account.themes",params:[{name:"hash",type:"long"},{name:"themes",type:"Vector<Theme>"}],type:"account.Themes"},{id:-2112423005,predicate:"updateTheme",params:[{name:"theme",type:"Theme"}],type:"Update"},{id:-786326563,predicate:"inputPrivacyKeyAddedByPhone",params:[],type:"InputPrivacyKey"},{id:1124062251,predicate:"privacyKeyAddedByPhone",params:[],type:"PrivacyKey"},{id:-2027964103,predicate:"updateGeoLiveViewed",params:[{name:"peer",type:"Peer"},{name:"msg_id",type:"int"}],type:"Update"},{id:1448076945,predicate:"updateLoginToken",params:[],type:"Update"},{id:1654593920,predicate:"auth.loginToken",params:[{name:"expires",type:"int"},{name:"token",type:"bytes"}],type:"auth.LoginToken"},{id:110008598,predicate:"auth.loginTokenMigrateTo",params:[{name:"dc_id",type:"int"},{name:"token",type:"bytes"}],type:"auth.LoginToken"},{id:957176926,predicate:"auth.loginTokenSuccess",params:[{name:"authorization",type:"auth.Authorization"}],type:"auth.LoginToken"},{id:1474462241,predicate:"account.contentSettings",params:[{name:"flags",type:"#"},{name:"sensitive_enabled",type:"flags.0?true"},{name:"sensitive_can_change",type:"flags.1?true"}],type:"account.ContentSettings"},{id:-1456996667,predicate:"messages.inactiveChats",params:[{name:"dates",type:"Vector<int>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.InactiveChats"},{id:-1012849566,predicate:"baseThemeClassic",params:[],type:"BaseTheme"},{id:-69724536,predicate:"baseThemeDay",params:[],type:"BaseTheme"},{id:-1212997976,predicate:"baseThemeNight",params:[],type:"BaseTheme"},{id:1834973166,predicate:"baseThemeTinted",params:[],type:"BaseTheme"},{id:1527845466,predicate:"baseThemeArctic",params:[],type:"BaseTheme"},{id:-1770371538,predicate:"inputWallPaperNoFile",params:[{name:"id",type:"long"}],type:"InputWallPaper"},{id:-528465642,predicate:"wallPaperNoFile",params:[{name:"id",type:"long"},{name:"flags",type:"#"},{name:"default",type:"flags.1?true"},{name:"dark",type:"flags.4?true"},{name:"settings",type:"flags.2?WallPaperSettings"}],type:"WallPaper"},{id:-1881255857,predicate:"inputThemeSettings",params:[{name:"flags",type:"#"},{name:"message_colors_animated",type:"flags.2?true"},{name:"base_theme",type:"BaseTheme"},{name:"accent_color",type:"int"},{name:"outbox_accent_color",type:"flags.3?int"},{name:"message_colors",type:"flags.0?Vector<int>"},{name:"wallpaper",type:"flags.1?InputWallPaper"},{name:"wallpaper_settings",type:"flags.1?WallPaperSettings"}],type:"InputThemeSettings"},{id:-94849324,predicate:"themeSettings",params:[{name:"flags",type:"#"},{name:"message_colors_animated",type:"flags.2?true"},{name:"base_theme",type:"BaseTheme"},{name:"accent_color",type:"int"},{name:"outbox_accent_color",type:"flags.3?int"},{name:"message_colors",type:"flags.0?Vector<int>"},{name:"wallpaper",type:"flags.1?WallPaper"}],type:"ThemeSettings"},{id:1421174295,predicate:"webPageAttributeTheme",params:[{name:"flags",type:"#"},{name:"documents",type:"flags.0?Vector<Document>"},{name:"settings",type:"flags.1?ThemeSettings"}],type:"WebPageAttribute"},{id:274961865,predicate:"updateMessagePollVote",params:[{name:"poll_id",type:"long"},{name:"user_id",type:"long"},{name:"options",type:"Vector<bytes>"},{name:"qts",type:"int"}],type:"Update"},{id:886196148,predicate:"messageUserVote",params:[{name:"user_id",type:"long"},{name:"option",type:"bytes"},{name:"date",type:"int"}],type:"MessageUserVote"},{id:1017491692,predicate:"messageUserVoteInputOption",params:[{name:"user_id",type:"long"},{name:"date",type:"int"}],type:"MessageUserVote"},{id:-1973033641,predicate:"messageUserVoteMultiple",params:[{name:"user_id",type:"long"},{name:"options",type:"Vector<bytes>"},{name:"date",type:"int"}],type:"MessageUserVote"},{id:136574537,predicate:"messages.votesList",params:[{name:"flags",type:"#"},{name:"count",type:"int"},{name:"votes",type:"Vector<MessageUserVote>"},{name:"users",type:"Vector<User>"},{name:"next_offset",type:"flags.0?string"}],type:"messages.VotesList"},{id:-1144565411,predicate:"keyboardButtonRequestPoll",params:[{name:"flags",type:"#"},{name:"quiz",type:"flags.0?Bool"},{name:"text",type:"string"}],type:"KeyboardButton"},{id:1981704948,predicate:"messageEntityBankCard",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-177732982,predicate:"bankCardOpenUrl",params:[{name:"url",type:"string"},{name:"name",type:"string"}],type:"BankCardOpenUrl"},{id:1042605427,predicate:"payments.bankCardData",params:[{name:"title",type:"string"},{name:"open_urls",type:"Vector<BankCardOpenUrl>"}],type:"payments.BankCardData"},{id:-118740917,predicate:"peerSelfLocated",params:[{name:"expires",type:"int"}],type:"PeerLocated"},{id:1949890536,predicate:"dialogFilter",params:[{name:"flags",type:"#"},{name:"contacts",type:"flags.0?true"},{name:"non_contacts",type:"flags.1?true"},{name:"groups",type:"flags.2?true"},{name:"broadcasts",type:"flags.3?true"},{name:"bots",type:"flags.4?true"},{name:"exclude_muted",type:"flags.11?true"},{name:"exclude_read",type:"flags.12?true"},{name:"exclude_archived",type:"flags.13?true"},{name:"id",type:"int"},{name:"title",type:"string"},{name:"emoticon",type:"flags.25?string"},{name:"pinned_peers",type:"Vector<InputPeer>"},{name:"include_peers",type:"Vector<InputPeer>"},{name:"exclude_peers",type:"Vector<InputPeer>"}],type:"DialogFilter"},{id:2004110666,predicate:"dialogFilterSuggested",params:[{name:"filter",type:"DialogFilter"},{name:"description",type:"string"}],type:"DialogFilterSuggested"},{id:654302845,predicate:"updateDialogFilter",params:[{name:"flags",type:"#"},{name:"id",type:"int"},{name:"filter",type:"flags.0?DialogFilter"}],type:"Update"},{id:-1512627963,predicate:"updateDialogFilterOrder",params:[{name:"order",type:"Vector<int>"}],type:"Update"},{id:889491791,predicate:"updateDialogFilters",params:[],type:"Update"},{id:-1237848657,predicate:"statsDateRangeDays",params:[{name:"min_date",type:"int"},{name:"max_date",type:"int"}],type:"StatsDateRangeDays"},{id:-884757282,predicate:"statsAbsValueAndPrev",params:[{name:"current",type:"double"},{name:"previous",type:"double"}],type:"StatsAbsValueAndPrev"},{id:-875679776,predicate:"statsPercentValue",params:[{name:"part",type:"double"},{name:"total",type:"double"}],type:"StatsPercentValue"},{id:1244130093,predicate:"statsGraphAsync",params:[{name:"token",type:"string"}],type:"StatsGraph"},{id:-1092839390,predicate:"statsGraphError",params:[{name:"error",type:"string"}],type:"StatsGraph"},{id:-1901828938,predicate:"statsGraph",params:[{name:"flags",type:"#"},{name:"json",type:"DataJSON"},{name:"zoom_token",type:"flags.0?string"}],type:"StatsGraph"},{id:-1387279939,predicate:"messageInteractionCounters",params:[{name:"msg_id",type:"int"},{name:"views",type:"int"},{name:"forwards",type:"int"}],type:"MessageInteractionCounters"},{id:-1107852396,predicate:"stats.broadcastStats",params:[{name:"period",type:"StatsDateRangeDays"},{name:"followers",type:"StatsAbsValueAndPrev"},{name:"views_per_post",type:"StatsAbsValueAndPrev"},{name:"shares_per_post",type:"StatsAbsValueAndPrev"},{name:"enabled_notifications",type:"StatsPercentValue"},{name:"growth_graph",type:"StatsGraph"},{name:"followers_graph",type:"StatsGraph"},{name:"mute_graph",type:"StatsGraph"},{name:"top_hours_graph",type:"StatsGraph"},{name:"interactions_graph",type:"StatsGraph"},{name:"iv_interactions_graph",type:"StatsGraph"},{name:"views_by_source_graph",type:"StatsGraph"},{name:"new_followers_by_source_graph",type:"StatsGraph"},{name:"languages_graph",type:"StatsGraph"},{name:"recent_message_interactions",type:"Vector<MessageInteractionCounters>"}],type:"stats.BroadcastStats"},{id:-428884101,predicate:"inputMediaDice",params:[{name:"emoticon",type:"string"}],type:"InputMedia"},{id:1065280907,predicate:"messageMediaDice",params:[{name:"value",type:"int"},{name:"emoticon",type:"string"}],type:"MessageMedia"},{id:-427863538,predicate:"inputStickerSetDice",params:[{name:"emoticon",type:"string"}],type:"InputStickerSet"},{id:-1728664459,predicate:"help.promoDataEmpty",params:[{name:"expires",type:"int"}],type:"help.PromoData"},{id:-1942390465,predicate:"help.promoData",params:[{name:"flags",type:"#"},{name:"proxy",type:"flags.0?true"},{name:"expires",type:"int"},{name:"peer",type:"Peer"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"psa_type",type:"flags.1?string"},{name:"psa_message",type:"flags.2?string"}],type:"help.PromoData"},{id:-567037804,predicate:"videoSize",params:[{name:"flags",type:"#"},{name:"type",type:"string"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"size",type:"int"},{name:"video_start_ts",type:"flags.0?double"}],type:"VideoSize"},{id:643940105,predicate:"updatePhoneCallSignalingData",params:[{name:"phone_call_id",type:"long"},{name:"data",type:"bytes"}],type:"Update"},{id:1634294960,predicate:"chatInvitePeek",params:[{name:"chat",type:"Chat"},{name:"expires",type:"int"}],type:"ChatInvite"},{id:-1660637285,predicate:"statsGroupTopPoster",params:[{name:"user_id",type:"long"},{name:"messages",type:"int"},{name:"avg_chars",type:"int"}],type:"StatsGroupTopPoster"},{id:-682079097,predicate:"statsGroupTopAdmin",params:[{name:"user_id",type:"long"},{name:"deleted",type:"int"},{name:"kicked",type:"int"},{name:"banned",type:"int"}],type:"StatsGroupTopAdmin"},{id:1398765469,predicate:"statsGroupTopInviter",params:[{name:"user_id",type:"long"},{name:"invitations",type:"int"}],type:"StatsGroupTopInviter"},{id:-276825834,predicate:"stats.megagroupStats",params:[{name:"period",type:"StatsDateRangeDays"},{name:"members",type:"StatsAbsValueAndPrev"},{name:"messages",type:"StatsAbsValueAndPrev"},{name:"viewers",type:"StatsAbsValueAndPrev"},{name:"posters",type:"StatsAbsValueAndPrev"},{name:"growth_graph",type:"StatsGraph"},{name:"members_graph",type:"StatsGraph"},{name:"new_members_by_source_graph",type:"StatsGraph"},{name:"languages_graph",type:"StatsGraph"},{name:"messages_graph",type:"StatsGraph"},{name:"actions_graph",type:"StatsGraph"},{name:"top_hours_graph",type:"StatsGraph"},{name:"weekdays_graph",type:"StatsGraph"},{name:"top_posters",type:"Vector<StatsGroupTopPoster>"},{name:"top_admins",type:"Vector<StatsGroupTopAdmin>"},{name:"top_inviters",type:"Vector<StatsGroupTopInviter>"},{name:"users",type:"Vector<User>"}],type:"stats.MegagroupStats"},{id:-1096616924,predicate:"globalPrivacySettings",params:[{name:"flags",type:"#"},{name:"archive_and_mute_new_noncontact_peers",type:"flags.0?Bool"}],type:"GlobalPrivacySettings"},{id:1667228533,predicate:"phoneConnectionWebrtc",params:[{name:"flags",type:"#"},{name:"turn",type:"flags.0?true"},{name:"stun",type:"flags.1?true"},{name:"id",type:"long"},{name:"ip",type:"string"},{name:"ipv6",type:"string"},{name:"port",type:"int"},{name:"username",type:"string"},{name:"password",type:"string"}],type:"PhoneConnection"},{id:1107543535,predicate:"help.countryCode",params:[{name:"flags",type:"#"},{name:"country_code",type:"string"},{name:"prefixes",type:"flags.0?Vector<string>"},{name:"patterns",type:"flags.1?Vector<string>"}],type:"help.CountryCode"},{id:-1014526429,predicate:"help.country",params:[{name:"flags",type:"#"},{name:"hidden",type:"flags.0?true"},{name:"iso2",type:"string"},{name:"default_name",type:"string"},{name:"name",type:"flags.1?string"},{name:"country_codes",type:"Vector<help.CountryCode>"}],type:"help.Country"},{id:-1815339214,predicate:"help.countriesListNotModified",params:[],type:"help.CountriesList"},{id:-2016381538,predicate:"help.countriesList",params:[{name:"countries",type:"Vector<help.Country>"},{name:"hash",type:"int"}],type:"help.CountriesList"},{id:1163625789,predicate:"messageViews",params:[{name:"flags",type:"#"},{name:"views",type:"flags.0?int"},{name:"forwards",type:"flags.1?int"},{name:"replies",type:"flags.2?MessageReplies"}],type:"MessageViews"},{id:-761649164,predicate:"updateChannelMessageForwards",params:[{name:"channel_id",type:"long"},{name:"id",type:"int"},{name:"forwards",type:"int"}],type:"Update"},{id:-96535659,predicate:"photoSizeProgressive",params:[{name:"type",type:"string"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"sizes",type:"Vector<int>"}],type:"PhotoSize"},{id:-1228606141,predicate:"messages.messageViews",params:[{name:"views",type:"Vector<MessageViews>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.MessageViews"},{id:-693004986,predicate:"updateReadChannelDiscussionInbox",params:[{name:"flags",type:"#"},{name:"channel_id",type:"long"},{name:"top_msg_id",type:"int"},{name:"read_max_id",type:"int"},{name:"broadcast_id",type:"flags.0?long"},{name:"broadcast_post",type:"flags.0?int"}],type:"Update"},{id:1767677564,predicate:"updateReadChannelDiscussionOutbox",params:[{name:"channel_id",type:"long"},{name:"top_msg_id",type:"int"},{name:"read_max_id",type:"int"}],type:"Update"},{id:-1506535550,predicate:"messages.discussionMessage",params:[{name:"flags",type:"#"},{name:"messages",type:"Vector<Message>"},{name:"max_id",type:"flags.0?int"},{name:"read_inbox_max_id",type:"flags.1?int"},{name:"read_outbox_max_id",type:"flags.2?int"},{name:"unread_count",type:"int"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.DiscussionMessage"},{id:-1495959709,predicate:"messageReplyHeader",params:[{name:"flags",type:"#"},{name:"reply_to_scheduled",type:"flags.2?true"},{name:"forum_topic",type:"flags.3?true"},{name:"reply_to_msg_id",type:"int"},{name:"reply_to_peer_id",type:"flags.0?Peer"},{name:"reply_to_top_id",type:"flags.1?int"}],type:"MessageReplyHeader"},{id:-2083123262,predicate:"messageReplies",params:[{name:"flags",type:"#"},{name:"comments",type:"flags.0?true"},{name:"replies",type:"int"},{name:"replies_pts",type:"int"},{name:"recent_repliers",type:"flags.1?Vector<Peer>"},{name:"channel_id",type:"flags.0?long"},{name:"max_id",type:"flags.2?int"},{name:"read_max_id",type:"flags.3?int"}],type:"MessageReplies"},{id:610945826,predicate:"updatePeerBlocked",params:[{name:"peer_id",type:"Peer"},{name:"blocked",type:"Bool"}],type:"Update"},{id:-386039788,predicate:"peerBlocked",params:[{name:"peer_id",type:"Peer"},{name:"date",type:"int"}],type:"PeerBlocked"},{id:-1937192669,predicate:"updateChannelUserTyping",params:[{name:"flags",type:"#"},{name:"channel_id",type:"long"},{name:"top_msg_id",type:"flags.0?int"},{name:"from_id",type:"Peer"},{name:"action",type:"SendMessageAction"}],type:"Update"},{id:-1392895362,predicate:"inputMessageCallbackQuery",params:[{name:"id",type:"int"},{name:"query_id",type:"long"}],type:"InputMessage"},{id:453242886,predicate:"channelParticipantLeft",params:[{name:"peer",type:"Peer"}],type:"ChannelParticipant"},{id:-531931925,predicate:"channelParticipantsMentions",params:[{name:"flags",type:"#"},{name:"q",type:"flags.0?string"},{name:"top_msg_id",type:"flags.1?int"}],type:"ChannelParticipantsFilter"},{id:-309990731,predicate:"updatePinnedMessages",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.0?true"},{name:"peer",type:"Peer"},{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:1538885128,predicate:"updatePinnedChannelMessages",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.0?true"},{name:"channel_id",type:"long"},{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"},{name:"pts_count",type:"int"}],type:"Update"},{id:464520273,predicate:"inputMessagesFilterPinned",params:[],type:"MessagesFilter"},{id:-1986399595,predicate:"stats.messageStats",params:[{name:"views_graph",type:"StatsGraph"}],type:"stats.MessageStats"},{id:-1730095465,predicate:"messageActionGeoProximityReached",params:[{name:"from_id",type:"Peer"},{name:"to_id",type:"Peer"},{name:"distance",type:"int"}],type:"MessageAction"},{id:-668906175,predicate:"photoPathSize",params:[{name:"type",type:"string"},{name:"bytes",type:"bytes"}],type:"PhotoSize"},{id:-651419003,predicate:"speakingInGroupCallAction",params:[],type:"SendMessageAction"},{id:2004925620,predicate:"groupCallDiscarded",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"duration",type:"int"}],type:"GroupCall"},{id:-711498484,predicate:"groupCall",params:[{name:"flags",type:"#"},{name:"join_muted",type:"flags.1?true"},{name:"can_change_join_muted",type:"flags.2?true"},{name:"join_date_asc",type:"flags.6?true"},{name:"schedule_start_subscribed",type:"flags.8?true"},{name:"can_start_video",type:"flags.9?true"},{name:"record_video_active",type:"flags.11?true"},{name:"rtmp_stream",type:"flags.12?true"},{name:"listeners_hidden",type:"flags.13?true"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"participants_count",type:"int"},{name:"title",type:"flags.3?string"},{name:"stream_dc_id",type:"flags.4?int"},{name:"record_start_date",type:"flags.5?int"},{name:"schedule_date",type:"flags.7?int"},{name:"unmuted_video_count",type:"flags.10?int"},{name:"unmuted_video_limit",type:"int"},{name:"version",type:"int"}],type:"GroupCall"},{id:-659913713,predicate:"inputGroupCall",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputGroupCall"},{id:2047704898,predicate:"messageActionGroupCall",params:[{name:"flags",type:"#"},{name:"call",type:"InputGroupCall"},{name:"duration",type:"flags.0?int"}],type:"MessageAction"},{id:1345295095,predicate:"messageActionInviteToGroupCall",params:[{name:"call",type:"InputGroupCall"},{name:"users",type:"Vector<long>"}],type:"MessageAction"},{id:-341428482,predicate:"groupCallParticipant",params:[{name:"flags",type:"#"},{name:"muted",type:"flags.0?true"},{name:"left",type:"flags.1?true"},{name:"can_self_unmute",type:"flags.2?true"},{name:"just_joined",type:"flags.4?true"},{name:"versioned",type:"flags.5?true"},{name:"min",type:"flags.8?true"},{name:"muted_by_you",type:"flags.9?true"},{name:"volume_by_admin",type:"flags.10?true"},{name:"self",type:"flags.12?true"},{name:"video_joined",type:"flags.15?true"},{name:"peer",type:"Peer"},{name:"date",type:"int"},{name:"active_date",type:"flags.3?int"},{name:"source",type:"int"},{name:"volume",type:"flags.7?int"},{name:"about",type:"flags.11?string"},{name:"raise_hand_rating",type:"flags.13?long"},{name:"video",type:"flags.6?GroupCallParticipantVideo"},{name:"presentation",type:"flags.14?GroupCallParticipantVideo"}],type:"GroupCallParticipant"},{id:-124097970,predicate:"updateChat",params:[{name:"chat_id",type:"long"}],type:"Update"},{id:-219423922,predicate:"updateGroupCallParticipants",params:[{name:"call",type:"InputGroupCall"},{name:"participants",type:"Vector<GroupCallParticipant>"},{name:"version",type:"int"}],type:"Update"},{id:347227392,predicate:"updateGroupCall",params:[{name:"chat_id",type:"long"},{name:"call",type:"GroupCall"}],type:"Update"},{id:-1636664659,predicate:"phone.groupCall",params:[{name:"call",type:"GroupCall"},{name:"participants",type:"Vector<GroupCallParticipant>"},{name:"participants_next_offset",type:"string"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"phone.GroupCall"},{id:-193506890,predicate:"phone.groupParticipants",params:[{name:"count",type:"int"},{name:"participants",type:"Vector<GroupCallParticipant>"},{name:"next_offset",type:"string"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"version",type:"int"}],type:"phone.GroupParticipants"},{id:813821341,predicate:"inlineQueryPeerTypeSameBotPM",params:[],type:"InlineQueryPeerType"},{id:-2093215828,predicate:"inlineQueryPeerTypePM",params:[],type:"InlineQueryPeerType"},{id:-681130742,predicate:"inlineQueryPeerTypeChat",params:[],type:"InlineQueryPeerType"},{id:1589952067,predicate:"inlineQueryPeerTypeMegagroup",params:[],type:"InlineQueryPeerType"},{id:1664413338,predicate:"inlineQueryPeerTypeBroadcast",params:[],type:"InlineQueryPeerType"},{id:589338437,predicate:"channelAdminLogEventActionStartGroupCall",params:[{name:"call",type:"InputGroupCall"}],type:"ChannelAdminLogEventAction"},{id:-610299584,predicate:"channelAdminLogEventActionDiscardGroupCall",params:[{name:"call",type:"InputGroupCall"}],type:"ChannelAdminLogEventAction"},{id:-115071790,predicate:"channelAdminLogEventActionParticipantMute",params:[{name:"participant",type:"GroupCallParticipant"}],type:"ChannelAdminLogEventAction"},{id:-431740480,predicate:"channelAdminLogEventActionParticipantUnmute",params:[{name:"participant",type:"GroupCallParticipant"}],type:"ChannelAdminLogEventAction"},{id:1456906823,predicate:"channelAdminLogEventActionToggleGroupCallSetting",params:[{name:"join_muted",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:-1966921727,predicate:"inputPaymentCredentialsGooglePay",params:[{name:"payment_token",type:"DataJSON"}],type:"InputPaymentCredentials"},{id:375566091,predicate:"messages.historyImport",params:[{name:"id",type:"long"}],type:"messages.HistoryImport"},{id:-606432698,predicate:"sendMessageHistoryImportAction",params:[{name:"progress",type:"int"}],type:"SendMessageAction"},{id:1578088377,predicate:"messages.historyImportParsed",params:[{name:"flags",type:"#"},{name:"pm",type:"flags.0?true"},{name:"group",type:"flags.1?true"},{name:"title",type:"flags.2?string"}],type:"messages.HistoryImportParsed"},{id:-170010905,predicate:"inputReportReasonFake",params:[],type:"ReportReason"},{id:-275956116,predicate:"messages.affectedFoundMessages",params:[{name:"pts",type:"int"},{name:"pts_count",type:"int"},{name:"offset",type:"int"},{name:"messages",type:"Vector<int>"}],type:"messages.AffectedFoundMessages"},{id:1007897979,predicate:"messageActionSetMessagesTTL",params:[{name:"flags",type:"#"},{name:"period",type:"int"},{name:"auto_setting_from",type:"flags.0?long"}],type:"MessageAction"},{id:-1147422299,predicate:"updatePeerHistoryTTL",params:[{name:"flags",type:"#"},{name:"peer",type:"Peer"},{name:"ttl_period",type:"flags.0?int"}],type:"Update"},{id:-796432838,predicate:"updateChatParticipant",params:[{name:"flags",type:"#"},{name:"chat_id",type:"long"},{name:"date",type:"int"},{name:"actor_id",type:"long"},{name:"user_id",type:"long"},{name:"prev_participant",type:"flags.0?ChatParticipant"},{name:"new_participant",type:"flags.1?ChatParticipant"},{name:"invite",type:"flags.2?ExportedChatInvite"},{name:"qts",type:"int"}],type:"Update"},{id:-1738720581,predicate:"updateChannelParticipant",params:[{name:"flags",type:"#"},{name:"channel_id",type:"long"},{name:"date",type:"int"},{name:"actor_id",type:"long"},{name:"user_id",type:"long"},{name:"prev_participant",type:"flags.0?ChannelParticipant"},{name:"new_participant",type:"flags.1?ChannelParticipant"},{name:"invite",type:"flags.2?ExportedChatInvite"},{name:"qts",type:"int"}],type:"Update"},{id:-997782967,predicate:"updateBotStopped",params:[{name:"user_id",type:"long"},{name:"date",type:"int"},{name:"stopped",type:"Bool"},{name:"qts",type:"int"}],type:"Update"},{id:-1940201511,predicate:"chatInviteImporter",params:[{name:"flags",type:"#"},{name:"requested",type:"flags.0?true"},{name:"user_id",type:"long"},{name:"date",type:"int"},{name:"about",type:"flags.2?string"},{name:"approved_by",type:"flags.1?long"}],type:"ChatInviteImporter"},{id:-1111085620,predicate:"messages.exportedChatInvites",params:[{name:"count",type:"int"},{name:"invites",type:"Vector<ExportedChatInvite>"},{name:"users",type:"Vector<User>"}],type:"messages.ExportedChatInvites"},{id:410107472,predicate:"messages.exportedChatInvite",params:[{name:"invite",type:"ExportedChatInvite"},{name:"users",type:"Vector<User>"}],type:"messages.ExportedChatInvite"},{id:572915951,predicate:"messages.exportedChatInviteReplaced",params:[{name:"invite",type:"ExportedChatInvite"},{name:"new_invite",type:"ExportedChatInvite"},{name:"users",type:"Vector<User>"}],type:"messages.ExportedChatInvite"},{id:-2118733814,predicate:"messages.chatInviteImporters",params:[{name:"count",type:"int"},{name:"importers",type:"Vector<ChatInviteImporter>"},{name:"users",type:"Vector<User>"}],type:"messages.ChatInviteImporters"},{id:-219353309,predicate:"chatAdminWithInvites",params:[{name:"admin_id",type:"long"},{name:"invites_count",type:"int"},{name:"revoked_invites_count",type:"int"}],type:"ChatAdminWithInvites"},{id:-1231326505,predicate:"messages.chatAdminsWithInvites",params:[{name:"admins",type:"Vector<ChatAdminWithInvites>"},{name:"users",type:"Vector<User>"}],type:"messages.ChatAdminsWithInvites"},{id:1557846647,predicate:"channelAdminLogEventActionParticipantJoinByInvite",params:[{name:"invite",type:"ExportedChatInvite"}],type:"ChannelAdminLogEventAction"},{id:1515256996,predicate:"channelAdminLogEventActionExportedInviteDelete",params:[{name:"invite",type:"ExportedChatInvite"}],type:"ChannelAdminLogEventAction"},{id:1091179342,predicate:"channelAdminLogEventActionExportedInviteRevoke",params:[{name:"invite",type:"ExportedChatInvite"}],type:"ChannelAdminLogEventAction"},{id:-384910503,predicate:"channelAdminLogEventActionExportedInviteEdit",params:[{name:"prev_invite",type:"ExportedChatInvite"},{name:"new_invite",type:"ExportedChatInvite"}],type:"ChannelAdminLogEventAction"},{id:1048537159,predicate:"channelAdminLogEventActionParticipantVolume",params:[{name:"participant",type:"GroupCallParticipant"}],type:"ChannelAdminLogEventAction"},{id:1855199800,predicate:"channelAdminLogEventActionChangeHistoryTTL",params:[{name:"prev_value",type:"int"},{name:"new_value",type:"int"}],type:"ChannelAdminLogEventAction"},{id:-1571952873,predicate:"messages.checkedHistoryImportPeer",params:[{name:"confirm_text",type:"string"}],type:"messages.CheckedHistoryImportPeer"},{id:93890858,predicate:"inputGroupCallStream",params:[{name:"flags",type:"#"},{name:"call",type:"InputGroupCall"},{name:"time_ms",type:"long"},{name:"scale",type:"int"},{name:"video_channel",type:"flags.0?int"},{name:"video_quality",type:"flags.0?int"}],type:"InputFileLocation"},{id:-1343921601,predicate:"phone.joinAsPeers",params:[{name:"peers",type:"Vector<Peer>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"phone.JoinAsPeers"},{id:541839704,predicate:"phone.exportedGroupCallInvite",params:[{name:"link",type:"string"}],type:"phone.ExportedGroupCallInvite"},{id:-672693723,predicate:"inputBotInlineMessageMediaInvoice",params:[{name:"flags",type:"#"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"flags.0?InputWebDocument"},{name:"invoice",type:"Invoice"},{name:"payload",type:"bytes"},{name:"provider",type:"string"},{name:"provider_data",type:"DataJSON"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"InputBotInlineMessage"},{id:894081801,predicate:"botInlineMessageMediaInvoice",params:[{name:"flags",type:"#"},{name:"shipping_address_requested",type:"flags.1?true"},{name:"test",type:"flags.3?true"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"flags.0?WebDocument"},{name:"currency",type:"string"},{name:"total_amount",type:"long"},{name:"reply_markup",type:"flags.2?ReplyMarkup"}],type:"BotInlineMessage"},{id:-1281329567,predicate:"messageActionGroupCallScheduled",params:[{name:"call",type:"InputGroupCall"},{name:"schedule_date",type:"int"}],type:"MessageAction"},{id:-592373577,predicate:"groupCallParticipantVideoSourceGroup",params:[{name:"semantics",type:"string"},{name:"sources",type:"Vector<int>"}],type:"GroupCallParticipantVideoSourceGroup"},{id:1735736008,predicate:"groupCallParticipantVideo",params:[{name:"flags",type:"#"},{name:"paused",type:"flags.0?true"},{name:"endpoint",type:"string"},{name:"source_groups",type:"Vector<GroupCallParticipantVideoSourceGroup>"},{name:"audio_source",type:"flags.1?int"}],type:"GroupCallParticipantVideo"},{id:192428418,predicate:"updateGroupCallConnection",params:[{name:"flags",type:"#"},{name:"presentation",type:"flags.0?true"},{name:"params",type:"DataJSON"}],type:"Update"},{id:-2046910401,predicate:"stickers.suggestedShortName",params:[{name:"short_name",type:"string"}],type:"stickers.SuggestedShortName"},{id:795652779,predicate:"botCommandScopeDefault",params:[],type:"BotCommandScope"},{id:1011811544,predicate:"botCommandScopeUsers",params:[],type:"BotCommandScope"},{id:1877059713,predicate:"botCommandScopeChats",params:[],type:"BotCommandScope"},{id:-1180016534,predicate:"botCommandScopeChatAdmins",params:[],type:"BotCommandScope"},{id:-610432643,predicate:"botCommandScopePeer",params:[{name:"peer",type:"InputPeer"}],type:"BotCommandScope"},{id:1071145937,predicate:"botCommandScopePeerAdmins",params:[{name:"peer",type:"InputPeer"}],type:"BotCommandScope"},{id:169026035,predicate:"botCommandScopePeerUser",params:[{name:"peer",type:"InputPeer"},{name:"user_id",type:"InputUser"}],type:"BotCommandScope"},{id:-478701471,predicate:"account.resetPasswordFailedWait",params:[{name:"retry_date",type:"int"}],type:"account.ResetPasswordResult"},{id:-370148227,predicate:"account.resetPasswordRequestedWait",params:[{name:"until_date",type:"int"}],type:"account.ResetPasswordResult"},{id:-383330754,predicate:"account.resetPasswordOk",params:[],type:"account.ResetPasswordResult"},{id:1299263278,predicate:"updateBotCommands",params:[{name:"peer",type:"Peer"},{name:"bot_id",type:"long"},{name:"commands",type:"Vector<BotCommand>"}],type:"Update"},{id:-1434950843,predicate:"messageActionSetChatTheme",params:[{name:"emoticon",type:"string"}],type:"MessageAction"},{id:-1336228175,predicate:"sendMessageChooseStickerAction",params:[],type:"SendMessageAction"},{id:-64636888,predicate:"sponsoredMessage",params:[{name:"flags",type:"#"},{name:"recommended",type:"flags.5?true"},{name:"show_peer_photo",type:"flags.6?true"},{name:"random_id",type:"bytes"},{name:"from_id",type:"flags.3?Peer"},{name:"chat_invite",type:"flags.4?ChatInvite"},{name:"chat_invite_hash",type:"flags.4?string"},{name:"channel_post",type:"flags.2?int"},{name:"start_param",type:"flags.0?string"},{name:"message",type:"string"},{name:"entities",type:"flags.1?Vector<MessageEntity>"},{name:"sponsor_info",type:"flags.7?string"},{name:"additional_info",type:"flags.8?string"}],type:"SponsoredMessage"},{id:-907141753,predicate:"messages.sponsoredMessages",params:[{name:"flags",type:"#"},{name:"posts_between",type:"flags.0?int"},{name:"messages",type:"Vector<SponsoredMessage>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.SponsoredMessages"},{id:215889721,predicate:"inputStickerSetAnimatedEmojiAnimations",params:[],type:"InputStickerSet"},{id:630664139,predicate:"sendMessageEmojiInteraction",params:[{name:"emoticon",type:"string"},{name:"msg_id",type:"int"},{name:"interaction",type:"DataJSON"}],type:"SendMessageAction"},{id:-1234857938,predicate:"sendMessageEmojiInteractionSeen",params:[{name:"emoticon",type:"string"}],type:"SendMessageAction"},{id:-1227287081,predicate:"inputBotInlineMessageID64",params:[{name:"dc_id",type:"int"},{name:"owner_id",type:"long"},{name:"id",type:"int"},{name:"access_hash",type:"long"}],type:"InputBotInlineMessageID"},{id:-911191137,predicate:"searchResultsCalendarPeriod",params:[{name:"date",type:"int"},{name:"min_msg_id",type:"int"},{name:"max_msg_id",type:"int"},{name:"count",type:"int"}],type:"SearchResultsCalendarPeriod"},{id:343859772,predicate:"messages.searchResultsCalendar",params:[{name:"flags",type:"#"},{name:"inexact",type:"flags.0?true"},{name:"count",type:"int"},{name:"min_date",type:"int"},{name:"min_msg_id",type:"int"},{name:"offset_id_offset",type:"flags.1?int"},{name:"periods",type:"Vector<SearchResultsCalendarPeriod>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.SearchResultsCalendar"},{id:2137295719,predicate:"searchResultPosition",params:[{name:"msg_id",type:"int"},{name:"date",type:"int"},{name:"offset",type:"int"}],type:"SearchResultsPosition"},{id:1404185519,predicate:"messages.searchResultsPositions",params:[{name:"count",type:"int"},{name:"positions",type:"Vector<SearchResultsPosition>"}],type:"messages.SearchResultsPositions"},{id:-339958837,predicate:"messageActionChatJoinedByRequest",params:[],type:"MessageAction"},{id:1885586395,predicate:"updatePendingJoinRequests",params:[{name:"peer",type:"Peer"},{name:"requests_pending",type:"int"},{name:"recent_requesters",type:"Vector<long>"}],type:"Update"},{id:299870598,predicate:"updateBotChatInviteRequester",params:[{name:"peer",type:"Peer"},{name:"date",type:"int"},{name:"user_id",type:"long"},{name:"about",type:"string"},{name:"invite",type:"ExportedChatInvite"},{name:"qts",type:"int"}],type:"Update"},{id:-1347021750,predicate:"channelAdminLogEventActionParticipantJoinByRequest",params:[{name:"invite",type:"ExportedChatInvite"},{name:"approved_by",type:"long"}],type:"ChannelAdminLogEventAction"},{id:-376962181,predicate:"inputKeyboardButtonUserProfile",params:[{name:"text",type:"string"},{name:"user_id",type:"InputUser"}],type:"KeyboardButton"},{id:814112961,predicate:"keyboardButtonUserProfile",params:[{name:"text",type:"string"},{name:"user_id",type:"long"}],type:"KeyboardButton"},{id:-191450938,predicate:"channels.sendAsPeers",params:[{name:"peers",type:"Vector<SendAsPeer>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"channels.SendAsPeers"},{id:-886388890,predicate:"channelAdminLogEventActionToggleNoForwards",params:[{name:"new_value",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:-738646805,predicate:"messages.stickerSetNotModified",params:[],type:"messages.StickerSet"},{id:997004590,predicate:"users.userFull",params:[{name:"full_user",type:"UserFull"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"users.UserFull"},{id:1753266509,predicate:"messages.peerSettings",params:[{name:"settings",type:"PeerSettings"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.PeerSettings"},{id:663693416,predicate:"channelAdminLogEventActionSendMessage",params:[{name:"message",type:"Message"}],type:"ChannelAdminLogEventAction"},{id:-702884114,predicate:"auth.codeTypeMissedCall",params:[],type:"auth.CodeType"},{id:-2113903484,predicate:"auth.sentCodeTypeMissedCall",params:[{name:"prefix",type:"string"},{name:"length",type:"int"}],type:"auth.SentCodeType"},{id:-1012759713,predicate:"auth.loggedOut",params:[{name:"flags",type:"#"},{name:"future_auth_token",type:"flags.0?bytes"}],type:"auth.LoggedOut"},{id:1578843320,predicate:"updateMessageReactions",params:[{name:"flags",type:"#"},{name:"peer",type:"Peer"},{name:"msg_id",type:"int"},{name:"top_msg_id",type:"flags.0?int"},{name:"reactions",type:"MessageReactions"}],type:"Update"},{id:-1546531968,predicate:"reactionCount",params:[{name:"flags",type:"#"},{name:"chosen_order",type:"flags.0?int"},{name:"reaction",type:"Reaction"},{name:"count",type:"int"}],type:"ReactionCount"},{id:1328256121,predicate:"messageReactions",params:[{name:"flags",type:"#"},{name:"min",type:"flags.0?true"},{name:"can_see_list",type:"flags.2?true"},{name:"results",type:"Vector<ReactionCount>"},{name:"recent_reactions",type:"flags.1?Vector<MessagePeerReaction>"}],type:"MessageReactions"},{id:834488621,predicate:"messages.messageReactionsList",params:[{name:"flags",type:"#"},{name:"count",type:"int"},{name:"reactions",type:"Vector<MessagePeerReaction>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"next_offset",type:"flags.0?string"}],type:"messages.MessageReactionsList"},{id:-1065882623,predicate:"availableReaction",params:[{name:"flags",type:"#"},{name:"inactive",type:"flags.0?true"},{name:"premium",type:"flags.2?true"},{name:"reaction",type:"string"},{name:"title",type:"string"},{name:"static_icon",type:"Document"},{name:"appear_animation",type:"Document"},{name:"select_animation",type:"Document"},{name:"activate_animation",type:"Document"},{name:"effect_animation",type:"Document"},{name:"around_animation",type:"flags.1?Document"},{name:"center_icon",type:"flags.1?Document"}],type:"AvailableReaction"},{id:-1626924713,predicate:"messages.availableReactionsNotModified",params:[],type:"messages.AvailableReactions"},{id:1989032621,predicate:"messages.availableReactions",params:[{name:"hash",type:"int"},{name:"reactions",type:"Vector<AvailableReaction>"}],type:"messages.AvailableReactions"},{id:852137487,predicate:"messageEntitySpoiler",params:[{name:"offset",type:"int"},{name:"length",type:"int"}],type:"MessageEntity"},{id:-1102180616,predicate:"channelAdminLogEventActionChangeAvailableReactions",params:[{name:"prev_value",type:"ChatReactions"},{name:"new_value",type:"ChatReactions"}],type:"ChannelAdminLogEventAction"},{id:-1938180548,predicate:"messagePeerReaction",params:[{name:"flags",type:"#"},{name:"big",type:"flags.0?true"},{name:"unread",type:"flags.1?true"},{name:"peer_id",type:"Peer"},{name:"date",type:"int"},{name:"reaction",type:"Reaction"}],type:"MessagePeerReaction"},{id:-2132064081,predicate:"groupCallStreamChannel",params:[{name:"channel",type:"int"},{name:"scale",type:"int"},{name:"last_timestamp_ms",type:"long"}],type:"GroupCallStreamChannel"},{id:-790330702,predicate:"phone.groupCallStreamChannels",params:[{name:"channels",type:"Vector<GroupCallStreamChannel>"}],type:"phone.GroupCallStreamChannels"},{id:177124030,predicate:"inputReportReasonIllegalDrugs",params:[],type:"ReportReason"},{id:-1631091139,predicate:"inputReportReasonPersonalDetails",params:[],type:"ReportReason"},{id:767505458,predicate:"phone.groupCallStreamRtmpUrl",params:[{name:"url",type:"string"},{name:"key",type:"string"}],type:"phone.GroupCallStreamRtmpUrl"},{id:1165423600,predicate:"attachMenuBotIconColor",params:[{name:"name",type:"string"},{name:"color",type:"int"}],type:"AttachMenuBotIconColor"},{id:-1297663893,predicate:"attachMenuBotIcon",params:[{name:"flags",type:"#"},{name:"name",type:"string"},{name:"icon",type:"Document"},{name:"colors",type:"flags.0?Vector<AttachMenuBotIconColor>"}],type:"AttachMenuBotIcon"},{id:-928371502,predicate:"attachMenuBot",params:[{name:"flags",type:"#"},{name:"inactive",type:"flags.0?true"},{name:"has_settings",type:"flags.1?true"},{name:"request_write_access",type:"flags.2?true"},{name:"bot_id",type:"long"},{name:"short_name",type:"string"},{name:"peer_types",type:"Vector<AttachMenuPeerType>"},{name:"icons",type:"Vector<AttachMenuBotIcon>"}],type:"AttachMenuBot"},{id:-237467044,predicate:"attachMenuBotsNotModified",params:[],type:"AttachMenuBots"},{id:1011024320,predicate:"attachMenuBots",params:[{name:"hash",type:"long"},{name:"bots",type:"Vector<AttachMenuBot>"},{name:"users",type:"Vector<User>"}],type:"AttachMenuBots"},{id:-1816172929,predicate:"attachMenuBotsBot",params:[{name:"bot",type:"AttachMenuBot"},{name:"users",type:"Vector<User>"}],type:"AttachMenuBotsBot"},{id:397910539,predicate:"updateAttachMenuBots",params:[],type:"Update"},{id:202659196,predicate:"webViewResultUrl",params:[{name:"query_id",type:"long"},{name:"url",type:"string"}],type:"WebViewResult"},{id:-2010155333,predicate:"simpleWebViewResultUrl",params:[{name:"url",type:"string"}],type:"SimpleWebViewResult"},{id:211046684,predicate:"webViewMessageSent",params:[{name:"flags",type:"#"},{name:"msg_id",type:"flags.0?InputBotInlineMessageID"}],type:"WebViewMessageSent"},{id:361936797,predicate:"updateWebViewResultSent",params:[{name:"query_id",type:"long"}],type:"Update"},{id:326529584,predicate:"keyboardButtonWebView",params:[{name:"text",type:"string"},{name:"url",type:"string"}],type:"KeyboardButton"},{id:-1598009252,predicate:"keyboardButtonSimpleWebView",params:[{name:"text",type:"string"},{name:"url",type:"string"}],type:"KeyboardButton"},{id:1205698681,predicate:"messageActionWebViewDataSentMe",params:[{name:"text",type:"string"},{name:"data",type:"string"}],type:"MessageAction"},{id:-1262252875,predicate:"messageActionWebViewDataSent",params:[{name:"text",type:"string"}],type:"MessageAction"},{id:347625491,predicate:"updateBotMenuButton",params:[{name:"bot_id",type:"long"},{name:"button",type:"BotMenuButton"}],type:"Update"},{id:1966318984,predicate:"botMenuButtonDefault",params:[],type:"BotMenuButton"},{id:1113113093,predicate:"botMenuButtonCommands",params:[],type:"BotMenuButton"},{id:-944407322,predicate:"botMenuButton",params:[{name:"text",type:"string"},{name:"url",type:"string"}],type:"BotMenuButton"},{id:-67704655,predicate:"account.savedRingtonesNotModified",params:[],type:"account.SavedRingtones"},{id:-1041683259,predicate:"account.savedRingtones",params:[{name:"hash",type:"long"},{name:"ringtones",type:"Vector<Document>"}],type:"account.SavedRingtones"},{id:1960361625,predicate:"updateSavedRingtones",params:[],type:"Update"},{id:-1746354498,predicate:"notificationSoundDefault",params:[],type:"NotificationSound"},{id:1863070943,predicate:"notificationSoundNone",params:[],type:"NotificationSound"},{id:-2096391452,predicate:"notificationSoundLocal",params:[{name:"title",type:"string"},{name:"data",type:"string"}],type:"NotificationSound"},{id:-9666487,predicate:"notificationSoundRingtone",params:[{name:"id",type:"long"}],type:"NotificationSound"},{id:-1222230163,predicate:"account.savedRingtone",params:[],type:"account.SavedRingtone"},{id:523271863,predicate:"account.savedRingtoneConverted",params:[{name:"document",type:"Document"}],type:"account.SavedRingtone"},{id:2104224014,predicate:"attachMenuPeerTypeSameBotPM",params:[],type:"AttachMenuPeerType"},{id:-1020528102,predicate:"attachMenuPeerTypeBotPM",params:[],type:"AttachMenuPeerType"},{id:-247016673,predicate:"attachMenuPeerTypePM",params:[],type:"AttachMenuPeerType"},{id:84480319,predicate:"attachMenuPeerTypeChat",params:[],type:"AttachMenuPeerType"},{id:2080104188,predicate:"attachMenuPeerTypeBroadcast",params:[],type:"AttachMenuPeerType"},{id:-317687113,predicate:"chatInvitePublicJoinRequests",params:[],type:"ExportedChatInvite"},{id:-977967015,predicate:"inputInvoiceMessage",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"}],type:"InputInvoice"},{id:-1020867857,predicate:"inputInvoiceSlug",params:[{name:"slug",type:"string"}],type:"InputInvoice"},{id:-1362048039,predicate:"payments.exportedInvoice",params:[{name:"url",type:"string"}],type:"payments.ExportedInvoice"},{id:8703322,predicate:"updateTranscribedAudio",params:[{name:"flags",type:"#"},{name:"pending",type:"flags.0?true"},{name:"peer",type:"Peer"},{name:"msg_id",type:"int"},{name:"transcription_id",type:"long"},{name:"text",type:"string"}],type:"Update"},{id:-1821037486,predicate:"messages.transcribedAudio",params:[{name:"flags",type:"#"},{name:"pending",type:"flags.0?true"},{name:"transcription_id",type:"long"},{name:"text",type:"string"}],type:"messages.TranscribedAudio"},{id:909284270,predicate:"dialogFilterDefault",params:[],type:"DialogFilter"},{id:1395946908,predicate:"help.premiumPromo",params:[{name:"status_text",type:"string"},{name:"status_entities",type:"Vector<MessageEntity>"},{name:"video_sections",type:"Vector<string>"},{name:"videos",type:"Vector<Document>"},{name:"period_options",type:"Vector<PremiumSubscriptionOption>"},{name:"users",type:"Vector<User>"}],type:"help.PremiumPromo"},{id:-925956616,predicate:"messageEntityCustomEmoji",params:[{name:"offset",type:"int"},{name:"length",type:"int"},{name:"document_id",type:"long"}],type:"MessageEntity"},{id:-48981863,predicate:"documentAttributeCustomEmoji",params:[{name:"flags",type:"#"},{name:"free",type:"flags.0?true"},{name:"text_color",type:"flags.1?true"},{name:"alt",type:"string"},{name:"stickerset",type:"InputStickerSet"}],type:"DocumentAttribute"},{id:1087454222,predicate:"stickerSetFullCovered",params:[{name:"set",type:"StickerSet"},{name:"packs",type:"Vector<StickerPack>"},{name:"keywords",type:"Vector<StickerKeyword>"},{name:"documents",type:"Vector<Document>"}],type:"StickerSetCovered"},{id:-1502273946,predicate:"inputStorePaymentPremiumSubscription",params:[{name:"flags",type:"#"},{name:"restore",type:"flags.0?true"},{name:"upgrade",type:"flags.1?true"}],type:"InputStorePaymentPurpose"},{id:1634697192,predicate:"inputStorePaymentGiftPremium",params:[{name:"user_id",type:"InputUser"},{name:"currency",type:"string"},{name:"amount",type:"long"}],type:"InputStorePaymentPurpose"},{id:-1415514682,predicate:"messageActionGiftPremium",params:[{name:"currency",type:"string"},{name:"amount",type:"long"},{name:"months",type:"int"}],type:"MessageAction"},{id:1958953753,predicate:"premiumGiftOption",params:[{name:"flags",type:"#"},{name:"months",type:"int"},{name:"currency",type:"string"},{name:"amount",type:"long"},{name:"bot_url",type:"string"},{name:"store_product",type:"flags.0?string"}],type:"PremiumGiftOption"},{id:-930399486,predicate:"inputStickerSetPremiumGifts",params:[],type:"InputStickerSet"},{id:-78886548,predicate:"updateReadFeaturedEmojiStickers",params:[],type:"Update"},{id:-1360618136,predicate:"inputPrivacyKeyVoiceMessages",params:[],type:"InputPrivacyKey"},{id:110621716,predicate:"privacyKeyVoiceMessages",params:[],type:"PrivacyKey"},{id:-1996951013,predicate:"paymentFormMethod",params:[{name:"url",type:"string"},{name:"title",type:"string"}],type:"PaymentFormMethod"},{id:-193992412,predicate:"inputWebFileAudioAlbumThumbLocation",params:[{name:"flags",type:"#"},{name:"small",type:"flags.2?true"},{name:"document",type:"flags.0?InputDocument"},{name:"title",type:"flags.1?string"},{name:"performer",type:"flags.1?string"}],type:"InputWebFileLocation"},{id:769727150,predicate:"emojiStatusEmpty",params:[],type:"EmojiStatus"},{id:-1835310691,predicate:"emojiStatus",params:[{name:"document_id",type:"long"}],type:"EmojiStatus"},{id:-97474361,predicate:"emojiStatusUntil",params:[{name:"document_id",type:"long"},{name:"until",type:"int"}],type:"EmojiStatus"},{id:674706841,predicate:"updateUserEmojiStatus",params:[{name:"user_id",type:"long"},{name:"emoji_status",type:"EmojiStatus"}],type:"Update"},{id:821314523,predicate:"updateRecentEmojiStatuses",params:[],type:"Update"},{id:-796072379,predicate:"account.emojiStatusesNotModified",params:[],type:"account.EmojiStatuses"},{id:-1866176559,predicate:"account.emojiStatuses",params:[{name:"hash",type:"long"},{name:"statuses",type:"Vector<EmojiStatus>"}],type:"account.EmojiStatuses"},{id:2046153753,predicate:"reactionEmpty",params:[],type:"Reaction"},{id:455247544,predicate:"reactionEmoji",params:[{name:"emoticon",type:"string"}],type:"Reaction"},{id:-1992950669,predicate:"reactionCustomEmoji",params:[{name:"document_id",type:"long"}],type:"Reaction"},{id:-352570692,predicate:"chatReactionsNone",params:[],type:"ChatReactions"},{id:1385335754,predicate:"chatReactionsAll",params:[{name:"flags",type:"#"},{name:"allow_custom",type:"flags.0?true"}],type:"ChatReactions"},{id:1713193015,predicate:"chatReactionsSome",params:[{name:"reactions",type:"Vector<Reaction>"}],type:"ChatReactions"},{id:-1334846497,predicate:"messages.reactionsNotModified",params:[],type:"messages.Reactions"},{id:-352454890,predicate:"messages.reactions",params:[{name:"hash",type:"long"},{name:"reactions",type:"Vector<Reaction>"}],type:"messages.Reactions"},{id:1870160884,predicate:"updateRecentReactions",params:[],type:"Update"},{id:-2030252155,predicate:"updateMoveStickerSetToTop",params:[{name:"flags",type:"#"},{name:"masks",type:"flags.0?true"},{name:"emojis",type:"flags.1?true"},{name:"stickerset",type:"long"}],type:"Update"},{id:1511364673,predicate:"auth.sentCodeTypeEmailCode",params:[{name:"flags",type:"#"},{name:"apple_signin_allowed",type:"flags.0?true"},{name:"google_signin_allowed",type:"flags.1?true"},{name:"email_pattern",type:"string"},{name:"length",type:"int"},{name:"next_phone_login_date",type:"flags.2?int"}],type:"auth.SentCodeType"},{id:-1521934870,predicate:"auth.sentCodeTypeSetUpEmailRequired",params:[{name:"flags",type:"#"},{name:"apple_signin_allowed",type:"flags.0?true"},{name:"google_signin_allowed",type:"flags.1?true"}],type:"auth.SentCodeType"},{id:1128644211,predicate:"emailVerifyPurposeLoginSetup",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"}],type:"EmailVerifyPurpose"},{id:1383932651,predicate:"emailVerifyPurposeLoginChange",params:[],type:"EmailVerifyPurpose"},{id:-1141565819,predicate:"emailVerifyPurposePassport",params:[],type:"EmailVerifyPurpose"},{id:-1842457175,predicate:"emailVerificationCode",params:[{name:"code",type:"string"}],type:"EmailVerification"},{id:-611279166,predicate:"emailVerificationGoogle",params:[{name:"token",type:"string"}],type:"EmailVerification"},{id:-1764723459,predicate:"emailVerificationApple",params:[{name:"token",type:"string"}],type:"EmailVerification"},{id:731303195,predicate:"account.emailVerified",params:[{name:"email",type:"string"}],type:"account.EmailVerified"},{id:-507835039,predicate:"account.emailVerifiedLogin",params:[{name:"email",type:"string"},{name:"sent_code",type:"auth.SentCode"}],type:"account.EmailVerified"},{id:1596792306,predicate:"premiumSubscriptionOption",params:[{name:"flags",type:"#"},{name:"current",type:"flags.1?true"},{name:"can_purchase_upgrade",type:"flags.2?true"},{name:"transaction",type:"flags.3?string"},{name:"months",type:"int"},{name:"currency",type:"string"},{name:"amount",type:"long"},{name:"bot_url",type:"string"},{name:"store_product",type:"flags.0?string"}],type:"PremiumSubscriptionOption"},{id:80008398,predicate:"inputStickerSetEmojiGenericAnimations",params:[],type:"InputStickerSet"},{id:701560302,predicate:"inputStickerSetEmojiDefaultStatuses",params:[],type:"InputStickerSet"},{id:-1206095820,predicate:"sendAsPeer",params:[{name:"flags",type:"#"},{name:"premium_required",type:"flags.0?true"},{name:"peer",type:"Peer"}],type:"SendAsPeer"},{id:-1386050360,predicate:"messageExtendedMediaPreview",params:[{name:"flags",type:"#"},{name:"w",type:"flags.0?int"},{name:"h",type:"flags.0?int"},{name:"thumb",type:"flags.1?PhotoSize"},{name:"video_duration",type:"flags.2?int"}],type:"MessageExtendedMedia"},{id:-297296796,predicate:"messageExtendedMedia",params:[{name:"media",type:"MessageMedia"}],type:"MessageExtendedMedia"},{id:1517529484,predicate:"updateMessageExtendedMedia",params:[{name:"peer",type:"Peer"},{name:"msg_id",type:"int"},{name:"extended_media",type:"MessageExtendedMedia"}],type:"Update"},{id:-50416996,predicate:"stickerKeyword",params:[{name:"document_id",type:"long"},{name:"keyword",type:"Vector<string>"}],type:"StickerKeyword"},{id:-1274595769,predicate:"username",params:[{name:"flags",type:"#"},{name:"editable",type:"flags.0?true"},{name:"active",type:"flags.1?true"},{name:"username",type:"string"}],type:"Username"},{id:-263212119,predicate:"channelAdminLogEventActionChangeUsernames",params:[{name:"prev_value",type:"Vector<string>"},{name:"new_value",type:"Vector<string>"}],type:"ChannelAdminLogEventAction"},{id:46949251,predicate:"channelAdminLogEventActionToggleForum",params:[{name:"new_value",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:1483767080,predicate:"channelAdminLogEventActionCreateTopic",params:[{name:"topic",type:"ForumTopic"}],type:"ChannelAdminLogEventAction"},{id:-261103096,predicate:"channelAdminLogEventActionEditTopic",params:[{name:"prev_topic",type:"ForumTopic"},{name:"new_topic",type:"ForumTopic"}],type:"ChannelAdminLogEventAction"},{id:-1374254839,predicate:"channelAdminLogEventActionDeleteTopic",params:[{name:"topic",type:"ForumTopic"}],type:"ChannelAdminLogEventAction"},{id:1569535291,predicate:"channelAdminLogEventActionPinTopic",params:[{name:"flags",type:"#"},{name:"prev_topic",type:"flags.0?ForumTopic"},{name:"new_topic",type:"flags.1?ForumTopic"}],type:"ChannelAdminLogEventAction"},{id:37687451,predicate:"forumTopicDeleted",params:[{name:"id",type:"int"}],type:"ForumTopic"},{id:1903173033,predicate:"forumTopic",params:[{name:"flags",type:"#"},{name:"my",type:"flags.1?true"},{name:"closed",type:"flags.2?true"},{name:"pinned",type:"flags.3?true"},{name:"short",type:"flags.5?true"},{name:"hidden",type:"flags.6?true"},{name:"id",type:"int"},{name:"date",type:"int"},{name:"title",type:"string"},{name:"icon_color",type:"int"},{name:"icon_emoji_id",type:"flags.0?long"},{name:"top_message",type:"int"},{name:"read_inbox_max_id",type:"int"},{name:"read_outbox_max_id",type:"int"},{name:"unread_count",type:"int"},{name:"unread_mentions_count",type:"int"},{name:"unread_reactions_count",type:"int"},{name:"from_id",type:"Peer"},{name:"notify_settings",type:"PeerNotifySettings"},{name:"draft",type:"flags.4?DraftMessage"}],type:"ForumTopic"},{id:913709011,predicate:"messages.forumTopics",params:[{name:"flags",type:"#"},{name:"order_by_create_date",type:"flags.0?true"},{name:"count",type:"int"},{name:"topics",type:"Vector<ForumTopic>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"pts",type:"int"}],type:"messages.ForumTopics"},{id:228168278,predicate:"messageActionTopicCreate",params:[{name:"flags",type:"#"},{name:"title",type:"string"},{name:"icon_color",type:"int"},{name:"icon_emoji_id",type:"flags.0?long"}],type:"MessageAction"},{id:-1064024032,predicate:"messageActionTopicEdit",params:[{name:"flags",type:"#"},{name:"title",type:"flags.0?string"},{name:"icon_emoji_id",type:"flags.1?long"},{name:"closed",type:"flags.2?Bool"},{name:"hidden",type:"flags.3?Bool"}],type:"MessageAction"},{id:422509539,predicate:"updateChannelPinnedTopic",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.0?true"},{name:"channel_id",type:"long"},{name:"topic_id",type:"int"}],type:"Update"},{id:1548122514,predicate:"inputNotifyForumTopic",params:[{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"int"}],type:"InputNotifyPeer"},{id:577659656,predicate:"notifyForumTopic",params:[{name:"peer",type:"Peer"},{name:"top_msg_id",type:"int"}],type:"NotifyPeer"},{id:1153562857,predicate:"inputStickerSetEmojiDefaultTopicIcons",params:[],type:"InputStickerSet"},{id:406407439,predicate:"messages.sponsoredMessagesEmpty",params:[],type:"messages.SponsoredMessages"},{id:-31881726,predicate:"updateChannelPinnedTopics",params:[{name:"flags",type:"#"},{name:"channel_id",type:"long"},{name:"order",type:"flags.0?Vector<int>"}],type:"Update"},{id:1135897376,predicate:"defaultHistoryTTL",params:[{name:"period",type:"int"}],type:"DefaultHistoryTTL"},{id:116234636,predicate:"auth.codeTypeFragmentSms",params:[],type:"auth.CodeType"},{id:-648651719,predicate:"auth.sentCodeTypeFragmentSms",params:[{name:"url",type:"string"},{name:"length",type:"int"}],type:"auth.SentCodeType"},{id:1103040667,predicate:"exportedContactToken",params:[{name:"url",type:"string"},{name:"expires",type:"int"}],type:"ExportedContactToken"},{id:1693675004,predicate:"channelAdminLogEventActionToggleAntiSpam",params:[{name:"new_value",type:"Bool"}],type:"ChannelAdminLogEventAction"},{id:1474192222,predicate:"messageActionSuggestProfilePhoto",params:[{name:"photo",type:"Photo"}],type:"MessageAction"},{id:2008112412,predicate:"stickerSetNoCovered",params:[{name:"set",type:"StickerSet"}],type:"StickerSetCovered"},{id:542282808,predicate:"updateUser",params:[{name:"user_id",type:"long"}],type:"Update"},{id:596704836,predicate:"auth.sentCodeSuccess",params:[{name:"authorization",type:"auth.Authorization"}],type:"auth.SentCode"},{id:-25742243,predicate:"messageActionRequestedPeer",params:[{name:"button_id",type:"int"},{name:"peer",type:"Peer"}],type:"MessageAction"},{id:1597737472,predicate:"requestPeerTypeUser",params:[{name:"flags",type:"#"},{name:"bot",type:"flags.0?Bool"},{name:"premium",type:"flags.1?Bool"}],type:"RequestPeerType"},{id:-906990053,predicate:"requestPeerTypeChat",params:[{name:"flags",type:"#"},{name:"creator",type:"flags.0?true"},{name:"bot_participant",type:"flags.5?true"},{name:"has_username",type:"flags.3?Bool"},{name:"forum",type:"flags.4?Bool"},{name:"user_admin_rights",type:"flags.1?ChatAdminRights"},{name:"bot_admin_rights",type:"flags.2?ChatAdminRights"}],type:"RequestPeerType"},{id:865857388,predicate:"requestPeerTypeBroadcast",params:[{name:"flags",type:"#"},{name:"creator",type:"flags.0?true"},{name:"has_username",type:"flags.3?Bool"},{name:"user_admin_rights",type:"flags.1?ChatAdminRights"},{name:"bot_admin_rights",type:"flags.2?ChatAdminRights"}],type:"RequestPeerType"},{id:218842764,predicate:"keyboardButtonRequestPeer",params:[{name:"text",type:"string"},{name:"button_id",type:"int"},{name:"peer_type",type:"RequestPeerType"}],type:"KeyboardButton"},{id:1209970170,predicate:"emojiListNotModified",params:[],type:"EmojiList"},{id:2048790993,predicate:"emojiList",params:[{name:"hash",type:"long"},{name:"document_id",type:"Vector<long>"}],type:"EmojiList"},{id:-444918734,predicate:"auth.sentCodeTypeFirebaseSms",params:[{name:"flags",type:"#"},{name:"nonce",type:"flags.0?bytes"},{name:"receipt",type:"flags.1?string"},{name:"push_timeout",type:"flags.1?int"},{name:"length",type:"int"}],type:"auth.SentCodeType"},{id:2056961449,predicate:"emojiGroup",params:[{name:"title",type:"string"},{name:"icon_emoji_id",type:"long"},{name:"emoticons",type:"Vector<string>"}],type:"EmojiGroup"},{id:1874111879,predicate:"messages.emojiGroupsNotModified",params:[],type:"messages.EmojiGroups"},{id:-2011186869,predicate:"messages.emojiGroups",params:[{name:"hash",type:"int"},{name:"groups",type:"Vector<EmojiGroup>"}],type:"messages.EmojiGroups"},{id:-128171716,predicate:"videoSizeEmojiMarkup",params:[{name:"emoji_id",type:"long"},{name:"background_colors",type:"Vector<int>"}],type:"VideoSize"},{id:228623102,predicate:"videoSizeStickerMarkup",params:[{name:"stickerset",type:"InputStickerSet"},{name:"sticker_id",type:"long"},{name:"background_colors",type:"Vector<int>"}],type:"VideoSize"},{id:1964978502,predicate:"textWithEntities",params:[{name:"text",type:"string"},{name:"entities",type:"Vector<MessageEntity>"}],type:"TextWithEntities"},{id:870003448,predicate:"messages.translateResult",params:[{name:"result",type:"Vector<TextWithEntities>"}],type:"messages.TranslatedText"},{id:-934791986,predicate:"autoSaveSettings",params:[{name:"flags",type:"#"},{name:"photos",type:"flags.0?true"},{name:"videos",type:"flags.1?true"},{name:"video_max_size",type:"flags.2?long"}],type:"AutoSaveSettings"},{id:-2124403385,predicate:"autoSaveException",params:[{name:"peer",type:"Peer"},{name:"settings",type:"AutoSaveSettings"}],type:"AutoSaveException"},{id:1279133341,predicate:"account.autoSaveSettings",params:[{name:"users_settings",type:"AutoSaveSettings"},{name:"chats_settings",type:"AutoSaveSettings"},{name:"broadcasts_settings",type:"AutoSaveSettings"},{name:"exceptions",type:"Vector<AutoSaveException>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"account.AutoSaveSettings"},{id:-335171433,predicate:"updateAutoSaveSettings",params:[],type:"Update"},{id:2094949405,predicate:"help.appConfigNotModified",params:[],type:"help.AppConfig"},{id:-585598930,predicate:"help.appConfig",params:[{name:"hash",type:"int"},{name:"config",type:"JSONValue"}],type:"help.AppConfig"},{id:-1457472134,predicate:"inputBotAppID",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputBotApp"},{id:-1869872121,predicate:"inputBotAppShortName",params:[{name:"bot_id",type:"InputUser"},{name:"short_name",type:"string"}],type:"InputBotApp"},{id:1571189943,predicate:"botAppNotModified",params:[],type:"BotApp"},{id:-1778593322,predicate:"botApp",params:[{name:"flags",type:"#"},{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"short_name",type:"string"},{name:"title",type:"string"},{name:"description",type:"string"},{name:"photo",type:"Photo"},{name:"document",type:"flags.0?Document"},{name:"hash",type:"long"}],type:"BotApp"},{id:-347034123,predicate:"messages.botApp",params:[{name:"flags",type:"#"},{name:"inactive",type:"flags.0?true"},{name:"request_write_access",type:"flags.1?true"},{name:"app",type:"BotApp"}],type:"messages.BotApp"},{id:1008422669,predicate:"appWebViewResultUrl",params:[{name:"url",type:"string"}],type:"AppWebViewResult"},{id:-1250781739,predicate:"inlineBotWebView",params:[{name:"text",type:"string"},{name:"url",type:"string"}],type:"InlineBotWebView"},{id:1246753138,predicate:"readParticipantDate",params:[{name:"user_id",type:"long"},{name:"date",type:"int"}],type:"ReadParticipantDate"},{id:-856651050,predicate:"updateGroupInvitePrivacyForbidden",params:[{name:"user_id",type:"long"}],type:"Update"}],methods:[{id:-878758099,method:"invokeAfterMsg",params:[{name:"msg_id",type:"long"},{name:"query",type:"!X"}],type:"X"},{id:1036301552,method:"invokeAfterMsgs",params:[{name:"msg_ids",type:"Vector<long>"},{name:"query",type:"!X"}],type:"X"},{id:-1502141361,method:"auth.sendCode",params:[{name:"phone_number",type:"string"},{name:"api_id",type:"int"},{name:"api_hash",type:"string"},{name:"settings",type:"CodeSettings"}],type:"auth.SentCode"},{id:-2131827673,method:"auth.signUp",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"auth.Authorization"},{id:-1923962543,method:"auth.signIn",params:[{name:"flags",type:"#"},{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"phone_code",type:"flags.0?string"},{name:"email_verification",type:"flags.1?EmailVerification"}],type:"auth.Authorization"},{id:1047706137,method:"auth.logOut",params:[],type:"auth.LoggedOut"},{id:-1616179942,method:"auth.resetAuthorizations",params:[],type:"Bool"},{id:-440401971,method:"auth.exportAuthorization",params:[{name:"dc_id",type:"int"}],type:"auth.ExportedAuthorization"},{id:-1518699091,method:"auth.importAuthorization",params:[{name:"id",type:"long"},{name:"bytes",type:"bytes"}],type:"auth.Authorization"},{id:-841733627,method:"auth.bindTempAuthKey",params:[{name:"perm_auth_key_id",type:"long"},{name:"nonce",type:"long"},{name:"expires_at",type:"int"},{name:"encrypted_message",type:"bytes"}],type:"Bool"},{id:-326762118,method:"account.registerDevice",params:[{name:"flags",type:"#"},{name:"no_muted",type:"flags.0?true"},{name:"token_type",type:"int"},{name:"token",type:"string"},{name:"app_sandbox",type:"Bool"},{name:"secret",type:"bytes"},{name:"other_uids",type:"Vector<long>"}],type:"Bool"},{id:1779249670,method:"account.unregisterDevice",params:[{name:"token_type",type:"int"},{name:"token",type:"string"},{name:"other_uids",type:"Vector<long>"}],type:"Bool"},{id:-2067899501,method:"account.updateNotifySettings",params:[{name:"peer",type:"InputNotifyPeer"},{name:"settings",type:"InputPeerNotifySettings"}],type:"Bool"},{id:313765169,method:"account.getNotifySettings",params:[{name:"peer",type:"InputNotifyPeer"}],type:"PeerNotifySettings"},{id:-612493497,method:"account.resetNotifySettings",params:[],type:"Bool"},{id:2018596725,method:"account.updateProfile",params:[{name:"flags",type:"#"},{name:"first_name",type:"flags.0?string"},{name:"last_name",type:"flags.1?string"},{name:"about",type:"flags.2?string"}],type:"User"},{id:1713919532,method:"account.updateStatus",params:[{name:"offline",type:"Bool"}],type:"Bool"},{id:127302966,method:"account.getWallPapers",params:[{name:"hash",type:"long"}],type:"account.WallPapers"},{id:-977650298,method:"account.reportPeer",params:[{name:"peer",type:"InputPeer"},{name:"reason",type:"ReportReason"},{name:"message",type:"string"}],type:"Bool"},{id:227648840,method:"users.getUsers",params:[{name:"id",type:"Vector<InputUser>"}],type:"Vector<User>"},{id:-1240508136,method:"users.getFullUser",params:[{name:"id",type:"InputUser"}],type:"users.UserFull"},{id:2061264541,method:"contacts.getContactIDs",params:[{name:"hash",type:"long"}],type:"Vector<int>"},{id:-995929106,method:"contacts.getStatuses",params:[],type:"Vector<ContactStatus>"},{id:1574346258,method:"contacts.getContacts",params:[{name:"hash",type:"long"}],type:"contacts.Contacts"},{id:746589157,method:"contacts.importContacts",params:[{name:"contacts",type:"Vector<InputContact>"}],type:"contacts.ImportedContacts"},{id:157945344,method:"contacts.deleteContacts",params:[{name:"id",type:"Vector<InputUser>"}],type:"Updates"},{id:269745566,method:"contacts.deleteByPhones",params:[{name:"phones",type:"Vector<string>"}],type:"Bool"},{id:1758204945,method:"contacts.block",params:[{name:"id",type:"InputPeer"}],type:"Bool"},{id:-1096393392,method:"contacts.unblock",params:[{name:"id",type:"InputPeer"}],type:"Bool"},{id:-176409329,method:"contacts.getBlocked",params:[{name:"offset",type:"int"},{name:"limit",type:"int"}],type:"contacts.Blocked"},{id:1673946374,method:"messages.getMessages",params:[{name:"id",type:"Vector<InputMessage>"}],type:"messages.Messages"},{id:-1594569905,method:"messages.getDialogs",params:[{name:"flags",type:"#"},{name:"exclude_pinned",type:"flags.0?true"},{name:"folder_id",type:"flags.1?int"},{name:"offset_date",type:"int"},{name:"offset_id",type:"int"},{name:"offset_peer",type:"InputPeer"},{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"messages.Dialogs"},{id:1143203525,method:"messages.getHistory",params:[{name:"peer",type:"InputPeer"},{name:"offset_id",type:"int"},{name:"offset_date",type:"int"},{name:"add_offset",type:"int"},{name:"limit",type:"int"},{name:"max_id",type:"int"},{name:"min_id",type:"int"},{name:"hash",type:"long"}],type:"messages.Messages"},{id:-1593989278,method:"messages.search",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"q",type:"string"},{name:"from_id",type:"flags.0?InputPeer"},{name:"top_msg_id",type:"flags.1?int"},{name:"filter",type:"MessagesFilter"},{name:"min_date",type:"int"},{name:"max_date",type:"int"},{name:"offset_id",type:"int"},{name:"add_offset",type:"int"},{name:"limit",type:"int"},{name:"max_id",type:"int"},{name:"min_id",type:"int"},{name:"hash",type:"long"}],type:"messages.Messages"},{id:238054714,method:"messages.readHistory",params:[{name:"peer",type:"InputPeer"},{name:"max_id",type:"int"}],type:"messages.AffectedMessages"},{id:-1332768214,method:"messages.deleteHistory",params:[{name:"flags",type:"#"},{name:"just_clear",type:"flags.0?true"},{name:"revoke",type:"flags.1?true"},{name:"peer",type:"InputPeer"},{name:"max_id",type:"int"},{name:"min_date",type:"flags.2?int"},{name:"max_date",type:"flags.3?int"}],type:"messages.AffectedHistory"},{id:-443640366,method:"messages.deleteMessages",params:[{name:"flags",type:"#"},{name:"revoke",type:"flags.0?true"},{name:"id",type:"Vector<int>"}],type:"messages.AffectedMessages"},{id:94983360,method:"messages.receivedMessages",params:[{name:"max_id",type:"int"}],type:"Vector<ReceivedNotifyMessage>"},{id:1486110434,method:"messages.setTyping",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"},{name:"action",type:"SendMessageAction"}],type:"Bool"},{id:482476935,method:"messages.sendMessage",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.1?true"},{name:"silent",type:"flags.5?true"},{name:"background",type:"flags.6?true"},{name:"clear_draft",type:"flags.7?true"},{name:"noforwards",type:"flags.14?true"},{name:"update_stickersets_order",type:"flags.15?true"},{name:"peer",type:"InputPeer"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.9?int"},{name:"message",type:"string"},{name:"random_id",type:"long"},{name:"reply_markup",type:"flags.2?ReplyMarkup"},{name:"entities",type:"flags.3?Vector<MessageEntity>"},{name:"schedule_date",type:"flags.10?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"Updates"},{id:1967638886,method:"messages.sendMedia",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.5?true"},{name:"background",type:"flags.6?true"},{name:"clear_draft",type:"flags.7?true"},{name:"noforwards",type:"flags.14?true"},{name:"update_stickersets_order",type:"flags.15?true"},{name:"peer",type:"InputPeer"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.9?int"},{name:"media",type:"InputMedia"},{name:"message",type:"string"},{name:"random_id",type:"long"},{name:"reply_markup",type:"flags.2?ReplyMarkup"},{name:"entities",type:"flags.3?Vector<MessageEntity>"},{name:"schedule_date",type:"flags.10?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"Updates"},{id:-966673468,method:"messages.forwardMessages",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.5?true"},{name:"background",type:"flags.6?true"},{name:"with_my_score",type:"flags.8?true"},{name:"drop_author",type:"flags.11?true"},{name:"drop_media_captions",type:"flags.12?true"},{name:"noforwards",type:"flags.14?true"},{name:"from_peer",type:"InputPeer"},{name:"id",type:"Vector<int>"},{name:"random_id",type:"Vector<long>"},{name:"to_peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.9?int"},{name:"schedule_date",type:"flags.10?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"Updates"},{id:-820669733,method:"messages.reportSpam",params:[{name:"peer",type:"InputPeer"}],type:"Bool"},{id:-270948702,method:"messages.getPeerSettings",params:[{name:"peer",type:"InputPeer"}],type:"messages.PeerSettings"},{id:-1991005362,method:"messages.report",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"},{name:"reason",type:"ReportReason"},{name:"message",type:"string"}],type:"Bool"},{id:1240027791,method:"messages.getChats",params:[{name:"id",type:"Vector<long>"}],type:"messages.Chats"},{id:-1364194508,method:"messages.getFullChat",params:[{name:"chat_id",type:"long"}],type:"messages.ChatFull"},{id:1937260541,method:"messages.editChatTitle",params:[{name:"chat_id",type:"long"},{name:"title",type:"string"}],type:"Updates"},{id:903730804,method:"messages.editChatPhoto",params:[{name:"chat_id",type:"long"},{name:"photo",type:"InputChatPhoto"}],type:"Updates"},{id:-230206493,method:"messages.addChatUser",params:[{name:"chat_id",type:"long"},{name:"user_id",type:"InputUser"},{name:"fwd_limit",type:"int"}],type:"Updates"},{id:-1575461717,method:"messages.deleteChatUser",params:[{name:"flags",type:"#"},{name:"revoke_history",type:"flags.0?true"},{name:"chat_id",type:"long"},{name:"user_id",type:"InputUser"}],type:"Updates"},{id:3450904,method:"messages.createChat",params:[{name:"flags",type:"#"},{name:"users",type:"Vector<InputUser>"},{name:"title",type:"string"},{name:"ttl_period",type:"flags.0?int"}],type:"Updates"},{id:-304838614,method:"updates.getState",params:[],type:"updates.State"},{id:630429265,method:"updates.getDifference",params:[{name:"flags",type:"#"},{name:"pts",type:"int"},{name:"pts_total_limit",type:"flags.0?int"},{name:"date",type:"int"},{name:"qts",type:"int"}],type:"updates.Difference"},{id:473782614,method:"photos.updateProfilePhoto",params:[{name:"flags",type:"#"},{name:"fallback",type:"flags.0?true"},{name:"id",type:"InputPhoto"}],type:"photos.Photo"},{id:154966609,method:"photos.uploadProfilePhoto",params:[{name:"flags",type:"#"},{name:"fallback",type:"flags.3?true"},{name:"file",type:"flags.0?InputFile"},{name:"video",type:"flags.1?InputFile"},{name:"video_start_ts",type:"flags.2?double"},{name:"video_emoji_markup",type:"flags.4?VideoSize"}],type:"photos.Photo"},{id:-2016444625,method:"photos.deletePhotos",params:[{name:"id",type:"Vector<InputPhoto>"}],type:"Vector<long>"},{id:-1291540959,method:"upload.saveFilePart",params:[{name:"file_id",type:"long"},{name:"file_part",type:"int"},{name:"bytes",type:"bytes"}],type:"Bool"},{id:-1101843010,method:"upload.getFile",params:[{name:"flags",type:"#"},{name:"precise",type:"flags.0?true"},{name:"cdn_supported",type:"flags.1?true"},{name:"location",type:"InputFileLocation"},{name:"offset",type:"long"},{name:"limit",type:"int"}],type:"upload.File"},{id:-990308245,method:"help.getConfig",params:[],type:"Config"},{id:531836966,method:"help.getNearestDc",params:[],type:"NearestDc"},{id:1378703997,method:"help.getAppUpdate",params:[{name:"source",type:"string"}],type:"help.AppUpdate"},{id:1295590211,method:"help.getInviteText",params:[],type:"help.InviteText"},{id:-1848823128,method:"photos.getUserPhotos",params:[{name:"user_id",type:"InputUser"},{name:"offset",type:"int"},{name:"max_id",type:"long"},{name:"limit",type:"int"}],type:"photos.Photos"},{id:651135312,method:"messages.getDhConfig",params:[{name:"version",type:"int"},{name:"random_length",type:"int"}],type:"messages.DhConfig"},{id:-162681021,method:"messages.requestEncryption",params:[{name:"user_id",type:"InputUser"},{name:"random_id",type:"int"},{name:"g_a",type:"bytes"}],type:"EncryptedChat"},{id:1035731989,method:"messages.acceptEncryption",params:[{name:"peer",type:"InputEncryptedChat"},{name:"g_b",type:"bytes"},{name:"key_fingerprint",type:"long"}],type:"EncryptedChat"},{id:-208425312,method:"messages.discardEncryption",params:[{name:"flags",type:"#"},{name:"delete_history",type:"flags.0?true"},{name:"chat_id",type:"int"}],type:"Bool"},{id:2031374829,method:"messages.setEncryptedTyping",params:[{name:"peer",type:"InputEncryptedChat"},{name:"typing",type:"Bool"}],type:"Bool"},{id:2135648522,method:"messages.readEncryptedHistory",params:[{name:"peer",type:"InputEncryptedChat"},{name:"max_date",type:"int"}],type:"Bool"},{id:1157265941,method:"messages.sendEncrypted",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.0?true"},{name:"peer",type:"InputEncryptedChat"},{name:"random_id",type:"long"},{name:"data",type:"bytes"}],type:"messages.SentEncryptedMessage"},{id:1431914525,method:"messages.sendEncryptedFile",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.0?true"},{name:"peer",type:"InputEncryptedChat"},{name:"random_id",type:"long"},{name:"data",type:"bytes"},{name:"file",type:"InputEncryptedFile"}],type:"messages.SentEncryptedMessage"},{id:852769188,method:"messages.sendEncryptedService",params:[{name:"peer",type:"InputEncryptedChat"},{name:"random_id",type:"long"},{name:"data",type:"bytes"}],type:"messages.SentEncryptedMessage"},{id:1436924774,method:"messages.receivedQueue",params:[{name:"max_qts",type:"int"}],type:"Vector<long>"},{id:1259113487,method:"messages.reportEncryptedSpam",params:[{name:"peer",type:"InputEncryptedChat"}],type:"Bool"},{id:-562337987,method:"upload.saveBigFilePart",params:[{name:"file_id",type:"long"},{name:"file_part",type:"int"},{name:"file_total_parts",type:"int"},{name:"bytes",type:"bytes"}],type:"Bool"},{id:-1043505495,method:"initConnection",params:[{name:"flags",type:"#"},{name:"api_id",type:"int"},{name:"device_model",type:"string"},{name:"system_version",type:"string"},{name:"app_version",type:"string"},{name:"system_lang_code",type:"string"},{name:"lang_pack",type:"string"},{name:"lang_code",type:"string"},{name:"proxy",type:"flags.0?InputClientProxy"},{name:"params",type:"flags.1?JSONValue"},{name:"query",type:"!X"}],type:"X"},{id:-1663104819,method:"help.getSupport",params:[],type:"help.Support"},{id:916930423,method:"messages.readMessageContents",params:[{name:"id",type:"Vector<int>"}],type:"messages.AffectedMessages"},{id:655677548,method:"account.checkUsername",params:[{name:"username",type:"string"}],type:"Bool"},{id:1040964988,method:"account.updateUsername",params:[{name:"username",type:"string"}],type:"User"},{id:301470424,method:"contacts.search",params:[{name:"q",type:"string"},{name:"limit",type:"int"}],type:"contacts.Found"},{id:-623130288,method:"account.getPrivacy",params:[{name:"key",type:"InputPrivacyKey"}],type:"account.PrivacyRules"},{id:-906486552,method:"account.setPrivacy",params:[{name:"key",type:"InputPrivacyKey"},{name:"rules",type:"Vector<InputPrivacyRule>"}],type:"account.PrivacyRules"},{id:-1564422284,method:"account.deleteAccount",params:[{name:"flags",type:"#"},{name:"reason",type:"string"},{name:"password",type:"flags.0?InputCheckPasswordSRP"}],type:"Bool"},{id:150761757,method:"account.getAccountTTL",params:[],type:"AccountDaysTTL"},{id:608323678,method:"account.setAccountTTL",params:[{name:"ttl",type:"AccountDaysTTL"}],type:"Bool"},{id:-627372787,method:"invokeWithLayer",params:[{name:"layer",type:"int"},{name:"query",type:"!X"}],type:"X"},{id:-113456221,method:"contacts.resolveUsername",params:[{name:"username",type:"string"}],type:"contacts.ResolvedPeer"},{id:-2108208411,method:"account.sendChangePhoneCode",params:[{name:"phone_number",type:"string"},{name:"settings",type:"CodeSettings"}],type:"auth.SentCode"},{id:1891839707,method:"account.changePhone",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"phone_code",type:"string"}],type:"User"},{id:-710552671,method:"messages.getStickers",params:[{name:"emoticon",type:"string"},{name:"hash",type:"long"}],type:"messages.Stickers"},{id:-1197432408,method:"messages.getAllStickers",params:[{name:"hash",type:"long"}],type:"messages.AllStickers"},{id:954152242,method:"account.updateDeviceLocked",params:[{name:"period",type:"int"}],type:"Bool"},{id:1738800940,method:"auth.importBotAuthorization",params:[{name:"flags",type:"int"},{name:"api_id",type:"int"},{name:"api_hash",type:"string"},{name:"bot_auth_token",type:"string"}],type:"auth.Authorization"},{id:-1956073268,method:"messages.getWebPagePreview",params:[{name:"flags",type:"#"},{name:"message",type:"string"},{name:"entities",type:"flags.3?Vector<MessageEntity>"}],type:"MessageMedia"},{id:-484392616,method:"account.getAuthorizations",params:[],type:"account.Authorizations"},{id:-545786948,method:"account.resetAuthorization",params:[{name:"hash",type:"long"}],type:"Bool"},{id:1418342645,method:"account.getPassword",params:[],type:"account.Password"},{id:-1663767815,method:"account.getPasswordSettings",params:[{name:"password",type:"InputCheckPasswordSRP"}],type:"account.PasswordSettings"},{id:-1516564433,method:"account.updatePasswordSettings",params:[{name:"password",type:"InputCheckPasswordSRP"},{name:"new_settings",type:"account.PasswordInputSettings"}],type:"Bool"},{id:-779399914,method:"auth.checkPassword",params:[{name:"password",type:"InputCheckPasswordSRP"}],type:"auth.Authorization"},{id:-661144474,method:"auth.requestPasswordRecovery",params:[],type:"auth.PasswordRecovery"},{id:923364464,method:"auth.recoverPassword",params:[{name:"flags",type:"#"},{name:"code",type:"string"},{name:"new_settings",type:"flags.0?account.PasswordInputSettings"}],type:"auth.Authorization"},{id:-1080796745,method:"invokeWithoutUpdates",params:[{name:"query",type:"!X"}],type:"X"},{id:-1607670315,method:"messages.exportChatInvite",params:[{name:"flags",type:"#"},{name:"legacy_revoke_permanent",type:"flags.2?true"},{name:"request_needed",type:"flags.3?true"},{name:"peer",type:"InputPeer"},{name:"expire_date",type:"flags.0?int"},{name:"usage_limit",type:"flags.1?int"},{name:"title",type:"flags.4?string"}],type:"ExportedChatInvite"},{id:1051570619,method:"messages.checkChatInvite",params:[{name:"hash",type:"string"}],type:"ChatInvite"},{id:1817183516,method:"messages.importChatInvite",params:[{name:"hash",type:"string"}],type:"Updates"},{id:-928977804,method:"messages.getStickerSet",params:[{name:"stickerset",type:"InputStickerSet"},{name:"hash",type:"int"}],type:"messages.StickerSet"},{id:-946871200,method:"messages.installStickerSet",params:[{name:"stickerset",type:"InputStickerSet"},{name:"archived",type:"Bool"}],type:"messages.StickerSetInstallResult"},{id:-110209570,method:"messages.uninstallStickerSet",params:[{name:"stickerset",type:"InputStickerSet"}],type:"Bool"},{id:-421563528,method:"messages.startBot",params:[{name:"bot",type:"InputUser"},{name:"peer",type:"InputPeer"},{name:"random_id",type:"long"},{name:"start_param",type:"string"}],type:"Updates"},{id:-1877938321,method:"help.getAppChangelog",params:[{name:"prev_app_version",type:"string"}],type:"Updates"},{id:1468322785,method:"messages.getMessagesViews",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"},{name:"increment",type:"Bool"}],type:"messages.MessageViews"},{id:-871347913,method:"channels.readHistory",params:[{name:"channel",type:"InputChannel"},{name:"max_id",type:"int"}],type:"Bool"},{id:-2067661490,method:"channels.deleteMessages",params:[{name:"channel",type:"InputChannel"},{name:"id",type:"Vector<int>"}],type:"messages.AffectedMessages"},{id:-196443371,method:"channels.reportSpam",params:[{name:"channel",type:"InputChannel"},{name:"participant",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"Bool"},{id:-1383294429,method:"channels.getMessages",params:[{name:"channel",type:"InputChannel"},{name:"id",type:"Vector<InputMessage>"}],type:"messages.Messages"},{id:2010044880,method:"channels.getParticipants",params:[{name:"channel",type:"InputChannel"},{name:"filter",type:"ChannelParticipantsFilter"},{name:"offset",type:"int"},{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"channels.ChannelParticipants"},{id:-1599378234,method:"channels.getParticipant",params:[{name:"channel",type:"InputChannel"},{name:"participant",type:"InputPeer"}],type:"channels.ChannelParticipant"},{id:176122811,method:"channels.getChannels",params:[{name:"id",type:"Vector<InputChannel>"}],type:"messages.Chats"},{id:141781513,method:"channels.getFullChannel",params:[{name:"channel",type:"InputChannel"}],type:"messages.ChatFull"},{id:-1862244601,method:"channels.createChannel",params:[{name:"flags",type:"#"},{name:"broadcast",type:"flags.0?true"},{name:"megagroup",type:"flags.1?true"},{name:"for_import",type:"flags.3?true"},{name:"forum",type:"flags.5?true"},{name:"title",type:"string"},{name:"about",type:"string"},{name:"geo_point",type:"flags.2?InputGeoPoint"},{name:"address",type:"flags.2?string"},{name:"ttl_period",type:"flags.4?int"}],type:"Updates"},{id:-751007486,method:"channels.editAdmin",params:[{name:"channel",type:"InputChannel"},{name:"user_id",type:"InputUser"},{name:"admin_rights",type:"ChatAdminRights"},{name:"rank",type:"string"}],type:"Updates"},{id:1450044624,method:"channels.editTitle",params:[{name:"channel",type:"InputChannel"},{name:"title",type:"string"}],type:"Updates"},{id:-248621111,method:"channels.editPhoto",params:[{name:"channel",type:"InputChannel"},{name:"photo",type:"InputChatPhoto"}],type:"Updates"},{id:283557164,method:"channels.checkUsername",params:[{name:"channel",type:"InputChannel"},{name:"username",type:"string"}],type:"Bool"},{id:890549214,method:"channels.updateUsername",params:[{name:"channel",type:"InputChannel"},{name:"username",type:"string"}],type:"Bool"},{id:615851205,method:"channels.joinChannel",params:[{name:"channel",type:"InputChannel"}],type:"Updates"},{id:-130635115,method:"channels.leaveChannel",params:[{name:"channel",type:"InputChannel"}],type:"Updates"},{id:429865580,method:"channels.inviteToChannel",params:[{name:"channel",type:"InputChannel"},{name:"users",type:"Vector<InputUser>"}],type:"Updates"},{id:-1072619549,method:"channels.deleteChannel",params:[{name:"channel",type:"InputChannel"}],type:"Updates"},{id:51854712,method:"updates.getChannelDifference",params:[{name:"flags",type:"#"},{name:"force",type:"flags.0?true"},{name:"channel",type:"InputChannel"},{name:"filter",type:"ChannelMessagesFilter"},{name:"pts",type:"int"},{name:"limit",type:"int"}],type:"updates.ChannelDifference"},{id:-1470377534,method:"messages.editChatAdmin",params:[{name:"chat_id",type:"long"},{name:"user_id",type:"InputUser"},{name:"is_admin",type:"Bool"}],type:"Bool"},{id:-1568189671,method:"messages.migrateChat",params:[{name:"chat_id",type:"long"}],type:"Updates"},{id:1271290010,method:"messages.searchGlobal",params:[{name:"flags",type:"#"},{name:"folder_id",type:"flags.0?int"},{name:"q",type:"string"},{name:"filter",type:"MessagesFilter"},{name:"min_date",type:"int"},{name:"max_date",type:"int"},{name:"offset_rate",type:"int"},{name:"offset_peer",type:"InputPeer"},{name:"offset_id",type:"int"},{name:"limit",type:"int"}],type:"messages.Messages"},{id:2016638777,method:"messages.reorderStickerSets",params:[{name:"flags",type:"#"},{name:"masks",type:"flags.0?true"},{name:"emojis",type:"flags.1?true"},{name:"order",type:"Vector<long>"}],type:"Bool"},{id:-1309538785,method:"messages.getDocumentByHash",params:[{name:"sha256",type:"bytes"},{name:"size",type:"long"},{name:"mime_type",type:"string"}],type:"Document"},{id:1559270965,method:"messages.getSavedGifs",params:[{name:"hash",type:"long"}],type:"messages.SavedGifs"},{id:846868683,method:"messages.saveGif",params:[{name:"id",type:"InputDocument"},{name:"unsave",type:"Bool"}],type:"Bool"},{id:1364105629,method:"messages.getInlineBotResults",params:[{name:"flags",type:"#"},{name:"bot",type:"InputUser"},{name:"peer",type:"InputPeer"},{name:"geo_point",type:"flags.0?InputGeoPoint"},{name:"query",type:"string"},{name:"offset",type:"string"}],type:"messages.BotResults"},{id:-1156406247,method:"messages.setInlineBotResults",params:[{name:"flags",type:"#"},{name:"gallery",type:"flags.0?true"},{name:"private",type:"flags.1?true"},{name:"query_id",type:"long"},{name:"results",type:"Vector<InputBotInlineResult>"},{name:"cache_time",type:"int"},{name:"next_offset",type:"flags.2?string"},{name:"switch_pm",type:"flags.3?InlineBotSwitchPM"},{name:"switch_webview",type:"flags.4?InlineBotWebView"}],type:"Bool"},{id:-738468661,method:"messages.sendInlineBotResult",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.5?true"},{name:"background",type:"flags.6?true"},{name:"clear_draft",type:"flags.7?true"},{name:"hide_via",type:"flags.11?true"},{name:"peer",type:"InputPeer"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.9?int"},{name:"random_id",type:"long"},{name:"query_id",type:"long"},{name:"id",type:"string"},{name:"schedule_date",type:"flags.10?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"Updates"},{id:-432034325,method:"channels.exportMessageLink",params:[{name:"flags",type:"#"},{name:"grouped",type:"flags.0?true"},{name:"thread",type:"flags.1?true"},{name:"channel",type:"InputChannel"},{name:"id",type:"int"}],type:"ExportedMessageLink"},{id:527021574,method:"channels.toggleSignatures",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:1056025023,method:"auth.resendCode",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"}],type:"auth.SentCode"},{id:520357240,method:"auth.cancelCode",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"}],type:"Bool"},{id:-39416522,method:"messages.getMessageEditData",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"int"}],type:"messages.MessageEditData"},{id:1224152952,method:"messages.editMessage",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.1?true"},{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"message",type:"flags.11?string"},{name:"media",type:"flags.14?InputMedia"},{name:"reply_markup",type:"flags.2?ReplyMarkup"},{name:"entities",type:"flags.3?Vector<MessageEntity>"},{name:"schedule_date",type:"flags.15?int"}],type:"Updates"},{id:-2091549254,method:"messages.editInlineBotMessage",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.1?true"},{name:"id",type:"InputBotInlineMessageID"},{name:"message",type:"flags.11?string"},{name:"media",type:"flags.14?InputMedia"},{name:"reply_markup",type:"flags.2?ReplyMarkup"},{name:"entities",type:"flags.3?Vector<MessageEntity>"}],type:"Bool"},{id:-1824339449,method:"messages.getBotCallbackAnswer",params:[{name:"flags",type:"#"},{name:"game",type:"flags.1?true"},{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"data",type:"flags.0?bytes"},{name:"password",type:"flags.2?InputCheckPasswordSRP"}],type:"messages.BotCallbackAnswer"},{id:-712043766,method:"messages.setBotCallbackAnswer",params:[{name:"flags",type:"#"},{name:"alert",type:"flags.1?true"},{name:"query_id",type:"long"},{name:"message",type:"flags.0?string"},{name:"url",type:"flags.2?string"},{name:"cache_time",type:"int"}],type:"Bool"},{id:-1758168906,method:"contacts.getTopPeers",params:[{name:"flags",type:"#"},{name:"correspondents",type:"flags.0?true"},{name:"bots_pm",type:"flags.1?true"},{name:"bots_inline",type:"flags.2?true"},{name:"phone_calls",type:"flags.3?true"},{name:"forward_users",type:"flags.4?true"},{name:"forward_chats",type:"flags.5?true"},{name:"groups",type:"flags.10?true"},{name:"channels",type:"flags.15?true"},{name:"offset",type:"int"},{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"contacts.TopPeers"},{id:451113900,method:"contacts.resetTopPeerRating",params:[{name:"category",type:"TopPeerCategory"},{name:"peer",type:"InputPeer"}],type:"Bool"},{id:-462373635,method:"messages.getPeerDialogs",params:[{name:"peers",type:"Vector<InputDialogPeer>"}],type:"messages.PeerDialogs"},{id:-1271718337,method:"messages.saveDraft",params:[{name:"flags",type:"#"},{name:"no_webpage",type:"flags.1?true"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.2?int"},{name:"peer",type:"InputPeer"},{name:"message",type:"string"},{name:"entities",type:"flags.3?Vector<MessageEntity>"}],type:"Bool"},{id:1782549861,method:"messages.getAllDrafts",params:[],type:"Updates"},{id:1685588756,method:"messages.getFeaturedStickers",params:[{name:"hash",type:"long"}],type:"messages.FeaturedStickers"},{id:1527873830,method:"messages.readFeaturedStickers",params:[{name:"id",type:"Vector<long>"}],type:"Bool"},{id:-1649852357,method:"messages.getRecentStickers",params:[{name:"flags",type:"#"},{name:"attached",type:"flags.0?true"},{name:"hash",type:"long"}],type:"messages.RecentStickers"},{id:958863608,method:"messages.saveRecentSticker",params:[{name:"flags",type:"#"},{name:"attached",type:"flags.0?true"},{name:"id",type:"InputDocument"},{name:"unsave",type:"Bool"}],type:"Bool"},{id:-1986437075,method:"messages.clearRecentStickers",params:[{name:"flags",type:"#"},{name:"attached",type:"flags.0?true"}],type:"Bool"},{id:1475442322,method:"messages.getArchivedStickers",params:[{name:"flags",type:"#"},{name:"masks",type:"flags.0?true"},{name:"emojis",type:"flags.1?true"},{name:"offset_id",type:"long"},{name:"limit",type:"int"}],type:"messages.ArchivedStickers"},{id:457157256,method:"account.sendConfirmPhoneCode",params:[{name:"hash",type:"string"},{name:"settings",type:"CodeSettings"}],type:"auth.SentCode"},{id:1596029123,method:"account.confirmPhone",params:[{name:"phone_code_hash",type:"string"},{name:"phone_code",type:"string"}],type:"Bool"},{id:-122669393,method:"channels.getAdminedPublicChannels",params:[{name:"flags",type:"#"},{name:"by_location",type:"flags.0?true"},{name:"check_limit",type:"flags.1?true"}],type:"messages.Chats"},{id:1678738104,method:"messages.getMaskStickers",params:[{name:"hash",type:"long"}],type:"messages.AllStickers"},{id:-866424884,method:"messages.getAttachedStickers",params:[{name:"media",type:"InputStickeredMedia"}],type:"Vector<StickerSetCovered>"},{id:-1907842680,method:"auth.dropTempAuthKeys",params:[{name:"except_auth_keys",type:"Vector<long>"}],type:"Bool"},{id:-1896289088,method:"messages.setGameScore",params:[{name:"flags",type:"#"},{name:"edit_message",type:"flags.0?true"},{name:"force",type:"flags.1?true"},{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"user_id",type:"InputUser"},{name:"score",type:"int"}],type:"Updates"},{id:363700068,method:"messages.setInlineGameScore",params:[{name:"flags",type:"#"},{name:"edit_message",type:"flags.0?true"},{name:"force",type:"flags.1?true"},{name:"id",type:"InputBotInlineMessageID"},{name:"user_id",type:"InputUser"},{name:"score",type:"int"}],type:"Bool"},{id:-400399203,method:"messages.getGameHighScores",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"user_id",type:"InputUser"}],type:"messages.HighScores"},{id:258170395,method:"messages.getInlineGameHighScores",params:[{name:"id",type:"InputBotInlineMessageID"},{name:"user_id",type:"InputUser"}],type:"messages.HighScores"},{id:-468934396,method:"messages.getCommonChats",params:[{name:"user_id",type:"InputUser"},{name:"max_id",type:"long"},{name:"limit",type:"int"}],type:"messages.Chats"},{id:-2023787330,method:"messages.getAllChats",params:[{name:"except_ids",type:"Vector<long>"}],type:"messages.Chats"},{id:-333262899,method:"help.setBotUpdatesStatus",params:[{name:"pending_updates_count",type:"int"},{name:"message",type:"string"}],type:"Bool"},{id:852135825,method:"messages.getWebPage",params:[{name:"url",type:"string"},{name:"hash",type:"int"}],type:"WebPage"},{id:-1489903017,method:"messages.toggleDialogPin",params:[{name:"flags",type:"#"},{name:"pinned",type:"flags.0?true"},{name:"peer",type:"InputDialogPeer"}],type:"Bool"},{id:991616823,method:"messages.reorderPinnedDialogs",params:[{name:"flags",type:"#"},{name:"force",type:"flags.0?true"},{name:"folder_id",type:"int"},{name:"order",type:"Vector<InputDialogPeer>"}],type:"Bool"},{id:-692498958,method:"messages.getPinnedDialogs",params:[{name:"folder_id",type:"int"}],type:"messages.PeerDialogs"},{id:-1440257555,method:"bots.sendCustomRequest",params:[{name:"custom_method",type:"string"},{name:"params",type:"DataJSON"}],type:"DataJSON"},{id:-434028723,method:"bots.answerWebhookJSONQuery",params:[{name:"query_id",type:"long"},{name:"data",type:"DataJSON"}],type:"Bool"},{id:619086221,method:"upload.getWebFile",params:[{name:"location",type:"InputWebFileLocation"},{name:"offset",type:"int"},{name:"limit",type:"int"}],type:"upload.WebFile"},{id:924093883,method:"payments.getPaymentForm",params:[{name:"flags",type:"#"},{name:"invoice",type:"InputInvoice"},{name:"theme_params",type:"flags.0?DataJSON"}],type:"payments.PaymentForm"},{id:611897804,method:"payments.getPaymentReceipt",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"}],type:"payments.PaymentReceipt"},{id:-1228345045,method:"payments.validateRequestedInfo",params:[{name:"flags",type:"#"},{name:"save",type:"flags.0?true"},{name:"invoice",type:"InputInvoice"},{name:"info",type:"PaymentRequestedInfo"}],type:"payments.ValidatedRequestedInfo"},{id:755192367,method:"payments.sendPaymentForm",params:[{name:"flags",type:"#"},{name:"form_id",type:"long"},{name:"invoice",type:"InputInvoice"},{name:"requested_info_id",type:"flags.0?string"},{name:"shipping_option_id",type:"flags.1?string"},{name:"credentials",type:"InputPaymentCredentials"},{name:"tip_amount",type:"flags.2?long"}],type:"payments.PaymentResult"},{id:1151208273,method:"account.getTmpPassword",params:[{name:"password",type:"InputCheckPasswordSRP"},{name:"period",type:"int"}],type:"account.TmpPassword"},{id:578650699,method:"payments.getSavedInfo",params:[],type:"payments.SavedInfo"},{id:-667062079,method:"payments.clearSavedInfo",params:[{name:"flags",type:"#"},{name:"credentials",type:"flags.0?true"},{name:"info",type:"flags.1?true"}],type:"Bool"},{id:-436833542,method:"messages.setBotShippingResults",params:[{name:"flags",type:"#"},{name:"query_id",type:"long"},{name:"error",type:"flags.0?string"},{name:"shipping_options",type:"flags.1?Vector<ShippingOption>"}],type:"Bool"},{id:163765653,method:"messages.setBotPrecheckoutResults",params:[{name:"flags",type:"#"},{name:"success",type:"flags.1?true"},{name:"query_id",type:"long"},{name:"error",type:"flags.0?string"}],type:"Bool"},{id:-1876841625,method:"stickers.createStickerSet",params:[{name:"flags",type:"#"},{name:"masks",type:"flags.0?true"},{name:"animated",type:"flags.1?true"},{name:"videos",type:"flags.4?true"},{name:"emojis",type:"flags.5?true"},{name:"text_color",type:"flags.6?true"},{name:"user_id",type:"InputUser"},{name:"title",type:"string"},{name:"short_name",type:"string"},{name:"thumb",type:"flags.2?InputDocument"},{name:"stickers",type:"Vector<InputStickerSetItem>"},{name:"software",type:"flags.3?string"}],type:"messages.StickerSet"},{id:-143257775,method:"stickers.removeStickerFromSet",params:[{name:"sticker",type:"InputDocument"}],type:"messages.StickerSet"},{id:-4795190,method:"stickers.changeStickerPosition",params:[{name:"sticker",type:"InputDocument"},{name:"position",type:"int"}],type:"messages.StickerSet"},{id:-2041315650,method:"stickers.addStickerToSet",params:[{name:"stickerset",type:"InputStickerSet"},{name:"sticker",type:"InputStickerSetItem"}],type:"messages.StickerSet"},{id:1369162417,method:"messages.uploadMedia",params:[{name:"peer",type:"InputPeer"},{name:"media",type:"InputMedia"}],type:"MessageMedia"},{id:1430593449,method:"phone.getCallConfig",params:[],type:"DataJSON"},{id:1124046573,method:"phone.requestCall",params:[{name:"flags",type:"#"},{name:"video",type:"flags.0?true"},{name:"user_id",type:"InputUser"},{name:"random_id",type:"int"},{name:"g_a_hash",type:"bytes"},{name:"protocol",type:"PhoneCallProtocol"}],type:"phone.PhoneCall"},{id:1003664544,method:"phone.acceptCall",params:[{name:"peer",type:"InputPhoneCall"},{name:"g_b",type:"bytes"},{name:"protocol",type:"PhoneCallProtocol"}],type:"phone.PhoneCall"},{id:788404002,method:"phone.confirmCall",params:[{name:"peer",type:"InputPhoneCall"},{name:"g_a",type:"bytes"},{name:"key_fingerprint",type:"long"},{name:"protocol",type:"PhoneCallProtocol"}],type:"phone.PhoneCall"},{id:399855457,method:"phone.receivedCall",params:[{name:"peer",type:"InputPhoneCall"}],type:"Bool"},{id:-1295269440,method:"phone.discardCall",params:[{name:"flags",type:"#"},{name:"video",type:"flags.0?true"},{name:"peer",type:"InputPhoneCall"},{name:"duration",type:"int"},{name:"reason",type:"PhoneCallDiscardReason"},{name:"connection_id",type:"long"}],type:"Updates"},{id:1508562471,method:"phone.setCallRating",params:[{name:"flags",type:"#"},{name:"user_initiative",type:"flags.0?true"},{name:"peer",type:"InputPhoneCall"},{name:"rating",type:"int"},{name:"comment",type:"string"}],type:"Updates"},{id:662363518,method:"phone.saveCallDebug",params:[{name:"peer",type:"InputPhoneCall"},{name:"debug",type:"DataJSON"}],type:"Bool"},{id:962554330,method:"upload.getCdnFile",params:[{name:"file_token",type:"bytes"},{name:"offset",type:"long"},{name:"limit",type:"int"}],type:"upload.CdnFile"},{id:-1691921240,method:"upload.reuploadCdnFile",params:[{name:"file_token",type:"bytes"},{name:"request_token",type:"bytes"}],type:"Vector<FileHash>"},{id:1375900482,method:"help.getCdnConfig",params:[],type:"CdnConfig"},{id:-219008246,method:"langpack.getLangPack",params:[{name:"lang_pack",type:"string"},{name:"lang_code",type:"string"}],type:"LangPackDifference"},{id:-269862909,method:"langpack.getStrings",params:[{name:"lang_pack",type:"string"},{name:"lang_code",type:"string"},{name:"keys",type:"Vector<string>"}],type:"Vector<LangPackString>"},{id:-845657435,method:"langpack.getDifference",params:[{name:"lang_pack",type:"string"},{name:"lang_code",type:"string"},{name:"from_version",type:"int"}],type:"LangPackDifference"},{id:1120311183,method:"langpack.getLanguages",params:[{name:"lang_pack",type:"string"}],type:"Vector<LangPackLanguage>"},{id:-1763259007,method:"channels.editBanned",params:[{name:"channel",type:"InputChannel"},{name:"participant",type:"InputPeer"},{name:"banned_rights",type:"ChatBannedRights"}],type:"Updates"},{id:870184064,method:"channels.getAdminLog",params:[{name:"flags",type:"#"},{name:"channel",type:"InputChannel"},{name:"q",type:"string"},{name:"events_filter",type:"flags.0?ChannelAdminLogEventsFilter"},{name:"admins",type:"flags.1?Vector<InputUser>"},{name:"max_id",type:"long"},{name:"min_id",type:"long"},{name:"limit",type:"int"}],type:"channels.AdminLogResults"},{id:-1847836879,method:"upload.getCdnFileHashes",params:[{name:"file_token",type:"bytes"},{name:"offset",type:"long"}],type:"Vector<FileHash>"},{id:-914493408,method:"messages.sendScreenshotNotification",params:[{name:"peer",type:"InputPeer"},{name:"reply_to_msg_id",type:"int"},{name:"random_id",type:"long"}],type:"Updates"},{id:-359881479,method:"channels.setStickers",params:[{name:"channel",type:"InputChannel"},{name:"stickerset",type:"InputStickerSet"}],type:"Bool"},{id:82946729,method:"messages.getFavedStickers",params:[{name:"hash",type:"long"}],type:"messages.FavedStickers"},{id:-1174420133,method:"messages.faveSticker",params:[{name:"id",type:"InputDocument"},{name:"unfave",type:"Bool"}],type:"Bool"},{id:-357180360,method:"channels.readMessageContents",params:[{name:"channel",type:"InputChannel"},{name:"id",type:"Vector<int>"}],type:"Bool"},{id:-2020263951,method:"contacts.resetSaved",params:[],type:"Bool"},{id:-251140208,method:"messages.getUnreadMentions",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"},{name:"offset_id",type:"int"},{name:"add_offset",type:"int"},{name:"limit",type:"int"},{name:"max_id",type:"int"},{name:"min_id",type:"int"}],type:"messages.Messages"},{id:-1683319225,method:"channels.deleteHistory",params:[{name:"flags",type:"#"},{name:"for_everyone",type:"flags.0?true"},{name:"channel",type:"InputChannel"},{name:"max_id",type:"int"}],type:"Updates"},{id:1036054804,method:"help.getRecentMeUrls",params:[{name:"referer",type:"string"}],type:"help.RecentMeUrls"},{id:-356796084,method:"channels.togglePreHistoryHidden",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:921026381,method:"messages.readMentions",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"}],type:"messages.AffectedHistory"},{id:1881817312,method:"messages.getRecentLocations",params:[{name:"peer",type:"InputPeer"},{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"messages.Messages"},{id:-1225713124,method:"messages.sendMultiMedia",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.5?true"},{name:"background",type:"flags.6?true"},{name:"clear_draft",type:"flags.7?true"},{name:"noforwards",type:"flags.14?true"},{name:"update_stickersets_order",type:"flags.15?true"},{name:"peer",type:"InputPeer"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.9?int"},{name:"multi_media",type:"Vector<InputSingleMedia>"},{name:"schedule_date",type:"flags.10?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"Updates"},{id:1347929239,method:"messages.uploadEncryptedFile",params:[{name:"peer",type:"InputEncryptedChat"},{name:"file",type:"InputEncryptedFile"}],type:"EncryptedFile"},{id:405695855,method:"account.getWebAuthorizations",params:[],type:"account.WebAuthorizations"},{id:755087855,method:"account.resetWebAuthorization",params:[{name:"hash",type:"long"}],type:"Bool"},{id:1747789204,method:"account.resetWebAuthorizations",params:[],type:"Bool"},{id:896555914,method:"messages.searchStickerSets",params:[{name:"flags",type:"#"},{name:"exclude_featured",type:"flags.0?true"},{name:"q",type:"string"},{name:"hash",type:"long"}],type:"messages.FoundStickerSets"},{id:-1856595926,method:"upload.getFileHashes",params:[{name:"location",type:"InputFileLocation"},{name:"offset",type:"long"}],type:"Vector<FileHash>"},{id:749019089,method:"help.getTermsOfServiceUpdate",params:[],type:"help.TermsOfServiceUpdate"},{id:-294455398,method:"help.acceptTermsOfService",params:[{name:"id",type:"DataJSON"}],type:"Bool"},{id:-1299661699,method:"account.getAllSecureValues",params:[],type:"Vector<SecureValue>"},{id:1936088002,method:"account.getSecureValue",params:[{name:"types",type:"Vector<SecureValueType>"}],type:"Vector<SecureValue>"},{id:-1986010339,method:"account.saveSecureValue",params:[{name:"value",type:"InputSecureValue"},{name:"secure_secret_id",type:"long"}],type:"SecureValue"},{id:-1199522741,method:"account.deleteSecureValue",params:[{name:"types",type:"Vector<SecureValueType>"}],type:"Bool"},{id:-1865902923,method:"users.setSecureValueErrors",params:[{name:"id",type:"InputUser"},{name:"errors",type:"Vector<SecureValueError>"}],type:"Bool"},{id:-1456907910,method:"account.getAuthorizationForm",params:[{name:"bot_id",type:"long"},{name:"scope",type:"string"},{name:"public_key",type:"string"}],type:"account.AuthorizationForm"},{id:-202552205,method:"account.acceptAuthorization",params:[{name:"bot_id",type:"long"},{name:"scope",type:"string"},{name:"public_key",type:"string"},{name:"value_hashes",type:"Vector<SecureValueHash>"},{name:"credentials",type:"SecureCredentialsEncrypted"}],type:"Bool"},{id:-1516022023,method:"account.sendVerifyPhoneCode",params:[{name:"phone_number",type:"string"},{name:"settings",type:"CodeSettings"}],type:"auth.SentCode"},{id:1305716726,method:"account.verifyPhone",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"phone_code",type:"string"}],type:"Bool"},{id:-1730136133,method:"account.sendVerifyEmailCode",params:[{name:"purpose",type:"EmailVerifyPurpose"},{name:"email",type:"string"}],type:"account.SentEmailCode"},{id:53322959,method:"account.verifyEmail",params:[{name:"purpose",type:"EmailVerifyPurpose"},{name:"verification",type:"EmailVerification"}],type:"account.EmailVerified"},{id:1072547679,method:"help.getDeepLinkInfo",params:[{name:"path",type:"string"}],type:"help.DeepLinkInfo"},{id:-2098076769,method:"contacts.getSaved",params:[],type:"Vector<SavedContact>"},{id:-2092831552,method:"channels.getLeftChannels",params:[{name:"offset",type:"int"}],type:"messages.Chats"},{id:-1896617296,method:"account.initTakeoutSession",params:[{name:"flags",type:"#"},{name:"contacts",type:"flags.0?true"},{name:"message_users",type:"flags.1?true"},{name:"message_chats",type:"flags.2?true"},{name:"message_megagroups",type:"flags.3?true"},{name:"message_channels",type:"flags.4?true"},{name:"files",type:"flags.5?true"},{name:"file_max_size",type:"flags.5?long"}],type:"account.Takeout"},{id:489050862,method:"account.finishTakeoutSession",params:[{name:"flags",type:"#"},{name:"success",type:"flags.0?true"}],type:"Bool"},{id:486505992,method:"messages.getSplitRanges",params:[],type:"Vector<MessageRange>"},{id:911373810,method:"invokeWithMessagesRange",params:[{name:"range",type:"MessageRange"},{name:"query",type:"!X"}],type:"X"},{id:-1398145746,method:"invokeWithTakeout",params:[{name:"takeout_id",type:"long"},{name:"query",type:"!X"}],type:"X"},{id:-1031349873,method:"messages.markDialogUnread",params:[{name:"flags",type:"#"},{name:"unread",type:"flags.0?true"},{name:"peer",type:"InputDialogPeer"}],type:"Bool"},{id:585256482,method:"messages.getDialogUnreadMarks",params:[],type:"Vector<DialogPeer>"},{id:-2062238246,method:"contacts.toggleTopPeers",params:[{name:"enabled",type:"Bool"}],type:"Bool"},{id:2119757468,method:"messages.clearAllDrafts",params:[],type:"Bool"},{id:1642330196,method:"help.getAppConfig",params:[{name:"hash",type:"int"}],type:"help.AppConfig"},{id:1862465352,method:"help.saveAppLog",params:[{name:"events",type:"Vector<InputAppEvent>"}],type:"Bool"},{id:-966677240,method:"help.getPassportConfig",params:[{name:"hash",type:"int"}],type:"help.PassportConfig"},{id:1784243458,method:"langpack.getLanguage",params:[{name:"lang_pack",type:"string"},{name:"lang_code",type:"string"}],type:"LangPackLanguage"},{id:-760547348,method:"messages.updatePinnedMessage",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.0?true"},{name:"unpin",type:"flags.1?true"},{name:"pm_oneside",type:"flags.2?true"},{name:"peer",type:"InputPeer"},{name:"id",type:"int"}],type:"Updates"},{id:-1881204448,method:"account.confirmPasswordEmail",params:[{name:"code",type:"string"}],type:"Bool"},{id:2055154197,method:"account.resendPasswordEmail",params:[],type:"Bool"},{id:-1043606090,method:"account.cancelPasswordEmail",params:[],type:"Bool"},{id:-748624084,method:"help.getSupportName",params:[],type:"help.SupportName"},{id:59377875,method:"help.getUserInfo",params:[{name:"user_id",type:"InputUser"}],type:"help.UserInfo"},{id:1723407216,method:"help.editUserInfo",params:[{name:"user_id",type:"InputUser"},{name:"message",type:"string"},{name:"entities",type:"Vector<MessageEntity>"}],type:"help.UserInfo"},{id:-1626880216,method:"account.getContactSignUpNotification",params:[],type:"Bool"},{id:-806076575,method:"account.setContactSignUpNotification",params:[{name:"silent",type:"Bool"}],type:"Bool"},{id:1398240377,method:"account.getNotifyExceptions",params:[{name:"flags",type:"#"},{name:"compare_sound",type:"flags.1?true"},{name:"peer",type:"flags.0?InputNotifyPeer"}],type:"Updates"},{id:283795844,method:"messages.sendVote",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"options",type:"Vector<bytes>"}],type:"Updates"},{id:1941660731,method:"messages.getPollResults",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"}],type:"Updates"},{id:1848369232,method:"messages.getOnlines",params:[{name:"peer",type:"InputPeer"}],type:"ChatOnlines"},{id:-554301545,method:"messages.editChatAbout",params:[{name:"peer",type:"InputPeer"},{name:"about",type:"string"}],type:"Bool"},{id:-1517917375,method:"messages.editChatDefaultBannedRights",params:[{name:"peer",type:"InputPeer"},{name:"banned_rights",type:"ChatBannedRights"}],type:"Updates"},{id:-57811990,method:"account.getWallPaper",params:[{name:"wallpaper",type:"InputWallPaper"}],type:"WallPaper"},{id:-578472351,method:"account.uploadWallPaper",params:[{name:"file",type:"InputFile"},{name:"mime_type",type:"string"},{name:"settings",type:"WallPaperSettings"}],type:"WallPaper"},{id:1817860919,method:"account.saveWallPaper",params:[{name:"wallpaper",type:"InputWallPaper"},{name:"unsave",type:"Bool"},{name:"settings",type:"WallPaperSettings"}],type:"Bool"},{id:-18000023,method:"account.installWallPaper",params:[{name:"wallpaper",type:"InputWallPaper"},{name:"settings",type:"WallPaperSettings"}],type:"Bool"},{id:-1153722364,method:"account.resetWallPapers",params:[],type:"Bool"},{id:1457130303,method:"account.getAutoDownloadSettings",params:[],type:"account.AutoDownloadSettings"},{id:1995661875,method:"account.saveAutoDownloadSettings",params:[{name:"flags",type:"#"},{name:"low",type:"flags.0?true"},{name:"high",type:"flags.1?true"},{name:"settings",type:"AutoDownloadSettings"}],type:"Bool"},{id:899735650,method:"messages.getEmojiKeywords",params:[{name:"lang_code",type:"string"}],type:"EmojiKeywordsDifference"},{id:352892591,method:"messages.getEmojiKeywordsDifference",params:[{name:"lang_code",type:"string"},{name:"from_version",type:"int"}],type:"EmojiKeywordsDifference"},{id:1318675378,method:"messages.getEmojiKeywordsLanguages",params:[{name:"lang_codes",type:"Vector<string>"}],type:"Vector<EmojiLanguage>"},{id:-709817306,method:"messages.getEmojiURL",params:[{name:"lang_code",type:"string"}],type:"EmojiURL"},{id:1749536939,method:"folders.editPeerFolders",params:[{name:"folder_peers",type:"Vector<InputFolderPeer>"}],type:"Updates"},{id:472471681,method:"folders.deleteFolder",params:[{name:"folder_id",type:"int"}],type:"Updates"},{id:11435201,method:"messages.getSearchCounters",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"},{name:"filters",type:"Vector<MessagesFilter>"}],type:"Vector<messages.SearchCounter>"},{id:-170208392,method:"channels.getGroupsForDiscussion",params:[],type:"messages.Chats"},{id:1079520178,method:"channels.setDiscussionGroup",params:[{name:"broadcast",type:"InputChannel"},{name:"group",type:"InputChannel"}],type:"Bool"},{id:428848198,method:"messages.requestUrlAuth",params:[{name:"flags",type:"#"},{name:"peer",type:"flags.1?InputPeer"},{name:"msg_id",type:"flags.1?int"},{name:"button_id",type:"flags.1?int"},{name:"url",type:"flags.2?string"}],type:"UrlAuthResult"},{id:-1322487515,method:"messages.acceptUrlAuth",params:[{name:"flags",type:"#"},{name:"write_allowed",type:"flags.0?true"},{name:"peer",type:"flags.1?InputPeer"},{name:"msg_id",type:"flags.1?int"},{name:"button_id",type:"flags.1?int"},{name:"url",type:"flags.2?string"}],type:"UrlAuthResult"},{id:1336717624,method:"messages.hidePeerSettingsBar",params:[{name:"peer",type:"InputPeer"}],type:"Bool"},{id:-386636848,method:"contacts.addContact",params:[{name:"flags",type:"#"},{name:"add_phone_privacy_exception",type:"flags.0?true"},{name:"id",type:"InputUser"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"phone",type:"string"}],type:"Updates"},{id:-130964977,method:"contacts.acceptContact",params:[{name:"id",type:"InputUser"}],type:"Updates"},{id:-1892102881,method:"channels.editCreator",params:[{name:"channel",type:"InputChannel"},{name:"user_id",type:"InputUser"},{name:"password",type:"InputCheckPasswordSRP"}],type:"Updates"},{id:-750207932,method:"contacts.getLocated",params:[{name:"flags",type:"#"},{name:"background",type:"flags.1?true"},{name:"geo_point",type:"InputGeoPoint"},{name:"self_expires",type:"flags.0?int"}],type:"Updates"},{id:1491484525,method:"channels.editLocation",params:[{name:"channel",type:"InputChannel"},{name:"geo_point",type:"InputGeoPoint"},{name:"address",type:"string"}],type:"Bool"},{id:-304832784,method:"channels.toggleSlowMode",params:[{name:"channel",type:"InputChannel"},{name:"seconds",type:"int"}],type:"Updates"},{id:-183077365,method:"messages.getScheduledHistory",params:[{name:"peer",type:"InputPeer"},{name:"hash",type:"long"}],type:"messages.Messages"},{id:-1111817116,method:"messages.getScheduledMessages",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"messages.Messages"},{id:-1120369398,method:"messages.sendScheduledMessages",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"Updates"},{id:1504586518,method:"messages.deleteScheduledMessages",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"Updates"},{id:473805619,method:"account.uploadTheme",params:[{name:"flags",type:"#"},{name:"file",type:"InputFile"},{name:"thumb",type:"flags.0?InputFile"},{name:"file_name",type:"string"},{name:"mime_type",type:"string"}],type:"Document"},{id:1697530880,method:"account.createTheme",params:[{name:"flags",type:"#"},{name:"slug",type:"string"},{name:"title",type:"string"},{name:"document",type:"flags.2?InputDocument"},{name:"settings",type:"flags.3?Vector<InputThemeSettings>"}],type:"Theme"},{id:737414348,method:"account.updateTheme",params:[{name:"flags",type:"#"},{name:"format",type:"string"},{name:"theme",type:"InputTheme"},{name:"slug",type:"flags.0?string"},{name:"title",type:"flags.1?string"},{name:"document",type:"flags.2?InputDocument"},{name:"settings",type:"flags.3?Vector<InputThemeSettings>"}],type:"Theme"},{id:-229175188,method:"account.saveTheme",params:[{name:"theme",type:"InputTheme"},{name:"unsave",type:"Bool"}],type:"Bool"},{id:-953697477,method:"account.installTheme",params:[{name:"flags",type:"#"},{name:"dark",type:"flags.0?true"},{name:"theme",type:"flags.1?InputTheme"},{name:"format",type:"flags.2?string"},{name:"base_theme",type:"flags.3?BaseTheme"}],type:"Bool"},{id:978872812,method:"account.getTheme",params:[{name:"format",type:"string"},{name:"theme",type:"InputTheme"}],type:"Theme"},{id:1913054296,method:"account.getThemes",params:[{name:"format",type:"string"},{name:"hash",type:"long"}],type:"account.Themes"},{id:-1210022402,method:"auth.exportLoginToken",params:[{name:"api_id",type:"int"},{name:"api_hash",type:"string"},{name:"except_ids",type:"Vector<long>"}],type:"auth.LoginToken"},{id:-1783866140,method:"auth.importLoginToken",params:[{name:"token",type:"bytes"}],type:"auth.LoginToken"},{id:-392909491,method:"auth.acceptLoginToken",params:[{name:"token",type:"bytes"}],type:"Authorization"},{id:-1250643605,method:"account.setContentSettings",params:[{name:"flags",type:"#"},{name:"sensitive_enabled",type:"flags.0?true"}],type:"Bool"},{id:-1952756306,method:"account.getContentSettings",params:[],type:"account.ContentSettings"},{id:300429806,method:"channels.getInactiveChannels",params:[],type:"messages.InactiveChats"},{id:1705865692,method:"account.getMultiWallPapers",params:[{name:"wallpapers",type:"Vector<InputWallPaper>"}],type:"Vector<WallPaper>"},{id:-1200736242,method:"messages.getPollVotes",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"option",type:"flags.0?bytes"},{name:"offset",type:"flags.1?string"},{name:"limit",type:"int"}],type:"messages.VotesList"},{id:-1257951254,method:"messages.toggleStickerSets",params:[{name:"flags",type:"#"},{name:"uninstall",type:"flags.0?true"},{name:"archive",type:"flags.1?true"},{name:"unarchive",type:"flags.2?true"},{name:"stickersets",type:"Vector<InputStickerSet>"}],type:"Bool"},{id:779736953,method:"payments.getBankCardData",params:[{name:"number",type:"string"}],type:"payments.BankCardData"},{id:-241247891,method:"messages.getDialogFilters",params:[],type:"Vector<DialogFilter>"},{id:-1566780372,method:"messages.getSuggestedDialogFilters",params:[],type:"Vector<DialogFilterSuggested>"},{id:450142282,method:"messages.updateDialogFilter",params:[{name:"flags",type:"#"},{name:"id",type:"int"},{name:"filter",type:"flags.0?DialogFilter"}],type:"Bool"},{id:-983318044,method:"messages.updateDialogFiltersOrder",params:[{name:"order",type:"Vector<int>"}],type:"Bool"},{id:-1421720550,method:"stats.getBroadcastStats",params:[{name:"flags",type:"#"},{name:"dark",type:"flags.0?true"},{name:"channel",type:"InputChannel"}],type:"stats.BroadcastStats"},{id:1646092192,method:"stats.loadAsyncGraph",params:[{name:"flags",type:"#"},{name:"token",type:"string"},{name:"x",type:"flags.0?long"}],type:"StatsGraph"},{id:-1486204014,method:"stickers.setStickerSetThumb",params:[{name:"flags",type:"#"},{name:"stickerset",type:"InputStickerSet"},{name:"thumb",type:"flags.0?InputDocument"},{name:"thumb_document_id",type:"flags.1?long"}],type:"messages.StickerSet"},{id:85399130,method:"bots.setBotCommands",params:[{name:"scope",type:"BotCommandScope"},{name:"lang_code",type:"string"},{name:"commands",type:"Vector<BotCommand>"}],type:"Bool"},{id:2127598753,method:"messages.getOldFeaturedStickers",params:[{name:"offset",type:"int"},{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"messages.FeaturedStickers"},{id:-1063816159,method:"help.getPromoData",params:[],type:"help.PromoData"},{id:505748629,method:"help.hidePromoData",params:[{name:"peer",type:"InputPeer"}],type:"Bool"},{id:-8744061,method:"phone.sendSignalingData",params:[{name:"peer",type:"InputPhoneCall"},{name:"data",type:"bytes"}],type:"Bool"},{id:-589330937,method:"stats.getMegagroupStats",params:[{name:"flags",type:"#"},{name:"dark",type:"flags.0?true"},{name:"channel",type:"InputChannel"}],type:"stats.MegagroupStats"},{id:-349483786,method:"account.getGlobalPrivacySettings",params:[],type:"GlobalPrivacySettings"},{id:517647042,method:"account.setGlobalPrivacySettings",params:[{name:"settings",type:"GlobalPrivacySettings"}],type:"GlobalPrivacySettings"},{id:-183649631,method:"help.dismissSuggestion",params:[{name:"peer",type:"InputPeer"},{name:"suggestion",type:"string"}],type:"Bool"},{id:1935116200,method:"help.getCountriesList",params:[{name:"lang_code",type:"string"},{name:"hash",type:"int"}],type:"help.CountriesList"},{id:584962828,method:"messages.getReplies",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"offset_id",type:"int"},{name:"offset_date",type:"int"},{name:"add_offset",type:"int"},{name:"limit",type:"int"},{name:"max_id",type:"int"},{name:"min_id",type:"int"},{name:"hash",type:"long"}],type:"messages.Messages"},{id:1147761405,method:"messages.getDiscussionMessage",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"}],type:"messages.DiscussionMessage"},{id:-147740172,method:"messages.readDiscussion",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"read_max_id",type:"int"}],type:"Bool"},{id:698914348,method:"contacts.blockFromReplies",params:[{name:"flags",type:"#"},{name:"delete_message",type:"flags.0?true"},{name:"delete_history",type:"flags.1?true"},{name:"report_spam",type:"flags.2?true"},{name:"msg_id",type:"int"}],type:"Updates"},{id:1445996571,method:"stats.getMessagePublicForwards",params:[{name:"channel",type:"InputChannel"},{name:"msg_id",type:"int"},{name:"offset_rate",type:"int"},{name:"offset_peer",type:"InputPeer"},{name:"offset_id",type:"int"},{name:"limit",type:"int"}],type:"messages.Messages"},{id:-1226791947,method:"stats.getMessageStats",params:[{name:"flags",type:"#"},{name:"dark",type:"flags.0?true"},{name:"channel",type:"InputChannel"},{name:"msg_id",type:"int"}],type:"stats.MessageStats"},{id:-299714136,method:"messages.unpinAllMessages",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"}],type:"messages.AffectedHistory"},{id:1221445336,method:"phone.createGroupCall",params:[{name:"flags",type:"#"},{name:"rtmp_stream",type:"flags.2?true"},{name:"peer",type:"InputPeer"},{name:"random_id",type:"int"},{name:"title",type:"flags.0?string"},{name:"schedule_date",type:"flags.1?int"}],type:"Updates"},{id:-1322057861,method:"phone.joinGroupCall",params:[{name:"flags",type:"#"},{name:"muted",type:"flags.0?true"},{name:"video_stopped",type:"flags.2?true"},{name:"call",type:"InputGroupCall"},{name:"join_as",type:"InputPeer"},{name:"invite_hash",type:"flags.1?string"},{name:"params",type:"DataJSON"}],type:"Updates"},{id:1342404601,method:"phone.leaveGroupCall",params:[{name:"call",type:"InputGroupCall"},{name:"source",type:"int"}],type:"Updates"},{id:2067345760,method:"phone.inviteToGroupCall",params:[{name:"call",type:"InputGroupCall"},{name:"users",type:"Vector<InputUser>"}],type:"Updates"},{id:2054648117,method:"phone.discardGroupCall",params:[{name:"call",type:"InputGroupCall"}],type:"Updates"},{id:1958458429,method:"phone.toggleGroupCallSettings",params:[{name:"flags",type:"#"},{name:"reset_invite_hash",type:"flags.1?true"},{name:"call",type:"InputGroupCall"},{name:"join_muted",type:"flags.0?Bool"}],type:"Updates"},{id:68699611,method:"phone.getGroupCall",params:[{name:"call",type:"InputGroupCall"},{name:"limit",type:"int"}],type:"phone.GroupCall"},{id:-984033109,method:"phone.getGroupParticipants",params:[{name:"call",type:"InputGroupCall"},{name:"ids",type:"Vector<InputPeer>"},{name:"sources",type:"Vector<int>"},{name:"offset",type:"string"},{name:"limit",type:"int"}],type:"phone.GroupParticipants"},{id:-1248003721,method:"phone.checkGroupCall",params:[{name:"call",type:"InputGroupCall"},{name:"sources",type:"Vector<int>"}],type:"Vector<int>"},{id:1540419152,method:"messages.deleteChat",params:[{name:"chat_id",type:"long"}],type:"Bool"},{id:-104078327,method:"messages.deletePhoneCallHistory",params:[{name:"flags",type:"#"},{name:"revoke",type:"flags.0?true"}],type:"messages.AffectedFoundMessages"},{id:1140726259,method:"messages.checkHistoryImport",params:[{name:"import_head",type:"string"}],type:"messages.HistoryImportParsed"},{id:873008187,method:"messages.initHistoryImport",params:[{name:"peer",type:"InputPeer"},{name:"file",type:"InputFile"},{name:"media_count",type:"int"}],type:"messages.HistoryImport"},{id:713433234,method:"messages.uploadImportedMedia",params:[{name:"peer",type:"InputPeer"},{name:"import_id",type:"long"},{name:"file_name",type:"string"},{name:"media",type:"InputMedia"}],type:"MessageMedia"},{id:-1271008444,method:"messages.startHistoryImport",params:[{name:"peer",type:"InputPeer"},{name:"import_id",type:"long"}],type:"Bool"},{id:-1565154314,method:"messages.getExportedChatInvites",params:[{name:"flags",type:"#"},{name:"revoked",type:"flags.3?true"},{name:"peer",type:"InputPeer"},{name:"admin_id",type:"InputUser"},{name:"offset_date",type:"flags.2?int"},{name:"offset_link",type:"flags.2?string"},{name:"limit",type:"int"}],type:"messages.ExportedChatInvites"},{id:1937010524,method:"messages.getExportedChatInvite",params:[{name:"peer",type:"InputPeer"},{name:"link",type:"string"}],type:"messages.ExportedChatInvite"},{id:-1110823051,method:"messages.editExportedChatInvite",params:[{name:"flags",type:"#"},{name:"revoked",type:"flags.2?true"},{name:"peer",type:"InputPeer"},{name:"link",type:"string"},{name:"expire_date",type:"flags.0?int"},{name:"usage_limit",type:"flags.1?int"},{name:"request_needed",type:"flags.3?Bool"},{name:"title",type:"flags.4?string"}],type:"messages.ExportedChatInvite"},{id:1452833749,method:"messages.deleteRevokedExportedChatInvites",params:[{name:"peer",type:"InputPeer"},{name:"admin_id",type:"InputUser"}],type:"Bool"},{id:-731601877,method:"messages.deleteExportedChatInvite",params:[{name:"peer",type:"InputPeer"},{name:"link",type:"string"}],type:"Bool"},{id:958457583,method:"messages.getAdminsWithInvites",params:[{name:"peer",type:"InputPeer"}],type:"messages.ChatAdminsWithInvites"},{id:-553329330,method:"messages.getChatInviteImporters",params:[{name:"flags",type:"#"},{name:"requested",type:"flags.0?true"},{name:"peer",type:"InputPeer"},{name:"link",type:"flags.1?string"},{name:"q",type:"flags.2?string"},{name:"offset_date",type:"int"},{name:"offset_user",type:"InputUser"},{name:"limit",type:"int"}],type:"messages.ChatInviteImporters"},{id:-1207017500,method:"messages.setHistoryTTL",params:[{name:"peer",type:"InputPeer"},{name:"period",type:"int"}],type:"Updates"},{id:-91437323,method:"account.reportProfilePhoto",params:[{name:"peer",type:"InputPeer"},{name:"photo_id",type:"InputPhoto"},{name:"reason",type:"ReportReason"},{name:"message",type:"string"}],type:"Bool"},{id:187239529,method:"channels.convertToGigagroup",params:[{name:"channel",type:"InputChannel"}],type:"Updates"},{id:1573261059,method:"messages.checkHistoryImportPeer",params:[{name:"peer",type:"InputPeer"}],type:"messages.CheckedHistoryImportPeer"},{id:-248985848,method:"phone.toggleGroupCallRecord",params:[{name:"flags",type:"#"},{name:"start",type:"flags.0?true"},{name:"video",type:"flags.2?true"},{name:"call",type:"InputGroupCall"},{name:"title",type:"flags.1?string"},{name:"video_portrait",type:"flags.2?Bool"}],type:"Updates"},{id:-1524155713,method:"phone.editGroupCallParticipant",params:[{name:"flags",type:"#"},{name:"call",type:"InputGroupCall"},{name:"participant",type:"InputPeer"},{name:"muted",type:"flags.0?Bool"},{name:"volume",type:"flags.1?int"},{name:"raise_hand",type:"flags.2?Bool"},{name:"video_stopped",type:"flags.3?Bool"},{name:"video_paused",type:"flags.4?Bool"},{name:"presentation_paused",type:"flags.5?Bool"}],type:"Updates"},{id:480685066,method:"phone.editGroupCallTitle",params:[{name:"call",type:"InputGroupCall"},{name:"title",type:"string"}],type:"Updates"},{id:-277077702,method:"phone.getGroupCallJoinAs",params:[{name:"peer",type:"InputPeer"}],type:"phone.JoinAsPeers"},{id:-425040769,method:"phone.exportGroupCallInvite",params:[{name:"flags",type:"#"},{name:"can_self_unmute",type:"flags.0?true"},{name:"call",type:"InputGroupCall"}],type:"phone.ExportedGroupCallInvite"},{id:563885286,method:"phone.toggleGroupCallStartSubscription",params:[{name:"call",type:"InputGroupCall"},{name:"subscribed",type:"Bool"}],type:"Updates"},{id:1451287362,method:"phone.startScheduledGroupCall",params:[{name:"call",type:"InputGroupCall"}],type:"Updates"},{id:1465786252,method:"phone.saveDefaultGroupCallJoinAs",params:[{name:"peer",type:"InputPeer"},{name:"join_as",type:"InputPeer"}],type:"Bool"},{id:-873829436,method:"phone.joinGroupCallPresentation",params:[{name:"call",type:"InputGroupCall"},{name:"params",type:"DataJSON"}],type:"Updates"},{id:475058500,method:"phone.leaveGroupCallPresentation",params:[{name:"call",type:"InputGroupCall"}],type:"Updates"},{id:676017721,method:"stickers.checkShortName",params:[{name:"short_name",type:"string"}],type:"Bool"},{id:1303364867,method:"stickers.suggestShortName",params:[{name:"title",type:"string"}],type:"stickers.SuggestedShortName"},{id:1032708345,method:"bots.resetBotCommands",params:[{name:"scope",type:"BotCommandScope"},{name:"lang_code",type:"string"}],type:"Bool"},{id:-481554986,method:"bots.getBotCommands",params:[{name:"scope",type:"BotCommandScope"},{name:"lang_code",type:"string"}],type:"Vector<BotCommand>"},{id:-1828139493,method:"account.resetPassword",params:[],type:"account.ResetPasswordResult"},{id:1284770294,method:"account.declinePasswordReset",params:[],type:"Bool"},{id:221691769,method:"auth.checkRecoveryPassword",params:[{name:"code",type:"string"}],type:"Bool"},{id:-700916087,method:"account.getChatThemes",params:[{name:"hash",type:"long"}],type:"account.Themes"},{id:-432283329,method:"messages.setChatTheme",params:[{name:"peer",type:"InputPeer"},{name:"emoticon",type:"string"}],type:"Updates"},{id:-1095836780,method:"channels.viewSponsoredMessage",params:[{name:"channel",type:"InputChannel"},{name:"random_id",type:"bytes"}],type:"Bool"},{id:-333377601,method:"channels.getSponsoredMessages",params:[{name:"channel",type:"InputChannel"}],type:"messages.SponsoredMessages"},{id:834782287,method:"messages.getMessageReadParticipants",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"}],type:"Vector<ReadParticipantDate>"},{id:1240514025,method:"messages.getSearchResultsCalendar",params:[{name:"peer",type:"InputPeer"},{name:"filter",type:"MessagesFilter"},{name:"offset_id",type:"int"},{name:"offset_date",type:"int"}],type:"messages.SearchResultsCalendar"},{id:1855292323,method:"messages.getSearchResultsPositions",params:[{name:"peer",type:"InputPeer"},{name:"filter",type:"MessagesFilter"},{name:"offset_id",type:"int"},{name:"limit",type:"int"}],type:"messages.SearchResultsPositions"},{id:2145904661,method:"messages.hideChatJoinRequest",params:[{name:"flags",type:"#"},{name:"approved",type:"flags.0?true"},{name:"peer",type:"InputPeer"},{name:"user_id",type:"InputUser"}],type:"Updates"},{id:-528091926,method:"messages.hideAllChatJoinRequests",params:[{name:"flags",type:"#"},{name:"approved",type:"flags.0?true"},{name:"peer",type:"InputPeer"},{name:"link",type:"flags.1?string"}],type:"Updates"},{id:-1323389022,method:"messages.toggleNoForwards",params:[{name:"peer",type:"InputPeer"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:-855777386,method:"messages.saveDefaultSendAs",params:[{name:"peer",type:"InputPeer"},{name:"send_as",type:"InputPeer"}],type:"Bool"},{id:231174382,method:"channels.getSendAs",params:[{name:"peer",type:"InputPeer"}],type:"channels.SendAsPeers"},{id:-1081501024,method:"account.setAuthorizationTTL",params:[{name:"authorization_ttl_days",type:"int"}],type:"Bool"},{id:1089766498,method:"account.changeAuthorizationSettings",params:[{name:"flags",type:"#"},{name:"hash",type:"long"},{name:"encrypted_requests_disabled",type:"flags.0?Bool"},{name:"call_requests_disabled",type:"flags.1?Bool"}],type:"Bool"},{id:913655003,method:"channels.deleteParticipantHistory",params:[{name:"channel",type:"InputChannel"},{name:"participant",type:"InputPeer"}],type:"messages.AffectedHistory"},{id:-754091820,method:"messages.sendReaction",params:[{name:"flags",type:"#"},{name:"big",type:"flags.1?true"},{name:"add_to_recent",type:"flags.2?true"},{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"reaction",type:"flags.0?Vector<Reaction>"}],type:"Updates"},{id:-1950707482,method:"messages.getMessagesReactions",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"Updates"},{id:1176190792,method:"messages.getMessageReactionsList",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"reaction",type:"flags.0?Reaction"},{name:"offset",type:"flags.1?string"},{name:"limit",type:"int"}],type:"messages.MessageReactionsList"},{id:-21928079,method:"messages.setChatAvailableReactions",params:[{name:"peer",type:"InputPeer"},{name:"available_reactions",type:"ChatReactions"}],type:"Updates"},{id:417243308,method:"messages.getAvailableReactions",params:[{name:"hash",type:"int"}],type:"messages.AvailableReactions"},{id:1330094102,method:"messages.setDefaultReaction",params:[{name:"reaction",type:"Reaction"}],type:"Bool"},{id:1662529584,method:"messages.translateText",params:[{name:"flags",type:"#"},{name:"peer",type:"flags.0?InputPeer"},{name:"id",type:"flags.0?Vector<int>"},{name:"text",type:"flags.1?Vector<TextWithEntities>"},{name:"to_lang",type:"string"}],type:"messages.TranslatedText"},{id:841173339,method:"messages.getUnreadReactions",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"},{name:"offset_id",type:"int"},{name:"add_offset",type:"int"},{name:"limit",type:"int"},{name:"max_id",type:"int"},{name:"min_id",type:"int"}],type:"messages.Messages"},{id:1420459918,method:"messages.readReactions",params:[{name:"flags",type:"#"},{name:"peer",type:"InputPeer"},{name:"top_msg_id",type:"flags.0?int"}],type:"messages.AffectedHistory"},{id:-1963375804,method:"contacts.resolvePhone",params:[{name:"phone",type:"string"}],type:"contacts.ResolvedPeer"},{id:447879488,method:"phone.getGroupCallStreamChannels",params:[{name:"call",type:"InputGroupCall"}],type:"phone.GroupCallStreamChannels"},{id:-558650433,method:"phone.getGroupCallStreamRtmpUrl",params:[{name:"peer",type:"InputPeer"},{name:"revoke",type:"Bool"}],type:"phone.GroupCallStreamRtmpUrl"},{id:276705696,method:"messages.searchSentMedia",params:[{name:"q",type:"string"},{name:"filter",type:"MessagesFilter"},{name:"limit",type:"int"}],type:"messages.Messages"},{id:385663691,method:"messages.getAttachMenuBots",params:[{name:"hash",type:"long"}],type:"AttachMenuBots"},{id:1998676370,method:"messages.getAttachMenuBot",params:[{name:"bot",type:"InputUser"}],type:"AttachMenuBotsBot"},{id:1777704297,method:"messages.toggleBotInAttachMenu",params:[{name:"flags",type:"#"},{name:"write_allowed",type:"flags.0?true"},{name:"bot",type:"InputUser"},{name:"enabled",type:"Bool"}],type:"Bool"},{id:395003915,method:"messages.requestWebView",params:[{name:"flags",type:"#"},{name:"from_bot_menu",type:"flags.4?true"},{name:"silent",type:"flags.5?true"},{name:"peer",type:"InputPeer"},{name:"bot",type:"InputUser"},{name:"url",type:"flags.1?string"},{name:"start_param",type:"flags.3?string"},{name:"theme_params",type:"flags.2?DataJSON"},{name:"platform",type:"string"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.9?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"WebViewResult"},{id:2146648841,method:"messages.prolongWebView",params:[{name:"flags",type:"#"},{name:"silent",type:"flags.5?true"},{name:"peer",type:"InputPeer"},{name:"bot",type:"InputUser"},{name:"query_id",type:"long"},{name:"reply_to_msg_id",type:"flags.0?int"},{name:"top_msg_id",type:"flags.9?int"},{name:"send_as",type:"flags.13?InputPeer"}],type:"Bool"},{id:698084494,method:"messages.requestSimpleWebView",params:[{name:"flags",type:"#"},{name:"from_switch_webview",type:"flags.1?true"},{name:"bot",type:"InputUser"},{name:"url",type:"string"},{name:"theme_params",type:"flags.0?DataJSON"},{name:"platform",type:"string"}],type:"SimpleWebViewResult"},{id:172168437,method:"messages.sendWebViewResultMessage",params:[{name:"bot_query_id",type:"string"},{name:"result",type:"InputBotInlineResult"}],type:"WebViewMessageSent"},{id:-603831608,method:"messages.sendWebViewData",params:[{name:"bot",type:"InputUser"},{name:"random_id",type:"long"},{name:"button_text",type:"string"},{name:"data",type:"string"}],type:"Updates"},{id:1157944655,method:"bots.setBotMenuButton",params:[{name:"user_id",type:"InputUser"},{name:"button",type:"BotMenuButton"}],type:"Bool"},{id:-1671369944,method:"bots.getBotMenuButton",params:[{name:"user_id",type:"InputUser"}],type:"BotMenuButton"},{id:-510647672,method:"account.getSavedRingtones",params:[{name:"hash",type:"long"}],type:"account.SavedRingtones"},{id:1038768899,method:"account.saveRingtone",params:[{name:"id",type:"InputDocument"},{name:"unsave",type:"Bool"}],type:"account.SavedRingtone"},{id:-2095414366,method:"account.uploadRingtone",params:[{name:"file",type:"InputFile"},{name:"file_name",type:"string"},{name:"mime_type",type:"string"}],type:"Document"},{id:2021942497,method:"bots.setBotBroadcastDefaultAdminRights",params:[{name:"admin_rights",type:"ChatAdminRights"}],type:"Bool"},{id:-1839281686,method:"bots.setBotGroupDefaultAdminRights",params:[{name:"admin_rights",type:"ChatAdminRights"}],type:"Bool"},{id:1092913030,method:"phone.saveCallLog",params:[{name:"peer",type:"InputPhoneCall"},{name:"file",type:"InputFile"}],type:"Bool"},{id:-456419968,method:"channels.toggleJoinToSend",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:1277789622,method:"channels.toggleJoinRequest",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:261206117,method:"payments.exportInvoice",params:[{name:"invoice_media",type:"InputMedia"}],type:"payments.ExportedInvoice"},{id:647928393,method:"messages.transcribeAudio",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"}],type:"messages.TranscribedAudio"},{id:2132608815,method:"messages.rateTranscribedAudio",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"transcription_id",type:"long"},{name:"good",type:"Bool"}],type:"Bool"},{id:-2131921795,method:"payments.assignAppStoreTransaction",params:[{name:"receipt",type:"bytes"},{name:"purpose",type:"InputStorePaymentPurpose"}],type:"Updates"},{id:-537046829,method:"payments.assignPlayMarketTransaction",params:[{name:"receipt",type:"DataJSON"},{name:"purpose",type:"InputStorePaymentPurpose"}],type:"Updates"},{id:-1614700874,method:"payments.canPurchasePremium",params:[{name:"purpose",type:"InputStorePaymentPurpose"}],type:"Bool"},{id:-1206152236,method:"help.getPremiumPromo",params:[],type:"help.PremiumPromo"},{id:-643100844,method:"messages.getCustomEmojiDocuments",params:[{name:"document_id",type:"Vector<long>"}],type:"Vector<Document>"},{id:-67329649,method:"messages.getEmojiStickers",params:[{name:"hash",type:"long"}],type:"messages.AllStickers"},{id:248473398,method:"messages.getFeaturedEmojiStickers",params:[{name:"hash",type:"long"}],type:"messages.FeaturedStickers"},{id:-70001045,method:"account.updateEmojiStatus",params:[{name:"emoji_status",type:"EmojiStatus"}],type:"Bool"},{id:-696962170,method:"account.getDefaultEmojiStatuses",params:[{name:"hash",type:"long"}],type:"account.EmojiStatuses"},{id:257392901,method:"account.getRecentEmojiStatuses",params:[{name:"hash",type:"long"}],type:"account.EmojiStatuses"},{id:404757166,method:"account.clearRecentEmojiStatuses",params:[],type:"Bool"},{id:1063567478,method:"messages.reportReaction",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"reaction_peer",type:"InputPeer"}],type:"Bool"},{id:-1149164102,method:"messages.getTopReactions",params:[{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"messages.Reactions"},{id:960896434,method:"messages.getRecentReactions",params:[{name:"limit",type:"int"},{name:"hash",type:"long"}],type:"messages.Reactions"},{id:-1644236876,method:"messages.clearRecentReactions",params:[],type:"Bool"},{id:-2064119788,method:"messages.getExtendedMedia",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"Updates"},{id:767062953,method:"auth.importWebTokenAuthorization",params:[{name:"api_id",type:"int"},{name:"api_hash",type:"string"},{name:"web_auth_token",type:"string"}],type:"auth.Authorization"},{id:-279966037,method:"account.reorderUsernames",params:[{name:"order",type:"Vector<string>"}],type:"Bool"},{id:1490465654,method:"account.toggleUsername",params:[{name:"username",type:"string"},{name:"active",type:"Bool"}],type:"Bool"},{id:-1268978403,method:"channels.reorderUsernames",params:[{name:"channel",type:"InputChannel"},{name:"order",type:"Vector<string>"}],type:"Bool"},{id:1358053637,method:"channels.toggleUsername",params:[{name:"channel",type:"InputChannel"},{name:"username",type:"string"},{name:"active",type:"Bool"}],type:"Bool"},{id:170155475,method:"channels.deactivateAllUsernames",params:[{name:"channel",type:"InputChannel"}],type:"Bool"},{id:-1540781271,method:"channels.toggleForum",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:-200539612,method:"channels.createForumTopic",params:[{name:"flags",type:"#"},{name:"channel",type:"InputChannel"},{name:"title",type:"string"},{name:"icon_color",type:"flags.0?int"},{name:"icon_emoji_id",type:"flags.3?long"},{name:"random_id",type:"long"},{name:"send_as",type:"flags.2?InputPeer"}],type:"Updates"},{id:233136337,method:"channels.getForumTopics",params:[{name:"flags",type:"#"},{name:"channel",type:"InputChannel"},{name:"q",type:"flags.0?string"},{name:"offset_date",type:"int"},{name:"offset_id",type:"int"},{name:"offset_topic",type:"int"},{name:"limit",type:"int"}],type:"messages.ForumTopics"},{id:-1333584199,method:"channels.getForumTopicsByID",params:[{name:"channel",type:"InputChannel"},{name:"topics",type:"Vector<int>"}],type:"messages.ForumTopics"},{id:-186670715,method:"channels.editForumTopic",params:[{name:"flags",type:"#"},{name:"channel",type:"InputChannel"},{name:"topic_id",type:"int"},{name:"title",type:"flags.0?string"},{name:"icon_emoji_id",type:"flags.1?long"},{name:"closed",type:"flags.2?Bool"},{name:"hidden",type:"flags.3?Bool"}],type:"Updates"},{id:1814925350,method:"channels.updatePinnedForumTopic",params:[{name:"channel",type:"InputChannel"},{name:"topic_id",type:"int"},{name:"pinned",type:"Bool"}],type:"Updates"},{id:876830509,method:"channels.deleteTopicHistory",params:[{name:"channel",type:"InputChannel"},{name:"top_msg_id",type:"int"}],type:"messages.AffectedHistory"},{id:693150095,method:"channels.reorderPinnedForumTopics",params:[{name:"flags",type:"#"},{name:"force",type:"flags.0?true"},{name:"channel",type:"InputChannel"},{name:"order",type:"Vector<int>"}],type:"Updates"},{id:1760814315,method:"channels.toggleAntiSpam",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:-1471109485,method:"channels.reportAntiSpamFalsePositive",params:[{name:"channel",type:"InputChannel"},{name:"msg_id",type:"int"}],type:"Bool"},{id:-1632299963,method:"messages.setDefaultHistoryTTL",params:[{name:"period",type:"int"}],type:"Bool"},{id:1703637384,method:"messages.getDefaultHistoryTTL",params:[],type:"DefaultHistoryTTL"},{id:-127582169,method:"contacts.exportContactToken",params:[],type:"ExportedContactToken"},{id:318789512,method:"contacts.importContactToken",params:[{name:"token",type:"string"}],type:"User"},{id:-515093903,method:"photos.uploadContactProfilePhoto",params:[{name:"flags",type:"#"},{name:"suggest",type:"flags.3?true"},{name:"save",type:"flags.4?true"},{name:"user_id",type:"InputUser"},{name:"file",type:"flags.0?InputFile"},{name:"video",type:"flags.1?InputFile"},{name:"video_start_ts",type:"flags.2?double"},{name:"video_emoji_markup",type:"flags.5?VideoSize"}],type:"photos.Photo"},{id:1785624660,method:"channels.toggleParticipantsHidden",params:[{name:"channel",type:"InputChannel"},{name:"enabled",type:"Bool"}],type:"Updates"},{id:-29831141,method:"messages.sendBotRequestedPeer",params:[{name:"peer",type:"InputPeer"},{name:"msg_id",type:"int"},{name:"button_id",type:"int"},{name:"requested_peer",type:"InputPeer"}],type:"Updates"},{id:-495647960,method:"account.getDefaultProfilePhotoEmojis",params:[{name:"hash",type:"long"}],type:"EmojiList"},{id:-1856479058,method:"account.getDefaultGroupPhotoEmojis",params:[{name:"hash",type:"long"}],type:"EmojiList"},{id:-1991881904,method:"auth.requestFirebaseSms",params:[{name:"flags",type:"#"},{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"safety_net_token",type:"flags.0?string"},{name:"ios_push_secret",type:"flags.1?string"}],type:"Bool"},{id:1955122779,method:"messages.getEmojiGroups",params:[{name:"hash",type:"int"}],type:"messages.EmojiGroups"},{id:785209037,method:"messages.getEmojiStatusGroups",params:[{name:"hash",type:"int"}],type:"messages.EmojiGroups"},{id:564480243,method:"messages.getEmojiProfilePhotoGroups",params:[{name:"hash",type:"int"}],type:"messages.EmojiGroups"},{id:739360983,method:"messages.searchCustomEmoji",params:[{name:"emoticon",type:"string"},{name:"hash",type:"long"}],type:"EmojiList"},{id:-461589127,method:"messages.togglePeerTranslations",params:[{name:"flags",type:"#"},{name:"disabled",type:"flags.0?true"},{name:"peer",type:"InputPeer"}],type:"Bool"},{id:-1379156774,method:"account.getAutoSaveSettings",params:[],type:"account.AutoSaveSettings"},{id:-694451359,method:"account.saveAutoSaveSettings",params:[{name:"flags",type:"#"},{name:"users",type:"flags.0?true"},{name:"chats",type:"flags.1?true"},{name:"broadcasts",type:"flags.2?true"},{name:"peer",type:"flags.3?InputPeer"},{name:"settings",type:"AutoSaveSettings"}],type:"Bool"},{id:1404829728,method:"account.deleteAutoSaveExceptions",params:[],type:"Bool"},{id:-179077444,method:"stickers.changeSticker",params:[{name:"flags",type:"#"},{name:"sticker",type:"InputDocument"},{name:"emoji",type:"flags.0?string"},{name:"mask_coords",type:"flags.1?MaskCoords"},{name:"keywords",type:"flags.2?string"}],type:"messages.StickerSet"},{id:306912256,method:"stickers.renameStickerSet",params:[{name:"stickerset",type:"InputStickerSet"},{name:"title",type:"string"}],type:"messages.StickerSet"},{id:-2022685804,method:"stickers.deleteStickerSet",params:[{name:"stickerset",type:"InputStickerSet"}],type:"Bool"},{id:889046467,method:"messages.getBotApp",params:[{name:"app",type:"InputBotApp"},{name:"hash",type:"long"}],type:"messages.BotApp"},{id:-1940243652,method:"messages.requestAppWebView",params:[{name:"flags",type:"#"},{name:"write_allowed",type:"flags.0?true"},{name:"peer",type:"InputPeer"},{name:"app",type:"InputBotApp"},{name:"start_param",type:"flags.1?string"},{name:"theme_params",type:"flags.2?DataJSON"},{name:"platform",type:"string"}],type:"AppWebViewResult"},{id:-1553604742,method:"bots.setBotInfo",params:[{name:"flags",type:"#"},{name:"lang_code",type:"string"},{name:"about",type:"flags.0?string"},{name:"description",type:"flags.1?string"}],type:"Bool"},{id:1978405606,method:"bots.getBotInfo",params:[{name:"lang_code",type:"string"}],type:"Vector<string>"}]},layer:155};var as=a(745),ss=a.n(as),ns=a(4736),is=a.n(ns);function rs(e){return e>>>0}function os(e,t){return e=rs(e),t=rs(t),is()(e).shiftLeft(32).add(is()(t))}const ps=is()(Number.MAX_SAFE_INTEGER),ds=is()(is()[2]).pow(64),fs=ds.divide(is()[2]);function cs(e,t=256){return is().fromArray(e instanceof Uint8Array?[...e]:e,t)}const ls=+ts.API.constructors.find((e=>"boolFalse"===e.predicate)).id,ms=+ts.API.constructors.find((e=>"boolTrue"===e.predicate)).id,gs=+ts.API.constructors.find((e=>"vector"===e.predicate)).id,hs=+ts.MTProto.constructors.find((e=>"gzip_packed"===e.predicate)).id,us="slice";class ys{constructor(e={}){this.maxLength=2048,this.offset=0,this.mtproto=!1,this.debug=!1,this.maxLength=e.startMaxLength||2048,this.mtproto=e.mtproto||!1,this.createBuffer()}createBuffer(){this.buffer=new ArrayBuffer(this.maxLength),this.intView=new Int32Array(this.buffer),this.byteView=new Uint8Array(this.buffer)}getArray(){const e=new ArrayBuffer(this.offset),t=new Int32Array(e);return t.set(this.intView.subarray(0,this.offset/4)),t}getBuffer(){return this.getArray().buffer}getBytes(e=!0){if(e){const e=new ArrayBuffer(this.offset),t=new Uint8Array(e);return t.set(this.byteView.subarray(0,this.offset)),t}const t=new Array(this.offset);for(let e=0;e<this.offset;++e)t[e]=this.byteView[e];return t}getOffset(){return this.offset}checkLength(e){if(this.offset+e<this.maxLength)return;this.maxLength=4*Math.ceil(Math.max(2*this.maxLength,this.offset+e+16)/4);const t=this.buffer,a=new Int32Array(t);this.createBuffer(),new Int32Array(this.buffer).set(a)}writeInt(e,t){this.debug&&console.log(">>>",e.toString(16),e,t);const a=this.offset/4;return this.checkLength(4),this.intView[a]=e,this.offset+=4,a}storeInt(e,t){return this.writeInt(e,(t||"")+":int")}storeBool(e,t){e?this.writeInt(ms,(t||"")+":bool"):this.writeInt(ls,(t||"")+":bool")}storeLongP(e,t,a){this.writeInt(t,(a||"")+":long[low]"),this.writeInt(e,(a||"")+":long[high]")}storeLong(e,t){if(Array.isArray(e))return 2===e.length?this.storeLongP(e[0],e[1],t):this.storeIntBytes(e,64,t);const a=(s=is()(e)).isNegative()?ds.add(s):s;var s;const{quotient:n,remainder:i}=a.divmod(4294967296),r=n.toJSNumber(),o=i.toJSNumber();this.writeInt(o,(t||"")+":long[low]"),this.writeInt(r,(t||"")+":long[high]")}storeDouble(e,t){const a=new ArrayBuffer(8),s=new Int32Array(a);new Float64Array(a)[0]=e,this.writeInt(s[0],(t||"")+":double[low]"),this.writeInt(s[1],(t||"")+":double[high]")}storeString(e,t){this.debug&&console.log(">>>",e,(t||"")+":string"),void 0===e&&(e="");const a=unescape(encodeURIComponent(e));this.checkLength(a.length+8);const s=a.length;s<=253?this.byteView[this.offset++]=s:(this.byteView[this.offset++]=254,this.byteView[this.offset++]=255&s,this.byteView[this.offset++]=(65280&s)>>8,this.byteView[this.offset++]=(16711680&s)>>16);for(let e=0;e<s;++e)this.byteView[this.offset++]=a.charCodeAt(e);for(;this.offset%4;)this.byteView[this.offset++]=0}storeBytes(e,t){e instanceof ArrayBuffer?e=new Uint8Array(e):void 0===e&&(e=[]),this.debug&&console.log(">>>",E(e),(t||"")+":bytes");const a=e.length;for(this.checkLength(a+8),a<=253?this.byteView[this.offset++]=a:(this.byteView[this.offset++]=254,this.byteView[this.offset++]=255&a,this.byteView[this.offset++]=(65280&a)>>8,this.byteView[this.offset++]=(16711680&a)>>16),this.byteView.set(e,this.offset),this.offset+=a;this.offset%4;)this.byteView[this.offset++]=0}storeIntBytes(e,t,a){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const s=e.length;if(t%32||8*s!==t){const n=new Error("Invalid bits: "+t+", "+s);throw console.error(n,e,a),n}this.debug&&console.log(">>>",E(e),(a||"")+":int"+t),this.checkLength(s),this.byteView.set(e,this.offset),this.offset+=s}storeRawBytes(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const a=e.length;this.debug&&console.log(">>>",E(e),t||""),this.checkLength(a),this.byteView.set(e,this.offset),this.offset+=a}storeMethod(e,t){const a=(this.mtproto?ts.MTProto:ts.API).methods.find((t=>t.method===e));if(!a)throw new Error("No method "+e+" found");this.storeInt(a.id,e+"[id]");const s=t.pFlags||t,n={};for(const i of a.params){let a=i.type;if(-1!==a.indexOf("?")){const e=a.split("?"),n=e[0].split(".");if(!(t[n[0]]&1<<+n[1])){if(!("true"===e[1]?s[i.name]:void 0!==t[i.name]))continue;t[n[0]]|=1<<+n[1]}a=e[1]}const r=this.storeObject(t[i.name],a,e+"["+i.name+"]");"#"===a&&(t[i.name]=t[i.name]||0,n[i.name]=r)}for(const e in n)this.intView[n[e]]=t[e];return a.type}storeObject(e,t,a){switch(t){case"#":e=e||0;case"int":return this.storeInt(e,a);case"long":return this.storeLong(e,a);case"int128":return this.storeIntBytes(e,128,a);case"int256":return this.storeIntBytes(e,256,a);case"int512":return this.storeIntBytes(e,512,a);case"string":return this.storeString(e,a);case"bytes":return this.storeBytes(e,a);case"double":return this.storeDouble(e,a);case"Bool":return this.storeBool(e,a);case"true":return}if(Array.isArray(e)){if("Vector"===t.substr(0,6))this.writeInt(gs,a+"[id]");else if("vector"!==t.substr(0,6))throw new Error("Invalid vector type "+t);const s=t.substr(7,t.length-8);this.writeInt(e.length,a+"[count]");for(let t=0;t<e.length;++t)this.storeObject(e[t],s,a+"["+t+"]");return!0}if("vector"===t.substr(0,6).toLowerCase())throw new Error("Invalid vector object");if(!(0,fe.Z)(e))throw new Error("Invalid object for type "+t);const s=this.mtproto?ts.MTProto:ts.API,n=e._;let i=!1;const r=s.constructors.find((e=>e.predicate===n));if((i="%"===t.charAt(0))&&(t=t.substr(1)),!r)throw new Error("No predicate "+n+" found");n===t&&(i=!0),i||this.writeInt(r.id,a+"["+n+"][id]");const o=e.pFlags,p={};for(const t of r.params){let s=t.type;if(-1!==s.indexOf("?")){const a=s.split("?"),n=a[0].split(".");if(!(e[n[0]]&1<<+n[1])){if(!("true"===a[1]?o&&o[t.name]:void 0!==e[t.name]))continue;e[n[0]]|=1<<+n[1]}s=a[1]}const i=this.storeObject(e[t.name],s,a+"["+n+"]["+t.name+"]");"#"===s&&(e[t.name]=e[t.name]||0,p[t.name]=i)}for(const t in p)this.intView[p[t]]=e[t];return r.type}}class _s{constructor(e,t={}){this.offset=0,this.mtproto=!1,e instanceof ArrayBuffer?(this.buffer=e,this.intView=new Int32Array(e),this.byteView=new Uint8Array(this.buffer)):(this.buffer=e.buffer,this.intView=new Int32Array(e.buffer),this.byteView=e),this.override=t.override||{},this.mtproto=!!t.mtproto,this.debug=void 0!==t.debug&&t.debug}readInt(e){if(this.byteView.length-this.offset<4)throw console.error(this.byteView,this.offset),new Error("Nothing to fetch: "+e);const t=this.intView[this.offset/4];return this.debug&&console.log("<<<",t.toString(16),t,e,this.byteView.slice(this.offset-16,this.offset+16),E(this.byteView.slice(this.offset-16,this.offset+16))),this.offset+=4,t}fetchInt(e){return this.readInt((e||"")+":int")}fetchDouble(e){const t=new ArrayBuffer(8),a=new Int32Array(t),s=new Float64Array(t);return a[0]=this.readInt((e||"")+":double[low]"),a[1]=this.readInt((e||"")+":double[high]"),s[0]}fetchLong(e){const t=this.readInt((e||"")+":long[low]");let a=os(this.readInt((e||"")+":long[high]"),t);var s;return this.mtproto||(a=(s=a).greater(fs)?s.minus(ds):s),!this.mtproto&&ps.greaterOrEquals(a.abs())?a.toJSNumber():a.toString(10)}fetchBool(e){const t=this.readInt((e||"")+":bool");return t===ms||t!==ls&&(this.offset-=4,this.fetchObject("Object",e))}fetchString(e){let t=this.byteView[this.offset++];254===t&&(t=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16);let a,s="";for(let e=0;e<t;++e)s+=String.fromCharCode(this.byteView[this.offset++]);for(;this.offset%4;)++this.offset;try{a=decodeURIComponent(escape(s))}catch(e){a=s}return this.debug&&console.log("<<<",a,(e||"")+":string"),a}fetchBytes(e){let t=this.byteView[this.offset++];254===t&&(t=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16);const a=this.byteView[us](this.offset,this.offset+t);for(this.offset+=t;this.offset%4;)++this.offset;return this.debug&&console.log("<<<",E(a),(e||"")+":bytes"),a}fetchIntBytes(e,t=!0,a){if(e%32)throw new Error("Invalid bits: "+e);const s=e/8;if(t){const e=this.byteView[us](this.offset,this.offset+s);return this.offset+=s,e}const n=new Array(s);for(let e=0;e<s;++e)n[e]=this.byteView[this.offset++];return this.debug&&console.log("<<<",E(n),(a||"")+":int"+e),n}fetchRawBytes(e,t=!0,a){if(!1===e&&(e=this.readInt((a||"")+"_length"))>this.byteView.byteLength)throw new Error("Invalid raw bytes length: "+e+", buffer len: "+this.byteView.byteLength);if(t){const t=new Uint8Array(e);return t.set(this.byteView[us](this.offset,this.offset+e)),this.offset+=e,t}const s=new Array(e);for(let t=0;t<e;++t)s[t]=this.byteView[this.offset++];return this.debug&&console.log("<<<",E(s),a||""),s}fetchVector(e,t){const a=this.readInt(t+"[count]"),s=new Array(a);if(a>0){const n=e.substr(7,e.length-8);for(let e=0;e<a;++e)s[e]=this.fetchObject(n,t+"["+e+"]")}return s}fetchObject(e,t){switch(e){case"#":case"int":return this.fetchInt(t);case"long":return this.fetchLong(t);case"int128":return this.fetchIntBytes(128,!0,t);case"int256":return this.fetchIntBytes(256,!0,t);case"int512":return this.fetchIntBytes(512,!0,t);case"string":return this.fetchString(t);case"bytes":return this.fetchBytes(t);case"double":return this.fetchDouble(t);case"Bool":return this.fetchBool(t);case"true":return!0}if(t=t||e||"Object","v"===e.charAt(0)&&"ector"===e.substr(1,5))return this.fetchVector(e,t);const a=this.mtproto?ts.MTProto:ts.API;let s=null,n=!1;if("%"===e.charAt(0)){const t=e.substr(1);if(s=a.constructors.find((e=>e.type===t)),!s)throw new Error("Constructor not found for type: "+e)}else{const r=this.readInt(t+"[id]");if(r===hs){const a=(i=this.fetchBytes(t+"[packed_string]"),ss().inflate(i,void 0));return new _s(a).fetchObject(e,t)}if(r===gs)return this.fetchVector(e,t);let o=a.constructorsIndex;if(!o){a.constructorsIndex=o={};for(let e=0,t=a.constructors.length;e<t;++e)o[a.constructors[e].id]=e}const p=o[r];if(void 0!==p&&(s=a.constructors[p]),!s&&this.mtproto){const e=ts.API;for(let t=0,a=e.constructors.length;t<a;++t)if(+e.constructors[t].id===r){s=e.constructors[t],delete this.mtproto,n=!0;break}}if(!s){let e,a;console.error("Constructor not found:",r);try{e=this.fetchInt(t),a=this.fetchInt(t)}catch(e){}throw new Error("Constructor not found: "+r+" "+e+" "+a+" "+t)}}var i;const r=s.predicate,o={_:r},p=(this.mtproto?"mt_":"")+r;if(this.override[p])this.override[p](o,t+"["+r+"]");else for(let e=0,a=s.params.length;e<a;++e){const a=s.params[e];let n=a.type;"#"===n&&void 0===o.pFlags&&(o.pFlags={});const i=-1!==n.indexOf("?");if(i){const e=n.split("?"),t=e[0].split(".");if(!(o[t[0]]&1<<+t[1]))continue;n=e[1]}const p=this.fetchObject(n,t+"["+r+"]["+a.name+"]");i&&"true"===n?o.pFlags[a.name]=p:o[a.name]=p}return n&&(this.mtproto=!0),"JSONValue"===e?this.formatJSONValue(o):o}formatJSONValue(e){if(!e._)return e;switch(e._){case"jsonNull":return null;case"jsonObject":{const t={},a=e.value;for(let e=0,s=a.length;e<s;++e){const s=a[e];t[s.key]=this.formatJSONValue(s.value)}return t}default:return e.value}}getOffset(){return this.offset}setOffset(e){this.offset=e}}d.GO.TLDeserialization=_s,d.GO.TLSerialization=ys;var vs=a(4903);function Ps(e,t=16,a,s=!1,n=!1){const i=e.byteLength||e.length,r=s?t-i:t-i%t;if(r>0&&r<t){const t=new Uint8Array(r);if(a)for(let e=0;e<r;++e)t[e]=0;else w(t);return e instanceof ArrayBuffer?(n?(0,vs.Z)(t,e):(0,vs.Z)(e,t)).buffer:e instanceof Uint8Array?n?(0,vs.Z)(t,e):(0,vs.Z)(e,t):n?[...t].concat(e):e.concat([...t])}return e}var bs=a(9895),Ms=a(9818),Ss=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};const Is={client:{disconnectDelayMin:7,disconnectDelayMax:20,pingInterval:2e3,pingMaxTime:5,connectionTimeout:5e3},file:{disconnectDelayMin:10,disconnectDelayMax:24,pingInterval:3e3,pingMaxTime:7,connectionTimeout:7500}},Cs={noSchedule:!0,notContentRelated:!0};let ws,ks=0;class As{constructor(e,t,a,s,n,i,r={}){this.networkerFactory=e,this.timeManager=t,this.dcId=a,this.authKey=s,this.authKeyId=n,this.lastServerMessages=[],this.sentMessages={},this.pendingMessages={},this.pendingAcks=[],this.pendingResendReq=[],this.nextReq=0,this.checkConnectionPeriod=0,this.offline=!1,this.isOnline=!1,this.status=D.Q.Closed,this.lastResponseTime=0,this.debug=d.ZP||b.Z.debug,this.activeRequests=0,this.sendPingDelayDisconnect=()=>{var e;if(this.pingDelayDisconnectDeferred||!this.transport||!this.transport.connected)return;const t=this.pingDelayDisconnectDeferred=(0,v.Z)(),a=this.delays,s=this.delays.pingMaxTime,n=Math.min(null!==(e=this.lastPingTime)&&void 0!==e?e:0,s),i=Math.round(a.disconnectDelayMin+n/s*(a.disconnectDelayMax-a.disconnectDelayMin)),r=1e3*i,o=this.lastPingStartTime=Date.now(),p=this.lastPingDelayDisconnectId=(0,Ee.a)(),d={notContentRelated:!0};this.wrapMtpCall("ping_delay_disconnect",{ping_id:p,disconnect_delay:i},d);const f=this.log.bindPrefix("sendPingDelayDisconnect");this.debug&&f.debug(`ping, timeout=${r}, lastPingTime=${this.lastPingTime}, msgId=${d.messageId}, pingId=${p}`);const c=T.Z.setTimeout(t.reject,r);t.then((e=>{clearTimeout(c);const t=Date.now()-o;if(this.lastPingTime=t/1e3,this.debug&&f.debug(`pong, reason='${e}', time=${n}, msgId=${d.messageId}`),t>r)throw void 0;return(0,P.Z)(Math.max(0,this.delays.pingInterval-t))})).catch((()=>{clearTimeout(c);const e=this.transport;this.pingDelayDisconnectDeferred===t&&(null==e?void 0:e.connection)&&(f.error("catch, closing connection",this.lastPingTime,d.messageId),e.connection.close())})).finally((()=>{this.pingDelayDisconnectDeferred===t&&(this.pingDelayDisconnectDeferred=void 0,this.sendPingDelayDisconnect())}))},this.checkLongPoll=()=>{const e=this.cleanupSent();if(this.longPollPending&&Date.now()<this.longPollPending||this.offline||this.isStopped()||this.isFileNetworker)return!1;Ga.Z.get("dc").then((t=>{e&&(t!==this.dcId||this.sleepAfter&&Date.now()>this.sleepAfter)||this.sendLongPoll()}))},this.checkConnection=e=>{if(this.debug&&this.log("Check connection",e),this.clearCheckConnectionTimeout(),!this.transport)return void this.log.warn("No transport for checkConnection");const t=new ys({mtproto:!0}),a=(0,Ee.a)();t.storeMethod("ping",{ping_id:a});const s={msg_id:this.timeManager.generateId(),seq_no:this.generateSeqNo(!0),body:t.getBytes(!0)};this.offline&&this.setConnectionStatus(D.Q.Connecting),this.sendEncryptedRequest(s).then((()=>{this.toggleOffline(!1)}),(()=>{this.debug&&this.log("Delay",1e3*this.checkConnectionPeriod),this.checkConnectionTimeout=T.Z.setTimeout((()=>this.checkConnection("from failed checkConnection request")),1e3*this.checkConnectionPeriod|0),this.checkConnectionPeriod=Math.min(60,1.5*this.checkConnectionPeriod)}))},this.authKeyUint8=(0,Ms.Z)(this.authKey),this.serverSalt=(0,Ms.Z)(i),this.isFileUpload=!!r.fileUpload,this.isFileDownload=!!r.fileDownload,this.isFileNetworker=this.isFileUpload||this.isFileDownload,this.delays=this.isFileNetworker?Is.file:Is.client;const o=this.isFileUpload?"-U":this.isFileDownload?"-D":"";this.name="NET-"+a+o,this.log=(0,S.kg)(this.name+(o?"":"-C")+"-"+ks++,S.v9.Log|S.v9.Error|S.v9.Warn),this.log("constructor"),this.updateSession()}updateSession(){this.seqNo=0,this.prevSessionId=this.sessionId,this.sessionId=w(new Uint8Array(8))}updateSentMessage(e){const t=this.sentMessages[e];return!!t&&(t.container&&(0,ne.Z)(t.inner,((e,a)=>{const s=this.updateSentMessage(e);s?t.inner[a]=s.msg_id:t.inner.splice(a,1)})),t.msg_id=this.timeManager.generateId(),t.seq_no=this.generateSeqNo(t.notContentRelated||t.container),this.debug&&this.log(`updateSentMessage, old=${e}, new=${t.msg_id}`),this.sentMessages[t.msg_id]=t,delete this.sentMessages[e],t)}generateSeqNo(e){let t=2*this.seqNo;return e||(t++,this.seqNo++),t}wrapMtpCall(e,t,a){const s=new ys({mtproto:!0});s.storeMethod(e,t);const n=this.timeManager.generateId(),i=this.generateSeqNo(),r={msg_id:n,seq_no:i,body:s.getBytes(!0)};return b.Z.debug&&this.log("MT call",e,t,n,i),this.pushMessage(r,a)}wrapMtpMessage(e,t){const a=new ys({mtproto:!0});a.storeObject(e,"Object");const s=this.timeManager.generateId(),n=this.generateSeqNo(t.notContentRelated),i={msg_id:s,seq_no:n,body:a.getBytes(!0)};return b.Z.debug&&this.log("MT message",e,s,n),this.pushMessage(i,t)}wrapApiCall(e,t={},a={}){const s=new ys(a);if(!this.connectionInited){const e=ts.API.methods.find((e=>"invokeWithLayer"===e.method));if(!e)throw new Error("no invokeWithLayer!");s.storeInt(+e.id,"invokeWithLayer"),s.storeInt(ts.layer,"layer");const t=ts.API.methods.find((e=>"initConnection"===e.method));if(!t)throw new Error("no initConnection!");s.storeInt(+t.id,"initConnection"),s.storeInt(0,"flags"),s.storeInt(_.Z.id,"api_id"),s.storeString(i().USER_AGENT||"Unknown UserAgent","device_model"),s.storeString(navigator.platform||"Unknown Platform","system_version"),s.storeString(_.Z.version+(_.Z.isMainDomain?" "+_.Z.suffix:""),"app_version"),s.storeString(navigator.language||"en","system_lang_code"),s.storeString(_.Z.langPack,"lang_pack"),s.storeString(this.networkerFactory.language,"lang_code")}if(a.afterMessageId){if(void 0===ws){const e=ts.API.methods.find((e=>"invokeAfterMsg"===e.method));ws=e?+e.id:0}ws?(s.storeInt(ws,"invokeAfterMsg"),s.storeLong(a.afterMessageId,"msg_id")):this.log.error("no invokeAfterMsg!")}a.resultType=s.storeMethod(e,t);const n={msg_id:this.timeManager.generateId(),seq_no:this.generateSeqNo(),body:s.getBytes(!0),isAPI:!0};return b.Z.debug?this.log("Api call",e,n,t,a):this.debug&&this.log("Api call",e,t,a),this.pushMessage(n,a)}changeTransport(e){const t=this.transport;t&&(t.destroy(),this.nextReqTimeout&&(clearTimeout(this.nextReqTimeout),this.nextReqTimeout=0,this.nextReq=0),this.connectionInited=!1,void 0!==this.longPollInterval&&(clearInterval(this.longPollInterval),this.longPollInterval=void 0),this.clearCheckConnectionTimeout()),this.log("change transport",e,t),this.clearPingDelayDisconnect(),this.transport=e,e&&(e.networker=this,e instanceof I&&(this.longPollInterval=T.Z.setInterval(this.checkLongPoll,1e4),this.checkLongPoll(),this.checkConnection("changed transport")),e.connection&&e.connected&&this.setConnectionStatus(D.Q.Connected),this.resend())}destroy(){this.log("destroy")}forceReconnectTimeout(){this.transport.reconnect?this.transport.reconnect():this.resend()}forceReconnect(){this.transport.forceReconnect?this.transport.forceReconnect():this.checkConnection("force reconnect")}clearPingDelayDisconnect(){const e=this.pingDelayDisconnectDeferred;this.pingDelayDisconnectDeferred=void 0,this.lastPingDelayDisconnectId=void 0,e&&e.reject()}sendLongPoll(){this.sendingLongPoll||(this.sendingLongPoll=!0,this.longPollPending=Date.now()+25e3,this.debug&&this.log.debug("sendLongPoll",this.longPollPending),this.wrapMtpCall("http_wait",{max_delay:500,wait_after:150,max_wait:25e3},{noResponse:!0,longPoll:!0}).then((()=>{this.longPollPending=void 0,setTimeout(this.checkLongPoll,0)}),(e=>{this.log("Long-poll failed",e)})).finally((()=>{this.sendingLongPoll=void 0})))}clearCheckConnectionTimeout(){void 0!==this.checkConnectionTimeout&&(clearTimeout(this.checkConnectionTimeout),this.checkConnectionTimeout=void 0)}toggleOffline(e){if(this.offline!==e)if(this.offline=e,this.clearCheckConnectionTimeout(),e){clearTimeout(this.nextReqTimeout),this.nextReqTimeout=0,this.nextReq=0,this.checkConnectionPeriod<1.5&&(this.checkConnectionPeriod=0);const e=1e3*this.checkConnectionPeriod|0;this.checkConnectionRetryAt=Date.now()+e,this.setConnectionStatus(D.Q.Closed,this.checkConnectionRetryAt),this.checkConnectionTimeout=T.Z.setTimeout((()=>this.checkConnection("from toggleOfline")),e),this.checkConnectionPeriod=Math.min(30,1.5*(1+this.checkConnectionPeriod))}else this.setConnectionStatus(D.Q.Connected),this.checkLongPoll(),this.scheduleRequest();this.setConnectionStatus(e?D.Q.Closed:D.Q.Connected,e?this.checkConnectionRetryAt:void 0)}handleSentEncryptedRequestHTTP(e,t,a){e.then((e=>(this.toggleOffline(!1),this.parseResponse(e).then((e=>(this.debug&&this.log.debug("Server response",e),this.processMessage(e.response,e.messageId,e.sessionId),this.checkLongPoll(),this.checkConnectionPeriod=Math.max(1.1,Math.sqrt(this.checkConnectionPeriod)),!0))))),(e=>(this.log.error("Encrypted request failed",e,t),this.pushResend(t.msg_id),this.toggleOffline(!0),!1))).then((e=>{const t=this.sentMessages;a.forEach((a=>{const s=t[a];if(s){const n=s.deferred;delete t[a],delete this.pendingMessages[a],e?n.resolve():n.reject()}}))}))}pushMessage(e,t){let a;return t.notContentRelated&&!t.noResponse||(a=(0,v.Z)()),this.sentMessages[e.msg_id]=Object.assign(e,t,a?{deferred:a}:void 0),this.pendingMessages[e.msg_id]=0,t.noSchedule||this.scheduleRequest(),(0,fe.Z)(t)&&(t.messageId=e.msg_id),a}attachPromise(e,t){const a=setTimeout((()=>{this.lastResponseTime&&Date.now()-this.lastResponseTime<this.delays.connectionTimeout||(this.log.error("timeout",t),this.isOnline&&this.setConnectionStatus(D.Q.TimedOut))}),this.delays.connectionTimeout);e.catch(Gt.Z).finally((()=>{clearTimeout(a),this.setConnectionStatus(D.Q.Connected),--this.activeRequests,this.setDrainTimeout()})),++this.activeRequests,void 0!==this.onDrainTimeout&&(clearTimeout(this.onDrainTimeout),this.onDrainTimeout=void 0)}setDrainTimeout(){!this.activeRequests&&this.onDrain&&void 0===this.onDrainTimeout&&(this.onDrainTimeout=T.Z.setTimeout((()=>{this.onDrainTimeout=void 0,this.log("drain"),this.onDrain()}),1e4))}setConnectionStatus(e,t){var a;const s=e===D.Q.Connected,n=this.status!==e;this.isOnline=s,this.status=e,n&&(this.networkerFactory.onConnectionStatusChange&&this.networkerFactory.onConnectionStatusChange({_:"networkerStatus",status:e,dcId:this.dcId,name:this.name,isFileNetworker:this.isFileNetworker,isFileDownload:this.isFileDownload,isFileUpload:this.isFileUpload,retryAt:t}),this.isOnline&&this.scheduleRequest(),(null===(a=this.transport)||void 0===a?void 0:a.connection)&&(this.clearPingDelayDisconnect(),this.sendPingDelayDisconnect()))}pushResend(e,t=100){const a=t?Date.now()+t:0,s=this.sentMessages[e];if(s.container)for(const e of s.inner)this.pendingMessages[e]=a;else this.pendingMessages[e]=a;s.acked&&this.log.error("pushResend: acked message?",s),this.debug&&this.log.debug("pushResend:",e,s,this.pendingMessages,t),this.scheduleRequest(t)}getMsgKey(e,t){return Ss(this,void 0,void 0,(function*(){const a=t?0:8,n=(0,vs.Z)(this.authKeyUint8.subarray(88+a,88+a+32),e),i=yield s.Z.invokeCrypto("sha256",n);return new Uint8Array(i).subarray(8,24)}))}getAesKeyIv(e,t){const a=t?0:8,n=new Uint8Array(52),i=new Uint8Array(52),r=[];return n.set(e,0),n.set(this.authKeyUint8.subarray(a,a+36),16),r.push(s.Z.invokeCrypto("sha256",n)),i.set(this.authKeyUint8.subarray(40+a,40+a+36),0),i.set(e,36),r.push(s.Z.invokeCrypto("sha256",i)),Promise.all(r).then((e=>{const t=new Uint8Array(32),a=new Uint8Array(32),s=new Uint8Array(e[0]),n=new Uint8Array(e[1]);return t.set(s.subarray(0,8)),t.set(n.subarray(8,24),8),t.set(s.subarray(24,32),24),a.set(n.subarray(0,8)),a.set(s.subarray(8,24),8),a.set(n.subarray(24,32),24),[t,a]}))}isStopped(){return this.networkerFactory.akStopped&&!this.isFileNetworker}performScheduledRequest(){if(this.isStopped())return!1;if(this.pendingAcks.length){const e=this.pendingAcks.slice();this.wrapMtpMessage({_:"msgs_ack",msg_ids:e},{notContentRelated:!0,noSchedule:!0})}const e=this.pendingResendReq.length;if(e){const t=Object.assign({},Cs),a=this.pendingResendReq.splice(0,e);this.wrapMtpMessage({_:"msg_resend_req",msg_ids:a},t),this.log("resend: resending requests",t.messageId,a)}let t;const a=[];let s=0,n=!1,i=!1,r=!1;const o=Object.keys(this.pendingMessages).map((e=>is()(e))).sort(((e,t)=>e.compare(t))).map((e=>e.toString(10)));for(const e of o){const o=this.sentMessages[e];if(o&&o.body){const e=o.body.length+32;if(s+e>655360&&(this.log.warn("lengthOverflow",o,a),r=!0,t))break;a.push(o),s+=e,o.isAPI?n=!0:o.longPoll&&(i=!0),t=o}delete this.pendingMessages[e]}if(this.transport instanceof I&&n&&!i){const e=new ys({mtproto:!0});e.storeMethod("http_wait",{max_delay:500,wait_after:150,max_wait:3e3}),a.push({msg_id:this.timeManager.generateId(),seq_no:this.generateSeqNo(),body:e.getBytes(!0)})}if(!a.length)return;const p=a.filter((e=>e.noResponse)).map((e=>e.msg_id));if(a.length>1){const e=this.generateContainerMessage(s,a);t=e.messageWithBody,this.sentMessages[t.msg_id]=e.message}else this.sentMessages[t.msg_id]=t;this.pendingAcks=[];const d=this.sendEncryptedRequest(t);this.transport instanceof I&&this.handleSentEncryptedRequestHTTP(d,t,p),this.transport instanceof I||this.cleanupSent(),r&&this.scheduleRequest()}generateContainerMessage(e,t){const a=new ys({mtproto:!0,startMaxLength:e+64});a.storeInt(1945237724,"CONTAINER[id]"),a.storeInt(t.length,"CONTAINER[count]");const s=[];t.forEach(((e,t)=>{s.push(e.msg_id),a.storeLong(e.msg_id,"CONTAINER["+t+"][msg_id]"),a.storeInt(e.seq_no,"CONTAINER["+t+"][seq_no]"),a.storeInt(e.body.length,"CONTAINER["+t+"][bytes]"),a.storeRawBytes(e.body,"CONTAINER["+t+"][body]")}));const n={msg_id:this.timeManager.generateId(),seq_no:this.generateSeqNo(!0),container:!0,inner:s};return b.Z.debug&&this.log.warn("Container",s,n.msg_id,n.seq_no),{message:n,messageWithBody:Object.assign({body:a.getBytes(!0)},n)}}getEncryptedMessage(e){return Ss(this,void 0,void 0,(function*(){const t=yield this.getMsgKey(e,!0),a=yield this.getAesKeyIv(t,!0);return{bytes:yield s.Z.invokeCrypto("aes-encrypt",e,a[0],a[1]),msgKey:t}}))}getDecryptedMessage(e,t){return this.getAesKeyIv(e,!1).then((e=>s.Z.invokeCrypto("aes-decrypt",t,e[0],e[1])))}getEncryptedOutput(e){const t=new ys({startMaxLength:e.body.length+2048});t.storeIntBytes(this.serverSalt,64,"salt"),t.storeIntBytes(this.sessionId,64,"session_id"),t.storeLong(e.msg_id,"message_id"),t.storeInt(e.seq_no,"seq_no"),t.storeInt(e.body.length,"message_data_length"),t.storeRawBytes(e.body,"message_data");const a=t.getBuffer(),s=16-t.getOffset()%16+16*(1+(0,Ee.d)(8)%5),n=w(new Uint8Array(s)),i=(0,vs.Z)(a,n);return this.getEncryptedMessage(i).then((e=>{const t=new ys({startMaxLength:e.bytes.length+256});return t.storeIntBytes(this.authKeyId,64,"auth_key_id"),t.storeIntBytes(e.msgKey,128,"msg_key"),t.storeRawBytes(e.bytes,"encrypted_data"),t.getBytes(!0)}))}sendEncryptedRequest(e){return Ss(this,void 0,void 0,(function*(){const t=yield this.getEncryptedOutput(e);this.transport||this.log.error("trying to send something when offline",this.transport,this),this.debug&&this.log.debug("sending:",e,[e.msg_id].concat(e.inner||[]),t.length);const a=this.transport?this.transport.send(t):Promise.reject({});if(!(this.transport instanceof I))return a;const s={code:406,type:"NETWORK_BAD_RESPONSE",transport:this.transport};return a.then((e=>{if(!(null==e?void 0:e.byteLength))throw s;return e}),(e=>{throw e.message||e.type||(e=Object.assign(s,{type:"NETWORK_BAD_REQUEST",originalError:e})),e}))}))}parseResponse(e){this.lastResponseTime=Date.now();const t=new _s(e),a=t.fetchIntBytes(64,!0,"auth_key_id");if(!(0,bs.Z)(a,this.authKeyId))throw new Error("[MT] Invalid server auth_key_id: "+E(a));const s=t.fetchIntBytes(128,!0,"msg_key"),n=t.fetchRawBytes(e.byteLength-t.getOffset(),!0,"encrypted_data");return this.getDecryptedMessage(s,n).then((e=>this.getMsgKey(e,!1).then((t=>{if(!(0,bs.Z)(s,t))throw this.log.warn("[MT] msg_keys",s,t),this.updateSession(),new Error("[MT] server msgKey mismatch, updating session");let a=new _s(e,{mtproto:!0});a.fetchIntBytes(64,!0,"salt");const n=a.fetchIntBytes(64,!0,"session_id"),i=a.fetchLong("message_id");if(!((0,bs.Z)(n,this.sessionId)||this.prevSessionId&&(0,bs.Z)(n,this.prevSessionId)))throw this.log.warn("Sessions",n,this.sessionId,this.prevSessionId,e),new Error("[MT] Invalid server session_id: "+E(n));const r=a.fetchInt("seq_no"),o=e.byteLength,p=a.fetchInt("message_data[length]");let d=a.getOffset();if(p%4||p>o-d)throw new Error("[MT] Invalid body length: "+p);const f=a.fetchRawBytes(p,!0,"message_data");d=a.getOffset();const c=o-d;if(c<12||c>1024)throw new Error("[MT] Invalid padding length: "+c);return a=new _s(f,{mtproto:!0,override:{mt_message:(e,t)=>{e.msg_id=a.fetchLong(t+"[msg_id]"),e.seqno=a.fetchInt(t+"[seqno]"),e.bytes=a.fetchInt(t+"[bytes]");const s=a.getOffset();try{e.body=a.fetchObject("Object",t+"[body]")}catch(t){this.log.error("parse error",t.message,t.stack),e.body={_:"parse_error",error:t}}a.getOffset()!==s+e.bytes&&a.setOffset(s+e.bytes)},mt_rpc_result:(e,t)=>{e.req_msg_id=a.fetchLong(t+"[req_msg_id]");const s=this.sentMessages[e.req_msg_id],n=s&&s.resultType||"Object";e.req_msg_id&&!s||(e.result=a.fetchObject(n,t+"[result]"))}}}),{response:a.fetchObject("","INPUT"),messageId:i,sessionId:n,seqNo:r}}))))}applyServerSalt(e){const t=(a=e,Ps((s=is()(a),new Uint8Array(s.toArray(256).value)).reverse(),8,!0,!1,!1));var a,s;Ga.Z.set({["dc"+this.dcId+"_server_salt"]:E(t)}),this.serverSalt=new Uint8Array(t)}scheduleRequest(e){this.transport instanceof I&&(this.offline&&this.checkConnection("forced schedule"),e||(e=0));const t=Date.now()+(e||0);if(this.nextReq&&(void 0===e||this.nextReq<=t))return;this.nextReqTimeout&&clearTimeout(this.nextReqTimeout);const a=()=>{this.nextReqTimeout=0,this.nextReq=0,this.transport instanceof I&&this.offline||this.performScheduledRequest()};this.nextReq=t,void 0!==e?this.nextReqTimeout=T.Z.setTimeout(a,e):a()}ackMessage(e){let t;this.pendingAcks.push(e),this.transport instanceof I&&(t=3e4),this.scheduleRequest(t)}reqResend(e){this.debug&&this.log.debug("Req resend",e),this.pendingResendReq.push(e),this.scheduleRequest(100)}cleanupSent(){let e=!1;const t=this.sentMessages;return Object.keys(t).forEach((a=>{const s=t[a];if(s.notContentRelated&&void 0===this.pendingMessages[a])delete t[a];else if(s.container){for(const a of s.inner)if(void 0!==t[a])return void(e=!0);delete t[a]}else e=!0})),!e}processMessageAck(e){const t=this.sentMessages[e];t&&!t.acked&&(t.acked=!0)}processError(e){const t=(e.error_message||"").match(/^([A-Z_0-9]+\b)(: (.+))?/)||[];return e.error_code=e.error_code,{code:!e.error_code||e.error_code<=0?500:e.error_code,type:t[1]||"UNKNOWN",description:t[3]||"CODE#"+e.error_code+" "+e.error_message,originalError:e}}resend(){const e=this.sentMessages;for(const t in e){const a=e[t];(a.body||a.container)&&this.pushResend(t)}this.transport.connection&&(this.clearPingDelayDisconnect(),this.sendPingDelayDisconnect())}applyServerTime(e){const t=is()(e).shiftRight(32).toJSNumber();return this.log("applying server time",t),this.timeManager.applyServerTime(t)}processMessage(e,t,a){if("messageEmpty"!==e._)if(parseInt(t.substr(0,-10),10)%2)this.log.warn("Server even message id: ",t,e);else switch(this.debug&&this.log.debug("process message",e,t),this.pingDelayDisconnectDeferred&&this.pingDelayDisconnectDeferred.resolve("any message"),e._){case"msg_container":for(const t of e.messages)this.processMessage(t,t.msg_id,a);break;case"bad_server_salt":this.log("Bad server salt",e),this.applyServerSalt(e.new_server_salt),this.sentMessages[e.bad_msg_id]&&this.pushResend(e.bad_msg_id),this.ackMessage(t);break;case"bad_msg_notification":switch(this.log.error("Bad msg notification",e),e.error_code){case 16:case 17:case 32:case 33:case 64:{const a=this.applyServerTime(t);(17===e.error_code||a)&&(this.log("Update session"),this.updateSession());const s=this.updateSentMessage(e.bad_msg_id);s&&this.pushResend(s.msg_id)}}break;case"message":if(-1!==this.lastServerMessages.indexOf(t))return void this.ackMessage(t);this.lastServerMessages.push(t),this.lastServerMessages.length>100&&this.lastServerMessages.shift(),this.processMessage(e.body,e.msg_id,a);break;case"new_session_created":this.ackMessage(t),this.debug&&this.log.debug("new_session_created",e),this.processMessageAck(e.first_msg_id),this.applyServerSalt(e.server_salt),Ga.Z.get("dc").then((t=>{t===this.dcId&&!this.isFileNetworker&&this.networkerFactory.updatesProcessor&&this.networkerFactory.updatesProcessor(e)}));break;case"msgs_ack":this.debug&&this.log("got acks",e.msg_ids);for(const t of e.msg_ids)this.processMessageAck(t);break;case"msg_detailed_info":if(!this.sentMessages[e.msg_id]){this.ackMessage(e.answer_msg_id);break}case"msg_new_detailed_info":if(-1!==this.pendingAcks.indexOf(e.answer_msg_id))break;this.reqResend(e.answer_msg_id);break;case"msgs_state_info":{this.ackMessage(e.answer_msg_id);const t=[[this.lastResendReq,this.pendingResendReq]];for(const[a,s]of t)if((null==a?void 0:a.reqMsgId)===e.req_msg_id&&s.length)for(const e of a.msgIds){const t=s.indexOf(e);-1!==t&&s.splice(t,1)}break}case"rpc_result":{this.ackMessage(t);const a=e.req_msg_id,s=this.sentMessages[a];if(this.debug&&this.log("Rpc response",e.result,s),this.processMessageAck(a),s){const t=s.deferred;if("rpc_error"===e.result._){const a=this.processError(e.result);this.log("Rpc error",a),t&&t.reject(a)}else t&&t.resolve(e.result),s.isAPI&&!this.connectionInited&&(this.connectionInited=!0);delete this.sentMessages[a]}else this.debug&&this.log("Rpc result for unknown message:",a,e);break}case"pong":{const t=e.ping_id;if(this.lastPingDelayDisconnectId===t){const e=this.pingDelayDisconnectDeferred;e?e.resolve("pong"):this.log("ping deferred deleted",t)}break}default:this.ackMessage(t),null!==this.networkerFactory.updatesProcessor&&this.networkerFactory.updatesProcessor(e)}else this.log.warn("processMessage: messageEmpty",e,t)}}class Us extends G{constructor(){super(...arguments),this.networkers=[],this.language=navigator.language||_.Z.langPackCode,this.updatesProcessor=null,this.akStopped=!1}onConnectionStatusChange(e){this.rootScope.dispatchEvent("connection_status_change",e)}removeNetworker(e){(0,M.Z)(this.networkers,e)}setUpdatesProcessor(e){this.updatesProcessor=e}getNetworker(e,t,a,s,n){const i=new As(this,this.timeManager,e,t,a,s,n);return this.networkers.push(i),i}startAll(){if(this.akStopped){const e=this.networkers.filter((e=>e.isStopped()));this.akStopped=!1,this.updatesProcessor&&this.updatesProcessor({_:"new_session_created"});for(const t of e)t.scheduleRequest()}}stopAll(){this.akStopped=!0}setLanguage(e){this.language=e;for(const e of this.networkers)e.isFileNetworker||(e.connectionInited=!1)}unsetConnectionInited(){for(const e of this.networkers)e.connectionInited=!1}forceReconnectTimeout(){for(const e of this.networkers)e.forceReconnectTimeout()}forceReconnect(){for(const e of this.networkers)if(!e.isFileNetworker){e.forceReconnect();break}}}const Ds=new class{constructor(){this.testPublicKeysHex=[{modulus:"c8c11d635691fac091dd9489aedced2932aa8a0bcefef05fa800892d9b52ed03200865c9e97211cb2ee6c7ae96d3fb0e15aeffd66019b44a08a240cfdd2868a85e1f54d6fa5deaa041f6941ddf302690d61dc476385c2fa655142353cb4e4b59f6e5b6584db76fe8b1370263246c010c93d011014113ebdf987d093f9d37c2be48352d69a1683f8f6e6c2167983c761e3ab169fde5daaa12123fa1beab621e4da5935e9c198f82f35eae583a99386d8110ea6bd1abb0f568759f62694419ea5f69847c43462abef858b4cb5edc84e7b9226cd7bd7e183aa974a712c079dde85b9dc063b8a5c08e8f859c0ee5dcd824c7807f20153361a7f63cfd2a433a1be7f5",exponent:"010001"}],this.publisKeysHex=[{modulus:"e8bb3305c0b52c6cf2afdf7637313489e63e05268e5badb601af417786472e5f93b85438968e20e6729a301c0afc121bf7151f834436f7fda680847a66bf64accec78ee21c0b316f0edafe2f41908da7bd1f4a5107638eeb67040ace472a14f90d9f7c2b7def99688ba3073adb5750bb02964902a359fe745d8170e36876d4fd8a5d41b2a76cbff9a13267eb9580b2d06d10357448d20d9da2191cb5d8c93982961cdfdeda629e37f1fb09a0722027696032fe61ed663db7a37f6f263d370f69db53a0dc0a1748bdaaff6209d5645485e6e001d1953255757e4b8e42813347b11da6ab500fd0ace7e6dfa3736199ccaf9397ed0745a427dcfa6cd67bcb1acff3",exponent:"010001"}],this.publicKeysParsed={},this.prepared=!1,this.preparePromise=null,b.Z.test&&(this.publisKeysHex=this.testPublicKeysHex)}prepare(){return this.preparePromise?this.preparePromise:this.prepared?Promise.resolve():this.preparePromise=Promise.all(this.publisKeysHex.map((e=>{const t=new ys;t.storeBytes((0,Wa.Z)(e.modulus),"n"),t.storeBytes((0,Wa.Z)(e.exponent),"e");const a=t.getBuffer();return s.Z.invokeCrypto("sha1",a).then((t=>{const a=t.slice(-8);a.reverse(),this.publicKeysParsed[E(a).toLowerCase()]={modulus:e.modulus,exponent:e.exponent}}))}))).then((()=>{this.prepared=!0,this.preparePromise=null}))}select(e){return t=this,a=void 0,n=function*(){yield this.prepare();for(let t=0;t<e.length;++t){let a=is()(e[t]).toString(16).toLowerCase();a.length<16&&(a=new Array(16-a.length).fill("0").join("")+a);const s=this.publicKeysParsed[a];if(s)return Object.assign({fingerprint:e[t]},s)}},new((s=void 0)||(s=Promise))((function(e,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(t){var a;t.done?e(t.value):(a=t.value,a instanceof s?a:new s((function(e){e(a)}))).then(r,o)}p((n=n.apply(t,a||[])).next())}));var t,a,s,n}};function Es(e,t){const a=e.length,s=new Uint8Array(a);for(let n=0;n<a;++n)s[n]=e[n]^t[n];return s}var Ts=function(e,t,a,s){return new(a||(a=Promise))((function(n,i){function r(e){try{p(s.next(e))}catch(e){i(e)}}function o(e){try{p(s.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((s=s.apply(e,t||[])).next())}))};class Fs extends G{after(){this.cached={},this.log=(0,S.kg)("AUTHORIZER",S.v9.Error|S.v9.Log)}sendPlainRequest(e,t){const a=t.byteLength,s=new ys;s.storeLongP(0,0,"auth_key_id"),s.storeLong(this.timeManager.generateId(),"msg_id"),s.storeInt(a,"request_length");const n=s.getBytes(!0),i=new Uint8Array(n.byteLength+a);i.set(n),i.set(t,n.length);const r=this.dcConfigurator.chooseServer(e,"client",this.transportType),o={code:406,type:"NETWORK_BAD_RESPONSE"};return d.ZP&&this.log("mtpSendPlainRequest: creating requestPromise"),r.send(i).then((e=>{if(d.ZP&&this.log("mtpSendPlainRequest: in good sector",e),!e||!e.byteLength)throw o;try{const t=new _s(e,{mtproto:!0});if(4===e.length){const e=t.fetchInt();throw this.log.error("mtpSendPlainRequest: wrong response, error code:",e),e}const a=t.fetchLong("auth_key_id");"0"!==a&&this.log.error("auth_key_id !== 0",a);const s=t.fetchLong("msg_id");"0"===s&&this.log.error("msg_id === 0",s);const n=t.fetchInt("msg_len");return n||this.log.error("no msg_len",n),t}catch(e){throw this.log.error("mtpSendPlainRequest: deserialization went bad",e),Object.assign(o,{originalError:e})}}),(e=>{throw e.message||e.type||(e=Object.assign(o,{originalError:e})),e}))}sendReqPQ(e){return Ts(this,void 0,void 0,(function*(){const t=new ys({mtproto:!0});let a;t.storeMethod("req_pq_multi",{nonce:e.nonce}),d.ZP&&this.log("Send req_pq",E(e.nonce));try{const s=this.sendPlainRequest(e.dcId,t.getBytes(!0));Ds.prepare(),a=yield s}catch(e){throw this.log.error("req_pq error",e.message),e}const n=a.fetchObject("ResPQ");if("resPQ"!==n._)throw new Error("[MT] resPQ response invalid: "+n._);if(!(0,bs.Z)(e.nonce,n.nonce))throw this.log.error(e.nonce,n.nonce),new Error("[MT] resPQ nonce mismatch");e.serverNonce=n.server_nonce,e.pq=n.pq,e.fingerprints=n.server_public_key_fingerprints,d.ZP&&this.log("Got ResPQ",E(e.serverNonce),E(e.pq),e.fingerprints);const i=yield Ds.select(e.fingerprints);if(!i)throw new Error("[MT] No public key found");e.publicKey=i,d.ZP&&this.log("PQ factorization start",e.pq);try{var r=yield s.Z.invokeCrypto("factorize",e.pq)}catch(e){throw this.log.error("worker error factorize",e),e}return e.p=r[0],e.q=r[1],d.ZP&&this.log("PQ factorization done",r),this.sendReqDhParams(e)}))}sendReqDhParams(e){return Ts(this,void 0,void 0,(function*(){e.newNonce=w(new Uint8Array(32));const t={_:"p_q_inner_data_dc",pq:e.pq,p:e.p,q:e.q,nonce:e.nonce,server_nonce:e.serverNonce,new_nonce:e.newNonce,dc:0},a=new ys({mtproto:!0});a.storeObject(t,"P_Q_inner_data","DECRYPTED_DATA");const n=a.getBytes(!0);if(n.length>144)throw"DH_params: data is more than 144 bytes!";const i=Ps(n,192,!1,!0,!1),r=i.slice().reverse(),o=yield(()=>Ts(this,void 0,void 0,(function*(){for(;;){const t=w(new Uint8Array(32)),a=r.concat(yield s.Z.invokeCrypto("sha256",t.concat(i)));if(224!==a.length)throw"DH_params: dataWithHash !== 224 bytes!";const n=yield s.Z.invokeCrypto("aes-encrypt",a,t,new Uint8Array([0])),o=Es(t,yield s.Z.invokeCrypto("sha256",n)).concat(n),p=cs(o),d=is()(e.publicKey.modulus,16);if(-1===p.compare(d))return o}})))(),p=Ps(yield s.Z.invokeCrypto("rsa-encrypt",o,e.publicKey),256,!0,!0,!0),f={nonce:e.nonce,server_nonce:e.serverNonce,p:e.p,q:e.q,public_key_fingerprint:e.publicKey.fingerprint,encrypted_data:p},c=new ys({mtproto:!0});c.storeMethod("req_DH_params",f);const l=c.getBytes(!0);let m;d.ZP&&this.log("Send req_DH_params",f);try{m=yield this.sendPlainRequest(e.dcId,l)}catch(e){throw this.log.error("Send req_DH_params FAIL!",e),e}const g=m.fetchObject("Server_DH_Params","RESPONSE");if(d.ZP&&this.log("Sent req_DH_params, response:",g),"server_DH_params_fail"!==g._&&"server_DH_params_ok"!==g._)throw new Error("[MT] Server_DH_Params response invalid: "+g._);if(!(0,bs.Z)(e.nonce,g.nonce))throw new Error("[MT] Server_DH_Params nonce mismatch");if(!(0,bs.Z)(e.serverNonce,g.server_nonce))throw new Error("[MT] Server_DH_Params server_nonce mismatch");if("server_DH_params_fail"===g._){const t=(yield s.Z.invokeCrypto("sha1",e.newNonce)).slice(-16);if(!(0,bs.Z)(t,g.new_nonce_hash))throw new Error("[MT] server_DH_params_fail new_nonce_hash mismatch");throw new Error("[MT] server_DH_params_fail")}try{yield this.decryptServerDhDataAnswer(e,g.encrypted_answer)}catch(e){throw this.log.error("mtpDecryptServerDhDataAnswer FAILED!",e),e}return this.sendSetClientDhParams(e)}))}decryptServerDhDataAnswer(e,t){return Ts(this,void 0,void 0,(function*(){e.localTime=Date.now(),e.tmpAesKey=(yield s.Z.invokeCrypto("sha1",e.newNonce.concat(e.serverNonce))).concat((yield s.Z.invokeCrypto("sha1",e.serverNonce.concat(e.newNonce))).slice(0,12)),e.tmpAesIv=(yield s.Z.invokeCrypto("sha1",e.serverNonce.concat(e.newNonce))).slice(12).concat(yield s.Z.invokeCrypto("sha1",e.newNonce.concat(e.newNonce)),e.newNonce.slice(0,4));const a=new Uint8Array(yield s.Z.invokeCrypto("aes-decrypt",t,e.tmpAesKey,e.tmpAesIv)),n=a.slice(0,20),i=a.slice(20),r=new _s(i,{mtproto:!0}),o=r.fetchObject("Server_DH_inner_data");if("server_DH_inner_data"!==o._)throw new Error("[MT] server_DH_inner_data response invalid: "+o);if(!(0,bs.Z)(e.nonce,o.nonce))throw new Error("[MT] server_DH_inner_data nonce mismatch");if(!(0,bs.Z)(e.serverNonce,o.server_nonce))throw new Error("[MT] server_DH_inner_data serverNonce mismatch");d.ZP&&this.log("Done decrypting answer"),e.g=o.g,e.dhPrime=o.dh_prime,e.gA=o.g_a,e.serverTime=o.server_time,e.retry=0,this.verifyDhParams(e.g,e.dhPrime,e.gA);const p=r.getOffset();if(!(0,bs.Z)(n,yield s.Z.invokeCrypto("sha1",i.slice(0,p))))throw new Error("[MT] server_DH_inner_data SHA1 mismatch");this.timeManager.applyServerTime(e.serverTime,e.localTime)}))}verifyDhParams(e,t,a){d.ZP&&this.log("Verifying DH params",e,t,a);const s=E(t);if(3!==e||"c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b"!==s)throw new Error("[MT] DH params are not verified: unknown dhPrime");d.ZP&&this.log("dhPrime cmp OK");const n=cs(a),i=is()(s,16);if(n.compare(is().one)<=0)throw new Error("[MT] DH params are not verified: gA <= 1");if(n.compare(i.subtract(is().one))>=0)throw new Error("[MT] DH params are not verified: gA >= dhPrime - 1");d.ZP&&this.log("1 < gA < dhPrime-1 OK");const r=is()(2).pow(1984);if(n.compare(r)<0)throw new Error("[MT] DH params are not verified: gA < 2^{2048-64}");if(n.compare(i.subtract(r))>=0)throw new Error("[MT] DH params are not verified: gA > dhPrime - 2^{2048-64}");return d.ZP&&this.log("2^{2048-64} < gA < dhPrime-2^{2048-64} OK"),!0}sendSetClientDhParams(e){return Ts(this,void 0,void 0,(function*(){const t=(0,Wa.Z)(e.g.toString(16));e.b=w(new Uint8Array(256));try{var a=yield s.Z.invokeCrypto("mod-pow",t,e.b,e.dhPrime)}catch(e){throw e}const n=new ys({mtproto:!0});n.storeObject({_:"client_DH_inner_data",nonce:e.nonce,server_nonce:e.serverNonce,retry_id:[0,e.retry++],g_b:a},"Client_DH_Inner_Data");const i=(yield s.Z.invokeCrypto("sha1",n.getBuffer())).concat(n.getBytes(!0)),r=yield s.Z.invokeCrypto("aes-encrypt",i,e.tmpAesKey,e.tmpAesIv),o=new ys({mtproto:!0});let p;o.storeMethod("set_client_DH_params",{nonce:e.nonce,server_nonce:e.serverNonce,encrypted_data:r}),d.ZP&&this.log("Send set_client_DH_params");try{p=yield this.sendPlainRequest(e.dcId,o.getBytes(!0))}catch(e){throw e}const f=p.fetchObject("Set_client_DH_params_answer");if("dh_gen_ok"!==f._&&"dh_gen_retry"!==f._&&"dh_gen_fail"!==f._)throw new Error("[MT] Set_client_DH_params_answer response invalid: "+f._);if(!(0,bs.Z)(e.nonce,f.nonce))throw new Error("[MT] Set_client_DH_params_answer nonce mismatch");if(!(0,bs.Z)(e.serverNonce,f.server_nonce))throw new Error("[MT] Set_client_DH_params_answer server_nonce mismatch");try{var c=yield s.Z.invokeCrypto("mod-pow",e.gA,e.b,e.dhPrime)}catch(e){throw c}const l=yield s.Z.invokeCrypto("sha1",c),m=l.slice(0,8),g=l.slice(-8);switch(d.ZP&&this.log("Got Set_client_DH_params_answer",f._,c),f._){case"dh_gen_ok":{const t=(yield s.Z.invokeCrypto("sha1",e.newNonce.concat([1],m))).slice(-16);if(!(0,bs.Z)(t,f.new_nonce_hash1))throw this.log.error("Set_client_DH_params_answer new_nonce_hash1 mismatch",t,f),new Error("new_nonce_hash1 mismatch");const a=Es(e.newNonce.slice(0,8),e.serverNonce.slice(0,8));return d.ZP&&this.log("Auth successfull!",g,c,a),e.authKeyId=g,e.authKey=c,e.serverSalt=a,e}case"dh_gen_retry":{const t=(yield s.Z.invokeCrypto("sha1",e.newNonce.concat([2],m))).slice(-16);if(!(0,bs.Z)(t,f.new_nonce_hash2))throw new Error("[MT] Set_client_DH_params_answer new_nonce_hash2 mismatch");return this.sendSetClientDhParams(e)}case"dh_gen_fail":{const t=(yield s.Z.invokeCrypto("sha1",e.newNonce.concat([3],m))).slice(-16);if(!(0,bs.Z)(t,f.new_nonce_hash3))throw new Error("[MT] Set_client_DH_params_answer new_nonce_hash3 mismatch");throw new Error("[MT] Set_client_DH_params_answer fail")}}}))}getTransportType(){return this.getTransportTypePromise?this.getTransportTypePromise:this.getTransportTypePromise=Z.pingTransports().then((({websocket:e})=>{this.transportType=e?"websocket":"https",this.log("will use transport:",this.transportType)}))}auth(e){let t=this.cached[e];return t||(t=new Promise(((t,a)=>Ts(this,void 0,void 0,(function*(){let s;yield this.getTransportType();let n=1;for(;n++<=3;)try{const a={dcId:e,nonce:w(new Uint8Array(16))},s=this.sendReqPQ(a);return void t(yield s)}catch(e){s=e}a(s)})))),this.cached[e]=t)}}class Rs extends G{after(){this.lastMessageId=[0,0],this.timeOffset=0,Ga.Z.get("server_time_offset").then((e=>{e&&(this.timeOffset=e)}))}getServerTimeOffset(){return this.timeOffset}generateId(){const e=Date.now();let t=[Math.floor(e/1e3)+this.timeOffset,e%1e3<<21|(0,Ee.d)(16)<<3|4];return(this.lastMessageId[0]>t[0]||this.lastMessageId[0]===t[0]&&this.lastMessageId[1]>=t[1])&&(t=[this.lastMessageId[0],this.lastMessageId[1]+4]),this.lastMessageId=t,os(t[0],t[1]).toString(10)}applyServerTime(e,t){const a=e-(t=(t||Date.now())/1e3|0),s=Math.abs(this.timeOffset-a)>10;return this.lastMessageId=[0,0],this.timeOffset!==a&&(Ga.Z.set({server_time_offset:a}),this.timeOffset=a),s}}class xs{saveWebDocument(e){if(!e)return;const t=e.attributes.find((e=>"documentAttributeImageSize"===e._));return t&&(e.w=t.w,e.h=t.h),e}}class Bs extends G{getInputInvoiceBySlug(e){return{_:"inputInvoiceSlug",slug:e}}getInputInvoiceByPeerId(e,t){return{_:"inputInvoiceMessage",peer:this.appPeersManager.getInputPeerById(e),msg_id:(0,oe.Z)(t)}}getPaymentForm(e){return this.apiManager.invokeApi("payments.getPaymentForm",{invoice:e}).then((e=>(this.appUsersManager.saveApiUsers(e.users),e)))}getPaymentReceipt(e,t){return this.apiManager.invokeApi("payments.getPaymentReceipt",{peer:this.appPeersManager.getInputPeerById(e),msg_id:(0,oe.Z)(t)}).then((e=>(this.appUsersManager.saveApiUsers(e.users),e)))}validateRequestedInfo(e,t,a){return this.apiManager.invokeApi("payments.validateRequestedInfo",{save:a,invoice:e,info:t})}sendPaymentForm(e,t,a,s,n,i){return this.apiManager.invokeApi("payments.sendPaymentForm",{form_id:t,invoice:e,requested_info_id:a,shipping_option_id:s,credentials:n,tip_amount:i||void 0}).then((e=>("payments.paymentResult"===e._&&this.apiUpdatesManager.processUpdateMessage(e.updates),e)))}clearSavedInfo(e,t){return this.apiManager.invokeApi("payments.clearSavedInfo",{info:e,credentials:t})}}var Vs=a(8794);class Os extends G{constructor(){super(...arguments),this.clear=(e=!1)=>{e?this.attachMenuBots=new Map:(this.attachMenuBots.clear(),this.attachMenuBotsArr=void 0)},this.onUpdateAttachMenuBots=e=>{this.clear(),this.getAttachMenuBots()}}after(){this.clear(!0),this.apiUpdatesManager.addMultipleEventsListeners({updateAttachMenuBots:this.onUpdateAttachMenuBots})}saveAttachMenuBot(e){this.attachMenuBots.set(e.bot_id,e);const t=(0,Vs.Z)(e);return t.icon=this.appDocsManager.saveDoc(t.icon,{type:"attachMenuBotIcon",botId:e.bot_id}),e}saveAttachMenuBots(e){e.saved||(e.saved=!0,e.forEach((e=>this.saveAttachMenuBot(e))))}getAttachMenuBots(){var e;return null!==(e=this.attachMenuBotsArr)&&void 0!==e?e:this.apiManager.invokeApiSingleProcess({method:"messages.getAttachMenuBots",processResult:e=>((0,ue.Z)(e),this.appUsersManager.saveApiUsers(e.users),this.saveAttachMenuBots(e.bots),this.attachMenuBotsArr=e.bots.slice(0,0))})}getAttachMenuBotCached(e){return this.attachMenuBots.get(e)}getAttachMenuBot(e,t){throw this.appUsersManager.isAttachMenuBot(e),(0,X.Z)("BOT_INVALID")}requestWebView(e){const{botId:t,peerId:a,url:s,fromBotMenu:n,themeParams:i,replyToMsgId:r,silent:o,sendAsPeerId:p,startParam:d,threadId:f}=e;return this.apiManager.invokeApiSingleProcess({method:"messages.requestWebView",params:{peer:this.appPeersManager.getInputPeerById(a),bot:this.appUsersManager.getUserInput(t),silent:o,platform:"web",url:s,reply_to_msg_id:r?(0,oe.Z)(r):void 0,from_bot_menu:n,theme_params:i,send_as:p?this.appPeersManager.getInputPeerById(p):void 0,start_param:d,top_msg_id:f?(0,oe.Z)(f):void 0},processResult:e=>(console.log(e),e)})}prolongWebView(e){return this.apiManager.invokeApiSingleProcess({method:"messages.prolongWebView",params:{peer:this.appPeersManager.getInputPeerById(e.peerId),bot:this.appUsersManager.getUserInput(e.botId),query_id:e.queryId,silent:e.silent,reply_to_msg_id:e.replyToMsgId?(0,oe.Z)(e.replyToMsgId):void 0,send_as:e.sendAsPeerId?this.appPeersManager.getInputPeerById(e.sendAsPeerId):void 0,top_msg_id:e.threadId?(0,oe.Z)(e.threadId):void 0},processResult:e=>{console.log(e)}})}toggleBotInAttachMenu(e,t,a){return this.apiManager.invokeApiSingleProcess({method:"messages.toggleBotInAttachMenu",params:{bot:this.appUsersManager.getUserInput(e),enabled:t,write_allowed:a},processResult:()=>{this.apiUpdatesManager.processLocalUpdate({_:"updateAttachMenuBots"})}})}}class Ls extends G{requestUrlAuth(e,t,a,s){return this.apiManager.invokeApi("messages.requestUrlAuth",{button_id:s,msg_id:a?(0,oe.Z)(a):void 0,peer:t?this.appPeersManager.getInputPeerById(t):void 0,url:e}).then((e=>("urlAuthResultRequest"===e._&&this.appUsersManager.saveApiUser(e.bot),e)))}acceptUrlAuth(e,t,a,s,n){return this.apiManager.invokeApi("messages.acceptUrlAuth",{button_id:s,msg_id:a?(0,oe.Z)(a):void 0,peer:t?this.appPeersManager.getInputPeerById(t):void 0,url:e,write_allowed:n}).then((e=>e))}getWebAuthorizations(){return this.apiManager.invokeApi("account.getWebAuthorizations").then((e=>(this.appUsersManager.saveApiUsers(e.users),e.authorizations)))}resetWebAuthorization(e){return this.apiManager.invokeApi("account.resetWebAuthorization",{hash:e})}resetWebAuthorizations(){return this.apiManager.invokeApi("account.resetWebAuthorizations")}}class Ns extends G{after(){this.wallPapers={}}saveWallPaper(e){return e?("wallPaperNoFile"!==e._&&(e.document=this.appDocsManager.saveDoc(e.document,{type:"wallPaper",wallPaperId:e.id})),this.wallPapers[e.id]=e,e):e}getWallPaper(e){return this.apiManager.invokeApiSingleProcess({method:"account.getWallPaper",params:{wallpaper:e},processResult:e=>this.saveWallPaper(e)})}getInputWallPaper(e){return"string"==typeof e?{_:"inputWallPaperSlug",slug:e}:"wallPaperNoFile"===e._?{_:"inputWallPaperNoFile",id:e.id}:{_:"inputWallPaper",id:e.id,access_hash:e.access_hash}}getWallPaperById(e){const t=this.wallPapers[e];return this.getWallPaper(this.getInputWallPaper(t))}getThemes(){return this.apiManager.invokeApiSingleProcess({method:"account.getThemes",params:{format:"macos",hash:0},processResult:e=>((0,ue.Z)(e),e.themes.forEach((e=>{e.settings&&e.settings.forEach((e=>{e.wallpaper=this.saveWallPaper(e.wallpaper)}))})),e.themes)})}getWallPapers(){return this.apiManager.invokeApiHashable({method:"account.getWallPapers"}).then((e=>{const t=e.wallpapers;return t.forEach(((e,t,a)=>{a[t]=this.saveWallPaper(e)})),t}))}}const Zs=new class{constructor(){this.cryptoWorkersURLs=[],this.cryptoPortsAttached=0,this.cryptoPortPromise=(0,v.Z)(),this.cryptoPortPromise.then((()=>{this.cryptoPortPromise=void 0}))}start(){const e=f.Z.getInstance();e.addEventListener("manager",(({name:e,method:t,args:a})=>(0,q.Z)(this.getManagers(),(s=>{const n=s[e];return n[t].apply(n,a)})))),e.addEventListener("cryptoPort",((e,t,a)=>{var n;const i=a.ports[0];this.cryptoPortsAttached>=this.cryptoWorkersURLs.length?i.close():(++this.cryptoPortsAttached,s.Z.attachPort(i),null===(n=this.cryptoPortPromise)||void 0===n||n.resolve())})),e.addEventListener("createProxyWorkerURLs",(({originalUrl:e,blob:t})=>{let a=this.cryptoWorkersURLs.length;a||(this.cryptoWorkersURLs.push(e),++a);const s=_.Z.cryptoWorkers;if(a===s)return this.cryptoWorkersURLs;const n=new Array(s-a).fill(void 0).map((()=>URL.createObjectURL(t)));return this.cryptoWorkersURLs.push(...n),this.cryptoWorkersURLs}))}createManagers(){return e=this,t=void 0,n=function*(){const e=new $;yield Promise.all([e.loadStorages(),this.cryptoPortPromise]);const t=yield function(e,t){const a={appPeersManager:new ca,appChatsManager:new Ve,appDocsManager:new _t,appPhotosManager:new la,appPollsManager:new ma,appUsersManager:new Ua,appWebPagesManager:new Ea,appDraftsManager:new Pt,appProfileManager:new ya,appNotificationsManager:new ia,apiUpdatesManager:new Ue,appAvatarsManager:new De,appGroupCallsManager:new wt,appCallsManager:new Fe,appReactionsManager:new Ma,appMessagesManager:new aa,appMessagesIdsManager:new Ft,appPrivacyManager:new ga,appInlineBotsManager:new Et,appStickersManager:new wa,referenceDatabase:new ee,appEmojiManager:new It,filtersStorage:new Ce,dialogsStorage:new _e,apiManager:new $a,cryptoWorker:s.Z,passwordManager:new Q,apiFileManager:new qa,peersStorage:new Ya,thumbsStorage:new es,networkerFactory:new Us,rootScope:new l,authorizer:new Fs,dcConfigurator:new O,timeManager:new Rs,appStoragesManager:e,appStateManager:y,appWebDocsManager:new xs,appPaymentsManager:new Bs,appAttachMenuBotsManager:new Os,appSeamlessLoginManager:new Ls,appThemesManager:new Ns};for(const e in a){const t=a[e];t&&(t.setManagers&&(t.setManagers(a),delete t.setManagers),T.Z[e]=t)}const n=[];let i=Object.keys(a);i.unshift("appUsersManager","appChatsManager","appNotificationsManager","appMessagesManager","dialogsStorage"),i=(0,we.Z)(i);for(const e of i){const t=a[e];if(null==t?void 0:t.after){const e=t.after();n.push(e)}}return t&&a.apiManager.setUserAuth(t),Promise.all(n).then((()=>a))}(e,y.userId);return this.managers=t},new((a=void 0)||(a=Promise))((function(s,i){function r(e){try{p(n.next(e))}catch(e){i(e)}}function o(e){try{p(n.throw(e))}catch(e){i(e)}}function p(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,o)}p((n=n.apply(e,t||[])).next())}));var e,t,a,n}getManagers(){var e;return null!==(e=this.managers)&&void 0!==e?e:this.managers=this.createManagers()}};d.GO&&(d.GO.appManagersManager=Zs);const js=Zs;var qs=a(3655);let Gs,Hs,Ws=!0;function zs(){return Ws}function Ks(){return Ws?Gs:void 0}const Js=(0,S.kg)("MTPROTO"),$s=new f.Z;$s.addMultipleEventsListeners({environment:e=>{r(e),Z.waitForWebSocket()},crypto:({method:e,args:t})=>s.Z.invokeCrypto(e,...t),state:({state:e,resetStorages:t,pushedKeys:a,newVersion:s,oldVersion:n,userId:i})=>{Js("got state",e,a),y.userId=i,y.newVersion=s,y.oldVersion=n,Object.keys(e).forEach((t=>{y.pushToState(t,e[t],!0,!a.includes(t))})),j.resolve(t)},toggleStorages:({enabled:e,clearWrite:t})=>(0,Ka.Z)(e,t),event:(e,t)=>{Js("will redirect event",e,t),$s.invokeExceptSource("event",e,t)},serviceWorkerOnline:e=>{Ws=e},serviceWorkerPort:(e,t,a)=>{Gs?(Gs.detachPort(Hs),Hs=void 0):(Gs=new qs.Z,Gs.addMultipleEventsListeners({requestFilePart:e=>(0,q.Z)(js.getManagers(),(t=>{const{docId:a,dcId:s,offset:n,limit:i}=e;return t.appDocsManager.requestDocPart(a,s,n,i)}))})),(Hs=a.ports[0])&&Gs.attachPort(Hs)},createObjectURL:e=>URL.createObjectURL(e)}),Js("MTProto start"),js.start(),js.getManagers(),Wt.start(),function(e,t,a){const s=(a,s)=>{e.attachListenPort(a),s&&e.attachSendPort(s),null==t||t(a)};e.setOnPortDisconnect((e=>{Wt.deleteTab(e)})),"undefined"!=typeof SharedWorkerGlobalScope?T.Z.addEventListener("connect",(e=>s(e.source,e.source))):"undefined"!=typeof ServiceWorkerGlobalScope?s(T.Z,null):s(T.Z,T.Z)}($s,(e=>{Wt.addTab(e)}))},1507:(e,t,a)=>{a.d(t,{BP:()=>f,BX:()=>l,DZ:()=>h,Gu:()=>u,IA:()=>i,Iw:()=>p,J$:()=>m,NM:()=>s,Ox:()=>c,Pt:()=>d,Zi:()=>g,hj:()=>n,rU:()=>o,yF:()=>r});const s=0,n=1271266957,i=777,r=777e3,o=2147483647,p=20971520,d="",f="default_static",c=4295032831,l=new Set(["web","k","z"]),m=0,g=1,h=new Set([m,g]),u=Math.max(...Array.from(h))+1},2423:(e,t,a)=>{a.d(t,{$2:()=>l,E:()=>m,He:()=>y,QB:()=>g,SC:()=>h,bu:()=>d,it:()=>p,kO:()=>_,tY:()=>u});var s=a(1229);const n="a-z\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff\\u0100-\\u024f\\u0253\\u0254\\u0256\\u0257\\u0259\\u025b\\u0263\\u0268\\u026f\\u0272\\u0289\\u028b\\u02bb\\u0300-\\u036f\\u1e00-\\u1eff\\u0400-\\u04ff\\u0500-\\u0527\\u2de0-\\u2dff\\ua640-\\ua69f\\u0591-\\u05bf\\u05c1-\\u05c2\\u05c4-\\u05c5\\u05c7\\u05d0-\\u05ea\\u05f0-\\u05f4\\ufb1d-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufb4f\\u0610-\\u061a\\u0620-\\u065f\\u066e-\\u06d3\\u06d5-\\u06dc\\u06de-\\u06e8\\u06ea-\\u06ef\\u06fa-\\u06fc\\u06ff\\u0750-\\u077f\\u08a0\\u08a2-\\u08ac\\u08e4-\\u08fe\\ufb50-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\u200c\\u0e01-\\u0e3a\\u0e40-\\u0e4e\\u1100-\\u11ff\\u3130-\\u3185\\uA960-\\uA97F\\uAC00-\\uD7AF\\uD7B0-\\uD7FF\\u3003\\u3005\\u303b\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uff9f\\uffa1-\\uffdc",i="0-9_"+n,r="["+n+"0-9]",o="((?:https?|ftp)://|mailto:)?",p=o+"(?:"+r+"{1,64}(?::"+r+"{0,64})?@)?(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}|"+r+"["+n+"·0-9-]{0,64}(?:\\."+r+"["+n+"·0-9-]{0,64}){0,10}(?:\\.(xn--[0-9a-z]{2,16}|["+n+"]{2,24})))(?::\\d{2,5})?(?:/(?:\\S{0,255}[^\\s.;,(\\[\\]{}<>\"'])?)?",d=(new RegExp("^"+o.slice(0,-1),"i"),/^((?:[^\/]+?):\/\/|mailto:)/),f="[a-zA-Z\\d_]{5,32}",c="\\/([a-zA-Z\\d_]{1,32})(?:@("+f+"))?(\\b|$)",l=new RegExp("(^| )(@)("+f+")|("+p+")|(\\n)|("+s.Z+")|(^|[\\s\\(\\]])(#["+i+"]{2,64})|(^|\\s)"+c+"|(?:\\s|^)((?:\\d{1,2}:)?(?:[0-5]?[0-9]):(?:[0-5][0-9]))(?:\\s|$)","i"),m=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,g=/(^|\s|\n)(````?)([\s\S]+?)(````?)([\s\n\.,:?!;]|$)|(^|\s|\x01)(`|~~|\*\*|__|_-_|\|\|)([^\n]+?)\7([\x01\s\.,:?!;]|$)|@(\d+)\s*\((.+?)\)|(\[(.+?)\]\((.+?)\))/m,h={"`":"messageEntityCode","``":"messageEntityPre","**":"messageEntityBold",__:"messageEntityItalic","~~":"messageEntityStrike","_-_":"messageEntityUnderline","||":"messageEntitySpoiler"},u=(new Set(Object.values(h)),new Set(["messageEntityEmoji","messageEntityLinebreak","messageEntityCaret"])),y=new Set(u);for(const e in h)u.add(h[e]);const _=/^\+\d+$/},671:(e,t,a)=>{function s(e){return function(e){const t=[];let a=0,s=0,n=0;for(;n<e.length;)a=e.charCodeAt(n++),s?(t.push((65536+(s-55296<<10)+(a-56320)).toString(16)),s=0):a>55296&&a<=56319?s=a:t.push(a.toString(16));return t.length&&2===t[0].length&&(t[0]="00"+t[0]),t}(r(e)).join("-")}a.d(t,{N0:()=>s});const n=/\uFE0F/g,i=String.fromCharCode(8205),r=e=>e.indexOf(i)<0?e.replace(n,""):e;new Map([["FT","ðŸ´â€â˜ "]])}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=a,n.x=()=>{var e=n.O(void 0,[699,211,147,85,110],(()=>n(9092)));return n.O(e)},e=[],n.O=(t,a,s,i)=>{if(!a){var r=1/0;for(f=0;f<e.length;f++){for(var[a,s,i]=e[f],o=!0,p=0;p<a.length;p++)(!1&i||r>=i)&&Object.keys(n.O).every((e=>n.O[e](a[p])))?a.splice(p--,1):(o=!1,i<r&&(r=i));if(o){e.splice(f--,1);var d=s();void 0!==d&&(t=d)}}return t}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[a,s,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,a)=>(n.f[a](e,t),t)),[])),n.u=e=>85===e?"85.c5a45a5b8327be101844.bundle.js":110===e?"110.874d0e79405a58485218.bundle.js":({211:"npm.big-integer",699:"npm.pako"}[e]||e)+"."+{8:"cf6e90ba29bab54a0fb4",104:"bee5f0bbe29853cada3e",147:"6f6c83fdc631d19a7e7c",211:"90cabec21bed7a4914fb",301:"a138ad85c3f7c5e382bf",642:"132edec52b1af2104857",699:"884971942c090de521c4"}[e]+".chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var a=t.getElementsByTagName("script");a.length&&(e=a[a.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{if(void 0!==n){var e=n.u,t=n.e,a={},s={};n.u=function(t){return e(t)+(a.hasOwnProperty(t)?"?"+a[t]:"")},n.e=function(i){return t(i).catch((function(t){var r=s.hasOwnProperty(i)?s[i]:999999;if(r<1){var o=e(i);throw t.message="Loading chunk "+i+" failed after 999999 retries.\n("+o+")",t.request=o,t}return new Promise((function(e){setTimeout((function(){var t=Date.now();a[i]=t,s[i]=r-1,e(n.e(i))}),3e3)}))}))}}})(),(()=>{var e={678:1};n.f.i=(t,a)=>{e[t]||importScripts(n.p+n.u(t))};var t=this.webpackChunktweb=this.webpackChunktweb||[],a=t.push.bind(t);t.push=t=>{var[s,i,r]=t;for(var o in i)n.o(i,o)&&(n.m[o]=i[o]);for(r&&r(n);s.length;)e[s.pop()]=1;a(t)}})(),t=n.x,n.x=()=>Promise.all([699,211,147,85,110].map(n.e,n)).then(t),n.x()})(); //# sourceMappingURL=mtproto.worker.a04c39423ada106790f8.chunk.js.map