telegram-tt/dist/main.af5bd185d96d3f084d63.js
Alexander Zinchuk 4ddbed39c1 [Build]
2021-08-07 17:06:13 +03:00

2 lines
198 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){function t(t){for(var n,r,o=t[0],c=t[1],d=0,a=[];d<o.length;d++)r=o[d],Object.prototype.hasOwnProperty.call(u,r)&&u[r]&&a.push(u[r][0]),u[r]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(i&&i(t);a.length;)a.shift()()}var n={},r={2:0},u={2:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[];r[e]?t.push(r[e]):0!==r[e]&&{0:1,3:1,4:1,5:1,6:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var u=({}[e]||e)+"."+{0:"e84aae32c1142e0538ad",1:"6110220c0cd22a07afe2",3:"86fc6942f17ca54599b3",4:"7cbc0883ea4cc7908cba",5:"64e3757d90b4958d12d9",6:"f9e82031a240faaf8916",7:"f986b85fa2f7f58a12de",8:"b1c64eac1a0833d4fa35",9:"8ce2b842c50b69d2f741",10:"0f031682109823f02d37"}[e]+".css",c=o.p+u,d=document.getElementsByTagName("link"),a=0;a<d.length;a++){var i=(f=d[a]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(i===u||i===c))return t()}var s=document.getElementsByTagName("style");for(a=0;a<s.length;a++){var f;if((i=(f=s[a]).getAttribute("data-href"))===u||i===c)return t()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=t,l.onerror=function(t){var u=t&&t.target&&t.target.src||c,o=new Error("Loading CSS chunk "+e+" failed.\n("+u+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=u,delete r[e],l.parentNode.removeChild(l),n(o)},l.href=c,document.getElementsByTagName("head")[0].appendChild(l)})).then((function(){r[e]=0})));var n=u[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,r){n=u[e]=[t,r]}));t.push(n[2]=c);var d,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+e+"."+{0:"e84aae32c1142e0538ad",1:"6110220c0cd22a07afe2",3:"86fc6942f17ca54599b3",4:"7cbc0883ea4cc7908cba",5:"64e3757d90b4958d12d9",6:"f9e82031a240faaf8916",7:"f986b85fa2f7f58a12de",8:"b1c64eac1a0833d4fa35",9:"8ce2b842c50b69d2f741",10:"0f031682109823f02d37"}[e]+".js"}(e);var i=new Error;d=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=u[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}u[e]=void 0}};var s=setTimeout((function(){d({type:"timeout",target:a})}),12e4);a.onerror=a.onload=d,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackJsonp=window.webpackJsonp||[],d=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var i=d;o(o.s=104)}([function(e,t,n){"use strict";n.d(t,"e",(function(){return l})),n.d(t,"g",(function(){return b})),n.d(t,"d",(function(){return m})),n.d(t,"f",(function(){return p})),n.d(t,"j",(function(){return I})),n.d(t,"c",(function(){return C})),n.d(t,"l",(function(){return E})),n.d(t,"i",(function(){return S})),n.d(t,"b",(function(){return A})),n.d(t,"k",(function(){return k})),n.d(t,"r",(function(){return T})),n.d(t,"n",(function(){return P})),n.d(t,"o",(function(){return D})),n.d(t,"p",(function(){return L})),n.d(t,"m",(function(){return x})),n.d(t,"q",(function(){return F})),n.d(t,"h",(function(){return B}));var r=n(2),u=n(10),o=n(3),c=n(28),d=n(27),a=n(38);let i;!function(e){e[e.Empty=0]="Empty",e[e.Text=1]="Text",e[e.Tag=2]="Tag",e[e.Component=3]="Component"}(i||(i={}));const s=Symbol("Fragment");let f;function l(e){return e.type===i.Empty}function b(e){return e.type===i.Text}function h(e){return e.type===i.Tag}function m(e){return e.type===i.Component}function p(e){return h(e)||m(e)}function g(e,t,...n){return t||(t={}),n=Object(o.h)(n),e===s?n:"function"==typeof e?function(e,t,n){let r;0===n.length?r=void 0:1===n.length?[r]=n:r=n;const u={$element:{},Component:e,name:e.name,props:{...t,...r&&{children:r}},isMounted:!1,hooks:{state:{cursor:0,byCursor:[]},effects:{cursor:0,byCursor:[]},memos:{cursor:0,byCursor:[]}}};return u.$element=y(u),u.$element}(e,t,n):function(e,t,n){return{type:i.Tag,tag:e,props:t,children:v(n).map(j)}}(e,t,n)}function y(e,t=[]){const{props:n}=e;return{componentInstance:e,type:i.Component,props:n,children:t}}function v(e){let t=e.length-1;for(;t>=0&&O(e[t]);t--);return t+1<e.length?e.slice(0,t+1):e}function O(e){return!1===e||null==e}function j(e){return O(e)?{type:i.Empty}:p(e)?e:(t=e,{type:i.Text,value:String(t)});var t}const w={};function I(e){f=e,e.hooks.state.cursor=0,e.hooks.effects.cursor=0,e.hooks.memos.cursor=0;const{Component:t,props:n}=e;let u;try{let o;if(r.r){const t=e.name;w[t]||(w[t]={componentName:t,renderCount:0,renderTimes:[]}),r.t&&"TeactMemoWrapper"!==t&&"TeactNContainer"!==t&&console.log("[Teact] Render "+t),o=performance.now()}if(u=t(n),r.r){const t=performance.now()-o,n=e.name;t>7&&console.warn(`[Teact] Slow component render: ${n}, ${Math.round(t)} ms`),w[n].renderTimes.push(t),w[n].renderCount++}}catch(t){Object(d.a)(t),u=e.renderedValue}if(e.isMounted&&u===e.renderedValue)return e.$element;e.renderedValue=u;const o=j(u);return e.$element=y(e,[o]),e.$element}function C(e,t){return typeof e!=typeof t||(e.type!==t.type||(b(e)&&b(t)?e.value!==t.value:h(e)&&h(t)?e.tag!==t.tag||e.props.key!==t.props.key:!(!m(e)||!m(t))&&(e.componentInstance.Component!==t.componentInstance.Component||e.props.key!==t.props.key)))}function E(e){p(e)&&(m(e)?function(e){if(!e.isMounted)return;e.hooks.memos.byCursor.forEach(e=>{e.current=null}),e.hooks.effects.byCursor.forEach(({cleanup:e})=>{if("function"==typeof e)try{e()}catch(e){Object(d.a)(e)}}),e.isMounted=!1,function(e){e.hooks.effects.byCursor.forEach(e=>{e.cleanup=null,e.effect=null,e.dependencies=null}),e.hooks.state.byCursor.forEach(e=>{e.value=null,e.nextValue=null,e.setter=null}),e.hooks.memos.byCursor.forEach(e=>{e.dependencies=null}),e.hooks=null,e.$element=null,e.renderedValue=null,e.Component=null,e.props=null,e.forceUpdate=null,e.onUpdate=null}(e)}(e.componentInstance):e.target&&(Object(a.b)(e.target),e.target=null),e.children.forEach(E))}function S(e){return I(e),e.isMounted=!0,e.$element}function M(e){if(!e.isMounted||!e.onUpdate)return;const t=e.$element;I(e),e.$element!==t&&e.onUpdate()}function A(e){return m(e)?A(e.children[0]):e.target}function k(e,t){m(e)?k(e.children[0],t):e.target=t}function T(e){const{cursor:t,byCursor:n}=f.hooks.state;var o;return void 0===n[t]&&(n[t]={value:e,nextValue:e,setter:(o=f,e=>{n[t].nextValue!==e&&(n[t].nextValue="function"==typeof e?e(n[t].value):e,o.prepareForFrame&&o.forceUpdate||(o.prepareForFrame=Object(u.i)(()=>function e(t){t.isMounted&&(t.hooks.state.byCursor.forEach(e=>{e.value=e.nextValue}),t.prepareForFrame=Object(u.i)(()=>e(t)),t.forceUpdate=Object(u.j)(()=>M(t)))}(o)),o.forceUpdate=Object(u.j)(()=>M(o))),o.prepareForFrame(),o.forceUpdate(),r.t&&"TeactNContainer"!==o.name&&console.log("[Teact.useState]",o.name,o.Component&&o.Component.DEBUG_contentComponentName?"> "+o.Component.DEBUG_contentComponentName:"",`Forced update at cursor #${t}, next value: `,n[t].nextValue))})}),f.hooks.state.cursor++,[n[t].value,n[t].setter]}function N(e,t,n,r){const{cursor:u,byCursor:o}=f.hooks.effects,c=f,a=()=>{if(!c.isMounted)return;const{cleanup:e}=o[u];if("function"==typeof e)try{e()}catch(e){Object(d.a)(e)}o[u].cleanup=t()};if(void 0!==o[u]&&n&&o[u].dependencies){if(n.some((e,t)=>e!==o[u].dependencies[t])){if(r){const e=n.reduce((e,t,n)=>{const r=o[u].dependencies[n];return t!==r&&e.push(`${n}: ${r} => ${t}`),e},[]);console.log("[Teact]",r,"Effect caused by dependencies.",e.join(", "))}e(a)}}else e(a);o[u]={effect:t,dependencies:n,cleanup:o[u]?o[u].cleanup:void 0},f.hooks.effects.cursor++}function P(e,t,n){return N(u.b,e,t,n)}function D(e,t,n){return N(u.e,e,t,n)}function L(e,t,n){const{cursor:u,byCursor:o}=f.hooks.memos;let{current:d}=o[u]||{};return(void 0===o[u]||t.some((e,t)=>e!==o[u].dependencies[t]))&&(r.r&&n&&console.log(`[Teact.useMemo] ${f.name} (${n}): Update is caused by:`,o[u]?Object(c.b)(t,o[u].dependencies).join(", "):"[first render]"),d=e()),o[u]={current:d,dependencies:t},f.hooks.memos.cursor++,d}function x(e,t){return L(()=>e,t)}function F(e){return L(()=>({current:e}),[])}function B(e,t=c.a,n){return function(u){const o=F(u),d=F();return(!d.current||o.current&&!t(o.current,u))&&(r.r&&n&&console.log(`[Teact.memo] ${e.name} (${n}): Update is caused by:`,Object(c.b)(o.current,u).join(", ")),o.current=u,d.current=g(e,u)),d.current}}document.addEventListener("dblclick",()=>{console.log("COMPONENTS",Object(o.k)(Object.values(w),"renderCount","desc"))}),t.a={createElement:g,Fragment:s}},function(e,t,n){"use strict";n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return O})),n.d(t,"d",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return I})),n.d(t,"f",(function(){return C})),n.d(t,"h",(function(){return E}));var r=n(0),u=n(2),o=n(31),c=n(33),d=n(10),a=n(28),i=n(3),s=n(27);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.c=r.a;let l={};const b={},h=[function(){let e;u.r&&(e=performance.now());for(const e of p.values()){const{mapStateToProps:t,mapReducersToProps:n,ownProps:r,mappedProps:o,forceUpdate:c}=e;let d;try{d={...t(l,r),...n(v,m)}}catch(e){return void Object(s.a)(e)}u.r&&Object.values(d).some(Number.isNaN)&&console.warn(`[TeactN] Some of \`${e.DEBUG_componentName}\` mappers contain NaN values. This may cause redundant updates because of incorrect equality check.`),Object.keys(d).length&&!Object(a.a)(o,d)&&(u.t&&console.log("[TeactN] Will update",e.DEBUG_componentName,"caused by",Object(a.b)(o,d).join(", ")),e.mappedProps=d,e.areMappedPropsChanged=!0,e.DEBUG_updates++,c())}if(u.r){const t=performance.now()-e;t>7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],m={},p=new Map;function g(){h.forEach(e=>e(l))}const y=Object(d.j)(g);function v(e,t=!1){"object"==typeof e&&e!==l&&(l=e,t?g():y())}function O(){return l}function j(){return m}function w(e,t){b[e]||(b[e]=[],m[e]=(t,n=!1)=>{!function(e,t,n){b[e]&&b[e].forEach(e=>{const r=e(l,m,t);r&&v(r,n)})}(e,t,n)}),b[e].push(t)}function I(e){h.push(e)}function C(e){const t=h.indexOf(e);-1!==t&&h.splice(t,1)}function E(e=(()=>({})),t=(()=>({}))){return n=>function u(d){u.DEBUG_contentComponentName=n.name;const[i]=Object(r.r)(Object(c.a)(p)),b=Object(o.a)();Object(r.n)(()=>()=>{p.delete(i)},[i]);let h=p.get(i);if(h||(h={mapStateToProps:e,mapReducersToProps:t,ownProps:d,areMappedPropsChanged:!1,forceUpdate:b,DEBUG_updates:0,DEBUG_componentName:n.name},p.set(i,h)),h.areMappedPropsChanged&&(h.areMappedPropsChanged=!1),!h.mappedProps||!Object(a.a)(h.ownProps,d)){h.ownProps=d;try{h.mappedProps={...e(l,d),...t(v,m)}}catch(e){Object(s.a)(e)}}return r.a.createElement(n,f({},h.mappedProps,d))}}u.r&&(window.getGlobal=O,document.addEventListener("dblclick",()=>{console.log("GLOBAL CONTAINERS",Object(i.k)(Array.from(p.values()).map(({DEBUG_componentName:e,DEBUG_updates:t})=>({DEBUG_componentName:e,DEBUG_updates:t})),"DEBUG_updates","desc"))}))},function(e,t,n){"use strict";n.d(t,"pb",(function(){return r})),n.d(t,"L",(function(){return u})),n.d(t,"g",(function(){return o})),n.d(t,"h",(function(){return c})),n.d(t,"r",(function(){return d})),n.d(t,"t",(function(){return a})),n.d(t,"N",(function(){return i})),n.d(t,"s",(function(){return s})),n.d(t,"zb",(function(){return f})),n.d(t,"Q",(function(){return l})),n.d(t,"I",(function(){return b})),n.d(t,"J",(function(){return h})),n.d(t,"H",(function(){return m})),n.d(t,"K",(function(){return p})),n.d(t,"X",(function(){return g})),n.d(t,"Y",(function(){return y})),n.d(t,"Z",(function(){return v})),n.d(t,"ab",(function(){return O})),n.d(t,"o",(function(){return j})),n.d(t,"O",(function(){return w})),n.d(t,"jb",(function(){return C})),n.d(t,"fb",(function(){return E})),n.d(t,"gb",(function(){return S})),n.d(t,"hb",(function(){return M})),n.d(t,"k",(function(){return A})),n.d(t,"m",(function(){return k})),n.d(t,"l",(function(){return T})),n.d(t,"Ab",(function(){return N})),n.d(t,"ib",(function(){return P})),n.d(t,"G",(function(){return D})),n.d(t,"cb",(function(){return L})),n.d(t,"bb",(function(){return x})),n.d(t,"qb",(function(){return F})),n.d(t,"Qb",(function(){return B})),n.d(t,"a",(function(){return R})),n.d(t,"f",(function(){return U})),n.d(t,"e",(function(){return _})),n.d(t,"d",(function(){return $})),n.d(t,"w",(function(){return G})),n.d(t,"M",(function(){return W})),n.d(t,"U",(function(){return H})),n.d(t,"y",(function(){return z})),n.d(t,"z",(function(){return K})),n.d(t,"A",(function(){return V})),n.d(t,"wb",(function(){return q})),n.d(t,"vb",(function(){return J})),n.d(t,"lb",(function(){return Q})),n.d(t,"kb",(function(){return Y})),n.d(t,"ob",(function(){return Z})),n.d(t,"nb",(function(){return X})),n.d(t,"mb",(function(){return ee})),n.d(t,"T",(function(){return te})),n.d(t,"c",(function(){return ne})),n.d(t,"B",(function(){return re})),n.d(t,"D",(function(){return ue})),n.d(t,"C",(function(){return oe})),n.d(t,"E",(function(){return ce})),n.d(t,"Ib",(function(){return de})),n.d(t,"Jb",(function(){return ae})),n.d(t,"Cb",(function(){return ie})),n.d(t,"Db",(function(){return se})),n.d(t,"Lb",(function(){return fe})),n.d(t,"Gb",(function(){return le})),n.d(t,"Mb",(function(){return be})),n.d(t,"Nb",(function(){return he})),n.d(t,"Kb",(function(){return me})),n.d(t,"Ob",(function(){return pe})),n.d(t,"Eb",(function(){return ge})),n.d(t,"Fb",(function(){return ye})),n.d(t,"Hb",(function(){return ve})),n.d(t,"db",(function(){return Oe})),n.d(t,"j",(function(){return je})),n.d(t,"eb",(function(){return we})),n.d(t,"Bb",(function(){return Ie})),n.d(t,"n",(function(){return Ce})),n.d(t,"rb",(function(){return Ee})),n.d(t,"sb",(function(){return Se})),n.d(t,"ub",(function(){return Me})),n.d(t,"tb",(function(){return Ae})),n.d(t,"yb",(function(){return ke})),n.d(t,"b",(function(){return Te})),n.d(t,"i",(function(){return Ne})),n.d(t,"W",(function(){return Pe})),n.d(t,"V",(function(){return De})),n.d(t,"xb",(function(){return Le})),n.d(t,"u",(function(){return xe})),n.d(t,"v",(function(){return Fe})),n.d(t,"P",(function(){return Be})),n.d(t,"Pb",(function(){return Re})),n.d(t,"S",(function(){return Ue})),n.d(t,"F",(function(){return _e})),n.d(t,"R",(function(){return $e})),n.d(t,"p",(function(){return Ge})),n.d(t,"q",(function(){return We})),n.d(t,"x",(function(){return He}));const r="Telegram",u=" [Inactive]",o="Telegram WebZ",c="1.9.2",d=!1,a=!1,i=!1,s="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",f="user_auth",l="GramJs:sessionId",b=!1,h="tt-global-state",m=30,p=5e3,g=!1,y="tt-media",v="tt-media-avatars",O="tt-media-progressive",j="tt-custom-bg",w="tt-lang-packs-v5",I="undefined"!=typeof window&&window.innerHeight>=900,C=1,E=750,S=I?60:40,M=2*S,A=72,k=I?30:25,T=100,N=42,P=42,D=20,L=30,x=200,F=500,B=20,R=!1,U=0,_=2,$=_,G=16,W=17,H=15,z=1e4,K="editable-message-text",V="editable-message-text-modal",q=1440,J=1150,Q=1275,Y=925,Z=600,X=950,ee=450,te=1e9,ne=100,re=1500,ue=250,oe=600,ce=500,de=(Math.round((ue+oe)/2),new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),13),ae=11,ie=160,se=120,fe=64,le=48,be=32,he=64,me=64,pe=160,ge=140,ye=80,ve=100,Oe="MEMOJI_STICKER",je="en",we=200,Ie=450,Ce=new Set(["image/png","image/gif","image/jpeg","video/mp4","video/avi","video/quicktime"]),Ee="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,63})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)",Se="(@[\\w\\d_-]+)",Me=/^(?:https?:\/\/)?(?:t\.me\/)([\d\w_]+)(?:\/([\d]+))?(?:\/([\d]+))?$/gm,Ae=/^(?:https?:\/\/)?(?:t\.me\/joinchat\/)([\d\w_-]+)?$/gm,ke=777e3,Te=0,Ne=1,Pe=10,De=5,Le=2147483646,xe="en",Fe="android",Be=["android","ios","tdesktop","macos"],Re="TelegramTips",Ue=["ar","pt-br","id","it","ko","ms","pl","es","tr"],_e="https://bugs.telegram.org/?tag_ids=41&sort=time",$e="#A2AF8E",Ge="#0F0F0F",We="#0a0a0a8c",He="rgba(90, 110, 70, 0.6)"},function(e,t,n){"use strict";function r(e,t){return e.reduce((e,n)=>(e[n[t]]=n,e),{})}function u(e,t){return Object.keys(e).reduce((n,r,u)=>(n[r]=t(e[r],r,u,e),n),{})}function o(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function c(e,t){return t.reduce((t,n)=>(e[n]&&(t[n]=e[n]),t),{})}function d(e,t){const n=new Set(t.map(String));return o(e,Object.keys(e).filter(e=>!n.has(e)))}function a(e,t,n="asc"){return e.sort((e,r)=>{if(Array.isArray(t)){const[u,o]=Array.isArray(n)?n:[n,n],[c,d]=t;let a,i;if("function"==typeof c?(a=c(e)||0,i=c(r)||0):"string"==typeof c&&(a=e[c]||0,i=r[c]||0),a!==i)return"asc"===u?a-i:i-a;{let t,n;return"function"==typeof d?(t=d(e)||0,n=d(r)||0):"string"==typeof d&&(t=e[d]||0,n=r[d]||0),"asc"===o?t-n:n-t}}let u,o;return"function"==typeof t?(u=t(e)||0,o=t(r)||0):"string"==typeof t&&(u=e[t]||0,o=r[t]||0),"asc"===n?u-o:o-u})}function i(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(t):(e.push(t),e),[])}function s(e){return Array.from(new Set(e))}function f(e){return e.filter(Boolean)}function l(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function b(e,t){return e[0]<=t[t.length-1]&&e[e.length-1]>=t[0]}function h(e,t){return e.filter(e=>t.has(e))}function m(e,t){const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function p(e){return"object"!=typeof e?e:Array.isArray(e)?e.map(p):Object.keys(e).reduce((t,n)=>(t[n]=p(e[n]),t),{})}function g(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return e[n]}n.d(t,"c",(function(){return r})),n.d(t,"i",(function(){return u})),n.d(t,"l",(function(){return o})),n.d(t,"m",(function(){return c})),n.d(t,"j",(function(){return d})),n.d(t,"k",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"o",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return b})),n.d(t,"f",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return g}))},function(e,t,n){"use strict";n.d(t,"ab",(function(){return r.b})),n.d(t,"bb",(function(){return r.c})),n.d(t,"cb",(function(){return r.d})),n.d(t,"Cb",(function(){return r.g})),n.d(t,"sb",(function(){return r.e})),n.d(t,"Bb",(function(){return r.f})),n.d(t,"Jb",(function(){return r.h})),n.d(t,"Z",(function(){return r.a})),n.d(t,"ob",(function(){return u.w})),n.d(t,"nb",(function(){return u.v})),n.d(t,"lb",(function(){return u.t})),n.d(t,"qb",(function(){return u.y})),n.d(t,"mb",(function(){return u.u})),n.d(t,"rb",(function(){return u.z})),n.d(t,"l",(function(){return u.j})),n.d(t,"W",(function(){return u.p})),n.d(t,"k",(function(){return u.i})),n.d(t,"f",(function(){return u.e})),n.d(t,"g",(function(){return u.f})),n.d(t,"e",(function(){return u.d})),n.d(t,"pb",(function(){return u.x})),n.d(t,"jb",(function(){return u.r})),n.d(t,"p",(function(){return u.m})),n.d(t,"Db",(function(){return u.A})),n.d(t,"d",(function(){return u.c})),n.d(t,"b",(function(){return u.a})),n.d(t,"L",(function(){return u.o})),n.d(t,"j",(function(){return u.h})),n.d(t,"i",(function(){return u.g})),n.d(t,"kb",(function(){return u.s})),n.d(t,"Hb",(function(){return u.D})),n.d(t,"c",(function(){return u.b})),n.d(t,"Gb",(function(){return u.C})),n.d(t,"Fb",(function(){return u.B})),n.d(t,"o",(function(){return u.l})),n.d(t,"n",(function(){return u.k})),n.d(t,"ib",(function(){return u.q})),n.d(t,"K",(function(){return u.n})),n.d(t,"Ib",(function(){return u.E})),n.d(t,"C",(function(){return i})),n.d(t,"Eb",(function(){return s})),n.d(t,"G",(function(){return f})),n.d(t,"O",(function(){return l})),n.d(t,"P",(function(){return b})),n.d(t,"x",(function(){return h})),n.d(t,"M",(function(){return m})),n.d(t,"m",(function(){return p})),n.d(t,"yb",(function(){return g})),n.d(t,"zb",(function(){return y})),n.d(t,"tb",(function(){return v})),n.d(t,"gb",(function(){return O})),n.d(t,"Ab",(function(){return j})),n.d(t,"hb",(function(){return w})),n.d(t,"X",(function(){return I})),n.d(t,"Y",(function(){return C})),n.d(t,"xb",(function(){return E})),n.d(t,"ub",(function(){return S})),n.d(t,"u",(function(){return M})),n.d(t,"v",(function(){return T})),n.d(t,"fb",(function(){return N})),n.d(t,"H",(function(){return P})),n.d(t,"Q",(function(){return D})),n.d(t,"J",(function(){return L})),n.d(t,"s",(function(){return x})),n.d(t,"t",(function(){return F})),n.d(t,"N",(function(){return B})),n.d(t,"y",(function(){return R})),n.d(t,"vb",(function(){return U})),n.d(t,"wb",(function(){return _})),n.d(t,"I",(function(){return $})),n.d(t,"B",(function(){return G})),n.d(t,"R",(function(){return W})),n.d(t,"S",(function(){return H})),n.d(t,"T",(function(){return z})),n.d(t,"F",(function(){return K})),n.d(t,"E",(function(){return V})),n.d(t,"D",(function(){return J})),n.d(t,"z",(function(){return Q})),n.d(t,"A",(function(){return Y})),n.d(t,"eb",(function(){return Z})),n.d(t,"h",(function(){return X})),n.d(t,"U",(function(){return ee})),n.d(t,"V",(function(){return te})),n.d(t,"db",(function(){return ne})),n.d(t,"r",(function(){return re})),n.d(t,"w",(function(){return ue})),n.d(t,"q",(function(){return oe})),n.d(t,"a",(function(){return ce}));var r=n(35),u=n(36),o=n(8),c=n(2),d=n(65);const a=new RegExp(c.rb,"i");function i(e){const{chatId:t,id:n}=e;return`msg${t}-${n}`}function s(e){const t=e.match(/^msg(-?\d+)-(\d+)/);return{chatId:Number(t[1]),messageId:Number(t[2])}}function f(e){return e.previousLocalId||e.id}function l(e,t,n=!1){const{text:r,photo:u,video:o,audio:c,voice:d,document:a,sticker:i,contact:s,poll:f,invoice:l}=t.content,b=r&&r.text.substr(0,80);return t.groupedId?`${n?"":"🖼 "}${b||e("lng_in_dlg_album")}`:u?`${n?"":"🖼 "}${b||e("AttachPhoto")}`:o?`${n?"":"📹 "}${b||e(o.isGif?"AttachGif":"AttachVideo")}`:i?`${i.emoji||""} ${e("AttachSticker")}`.trim():c?`${n?"":"🎧 "}${M(t)||e("AttachMusic")}`:d?`${n?"":"🎤 "}${b||e("AttachAudio")}`:a?`${n?"":"📎 "}${b||a.fileName}`:s?e("AttachContact"):f?`${n?"":"📊 "}${f.summary.question}`:l?"Invoice":r?b:"The message is not supported on this version of Telegram"}function b(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:c,document:d,poll:a,webPage:i,contact:s,invoice:f}=e.content;return t?t.text:n||r||u||o||c||d||s||a||i||f?void 0:"The message is not supported on this version of Telegram"}function h(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:c,document:a,poll:i,webPage:s,contact:f}=e.content;return!!(n||u&&u.isRound)||!(!t||r||u||o||c||a||i||s||f)&&(Object(d.a)(t.text)||!1)}function m(e){const{text:t}=e.content;if(t&&t.text.length<=6&&1===h(e))return t.text}function p(e){const{text:t}=e.content;let n;if(t&&t.entities){let e=t.entities.find(e=>e.type===o.ApiMessageEntityTypes.TextUrl);if(e&&(n=e.url.match(a)),!n&&(e=t.entities.find(e=>e.type===o.ApiMessageEntityTypes.Url),e)){const{offset:r,length:u}=e;n=t.text.substring(r,r+u).match(a)}}if(!n&&t&&(n=t.text.match(a)),n)return{url:n[0],domain:n[3]}}function g(e){return e.isOutgoing}function y(e){return Boolean(e.replyToMessageId)}function v(e){return Boolean(e.forwardInfo)}function O(e){return!!e.content.action}function j(e){return e.chatId===c.yb&&E(e)}function w(e){return Boolean(e.senderId)&&e.senderId<0&&g(e)}function I(e,t){return t.id>0?Object(r.c)(t):Object(u.i)(e,t)}function C(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function E(e){return e.id>=c.T}function S(e){return e.content.action&&"historyClear"===e.content.action.type}function M(e){const{audio:t,text:n}=e.content;return t&&[t.title,t.performer].filter(Boolean).join(" — ")||n&&n.text}var A=n(6),k=n(60);function T(e){return e.content}function N(e){return Boolean(P(e)||D(e)||R(e)||B(e)||function(e){return e.content.contact}(e)||$(e)||x(e)||F(e)||function(e){return e.content.voice}(e))}function P(e){return e.content.photo}function D(e){return e.content.video}function L(e){const{video:t}=e.content;return t&&t.isRound?t:void 0}function x(e){return e.content.action}function F(e){return e.content.audio}function B(e){return e.content.sticker}function R(e){return e.content.document}function U(e){const t=R(e);return t?"photo"===t.mediaType:void 0}function _(e){const t=R(e);return t?"video"===t.mediaType:void 0}function $(e){return e.content.poll}function G(e){return e.content.invoice}function W(e){return e.content.webPage}function H(e){const t=W(e);return t?t.photo:void 0}function z(e){const t=W(e);if(t)return t.video}function K(e){const t=function(e){const t=P(e)||D(e)||R(e)||B(e)||H(e)||z(e);if(t)return t.thumbnail}(e);return t?t.dataUri:void 0}function V(e,t){const{photo:n,video:r,sticker:u,audio:o,voice:c,document:d}=e.content,a=H(e),s=z(e),f=r||s,l=n||a;if(!(l||f||u||o||c||d))return;const b=i(e);if(f)switch(t){case"micro":case"pictogram":return b+"?size=m";case"inline":return Z(e)?void 0:q(f,b);case"viewerPreview":return b+"?size=m";case"viewerFull":return q(f,b);case"download":return b+"?download"}if(l)switch(t){case"micro":case"pictogram":return b+"?size=m";case"inline":return Z(e)?void 0:b+"?size=x";case"viewerPreview":return b+"?size=x";case"viewerFull":return b+"?size=z"}if(d)switch(t){case"micro":case"pictogram":case"inline":case"viewerPreview":if(!Object(k.c)(d)||Z(e))return;return b+"?size=m";default:return b}if(u)switch(t){case"micro":return;case"pictogram":return b+"?size=m";default:return b}if(o)switch(t){case"micro":case"pictogram":return;case"download":return b+"?download";default:return q(o,b)}if(c)switch(t){case"micro":case"pictogram":return;default:return b}}function q(e,t){return A.h&&A.j?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function J(e,t){const{sticker:n,video:r,audio:u,voice:c}=e.content,d=r||z(e);return n&&"inline"===t&&n.isAnimated?o.ApiMediaFormat.Lottie:d&&A.h&&("viewerFull"===t||"inline"===t)?o.ApiMediaFormat.Progressive:u||c?c&&!A.g?o.ApiMediaFormat.BlobUrl:o.ApiMediaFormat.Progressive:o.ApiMediaFormat.BlobUrl}function Q(e){const{photo:t,video:n,document:r}=e.content,u=H(e),o=z(e);if(t||u)return`photo${e.date}.jpeg`;const{fileName:c}=n||o||r||{};return c}function Y(e){const{video:t,document:n}=e.content,r=z(e),{size:u}=t||r||n||{};return u}function Z(e){const{photo:t,video:n,document:r}=e.content;return t&&t.blobUrl||n&&n.blobUrl||r&&r.previewBlobUrl}function X(e,t,n=!1){const r=ue(e,t,n?"media":"inlineMedia");return n?r.reverse():r}function ee(e){return e.sizes.find(e=>"z"===e.type)||e.sizes.find(e=>"y"===e.type)||te(e)}function te(e){return e.sizes.find(e=>"x"===e.type)||e.sizes.find(e=>"m"===e.type)||e.sizes.find(e=>"s"===e.type)||e.thumbnail}function ne(e){if(e.width&&e.height)return e}function re(e,t,n=!1){const r=E(e);return{isUploading:r,isTransferring:r||n,transferProgress:Number(t)}}function ue(e,t,n){let r;switch(n){case"media":r=e=>{const t=D(e);return P(e)||t&&!t.isRound&&!t.isGif};break;case"documents":r=R;break;case"links":r=e=>W(e)||function(e){const{text:t}=e.content,n=t&&t.text.match(a);if(n)return{url:n[0],domain:n[3]}}(e);break;case"audio":r=F;break;case"inlineMedia":r=e=>{const t=D(e);return P(e)||t&&!t.isRound&&!t.isGif||U(e)||_(e)};break;default:return[]}return t.reduce((t,n)=>(e[n]&&r(e[n])&&t.push(n),t),[])}function oe(e){const{audio:t,voice:n,video:r}=T(e),u=t||n||r||z(e);if(u)return u.duration}function ce(e,t){return`${e}_${t}`}n(61)},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return l}));var r=n(81),u=n.n(r),o=n(2),c=n(33);let d;const a=new Map,i=new Map;function s(e,t){return d||(o.r&&console.log(">>> START LOAD WORKER"),d=new u.a,function(e){d.addEventListener("message",({data:t})=>{if("update"===t.type)e(t.update);else if("methodResponse"===t.type){const e=a.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}else if("methodCallback"===t.type){const e=a.get(t.messageId);e&&e.callback&&e.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error})}(e)),b({type:"initApi",args:[t]})}function f(e,...t){if(d)return b({type:"callMethod",name:e,args:t});o.r&&console.warn("API is not initialized")}function l(e){e.isCanceled=!0;const{messageId:t}=i.get(e)||{};t&&d.postMessage({type:"cancelProgress",messageId:t})}function b(e){const t=Object(c.a)(a),n={messageId:t,...e},r={messageId:t},u=new Promise((e,t)=>{Object.assign(r,{resolve:e,reject:t})});if("function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,i.set(e,r)}return a.set(t,r),u.catch(()=>{}).finally(()=>{a.delete(t),r.callback&&i.delete(r.callback)}),d.postMessage(n),u}},function(e,t,n){"use strict";n.d(t,"t",(function(){return o})),n.d(t,"s",(function(){return d})),n.d(t,"r",(function(){return s})),n.d(t,"f",(function(){return f})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return b})),n.d(t,"j",(function(){return h})),n.d(t,"i",(function(){return m})),n.d(t,"n",(function(){return p})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return y})),n.d(t,"o",(function(){return v})),n.d(t,"d",(function(){return O})),n.d(t,"k",(function(){return j})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return I})),n.d(t,"c",(function(){return C})),n.d(t,"p",(function(){return E})),n.d(t,"a",(function(){return S})),n.d(t,"q",(function(){return M}));var r=n(2);let u;function o(){return Boolean(u)}new Promise(e=>{const t=new Image;t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA";const n=()=>{e(2===t.height)};t.onload=n,t.onerror=n}).then(e=>{u=e});let c=window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";function d(){return c}function a(e){c=e.matches?"dark":"light"}const i=window.matchMedia("(prefers-color-scheme: dark)");"function"==typeof i.addEventListener?i.addEventListener("change",a):"function"==typeof i.addListener&&i.addListener(a);const s=function(){const{userAgent:e,platform:t}=window.navigator;let n;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="macOS":-1!==["iPhone","iPad","iPod"].indexOf(t)?n="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="Windows":/Android/.test(e)?n="Android":/Linux/.test(t)&&(n="Linux"),n}(),f="macOS"===s,l="iOS"===s,b="Android"===s,h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),m=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone||document.referrer.includes("android-app://"),p=window.matchMedia("(pointer: coarse)").matches,g=window.innerWidth<=r.ob||window.innerWidth<=r.nb&&window.innerHeight<=r.mb,y=!g&&window.innerWidth<=r.kb,v=navigator.mediaDevices&&"getUserMedia"in navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext),O=(document.documentElement.style,s&&(f||l)),j="serviceWorker"in navigator,w=j,I=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),C=!r.N&&"filter"in(document.createElement("canvas").getContext("2d")||{}),E=b?"slide-fade":l?"slide-layers":"push-slide",S=window.devicePixelRatio||1,M=!0},function(e,t,n){"use strict";n.d(t,"T",(function(){return Fe})),n.d(t,"pb",(function(){return Be})),n.d(t,"W",(function(){return Re})),n.d(t,"Db",(function(){return Ue})),n.d(t,"Jb",(function(){return a})),n.d(t,"X",(function(){return i})),n.d(t,"g",(function(){return l})),n.d(t,"p",(function(){return b})),n.d(t,"P",(function(){return h})),n.d(t,"O",(function(){return m})),n.d(t,"Cb",(function(){return p})),n.d(t,"o",(function(){return g})),n.d(t,"h",(function(){return y})),n.d(t,"L",(function(){return v})),n.d(t,"d",(function(){return O})),n.d(t,"M",(function(){return j})),n.d(t,"k",(function(){return w})),n.d(t,"j",(function(){return I})),n.d(t,"N",(function(){return C})),n.d(t,"i",(function(){return E})),n.d(t,"r",(function(){return S})),n.d(t,"z",(function(){return D})),n.d(t,"s",(function(){return L})),n.d(t,"n",(function(){return x})),n.d(t,"sb",(function(){return F})),n.d(t,"Z",(function(){return R})),n.d(t,"hb",(function(){return U})),n.d(t,"y",(function(){return _})),n.d(t,"Kb",(function(){return $})),n.d(t,"kb",(function(){return G})),n.d(t,"qb",(function(){return W})),n.d(t,"tb",(function(){return H})),n.d(t,"ob",(function(){return z})),n.d(t,"D",(function(){return K})),n.d(t,"F",(function(){return V})),n.d(t,"C",(function(){return q})),n.d(t,"db",(function(){return J})),n.d(t,"Fb",(function(){return Q})),n.d(t,"G",(function(){return Y})),n.d(t,"nb",(function(){return Z})),n.d(t,"Gb",(function(){return X})),n.d(t,"Hb",(function(){return ee})),n.d(t,"Eb",(function(){return te})),n.d(t,"a",(function(){return ne})),n.d(t,"Y",(function(){return re})),n.d(t,"l",(function(){return ue})),n.d(t,"rb",(function(){return oe})),n.d(t,"E",(function(){return ce})),n.d(t,"m",(function(){return de})),n.d(t,"I",(function(){return ae})),n.d(t,"U",(function(){return ie})),n.d(t,"gb",(function(){return se})),n.d(t,"vb",(function(){return fe})),n.d(t,"K",(function(){return le})),n.d(t,"b",(function(){return be})),n.d(t,"e",(function(){return he})),n.d(t,"f",(function(){return me})),n.d(t,"Ib",(function(){return pe})),n.d(t,"mb",(function(){return ge})),n.d(t,"H",(function(){return ye})),n.d(t,"R",(function(){return ve})),n.d(t,"q",(function(){return Oe})),n.d(t,"S",(function(){return je})),n.d(t,"V",(function(){return we})),n.d(t,"J",(function(){return Ie})),n.d(t,"bb",(function(){return Ce})),n.d(t,"Q",(function(){return Ee})),n.d(t,"ub",(function(){return Se})),n.d(t,"cb",(function(){return Me})),n.d(t,"wb",(function(){return Ae})),n.d(t,"xb",(function(){return ke})),n.d(t,"yb",(function(){return Te})),n.d(t,"u",(function(){return _e})),n.d(t,"B",(function(){return Ne})),n.d(t,"x",(function(){return Pe})),n.d(t,"w",(function(){return De})),n.d(t,"ab",(function(){return Le})),n.d(t,"v",(function(){return xe})),n.d(t,"A",(function(){return A})),n.d(t,"t",(function(){return k})),n.d(t,"zb",(function(){return T})),n.d(t,"Ab",(function(){return N})),n.d(t,"c",(function(){return P})),n.d(t,"ib",(function(){return $e})),n.d(t,"jb",(function(){return Ge})),n.d(t,"lb",(function(){return We})),n.d(t,"Bb",(function(){return He})),n.d(t,"fb",(function(){return s})),n.d(t,"eb",(function(){return f}));var r=n(13),u=n(6),o=n(8),c=n(2),d=n(4);function a(e,t){return e.users.byId[t]}function i(e,t){const n=a(e,t);return n&&n.fullInfo&&n.fullInfo.isBlocked}function s(e){return e.settings.byKey}function f(e){return e.settings.notifyExceptions}function l(e,t){return e.chats.byId[t]}function b(e,t){const n=Object(d.W)(t);return!!n&&a(e,n)}function h(e,t){return t===e.currentUserId}function m(e,t){const n=b(e,t);return n&&Object(d.Bb)(n)}function p(e){return Object.values(e.chats.byId).find(({isSupport:e})=>e)}function g(e,t){if(!Object(d.ob)(t.id)&&!Object(d.mb)(t)&&t.fullInfo)return t.fullInfo.members&&t.fullInfo.members.length!==c.bb?t.fullInfo.members.reduce((t,{userId:n})=>e.users.byId[n]&&Object(d.Cb)(e.users.byId[n])&&n!==e.currentUserId?t+1:t,0):t.fullInfo.onlineCount}function y(e,t){const n=l(e,t),r=n&&Object(d.W)(n),u=r&&a(e,r);if(u&&Object(d.Bb)(u))return u}function v(e,t){const n=l(e,t),r=y(e,t);if(!n||!r)return!1;if(n.lastMessage&&Object(d.ub)(n.lastMessage))return!0;const u=e.messages.byChatId[t];if(!u)return!1;const{listedIds:c}=u.threadsById[o.MAIN_THREAD_ID]||{};return c&&!c.length}function O(e){return Boolean(e.chats.listIds.active)}function j(e,t,n){const{listIds:r}=e.chats;if(n){const e=r[n];return Boolean(e&&e.includes(t))}return Object.values(r).some(e=>e&&e.includes(t))}function w(e,t){const n=l(e,t);if(n&&j(e,t))return n.folderId===c.i?"archived":"active"}function I(e,t){return e.chatFolders.byId[t]}function C(e,t,n=c.b){const{active:r,archived:u}=e.chats.orderedPinnedIds;if(n===c.b)return!!r&&r.includes(t);if(n===c.i)return!!u&&u.includes(t);const{byId:o}=e.chatFolders,{pinnedChatIds:d}=o[n]||{};return!!d&&d.includes(t)}function E(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find(e=>e.username&&e.username.toLowerCase()===n)}function S(e){const t=e.chats.listIds.active;if(!t)return 0;const n=e.chats.byId;return t.reduce((t,r)=>{const u=n[r];return u&&u.unreadCount&&!Object(d.Hb)(u,s(e),f(e))?t+u.unreadCount:t},0)}var M=n(3);function A(e){return e.stickers.search}function k(e){return e.gifs.search}function T(e,t){return e.stickers.setsById[t]}function N(e,t){const n=Object.values(e.stickers.setsById);let r=[];return n.forEach(({packs:e})=>{if(!e)return;const n=e[t];n&&(r=r.concat(n))}),r}function P(e,t){const{animatedEmojis:n}=e;if(!n||!n.stickers)return;const r=t.replace("","");return n.stickers.find(e=>e.emoji===t||e.emoji===r)}function D(e){const{messageLists:t}=e.messages;if(t.length)return t[t.length-1]}function L(e){const{chatId:t}=D(e)||{};return t?l(e,t):void 0}function x(e,t){const n=e.messages.byChatId[t];return n?n.byId:void 0}function F(e,t){const n=e.scheduledMessages.byChatId[t];return n?n.byId:void 0}function B(e,t,n,r){const u=e.messages.byChatId[t];if(!u)return;const o=u.threadsById[n];return o?o[r]:void 0}function R(e,t,n){return B(e,t,n,"listedIds")}function U(e,t,n){return B(e,t,n,"outlyingIds")}function _(e,t,n,r){switch(r){case"thread":return $(e,t,n);case"pinned":return G(e,t);case"scheduled":return W(e,t)}}function $(e,t,n){return B(e,t,n,"viewportIds")}function G(e,t){return B(e,t,o.MAIN_THREAD_ID,"pinnedIds")}function W(e,t){return B(e,t,o.MAIN_THREAD_ID,"scheduledIds")}function H(e,t,n){return B(e,t,n,"scrollOffset")}function z(e,t,n){return B(e,t,n,"replyingToId")}function K(e,t,n){return B(e,t,n,"editingId")}function V(e,t){return B(e,t,o.MAIN_THREAD_ID,"editingScheduledId")}function q(e,t,n){return B(e,t,n,"draft")}function J(e,t,n){return B(e,t,n,"noWebPage")}function Q(e,t,n){return B(e,t,n,"threadInfo")}function Y(e,t,n){return B(e,t,n,"firstMessageId")}function Z(e,t,n){return B(e,t,n,"replyStack")}function X(e,t,n){if(n===o.MAIN_THREAD_ID)return l(e,t);const r=Q(e,t,n);return r?l(e,r.originChannelId||t):void 0}function ee(e,t,n){if(n===o.MAIN_THREAD_ID)return;const r=Q(e,t,n);return r?r.topMessageId:void 0}function te(e,t,n){const r=e.messages.byChatId[t];if(!r)return;const{replyToMessageId:u,replyToTopMessageId:o}=n;return u||o?Object.values(r.threadsById).find(e=>e.threadInfo&&(u&&u===e.threadInfo.topMessageId||o&&o===e.threadInfo.topMessageId)):void 0}function ne(e,t,n){const r=D(e);if(!r)return!1;const{threadInfo:u}=te(e,t,n)||{};return t===r.chatId&&(r.threadId===o.MAIN_THREAD_ID||u&&r.threadId===u.threadId)}function re(e,t,n){const r=$(e,t,n);if(!r||!r.length)return!0;let u;if(n===o.MAIN_THREAD_ID){const n=l(e,t);if(!n||!n.lastMessage)return!0;u=n.lastMessage.id}else{const r=Q(e,t,n);if(!r||!r.lastMessageId)return;u=r.lastMessageId}return u>=c.T&&!ue(e,t,u)||r[r.length-1]>=u}function ue(e,t,n){const r=x(e,t);return r?r[n]:void 0}function oe(e,t,n){const r=F(e,t);return r?r[n]:void 0}function ce(e,t,n,r){if("scheduled"===r){const n=V(e,t);return n?oe(e,t,n):void 0}{const r=K(e,t,n);return r?ue(e,t,r):void 0}}function de(e,t){let n;for(const r of Object.values(e.messages.byChatId)){const{byId:e}=r;if(n=Object.values(e).find(e=>e.content.poll&&e.content.poll.id===t),n)break}return n}function ae(e,t){const{chatId:n,messageId:r}=e.focusedMessage||{};return n===t?r:void 0}function ie(e,t){const n=ae(e,t.chatId);return!!n&&(n===t.id||n===t.previousLocalId)}function se(e,t,n=!1){return function(e,t){const{lastReadOutboxMessageId:n}=l(e,t.chatId)||{};return Object(d.xb)(t)||!n||n<t.id}(e,t)||n?Object(d.Y)(t):"read"}function fe(e,t){const{senderId:n}=t;if(n)return n>0?a(e,n):l(e,n)}function le(e,t){const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?l(e,n.fromChatId):n.senderUserId?a(e,n.senderUserId):void 0}function be(e,t,n){const{serverTimeOffset:r}=e,u=l(e,t.chatId);if(!u||u.isRestricted)return{};const o=Object(d.ob)(u.id),c=h(e,t.chatId),a=Object(d.lb)(u),i=Object(d.qb)(u),s=Object(d.mb)(u),f=Object(d.Ab)(t),b=Object(d.yb)(t),m=Object(d.gb)(t),{content:p}=t,g=(c||i&&Object(d.p)(u,"pinMessages")||s&&Object(d.p)(u,"editMessages")||Date.now()+1e3*r-1e3*t.date<1728e5)&&!(p.sticker||p.contact||p.poll||p.action||p.audio||p.video&&p.video.isRound)&&!Object(d.tb)(t)&&!t.viaBotId,y=Object(d.d)(u,n)&&!f,v=o||u.isCreator||!s&&!Object(d.Db)(u,"pinMessages")||Object(d.p)(u,"pinMessages");let O=!m&&v,j=!1;const w=G(e,u.id);O&&(j=Boolean(w&&w.includes(t.id)),O=!j);const I=o||b||a||u.isCreator||Object(d.p)(u,"deleteMessages"),C=!o&&!b,E=I&&!f&&(o&&!c||a&&(b||Object(d.p)(u,"deleteMessages")||u.isCreator)),S=!m&&g&&(b||s&&(u.isCreator||Object(d.p)(u,"editMessages"))),M=!m&&!f,A=Boolean(t.content.sticker),k=A&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some(({id:e})=>e===t.id)}(e,t.content.sticker),T=!m&&A&&!k,N=!m&&k,P=!m,D=!m&&(s||i),L=!m;return{noOptions:[y,S,O,j,I,E,M,T,N,P,D,L].every(e=>!e),canReply:y,canEdit:S,canPin:O,canUnpin:j,canDelete:I,canReport:C,canDeleteForAll:E,canForward:M,canFaveSticker:T,canUnfaveSticker:N,canCopy:P,canCopyLink:D,canSelect:L}}function he(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=D(e)||{},u=n&&x(e,n);if(!u||!t||!r)return{};const o=t.map(t=>u[t]&&be(e,u[t],r)).filter(Boolean);return{canDelete:o.every(e=>e.canDelete),canDeleteForAll:o.every(e=>e.canDeleteForAll)}}function me(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=D(e)||{},u=n&&x(e,n);if(!u||!t||!r)return!1;return t.map(t=>u[t]&&be(e,u[t],r)).filter(Boolean).every(e=>e.canReport)}function pe(e,t){const n=e.fileUploads.byMessageLocalId[t.previousLocalId||t.id];return n?n.progress:void 0}function ge(e,t,n){if(n===o.MAIN_THREAD_ID){const n=l(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return n.lastMessage?Object(d.xb)(n.lastMessage)?n.lastMessage.id:Math.min(n.lastMessage.id,n.lastReadInboxMessageId):n.lastReadInboxMessageId}{const r=Q(e,t,n);if(!r)return;return r.lastReadInboxMessageId?Math.min(r.lastReadInboxMessageId,r.lastMessageId||1/0):r.topMessageId}}function ye(e,t,n){const r=l(e,t);if(n===o.MAIN_THREAD_ID){if(!r)return}else{const r=Q(e,t,n);if(!r||r.lastMessageId===r.lastReadInboxMessageId)return}const u=U(e,t,n),c=R(e,t,n),d=x(e,t);if(!d||!u&&!c)return;const a=ge(e,t,n);if(a||!r||!r.isNotJoined){if(u){const e=a?u.find(e=>e>a&&d[e]&&(!d[e].isOutgoing||d[e].isFromScheduled)):u[0];if(e)return e}if(c){const e=a?c.find(e=>e>a&&d[e]&&(!d[e].isOutgoing||d[e].isFromScheduled)):c[0];if(e)return e}}}function ve(e){const{forwardMessages:t}=e;return Boolean(t.isModalShown)}function Oe(e,t){const n=Object.values(e.chats.byId).find(e=>Object(d.rb)(e)&&e.lastMessage&&e.lastMessage.id===t);if(n)return n.id;const{byChatId:r}=e.messages;return Number(Object.keys(r).find(n=>{const u=l(e,Number(n));return u&&Object(d.rb)(u)&&r[u.id].byId[t]}))}function je(e){const{selectedMessages:t}=e;return Boolean(t)}function we(e,t){const{messageIds:n}=e.selectedMessages||{};return!!n&&n.includes(t)}function Ie(e,t,n){const r=x(e,t);if(r)return Object.values(r).filter(e=>e.groupedId===n&&e.forwardInfo).map(({forwardInfo:e})=>e.fromMessageId)}function Ce(e,t,n){const r=x(e,t);if(r)return Object.keys(r).map(Number).filter(e=>r[e].groupedId===n)}function Ee(e,t,n){const{messageIds:r}=e.selectedMessages||{};if(!r)return!1;const u=Ce(e,t,n);return u&&u.every(e=>r.includes(e))}function Se(e){const{messageIds:t}=e.selectedMessages||{};return t?t.length:0}function Me(e,t){const n=l(e,t);if(!n)return;if(!m(e,n))return;const r=x(e,t),u=$(e,t,o.MAIN_THREAD_ID);if(!r||!u)return;const c=Object(M.g)(u,e=>!r[e].isOutgoing&&Boolean(r[e].keyboardButtons)),d=Object(M.g)(u,e=>Boolean(r[e].shouldHideKeyboardButtons));return c&&d&&d>c?void 0:c?r[c]:void 0}function Ae(e,t,n,r){const{shouldAutoDownloadMediaFromContacts:u,shouldAutoDownloadMediaInPrivateChats:o,shouldAutoDownloadMediaInGroups:c,shouldAutoDownloadMediaInChannels:a}=e.settings.byKey;return Boolean(o&&Object(d.ob)(n.id)||c&&Object(d.nb)(n)||a&&Object(d.mb)(n)||u&&r&&(r.id===e.currentUserId||function(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}(e,r)))}function ke(e,t){const n=Object(d.Q)(t)||Object(d.T)(t);if(!n)return;const{shouldAutoPlayVideos:r,shouldAutoPlayGifs:u}=e.settings.byKey,o=n.isGif||n.isRound;return r&&!o||u&&o}function Te(e){return e.settings.byKey.shouldLoopStickers}function Ne(e){const{chatId:t,threadId:n}=D(e)||{};if(!t||!n)return;const r=Object(d.a)(t,n),u=e.localTextSearch.byChatThreadKey[r];return u&&u.isActive?u:void 0}function Pe(e){const{byChatId:t}=e.localMediaSearch,{chatId:n}=D(e)||{},r=e.users.selectedId;return r&&t[r]?r:n}function De(e){const t=Pe(e);if(t)return e.localMediaSearch.byChatId[t]}function Le(e,t){return e.management.byChatId[t]}function xe(e){const{chatId:t,threadId:n}=D(e)||{};if(!t||!n)return;if(Object(d.ob)(t))return"user";const r=l(e,t);return r?Object(d.nb)(r)?"group":"channel":void 0}function Fe(e){const{mediaViewer:t}=e;return Boolean(t.messageId||t.avatarOwnerId)}function Be(e){const{users:t,isChatInfoShown:n,newChatMembersProgress:o}=e,c=o!==r.i.Closed,d=function(e){const{pollResults:t}=e;return Boolean(t.messageId)}(e),a=Boolean(!u.l&&Ne(e)),i=function(e){const{chatId:t,threadId:n}=D(e)||{};if(!t||!n)return;const r=e.management.byChatId[t];return r&&r.isActive?r:void 0}(e),s=void 0!==A(e).query,f=void 0!==k(e).query,{chatId:l}=D(e)||{},b=t.selectedId,h=O(e),m=Boolean(b&&h),p=Boolean(l&&h)&&n;return d?r.m.PollResults:a?r.m.Search:i?r.m.Management:s?r.m.StickerSearch:f?r.m.GifSearch:c?r.m.AddingMembers:m?r.m.UserInfo:p?r.m.ChatInfo:void 0}function Re(e){return void 0!==Be(e)}function Ue(e){const{theme:t,shouldUseSystemTheme:n}=e.settings.byKey;return n?Object(u.s)():t}function _e(e){return e.globalSearch.query}function $e(e){return e.payment.messageId}function Ge(e){return e.payment.formId}function We(e){return e.payment.nativeParams?e.payment.nativeParams.publishableKey:void 0}function He(e){return e.payment.stripeCredentials}},function(e,t,n){"use strict";var r=n(69);n.o(r,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return r.ApiMediaFormat})),n.o(r,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return r.ApiMessageEntityTypes})),n.o(r,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return r.MAIN_THREAD_ID})),n.o(r,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return r.MESSAGE_DELETED}));var u=n(70);n.o(u,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return u.ApiMediaFormat})),n.o(u,"ApiMessageEntityTypes")&&n.d(t,"ApiMessageEntityTypes",(function(){return u.ApiMessageEntityTypes})),n.o(u,"MAIN_THREAD_ID")&&n.d(t,"MAIN_THREAD_ID",(function(){return u.MAIN_THREAD_ID})),n.o(u,"MESSAGE_DELETED")&&n.d(t,"MESSAGE_DELETED",(function(){return u.MESSAGE_DELETED}));var o=n(71);n.d(t,"ApiMessageEntityTypes",(function(){return o.a})),n.d(t,"MAIN_THREAD_ID",(function(){return o.b})),n.d(t,"MESSAGE_DELETED",(function(){return o.c}));var c=n(72);n.o(c,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return c.ApiMediaFormat}));var d=n(73);n.d(t,"ApiMediaFormat",(function(){return d.a}));n(74),n(75),n(76),n(77)},function(e,t,n){"use strict";t.a=(...e)=>e.filter(Boolean).join(" ")},function(e,t,n){"use strict";function r(e,t,n=!0,r=!0){let u;return(...o)=>{u?(clearTimeout(u),u=void 0):n&&e(...o),u=self.setTimeout(()=>{r&&e(...o),u=void 0},t)}}function u(e,t,n=!0){let r,u,o;return(...c)=>{u=!0,o=c,r||(n&&(u=!1,e(...o)),r=self.setInterval(()=>{if(!u)return self.clearInterval(r),void(r=void 0);u=!1,e(...o)},t))}}function o(e){return d(m,e)}function c(e){return d(p,e)}function d(e,t){let n,r=!1;return(...u)=>{n=u,r||(r=!0,e(()=>{r=!1,t(...n)}))}}function a(e){Promise.resolve().then(e)}function i(e){self.requestIdleCallback?self.requestIdleCallback(e):a(e)}n.d(t,"a",(function(){return r})),n.d(t,"h",(function(){return u})),n.d(t,"j",(function(){return o})),n.d(t,"i",(function(){return c})),n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return f})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g}));const s=e=>new Promise(t=>{setTimeout(()=>t(),e)});function f(){return new Promise(e=>{m(e)})}let l,b,h;function m(e,t=!1){l?t?b.push(e):l.push(e):(l=t?[]:[e],b=t?[e]:[],requestAnimationFrame(()=>{const e=l,t=b;l=void 0,b=void 0,t.forEach(e=>e()),e.forEach(e=>e())}))}function p(e){m(e,!0)}function g(e,t=!1){return h||(h=[],self.addEventListener("beforeunload",()=>{h.forEach(e=>e())})),t?h.push(e):h.unshift(e),()=>{h=h.filter(t=>t!==e)}}},function(e,t,n){"use strict";n.d(t,"s",(function(){return o})),n.d(t,"J",(function(){return c})),n.d(t,"t",(function(){return d})),n.d(t,"I",(function(){return i})),n.d(t,"N",(function(){return s})),n.d(t,"c",(function(){return f})),n.d(t,"L",(function(){return l})),n.d(t,"K",(function(){return b})),n.d(t,"O",(function(){return p})),n.d(t,"y",(function(){return v})),n.d(t,"d",(function(){return O})),n.d(t,"b",(function(){return j})),n.d(t,"M",(function(){return w})),n.d(t,"fb",(function(){return I})),n.d(t,"k",(function(){return C})),n.d(t,"l",(function(){return E})),n.d(t,"W",(function(){return S})),n.d(t,"eb",(function(){return M})),n.d(t,"h",(function(){return k})),n.d(t,"A",(function(){return T})),n.d(t,"lb",(function(){return N})),n.d(t,"mb",(function(){return P})),n.d(t,"v",(function(){return D})),n.d(t,"Q",(function(){return L})),n.d(t,"P",(function(){return x})),n.d(t,"n",(function(){return F})),n.d(t,"H",(function(){return B})),n.d(t,"o",(function(){return R})),n.d(t,"jb",(function(){return U})),n.d(t,"ib",(function(){return _})),n.d(t,"R",(function(){return $})),n.d(t,"r",(function(){return G})),n.d(t,"kb",(function(){return W})),n.d(t,"p",(function(){return H})),n.d(t,"z",(function(){return K})),n.d(t,"ob",(function(){return J})),n.d(t,"rb",(function(){return Q})),n.d(t,"g",(function(){return Y})),n.d(t,"gb",(function(){return Z})),n.d(t,"m",(function(){return X})),n.d(t,"pb",(function(){return ee})),n.d(t,"qb",(function(){return te})),n.d(t,"S",(function(){return ue})),n.d(t,"T",(function(){return oe})),n.d(t,"V",(function(){return ce})),n.d(t,"U",(function(){return de})),n.d(t,"Z",(function(){return se})),n.d(t,"u",(function(){return fe})),n.d(t,"ab",(function(){return le})),n.d(t,"Y",(function(){return he})),n.d(t,"X",(function(){return me})),n.d(t,"cb",(function(){return ge})),n.d(t,"bb",(function(){return ye})),n.d(t,"w",(function(){return ve})),n.d(t,"x",(function(){return Oe})),n.d(t,"f",(function(){return je})),n.d(t,"e",(function(){return we})),n.d(t,"db",(function(){return Ie})),n.d(t,"a",(function(){return Ce})),n.d(t,"q",(function(){return Ee})),n.d(t,"nb",(function(){return Se})),n.d(t,"hb",(function(){return Me})),n.d(t,"F",(function(){return Ae})),n.d(t,"D",(function(){return ke})),n.d(t,"B",(function(){return Te})),n.d(t,"G",(function(){return Ne})),n.d(t,"C",(function(){return Pe})),n.d(t,"E",(function(){return De})),n.d(t,"i",(function(){return Le})),n.d(t,"j",(function(){return xe}));var r=n(2),u=n(3);function o(e,t,n){return{...e,chats:{...e.chats,listIds:{...e.chats.listIds,[t]:n}}}}function c(e,t,n){const{[t]:r}=e.chats.listIds,u=r&&r.length?n.filter(e=>!r.includes(e)):n;return r&&!u.length?e:o(e,t,[...r||[],...u])}function d(e,t){return{...e,chats:{...e.chats,byId:t}}}function a(e,t,n,r){const{byId:o}=e.chats,c=o[t],d=n.isMin&&c&&!c.isMin,a={...c,...d?Object(u.j)(n,["isMin","accessHash"]):n,...r&&{photos:[r,...c.photos||[]]}};return a.id&&a.type,a}function i(e,t,n,r){const{byId:u}=e.chats;return d(e,{...u,[t]:a(e,t,n,r)})}function s(e,t){const n=Object.keys(t).map(Number).reduce((n,r)=>{const u=a(e,r,t[r]);return u&&(n[r]=u),n},{});return e=d(e,{...e.chats.byId,...n})}function f(e,t){const{byId:n}=e.chats;let r=!1;const u=Object.keys(t).map(Number).reduce((u,o)=>{if(!n[o]||n[o].isMin&&!t[o].isMin){const n=a(e,o,t[o]);n&&(u[o]=n,r||(r=!0))}return u},{});return r&&(e=d(e,{...e.chats.byId,...u})),e}function l(e,t,n){const u=n===r.i?"archived":"active";let o=e.chats.listIds;return Object.keys(o).forEach(e=>{const n=o[e]||[];e!==u||n.includes(t)?e!==u&&n.includes(t)&&(o={...o,[e]:n.filter(e=>e!==t)}):o={...o,[e]:[...n,t]}}),e=i(e={...e,chats:{...e.chats,listIds:o}},t,{folderId:n||void 0})}function b(e,t,n){const r="active"===t?"all":"archived";return{...e,chats:{...e.chats,...n.orderedPinnedIds&&{orderedPinnedIds:{...e.chats.orderedPinnedIds,[t]:n.orderedPinnedIds}},totalCount:{...e.chats.totalCount,[r]:n.totalChatCount},isFullyLoaded:{...e.chats.isFullyLoaded,[t]:!1}}}}var h=n(8),m=n(7);function p(e,t,n=h.MAIN_THREAD_ID,u="thread",o){const{messageLists:c}=e.messages;let d=c;if(o||r.N)d=t?[{chatId:t,threadId:n,type:u}]:[];else if(t){const e=c[c.length-1];e&&e.chatId===t&&e.threadId===n&&e.type===u||(d=e&&-1===e.chatId?[...c.slice(0,-1),{chatId:t,threadId:n,type:u}]:[...c,{chatId:t,threadId:n,type:u}])}else d=c.slice(0,-1);return{...e,messages:{...e.messages,messageLists:d}}}function g(e,t,n){return y(e,t,{byId:n})}function y(e,t,n){const r=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...r,...n}}}}}function v(e,t,n,r,u){return function(e,t,n,r){const u=e.messages.byChatId[t];return y(e,t,{threadsById:{...u&&u.threadsById,[n]:{...u&&u.threadsById[n],...r}}})}(e,t,n,{[r]:u})}function O(e,t){const n=t.reduce((e,t)=>(e[t.chatId]||(e[t.chatId]={}),e[t.chatId][t.id]=t,e),{});return Object.keys(n).map(Number).forEach(t=>{e=j(e,t,n[t])}),e}function j(e,t,n){const r=Object(m.n)(e,t);return r&&Object.keys(n).every(e=>Boolean(r[Number(e)]))?e:g(e,t,{...n,...r})}function w(e,t,n,r){const u=Object(m.n)(e,t)||{},o={...u[n],...r};return o.id?g(e,t,{...u,[n]:o}):e}function I(e,t,n,r){const u=Object(m.sb)(e,t)||{},o={...u[n],...r};return o.id?D(e,t,{...u,[n]:o},void 0):e}function C(e,t,n){const r=Object(m.n)(e,t);if(!r)return e;const o=Object(u.j)(r,n),c=Object.values(Object(u.m)(r,n)).filter(({forwardInfo:e})=>e&&e.isLinkedChannelPost);if(Object.keys(e.messages.byChatId[t].threadsById).map(Number).forEach(r=>{const u=Object(m.Fb)(e,t,r);let o=Object(m.Z)(e,t,r),c=Object(m.hb)(e,t,r),d=Object(m.Kb)(e,t,r),a=Object(m.kb)(e,t),i=u?u.messagesCount:void 0;n.forEach(e=>{o&&o.includes(e)&&(o=o.filter(t=>t!==e),void 0!==i&&(i-=1)),c&&c.includes(e)&&(c=c.filter(t=>t!==e)),d&&d.includes(e)&&(d=d.filter(t=>t!==e)),a&&a.includes(e)&&(a=a.filter(t=>t!==e))}),e=v(e,t,r,"listedIds",o),e=v(e,t,r,"outlyingIds",c),e=v(e,t,r,"viewportIds",d),e=v(e,t,r,"pinnedIds",a),u&&void 0!==i&&(e=v(e,t,r,"threadInfo",{...u,messagesCount:i}))}),c.length){const n=Object(m.z)(e),r=n&&n.chatId===t&&"thread"===n.type,u=n&&n.threadId;c.forEach(n=>{const{fromChatId:o,fromMessageId:c}=n.forwardInfo,d=Object(m.l)(e,o,c);r&&u===c&&(e=p(e,t)),d&&(e=w(e,o,c,{threadInfo:void 0}))})}return e=g(e,t,o)}function E(e,t,n){const r=Object(m.sb)(e,t);if(!r)return e;const o=Object(u.j)(r,n);let c=Object(m.qb)(e,t);return c&&(n.forEach(e=>{c.includes(e)&&(c=c.filter(t=>t!==e))}),e=v(e,t,h.MAIN_THREAD_ID,"scheduledIds",c)),e=D(e,t,o,void 0)}function S(e,t,n,r){const u=Object(m.Z)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:v(e,t,n,"listedIds",A([...u||[],...o]))}function M(e,t,n,r){const u=Object(m.hb)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:v(e,t,n,"outlyingIds",A([...u||[],...o]))}function A(e){return e.sort((e,t)=>e-t)}function k(e,t,n,u){const o=Object(m.Kb)(e,t,n)||[];if(o.includes(u))return e;return v(e,t,n,"viewportIds",A([...o.length<r.hb?o:o.slice(-r.gb/2),u]))}function T(e,t,n,r){const o=Object(m.Kb)(e,t,n)||[];return v(e,t,n,"viewportIds",Object(u.a)(o,r)?o:r)}function N(e,t,n,r){const u={...Object(m.Fb)(e,t,n),...r};return u.threadId?v(e,t,n,"threadInfo",u):e}function P(e,t,n){return n.forEach(t=>{e=N(e,t.chatId,t.threadId,t)}),e}function D(e,t,n,r){return function(e,t,n){const r=e.scheduledMessages.byChatId[t]||{byId:{},hash:0};return{...e,scheduledMessages:{byChatId:{...e.scheduledMessages.byChatId,[t]:{...r,...n}}}}}(e,t,{byId:n,hash:r})}function L(e,t,n,r=!1){return{...e,focusedMessage:{...e.focusedMessage,chatId:t,messageId:n,noHighlight:r}}}function x(e,t){return{...e,focusedMessage:{...e.focusedMessage,direction:t}}}function F(e,t,n){return{...e,selectedMessages:{chatId:t,messageIds:n?Array.prototype.concat([],n):[]}}}function B(e,t,n,r,o,c,d,a=!1){const{selectedMessages:i}=e;c&&(d=Object(m.bb)(e,t,c));const s=d||[o];if(!i)return F(e,t,s);const{messageIds:f}=i;let l;const b=s.filter(e=>!f.includes(e));if(b&&!b.length)l=f.filter(e=>!s.includes(e));else if(a&&f.length){const c=Object(m.y)(e,t,n,r),d=c.indexOf(f[f.length-1]),a=c.indexOf(o),i=Math.min(d,a),s=Math.max(d,a),b=c.slice(i,s+1);l=Object(u.o)([...f,...b])}else l=[...f,...b];return l.length?{...e,selectedMessages:{...i,messageIds:l}}:R(e)}function R(e){return{...e,selectedMessages:void 0}}function U(e,t,n,r,o){const c=r.map(t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t});return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...Object(u.c)(c,"id")},[t]:{...e.stickers[t],hash:n,..."search"===t?{resultIds:o}:{setIds:r.map(({id:e})=>e)}}}}}function _(e,t,n){const r=e.stickers.setsById[t]||{};return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,[t]:{...r,...n}}}}}function $(e,t,n,r){const{results:u}=e.gifs.search;let o;if(t||!u)o=n;else{const e=new Set(u.map(e=>e.id));o=[...u,...n.filter(t=>!e.has(t.id))]}return{...e,gifs:{...e.gifs,search:{...e.gifs.search,offset:r,results:o}}}}function G(e,t){return{...e,animatedEmojis:t}}function W(e,t,n,r){const o=[...Object(m.Ab)(e,t),...n||[]],c=Object(u.o)(o.map(({id:e})=>e)),d=Object(u.c)(o,"id"),a=c.map(e=>d[e]);return{...e,stickers:{...e.stickers,forEmoji:{emoji:t,stickers:a,hash:r}}}}function H(e){const{emoji:t,stickers:n,hash:r}=e.stickers.forEmoji||{};return t?W(e,t,n,r):e}var z=n(51);function K(e,t){return{...e,users:{...e.users,byId:t}}}function V(e,t,n){const{byId:r}=e.users,o=r[t],c=n.isMin&&o&&!o.isMin,d={...o,...c?Object(u.j)(n,["isMin","accessHash"]):n};return d.id&&d.type?d:o}function q(e,t){const{hash:n,userIds:r}=e.contactList||{};if(!r)return e;const u=t.filter(e=>e&&e.isContact&&!r.includes(e.id)).map(e=>e.id);return 0===u.length?e:{...e,contactList:{hash:n||0,userIds:[...u,...r]}}}function J(e,t,n){const{byId:r}=e.users,u=V(e,t,n);return K(e=q(e,[u]),{...r,[t]:u})}function Q(e,t){const n=Object.keys(t).map(Number).reduce((n,r)=>{const u=V(e,r,t[r]);return u&&(n[r]=u),n},{});return e=K(e=q(e,Object.values(n)),{...e.users.byId,...n})}function Y(e,t){const{byId:n}=e.users;let r=!1;const u=Object.keys(t).map(Number).reduce((u,o)=>{if(!n[o]||n[o].isMin&&!t[o].isMin){const n=V(e,o,t[o]);n&&(u[o]=n,r||(r=!0))}return u},{});return r&&(e=q(e=K(e,{...e.users.byId,...u}),Object.values(u))),e}function Z(e,t){return e.users.selectedId===t?e:{...e,users:{...e.users,selectedId:t}}}function X(e,t){const{byId:n}=e.users,{hash:r,userIds:u}=e.contactList||{};return delete n[t],K(e={...e,contactList:{hash:r||0,userIds:u?u.filter(e=>e!==t):z.a}},n)}function ee(e,t){return{...e,userSearch:{...e.userSearch,...t}}}function te(e,t){return ee(e,{fetchingStatus:t})}function ne(e,t,n){const{byId:r}=e.users,u=r[t];return u&&u.fullInfo?J(e,t,{...u,fullInfo:{...u.fullInfo,isBlocked:n}}):e}const re=e=>`${e.chatId}_${e.id}`;function ue(e,t){return{...e,globalSearch:{...e.globalSearch,...t}}}function oe(e,t){return ue(e,{currentContent:t})}function ce(e,t,n,r,o){const{resultsByType:c}=e.globalSearch||{},d=t.reduce((e,t)=>(e[re(t)]=t,e),{}),a=c&&c[r]?c[r].foundIds:void 0;if(void 0!==a&&Object.keys(d).every(e=>a.includes(re(d[e]))))return de(e,{messages:!1});const i=a||[],s=t.map(e=>re(e)),f=Array.prototype.concat(i,s),l=Object(u.a)(i,f)?i:f;return ue(e=de(e,{messages:!1}),{resultsByType:{...(e.globalSearch||{}).resultsByType,[r]:{totalCount:n,nextOffsetId:o,foundIds:l}}})}function de(e,t){return ue(e,{fetchingStatus:{...e.globalSearch.fetchingStatus,...t}})}var ae=n(4);function ie(e,t,n){return{...e,localTextSearch:{byChatThreadKey:{...e.localTextSearch.byChatThreadKey,[t]:n}}}}function se(e,t,n,r,u){const o=Object(ae.a)(t,n);return ie(e,o,{...e.localTextSearch.byChatThreadKey[o],isActive:r,query:u})}function fe(e,t,n,r,u,o){const c=Object(ae.a)(t,n);return ie(e,c,{...e.localTextSearch.byChatThreadKey[c],results:{foundIds:r,totalCount:u,nextOffsetId:o}})}function le(e,t,n,r,o,c){const d=Object(ae.a)(t,n),{results:a}=e.localTextSearch.byChatThreadKey[d]||{},i=a&&a.foundIds||[],s=pe(Object(u.o)(Array.prototype.concat(i,r)));return fe(e,t,n,Object(u.a)(i,s)?i:s,o,c)}function be(e,t,n){return{...e,localMediaSearch:{byChatId:{...e.localMediaSearch.byChatId,[t]:n}}}}function he(e,t,n){return be(e,t,{...e.localMediaSearch.byChatId[t],currentType:n})}function me(e,t,n,r,o,c){const{resultsByType:d}=e.localMediaSearch.byChatId[t]||{},a=d&&d[n]?d[n].foundIds:[],i=pe(Object(u.o)(Array.prototype.concat(a,r)));return function(e,t,n,r,u,o){return be(e,t,{...e.localMediaSearch.byChatId[t],resultsByType:{...(e.localMediaSearch.byChatId[t]||{}).resultsByType,[n]:{foundIds:r,totalCount:u,nextOffsetId:o}}})}(e,t,n,Object(u.a)(a,i)?a:i,o,c)}function pe(e){return e.sort((e,t)=>e-t)}function ge(e,t){return{...e,management:{...e.management,progress:t}}}function ye(e,t,n){return{...e,management:{...e.management,byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t]||{},...n}}}}}function ve(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function Oe(e,t,n){return{...e,settings:{...e.settings,themes:{...e.settings.themes,[t]:{...e.settings.themes[t]||{},...n}}}}}function je(e,t){return t.forEach(t=>{const{chatId:n,...r}=t;e=we(e,n,r)}),e}function we(e,t,n){return{...e,settings:{...e.settings,notifyExceptions:{...e.settings.notifyExceptions,[t]:n}}}}function Ie(e,t,n,r){switch(t){case"contact":return ve(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==r&&{hasPrivateChatsMessagePreview:r}});case"group":return ve(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==r&&{hasGroupMessagePreview:r}});case"broadcast":return ve(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==r&&{hasBroadcastMessagePreview:r}});default:return}}function Ce(e,t){return e=ne(e,t,!0),{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function Ee(e,t){return e=ne(e,t,!1),{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter(e=>e!==t),totalCount:e.blocked.totalCount-1}}}function Se(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}function Me(e,t){return{...e,payment:{...e.payment,shippingOptions:t}}}function Ae(e,t){return{...e,payment:{...e.payment,formId:t}}}function ke(e,t){return{...e,payment:{...e.payment,step:t}}}function Te(e,t){if(!t.content||!t.content.invoice)return e;const{title:n,text:r,description:u,photoUrl:o}=t.content.invoice;return{...e,payment:{...e.payment,invoiceContent:{title:n,text:r,description:u,photoUrl:o}}}}function Ne(e,t){return{...e,payment:{...e.payment,stripeCredentials:{...t}}}}function Pe(e,t){return{...e,payment:{...e.payment,...t}}}function De(e,t,n){if(!t||!n)return{...e,payment:{...e.payment,receipt:void 0}};const{invoice:r}=n.content,{photoUrl:u,text:o,title:c}=r||{};return{...e,payment:{...e.payment,receipt:{...t,photoUrl:u,text:o,title:c}}}}function Le(e){return{...e,payment:{}}}function xe(e){return{...e,payment:{...e.payment,isPaymentModalOpen:!1}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return d}));const r=self.caches;let u;async function o(e,t,n){if(r)try{const o=new Request(t.replace(/:/g,"_")),c=await r.open(e),d=await c.match(o);if(!d)return;switch(n){case u.Text:return await d.text();case u.Blob:{const e=await d.blob();if("sticker"===t.substr(0,7))return new Blob([e],{type:"image/webp"});if(!e.type){const t=d.headers.get("Content-Type");if(t)return new Blob([e],{type:t})}return e}case u.Json:return await d.json();default:return}}catch(e){return void console.warn(e)}}async function c(e,t,n){if(r)try{const u="string"==typeof n||n instanceof Blob?n:JSON.stringify(n),o=new Request(t.replace(/:/g,"_")),c=new Response(u),d=await r.open(e);return await d.put(o,c)}catch(e){return void console.warn(e)}}async function d(e){try{if(!r)return;return await r.delete(e)}catch(e){return void console.warn(e)}}!function(e){e[e.Text=0]="Text",e[e.Blob=1]="Blob",e[e.Json=2]="Json"}(u||(u={}))},function(e,t,n){"use strict";let r,u,o,c,d,a,i,s,f,l,b,h,m;n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"n",(function(){return o})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"m",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"i",(function(){return b})),n.d(t,"l",(function(){return h})),n.d(t,"j",(function(){return m})),n.d(t,"o",(function(){return p})),n.d(t,"g",(function(){return g})),function(e){e[e.Backwards=0]="Backwards",e[e.Forwards=1]="Forwards",e[e.Around=2]="Around"}(r||(r={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Static=2]="Static"}(u||(u={})),function(e){e[e.Main=0]="Main",e[e.EditProfile=1]="EditProfile",e[e.Notifications=2]="Notifications",e[e.Language=3]="Language",e[e.General=4]="General",e[e.GeneralChatBackground=5]="GeneralChatBackground",e[e.GeneralChatBackgroundColor=6]="GeneralChatBackgroundColor",e[e.Privacy=7]="Privacy",e[e.PrivacyPhoneNumber=8]="PrivacyPhoneNumber",e[e.PrivacyLastSeen=9]="PrivacyLastSeen",e[e.PrivacyProfilePhoto=10]="PrivacyProfilePhoto",e[e.PrivacyForwarding=11]="PrivacyForwarding",e[e.PrivacyGroupChats=12]="PrivacyGroupChats",e[e.PrivacyPhoneNumberAllowedContacts=13]="PrivacyPhoneNumberAllowedContacts",e[e.PrivacyPhoneNumberDeniedContacts=14]="PrivacyPhoneNumberDeniedContacts",e[e.PrivacyLastSeenAllowedContacts=15]="PrivacyLastSeenAllowedContacts",e[e.PrivacyLastSeenDeniedContacts=16]="PrivacyLastSeenDeniedContacts",e[e.PrivacyProfilePhotoAllowedContacts=17]="PrivacyProfilePhotoAllowedContacts",e[e.PrivacyProfilePhotoDeniedContacts=18]="PrivacyProfilePhotoDeniedContacts",e[e.PrivacyForwardingAllowedContacts=19]="PrivacyForwardingAllowedContacts",e[e.PrivacyForwardingDeniedContacts=20]="PrivacyForwardingDeniedContacts",e[e.PrivacyGroupChatsAllowedContacts=21]="PrivacyGroupChatsAllowedContacts",e[e.PrivacyGroupChatsDeniedContacts=22]="PrivacyGroupChatsDeniedContacts",e[e.PrivacyActiveSessions=23]="PrivacyActiveSessions",e[e.PrivacyBlockedUsers=24]="PrivacyBlockedUsers",e[e.Folders=25]="Folders",e[e.FoldersCreateFolder=26]="FoldersCreateFolder",e[e.FoldersEditFolder=27]="FoldersEditFolder",e[e.FoldersEditFolderFromChatList=28]="FoldersEditFolderFromChatList",e[e.FoldersIncludedChats=29]="FoldersIncludedChats",e[e.FoldersIncludedChatsFromChatList=30]="FoldersIncludedChatsFromChatList",e[e.FoldersExcludedChats=31]="FoldersExcludedChats",e[e.FoldersExcludedChatsFromChatList=32]="FoldersExcludedChatsFromChatList",e[e.TwoFaDisabled=33]="TwoFaDisabled",e[e.TwoFaNewPassword=34]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=35]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=36]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=37]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=38]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=39]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=40]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=41]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=42]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=43]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=44]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=45]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=46]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=47]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=48]="TwoFaCongratulations"}(o||(o={})),function(e){e[e.ChatList=0]="ChatList",e[e.GlobalSearch=1]="GlobalSearch",e[e.Settings=2]="Settings",e[e.Contacts=3]="Contacts",e[e.Archived=4]="Archived",e[e.NewChannelStep1=5]="NewChannelStep1",e[e.NewChannelStep2=6]="NewChannelStep2",e[e.NewGroupStep1=7]="NewGroupStep1",e[e.NewGroupStep2=8]="NewGroupStep2"}(c||(c={})),function(e){e[e.ChatList=0]="ChatList",e[e.Media=1]="Media",e[e.Links=2]="Links",e[e.Files=3]="Files",e[e.Music=4]="Music",e[e.Voice=5]="Voice"}(d||(d={})),function(e){e[e.ChatInfo=0]="ChatInfo",e[e.UserInfo=1]="UserInfo",e[e.Search=2]="Search",e[e.Management=3]="Management",e[e.StickerSearch=4]="StickerSearch",e[e.GifSearch=5]="GifSearch",e[e.PollResults=6]="PollResults",e[e.AddingMembers=7]="AddingMembers"}(a||(a={})),function(e){e[e.Inline=0]="Inline",e[e.ScheduledInline=1]="ScheduledInline",e[e.SharedMedia=2]="SharedMedia",e[e.ProfileAvatar=3]="ProfileAvatar",e[e.MiddleHeaderAvatar=4]="MiddleHeaderAvatar",e[e.Album=5]="Album",e[e.ScheduledAlbum=6]="ScheduledAlbum",e[e.SearchResult=7]="SearchResult"}(i||(i={})),function(e){e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(s||(s={})),function(e){e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(f||(f={})),function(e){e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error"}(l||(l={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Loading=2]="Loading"}(b||(b={})),function(e){e[e.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList"}(h||(h={})),function(e){e[e.ShippingInfo=0]="ShippingInfo",e[e.Shipping=1]="Shipping",e[e.PaymentInfo=2]="PaymentInfo",e[e.Checkout=3]="Checkout"}(m||(m={}));const p="UPLOADING_WALLPAPER_SLUG";let g;!function(e){e[e.Initial=0]="Initial",e[e.ChatPrivacyType=1]="ChatPrivacyType",e[e.Discussion=2]="Discussion",e[e.ChannelSubscribers=3]="ChannelSubscribers",e[e.GroupType=4]="GroupType",e[e.GroupPermissions=5]="GroupPermissions",e[e.GroupRemovedUsers=6]="GroupRemovedUsers",e[e.GroupUserPermissionsCreate=7]="GroupUserPermissionsCreate",e[e.GroupUserPermissions=8]="GroupUserPermissions",e[e.ChatAdministrators=9]="ChatAdministrators",e[e.GroupRecentActions=10]="GroupRecentActions",e[e.ChatAdminRights=11]="ChatAdminRights",e[e.GroupMembers=12]="GroupMembers"}(g||(g={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return O}));var r=n(2),u=n(12),o=n(5);var c=n(50),d=n(1);const a=/%\d?\$?[sdf@]/g,i=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],s={en:e=>1!==e?6:2,ar:e=>0===e?1:1===e?2:2===e?3:e%100>=3&&e%100<=10?4:e%100>=11?5:6,ca:e=>1!==e?6:2,de:e=>1!==e?6:2,es:e=>1!==e?6:2,fa:e=>e>1?6:2,fr:e=>e>1?6:2,id:()=>0,it:e=>1!==e?6:2,ko:()=>0,ms:()=>0,nl:e=>1!==e?6:2,pl:e=>1===e?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,pt_BR:e=>e>1?6:2,ru:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,tr:e=>e>1?6:2,uk:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,uz:e=>e>1?6:2},f=new Map;let l,b;const{addCallback:h,removeCallback:m,runCallbacks:p}=function(){const e=[];function t(t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}return{runCallbacks:function(...t){e.forEach(e=>{e(...t)})},addCallback:function(n){return e.push(n),()=>{t(n)}},removeCallback:t}}();let g;const y=(e,t,n)=>{if(void 0!==t){const r=Array.isArray(t)?JSON.stringify(t):t,u=f.get(`${e}_${r}_${n}`);if(u)return u}if(!l&&!b)return e;const r=l&&l[e]||b&&b[e];return r?w(r,e,t,n):(b||j(),e)};async function v(e,t){let n=await u.c(r.O,`${r.v}_${e}_${t}`,u.a.Json);return n||(n=await async function(e,t,n){const c=await Object(o.a)("fetchLangStrings",{langPack:e,langCode:t,keys:[n]});if(c&&c.length)return await u.d(r.O,`${e}_${t}_${n}`,c[0]),c[0];return}(r.v,e,t)),w(n,t)}async function O(e,t,n=!1){if(l&&e===g)return void(t&&t());let c=await u.c(r.O,e,u.a.Json);if(!c&&(n&&await j(),c=await async function(e){const t=await Object(o.a)("fetchLangPack",{sourceLangPacks:r.P,langCode:e});if(t)return await u.d(r.O,e,t.langPack),t.langPack;return}(e),!c))return;f.clear(),g=e,l=c,document.documentElement.lang=e;const{languages:a}=Object(d.e)().settings.byKey,i=a?a.find(t=>t.langCode===e):void 0;y.isRtl=Boolean(i&&i.rtl),y.code=e,t&&t(),p()}async function j(){b||(b=(await n.e(9).then(n.bind(null,332))).default,p())}function w(e,t,n,u){const o=e?e["number"==typeof n?function(e){const t=g||r.u,n=s[t]?s[t](e):0;return i[n]}(n):"value"]:void 0;if(!o||!o.trim()){const e=t.split(".");return e[e.length-1]}if(void 0!==n){const e=function(e,t){t=Array.isArray(t)?t:[t];const n=e.split(a),r=n.shift();return n.reduce((e,n,r)=>`${e}${String(t[r]||"")}${n}`,r||"")}(o,"i"===u?Object(c.a)(n):n),r=Array.isArray(n)?JSON.stringify(n):n;return f.set(`${t}_${r}_${u}`,e),e}return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(2);let u;!function(e){e[e.Auth=0]="Auth",e[e.Main=1]="Main",e[e.Extra=2]="Extra"}(u||(u={}));const o={},c={};async function d(e,t){if(!o[e]){switch(e){case u.Auth:o[u.Auth]=n.e(5).then(n.bind(null,107));break;case u.Main:r.r&&console.log(">>> START LOAD MAIN BUNDLE"),o[u.Main]=Promise.all([n.e(0),n.e(4)]).then(n.bind(null,105));break;case u.Extra:o[u.Extra]=Promise.all([n.e(0),n.e(3)]).then(n.bind(null,106))}o[e].then(f)}const d=await o[e];return c[e]||(c[e]=d),a(e,t)}function a(e,t){const n=c[e];if(n)return n[t]}const i=[];function s(e){i.includes(e)||i.push(e)}function f(){i.forEach(e=>{e()})}},function(e,t,n){"use strict";var r=n(14),u=n(31),o=n(52);t.a=()=>{const e=Object(u.a)();return Object(o.a)(()=>r.a(e),[e]),r.b}},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l}));var r=n(10);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}"undefined"==typeof File&&(self.File=class extends Blob{constructor(e,t,n){if(n){const{type:t,...r}=n;super(e,{type:t}),u(this,"name",void 0),Object.assign(this,r)}else super(e),u(this,"name",void 0);this.name=t}});function o(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let u=r.length;const o=new Uint8Array(u);for(;u--;)o[u]=r.charCodeAt(u);return new Blob([o],{type:n})}function c(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=e=>{const{result:r}=e.target||{};"string"==typeof r&&t(r),n(new Error("Failed to read blob"))},r.onerror=n,r.readAsDataURL(e)})}function d(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}function a(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e})}function i(e){return new Promise((t,n)=>{const r=document.createElement("video");r.volume=0,r.onloadedmetadata=()=>t(r),r.onerror=n,r.src=e})}async function s(e){const t=await i(e);return Promise.race([Object(r.f)(2e3),new Promise((e,n)=>{t.onseeked=()=>{t.videoWidth&&t.videoHeight||e(void 0);const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;n.getContext("2d").drawImage(t,0,0),e(n.toDataURL("image/jpeg"))},t.onerror=n,t.currentTime=Math.min(t.duration,1)})])}async function f(e){return(await fetch(e)).blob()}function l(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;return t.getContext("2d").drawImage(e,0,0),t}},function(e,t,n){"use strict";function r(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}let u;function o(){return u||(u=function(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const u=r(n);return(e,n)=>u.then(r=>n(r.transaction(t,e).objectStore(t)))}("keyval-store","keyval")),u}function c(e,t){return e("readonly",e=>(e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},r(e.transaction)))}n.d(t,"c",(function(){return s})),n.d(t,"f",(function(){return f})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return b})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return m}));var d=n(2),a=n(12);const i=[1,2,3,4,5];function s(e=!1){if(e&&localStorage.getItem(d.Q))return!0;const t=localStorage.getItem(d.zb);if(!t)return!1;try{const e=JSON.parse(t);return Boolean(e&&e.id&&e.dcID)}catch(e){return!1}}function f(e,t){const{mainDcId:n,keys:r,hashes:u}=e;localStorage.setItem(d.zb,JSON.stringify({dcID:n,id:t})),localStorage.setItem("dc",String(n)),Object.keys(r).map(Number).forEach(e=>{localStorage.setItem(`dc${e}_auth_key`,JSON.stringify(r[e]))}),Object.keys(u).map(Number).forEach(e=>{localStorage.setItem(`dc${e}_hash`,JSON.stringify(u[e]))})}function l(){[d.zb,"dc",...i.map(e=>`dc${e}_auth_key`),...i.map(e=>`dc${e}_hash`)].forEach(e=>{localStorage.removeItem(e)})}function b(){if(!s())return;const e=JSON.parse(localStorage.getItem(d.zb)),t=Number(e.dcID),n={},r={};return i.forEach(e=>{try{const t=localStorage.getItem(`dc${e}_auth_key`);t&&(n[e]=JSON.parse(t));const u=localStorage.getItem(`dc${e}_hash`);u&&(r[e]=JSON.parse(u))}catch(e){d.r&&console.warn("Failed to load stored session",e)}}),Object.keys(n).length?{mainDcId:t,keys:n,hashes:r}:void 0}async function h(){const e=localStorage.getItem(d.Q);if(!e)return;const t=await function(e,t=o()){return t("readonly",t=>r(t.get(e)))}("GramJs:"+e);try{f(JSON.parse(t))}catch(e){d.r&&console.warn("Failed to load legacy session",e)}}async function m(){localStorage.removeItem(d.Q);const e=await function(e=o()){const t=[];return c(e,e=>t.push(e.key)).then(()=>t)}();await Promise.all([a.b("GramJs"),...e.filter(e=>"string"==typeof e&&e.startsWith("GramJs:GramJs-session-")).map(e=>function(e,t=o()){return t("readwrite",t=>(t.delete(e),r(t.transaction)))}(e))])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));const r=/\uFE0F/g,u=String.fromCharCode(8205);function o(e){return e.indexOf(u)<0?e.replace(r,""):e}t.a=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g},function(e,t,n){"use strict";var r=n(0),u=n(26);n(96);t.a=Object(r.h)(({color:e="blue"})=>r.a.createElement("div",{className:"Loading"},r.a.createElement(u.a,{color:e,withBackground:"white"===e})))},function(e,t,n){"use strict";var r=n(0),u=n(9),o=n(26),c=n(44);n(94);t.a=({ref:e,type:t="button",onClick:n,onContextMenu:d,onMouseDown:a,onMouseEnter:i,onMouseLeave:s,onFocus:f,children:l,size:b="default",color:h="primary",className:m,round:p,pill:g,fluid:y,isText:v,isLoading:O,ariaLabel:j,href:w,download:I,disabled:C,ripple:E,faded:S,tabIndex:M,isRtl:A})=>{let k=Object(r.q)(null);e&&(k=e);const[T,N]=Object(r.r)(!1),P=Object(u.a)("Button",m,b,h,p&&"round",g&&"pill",y&&"fluid",C&&"disabled",v&&"text",O&&"loading",E&&"has-ripple",S&&"faded",T&&"clicked"),D=Object(r.m)(e=>{!C&&n&&n(e),N(!0),setTimeout(()=>{N(!1)},400)},[C,n]),L=Object(r.m)(e=>{e.preventDefault(),!C&&a&&a(e)},[a,C]);return w?r.a.createElement("a",{ref:k,className:P,href:w,title:j,download:I,tabIndex:M,dir:A?"rtl":void 0},l,!C&&E&&r.a.createElement(c.a,null)):r.a.createElement("button",{ref:k,type:t,className:P,onClick:D,onContextMenu:d,onMouseDown:L,onMouseEnter:i&&!C?i:void 0,onMouseLeave:s&&!C?s:void 0,onFocus:f&&!C?f:void 0,"aria-label":j,title:j,tabIndex:M,dir:A?"rtl":void 0},O?r.a.createElement("div",null,r.a.createElement("span",{dir:A?"auto":void 0},"Please wait.."),r.a.createElement(o.a,{color:v?"blue":"white"})):l,!C&&E&&r.a.createElement(c.a,null))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),u=n(19),o=n(2),c=n(6),d=n(66),a=n(9),i=n(78),s=n(59);const f=/^[\d\wа-яё]$/i,l=/(\*\*|__).+?\1/g;function b(e,t=["emoji"],n){return"string"!=typeof e?[e]:t.reduce((e,t)=>{switch(t){case"escape_html":return function(e){const t=document.createElement("div");return e.reduce((e,n)=>"string"!=typeof n?[...e,n]:(t.innerText=n,[...e,t.innerHTML]),[])}(e);case"hq_emoji":return u.a.lastIndex=0,h(e,"big","jsx");case"emoji":return u.a.lastIndex=0,h(e,"small","jsx");case"emoji_html":return u.a.lastIndex=0,h(e,"small","html");case"br":return m(e,"jsx");case"br_html":return m(e,"html");case"highlight":return o=e,c=n.highlight,o.reduce((e,t)=>{if("string"!=typeof t||!c)return[...e,t];const n=t.toLowerCase(),u=n.indexOf(c.toLowerCase()),o=n[u+c.length];if(u<0||o&&o.match(f))return[...e,t];const d=[];return d.push(t.substring(0,u)),d.push(r.a.createElement("span",{className:"matching-text-highlight"},t.substring(u,u+c.length))),d.push(t.substring(u+c.length)),[...e,...d]},[]);case"links":return function(e){return e.reduce((e,t)=>{if("string"!=typeof t)return[...e,t];const n=t.match(p);if(!n||!n.length)return[...e,t];const u=[];let o=n.shift(),c=0;for(;o;){const e=t.indexOf(o,c);u.push(t.substring(c,e)),o.startsWith("@")?u.push(r.a.createElement(i.a,{username:o},o)):(o.endsWith("?")&&(o=o.slice(0,o.length-1)),u.push(r.a.createElement(s.a,{text:o,url:o}))),c=e+o.length,o=n.shift()}return u.push(t.substring(c)),[...e,...u]},[])}(e);case"simple_markdown":return g(e,"jsx");case"simple_markdown_html":return g(e,"html")}var o,c;return e},[e])}function h(e,t,n){return c.d?e:e.reduce((e,o)=>{if("string"!=typeof o)return[...e,o];const c=o.split(u.a),i=o.match(u.a)||[];return e.push(c[0]),i.reduce((e,o,i)=>{const s=Object(d.a)(Object(u.b)(o)),f=Object(a.a)("emoji","small"===t&&"emoji-small");"jsx"===n&&e.push(r.a.createElement("img",{className:f,src:`./img-apple-${"big"===t?"160":"64"}/${s}.png`,alt:o})),"html"===n&&e.push(`<img draggable="false" class="${f}" src="./img-apple-${"big"===t?"160":"64"}/${s}.png" alt="${o}" />`);const l=2*i+2;return c[l]&&e.push(c[l]),e},e)},[])}function m(e,t){return e.reduce((e,n)=>"string"!=typeof n?[...e,n]:[...e,...n.split(/\r\n|\r|\n/g).reduce((e,n,u,o)=>{const c=n.trimLeft(),d=n.length-c.length;return e.push(String.fromCharCode(160).repeat(d)+c),u!==o.length-1&&e.push("jsx"===t?r.a.createElement("br",null):"<br />"),e},[])],[])}const p=new RegExp(`${o.rb}|${o.sb}`,"ig");function g(e,t){return e.reduce((e,n)=>{if("string"!=typeof n)return[...e,n];const u=n.split(l),o=n.match(l)||[];return e.push(u[0]),o.reduce((e,n,o)=>{"jsx"===t?e.push(n.startsWith("**")?r.a.createElement("b",null,n.replace(/\*\*/g,"")):r.a.createElement("i",null,n.replace(/__/g,""))):e.push(n.startsWith("**")?`<b>${n.replace(/\*\*/g,"")}</b>`:`<i>${n.replace(/__/g,"")}</i>`);const c=2*o+2;return u[c]&&e.push(u[c]),e},e)},[])}},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));const r={},u=/(\d{1,3})(\d{1,3})?(\d{1,3})?(\d{1,3})?(\d{1,3})?/;var o="AF🇦🇫93Afghanistan333\nAO🇦🇴244Angola333\nAL🇦🇱355Albania234\nAD🇦🇩376Andorra222\nAE🇦🇪971United Arab Emirates234\nAI🇦🇮1264Anguilla34\nAR🇦🇷54Argentina\nAM🇦🇲374Armenia233\nAG🇦🇬1268Antigua and Barbuda34\nAU🇦🇺61Australia333\nAS🇦🇸1684American Samoa34\nAT🇦🇹43Austria\nAW🇦🇼297Aruba34\nAZ🇦🇿994Azerbaijan2322\nBI🇧🇮257Burundi224\nBE🇧🇪32Belgium3222\nBJ🇧🇯229Benin233\nBF🇧🇫226Burkina Faso2222\nBD🇧🇩880Bangladesh\nBG🇧🇬359Bulgaria\nBH🇧🇭973Bahrain44\nBS🇧🇸1242Bahamas34\nBA🇧🇦387Bosnia and Herzegovina\nBY🇧🇾375Belarus2322\nBZ🇧🇿501Belize\nBO🇧🇴591Bolivia134\nBR🇧🇷55Brazil254\nBB🇧🇧1246Barbados34\nBM🇧🇲1441Bermuda34\nBN🇧🇳673Brunei34\nBQ🇧🇶599Bonaire, Sint Eustatius and Saba\nBT🇧🇹975Bhutan\nBW🇧🇼267Botswana233\nCF🇨🇫236Central African Republic2222\nCA🇨🇦1Canada334\nCH🇨🇭41Switzerland234\nCK🇨🇰682Cook Islands\nCL🇨🇱56Chile144\nCN🇨🇳86China344\nCI🇨🇮225Côte d`Ivoire233\nCM🇨🇲237Cameroon44\nCD🇨🇩243DR Congo234\nCG🇨🇬242Republic of the Congo234\nCO🇨🇴57Colombia334\nKM🇰🇲269Comoros34\nCV🇨🇻238Cape Verde34\nCR🇨🇷506Costa Rica\nCU🇨🇺53Cuba44\nCY🇨🇾357Cyprus44\nCW🇨🇼599Curaçao\nCZ🇨🇿420Czech Republic\nDE🇩🇪49Germany38\nDJ🇩🇯253Djibouti2222\nDM🇩🇲1767Dominica34\nDK🇩🇰45Denmark44\nDO🇩🇴1Dominican Republic334\nDZ🇩🇿213Algeria3222\nEC🇪🇨593Ecuador\nEG🇪🇬20Egypt234\nER🇪🇷291Eritrea133\nES🇪🇸34Spain333\nEE🇪🇪372Estonia\nET🇪🇹251Ethiopia234\nFI🇫🇮358Finland\nFJ🇫🇯679Fiji\nFK🇫🇰500Falkland Islands\nFM🇫🇲691Micronesia\nFO🇫🇴298Faroe Islands33\nFR🇫🇷33France12222\nGA🇬🇦241Gabon1222\nGB🇬🇧44United Kingdom46\nGE🇬🇪995Georgia\nGF🇬🇫594French Guiana\nGH🇬🇭233Ghana\nGI🇬🇮350Gibraltar44\nGL🇬🇱299Greenland33\nGN🇬🇳224Guinea333\nGM🇬🇲220Gambia34\nGP🇬🇵590Guadeloupe\nGU🇬🇺1671Guam34\nGW🇬🇼245Guinea-Bissau34\nGQ🇬🇶240Equatorial Guinea333\nGR🇬🇷30Greece244\nGD🇬🇩1473Grenada34\nGT🇬🇹502Guatemala134\nGY🇬🇾592Guyana\nHK🇭🇰852Hong Kong\nHN🇭🇳504Honduras44\nHR🇭🇷385Croatia\nHT🇭🇹509Haiti\nHU🇭🇺36Hungary234\nID🇮🇩62Indonesia\nIN🇮🇳91India55\nIO🇩🇬246Diego Garcia34\nIE🇮🇪353Ireland234\nIR🇮🇷98Iran334\nIQ🇮🇶964Iraq334\nIS🇮🇸354Iceland34\nIL🇮🇱972Israel234\nIT🇮🇹39Italy334\nJM🇯🇲1876Jamaica34\nJO🇯🇴962Jordan144\nJP🇯🇵81Japan244\nKZ🇰🇿7Kazakhstan3322\nKE🇰🇪254Kenya333\nKG🇰🇬996Kyrgyzstan\nKH🇰🇭855Cambodia\nKI🇰🇮686Kiribati\nKN🇰🇳1869Saint Kitts and Nevis34\nKR🇰🇷82South Korea\nKW🇰🇼965Kuwait44\nKY🇰🇾1345Cayman Islands34\nLA🇱🇦856Laos\nLB🇱🇧961Lebanon\nLR🇱🇷231Liberia\nLY🇱🇾218Libya234\nLC🇱🇨1758Saint Lucia34\nLI🇱🇮423Liechtenstein\nLK🇱🇰94Sri Lanka234\nLS🇱🇸266Lesotho233\nLT🇱🇹370Lithuania35\nLU🇱🇺352Luxembourg\nLV🇱🇻371Latvia35\nMA🇲🇦212Morocco234\nMC🇲🇨377Monaco44\nMD🇲🇩373Moldova233\nMG🇲🇬261Madagascar2232\nMP🇲🇵1670Northern Mariana Islands34\nMO🇲🇴853Macau\nMS🇲🇸1664Montserrat34\nMV🇲🇻960Maldives\nMX🇲🇽52Mexico\nMH🇲🇭692Marshall Islands\nMK🇲🇰389Macedonia\nML🇲🇱223Mali44\nMT🇲🇹356Malta2222\nMM🇲🇲95Myanmar\nME🇲🇪382Montenegro\nMN🇲🇳976Mongolia\nMZ🇲🇿258Mozambique234\nMQ🇲🇶596Martinique\nMR🇲🇷222Mauritania44\nMU🇲🇺230Mauritius\nMW🇲🇼265Malawi\nMY🇲🇾60Malaysia\nNA🇳🇦264Namibia234\nNC🇳🇨687New Caledonia6\nNE🇳🇪227Niger2222\nNF🇳🇫672Norfolk Island\nNG🇳🇬234Nigeria\nNI🇳🇮505Nicaragua44\nNL🇳🇱31Netherlands12222\nNO🇳🇴47Norway44\nNP🇳🇵977Nepal\nNU🇳🇺683Niue\nNR🇳🇷674Nauru\nNZ🇳🇿64New Zealand\nOM🇴🇲968Oman44\nPK🇵🇰92Pakistan334\nPA🇵🇦507Panama44\nPE🇵🇪51Peru333\nPF🇵🇫689French Polynesia\nPH🇵🇭63Philippines334\nPM🇵🇲508Saint Pierre and Miquelon\nPR🇵🇷1Puerto Rico334\nPS🇵🇸970Palestine324\nPW🇵🇼680Palau\nPG🇵🇬675Papua New Guinea\nPL🇵🇱48Poland333\nKP🇰🇵850North Korea\nPT🇵🇹351Portugal144\nPY🇵🇾595Paraguay333\nQA🇶🇦974Qatar\nRE🇷🇪262Réunion333\nRO🇷🇴40Romania333\nRU🇷🇺7Russia3322\nRW🇷🇼250Rwanda333\nSA🇸🇦966Saudi Arabia\nSD🇸🇩249Sudan234\nSN🇸🇳221Senegal234\nSG🇸🇬65Singapore44\nSH🇸🇭290Saint Helena23\nSH🇸🇭247Saint Helena4\nSB🇸🇧677Solomon Islands\nSL🇸🇱232Sierra Leone233\nSV🇸🇻503El Salvador44\nSM🇸🇲378San Marino334\nSO🇸🇴252Somalia233\nRS🇷🇸381Serbia234\nSS🇸🇸211South Sudan234\nST🇸🇹239São Tomé and Príncipe25\nSR🇸🇷597Suriname34\nSK🇸🇰421Slovakia\nSI🇸🇮386Slovenia\nSE🇸🇪46Sweden234\nSZ🇸🇿268Swaziland44\nSC🇸🇨248Seychelles1222\nSX🇸🇽1721Sint Maarten34\nSY🇸🇾963Syria\nTC🇹🇨1649Turks and Caicos Islands34\nTD🇹🇩235Chad2222\nTG🇹🇬228Togo233\nTH🇹🇭66Thailand144\nTJ🇹🇯992Tajikistan\nTK🇹🇰690Tokelau\nTM🇹🇲993Turkmenistan26\nTL🇹🇱670Timor-Leste\nTO🇹🇴676Tonga\nTT🇹🇹1868Trinidad and Tobago34\nTN🇹🇳216Tunisia233\nTR🇹🇷90Turkey334\nTV🇹🇻688Tuvalu\nTW🇹🇼886Taiwan\nTZ🇹🇿255Tanzania234\nUG🇺🇬256Uganda234\nUA🇺🇦380Ukraine2322\nUY🇺🇾598Uruguay44\nUS🇺🇸1United States334\nUZ🇺🇿998Uzbekistan27\nVA🇻🇦3Vatican City\nVC🇻🇨1784Saint Vincent and the Grenadines34\nVE🇻🇪58Venezuela334\nVG🇻🇬1284British Virgin Islands34\nVI🇻🇮1340US Virgin Islands34\nVN🇻🇳84Vietnam\nVU🇻🇺678Vanuatu\nWF🇼🇫681Wallis and Futuna\nWS🇼🇸685Samoa\nXK🇽🇰383Kosovo44\nYE🇾🇪967Yemen333\nZA🇿🇦27South Africa234\nZM🇿🇲260Zambia234\nZW🇿🇼263Zimbabwe234".split("\n").map(e=>({id:e.substr(0,2),flag:e.substr(2,4),code:"+"+e.match(/\d+/)[0],name:e.split(/\d+/)[1],phoneFormat:function(e){if(!e)return u;const t=e[0];let n;if(!r[t]){const e=t.split("").map(Number);n=e.reduce((e,t,n)=>`${e}(\\d{1,${t}})${n>0?"?":""}`,""),r[t]=new RegExp(`${n}${"()?".repeat(5-e.length)}`)}return r[t]}(e.match(/\d+$/))}));function c(e){return o.find(t=>t.id===e)}function d(e){let t=e.replace(/[^\d+]+/g,"");t.startsWith("+")||(t="+"+t);const n=o.filter(e=>t.startsWith(e.code)).sort((e,t)=>e.code.length-t.code.length);return n[n.length-1]}function a(e,t){let n=e.replace(/[^\d]+/g,"");if(t)n=n.substr(t.code.length-1);else if(e.startsWith("+"))return e;return n=n.replace(function(e){return e?e.phoneFormat:u}(t),(e,n,r,u,o,c)=>{const d=t&&"GB"===t.id?" ":"-";let a="";return n&&(a=""+n),r&&(a+=" "+r),u&&(a+=`${d}${u}`),o&&(a+=`${d}${o}`),c&&(a+=`${d}${c}`),a}),n}function i(e){const t=e.startsWith("+")?e:"+"+e,n=d(t);return n?`${n.code} ${a(t,n)}`:t}},function(e,t,n){"use strict";var r=n(0),u=n(15),o=n(31);t.a=(e,t,n=!1,c=!1)=>{const d=Object(u.c)(e,t),a=Object(o.a)();return c&&Object(u.b)(a),Object(r.n)(()=>{n||d||Object(u.d)(e,t).then(a)},[e,a,d,t,n]),d}},function(e,t,n){"use strict";var r=n(0);t.a=(e=!1)=>{const[t,n]=Object(r.r)(e);return[t,Object(r.m)(()=>{n(!0)},[]),Object(r.m)(()=>{n(!1)},[])]}},function(e,t,n){"use strict";var r=n(0),u=n(9);n(92);t.a=({color:e="blue",withBackground:t})=>r.a.createElement("div",{className:Object(u.a)("Spinner",e,t&&"with-background")},r.a.createElement("div",null))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(2);var r=n(10);window.addEventListener("error",u),window.addEventListener("unhandledrejection",u);function u(e){e.preventDefault(),o(e instanceof ErrorEvent?e.error:e.reason)}Object(r.h)(window.alert,1e3);function o(e){console.error(e)}},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;if(0===r)return!0;for(let u=0;u<r;u++){const r=n[u];if(e[r]!==t[r])return!1}return!0}function u(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length?["%LENGTH%"]:n.reduce((n,r)=>(e[r]!==t[r]&&n.push(`${r}: ${e[r]} => ${t[r]}`),n),[])}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return u}))},function(e,t,n){"use strict";var r=n(0);t.a=function(e,t){const n=Object(r.q)(),{current:u}=n;return t&&void 0===e||(n.current=e),u}},function(e,t,n){"use strict";n.d(t,"j",(function(){return c})),n.d(t,"k",(function(){return d})),n.d(t,"n",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"g",(function(){return f})),n.d(t,"b",(function(){return l})),n.d(t,"f",(function(){return b})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"a",(function(){return v})),n.d(t,"l",(function(){return j})),n.d(t,"m",(function(){return w}));const r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"],o=u.map(e=>e.toLowerCase());function c(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function d(e){return c(e).getTime()}function a(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function i(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function s(e){const t="number"==typeof e?new Date(e):e;return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function f(e,t){const n="number"==typeof t?new Date(t):t,u=c(new Date);if(n>=u)return s(n);const o=new Date(u);if(o.setDate(u.getDate()-7),n>=o)return e("Weekday.Short"+r[n.getDay()]);const d=n.getFullYear()!==u.getFullYear(),a=e(d?"formatDateScheduleYear":"formatDateSchedule")||(d?"d MMM yyyy":"d MMM");return m(e,n,a)}function l(e,t){const n="number"==typeof t?new Date(t):t,r=e("formatterYearMax")||"dd.MM.yyyy";return m(e,n,r)}function b(e,t,n=!1){const r=e(n?"formatterMonthYear2":"formatterMonthYear")||"MMM yyyy";return m(e,t,r)}function h(e,t,n=!1,u=!1){const o="number"==typeof t?new Date(t):t,d=c(new Date);if(!u){if(i(o)===i(d))return(n?I:C)(e("Weekday.Today"));const t=new Date(d);if(t.setDate(d.getDate()-1),i(o)===i(t))return(n?I:C)(e("Weekday.Yesterday"));const u=new Date(d),c=new Date(d);if(u.setDate(d.getDate()-7),c.setDate(d.getDate()+7),o>=u&&o<=c){const t=r[o.getDay()];return n?I(e("Weekday.Short"+t)):C(e("Weekday."+t))}}const a=o.getFullYear()!==d.getFullYear(),s=e(n?a?"formatDateScheduleYear":"formatDateSchedule":a?"chatFullDate":"chatDate")||"d MMMM yyyy";return(n?I:C)(m(e,o,s))}function m(e,t,n){const r=t.getDate(),o=t.getMonth();return n.replace("LLLL",e(u[o])).replace("MMMM",e("Month.Gen"+u[o])).replace("MMM",e("Month.Short"+u[o])).replace("MM",String(o+1).padStart(2,"0")).replace("dd",String(r).padStart(2,"0")).replace("d",String(r)).replace("yyyy",String(t.getFullYear()))}function p(e,t){const n="number"==typeof t?new Date(t):t;return`${h(e,n,!0)}, ${s(n)}`}function g(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);let u="";return t>0?(u+=String(t).padStart(2,"0")+":",u+=String(n).padStart(2,"0")+":"):u+=String(n)+":",u+=String(r).padStart(2,"0"),u}function y(e){const t=[];let n=e%1e3;e-=n,n=Math.floor(n/10);const r=(e=Math.floor(e/1e3))%60;e-=r;const u=(e=Math.floor(e/60))%60;e-=u;const o=(e=Math.floor(e/60))%60;return o>0&&t.push(String(o).padStart(2,"0")),t.push(String(u).padStart(o>0?2:1,"0")),t.push(String(r).padStart(2,"0")),`${t.join(":")},${String(n).padStart(2,"0")}`}function v(e,t="en-US"){return e.toLocaleString(t,{year:"numeric",month:"short",day:"numeric"})}function O(e,t,n=2021){if(t>11||e>31)return!1;const r=new Date(n,t,e);return!Number.isNaN(r.getTime())&&r.getDate()===e}function j(e=""){const t=e.match(/\d{1,2}\s[a-zA-Z]{3,}/),n=e.match(/[a-zA-Z]{3,}\s\d{1,2}/),r=e.match(/\d{1,2}[./-]\d{1,2}([./-]\d{2,4})?/);if(!t&&!r&&!n)return;if(r){const[t,n,r]=e.split(/[./-]/).map(Number);return r&&r<2015||!O(t,n-1,r||void 0)?void 0:`${r?r+"-":""}${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}const u=e.split(" "),c=t?u[0]:u[1],d=(t?u[1]:u[0]).toLowerCase(),a=o.findIndex(e=>e.startsWith(d));return-1!==a&&O(Number(c),a)?`${String(a+1).padStart(2,"0")}-${String(c).padStart(2,"0")}`:void 0}function w(e){return e+86400}function I(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function C(e){return`${e[0].toUpperCase()}${e.slice(1)}`}},function(e,t,n){"use strict";var r=n(0);t.a=()=>{const[,e]=Object(r.r)(!1);return Object(r.m)(()=>{e(e=>!e)},[])}},function(e,t,n){"use strict";var r=n(0),u=n(9);n(90);t.a=({children:e,className:t,isRtl:n,onClick:o})=>{const c=Object(r.m)(e=>{e.preventDefault(),o(e)},[o]);return r.a.createElement("a",{href:"#",className:Object(u.a)("Link",t),dir:n?"rtl":"auto",onClick:o?c:void 0},e)}},function(e,t,n){"use strict";t.a=e=>{let t;do{t=String(Math.random()).replace("0.","id")}while(e.hasOwnProperty(t));return t}},function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return y})),n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return O}));var r=n(5),u=n(68),o=n(2),c=n(1),d=n(4),a=n(14),i=n(11),s=n(7),f=n(6);function l(e){const t=e.toJSON();return JSON.stringify({endpoint:t.endpoint,keys:t.keys})}function b(){return!!f.k&&("showNotification"in ServiceWorkerRegistration.prototype?"denied"===Notification.permission?(o.r&&console.warn("[PUSH] The user has blocked push notifications."),!1):"PushManager"in window||(o.r&&console.warn("[PUSH] Push messaging isn't supported."),!1):(o.r&&console.warn("[PUSH] Push notifications aren't supported."),!1))}async function h(){"Notification"in window&&(["granted","denied"].includes(Notification.permission)||await Notification.requestPermission())}async function m(e){const t=Object(c.e)(),n=Object(c.d)();if(e)try{const t=l(e);return await Object(r.a)("unregisterDevice",t),await e.unsubscribe(),void n.deleteDeviceToken()}catch(e){o.r&&console.log("[PUSH] Unable to unsubscribe from push.",e)}t.push&&(await Object(r.a)("unregisterDevice",t.push.deviceToken),n.deleteDeviceToken())}async function p(){if(!b())return;const e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();await m(t)}let g=!1;async function y(){if(!b())return void await h();const e=await navigator.serviceWorker.ready;let t=await e.pushManager.getSubscription();if(function(e){const t=Object(c.e)();return!t.push||!e||(l(e)!==t.push.deviceToken||Date.now()-t.push.subscribedAt>432e5)}(t)){await m(t);try{t=await e.pushManager.subscribe({userVisibleOnly:!0});const n=l(t);o.r&&console.log("[PUSH] Received push subscription: ",n),await Object(r.a)("registerDevice",n),Object(c.d)().setDeviceToken(n)}catch(e){"denied"===Notification.permission?o.r&&console.warn("[PUSH] The user has blocked push notifications."):o.r&&(console.log("[PUSH] Unable to subscribe to push.",e),e.code===DOMException.ABORT_ERR&&await h())}}}async function v({chat:e,message:t,isActiveChat:n}){if(!("Notification"in window?"denied"!==Notification.permission||(o.r&&console.warn("[PUSH] The user has blocked push notifications."),0):(o.r&&console.warn("[PUSH] This browser does not support desktop notification"),0)))return;if(!t.id)return;if(await async function(){if(g)return;const[e,t]=await Promise.all([Object(r.a)("fetchNotificationSettings",{serverTimeOffset:Object(c.e)().serverTimeOffset}),Object(r.a)("fetchNotificationExceptions",{serverTimeOffset:Object(c.e)().serverTimeOffset})]);if(!e)return;let n=Object(i.w)(Object(c.e)(),e);t&&(n=Object(i.f)(n,t)),Object(c.g)(n),g=!0}(),!function(e,t){if(!g)return!1;const n=Object(c.e)();return!(Object(d.Hb)(e,Object(s.fb)(n),Object(s.eb)(n))||e.isNotJoined||!e.isListed)&&!(t&&document.hasFocus())}(e,n))return;const{title:f,body:l}=function(e,t){const n=Object(c.e)(),{senderId:r,replyToMessageId:o}=t,i=r?Object(s.Jb)(n,r):void 0,f=Object(d.s)(t),l=f&&o?Object(s.l)(n,e.id,o):void 0,{targetUserIds:b,targetChatId:h}=f||{},m=b?b.map(e=>Object(s.Jb)(n,e)).filter(Boolean):void 0,p=Object(d.W)(e),g=p?Object(s.Jb)(n,p):void 0;let y;if(Object(d.gb)(t)){const n=e&&(Object(d.mb)(e)||t.senderId===t.chatId)?e:i;y=Object(u.a)(a.b,t,n,m,l,h,{asPlain:!0})}else{const n=Object(d.K)(a.b,e.id,i),r=Object(d.O)(a.b,t);y=n?`${n}: ${r}`:r}return{title:Object(d.k)(a.b,e,g),body:y}}(e,t);if(b())navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({type:"newMessageNotification",payload:{title:f,body:l,chatId:e.id,messageId:t.id}});else{const n=Object(c.d)(),r={body:l,icon:"icon-192x192.png",badge:"icon-192x192.png",tag:t.id.toString()};"vibrate"in navigator&&(r.vibrate=[200,100,200]);const u=new Notification(f,r);u.onclick=()=>{u.close(),n.focusMessage({chatId:e.id,messageId:t.id}),window.focus&&window.focus()}}}function O(){navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({type:"clientReady"})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"h",(function(){return b})),n.d(t,"a",(function(){return h}));var r=n(2),u=n(30),o=n(3);const c=[1,8,5,2,7,4,6];function d(e){if(e)switch(e.type){case"userTypeBot":case"userTypeRegular":return e.firstName||e.lastName;case"userTypeDeleted":case"userTypeUnknown":return"Deleted";default:return}}function a(e){if(e){if(f(e))return"Deleted account";switch(e.type){case"userTypeBot":case"userTypeRegular":if(e.firstName&&e.lastName)return`${e.firstName} ${e.lastName}`;if(e.firstName)return e.firstName;if(e.lastName)return e.lastName;break;case"userTypeDeleted":case"userTypeUnknown":return"Deleted account"}}}function i(e,t,n){if(t.id===r.yb)return e("ServiceNotifications").toLowerCase();if(t.type&&"userTypeBot"===t.type)return e("Bot");if(!t.status)return"";switch(t.status.type){case"userStatusEmpty":return e("ALongTimeAgo");case"userStatusLastMonth":return e("WithinAMonth");case"userStatusLastWeek":return e("WithinAWeek");case"userStatusOffline":{const{wasOnline:r}=t.status;if(!r)return e("LastSeen.Offline");const o=new Date((new Date).getTime()+1e3*n),c=new Date(1e3*r);if(c>=o)return e("LastSeen.JustNow");const d=new Date(o.getTime()-c.getTime());if(d.getTime()/1e3<60)return e("LastSeen.JustNow");if(d.getTime()/1e3<3600){return e("LastSeen.MinutesAgo",Math.floor(d.getTime()/1e3/60))}const a=new Date;a.setHours(0,0,0,0);if(c>new Date(a.getTime()+1e3*n)){if(d.getTime()/1e3<21600){return e("LastSeen.HoursAgo",Math.floor(d.getTime()/1e3/60/60))}return e("LastSeen.TodayAt",Object(u.h)(c))}const i=new Date;i.setDate(o.getDate()-1),i.setHours(0,0,0,0);return c>new Date(i.getTime()+1e3*n)?e("LastSeen.YesterdayAt",Object(u.h)(c)):e("LastSeen.AtDate",Object(u.b)(e,c))}case"userStatusOnline":return e("Online");case"userStatusRecently":return e("Lately");default:return}}function s(e){const{id:t,status:n,type:u}=e;return!!n&&(t!==r.yb&&("userStatusOnline"===n.type&&"userTypeBot"!==u))}function f(e){return!(!e.status||"userTypeBot"===e.type||e.id===r.yb)&&("userTypeDeleted"===e.type||"userTypeUnknown"===e.type)}function l(e){return"userTypeBot"===e.type}function b(e,t,n,r=0){return Object(o.k)(e,e=>{const u=Date.now()/1e3+r;if(n&&n.includes(e))return u+172800-(n.length-n.indexOf(e));const o=t[e];if(!o||!o.status)return 0;if("userStatusOnline"===o.status.type)return o.status.expires;if("userStatusOffline"===o.status.type&&o.status.wasOnline)return o.status.wasOnline;switch(o.status.type){case"userStatusRecently":return u-86400;case"userStatusLastWeek":return u-604800;case"userStatusLastMonth":return u-18144e3;default:return 0}},"desc")}function h(e){const t=e?Math.abs(e.id)%7:0;return c[t]}},function(e,t,n){"use strict";n.d(t,"w",(function(){return i})),n.d(t,"v",(function(){return s})),n.d(t,"t",(function(){return f})),n.d(t,"y",(function(){return l})),n.d(t,"u",(function(){return b})),n.d(t,"z",(function(){return h})),n.d(t,"j",(function(){return m})),n.d(t,"p",(function(){return p})),n.d(t,"i",(function(){return g})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return v})),n.d(t,"d",(function(){return O})),n.d(t,"x",(function(){return j})),n.d(t,"r",(function(){return w})),n.d(t,"m",(function(){return I})),n.d(t,"A",(function(){return C})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return S})),n.d(t,"o",(function(){return M})),n.d(t,"h",(function(){return A})),n.d(t,"g",(function(){return k})),n.d(t,"s",(function(){return T})),n.d(t,"D",(function(){return N})),n.d(t,"b",(function(){return P})),n.d(t,"C",(function(){return D})),n.d(t,"B",(function(){return L})),n.d(t,"l",(function(){return x})),n.d(t,"k",(function(){return F})),n.d(t,"q",(function(){return B})),n.d(t,"n",(function(){return R})),n.d(t,"E",(function(){return U}));var r=n(8),u=n(2),o=n(3),c=n(35),d=n(30);const a=Date.now()/1e3+31622400;function i(e){return e>0}function s(e){return f(e)||l(e)}function f(e){return"chatTypeBasicGroup"===e.type}function l(e){return"chatTypeSuperGroup"===e.type}function b(e){return"chatTypeChannel"===e.type}function h(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function m(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function p(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function g(e,t,n,r=!1){return r||n&&t.id===n.id&&n.isSelf?e("SavedMessages"):t.title||e("HiddenName")}function y(e){if(e.fullInfo)return e.fullInfo.about}function v(e){const{username:t}=e;if(t)return"https://t.me/"+t;const{inviteLink:n}=e.fullInfo||{};return n}function O(e,t="normal"){if(e.avatarHash)switch(t){case"big":return`profile${e.id}?${e.avatarHash}`;default:return`avatar${e.id}?${e.avatarHash}`}}function j(e){return!e.lastMessage}function w(e){return Boolean(e.adminRights)}function I(e,t){return!!e.adminRights&&e.adminRights[t]}function C(e,t){return Boolean(e.currentUserBannedRights&&e.currentUserBannedRights[t]||e.defaultBannedRights&&e.defaultBannedRights[t])}function E(e,t){return t!==r.MAIN_THREAD_ID||!(e.isRestricted||e.migratedTo||e.isNotJoined)&&(!!e.isCreator||(!!i(e.id)||(b(e)?I(e,"postMessages"):w(e)||!C(e,"sendMessages"))))}function S(e,t=!1){if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1};const n=w(e);return{canAttachMedia:n||!C(e,"sendMedia"),canAttachPolls:(n||!C(e,"sendPolls"))&&(!i(e.id)||t),canSendStickers:n||!C(e,"sendStickers"),canSendGifs:n||!C(e,"sendGifs"),canAttachEmbedLinks:n||!C(e,"embedLinks")}}function M(e,t,n){if(t&&t.sendMessages){const{untilDate:n}=t;return n&&n<a?e("Channel.Persmission.Denied.SendMessages.Until",e("formatDateAtTime",[Object(d.a)(new Date(1e3*n),e.code),Object(d.h)(1e3*n)])):e("Channel.Persmission.Denied.SendMessages.Forever")}if(n&&n.sendMessages)return e("Channel.Persmission.Denied.SendMessages.DefaultRestrictedText")}function A(e){if(e&&e.fullInfo)return e.fullInfo.slowMode}function k(e){return Math.max(e.joinDate||0,e.draftDate||0,e.lastMessage?e.lastMessage.date:0)}function T(e){return e.folderId===u.i}function N(e,t,n){return!(n&&n[e.id]&&!n[e.id].isMuted)&&(e.isMuted||i(e.id)&&!t.hasPrivateChatsNotifications||b(e)&&!t.hasBroadcastNotifications||s(e)&&!t.hasGroupNotifications)}function P(e){return f(e)||(l(e)||b(e))&&e.isCreator}function D(e,t,n,r,u,o){const c=n.excludedChatIds?new Set(n.excludedChatIds):void 0,d=n.excludedChatIds?new Set(n.includedChatIds):void 0,a=n.excludedChatIds?new Set(n.pinnedChatIds):void 0;return[(o||Object.keys(e).map(Number)).filter(o=>function(e,t,n,r,u,o,c,d){if(!e.isListed)return!1;if(o&&o.has(e.id))return!1;if(c&&c.has(e.id))return!0;if(d&&d.has(e.id))return!0;if(T(e)&&t.excludeArchived)return!1;if(t.excludeMuted&&!e.unreadMentionsCount&&N(e,r,u))return!1;if(!e.unreadCount&&!e.unreadMentionsCount&&!e.hasUnreadMark&&t.excludeRead)return!1;if(i(e.id)){const r=n[e.id];if(r&&"userTypeBot"===r.type){if(t.bots)return!0}else{if(t.contacts&&r&&r.isContact)return!0;if(t.nonContacts&&r&&!r.isContact)return!0}}else{if(s(e))return!!t.groups;if(b(e))return!!t.channels}return!1}(e[o],n,t,r,u,c,d,a)),n.pinnedChatIds]}function L(e,t,n,r="all"){function u(e){if(!e||!e.lastMessage||e.migratedTo)return!1;switch(r){case"all":if(T(e))return!1;break;case"archived":if(!T(e))return!1}return!e.isRestricted&&!e.isNotJoined}const c=t.map(t=>e[t]).filter(u),d=new Set(t);return{pinnedChats:n?n.map(t=>e[t]).filter(u).filter(e=>d.has(e.id)):[],otherChats:Object(o.k)(n?c.filter(e=>!n.includes(e.id)):c,k,"desc")}}function x(e,t,n,r,u,o){const[c]=D(e,t,n,u,o,r),d=c.map(t=>e[t]).filter(e=>e&&e.lastMessage&&!e.isRestricted&&!e.isNotJoined);return{unreadDialogsCount:d.reduce((e,t)=>t.unreadCount||t.hasUnreadMark?e+1:e,0),hasActiveDialogs:d.some(e=>e.unreadMentionsCount||!N(e,u,o)&&(e.unreadCount||e.hasUnreadMark))}}function F(e,t,n,r,u,o,c){const{id:d,title:a,emoticon:i,description:s,pinnedChatIds:f,excludedChatIds:l,includedChatIds:b,excludeArchived:h,excludeMuted:m,excludeRead:p,...g}=r;if(Object.values(g).filter(Boolean).length>1||l&&l.length||b&&b.length){return e("Chats",function(e,t,n,r,u,o){const[c,d]=D(e,t,n,u,o,r),{pinnedChats:a,otherChats:i}=L(e,c,d,"folder");return a.length+i.length}(t,n,r,u,o,c))}return g.bots?e("FilterBots"):g.groups?e("FilterGroups"):g.channels?e("FilterChannels"):g.contacts?e("FilterContacts"):g.nonContacts?e("FilterNonContacts"):void 0}function B(e){return!!e&&e.id<0}function R(e,t,n){if(n&&!i(t))return n.isSelf?e("FromYou"):Object(c.b)(n)}function U(e,t,n=!1,r){return Object(o.k)(e,e=>{const u=t[e];if(!u)return 0;let o=0;return u.lastMessage&&(o+=u.lastMessage.date),n&&u.isVerified&&(o+=3e9),r&&r.includes(e)&&(o=Date.now()+3e8+(r.length-r.indexOf(e))),o},"desc")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return a}));var r=n(0);const u="tt-event-heavy-animation-start",o="tt-event-heavy-animation-end";let c,d=!1;const a=e=>(d||(d=!0,document.dispatchEvent(new Event(u))),c&&(clearTimeout(c),c=void 0),e&&(c=window.setTimeout(()=>{d=!1,document.dispatchEvent(new Event(o)),c=void 0},e)),()=>{d=!1,document.dispatchEvent(new Event(o))});t.c=(e,t)=>{Object(r.n)(()=>(d&&e(),document.addEventListener(u,e),document.addEventListener(o,t),()=>{document.removeEventListener(o,t),document.removeEventListener(u,e)}),[t,e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return b}));var r=n(2);const u=new Set(["scroll","mouseenter","mouseleave"]),o={},c=new Map,d={};function a(e,t,n,r=!1){const u=s(t,e);f(u,e,r)?function(e,t,n){d[e]||(d[e]=0,document.addEventListener(e,h));(function(e){o[e]||(o[e]=new Map);return o[e]})(e).set(t,n),function(e){const t=c.get(e);if(t)return t;const n=new Set;return c.set(e,n),n}(t).add(e),d[e]++}(u,e,n):e.addEventListener(u,n,r)}function i(e,t,n,r=!1){const u=s(t,e);f(u,e,r)?l(u,e):e.removeEventListener(u,n,r)}function s(e,t){const n=e.replace(/^on/,"").replace(/Capture$/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function f(e,t,n){return!n&&!u.has(e)&&"VIDEO"!==t.tagName&&"IFRAME"!==t.tagName}function l(e,t){d[e]--,d[e]||document.removeEventListener(e,h),o[e].delete(t),c.get(t).delete(e)}function b(e){const t=c.get(e);t&&(t.forEach(t=>l(t,e)),c.delete(e))}function h(e){const t=o[e.type];if(t){let n=!1,r=e.target;const u=()=>{n=!0},o=()=>{e.preventDefault()},c=new Proxy(e,{get:(e,t)=>"currentTarget"===t?r:"stopPropagation"===t||"stopImmediatePropagation"===t?u:"preventDefault"===t?o:Reflect.get(e,t)});for(;r&&r!==document.body;){const e=t.get(r);if(e&&(e(c),n))return;r=r.parentNode}}}r.r&&document.addEventListener("dblclick",()=>{console.log("DELEGATED EVENTS",{delegationRegistry:o,delegatedEventsByElement:c,documentEventCounters:d})})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l}));var r=n(0),u=n(6),o=n(29),c=n(1),d=n(3);const a={currentIndex:0,nextStateIndexToReplace:-1,isHistoryAltered:!1,isDisabled:!1,isEdge:!1,currentIndexes:[]},i=()=>{a.isDisabled=!0},s=e=>{const t=e.touches[0].pageX;(t<=300||t>=window.innerWidth-300)&&(a.isEdge=!0)},f=()=>{a.isEdge&&setTimeout(()=>{a.isEdge=!1},350)};function l(e,t,n,u,i=!1,s){const f=Object(r.q)(-1),l=Object(r.q)(!1),b=Object(o.a)(e),h=Object(r.q)(!0),m=Object(r.q)([]),p=Object(o.a)(s),g=Object(r.q)(!1),y=Object(r.m)((t=!1)=>{if(s){const e=p||[];if(e.length<s.length){const e=++a.currentIndex;a.currentIndexes.push(e),window.history.pushState({index:e,state:u},"","#"+s[s.length-1]),m.current.push({index:e,hash:s[s.length-1]})}else{const t=e.length-s.length;if(g.current)g.current=!1;else{if(s.length!==m.current.length&&t>0){const e=m.current[m.current.length-t-1];let n=t;if(e){const t=a.currentIndexes.findIndex(t=>t===e.index);n=a.currentIndexes.length-t-1}a.isHistoryAltered=!0,window.history.go(-n);m.current.splice(m.current.length-t-1,t).forEach(({index:e})=>{a.currentIndexes.splice(a.currentIndexes.indexOf(e),1)})}s.length>0&&setTimeout(()=>{const e=++a.currentIndex;a.currentIndexes[a.currentIndexes.length-1]=e,window.history.replaceState({index:e,state:u},"","#"+s[s.length-1]),m.current[m.current.length-1]={index:e,hash:s[s.length-1]}},0)}}}else e&&!t&&(h.current=!1,l.current?(l.current=!1,a.currentIndexes.push(f.current)):setTimeout(()=>{const e=++a.currentIndex;a.currentIndexes.push(e),window.history[a.currentIndexes.includes(a.nextStateIndexToReplace-1)&&0!==window.history.state.index&&a.nextStateIndexToReplace===e&&!i?"replaceState":"pushState"]({index:e,state:u},""),f.current=e,i&&(a.nextStateIndexToReplace=a.currentIndex+1)},0)),!t&&e||h.current||(f.current!==a.currentIndex&&i||(a.isHistoryAltered=!0,window.history.back(),setTimeout(()=>{a.nextStateIndexToReplace=-1},400)),a.currentIndexes.splice(a.currentIndexes.indexOf(f.current),1),h.current=!0)},[u,s,e,p,i]);return Object(r.n)(()=>{const r=e=>{if(a.isHistoryAltered)return void setTimeout(()=>{a.isHistoryAltered=!1},0);const{index:r}=e.state,u=r||0;try{const r=s?m.current[m.current.length-1].index:f.current,o=a.currentIndexes[a.currentIndexes.indexOf(r)-1];if(a.isDisabled)return;!h.current&&(0===u||u===o)||s&&(0===u||u===o)?(s&&(g.current=!0,m.current.pop()),a.currentIndexes.splice(a.currentIndexes.indexOf(r),1),t&&(a.isEdge&&Object(c.d)().disableHistoryAnimations(),t(!a.isEdge),h.current=!0)):u===r&&h.current&&n&&!s&&(l.current=!0,a.isEdge&&Object(c.d)().disableHistoryAnimations(),n(e.state.state))}catch(e){}},u=s?!p||!Object(d.a)(p,s):b!==e;return!a.isDisabled&&u&&y(),window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[u,y,s,e,t,n,p,b,i]),{forceClose:()=>y(!0)}}u.e&&(window.addEventListener("touchstart",s),window.addEventListener("touchend",f),window.addEventListener("popstate",f)),window.history.replaceState({index:a.currentIndex},"")},function(e,t,n){"use strict";var r=n(0),u=n(9);t.a=(e=!1,t,n=!1,o="fast",c=!1)=>{const[d,a]=Object(r.r)(!e),i=Object(r.q)(),[s,f]=Object(r.r)(e&&n);e?(a(!1),f(!0),i.current&&(window.clearTimeout(i.current),i.current=void 0)):(f(!1),d||i.current||(i.current=window.setTimeout(()=>{a(!0),t&&t(),i.current=void 0},c?0:350)));const l=s&&!(c&&!e),b=Boolean(i.current),h=e||b;return{shouldRender:h,transitionClassNames:Object(u.a)(o&&"opacity-transition",o,l&&"open",h&&"shown",b&&"closing")}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e,t=30){return!e||e.length<=t?e:e.substr(0,t)+"..."}},function(e){e.exports=JSON.parse('{"--color-primary":["#50A2E9","#8378DB"],"--color-primary-opacity":["#50A2E980","#8378DB80"],"--color-primary-shade":["#4a95d6","#7b71c6"],"--color-background":["#FFFFFF","#212121"],"--color-background-secondary":["#f4f4f5","#121212"],"--color-background-secondary-accent":["#E4E4E5","#100f10"],"--color-background-own":["#EEFEDF","#8378DB"],"--color-background-own-apple":["#E7FDCC","#8378DB"],"--color-background-selected":["#F4F4F5","#2C2C2C"],"--color-background-own-selected":["#d4fcae","#7b71c6"],"--color-chat-hover":["#F4F4F5","#2C2C2C"],"--color-chat-active":["#4C90E6","#8378DB"],"--color-item-active":["#ededed","#292929"],"--color-text":["#000000","#FFFFFF"],"--color-text-secondary":["#707579","#AAAAAA"],"--color-text-secondary-apple":["#8E8E92","#AAAAAA"],"--color-borders":["#DADCE0","#100F10"],"--color-borders-input":["#DADCE0","#5B5B5A"],"--color-links":["#52A1EF","#868DF6"],"--color-links-hover":["#2d8dec","#6b5fcc"],"--color-gray":["#C4C9CC","#717579"],"--color-pinned":["#C4C9CC","#707579"],"--color-default-shadow":["#72727240","#1010109c"],"--color-light-shadow":["#7272722B","#00000040"],"--color-green":["#4DCD5E","#8378DB"],"--color-text-meta-colored":["#4DCD5E","#8378DB"],"--color-reply-hover":["#F4F4F4","#272727"],"--color-reply-active":["#E8E9E9","#2E2F2F"],"--color-reply-own-hover":["#DBF4CE","#6458bc"],"--color-reply-own-hover-apple":["#d9f9c1","#6458bc"],"--color-reply-own-active":["#C8EBBC","#4F4A9F"],"--color-reply-own-active-apple":["#d5edc2","#4F4A9F"],"--color-accent-own":["#4FAE4E","#FFFFFF"],"--color-message-meta-own":["#4FAE4EFF","#FFFFFF88"],"--color-own-links":["#52A1EF","#FFFFFF"],"--color-code":["#4a729a","#93c4ef"],"--color-code-own":["#3c7940","#FFFFFF"],"--color-code-bg":["#70757914","#ffffff26"],"--color-code-own-bg":["#70757914","#ffffff26"]}')},function(e,t,n){"use strict";var r=n(0),u=n(9),o=n(16);n(99);t.a=e=>{const{icon:t,className:n,children:c,onClick:d,href:a,download:i,disabled:s,destructive:f,ariaLabel:l}=e,b=Object(o.a)(),h=Object(r.m)(e=>{if(s||!d)return e.stopPropagation(),void e.preventDefault();d(e)},[s,d]),m=Object(r.m)(e=>{if(13===e.keyCode||32===e.keyCode)return s||!d?(e.stopPropagation(),void e.preventDefault()):void d(e)},[s,d]),p=Object(u.a)("MenuItem",n,s&&"disabled",f&&"destructive"),g=r.a.createElement(r.a.Fragment,null,t&&r.a.createElement("i",{className:"icon-"+t,"data-char":t.startsWith("char-")?t.replace("char-",""):void 0}),c);return a?r.a.createElement("a",{tabIndex:0,className:p,href:a,download:i,"aria-label":l,title:l,target:a.startsWith(window.location.origin)?"_self":"_blank",rel:"noopener noreferrer",dir:b.isRtl?"rtl":void 0,onClick:d},g):r.a.createElement("div",{role:"button",tabIndex:0,className:p,onClick:h,onKeyDown:m,"aria-label":l,title:l,dir:b.isRtl?"rtl":void 0},g)}},function(e,t,n){"use strict";var r=n(0),u=n(10);n(93);t.a=Object(r.h)(()=>{const[e,t]=Object(r.r)([]),n=Object(r.p)(()=>Object(u.a)(()=>{t([])},700,!1),[]),o=Object(r.m)(r=>{if(0!==r.button)return;const u=r.currentTarget,o=u.getBoundingClientRect(),c=u.offsetWidth/2;t([...e,{x:r.clientX-o.x-c/2,y:r.clientY-o.y-c/2,size:c}]),requestAnimationFrame(()=>{n()})},[e,n]);return r.a.createElement("div",{className:"ripple-container",onMouseDown:o},e.map(({x:e,y:t,size:n})=>r.a.createElement("span",{style:`left: ${e}px; top: ${t}px; width: ${n}px; height: ${n}px;`})))})},function(e,t,n){"use strict";var r=n(62),u=n(42);let o=!1;const c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,d=(e,t,n)=>(1-n)*e+n*t,a=Object.keys(u).map(e=>({property:e,colors:[i(u[e][0]),i(u[e][1])]}));function i(e){const t=c.exec(e);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:void 0!==t[4]?parseInt(t[4],16):void 0}}function s(e,t,n=1){a.forEach(({property:r,colors:u})=>{const o=Math.round(d(u[e].r,u[t].r,n)),c=Math.round(d(u[e].g,u[t].g,n)),a=Math.round(d(u[e].b,u[t].b,n)),i=void 0!==u[e].a?Math.round(d(u[e].a,u[t].a,n)):void 0;document.documentElement.style.setProperty(r,void 0!==i?`rgba(${o},${c},${a},${i/255})`:`rgb(${o},${c},${a})`)})}t.a=(e,t)=>{const n="dark"===e,u=o&&t,c=n?0:1,d=n?1:0,a=Date.now(),i=document.querySelector('meta[name="theme-color"]');document.documentElement.classList.remove("theme-"+(n?"light":"dark")),o&&document.documentElement.classList.add("no-animations"),document.documentElement.classList.add("theme-"+e),i&&i.setAttribute("content",n?"#212121":"#fff"),setTimeout(()=>{document.documentElement.classList.remove("no-animations")},500),o=!0,u?Object(r.b)(()=>{const e=Math.min((Date.now()-a)/200,1);return s(c,d,function(e){return 1-(1-e)**3.5}(e)),e<1}):s(c,d)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return l}));var r=n(84),u=n.n(r),o=n(6),c=n(17),d=n(10);let a,i;const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";async function f(e,t){for(b();!i.wasmReady;)await Object(d.f)(2e3);const{result:n,width:r,height:u}=await function(e,t){return new Promise(n=>{i.requests=i.requests||new Map,i.requests.set(e,n),i.postMessage({id:e,blob:t})})}(e,t);if(r&&u)return function({result:e,width:t,height:n}){a||(a=document.createElement("canvas"));return new Promise(r=>{const u=new ImageData(e,t,n);a.width=t,a.height=n;a.getContext("2d").putImageData(u,0,0),a.toBlob(e=>{r(null!=e?e:void 0)},"image/png",1)})}({result:n,width:r,height:u})}async function l(e,t){if(Object(o.t)()||"data:image/webp"!==t.substr(0,15))return t;b();const n=await f(e,Object(c.d)(t));if(!n)throw new Error("Can't convert webp to png. Url: "+t);return Object(c.a)(n)}function b(){i||(i=new u.a,i.wasmReady=!1,i.onmessage=h)}function h(e){const{id:t}=e.data;switch(e.data.type){case"initialized":i.wasmReady=!0;break;case"result":if(i.requests.has(t)){const n=i.requests.get(t);i.requests.delete(t),n(e.data)}}}},function(e,t,n){"use strict";var r=n(0),u=n(9),o=n(16);t.a=Object(r.h)(({ref:e,id:t,className:n,value:c,label:d,error:a,success:i,disabled:s,readOnly:f,placeholder:l,autoComplete:b,inputMode:h,maxLength:m,onChange:p,onInput:g,onKeyPress:y,onKeyDown:v,onBlur:O,onPaste:j})=>{const w=Object(o.a)(),I=a||i||d,C=Object(u.a)("input-group",c&&"touched",a?"error":i&&"success",s&&"disabled",f&&"disabled",I&&"with-label",n);return r.a.createElement("div",{className:C,dir:w.isRtl?"rtl":void 0},r.a.createElement("input",{ref:e,className:"form-control",type:"text",id:t,dir:"auto",value:c||"",placeholder:l,maxLength:m,autoComplete:b,inputMode:h,disabled:s,readOnly:f,onChange:p,onInput:g,onKeyPress:y,onKeyDown:v,onBlur:O,onPaste:j}),I&&r.a.createElement("label",{htmlFor:t},I))})},function(e,t,n){"use strict";var r=n(0),u=n(9),o=n(16),c=n(26);n(95);t.a=Object(r.h)(({id:e,name:t,value:n,label:d,subLabel:a,checked:i,disabled:s,round:f,blocking:l,isLoading:b,onChange:h,onCheck:m})=>{const p=Object(o.a)(),g=Object(r.m)(e=>{h&&h(e),m&&m(e.currentTarget.checked)},[h,m]),y=Object(u.a)("Checkbox",s&&"disabled",f&&"round",b&&"loading",l&&"blocking");return r.a.createElement("label",{className:y,dir:p.isRtl?"rtl":void 0},r.a.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:i,disabled:s,onChange:g}),r.a.createElement("div",{className:"Checkbox-main"},r.a.createElement("span",{className:"label",dir:"auto"},d),a&&r.a.createElement("span",{className:"subLabel",dir:"auto"},a)),b&&r.a.createElement(c.a,null))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(56);function u(e){return Object(r.a)({onEsc:e})}},function(e,t,n){"use strict";function r(e){return String(e).replace(/\d(?=(\d{3})+$)/g,"$& ")}function u(e){return".0"===String(e.toFixed(1)).substr(-2)?Math.round(e):e.toFixed(1).replace(".",",")}function o(e){return e<1e3?e:e<1e6?u(e/1e3)+"K":u(e/1e6)+"M"}function c(e,t=2){return e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map(e=>e.length&&e.match(/./u)[0].toUpperCase()).join("")}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return c}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=[]},function(e,t,n){"use strict";var r=n(29);t.a=(e,t)=>{const n=Object(r.a)(t);n&&!t.some((e,t)=>e!==n[t])||e(n||[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));const r=/[^\wа-яё]+/;function u(e,t){if(!e||!t)return!1;const n=e.toLowerCase().split(r);return t.toLowerCase().split(r).every(e=>n.some(t=>t.startsWith(e)))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f}));var r=n(10),u=n(2),o=n(6);const c=o.l&&l(),d=window.innerHeight;let a=f(),i=!1;const s=Object(r.h)(()=>{a=f(),!i&&((a.width<=u.ob||a.width<=u.nb&&a.height<=u.mb)!==o.l||o.l&&c!==l())&&window.location.reload()},250,!0);function f(){const e=.01*window.innerHeight;return document.documentElement.style.setProperty("--vh",e+"px"),{width:window.innerWidth,height:window.innerHeight}}function l(){return o.e?window.matchMedia("(orientation: landscape)").matches:window.matchMedia("screen and (min-device-aspect-ratio: 1/1) and (orientation: landscape)").matches}window.addEventListener("resize",s),window.addEventListener("orientationchange",s),t.a={get:()=>a,getIsKeyboardVisible:()=>d>a.height,disableRefresh:function(){i=!0},enableRefresh:function(){i=!1}}},function(e,t,n){"use strict";var r=n(0),u=n(40),o=n(64),c=n(80),d=n(58),a=n(49),i=n(9),s=n(37),f=n(39);n(97);t.a=({ref:e,containerRef:t,isOpen:n,className:l,style:b,children:h,positionX:m="left",positionY:p="top",autoClose:g=!1,footer:y,noCloseOnBackdrop:v=!1,onCloseAnimationEnd:O,onClose:j,onMouseEnter:w,onMouseLeave:I,shouldSkipTransition:C})=>{let E=Object(r.q)(null);e&&(E=e);const S=t||E,{transitionClassNames:M}=Object(u.a)(n,O,C,void 0,C);Object(r.n)(()=>n&&j?Object(a.a)(j):void 0,[n,j]),Object(f.a)(n,j,void 0,void 0,g),Object(d.a)(([e])=>{void 0!==e&&Object(s.d)(200)},[n]);const A=Object(o.a)(E,n,g?j:void 0,void 0,!0);Object(c.a)(n,S,v?void 0:j);const k=Object(i.a)("bubble menu-container custom-scroll",p,m,y&&"with-footer",M);return r.a.createElement("div",{className:Object(i.a)("Menu no-selection",l),onKeyDown:n?A:void 0,onMouseEnter:w,onMouseLeave:n?I:void 0,style:b},n&&r.a.createElement("div",{className:"backdrop"}),r.a.createElement("div",{ref:E,className:k,style:`transform-origin: ${p} ${m}`,onClick:g?j:void 0},h,y&&r.a.createElement("div",{className:"footer"},y)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r={Enter:"onEnter",Backspace:"onBackspace",Delete:"onDelete",Esc:"onEsc",Escape:"onEsc",ArrowUp:"onUp",ArrowDown:"onDown",ArrowLeft:"onLeft",ArrowRight:"onRight",Tab:"onTab"},u={onEnter:[],onDelete:[],onBackspace:[],onEsc:[],onUp:[],onDown:[],onLeft:[],onRight:[],onTab:[]};function o(e){return c()||document.addEventListener("keydown",d,!0),Object.keys(e).forEach(t=>{const n=e[t];if(!n)return;const r=u[t];r&&r.push(n)}),()=>{!function(e){Object.keys(e).forEach(t=>{const n=e[t],r=u[t];if(r){const e=r.findIndex(e=>e===n);-1!==e&&r.splice(e,1)}}),c()||document.removeEventListener("keydown",d,!1)}(e)}}function c(){return Object.values(u).some(e=>Boolean(e.length))}function d(e){const t=r[e.key];if(!t)return;const{length:n}=u[t];if(!n)return;e.stopPropagation();(0,u[t][n-1])(e)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return v})),n.d(t,"a",(function(){return O}));var r=n(8),u=n(2),o=n(5),c=n(12),d=n(17),a=n(6),i=n(82),s=n.n(i),f=n(83),l=n.n(f);async function b(e){const t=await new Response(e).arrayBuffer();return new Promise(e=>{const n=new Uint8Array(t);let r=new s.a,u=new l.a;r.onmessage=e=>{null===e.data?u.postMessage({command:"done"}):u.postMessage({command:"encode",buffers:e.data},e.data.map(({buffer:e})=>e))},u.onmessage=t=>{"page"===t.data.message&&(e(new Blob([t.data.page],{type:"audio/wav"})),r.terminate(),r=void 0,u.terminate(),u=void 0)},u.postMessage({command:"init",wavBitDepth:16,wavSampleRate:48e3}),r.postMessage({command:"init",decoderSampleRate:48e3,outputBufferSampleRate:48e3}),r.postMessage({command:"decode",pages:n},[n.buffer])})}var h=n(46);const m={[r.ApiMediaFormat.DataUri]:c.a.Text,[r.ApiMediaFormat.BlobUrl]:c.a.Blob,[r.ApiMediaFormat.Lottie]:c.a.Json,[r.ApiMediaFormat.Progressive]:void 0,[r.ApiMediaFormat.Stream]:void 0},p=new Map,g=new Map;function y(e,t,n){if(t===r.ApiMediaFormat.Progressive)return a.h?function(e){const t="./progressive/"+e;return p.set(e,t),Promise.resolve(t)}(e):y(e,r.ApiMediaFormat.BlobUrl,n);if(!g.has(e)){const i=async function(e,t,n){if(!u.X){const n=e.startsWith("avatar")?u.Z:u.Y,r=await c.c(n,e,m[t]);if(r){let t=r;if("audio/ogg"!==r.type||a.g||(t=await b(t)),"image/webp"===r.type&&!Object(a.t)()&&t){const n=await Object(h.b)(e,t);n&&(t=n)}const n=j(t);return p.set(e,n),n}}if(t===r.ApiMediaFormat.Stream){const r=new MediaSource,u=URL.createObjectURL(r);let c=!1;return r.addEventListener("sourceopen",()=>{if(c)return;c=!0;const u=r.addSourceBuffer("audio/mpeg");Object(o.a)("downloadMedia",{url:e,mediaFormat:t},(e,t)=>{n&&n(e),1===e&&r.endOfStream(),t&&u.appendBuffer(t)})}),p.set(e,u),u}const i=await Object(o.a)("downloadMedia",{url:e,mediaFormat:t},n);if(!i)throw new Error("Failed to fetch media");let{prepared:s,mimeType:f}=i;if("audio/ogg"===f&&!a.g){const e=await Object(d.e)(s);URL.revokeObjectURL(s);const t=await b(e);s=j(t),f=e.type}if("image/webp"===f&&!Object(a.t)()){const t=await Object(d.e)(s);URL.revokeObjectURL(s);const n=await Object(h.b)(e,t);n&&(s=j(n))}return p.set(e,s),s}(e,t,n).catch(e=>{u.r&&console.warn(e)}).finally(()=>{g.delete(e)});g.set(e,i)}return g.get(e)}function v(e){return p.get(e)}function O(e){Object(o.b)(e)}function j(e){return e instanceof Blob?URL.createObjectURL(e):e}a.h&&navigator.serviceWorker.addEventListener("message",async e=>{const{type:t,messageId:n,params:u}=e.data;if("requestPart"!==t)return;const c=await Object(o.a)("downloadMedia",{mediaFormat:r.ApiMediaFormat.Progressive,...u});if(!c)return;const{arrayBuffer:d,mimeType:a,fullSize:i}=c;navigator.serviceWorker.controller.postMessage({type:"partResponse",messageId:n,result:{arrayBuffer:d,mimeType:a,fullSize:i}},[d])})},function(e,t,n){"use strict";var r=n(0),u=n(29);t.a=(e,t,n)=>{const o=Object(u.a)(t);return Object(r.n)(()=>e(o||[]),t,n)}},function(e,t,n){"use strict";var r=n(0),u=n(1);const o=e=>{const t=[];let n=0;const r=e.length;let u;for(;n<r;){if(u=e[n++],55296==(63488&u))throw new RangeError("UTF-16(encode): Illegal UTF-16 value");u>65535&&(u-=65536,t.push(String.fromCharCode(u>>>10&1023|55296)),u=56320|1023&u),t.push(String.fromCharCode(u))}return t.join("")};function c(e,t,n){let r;for(e=n?Math.floor(e/700):e>>1,e+=Math.floor(e/t),r=0;e>455;r+=36)e=Math.floor(e/35);return Math.floor(r+36*e/(e+38))}function d(e,t){const n=[],r=[],u=e.length;let d,a,i,s,f,l,b,h,m,p,g,y,v;for(d=128,i=0,s=72,f=e.lastIndexOf("-"),f<0&&(f=0),l=0;l<f;++l){if(t&&(r[n.length]=e.charCodeAt(l)-65<26),e.charCodeAt(l)>=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(l))}for(b=f>0?f+1:0;b<u;){for(h=i,m=1,p=36;;p+=36){if(b>=u)throw RangeError("punycode_bad_input(1)");if(g=(O=e.charCodeAt(b++))-48<10?O-22:O-65<26?O-65:O-97<26?O-97:36,g>=36)throw RangeError("punycode_bad_input(2)");if(g>Math.floor((2147483647-i)/m))throw RangeError("punycode_overflow(1)");if(i+=g*m,y=p<=s?1:p>=s+26?26:p-s,g<y)break;if(m>Math.floor(2147483647/(36-y)))throw RangeError("punycode_overflow(2)");m*=36-y}if(a=n.length+1,s=c(i-h,a,0===h),Math.floor(i/a)>2147483647-d)throw RangeError("punycode_overflow(3)");d+=Math.floor(i/a),i%=a,t&&r.splice(i,0,e.charCodeAt(b-1)-65<26),n.splice(i,0,d),i++}var O;if(t)for(i=0,v=n.length;i<v;i++)r[i]&&(n[i]=String.fromCharCode(n[i]).toUpperCase().charCodeAt(0));return o(n)}var a=function(e){const t=e.split("."),n=[];for(let e=0;e<t.length;++e){const r=t[e];n.push(r.match(/^xn--/)?d(r.slice(4)):r)}return n.join(".")},i=n(2),s=n(9);function f(e){if(e)return e.includes("://")?e:"https://"+e}function l(e){if(!e)return;const t=f(e);if(t)try{let e=decodeURI(t);const n=e.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i);if(!n)return;const r=n[1];return e=e.replace(r,a(r)),e}catch(t){i.r&&console.error("SafeLink.getDecodedUrl error ",e,t)}}t.a=Object(r.h)(({url:e,text:t,className:n,children:o,isRtl:c})=>{const{toggleSafeLinkModal:d,openTelegramLink:a}=Object(u.d)(),b=o||t,h=e!==b,m=Object(r.m)(t=>t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||!e||!e.match(i.ub)&&!e.match(i.tb)?!h||(d({url:e}),t.preventDefault(),!1):(t.preventDefault(),a({url:e}),!1),[h,a,d,e]);if(!e)return;const p=Object(s.a)(n||"text-entity-link",t.length>50&&"long-word-break-all");return r.a.createElement("a",{href:f(e),title:l(e),target:"_blank",rel:"noopener noreferrer",className:p,onClick:m,dir:c?"rtl":"auto"},b)})},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return d}));function r(e){return e>536870912?(e/1073741824).toFixed(1)+" GB":e>524288?(e/1048576).toFixed(1)+" MB":(e/1024).toFixed(1)+" KB"}function u(e){const{fileName:t,mimeType:n}=e;return o(t,n)}function o(e,t){return e&&-1!==e.indexOf(".")?e.split(".").pop():t.split("/").pop()}function c(e){switch(e){case"apk":case"xls":case"xlsx":return"green";case"zip":case"rar":case"7z":case"tar":case"gz":case"ppt":case"pptx":return"orange";case"pdf":case"xps":return"red";default:return"default"}}function d(e){return Boolean(e.previewBlobUrl||e.thumbnail)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c}));const r={missing_payment_information:{field:"cardNumber",fieldError:"Incorrect card number"},invalid_number:{field:"cardNumber",fieldError:"Incorrect card number"},number:{field:"cardNumber",fieldError:"Incorrect card number"},exp_year:{field:"expiry",fieldError:"Incorrect year"},exp_month:{field:"expiry",fieldError:"Incorrect month"},invalid_expiry_year:{field:"expiry",fieldError:"Incorrect year"},invalid_expiry_month:{field:"expiry",fieldError:"Incorrect month"},cvc:{field:"cvv",fieldError:"Incorrect CVV"},invalid_cvc:{field:"cvv",fieldError:"Incorrect CVV"}};function u(e){const{message:t,code:n,param:u}=e,{field:o,fieldError:c,description:d}=u?r[u]:r[n];return{field:o,fieldError:c,description:d||t}}const o={ADDRESS_STREET_LINE1_INVALID:{field:"streetLine1",fieldError:"Incorrect street address"},ADDRESS_STREET_LINE2_INVALID:{field:"streetLine2",fieldError:"Incorrect street address"},ADDRESS_CITY_INVALID:{field:"city",fieldError:"Incorrect city"},ADDRESS_COUNTRY_INVALID:{field:"countryIso2",fieldError:"Incorrect country"},ADDRESS_POSTCODE_INVALID:{field:"postCode",fieldError:"Incorrect post code"},ADDRESS_STATE_INVALID:{field:"state",fieldError:"Incorrect state"},REQ_INFO_NAME_INVALID:{field:"fullName",fieldError:"Incorrect name"},REQ_INFO_PHONE_INVALID:{field:"phone",fieldError:"Incorrect phone"},REQ_INFO_EMAIL_INVALID:{field:"email",fieldError:"Incorrect email"}};function c(e){return Object.values(e).reduce((e,t)=>{if(!("hasErrorKey"in t)||!t.hasErrorKey)return e;const n=o[t.message];return n&&(e={...e,[n.field]:n.fieldError}),e},{})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c}));var r=n(10);let u;function o(e,t){t||(u&&!u.isCancelled&&(u.isCancelled=!0),u=t={isCancelled:!1}),Object(r.b)(()=>{!t.isCancelled&&e()&&o(e,t)})}function c(e){Object(r.b)(()=>{e()&&c(e)})}},function(e,t,n){"use strict";var r=n(0),u=n(55);n(98);t.a=({trigger:e,className:t,children:n,positionX:o="left",positionY:c="top",footer:d,forceOpen:a,onOpen:i,onClose:s})=>{const f=Object(r.q)(null),l=Object(r.q)(null),[b,h]=Object(r.r)(!1);return r.a.createElement("div",{ref:l,className:"DropdownMenu "+(t||""),onKeyDown:e=>{const t=f.current;if(!b||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()}},e({onTrigger:()=>{h(!b),b?s&&s():i&&i()},isOpen:b}),r.a.createElement(u.a,{ref:f,containerRef:l,isOpen:b||!!a,className:t||"",positionX:o,positionY:c,footer:d,autoClose:!0,onClose:()=>{h(!1),s&&s()},shouldSkipTransition:a},n))}},function(e,t,n){"use strict";var r=n(0);t.a=(e,t,n,u,o)=>{const[c,d]=Object(r.r)(-1);Object(r.n)(()=>{d(-1);const n=e.current;t&&n&&!o&&(n.tabIndex=-1,n.focus())},[e,t,o]);return Object(r.m)(t=>{const r=e.current;if(!r)return;if(13===t.keyCode&&n)return void n(c);if(38!==t.keyCode&&40!==t.keyCode)return;const o=document.activeElement,a=Array.from(u?r.querySelectorAll(u):r.children);let i=o&&a.indexOf(o)||c;if(38===t.keyCode&&i>0)i--;else if(40===t.keyCode&&i<a.length-1)i++;else{if(1!==a.length)return;i=0}const s=a[i];s&&(d(i),s.focus())},[e,n,u,c])}},function(e,t,n){"use strict";var r=n(19);const u=new RegExp(`^(?:${r.a.source})+$`,"");t.a=e=>{if(e.length>24)return!1;if(!Boolean(e.match(u)))return!1;let t=0;for(;r.a.exec(e);)if(t++,t>3)return r.a.lastIndex=0,!1;return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));const r=["female_sign","male_sign","medical_symbol"];function u(e){const t=e.split("-").map(e=>parseInt(e,16));return String.fromCodePoint(...t)}function o(e){let t;if(1===e.length)t=e.charCodeAt(0).toString(16).padStart(4,"0");else{const n=[];for(let t=0;t<e.length;t++)e.charCodeAt(t)>=55296&&e.charCodeAt(t)<=56319?e.charCodeAt(t+1)>=56320&&e.charCodeAt(t+1)<=57343&&n.push(1024*(e.charCodeAt(t)-55296)+(e.charCodeAt(t+1)-56320)+65536):(e.charCodeAt(t)<55296||e.charCodeAt(t)>57343)&&n.push(e.charCodeAt(t));t=n.map(e=>e.toString(16).padStart(4,"0")).join("-")}return t}function c(e){const t={categories:[],emojis:{}};for(let n=0;n<e.length;n+=2){const o={id:e[n][0],name:e[n][1],emojis:[]};for(let c=0;c<e[n+1].length;c++){const d=e[n+1][c];r.includes(d[1][0])||(o.emojis.push(d[1][0]),t.emojis[d[1][0]]={id:d[1][0],names:d[1],native:u(d[0]),image:d[0].toLowerCase()})}t.categories.push(o)}return t}},function(e,t,n){"use strict";var r=n(0),u=n(33),o=n(2),c=n(38);const d=new Set(["key","ref","teactFastList","teactOrderKey"]),a=new Set(["dir"]),i={autoPlay:"autoplay",autoComplete:"autocomplete"},s={};function f(e,t,n,u,c,{skipComponentUpdate:d=!1,forceIndex:a=!1,fragment:i,moveDirection:s}={}){if(!d&&t&&n&&Object(r.d)(t)&&Object(r.d)(n)&&!Object(r.c)(t,n)&&(n=function(e,t){return e.componentInstance.props=t.componentInstance.props,Object(r.j)(e.componentInstance)}(t,n)),!d&&n&&Object(r.d)(n)&&n.componentInstance.isMounted&&b(n,u,c,e),t===n)return n;if(!t&&n){Object(r.d)(n)&&(n=l(n,u,c,e));const t=h(n);Object(r.k)(n,t),a&&e.childNodes[c]?e.insertBefore(t,e.childNodes[c]):(i||e).appendChild(t)}else if(t&&!n)e.removeChild(Object(r.b)(t)),Object(r.l)(t);else if(t&&n)if(Object(r.c)(t,n)){Object(r.d)(n)&&(n=l(n,u,c,e));const o=h(n);Object(r.k)(n,o),e.replaceChild(o,Object(r.b)(t)),Object(r.l)(t)}else{const u=Object(r.d)(t)&&Object(r.d)(n);if(u||Object(r.k)(n,Object(r.b)(t)),Object(r.f)(t)&&Object(r.f)(n)){if(s){const n=Object(r.b)(t),u=e.childNodes["up"===s?c:c+1];u?e.insertBefore(n,u):(i||e).appendChild(n)}u||function(e,t,n){const r=Object.keys(e.props),u=Object.keys(t.props);r.forEach(r=>{void 0!==e.props[r]&&void 0===t.props[r]&&g(n,r,e.props[r])}),u.forEach(r=>{void 0!==t.props[r]&&e.props[r]!==t.props[r]&&(void 0===e.props[r]?p(n,r,t.props[r]):function(e,t,n,r){"value"===t?e.value=void 0!==r?r:"":(g(e,t,n),p(e,t,r))}(n,r,e.props[r],t.props[r]))})}(t,n,Object(r.b)(t)),n.children=function(e,t,n){if(t.props.teactFastList)return function(e,t,n){const u=new Set(t.children.map(e=>{const t="props"in e&&e.props.key;return o.r&&Object(r.f)(e)&&!t&&console.warn("Missing `key` in `teactFastList`"),t}));let c=0;const d=e.children.reduce((e,r,o)=>{let d="props"in r?r.props.key:void 0;if(d&&!u.has(d))return f(n,r,void 0,t,-1),e;if(!d){const u=t.children[o],c=u&&"props"in u?u.props.key:void 0;if(!u||c)return f(n,r,void 0,t,-1),e;d="__indexKey#"+o}return e[d]={$element:r,index:c++,order:"props"in r?r.props.teactOrderKey:void 0},e},{});let a,i,s=[],l=0;t.children.forEach((e,r)=>{const u="props"in e?e.props.key:"__indexKey#"+r,o=d[u];if(!o)return a||(a=[],i=r),void a.push(e);a&&(s=s.concat(m(a,i,n,t)),i=void 0,a=void 0);const c="props"in e?e.props.teactOrderKey:void 0,b=o.index!==l&&o.order!==c,h=b&&l>o.index;b&&!h||l++,s.push(f(n,o.$element,e,t,r,{forceIndex:!0,...b&&{moveDirection:h?"down":"up"}}))}),a&&(s=s.concat(m(a,i,n,t)));return s}(e,t,n);const u=Math.max(e.children.length,t.children.length),c=[],d=t.children.length>e.children.length+1?document.createDocumentFragment():void 0;for(let r=0;r<u;r++){const u=f(n,e.children[r],t.children[r],t,r,r>=e.children.length?{fragment:d}:void 0);u&&c.push(u)}d&&n.appendChild(d);return c}(t,n,u?e:Object(r.b)(t))}}return n}function l(e,t,n,u){if(!Object(r.d)(e))return e;const{componentInstance:o}=e;if(!o.isMounted){b(e=Object(r.i)(o),t,n,u);const c=e.children[0];Object(r.d)(c)&&(e.children=[l(c,e,0,u)]),o.isMounted=!0}return e}function b(e,t,n,r){const{componentInstance:u}=e;u.onUpdate=()=>{t.children[n]=f(r,t.children[n],u.$element,t,n,{skipComponentUpdate:!0})}}function h(e){if(Object(r.e)(e))return document.createTextNode("");if(Object(r.g)(e))return document.createTextNode(e.value);if(Object(r.d)(e))return h(e.children[0]);const{tag:t,props:n,children:u=[]}=e,o=document.createElement(t);return"object"==typeof n.ref&&(n.ref.current=o),Object.keys(n).forEach(e=>{p(o,e,n[e])}),e.children=u.map((t,n)=>f(o,void 0,t,e,n)),o}function m(e,t,n,r){if(1===e.length)return[f(n,void 0,e[0],r,t,{forceIndex:!0})];if(e.length>1){const u=document.createDocumentFragment(),o=e.map(e=>f(n,void 0,e,r,t,{fragment:u}));return n.childNodes[t]?n.insertBefore(u,n.childNodes[t]):n.appendChild(u),o}throw new Error("Unexpected input")}function p(e,t,n){void 0!==n&&("className"===t?e.className=n:"value"===t?e.value=n:"style"===t?e.style.cssText=n:t.startsWith("on")?Object(c.a)(e,t,n,t.endsWith("Capture")):t.startsWith("data-")||a.has(t)?e.setAttribute(t,n):d.has(t)||(e[i[t]||t]=n))}function g(e,t,n){"className"===t?e.className="":"value"===t?e.value="":"style"===t?e.style.cssText="":t.startsWith("on")?Object(c.c)(e,t,n,t.endsWith("Capture")):t.startsWith("data-")||a.has(t)?e.removeAttribute(t):d.has(t)||delete e[i[t]||t]}t.a={render:function(e,t){if(!t)return;let n=t.getAttribute("data-teact-head-id");n||(n=Object(u.a)(s),s[n]={children:[]},t.setAttribute("data-teact-head-id",n));const r=s[n];r.children=[f(t,r.children[0],e,r,0)]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),u=n(4),o=n(41),c=n(22),d=n(1),a=n(3),i=n(9),s=n(32);var f=Object(d.h)(void 0,(e,t)=>Object(a.l)(t,["openUserInfo"]))(({className:e,sender:t,openUserInfo:n,children:u})=>{const o=Object(r.m)(()=>{t&&n({id:t.id})},[t,n]);return t?r.a.createElement(s.a,{className:Object(i.a)("UserLink",e),onClick:o},u):u});var l=Object(d.h)(void 0,(e,t)=>Object(a.l)(t,["focusMessage"]))(({className:e,message:t,children:n,focusMessage:u})=>{const o=Object(r.m)(()=>{t&&u({chatId:t.chatId,messageId:t.id})},[u,t]);return t?r.a.createElement(s.a,{className:Object(i.a)("MessageLink",e),onClick:o},n):n});var b=Object(d.h)(void 0,(e,t)=>Object(a.l)(t,["openChat"]))(({className:e,chatId:t,openChat:n,children:u})=>{const o=Object(r.m)(()=>{t&&n({id:t})},[t,n]);return t?r.a.createElement(s.a,{className:Object(i.a)("ChatLink",e),onClick:o},u):u});function h(e,t,n,d,a,i,s={}){if(!t.content.action)return[];const{text:f,translationValues:h}=t.content.action,g=[],y={...s,maxTextLength:32};let v,O=p(e("Chat.Service.Group.UpdatedPinnedMessage1"!==f||a?f:"Message.PinnedGenericMessage",h&&h.length?h:void 0),"%action_origin%",n?!s.isEmbedded&&function(e,t,n){return Object(u.ib)(t)?function(e,t,n){const d=Object(o.a)(Object(u.k)(e,t));if(n)return d;return r.a.createElement(b,{className:"action-link",chatId:t.id},t&&Object(c.a)(d))}(e,t,n):m(t,n)}(e,n,s.asPlain)||" ":"User");return v=O.pop(),g.push(...O),O=p(v,"%target_user%",d?d.map(e=>m(e,s.asPlain)).filter(Boolean):"User"),v=O.pop(),g.push(...O),O=p(v,"%message%",a?function(e,t,n={}){const d=Object(u.O)(e,t),{photo:a,video:i,document:s,sticker:f}=Object(u.v)(t),{maxTextLength:b,isEmbedded:h,asPlain:m}=n,p=h&&d&&!a&&!i&&!s&&!f;let g=Object(o.a)(d,b);h&&(a?g="a photo":i?g=i.isGif?"a GIF":"a video":s?g="a document":f&&(g=d));if(m)return p?`«${g}»`:g;if(p)return r.a.createElement("span",null,"«",r.a.createElement(l,{className:"action-link",message:t},Object(c.a)(g)),"»");return r.a.createElement(l,{className:"action-link",message:t},Object(c.a)(g))}(e,a,y):"a message"),v=O.pop(),g.push(...O),O=p(v,"%product%",a?function(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}(a):"a product"),v=O.pop(),g.push(...O),O=p(v,"%target_chat%",i?function(e,t){if(t)return"another chat";return r.a.createElement(b,{className:"action-link",chatId:e},"another chat")}(i,s.asPlain):"another chat"),g.push(...O),s.asPlain?g.join("").trim():g}function m(e,t){const n=Object(o.a)(Object(u.bb)(e));return t?n:r.a.createElement(f,{className:"action-link",sender:e},e&&Object(c.a)(n))}function p(e,t,n){const r=e.indexOf(t);if(r<0||!n)return[e];const u=[];return u.push(e.substring(0,r)),Array.isArray(n)?n.forEach((e,t)=>{u.push(e),t+1<n.length&&u.push(", ")}):u.push(n),u.push(e.substring(r+t.length)),u}},function(e,t){},function(e,t){},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),function(e){e.Bold="MessageEntityBold",e.Blockquote="MessageEntityBlockquote",e.BotCommand="MessageEntityBotCommand",e.Cashtag="MessageEntityCashtag",e.Code="MessageEntityCode",e.Email="MessageEntityEmail",e.Hashtag="MessageEntityHashtag",e.Italic="MessageEntityItalic",e.MentionName="MessageEntityMentionName",e.Mention="MessageEntityMention",e.Phone="MessageEntityPhone",e.Pre="MessageEntityPre",e.Strike="MessageEntityStrike",e.TextUrl="MessageEntityTextUrl",e.Url="MessageEntityUrl",e.Underline="MessageEntityUnderline",e.Unknown="MessageEntityUnknown"}(r||(r={}));const u=-1,o="MESSAGE_DELETED"},function(e,t){},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e[e.DataUri=0]="DataUri",e[e.BlobUrl=1]="BlobUrl",e[e.Lottie=2]="Lottie",e[e.Progressive=3]="Progressive",e[e.Stream=4]="Stream"}(r||(r={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(0),u=n(1),o=n(3),c=n(7);t.a=Object(u.h)((e,{userId:t})=>({userOrChat:t?Object(c.Jb)(e,t):void 0}),(e,t)=>Object(o.l)(t,["openChat","openChatByUsername"]))(({username:e,userOrChat:t,children:n,openChat:u,openChatByUsername:o})=>r.a.createElement("a",{onClick:()=>{t?u({id:t.id}):e&&o({username:e.substring(1)})},className:"text-entity-link",dir:"auto"},n))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(2);function u(e){"function"==typeof window.navigator.setAppBadge&&window.navigator.setAppBadge(e).catch(e=>{r.r&&console.error(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0);function u(e,t,n){Object(r.n)(()=>{const r=e=>{const r=t.current,u=e.target;r&&u&&(r.contains(e.target)&&!u.classList.contains("backdrop")||(e.preventDefault(),e.stopPropagation(),n&&n()))};return e&&n&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t,n])}},function(e,t,n){e.exports=function(){return new Worker(n.p+"d8ff794b74bf32a92230.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"5054ce745024de60a724.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"695e66b225ec96107343.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"4c9029ba18603b924ede.worker.js")}},function(e,t,n){"use strict";var r=n(1),u=n(2),o=n(6),c=n(14),d=n(45),a=n(7);!function(){function e(){const e=document.documentElement.className.match(/theme-(\w+)/),t=e?e[1]:"light",n=Object(r.e)(),o=Object(a.Db)(n),{animationLevel:c}=n.settings.byKey;o!==t&&(Object(d.a)(o,c===u.e),Object(r.g)({...n}))}const t=window.matchMedia("(prefers-color-scheme: dark)");"function"==typeof t.addEventListener?t.addEventListener("change",e):"function"==typeof t.addListener&&t.addListener(e)}(),Object(r.b)("init",e=>{const{animationLevel:t,messageTextSize:n,language:r}=e.settings.byKey,i=Object(a.Db)(e);Object(c.d)(r,void 0,!0),document.documentElement.style.setProperty("--composer-text-size",Math.max(n,o.e?16:15)+"px"),document.documentElement.style.setProperty("--message-meta-height",Math.floor(1.3125*n)+"px"),document.documentElement.style.setProperty("--message-text-size",n+"px"),document.documentElement.setAttribute("data-message-text-size",n.toString()),document.body.classList.add("initial"),document.body.classList.add("animation-level-"+t),document.body.classList.add(o.n?"is-touch-env":"is-pointer-env"),Object(d.a)(i,t===u.e),o.j&&document.body.classList.add("is-safari"),o.e?document.body.classList.add("is-ios"):o.b?document.body.classList.add("is-android"):o.f&&document.body.classList.add("is-macos")}),Object(r.b)("setIsUiReady",(e,t,n)=>{const{uiReadyState:r}=n;return 2===r&&document.body.classList.remove("initial"),{...e,uiReadyState:r}}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return{...e,authPhoneNumber:r}}),Object(r.b)("setAuthRememberMe",(e,t,n)=>({...e,authRememberMe:Boolean(n)})),Object(r.b)("clearAuthError",e=>({...e,authError:void 0})),Object(r.b)("disableHistoryAnimations",()=>{setTimeout(()=>{Object(r.g)({...Object(r.e)(),shouldSkipHistoryAnimations:!1}),document.body.classList.remove("no-animate")},450),Object(r.g)({...Object(r.e)(),shouldSkipHistoryAnimations:!0},!0)})},function(e,t,n){"use strict";var r=n(1),u=n(11);Object(r.b)("setSettingOption",(e,t,n)=>Object(u.w)(e,n)),Object(r.b)("setThemeSettings",(e,t,n)=>{const{theme:r,...o}=n;return Object(u.x)(e,r,o)})},function(e,t,n){"use strict";var r=n(1),u=n(5),o=n(2),c=n(6),d=n(34),a=n(12),i=n(79),s=n(18);Object(r.b)("initApi",(e,t)=>{(async()=>{o.N||(await Object(s.d)(),Object(s.a)()),Object(u.c)(t.apiUpdate,{userAgent:navigator.userAgent,platform:c.r,sessionData:Object(s.e)()})})()}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return Object(u.a)("provideAuthPhoneNumber",r.replace(/[^\d]/g,"")),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthCode",(e,t,n)=>{const{code:r}=n;return Object(u.a)("provideAuthCode",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthPassword",(e,t,n)=>{const{password:r}=n;return Object(u.a)("provideAuthPassword",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("uploadProfilePhoto",(e,t,n)=>{const{file:r}=n;Object(u.a)("uploadProfilePhoto",r)}),Object(r.b)("signUp",(e,t,n)=>{const{firstName:r,lastName:o}=n;return Object(u.a)("provideAuthRegistration",{firstName:r,lastName:o}),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("returnToAuthPhoneNumber",e=>(Object(u.a)("restartAuth"),{...e,authError:void 0})),Object(r.b)("goToAuthQrCode",e=>(Object(u.a)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0})),Object(r.b)("saveSession",(e,t,n)=>{const{sessionData:r}=n;r?Object(s.f)(n.sessionData,e.currentUserId):Object(s.b)()}),Object(r.b)("signOut",()=>{(async()=>{try{await Object(d.d)(),await Object(u.a)("destroy")}catch(e){}Object(r.d)().reset()})()}),Object(r.b)("reset",()=>{Object(s.b)(),a.b(o.Y),a.b(o.Z),a.b(o.ab),a.b(o.o);const e=o.O.replace(/\d+$/,""),t=(o.O.match(/\d+$/)||[0])[0];for(let n=0;n<t;n++)a.b(`${e}${0===n?"":n}`);Object(s.a)(),Object(i.a)(0),Object(r.d)().init()}),Object(r.b)("disconnect",()=>{(async()=>{await Object(u.a)("disconnect")})()}),Object(r.b)("loadNearestCountry",e=>{"connectionStateReady"===e.connectionState&&(async()=>{const e=await Object(u.a)("fetchNearestCountry");Object(r.g)({...Object(r.e)(),authNearestCountry:e})})()}),Object(r.b)("setDeviceToken",(e,t,n)=>{Object(r.g)({...e,push:{deviceToken:n,subscribedAt:Date.now()}})}),Object(r.b)("deleteDeviceToken",e=>{const t={...e};delete t.push,Object(r.g)(t)})},function(e,t,n){"use strict";var r=n(1),u=n(13),o=n(5),c=n(3),d=n(7),a=n(11),i=n(4);function s(e,{visibility:t,allowedIds:n,deniedIds:r}){const{users:{byId:u},chats:{byId:o}}=e,c={visibility:t};let d,a;const s=e=>{if(!Object(i.ob)(e))return;const{id:t,accessHash:n}=u[e]||{};return t?{id:t,accessHash:n}:void 0},f=e=>{if(Object(i.ob)(e))return;const t=o[e];return t?{id:t.id}:void 0};return"contacts"!==t&&"nobody"!==t||(d=n.map(s).filter(Boolean),a=n.map(f).filter(Boolean),d.length>0&&(c.allowedUsers=d),a.length>0&&(c.allowedChats=a)),"everybody"!==t&&"contacts"!==t||(d=r.map(s).filter(Boolean),a=r.map(f).filter(Boolean),d.length>0&&(c.blockedUsers=d),a.length>0&&(c.blockedChats=a)),c}Object(r.b)("updateProfile",(e,t,n)=>{const{photo:c,firstName:i,lastName:s,bio:f,username:l}=n;(async()=>{const{currentUserId:t}=e;if(t){if(Object(r.g)({...Object(r.e)(),profileEdit:{progress:u.k.InProgress}}),c&&await Object(o.a)("updateProfilePhoto",c),i||s||f){if(await Object(o.a)("updateProfile",{firstName:i,lastName:s,about:f})){e=Object(r.e)();const n=t&&Object(d.Jb)(e,t);n&&Object(r.g)(Object(a.ob)(e,n.id,{firstName:i,lastName:s,fullInfo:{...n.fullInfo,bio:f}}))}}if(l){await Object(o.a)("updateUsername",l)&&t&&Object(r.g)(Object(a.ob)(Object(r.e)(),t,{username:l}))}Object(r.g)({...Object(r.e)(),profileEdit:{progress:u.k.Complete}})}})()}),Object(r.b)("checkUsername",(e,t,n)=>{const{username:c}=n;(async()=>{if(e.profileEdit&&e.profileEdit.progress===u.k.InProgress)return;Object(r.g)({...e,profileEdit:{progress:e.profileEdit?e.profileEdit.progress:u.k.Idle,isUsernameAvailable:void 0}});const t=await Object(o.a)("checkUsername",c);e=Object(r.e)(),Object(r.g)({...e,profileEdit:{...e.profileEdit,isUsernameAvailable:t}})})()}),Object(r.b)("loadWallpapers",()=>{(async()=>{const e=await Object(o.a)("fetchWallpapers",0);if(!e)return;const t=Object(r.e)();Object(r.g)({...t,settings:{...t.settings,loadedWallpapers:e.wallpapers}})})()}),Object(r.b)("uploadWallpaper",(e,t,n)=>{const c=n,d=URL.createObjectURL(c);Object(r.g)({...e,settings:{...e.settings,loadedWallpapers:[{slug:u.o,document:{fileName:"",size:c.size,mimeType:c.type,previewBlobUrl:d}},...e.settings.loadedWallpapers||[]]}}),(async()=>{const t=await Object(o.a)("uploadWallpaper",c);if(!t)return;const{wallpaper:n}=t;if(!(e=Object(r.e)()).settings.loadedWallpapers)return;const a=e.settings.loadedWallpapers[0];if(!a||a.slug!==u.o)return;const i={...n,document:{...n.document,previewBlobUrl:d}};Object(r.g)({...e,settings:{...e.settings,loadedWallpapers:[i,...e.settings.loadedWallpapers.slice(1)]}})})()}),Object(r.b)("loadBlockedContacts",()=>{(async()=>{const e=await Object(o.a)("fetchBlockedContacts");if(!e)return;let t=Object(r.e)();e.users&&e.users.length&&(t=Object(a.g)(t,Object(c.c)(e.users,"id"))),e.chats&&e.chats.length&&(t=Object(a.N)(t,Object(c.c)(e.chats,"id"))),t={...t,blocked:{...t.blocked,ids:[...t.blocked.ids||[],...e.blockedIds],totalCount:e.totalCount}},Object(r.g)(t)})()}),Object(r.b)("blockContact",(e,t,n)=>{const{contactId:u,accessHash:c}=n;(async()=>{if(!await Object(o.a)("blockContact",u,c))return;const e=Object(r.e)();Object(r.g)(Object(a.a)(e,u))})()}),Object(r.b)("unblockContact",(e,t,n)=>{const{contactId:u}=n;let c;if(Object(i.ob)(u)){const t=Object(d.Jb)(e,u);if(!t)return;c=t.accessHash}(async()=>{if(!await Object(o.a)("unblockContact",u,c))return;const e=Object(r.e)();Object(r.g)(Object(a.q)(e,u))})()}),Object(r.b)("loadAuthorizations",()=>{(async()=>{const e=await Object(o.a)("fetchAuthorizations");e&&Object(r.g)({...Object(r.e)(),activeSessions:e})})()}),Object(r.b)("terminateAuthorization",(e,t,n)=>{const{hash:u}=n;(async()=>{if(!await Object(o.a)("terminateAuthorization",u))return;const e=Object(r.e)();Object(r.g)({...e,activeSessions:e.activeSessions.filter(e=>e.hash!==u)})})()}),Object(r.b)("terminateAllAuthorizations",()=>{(async()=>{if(!await Object(o.a)("terminateAllAuthorizations"))return;const e=Object(r.e)();Object(r.g)({...e,activeSessions:e.activeSessions.filter(e=>e.isCurrent)})})()}),Object(r.b)("loadNotificationExceptions",e=>{const{serverTimeOffset:t}=e;(async()=>{const e=await Object(o.a)("fetchNotificationExceptions",{serverTimeOffset:t});e&&Object(r.g)(Object(a.f)(Object(r.e)(),e))})()}),Object(r.b)("loadNotificationSettings",e=>{const{serverTimeOffset:t}=e;(async()=>{const e=await Object(o.a)("fetchNotificationSettings",{serverTimeOffset:t});e&&Object(r.g)(Object(a.w)(Object(r.e)(),e))})()}),Object(r.b)("updateNotificationSettings",(e,t,n)=>{const{peerType:u,isSilent:c,shouldShowPreviews:d}=n;(async()=>{await Object(o.a)("updateNotificationSettings",u,{isSilent:c,shouldShowPreviews:d})&&Object(r.g)(Object(a.db)(Object(r.e)(),u,c,d))})()}),Object(r.b)("updateContactSignUpNotification",(e,t,n)=>{const{isSilent:u}=n;(async()=>{await Object(o.a)("updateContactSignUpNotification",u)&&Object(r.g)(Object(a.w)(Object(r.e)(),{hasContactJoinedNotifications:!u}))})()}),Object(r.b)("loadLanguages",()=>{(async()=>{const e=await Object(o.a)("fetchLanguages");e&&Object(r.g)(Object(a.w)(Object(r.e)(),{languages:e}))})()}),Object(r.b)("loadPrivacySettings",()=>{(async()=>{const[e,t,n,u,c]=await Promise.all([Object(o.a)("fetchPrivacySettings","phoneNumber"),Object(o.a)("fetchPrivacySettings","lastSeen"),Object(o.a)("fetchPrivacySettings","profilePhoto"),Object(o.a)("fetchPrivacySettings","forwards"),Object(o.a)("fetchPrivacySettings","chatInvite")]);if(!(e&&t&&n&&u&&c))return;const d=Object(r.e)();d.settings.privacy.phoneNumber=e,d.settings.privacy.lastSeen=t,d.settings.privacy.profilePhoto=n,d.settings.privacy.forwards=u,d.settings.privacy.chatInvite=c,Object(r.g)(d)})()}),Object(r.b)("setPrivacyVisibility",(e,t,n)=>{const{privacyKey:u,visibility:c}=n,{privacy:{[u]:d}}=e.settings;if(!d)return;const a=s(e,{visibility:c,allowedIds:[...d.allowUserIds,...d.allowChatIds],deniedIds:[...d.blockUserIds,...d.blockChatIds]});(async()=>{const e=await Object(o.a)("setPrivacySettings",u,a);if(e){const t=Object(r.e)();t.settings.privacy[u]=e,Object(r.g)(t)}})()}),Object(r.b)("setPrivacySettings",(e,t,n)=>{const{privacyKey:u,isAllowList:c,contactsIds:d}=n,{privacy:{[u]:a}}=e.settings;if(!a)return;const i=s(e,{visibility:a.visibility,allowedIds:c?d:[...a.allowUserIds,...a.allowChatIds],deniedIds:c?[...a.blockUserIds,...a.blockChatIds]:d});(async()=>{const e=await Object(o.a)("setPrivacySettings",u,i);if(e){const t=Object(r.e)();t.settings.privacy[u]=e,Object(r.g)(t)}})()}),Object(r.b)("updateIsOnline",(e,t,n)=>{Object(o.a)("updateIsOnline",n)}),Object(r.b)("loadContentSettings",()=>{(async()=>{const e=await Object(o.a)("fetchContentSettings");e&&Object(r.g)(Object(a.w)(Object(r.e)(),e))})()}),Object(r.b)("updateContentSettings",(e,t,n)=>{(async()=>{Object(r.g)(Object(a.w)(Object(r.e)(),{isSensitiveEnabled:n}));await Object(o.a)("updateContentSettings",n)||Object(r.g)(Object(a.w)(Object(r.e)(),{isSensitiveEnabled:!n}))})()})},function(e,t,n){"use strict";var r=n(1),u=n(2),o=n(34),c=n(11),d=n(14);Object(r.b)("apiUpdate",(e,t,n)=>{switch(u.r&&"updateUserStatus"!==n["@type"]&&"updateServerTimeOffset"!==n["@type"]&&console.log("[GramJs] UPDATE",n["@type"],{update:n}),n["@type"]){case"updateApiReady":!function(e){Object(o.c)(),Object(d.d)(e.settings.byKey.language)}(e);break;case"updateAuthorizationState":!function(e){let t=Object(r.e)();const n="authorizationStateReady"===t.authState,u=e.authorizationState;switch(Object(r.g)({...t,authState:u,authIsLoading:!1}),t=Object(r.e)(),u){case"authorizationStateLoggingOut":Object(r.g)({...t,isLoggingOut:!0});break;case"authorizationStateWaitCode":Object(r.g)({...t,authIsCodeViaApp:e.isCodeViaApp});break;case"authorizationStateWaitPassword":Object(r.g)({...t,authHint:e.hint});break;case"authorizationStateWaitQrCode":Object(r.g)({...t,authIsLoadingQrCode:!1,authQrCode:e.qrCode});break;case"authorizationStateReady":if(n)break;Object(r.g)({...t,isLoggingOut:!1,lastSyncTime:Date.now()})}}(n);break;case"updateAuthorizationError":!function(e){Object(r.g)({...Object(r.e)(),authError:e.message})}(n);break;case"updateConnectionState":!function(e){const{connectionState:t}=e,n=Object(r.e)();Object(r.g)({...n,connectionState:t}),"connectionStateReady"===t&&"authorizationStateReady"===n.authState?Object(r.d)().sync():"connectionStateBroken"===t&&Object(r.d)().signOut()}(n);break;case"updateSession":!function(e){const{sessionData:t}=e,{authRememberMe:n,authState:u}=Object(r.e)(),o=!t||!t.mainDcId;if(!n||"authorizationStateReady"!==u||o)return;Object(r.d)().saveSession({sessionData:t})}(n);break;case"updateServerTimeOffset":!function(e){const t=Object(r.e)();if(t.serverTimeOffset===e.serverTimeOffset)return;Object(r.g)({...t,serverTimeOffset:e.serverTimeOffset})}(n);break;case"updateCurrentUser":!function(e){const{currentUser:t}=e;Object(r.g)({...Object(c.ob)(Object(r.e)(),t.id,t),currentUserId:t.id}),function(e){const t=localStorage.getItem(u.zb);if(!t)return;const n=JSON.parse(t);n.id=e,localStorage.setItem(u.zb,JSON.stringify(n))}(t.id)}(n);break;case"error":"SESSION_REVOKED"===n.error.message&&t.signOut(),t.showDialog&&t.showDialog({data:{...n.error,hasErrorKey:!0}})}})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(27),function(){function e(){var t=Error.call(this,"ServiceWorker is not supported.");return Object.setPrototypeOf(t,e.prototype),t}e.prototype=Object.create(Error.prototype)}();var r=n.p+"serviceWorker.js";var u=n(2),o=n(1),c=n(6),d=n(34);function a(e){const t=e.data;if(!t.type)return;const n=Object(o.d)();switch(t.type){case"focusMessage":n.focusMessage(t.payload)}}function i(){navigator.serviceWorker.removeEventListener("message",a),navigator.serviceWorker.addEventListener("message",a),Object(d.a)()}c.k&&(window.addEventListener("load",async()=>{try{await navigator.serviceWorker.register(r),u.r&&console.log("[SW] ServiceWorker registered"),await navigator.serviceWorker.ready,navigator.serviceWorker.controller?(u.r&&console.log("[SW] ServiceWorker ready"),i()):(u.r&&console.error("[SW] ServiceWorker not available"),c.e||c.b||Object(o.d)().showDialog({data:{message:"SERVICE_WORKER_DISABLED",hasErrorKey:!0}}))}catch(e){u.r&&console.error("[SW] ServiceWorker registration failed: ",e)}}),window.addEventListener("focus",async()=>{await navigator.serviceWorker.ready,i()}));var s=n(67);const f={isLeftColumnShown:!0,isChatInfoShown:!1,newChatMembersProgress:n(13).i.Closed,uiReadyState:0,serverTimeOffset:0,authRememberMe:!0,blocked:{ids:[],totalCount:0},users:{byId:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{}},messages:{byChatId:{},messageLists:[]},scheduledMessages:{byChatId:{}},chatFolders:{byId:{},activeChatFolder:0},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy"],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},greeting:{stickers:[]},featured:{setIds:[]},search:{},forEmoji:{}},emojiKeywords:{},gifs:{saved:{},search:{}},inlineBots:{isLoading:!1,byUsername:{}},globalSearch:{},userSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatId:{}},management:{byChatId:{}},topPeers:{},topInlineBots:{},mediaViewer:{},audioPlayer:{},forwardMessages:{},pollResults:{},payment:{},notifications:[],dialogs:[],activeSessions:[],settings:{byKey:{theme:"light",shouldUseSystemTheme:!0,messageTextSize:c.e?u.M:c.f?u.U:u.w,animationLevel:u.d,messageSendKeyCombo:"enter",shouldAutoDownloadMediaFromContacts:!0,shouldAutoDownloadMediaInPrivateChats:!0,shouldAutoDownloadMediaInGroups:!0,shouldAutoDownloadMediaInChannels:!0,shouldAutoPlayGifs:!0,shouldAutoPlayVideos:!0,shouldSuggestStickers:!0,shouldLoopStickers:!0,language:"en"},themes:{light:{isBlurred:!0,patternColor:u.x},dark:{isBlurred:!0,patternColor:u.q}},privacy:{},notifyExceptions:{}},twoFaSettings:{},shouldShowContextMenuHint:!0};var l=n(8),b=n(10),h=n(37),m=n(3),p=n(7),g=n(18);const y=Object(b.h)(()=>Object(b.d)(E),5e3,!1);let v,O=!1,j=!1;function w(e){if(!u.I)return Object(g.c)(!0)?(I(),function(e){u.r&&console.time("global-state-cache-read");const t=localStorage.getItem(u.J),n=t?JSON.parse(t):void 0;u.r&&console.timeEnd("global-state-cache-read");n&&(n.settings.byKey={...e.settings.byKey,...n.settings.byKey},n.settings.themes={...e.settings.themes,...n.settings.themes},n.chatFolders={...e.chatFolders,...n.chatFolders},n.messages.messageLists||(n.messages.messageLists=e.messages.messageLists),n.stickers.greeting||(n.stickers.greeting=e.stickers.greeting));return{...e,...n}}(e)):void C()}function I(){O=!0,v=Object(b.c)(E,!0),window.addEventListener("blur",E),Object(o.a)(y)}function C(){O=!1,Object(o.f)(y),window.removeEventListener("blur",E),v&&v()}function E(){if(!O||j)return;const e=Object(o.e)();if(e.isLoggingOut)return;const t={...f,...Object(m.l)(e,["authState","authPhoneNumber","authRememberMe","authNearestCountry","currentUserId","contactList","topPeers","topInlineBots","recentEmojis","push","shouldShowContextMenuHint"]),isChatInfoShown:S(e),users:M(e),chats:A(e),messages:k(e),globalSearch:{recentlyFoundChatIds:e.globalSearch.recentlyFoundChatIds},settings:T(e),chatFolders:N(e)},n=JSON.stringify(t);localStorage.setItem(u.J,n)}function S(e){return window.innerWidth>u.lb&&e.isChatInfoShown}function M(e){const{users:{byId:t,selectedId:n}}=e,r=[...(e.chats.listIds.active||[]).slice(0,u.H).filter(e=>e>0),...Object.keys(t)].slice(0,u.K);return{byId:Object(m.l)(t,r),selectedId:window.innerWidth>u.lb?n:void 0}}function A(e){const t=[...(e.chats.listIds.active||[]).slice(0,u.H)],{chatId:n}=Object(p.z)(e)||{};return{...e.chats,byId:Object(m.l)(e.chats.byId,n?[...t,n]:t),listIds:{active:t},isFullyLoaded:{},orderedPinnedIds:{active:e.chats.orderedPinnedIds.active}}}function k(e){const t={},{chatId:n}=Object(p.z)(e)||{};[...(e.chats.listIds.active||[]).slice(0,u.H),...n?[n]:[]].forEach(n=>{const r=e.messages.byChatId[n];if(!r)return;const u=r.threadsById[l.MAIN_THREAD_ID];u&&u.viewportIds&&(t[n]={byId:Object(m.l)(r.byId,u.viewportIds),threadsById:{[l.MAIN_THREAD_ID]:u}})});const r=Object(p.z)(e);return{byChatId:t,messageLists:!r||c.l?[]:[{...r,threadId:l.MAIN_THREAD_ID,type:"thread"}]}}function T(e){const{byKey:t,themes:n}=e.settings;return{byKey:t,themes:n,privacy:{},notifyExceptions:{}}}function N(e){return{...e.chatFolders,activeChatFolder:0}}document.addEventListener(h.b,()=>{j=!0}),document.addEventListener(h.a,()=>{j=!1}),u.I||(Object(o.b)("saveSession",()=>{O||I()}),Object(o.b)("reset",()=>{localStorage.removeItem(u.J),O&&C()})),Object(o.b)("init",()=>{const e=Object(m.d)(f);return w(e)||e});var P=n(0),D=n(54);const L=String(Date.now()+Math.random());let x;localStorage.setItem("tt-active-tab",L);const F=window.setInterval(()=>{x&&localStorage.getItem("tt-active-tab")!==L&&(x(),clearInterval(F))},2e3);var B=n(25),R=(n(85),n(86),n(87),n(88),n(89),n(39)),U=n(36),_=n(40),$=n(17);const G=["400 1em Roboto","500 1em Roboto"];function W(){if("fonts"in document)return Promise.all(G.map(e=>document.fonts.load(e)))}var H=n(57),z=n(15),K=n(9),V=(n(91),n.p+"telegram-logo.df3a91becaa9678c529b4c4cadd45204.svg"),q=n.p+"monkey.a3d5fcdc50b18dc55695f7dd4101a8c9.svg";function J(){const{listIds:e,byId:t}=Object(o.e)().chats;if(e.active)return Promise.all(e.active.slice(0,10).map(e=>{const n=t[e];if(!n)return;const r=Object(U.d)(n);return r?H.b(r,l.ApiMediaFormat.DataUri):void 0}))}const Q={main:()=>Promise.all([Object(z.d)(z.a.Main,"Main").then(W),J()]),authPhoneNumber:()=>Promise.all([W(),Object($.g)(V)]),authCode:()=>Object($.g)(q),authPassword:()=>Object($.g)(q),authQrCode:W};var Y=Object(o.h)(e=>{const t=Object(p.Db)(e),{background:n,backgroundColor:r}=e.settings.themes[t]||{};return{shouldSkipHistoryAnimations:e.shouldSkipHistoryAnimations,uiReadyState:e.uiReadyState,hasCustomBackground:Boolean(n),hasCustomBackgroundColor:Boolean(r),isRightColumnShown:Object(p.W)(e)}},(e,t)=>Object(m.l)(t,["setIsUiReady"]))(({page:e,children:t,hasCustomBackground:n,hasCustomBackgroundColor:r,isRightColumnShown:u,shouldSkipHistoryAnimations:o,setIsUiReady:c})=>{const[d,a]=Object(B.a)(),{shouldRender:i,transitionClassNames:s}=Object(_.a)(!d,void 0,!0);return Object(P.n)(()=>{let t;return Promise.race([Object(b.f)(700),(async()=>{try{await Q[e]()}catch(e){}})()]).then(()=>{a(),c({uiReadyState:1}),t=window.setTimeout(()=>{c({uiReadyState:2})},1e3)}),()=>{t&&(clearTimeout(t),t=void 0),c({uiReadyState:0})}},[]),P.a.createElement("div",{id:"UiLoader"},t,i&&!o&&P.a.createElement("div",{className:Object(K.a)("mask",s)},"main"===e?P.a.createElement(P.a.Fragment,null,P.a.createElement("div",{className:"left"}),P.a.createElement("div",{className:Object(K.a)("middle",n&&"custom-bg-image",r&&"custom-bg-color",u&&"with-right-column")}),u&&P.a.createElement("div",{className:"right"})):P.a.createElement("div",{className:"blank"})))}),Z=n(23),X=n(14),ee=n(16),te=(e,t)=>{const[n,r]=Object(P.r)();return e&&X.c(e,t).then(r),n};function ne(){let e=navigator.language;return e&&"pt-br"!==e&&(e=e.substr(0,2)),e}var re=n(21),ue=n(48),oe=n(47),ce=n(20),de=n(53),ae=n(22),ie=n(63),se=n(43),fe=n(26);n(100);const le=200+u.c;var be=Object(P.h)(({id:e,value:t,isLoading:n,onChange:r})=>{const u=Object(ee.a)(),o=Object(P.q)(null),[c,d]=Object(P.r)(),[a,i]=Object(P.r)(Z.a);function s(e){d(e),i(function(e=""){return e.length?Z.a.filter(t=>Object(de.a)(t.name,e)):Z.a}(e))}const f=Object(P.m)(e=>{const{countryId:t}=e.currentTarget.firstElementChild.dataset,n=Z.a.find(e=>e.id===t);n&&r(n),setTimeout(()=>s(void 0),le)},[r]),l=Object(P.m)(e=>{s(e.currentTarget.value)},[]),b=Object(P.m)(e=>{if(8!==e.keyCode)return;const n=e.currentTarget;t&&void 0===c&&(n.value=""),s(n.value)},[c,t]);return P.a.createElement(ie.a,{className:"CountryCodeInput",trigger:({onTrigger:r,isOpen:d})=>{const a=()=>{if(d)return;setTimeout(()=>{o.current.select()},50),r();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},i=void 0!==c?c:t&&t.name||"";return P.a.createElement("div",{className:Object(K.a)("input-group",t&&"touched")},P.a.createElement("input",{ref:o,className:Object(K.a)("form-control",d&&"focus"),type:"text",id:e,value:i,autoComplete:"off",onClick:a,onFocus:a,onInput:l,onKeyDown:b}),P.a.createElement("label",null,u("Login.SelectCountry.Title")),n?P.a.createElement(fe.a,{color:"black"}):P.a.createElement("i",{onClick:a,className:Object(K.a)("css-icon-down",d&&"open")}))}},a.map(e=>P.a.createElement(se.a,{key:e.id,className:t&&e.id===t.id?"selected":"",onClick:f},P.a.createElement("span",{"data-country-id":e.id}),P.a.createElement("span",{className:"country-flag"},Object(ae.a)(e.flag,["hq_emoji"])),P.a.createElement("span",{className:"country-name"},e.name),P.a.createElement("span",{className:"country-code"},e.code))),!a.length&&P.a.createElement(se.a,{key:"no-results",className:"no-results",disabled:!0},P.a.createElement("span",null,u("lng_country_none"))))});let he=!1;var me=Object(P.h)(Object(o.h)(e=>{const{settings:{byKey:{language:t}}}=e;return{...Object(m.l)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),language:t}},(e,t)=>Object(m.l)(t,["setAuthPhoneNumber","setAuthRememberMe","clearAuthError","loadNearestCountry","goToAuthQrCode","setSettingOption"]))(({connectionState:e,authState:t,authPhoneNumber:n,authIsLoading:r,authIsLoadingQrCode:u,authError:o,authRememberMe:d,authNearestCountry:a,language:i,setAuthPhoneNumber:s,setAuthRememberMe:f,loadNearestCountry:l,clearAuthError:b,goToAuthQrCode:h,setSettingOption:m})=>{const p=Object(ee.a)(),g=Object(P.q)(null),y=ne(),v=te(y,"ContinueOnThisLanguage"),[O,j]=Object(P.r)(),[w,I]=Object(P.r)(),[C,E]=Object(P.r)(!1),[S,M]=Object(P.r)(),[A,k,T]=Object(B.a)(),N=O?`${O.code} ${w||""}`:w,D=N&&N.replace(/[^\d]+/g,"").length>=7;Object(P.n)(()=>{c.n||g.current.focus()},[O]),Object(P.n)(()=>{"connectionStateReady"!==e||a||l()},[e,a,l]),Object(P.n)(()=>{!a||O||C||j(Object(Z.d)(a))},[O,a,C]);const L=Object(P.m)(e=>{e.length||I("");const t=Object(Z.e)(e),n=!O||t&&t.id!==O.id||!t&&e.length?t:O;(!O||!n||n&&n.code!==O.code)&&j(n),I(Object(Z.b)(e,n))},[O]),x=Object(P.m)(()=>{k(),Object(X.d)(y,()=>{T(),m({language:y})})},[k,m,y,T]);Object(P.n)(()=>{void 0===w&&n&&L(n)},[n,w,L]),Object(P.o)(()=>{g.current&&S&&g.current.setSelectionRange(...S)},[S]);const F=Object(P.q)(!1),R=Object(P.m)(()=>{F.current=!0,requestAnimationFrame(()=>{F.current=!1})},[]),U=Object(P.m)(e=>{o&&b(),he||(he=!0,W(),Object($.g)(q));const{value:t,selectionStart:n,selectionEnd:r}=e.target;M(n&&r&&r<t.length?[n,r]:void 0),E(!0);const u=c.j&&O&&void 0!==N&&t.length-N.length>1&&!F.current;L(u?`${O.code} ${t}`:t)},[o,b,O,N,L]),_=Object(P.m)(e=>{f(e.target.checked)},[f]);const G="authorizationStateWaitPhoneNumber"===t;return P.a.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},P.a.createElement("div",{className:"auth-form"},P.a.createElement("div",{id:"logo"}),P.a.createElement("h2",null,"Telegram"),P.a.createElement("p",{className:"note"},p("StartText")),P.a.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),r||D&&s({phoneNumber:N})}},P.a.createElement(be,{id:"sign-in-phone-code",value:O,isLoading:!a&&!O,onChange:j}),P.a.createElement(oe.a,{ref:g,id:"sign-in-phone-number",label:p("Login.PhonePlaceholder"),value:N,error:o&&p(o),inputMode:"tel",onChange:U,onPaste:c.j?R:void 0}),P.a.createElement(ue.a,{id:"sign-in-keep-session",label:"Keep me signed in",checked:Boolean(d),onChange:_}),D&&(G?P.a.createElement(re.a,{type:"submit",ripple:!0,isLoading:r},p("Login.Next")):P.a.createElement(ce.a,null)),G&&P.a.createElement(re.a,{isText:!0,ripple:!0,isLoading:u,onClick:h},p("Login.QR.Login")),y&&y!==i&&v&&P.a.createElement(re.a,{isText:!0,isLoading:A,onClick:x},v))))})),pe=n(24);var ge=Object(P.h)(()=>{const e=Object(pe.a)(z.a.Auth,"AuthCode");return e?P.a.createElement(e,null):P.a.createElement(ce.a,null)});var ye=Object(P.h)(()=>{const e=Object(pe.a)(z.a.Auth,"AuthPassword");return e?P.a.createElement(e,null):P.a.createElement(ce.a,null)});var ve=Object(P.h)(()=>{const e=Object(pe.a)(z.a.Auth,"AuthRegister");return e?P.a.createElement(e,null):P.a.createElement(ce.a,null)});let Oe=null;class je{}je.render=function(e,t){Oe(e,t)},self.QrCreator=je,function(e){function t(t,n,r,u){var o={},c=e(r,n);c.u(t),c.J(),u=u||0;var d=c.h(),a=c.h()+2*u;return o.text=t,o.level=n,o.version=r,o.O=a,o.a=function(e,t){return t-=u,!(0>(e-=u)||e>=d||0>t||t>=d)&&c.a(e,t)},o}function n(e,t,n,r,u,o,c,d,a,i){function s(t,n,r,u,c,d,a){t?(e.lineTo(n+d,r+a),e.arcTo(n,r,u,c,o)):e.lineTo(n,r)}c?e.moveTo(t+o,n):e.moveTo(t,n),s(d,r,n,r,u,-o,0),s(a,r,u,t,u,0,-o),s(i,t,u,t,n,o,0),s(c,t,n,r,n,0,o)}function r(e,t,n,r,u,o,c,d,a,i){function s(t,n,r,u){e.moveTo(t+r,n),e.lineTo(t,n),e.lineTo(t,n+u),e.arcTo(t,n,t+r,n,o)}c&&s(t,n,o,o),d&&s(r,n,-o,o),a&&s(r,u,-o,-o),i&&s(t,u,o,-o)}function u(e,u){e:{var o=u.text,c=u.v,d=u.N,a=u.K,i=u.P;for(d=Math.max(1,d||1),a=Math.min(40,a||40);d<=a;d+=1)try{var s=t(o,c,d,i);break e}catch(e){}s=void 0}if(!s)return null;for(o=e.getContext("2d"),u.background&&(o.fillStyle=u.background,o.fillRect(u.left,u.top,u.size,u.size)),c=s.O,a=u.size/c,o.beginPath(),i=0;i<c;i+=1)for(d=0;d<c;d+=1){var f=o,l=u.left+d*a,b=u.top+i*a,h=i,m=d,p=s.a,g=l+a,y=b+a,v=h-1,O=h+1,j=m-1,w=m+1,I=Math.floor(Math.min(.5,Math.max(0,u.R))*a),C=p(h,m),E=p(v,j),S=p(v,m);v=p(v,w);var M=p(h,w);w=p(O,w),m=p(O,m),O=p(O,j),h=p(h,j),l=Math.round(l),b=Math.round(b),g=Math.round(g),y=Math.round(y),C?n(f,l,b,g,y,I,!S&&!h,!S&&!M,!m&&!M,!m&&!h):r(f,l,b,g,y,I,S&&h&&E,S&&M&&v,m&&M&&w,m&&h&&O)}return function(e,t){var n=t.fill;if("string"==typeof n)e.fillStyle=n;else{var r=n.type,u=n.colorStops;if(n=n.position.map(e=>Math.round(e*t.size)),"linear-gradient"===r)var o=e.createLinearGradient.apply(e,n);else{if("radial-gradient"!==r)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,n)}u.forEach(([e,t])=>{o.addColorStop(e,t)}),e.fillStyle=o}}(o,u),o.fill(),e}var o={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};Oe=function(e,t){var n={};Object.assign(n,o,e),n.N=n.minVersion,n.K=n.maxVersion,n.v=n.ecLevel,n.left=n.left,n.top=n.top,n.size=n.size,n.fill=n.fill,n.background=n.background,n.text=n.text,n.R=n.radius,n.P=n.quiet,t instanceof HTMLCanvasElement?(t.width===n.size&&t.height===n.size||(t.width=n.size,t.height=n.size),t.getContext("2d").clearRect(0,0,t.width,t.height),u(t,n)):((e=document.createElement("canvas")).width=n.size,e.height=n.size,n=u(e,n),t.appendChild(n))}}(function(){function e(u,c){function d(e,t){for(var n=-1;7>=n;n+=1)if(!(-1>=e+n||f<=e+n))for(var r=-1;7>=r;r+=1)-1>=t+r||f<=t+r||(s[e+n][t+r]=0<=n&&6>=n&&(0==r||6==r)||0<=r&&6>=r&&(0==n||6==n)||2<=n&&4>=n&&2<=r&&4>=r)}function a(e,n){for(var c=f=4*u+17,a=Array(c),h=0;h<c;h+=1){a[h]=Array(c);for(var m=0;m<c;m+=1)a[h][m]=null}for(s=a,d(0,0),d(f-7,0),d(0,f-7),c=r.G(u),a=0;a<c.length;a+=1)for(h=0;h<c.length;h+=1){m=c[a];var p=c[h];if(null==s[m][p])for(var g=-2;2>=g;g+=1)for(var y=-2;2>=y;y+=1)s[m+g][p+y]=-2==g||2==g||-2==y||2==y||0==g&&0==y}for(c=8;c<f-8;c+=1)null==s[c][6]&&(s[c][6]=0==c%2);for(c=8;c<f-8;c+=1)null==s[6][c]&&(s[6][c]=0==c%2);for(c=r.w(i<<3|n),a=0;15>a;a+=1)h=!e&&1==(c>>a&1),s[6>a?a:8>a?a+1:f-15+a][8]=h,s[8][8>a?f-a-1:9>a?15-a:14-a]=h;if(s[f-8][8]=!e,7<=u){for(c=r.A(u),a=0;18>a;a+=1)h=!e&&1==(c>>a&1),s[Math.floor(a/3)][a%3+f-8-3]=h;for(a=0;18>a;a+=1)h=!e&&1==(c>>a&1),s[a%3+f-8-3][Math.floor(a/3)]=h}if(null==l){for(e=o.I(u,i),c=function(){var e=[],t=0,n={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.m(1==(e>>>t-r-1&1))},f:function(){return t},m:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n}(),a=0;a<b.length;a+=1)h=b[a],c.put(4,4),c.put(h.b(),r.f(4,u)),h.write(c);for(a=h=0;a<e.length;a+=1)h+=e[a].j;if(c.f()>8*h)throw Error("code length overflow. ("+c.f()+">"+8*h+")");for(c.f()+4<=8*h&&c.put(0,4);0!=c.f()%8;)c.m(!1);for(;!(c.f()>=8*h)&&(c.put(236,8),!(c.f()>=8*h));)c.put(17,8);var v=0;for(h=a=0,m=Array(e.length),p=Array(e.length),g=0;g<e.length;g+=1){var O=e[g].j,j=e[g].o-O;for(a=Math.max(a,O),h=Math.max(h,j),m[g]=Array(O),y=0;y<m[g].length;y+=1)m[g][y]=255&c.B()[y+v];for(v+=O,y=r.C(j),O=t(m[g],y.b()-1).l(y),p[g]=Array(y.b()-1),y=0;y<p[g].length;y+=1)j=y+O.b()-p[g].length,p[g][y]=0<=j?O.c(j):0}for(y=c=0;y<e.length;y+=1)c+=e[y].o;for(c=Array(c),y=v=0;y<a;y+=1)for(g=0;g<e.length;g+=1)y<m[g].length&&(c[v]=m[g][y],v+=1);for(y=0;y<h;y+=1)for(g=0;g<e.length;g+=1)y<p[g].length&&(c[v]=p[g][y],v+=1);l=c}for(e=l,c=-1,a=f-1,h=7,m=0,n=r.F(n),p=f-1;0<p;p-=2)for(6==p&&--p;;){for(g=0;2>g;g+=1)null==s[a][p-g]&&(y=!1,m<e.length&&(y=1==(e[m]>>>h&1)),n(a,p-g)&&(y=!y),s[a][p-g]=y,-1==--h&&(m+=1,h=7));if(0>(a+=c)||f<=a){a-=c,c=-c;break}}}var i=n[c],s=null,f=0,l=null,b=[],h={u:function(t){t=function(t){var n=e.s(t);return{S:function(){return 4},b:function(){return n.length},write:function(e){for(var t=0;t<n.length;t+=1)e.put(n[t],8)}}}(t),b.push(t),l=null},a:function(e,t){if(0>e||f<=e||0>t||f<=t)throw Error(e+","+t);return s[e][t]},h:function(){return f},J:function(){for(var e=0,t=0,n=0;8>n;n+=1){a(!0,n);var u=r.D(h);(0==n||e>u)&&(e=u,t=n)}a(!1,t)}};return h}function t(e,n){if(void 0===e.length)throw Error(e.length+"/"+n);var r=function(){for(var t=0;t<e.length&&0==e[t];)t+=1;for(var r=Array(e.length-t+n),u=0;u<e.length-t;u+=1)r[u]=e[u+t];return r}(),o={c:function(e){return r[e]},b:function(){return r.length},multiply:function(e){for(var n=Array(o.b()+e.b()-1),r=0;r<o.b();r+=1)for(var c=0;c<e.b();c+=1)n[r+c]^=u.i(u.g(o.c(r))+u.g(e.c(c)));return t(n,0)},l:function(e){if(0>o.b()-e.b())return o;for(var n=u.g(o.c(0))-u.g(e.c(0)),r=Array(o.b()),c=0;c<o.b();c+=1)r[c]=o.c(c);for(c=0;c<e.b();c+=1)r[c]^=u.i(u.g(e.c(c))+n);return t(r,0).l(e)}};return o}e.s=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);128>r?t.push(r):2048>r?t.push(192|r>>6,128|63&r):55296>r||57344<=r?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t};var n={L:1,M:0,Q:3,H:2},r=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];return{w:function(t){for(var n=t<<10;0<=e(n)-e(1335);)n^=1335<<e(n)-e(1335);return 21522^(t<<10|n)},A:function(t){for(var n=t<<12;0<=e(n)-e(7973);)n^=7973<<e(n)-e(7973);return t<<12|n},G:function(e){return n[e-1]},F:function(e){switch(e){case 0:return function(e,t){return 0==(e+t)%2};case 1:return function(e){return 0==e%2};case 2:return function(e,t){return 0==t%3};case 3:return function(e,t){return 0==(e+t)%3};case 4:return function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3))%2};case 5:return function(e,t){return 0==e*t%2+e*t%3};case 6:return function(e,t){return 0==(e*t%2+e*t%3)%2};case 7:return function(e,t){return 0==(e*t%3+(e+t)%2)%2};default:throw Error("bad maskPattern:"+e)}},C:function(e){for(var n=t([1],0),r=0;r<e;r+=1)n=n.multiply(t([1,u.i(r)],0));return n},f:function(e,t){if(4!=e||1>t||40<t)throw Error("mode: "+e+"; type: "+t);return 10>t?8:16},D:function(e){for(var t=e.h(),n=0,r=0;r<t;r+=1)for(var u=0;u<t;u+=1){for(var o=0,c=e.a(r,u),d=-1;1>=d;d+=1)if(!(0>r+d||t<=r+d))for(var a=-1;1>=a;a+=1)0>u+a||t<=u+a||(0!=d||0!=a)&&c==e.a(r+d,u+a)&&(o+=1);5<o&&(n+=3+o-5)}for(r=0;r<t-1;r+=1)for(u=0;u<t-1;u+=1)o=0,e.a(r,u)&&(o+=1),e.a(r+1,u)&&(o+=1),e.a(r,u+1)&&(o+=1),e.a(r+1,u+1)&&(o+=1),(0==o||4==o)&&(n+=3);for(r=0;r<t;r+=1)for(u=0;u<t-6;u+=1)e.a(r,u)&&!e.a(r,u+1)&&e.a(r,u+2)&&e.a(r,u+3)&&e.a(r,u+4)&&!e.a(r,u+5)&&e.a(r,u+6)&&(n+=40);for(u=0;u<t;u+=1)for(r=0;r<t-6;r+=1)e.a(r,u)&&!e.a(r+1,u)&&e.a(r+2,u)&&e.a(r+3,u)&&e.a(r+4,u)&&!e.a(r+5,u)&&e.a(r+6,u)&&(n+=40);for(u=o=0;u<t;u+=1)for(r=0;r<t;r+=1)e.a(r,u)&&(o+=1);return n+Math.abs(100*o/t/t-50)/5*10}}}(),u=function(){for(var e=Array(256),t=Array(256),n=0;8>n;n+=1)e[n]=1<<n;for(n=8;256>n;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;255>n;n+=1)t[e[n]]=n;return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),o=function(){function e(e,r){switch(r){case n.L:return t[4*(e-1)];case n.M:return t[4*(e-1)+1];case n.Q:return t[4*(e-1)+2];case n.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];return{I:function(t,n){var r=e(t,n);if(void 0===r)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);t=r.length/3,n=[];for(var u=0;u<t;u+=1)for(var o=r[3*u],c=r[3*u+1],d=r[3*u+2],a=0;a<o;a+=1){var i=d,s={};s.o=c,s.j=i,n.push(s)}return n}}}();return e}());var we=QrCreator;var Ie=Object(P.h)(Object(o.h)(e=>{const{connectionState:t,authState:n,authQrCode:r,settings:{byKey:{language:u}}}=e;return{connectionState:t,authState:n,authQrCode:r,language:u}},(e,t)=>Object(m.l)(t,["returnToAuthPhoneNumber","setSettingOption"]))(({connectionState:e,authState:t,authQrCode:n,language:r,returnToAuthPhoneNumber:u,setSettingOption:o})=>{const c=ne(),d=Object(ee.a)(),a=Object(P.q)(null),i=te(c,"ContinueOnThisLanguage"),[s,f,l]=Object(B.a)();Object(P.n)(()=>{if(!n||"connectionStateReady"!==e)return;const t=a.current;t.innerHTML="",t.classList.remove("pre-animate"),we.render({text:"tg://login?token="+n.token,radius:.5,ecLevel:"M",fill:"#4E96D4",size:280},t)},[e,n]);const b=Object(P.m)(()=>{f(),Object(X.d)(c,()=>{l(),o({language:c})})},[f,o,c,l]),h="authorizationStateWaitQrCode"===t;return P.a.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},P.a.createElement("div",{className:"auth-form qr"},n?P.a.createElement("div",{key:"qr-container",className:"qr-container pre-animate",ref:a}):P.a.createElement("div",{key:"qr-loading",className:"qr-loading"},P.a.createElement(ce.a,null)),P.a.createElement("h3",null,d("Login.QR.Title")),P.a.createElement("ol",null,P.a.createElement("li",null,P.a.createElement("span",null,d("Login.QR.Help1"))),P.a.createElement("li",null,P.a.createElement("span",null,Object(ae.a)(d("Login.QR.Help2"),["simple_markdown"]))),P.a.createElement("li",null,P.a.createElement("span",null,d("Login.QR.Help3")))),h&&P.a.createElement(re.a,{isText:!0,onClick:u},d("Login.QR.Cancel")),c&&c!==r&&i&&P.a.createElement(re.a,{isText:!0,isLoading:s,onClick:b},i)))}));n(101);var Ce=Object(P.h)(Object(o.h)(e=>Object(m.l)(e,["authState"]),(e,t)=>Object(m.l)(t,["reset","initApi","returnToAuthPhoneNumber","goToAuthQrCode"]))(({authState:e,reset:t,initApi:n,returnToAuthPhoneNumber:r,goToAuthQrCode:u})=>{Object(P.n)(()=>{t(),n()},[t,n]);const o="iOS"===c.r||"Android"===c.r;switch(Object(R.a)(!o&&"authorizationStateWaitPhoneNumber"===e||o&&"authorizationStateWaitQrCode"===e,()=>{o?r():u()}),e){case"authorizationStateWaitCode":return P.a.createElement(Y,{page:"authCode",key:"authCode"},P.a.createElement(ge,null));case"authorizationStateWaitPassword":return P.a.createElement(Y,{page:"authPassword",key:"authPassword"},P.a.createElement(ye,null));case"authorizationStateWaitRegistration":return P.a.createElement(ve,null);case"authorizationStateWaitPhoneNumber":return P.a.createElement(Y,{page:"authPhoneNumber",key:"authPhoneNumber"},P.a.createElement(me,null));case"authorizationStateWaitQrCode":return P.a.createElement(Y,{page:"authQrCode",key:"authQrCode"},P.a.createElement(Ie,null));default:return o?P.a.createElement(Y,{page:"authPhoneNumber",key:"authPhoneNumber"},P.a.createElement(me,null)):P.a.createElement(Y,{page:"authQrCode",key:"authQrCode"},P.a.createElement(Ie,null))}}));var Ee=Object(P.h)(()=>{const e=Object(pe.a)(z.a.Main,"Main");return e?P.a.createElement(e,null):void 0}),Se=n.p+"app-inactive.bc7953c2dfebcabce2c43ca7dc778a89.png";n(102);var Me=()=>P.a.createElement("div",{id:"AppInactive"},P.a.createElement("div",{className:"content"},P.a.createElement("img",{src:Se,alt:""}),P.a.createElement("h3",{className:"title"},"Such error, many tabs"),P.a.createElement("div",{className:"description"},"Telegram supports only one active tab with the app.",P.a.createElement("br",null),"Please reload this page to continue using this tab or close it."),P.a.createElement("div",{className:"actions"},P.a.createElement(re.a,{isText:!0,ripple:!0,onClick:()=>{window.location.reload()}},"Reload app"))));function Ae(){return o.c.createElement(Y,{page:"main",key:"main"},o.c.createElement(Ee,null))}var ke=Object(o.h)(e=>Object(m.l)(e,["authState"]),(e,t)=>Object(m.l)(t,["disconnect"]))(({authState:e,disconnect:t})=>{const[n,r]=Object(B.a)(!1);if(Object(P.n)(()=>{Object(D.b)(),x=()=>{t(),document.title=`${u.pb}${u.L}`,r()}},[t,r]),n)return o.c.createElement(Me,null);if(e)switch(e){case"authorizationStateWaitPhoneNumber":case"authorizationStateWaitCode":case"authorizationStateWaitPassword":case"authorizationStateWaitRegistration":case"authorizationStateWaitQrCode":return o.c.createElement(Ce,null);case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":return Ae()}return Object(g.c)(!0)?Ae():o.c.createElement(Ce,null)});n(103);u.r&&console.log(">>> INIT"),Object(o.d)().init(),u.r&&console.log(">>> START INITIAL RENDER"),s.a.render(o.c.createElement(ke,null),document.getElementById("root")),u.r&&console.log(">>> FINISH INITIAL RENDER"),document.addEventListener("dblclick",()=>{console.log("GLOBAL STATE",Object(o.e)())})}]);
//# sourceMappingURL=main.af5bd185d96d3f084d63.js.map