mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-11 16:49:44 +01:00
2 lines
156 KiB
JavaScript
2 lines
156 KiB
JavaScript
!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:"c7f4f28275e328788ccd",1:"bce7f3da39f6893fff73",3:"09d14152f757897f56ab",4:"1197b4f2953ec8558e0c",5:"8b198e2023c3e5a16421",6:"2ec5f4dc466923e86279",7:"08a060819021f9e85a61",8:"cbd8e8109de9d8155148",9:"cd46dd3ea6f963de3131"}[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:"c7f4f28275e328788ccd",1:"bce7f3da39f6893fff73",3:"09d14152f757897f56ab",4:"1197b4f2953ec8558e0c",5:"8b198e2023c3e5a16421",6:"2ec5f4dc466923e86279",7:"08a060819021f9e85a61",8:"cbd8e8109de9d8155148",9:"cd46dd3ea6f963de3131"}[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=94)}([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 j})),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 M})),n.d(t,"k",(function(){return A})),n.d(t,"r",(function(){return k})),n.d(t,"n",(function(){return T})),n.d(t,"o",(function(){return P})),n.d(t,"p",(function(){return D})),n.d(t,"m",(function(){return L})),n.d(t,"q",(function(){return F})),n.d(t,"h",(function(){return x}));var r=n(1),u=n(9),o=n(3),c=n(23),d=n(21),a=n(30);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(O)}}(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&&I(e[t]);t--);return t+1<e.length?e.slice(0,t+1):e}function I(e){return!1===e||null==e}function O(e){return I(e)?{type:i.Empty}:p(e)?e:(t=e,{type:i.Text,value:String(t)});var t}const w={};function j(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.o){const t=e.name;w[t]||(w[t]={componentName:t,renderCount:0,renderTimes:[]}),r.q&&"TeactMemoWrapper"!==t&&"TeactNContainer"!==t&&console.log("[Teact] Render "+t),o=performance.now()}if(u=t(n),r.o){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=O(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.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 j(e),e.isMounted=!0,e.$element}function M(e){return m(e)?M(e.children[0]):e.target}function A(e,t){m(e)?A(e.children[0],t):e.target=t}function k(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.scheduleNextState&&o.forceUpdate||(o.scheduleNextState=Object(u.h)(()=>function(e){e.isMounted&&e.hooks.state.byCursor.forEach(e=>{e.value=e.nextValue})}(o)),o.forceUpdate=Object(u.i)(()=>function(e){if(!e.isMounted||!e.onUpdate)return;const t=e.$element;j(e),e.$element!==t&&e.onUpdate()}(o))),r.q&&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),o.scheduleNextState(),o.forceUpdate())})}),f.hooks.state.cursor++,[n[t].value,n[t].setter]}function N(e,t,n){const{cursor:r,byCursor:u}=f.hooks.effects,o=f,c=()=>{if(!o.isMounted)return;const{cleanup:e}=u[r];if("function"==typeof e)try{e()}catch(e){Object(d.a)(e)}u[r].cleanup=t()};void 0!==u[r]&&n&&u[r].dependencies?n.some((e,t)=>e!==u[r].dependencies[t])&&e(c):e(c),u[r]={effect:t,dependencies:n,cleanup:u[r]?u[r].cleanup:void 0},f.hooks.effects.cursor++}function T(e,t){return N(u.b,e,t)}function P(e,t){return N(u.d,e,t)}function D(e,t){const{cursor:n,byCursor:r}=f.hooks.memos;let{current:u}=r[n]||{};return(void 0===r[n]||t.some((e,t)=>e!==r[n].dependencies[t]))&&(u=e()),r[n]={current:u,dependencies:t},f.hooks.memos.cursor++,u}function L(e,t){return D(()=>e,t)}function F(e){return D(()=>({current:e}),[])}function x(e,t=c.a,n=!1){return function(u){const o=F(u),d=F();return(!d.current||o.current&&!t(o.current,u))&&(r.o&&n&&console.log(`[Teact.memo] ${e.name}: 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,"db",(function(){return r})),n.d(t,"D",(function(){return u})),n.d(t,"f",(function(){return o})),n.d(t,"o",(function(){return c})),n.d(t,"q",(function(){return d})),n.d(t,"E",(function(){return a})),n.d(t,"p",(function(){return i})),n.d(t,"C",(function(){return s})),n.d(t,"z",(function(){return f})),n.d(t,"A",(function(){return l})),n.d(t,"y",(function(){return b})),n.d(t,"B",(function(){return h})),n.d(t,"L",(function(){return m})),n.d(t,"M",(function(){return p})),n.d(t,"N",(function(){return g})),n.d(t,"O",(function(){return y})),n.d(t,"l",(function(){return v})),n.d(t,"F",(function(){return I})),n.d(t,"X",(function(){return w})),n.d(t,"T",(function(){return j})),n.d(t,"U",(function(){return C})),n.d(t,"V",(function(){return E})),n.d(t,"h",(function(){return S})),n.d(t,"j",(function(){return M})),n.d(t,"i",(function(){return A})),n.d(t,"mb",(function(){return k})),n.d(t,"W",(function(){return N})),n.d(t,"x",(function(){return T})),n.d(t,"Q",(function(){return P})),n.d(t,"P",(function(){return D})),n.d(t,"eb",(function(){return L})),n.d(t,"Bb",(function(){return F})),n.d(t,"a",(function(){return x})),n.d(t,"e",(function(){return B})),n.d(t,"d",(function(){return R})),n.d(t,"r",(function(){return U})),n.d(t,"t",(function(){return _})),n.d(t,"u",(function(){return G})),n.d(t,"v",(function(){return $})),n.d(t,"jb",(function(){return W})),n.d(t,"ib",(function(){return H})),n.d(t,"Z",(function(){return K})),n.d(t,"Y",(function(){return z})),n.d(t,"cb",(function(){return V})),n.d(t,"bb",(function(){return q})),n.d(t,"ab",(function(){return Y})),n.d(t,"I",(function(){return J})),n.d(t,"c",(function(){return Q})),n.d(t,"tb",(function(){return Z})),n.d(t,"ub",(function(){return X})),n.d(t,"ob",(function(){return ee})),n.d(t,"pb",(function(){return te})),n.d(t,"wb",(function(){return ne})),n.d(t,"sb",(function(){return re})),n.d(t,"xb",(function(){return ue})),n.d(t,"yb",(function(){return oe})),n.d(t,"vb",(function(){return ce})),n.d(t,"zb",(function(){return de})),n.d(t,"qb",(function(){return ae})),n.d(t,"rb",(function(){return ie})),n.d(t,"R",(function(){return se})),n.d(t,"S",(function(){return fe})),n.d(t,"nb",(function(){return le})),n.d(t,"H",(function(){return be})),n.d(t,"k",(function(){return he})),n.d(t,"fb",(function(){return me})),n.d(t,"hb",(function(){return pe})),n.d(t,"gb",(function(){return ge})),n.d(t,"lb",(function(){return ye})),n.d(t,"b",(function(){return ve})),n.d(t,"g",(function(){return Ie})),n.d(t,"K",(function(){return Oe})),n.d(t,"J",(function(){return we})),n.d(t,"kb",(function(){return je})),n.d(t,"G",(function(){return Ce})),n.d(t,"Ab",(function(){return Ee})),n.d(t,"w",(function(){return Se})),n.d(t,"m",(function(){return Me})),n.d(t,"n",(function(){return Ae})),n.d(t,"s",(function(){return ke}));const r="Telegram",u=" [Inactive]",o="Telegram WebZ alpha c2d6c5e",c=!1,d=!1,a=!1,i="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",s="GramJs:sessionId",f=!1,l="tt-global-state",b=30,h=5e3,m=!1,p="tt-media",g="tt-media-avatars",y="tt-media-progressive",v="tt-custom-bg",I="tt-lang-packs",O=(new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),"undefined"!=typeof window&&window.innerHeight>=900),w=1,j=750,C=O?60:40,E=2*C,S=72,M=O?30:25,A=100,k=42,N=42,T=20,P=30,D=200,L=500,F=25,x=!1,B=2,R=B,U=16,_=1e4,G="editable-message-text",$="editable-message-text-modal",W=1440,H=1150,K=1275,z=925,V=600,q=950,Y=450,J=1e9,Q=100,Z=13,X=11,ee=160,te=120,ne=64,re=48,ue=32,oe=64,ce=64,de=160,ae=140,ie=80,se="MEMOJI_STICKER",fe=200,le=450,be=450,he="image/png,image/gif,image/jpeg,video/mp4,video/avi,video/quicktime",me="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)",pe=/^(?:https?:\/\/)?(?:t\.me\/)([\d\w_]+)(?:\/([\d]+))?$/gm,ge=/^(?:https?:\/\/)?(?:t\.me\/joinchat\/)([\d\w_]+)?$/gm,ye=777e3,ve=0,Ie=1,Oe=10,we=5,je=2147483646,Ce=["android","ios"],Ee="TelegramTips",Se="https://bugs.telegram.org/?tag_ids=41&sort=time",Me="#0F0F0F",Ae="#0a0a0a8c",ke="rgba(90, 110, 70, 0.6)"},function(e,t,n){"use strict";n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return v})),n.d(t,"d",(function(){return I})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return w})),n.d(t,"f",(function(){return j})),n.d(t,"h",(function(){return C}));var r=n(0),u=n(1),o=n(34),c=n(25),d=n(9),a=n(23),i=n(3),s=n(21);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.o&&(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(y,m)}}catch(e){return void Object(s.a)(e)}u.o&&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.q&&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.o){const t=performance.now()-e;t>7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],m={},p=new Map;const g=Object(d.i)((function(){h.forEach(e=>e(l))}));function y(e){"object"==typeof e&&e!==l&&(l=e,g())}function v(){return l}function I(){return m}function O(e,t){b[e]||(b[e]=[],m[e]=t=>{!function(e,t){b[e]&&b[e].forEach(e=>{const n=e(l,m,t);n&&y(n)})}(e,t)}),b[e].push(t)}function w(e){h.push(e)}function j(e){const t=h.indexOf(e);-1!==t&&h.splice(t,1)}function C(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(y,m)}}catch(e){Object(s.a)(e)}}return r.a.createElement(n,f({},h.mappedProps,d))}}u.o&&(window.getGlobal=v,document.addEventListener("dblclick",()=>{console.log("GLOBAL CONTAINERS",Object(i.k)(Object.values(p),"DEBUG_updates","desc"))}))},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,"Y",(function(){return r.b})),n.d(t,"Z",(function(){return r.c})),n.d(t,"ab",(function(){return r.d})),n.d(t,"xb",(function(){return r.g})),n.d(t,"pb",(function(){return r.e})),n.d(t,"wb",(function(){return r.f})),n.d(t,"Db",(function(){return r.h})),n.d(t,"X",(function(){return r.a})),n.d(t,"lb",(function(){return u.w})),n.d(t,"kb",(function(){return u.v})),n.d(t,"ib",(function(){return u.t})),n.d(t,"nb",(function(){return u.y})),n.d(t,"jb",(function(){return u.u})),n.d(t,"ob",(function(){return u.z})),n.d(t,"m",(function(){return u.j})),n.d(t,"U",(function(){return u.p})),n.d(t,"l",(function(){return u.i})),n.d(t,"g",(function(){return u.e})),n.d(t,"h",(function(){return u.f})),n.d(t,"f",(function(){return u.d})),n.d(t,"mb",(function(){return u.x})),n.d(t,"gb",(function(){return u.r})),n.d(t,"q",(function(){return u.m})),n.d(t,"yb",(function(){return u.A})),n.d(t,"e",(function(){return u.c})),n.d(t,"c",(function(){return u.a})),n.d(t,"J",(function(){return u.o})),n.d(t,"k",(function(){return u.h})),n.d(t,"j",(function(){return u.g})),n.d(t,"hb",(function(){return u.s})),n.d(t,"d",(function(){return u.b})),n.d(t,"Bb",(function(){return u.C})),n.d(t,"Ab",(function(){return u.B})),n.d(t,"p",(function(){return u.l})),n.d(t,"o",(function(){return u.k})),n.d(t,"fb",(function(){return u.q})),n.d(t,"I",(function(){return u.n})),n.d(t,"Cb",(function(){return u.D})),n.d(t,"A",(function(){return s})),n.d(t,"zb",(function(){return f})),n.d(t,"F",(function(){return l})),n.d(t,"M",(function(){return b})),n.d(t,"R",(function(){return h})),n.d(t,"N",(function(){return m})),n.d(t,"x",(function(){return p})),n.d(t,"K",(function(){return g})),n.d(t,"n",(function(){return y})),n.d(t,"tb",(function(){return v})),n.d(t,"ub",(function(){return I})),n.d(t,"qb",(function(){return O})),n.d(t,"db",(function(){return w})),n.d(t,"vb",(function(){return j})),n.d(t,"eb",(function(){return C})),n.d(t,"V",(function(){return E})),n.d(t,"W",(function(){return S})),n.d(t,"sb",(function(){return M})),n.d(t,"rb",(function(){return A})),n.d(t,"v",(function(){return T})),n.d(t,"cb",(function(){return P})),n.d(t,"G",(function(){return D})),n.d(t,"O",(function(){return L})),n.d(t,"t",(function(){return F})),n.d(t,"u",(function(){return x})),n.d(t,"L",(function(){return B})),n.d(t,"y",(function(){return R})),n.d(t,"H",(function(){return U})),n.d(t,"z",(function(){return _})),n.d(t,"P",(function(){return G})),n.d(t,"Q",(function(){return $})),n.d(t,"E",(function(){return W})),n.d(t,"D",(function(){return H})),n.d(t,"C",(function(){return z})),n.d(t,"B",(function(){return V})),n.d(t,"b",(function(){return Y})),n.d(t,"i",(function(){return J})),n.d(t,"S",(function(){return Q})),n.d(t,"T",(function(){return Z})),n.d(t,"bb",(function(){return X})),n.d(t,"s",(function(){return ee})),n.d(t,"w",(function(){return te})),n.d(t,"r",(function(){return ne})),n.d(t,"a",(function(){return re}));var r=n(27),u=n(28),o=n(5),c=n(1),d=n(59);const a="The message is not supported on this version of Telegram",i=new RegExp(c.fb,"i");function s(e){const{chatId:t,id:n}=e;return`msg${t}-${n}`}function f(e){const t=e.match(/^msg(-?\d+)-(\d+)/);return{chatId:Number(t[1]),messageId:Number(t[2])}}function l(e){return e.previousLocalId||e.id}function b(e,t=!1){const{text:n,photo:r,video:u,audio:o,voice:c,document:d,sticker:i,contact:s,poll:f,invoice:l}=e.content;if(e.groupedId)return n?`${t?"":"🖼 "}${n.text}`:"Album";if(r)return n?`${t?"":"🖼 "}${n.text}`:"Photo";if(u)return u.isGif?n?`${t?"":"GIF "}${n.text}`:"GIF":n?`${t?"":"📹 "}${n.text}`:"Video";if(i)return i.emoji+" Sticker";if(o){const e=[o.title,o.performer].filter(Boolean).join(" — ")||n&&n.text;return e?"🎧 "+e:"Audio"}return c?n?`${t?"":"🎤 "}${n.text}`:"Voice Message":d?`${t?"":"📎 "}${n?n.text:d.fileName}`:s?"Contact":f?"📊 "+f.summary.question:l?"Invoice":n?n.text:a}function h(e){const{text:t,photo:n,video:r,audio:u,voice:o,document:c,sticker:d,contact:i,poll:s,invoice:f}=e.content;if(e.groupedId)return"🖼 "+(t?t.text:"Album");if(n)return"🖼 "+(t?t.text:"Photo");if(r)return"📹 "+(t?t.text:r.isGif?"GIF":"Video");if(d)return d.emoji+" Sticker ";if(u){return"🎧 "+([u.title,u.performer].filter(Boolean).join(" — ")||t&&t.text||"Audio")}return o?"🎤 "+(t?t.text:"Voice Message"):c?"📎 "+(t?t.text:c.fileName):i?"Contact":s?"📊 "+s.summary.question:f?"Invoice":t?t.text:a}function m(e){const{text:t,sticker:n,photo:r,video:u,audio:o,voice:c,document:d,poll:i,webPage:s,contact:f,invoice:l}=e.content;return t?t.text:n||r||u||o||c||d||f||i||s||l?void 0:a}function p(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 g(e){const{text:t}=e.content;if(t&&t.text.length<=6&&1===p(e))return t.text}function y(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(i)),!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(i)}}if(!n&&t&&(n=t.text.match(i)),n)return{url:n[0],domain:n[3]}}function v(e){return e.isOutgoing}function I(e){return Boolean(e.replyToMessageId)}function O(e){return Boolean(e.forwardInfo)}function w(e){return!!e.content.action}function j(e){return e.chatId===c.lb&&M(e)}function C(e){return Boolean(e.senderId)&&e.senderId<0&&v(e)}function E(e){return e.id>0?Object(r.c)(e):Object(u.i)(e)}function S(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function M(e){return e.id>=c.I}function A(e){return e.content.action&&"historyClear"===e.content.action.type}var k=n(8),N=n(55);function T(e){return e.content}function P(e){return Boolean(D(e)||L(e)||R(e)||B(e)||function(e){return e.content.contact}(e)||U(e)||F(e)||x(e)||function(e){return e.content.voice}(e))}function D(e){return e.content.photo}function L(e){return e.content.video}function F(e){return e.content.action}function x(e){return e.content.audio}function B(e){return e.content.sticker}function R(e){return e.content.document}function U(e){return e.content.poll}function _(e){return e.content.invoice}function G(e){return e.content.webPage}function $(e){const t=G(e);return t?t.photo:void 0}function W(e){const t=function(e){const t=D(e)||L(e)||R(e)||B(e)||$(e);if(t)return t.thumbnail}(e);return t?t.dataUri:void 0}function H(e,t){const{photo:n,video:r,sticker:u,audio:o,voice:c,document:d}=e.content,a=$(e);if(!(n||r||u||a||o||c||d))return;const i=s(e);if(n||a)switch(t){case"micro":case"pictogram":return i+"?size=m";case"inline":if(q(e))return;return i+"?size=x";case"viewerPreview":return i+"?size=x";case"viewerFull":return i+"?size=z"}if(r)switch(t){case"micro":case"pictogram":return i+"?size=m";case"inline":if(q(e))return;return Y(r)?K(r,i):i+"?size=z";case"viewerPreview":return i+"?size=m";case"viewerFull":return K(r,i);case"download":return i+"?download"}if(d)switch(t){case"micro":case"pictogram":case"inline":if(!Object(N.c)(d)||q(e))return;return i+"?size=m";default:return i}if(u)switch(t){case"micro":return;case"pictogram":return i+"?size=m";default:return i}if(o)switch(t){case"micro":case"pictogram":return;default:return K(o,i)}if(c)switch(t){case"micro":case"pictogram":return;default:return i}}function K(e,t){return k.h&&k.i?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function z(e,t){const{sticker:n,video:r,audio:u,voice:c}=e.content;return n&&"inline"===t&&n.isAnimated?o.ApiMediaFormat.Lottie:r&&k.h&&("viewerFull"===t||"inline"===t&&Y(r))?o.ApiMediaFormat.Progressive:u||c?c&&!k.g?o.ApiMediaFormat.BlobUrl:o.ApiMediaFormat.Progressive:o.ApiMediaFormat.BlobUrl}function V(e){const{photo:t,video:n,webPage:r}=e.content;return t||r&&r.photo?`photo${e.date}.jpeg`:n?n.fileName:void 0}function q(e){const{photo:t,video:n,document:r}=e.content;return t&&t.blobUrl||n&&n.blobUrl||r&&r.previewBlobUrl}function Y(e){return e.isGif||e.isRound||e.size<=10485760}function J(e,t,n=!1){const r=te(e,t,"media");return n?r.reverse():r}function Q(e){return e.sizes.find(e=>"z"===e.type)||e.sizes.find(e=>"y"===e.type)||Z(e)}function Z(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 X(e){if(e.width&&e.height)return e}function ee(e,t,n=!1){const r=M(e);return{isUploading:r,isTransferring:r||n,transferProgress:Number(t)}}function te(e,t,n){let r;switch(n){case"media":r=e=>{const t=L(e);return D(e)||t&&!t.isRound&&!t.isGif};break;case"documents":r=R;break;case"links":r=e=>G(e)||function(e){const{text:t}=e.content,n=t&&t.text.match(i);if(n)return{url:n[0],domain:n[3]}}(e);break;case"audio":r=x;break;default:return[]}return t.reduce((t,n)=>(e[n]&&r(e[n])&&t.push(n),t),[])}function ne(e){const{audio:t,voice:n,video:r}=T(e),u=t||n||r;if(u)return u.duration}function re(e,t){return`${e}_${t}`}n(56)},function(e,t,n){"use strict";var r=n(63);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(64);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(65);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(66);n.o(c,"ApiMediaFormat")&&n.d(t,"ApiMediaFormat",(function(){return c.ApiMediaFormat}));var d=n(67);n.d(t,"ApiMediaFormat",(function(){return d.a}));n(68),n(69)},function(e,t,n){"use strict";n.d(t,"S",(function(){return Te})),n.d(t,"kb",(function(){return Pe})),n.d(t,"V",(function(){return De})),n.d(t,"Db",(function(){return a})),n.d(t,"f",(function(){return i})),n.d(t,"o",(function(){return s})),n.d(t,"O",(function(){return f})),n.d(t,"N",(function(){return l})),n.d(t,"xb",(function(){return b})),n.d(t,"n",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"K",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"L",(function(){return y})),n.d(t,"j",(function(){return v})),n.d(t,"i",(function(){return I})),n.d(t,"M",(function(){return O})),n.d(t,"h",(function(){return w})),n.d(t,"q",(function(){return j})),n.d(t,"y",(function(){return N})),n.d(t,"r",(function(){return T})),n.d(t,"m",(function(){return P})),n.d(t,"nb",(function(){return D})),n.d(t,"X",(function(){return F})),n.d(t,"db",(function(){return x})),n.d(t,"x",(function(){return B})),n.d(t,"Eb",(function(){return R})),n.d(t,"gb",(function(){return U})),n.d(t,"lb",(function(){return _})),n.d(t,"ob",(function(){return G})),n.d(t,"jb",(function(){return $})),n.d(t,"C",(function(){return W})),n.d(t,"E",(function(){return H})),n.d(t,"B",(function(){return K})),n.d(t,"bb",(function(){return z})),n.d(t,"zb",(function(){return V})),n.d(t,"F",(function(){return q})),n.d(t,"Ab",(function(){return Y})),n.d(t,"Bb",(function(){return J})),n.d(t,"yb",(function(){return Q})),n.d(t,"a",(function(){return Z})),n.d(t,"W",(function(){return X})),n.d(t,"k",(function(){return ee})),n.d(t,"mb",(function(){return te})),n.d(t,"D",(function(){return ne})),n.d(t,"l",(function(){return re})),n.d(t,"H",(function(){return ue})),n.d(t,"T",(function(){return oe})),n.d(t,"cb",(function(){return ce})),n.d(t,"qb",(function(){return de})),n.d(t,"J",(function(){return ae})),n.d(t,"b",(function(){return ie})),n.d(t,"e",(function(){return se})),n.d(t,"Cb",(function(){return fe})),n.d(t,"ib",(function(){return le})),n.d(t,"G",(function(){return be})),n.d(t,"Q",(function(){return he})),n.d(t,"p",(function(){return me})),n.d(t,"R",(function(){return pe})),n.d(t,"U",(function(){return ge})),n.d(t,"I",(function(){return ye})),n.d(t,"Z",(function(){return ve})),n.d(t,"P",(function(){return Ie})),n.d(t,"pb",(function(){return Oe})),n.d(t,"ab",(function(){return we})),n.d(t,"rb",(function(){return je})),n.d(t,"sb",(function(){return Ce})),n.d(t,"tb",(function(){return Ee})),n.d(t,"t",(function(){return Le})),n.d(t,"A",(function(){return Se})),n.d(t,"w",(function(){return Me})),n.d(t,"v",(function(){return Ae})),n.d(t,"Y",(function(){return ke})),n.d(t,"u",(function(){return Ne})),n.d(t,"z",(function(){return E})),n.d(t,"s",(function(){return S})),n.d(t,"ub",(function(){return M})),n.d(t,"vb",(function(){return A})),n.d(t,"c",(function(){return k})),n.d(t,"eb",(function(){return Fe})),n.d(t,"fb",(function(){return xe})),n.d(t,"hb",(function(){return Be})),n.d(t,"wb",(function(){return Re}));var r=n(19),u=n(8),o=n(5),c=n(1),d=n(4);function a(e,t){return e.users.byId[t]}function i(e,t){return e.chats.byId[t]}function s(e,t){const n=Object(d.U)(t);return!!n&&a(e,n)}function f(e,t){return t===e.currentUserId}function l(e,t){const n=s(e,t);return n&&Object(d.wb)(n)}function b(e){return Object.values(e.chats.byId).find(({isSupport:e})=>e)}function h(e,t){if(!Object(d.lb)(t.id)&&!Object(d.jb)(t)&&t.fullInfo)return t.fullInfo.members&&t.fullInfo.members.length!==c.P?t.fullInfo.members.reduce((t,{userId:n})=>e.users.byId[n]&&Object(d.xb)(e.users.byId[n])&&n!==e.currentUserId?t+1:t,0):t.fullInfo.onlineCount}function m(e,t){const n=i(e,t),r=n&&Object(d.U)(n),u=r&&a(e,r);if(u&&Object(d.wb)(u))return u}function p(e,t){const n=i(e,t),r=m(e,t);if(!n||!r)return!1;if(n.lastMessage&&Object(d.rb)(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 g(e){return Boolean(e.chats.listIds.active)}function y(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 v(e,t){const n=i(e,t);if(n&&y(e,t))return n.folderId===c.g?"archived":"active"}function I(e,t){return e.chatFolders.byId[t]}function O(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.g)return!!u&&u.includes(t);const{byId:o}=e.chatFolders,{pinnedChatIds:d}=o[n]||{};return!!d&&d.includes(t)}function w(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find(e=>e.username&&e.username.toLowerCase()===n)}function j(e){const t=e.chats.listIds.active;if(!t)return 0;const n=e.chats.byId;return t.reduce((e,t)=>{const r=n[t];return r&&r.unreadCount&&!r.isMuted?e+r.unreadCount:e},0)}var C=n(3);function E(e){return e.stickers.search}function S(e){return e.gifs.search}function M(e,t){return e.stickers.setsById[t]}function A(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 k(e,t){const{animatedEmojis:n}=e;if(n&&n.stickers)return t=t.replace("️",""),n.stickers.find(e=>e.emoji===t)}function N(e){const{messageLists:t}=e.messages;if(t&&t.length)return t[t.length-1]}function T(e){const{chatId:t}=N(e)||{};return t?i(e,t):void 0}function P(e,t){const n=e.messages.byChatId[t];return n?n.byId:void 0}function D(e,t){const n=e.scheduledMessages.byChatId[t];return n?n.byId:void 0}function L(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 F(e,t,n){return L(e,t,n,"listedIds")}function x(e,t,n){return L(e,t,n,"outlyingIds")}function B(e,t,n,r){switch(r){case"thread":return R(e,t,n);case"pinned":return U(e,t);case"scheduled":return _(e,t)}}function R(e,t,n){return L(e,t,n,"viewportIds")}function U(e,t){return L(e,t,o.MAIN_THREAD_ID,"pinnedIds")}function _(e,t){return L(e,t,o.MAIN_THREAD_ID,"scheduledIds")}function G(e,t,n){return L(e,t,n,"scrollOffset")}function $(e,t,n){return L(e,t,n,"replyingToId")}function W(e,t,n){return L(e,t,n,"editingId")}function H(e,t){return L(e,t,o.MAIN_THREAD_ID,"editingScheduledId")}function K(e,t,n){return L(e,t,n,"draft")}function z(e,t,n){return L(e,t,n,"noWebPage")}function V(e,t,n){return L(e,t,n,"threadInfo")}function q(e,t,n){return L(e,t,n,"firstMessageId")}function Y(e,t,n){if(n===o.MAIN_THREAD_ID)return i(e,t);const r=V(e,t,n);return r?i(e,r.originChannelId||t):void 0}function J(e,t,n){if(n===o.MAIN_THREAD_ID)return;const r=V(e,t,n);return r?r.topMessageId:void 0}function Q(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 Z(e,t,n){const r=N(e);if(!r)return!1;const{threadInfo:u}=Q(e,t,n)||{};return t===r.chatId&&(r.threadId===o.MAIN_THREAD_ID||u&&r.threadId===u.threadId)}function X(e,t,n){const r=R(e,t,n);if(!r||!r.length)return!0;let u;if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n||!n.lastMessage)return!0;u=n.lastMessage.id}else{const r=V(e,t,n);if(!r||!r.lastMessageId)return;u=r.lastMessageId}return u>=c.I&&!ee(e,t,u)||r[r.length-1]>=u}function ee(e,t,n){const r=P(e,t);return r?r[n]:void 0}function te(e,t,n){const r=D(e,t);return r?r[n]:void 0}function ne(e,t,n,r){if("scheduled"===r){const n=H(e,t);return n?te(e,t,n):void 0}{const r=W(e,t,n);return r?ee(e,t,r):void 0}}function re(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 ue(e,t){const{chatId:n,messageId:r}=e.focusedMessage||{};return n===t?r:void 0}function oe(e,t){const n=ue(e,t.chatId);return!!n&&(n===t.id||n===t.previousLocalId)}function ce(e,t,n=!1){return function(e,t){const{lastReadOutboxMessageId:n}=i(e,t.chatId)||{};return Object(d.sb)(t)||!n||n<t.id}(e,t)||n?Object(d.W)(t):"read"}function de(e,t){const{senderId:n}=t;if(n)return n>0?a(e,n):i(e,n)}function ae(e,t){const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?i(e,n.fromChatId):n.senderUserId?a(e,n.senderUserId):void 0}function ie(e,t,n){const r=i(e,t.chatId);if(!r||r.isRestricted)return{};const u=Object(d.lb)(r.id),o=f(e,t.chatId),c=Object(d.ib)(r),a=Object(d.nb)(r),s=Object(d.jb)(r),l=Object(d.vb)(t),b=Object(d.tb)(t),h=Object(d.db)(t),{content:m}=t,p=(o||Date.now()-1e3*t.date<1728e5)&&!(m.sticker||m.contact||m.poll||m.action||m.audio||m.video&&m.video.isRound)&&!Object(d.qb)(t)&&!t.viaBotId,g=Object(d.e)(r,n)&&!l,y=u||r.isCreator||!s&&!Object(d.yb)(r,"pinMessages")||Object(d.q)(r,"pinMessages");let v=!h&&y,I=!1;const O=U(e,r.id);v&&(I=Boolean(O&&O.includes(t.id)),v=!I);const w=u||b||c||r.isCreator||Object(d.q)(r,"deleteMessages"),j=w&&!l&&(u&&!o||c&&(b||Object(d.q)(r,"deleteMessages"))),C=!h&&p&&(b||s&&(r.isCreator||Object(d.q)(r,"editMessages"))),E=!h&&!l,S=Boolean(t.content.sticker),M=S&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some(({id:e})=>e===t.id)}(e,t.content.sticker),A=!h&&S&&!M,k=!h&&M,N=!h,T=!h&&(s||a),P=!h;return{noOptions:[g,C,v,I,w,j,E,A,k,N,T,P].every(e=>!e),canReply:g,canEdit:C,canPin:v,canUnpin:I,canDelete:w,canDeleteForAll:j,canForward:E,canFaveSticker:A,canUnfaveSticker:k,canCopy:N,canCopyLink:T,canSelect:P}}function se(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=N(e)||{},u=n&&P(e,n);if(!u||!t||!r)return{};const o=t.map(t=>u[t]&&ie(e,u[t],r)).filter(Boolean);return{canDelete:o.every(e=>e.canDelete),canDeleteForAll:o.every(e=>e.canDeleteForAll)}}function fe(e,t){const n=e.fileUploads.byMessageLocalId[t.previousLocalId||t.id];return n?n.progress:void 0}function le(e,t,n){if(n===o.MAIN_THREAD_ID){const n=i(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return n.lastMessage?Object(d.sb)(n.lastMessage)?n.lastMessage.id:Math.min(n.lastMessage.id,n.lastReadInboxMessageId):n.lastReadInboxMessageId}{const r=V(e,t,n);if(!r)return;return r.lastReadInboxMessageId?r.lastMessageId?Math.min(r.lastReadInboxMessageId,r.lastMessageId):r.lastReadInboxMessageId:r.topMessageId}}function be(e,t,n){if(n===o.MAIN_THREAD_ID){if(!i(e,t))return}else{const r=V(e,t,n);if(!r||r.lastMessageId===r.lastReadInboxMessageId)return}const r=x(e,t,n),u=F(e,t,n),c=P(e,t);if(!c||!r&&!u)return;const d=le(e,t,n);if(r){const e=r.find(e=>!d||e>d&&c[e]&&(!c[e].isOutgoing||c[e].isFromScheduled));if(e)return e}if(u){const e=u.find(e=>!d||e>d&&c[e]&&(!c[e].isOutgoing||c[e].isFromScheduled));if(e)return e}}function he(e){const{forwardMessages:t}=e;return Boolean(t.isModalShown)}function me(e,t){const n=Object.values(e.chats.byId).find(e=>Object(d.ob)(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=i(e,Number(n));return u&&Object(d.ob)(u)&&r[u.id].byId[t]}))}function pe(e){const{selectedMessages:t}=e;return Boolean(t)}function ge(e,t){const{messageIds:n}=e.selectedMessages||{};return!!n&&n.includes(t)}function ye(e,t,n){const r=P(e,t);if(r)return Object.values(r).filter(e=>e.groupedId===n&&e.forwardInfo).map(({forwardInfo:e})=>e.fromMessageId)}function ve(e,t,n){const r=P(e,t);if(r)return Object.keys(r).map(Number).filter(e=>r[e].groupedId===n)}function Ie(e,t,n){const{messageIds:r}=e.selectedMessages||{};if(!r)return!1;const u=ve(e,t,n);return u&&u.every(e=>r.includes(e))}function Oe(e){const{messageIds:t}=e.selectedMessages||{};return t?t.length:0}function we(e,t){const n=i(e,t);if(!n)return;if(!l(e,n))return;const r=P(e,t),u=R(e,t,o.MAIN_THREAD_ID);if(!r||!u)return;const c=Object(C.g)(u,e=>!r[e].isOutgoing&&Boolean(r[e].keyboardButtons)),d=Object(C.g)(u,e=>Boolean(r[e].shouldHideKeyboardButtons));return c&&d&&d>c?void 0:c?r[c]:void 0}function je(e,t,n,r){const{shouldAutoDownloadMediaFromContacts:u,shouldAutoDownloadMediaInPrivateChats:o,shouldAutoDownloadMediaInGroups:c,shouldAutoDownloadMediaInChannels:a}=e.settings.byKey;return Boolean(o&&Object(d.lb)(n.id)||c&&Object(d.kb)(n)||a&&Object(d.jb)(n)||u&&r&&(r.id===e.currentUserId||function(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}(e,r)))}function Ce(e,t){const n=Object(d.O)(t);if(!n)return;const{shouldAutoPlayVideos:r,shouldAutoPlayGifs:u}=e.settings.byKey,o=n.isGif||n.isRound;return r&&!o||u&&o}function Ee(e){return e.settings.byKey.shouldLoopStickers}function Se(e){const{chatId:t,threadId:n}=N(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 Me(e){const{byChatId:t}=e.localMediaSearch,{chatId:n}=N(e)||{},r=e.users.selectedId;return r&&t[r]?r:n}function Ae(e){const t=Me(e);if(t)return e.localMediaSearch.byChatId[t]}function ke(e,t){return e.management.byChatId[t]}function Ne(e){const{chatId:t,threadId:n}=N(e)||{};if(!t||!n)return;if(Object(d.lb)(t))return"user";const r=i(e,t);return r?Object(d.kb)(r)?"group":"channel":void 0}function Te(e){const{mediaViewer:t}=e;return Boolean(t.messageId||t.avatarOwnerId)}function Pe(e){const{users:t,isChatInfoShown:n}=e,o=function(e){const{pollResults:t}=e;return Boolean(t.messageId)}(e),c=Boolean(!u.f&&Se(e)),d=function(e){const{chatId:t,threadId:n}=N(e)||{};if(!t||!n)return;const r=e.management.byChatId[t];return r&&r.isActive?r:void 0}(e),a=void 0!==E(e).query,i=void 0!==S(e).query,{chatId:s}=N(e)||{},f=t.selectedId,l=g(e),b=Boolean(f&&l),h=Boolean(s&&l)&&n;return o?r.l.PollResults:c?r.l.Search:d?r.l.Management:a?r.l.StickerSearch:i?r.l.GifSearch:b?r.l.UserInfo:h?r.l.ChatInfo:void 0}function De(e){return void 0!==Pe(e)}function Le(e){return e.globalSearch.query}function Fe(e){return e.payment.messageId}function xe(e){return e.payment.formId}function Be(e){return e.payment.nativeParams?e.payment.nativeParams.publishableKey:void 0}function Re(e){return e.payment.stripeCredentials}},function(e,t,n){"use strict";t.a=(...e)=>e.filter(Boolean).join(" ")},function(e,t,n){"use strict";n.d(t,"n",(function(){return u})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"i",(function(){return a})),n.d(t,"k",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"l",(function(){return f})),n.d(t,"c",(function(){return l})),n.d(t,"j",(function(){return b})),n.d(t,"h",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return p})),n.d(t,"m",(function(){return g})),n.d(t,"o",(function(){return v}));var r=n(1);const u=function(){const{userAgent:e,platform:t}=window.navigator;let n;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="Mac OS":-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}(),o="Mac OS"===u,c="iOS"===u,d="Android"===u,a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=window.matchMedia("(pointer: coarse)").matches,s=window.innerWidth<=r.cb||window.innerWidth<=r.bb&&window.innerHeight<=r.ab,f=navigator.mediaDevices&&"getUserMedia"in navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext),l=(document.documentElement.style,u&&(o||c)),b="serviceWorker"in navigator,h=b,m=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),p=window.devicePixelRatio||1,g=!0;let y;function v(){return Boolean(y)}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=>{y=e})},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 a(h,e)}function c(e){return a(m,e)}function d(e){return a(i,e)}function a(e,t){let n,r=!1;return(...u)=>{n=u,r||(r=!0,e(()=>{r=!1,t(...n)}))}}function i(e){Promise.resolve().then(e)}function s(e){self.requestIdleCallback?self.requestIdleCallback(e):i(e)}n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return u})),n.d(t,"i",(function(){return o})),n.d(t,"h",(function(){return c})),n.d(t,"j",(function(){return d})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return h}));const f=e=>new Promise(t=>{setTimeout(()=>t(),e)});function l(){return new Promise(e=>{requestAnimationFrame(e)})}let b;function h(e,t=!1){b?t?b.unshift(e):b.push(e):(b=[e],requestAnimationFrame(()=>{const e=b;b=void 0,e.forEach(e=>e())}))}function m(e){return h(e,!0)}},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(73),u=n.n(r),o=n(1),c=n(25);let d;const a=new Map,i=new Map;function s(e,t=""){return d||(o.o&&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.o&&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,"a",(function(){return y})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return j}));var r=n(1),u=n(13),o=n(10);var c=n(3),d=n.p+"en-extra.e73049da90714ecdae3233e8ffa74d39.json",a=n.p+"es-extra.b80575cdf988e1a7e3a915abe97f63b4.json",i=n.p+"it-extra.78e5568451a888818c7e2209e05a9602.json",s=n.p+"pl-extra.38fd67a6c26e58f5c912568332c7c074.json",f=n.p+"ru-extra.5761b75bfbe92bb46eb8bba9acbdbb4c.json",l=n(46);const b={en:d,es:a,it:i,pl:s,ru:f},h=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],m={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},p=new Map;let g;const{addCallback:y,removeCallback:v,runCallbacks:I}=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 O;async function w(e,t){if(g&&e===O)return document.documentElement.lang=e,void(t&&t());const n=await async function(e){const t=await u.c(r.F,e,u.a.Json);if(t)return t;const n=await Object(o.a)("fetchLangPack",{sourceLangPacks:r.G,langCode:e});if(n)return await u.d(r.F,e,n.langPack),n.langPack;return}(e);if(n){if(b[e])try{const t=await fetch(b[e]),r=await t.json(),u=Object(c.i)(r,(e,t)=>({key:t,value:e}));Object.assign(n,u)}catch(e){r.o&&console.error(e)}p.clear(),O=e,g=n,document.documentElement.lang=e,t&&t(),I(g)}}function j(e,t,n){if(void 0!==t){const r=p.get(`${e}_${t}_${n}`);if(r)return r}if(!g)return e;const r=g[e];if(!r)return e;const u=r["number"==typeof t?function(e){const t=O&&m[O]?m[O](e):0;return h[t]}(t):"value"];if(!u||!u.trim()){const t=e.split(".");return t[t.length-1]}if(void 0!==t){const r=function(e,t){return e.replace(/%\d?\$?[sdf@]/,String(t))}(u,"i"===n?Object(l.a)(t):t);return p.set(`${e}_${t}_${n}`,r),r}return u}},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(1);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,97));break;case u.Main:r.o&&console.log(">>> START LOAD MAIN BUNDLE"),o[u.Main]=Promise.all([n.e(0),n.e(4)]).then(n.bind(null,95));break;case u.Extra:o[u.Extra]=Promise.all([n.e(0),n.e(3)]).then(n.bind(null,96))}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";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),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),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";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(9);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.e)(2e3),new Promise((e,n)=>{t.onseeked=()=>{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";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=/(?:\u2624|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\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\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\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\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\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\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\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\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\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\u2764\ufe0f\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\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|\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|\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-\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(20);n(86);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(12),o=n(34);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";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 Caledonia\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";let r,u,o,c,d,a,i,s,f,l,b,h;n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"m",(function(){return o})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"l",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"a",(function(){return s})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return l})),n.d(t,"k",(function(){return b})),n.d(t,"i",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"g",(function(){return p})),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.FoldersIncludedChats=28]="FoldersIncludedChats",e[e.FoldersExcludedChats=29]="FoldersExcludedChats",e[e.TwoFaDisabled=30]="TwoFaDisabled",e[e.TwoFaNewPassword=31]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=32]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=33]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=34]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=35]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=36]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=37]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=38]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=39]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=40]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=41]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=42]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=43]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=44]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=45]="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"}(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.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList"}(b||(b={})),function(e){e[e.ShippingInfo=0]="ShippingInfo",e[e.Shipping=1]="Shipping",e[e.PaymentInfo=2]="PaymentInfo",e[e.Checkout=3]="Checkout"}(h||(h={}));const m="UPLOADING_WALLPAPER_SLUG";let p;!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"}(p||(p={}))},function(e,t,n){"use strict";var r=n(0),u=n(7);n(82);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 a}));var r=n(1),u=n(9);window.addEventListener("error",d),window.addEventListener("unhandledrejection",d);const o=Date.now();let c=!1;function d(e){e.preventDefault(),a(e instanceof ErrorEvent?e.error:e.reason)}Object(u.g)(window.alert,1e3);function a(e){if(console.error(e),!c){if(Date.now()-o<=5e3){if(localStorage.getItem(r.A))localStorage.removeItem(r.A);else{if(!localStorage.getItem(r.C))return;localStorage.removeItem(r.C)}return c=!0,void window.location.reload()}0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),u=n(15),o=n(1),c=n(8),d=n(60),a=n(7),i=n(70),s=n(53);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)||[],...t.match(g)||[]];if(!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)):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 y(e,"jsx");case"simple_markdown_html":return y(e,"html")}var o,c;return e},[e])}function h(e,t,n){return c.c?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.fb,"ig"),g=/@[\w\d_-]+/gi;function y(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";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.filter(n=>e[n]!==t[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),u=n(7);n(80);t.a=({children:e,className:t,onClick:n})=>{const o=Object(r.m)(e=>{e.preventDefault(),n(e)},[n]);return r.a.createElement("a",{href:"#",className:Object(u.a)("Link",t),onClick:n?o: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 b})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return p}));var r=n(10),u=n(62),o=n(1),c=n(2),d=n(4),a=n(6),i=n(8);function s(e){const t=e.toJSON();return JSON.stringify({endpoint:t.endpoint,keys:t.keys})}function f(){return!!i.j&&("showNotification"in ServiceWorkerRegistration.prototype?"denied"===Notification.permission?(o.o&&console.warn("[PUSH] The user has blocked push notifications."),!1):"PushManager"in window||(o.o&&console.warn("[PUSH] Push messaging isn't supported."),!1):(o.o&&console.warn("[PUSH] Push notifications aren't supported."),!1))}async function l(e){const t=Object(c.e)(),n=Object(c.d)();if(e)try{const t=s(e);return await Object(r.a)("unregisterDevice",t),await e.unsubscribe(),void n.deleteDeviceToken()}catch(e){o.o&&console.log("[PUSH] Unable to unsubscribe from push.",e)}t.push&&(await Object(r.a)("unregisterDevice",t.push.deviceToken),n.deleteDeviceToken())}async function b(){if(!f())return;const e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();await l(t)}async function h(){if(await async function(){"Notification"in window&&(["granted","denied"].includes(Notification.permission)||await Notification.requestPermission())}(),!f())return;const e=await navigator.serviceWorker.ready;let t=await e.pushManager.getSubscription();if(function(e){const t=Object(c.e)();return!t.push||!e||(s(e)!==t.push.deviceToken||Date.now()-t.push.subscribedAt>432e5)}(t)){await l(t);try{t=await e.pushManager.subscribe({userVisibleOnly:!0});const n=s(t);o.o&&console.log("[PUSH] Received push subscription: ",n),await Object(r.a)("registerDevice",n),Object(c.d)().setDeviceToken(n)}catch(e){"denied"===Notification.permission?o.o&&console.warn("[PUSH] The user has blocked push notifications."):o.o&&console.log("[PUSH] Unable to subscribe to push.",e)}}}async function m({chat:e,message:t,isActiveChat:n}){if(!("Notification"in window?"denied"!==Notification.permission||(o.o&&console.warn("[PUSH] The user has blocked push notifications."),0):(o.o&&console.warn("[PUSH] This browser does not support desktop notification"),0)))return;if(!t.id)return;if(!await async function(e,t){if(e.isMuted)return!1;if(t&&document.hasFocus())return!1;await Object(c.d)().loadNotificationsSettings();const n=Object(c.e)();switch(e.type){case"chatTypePrivate":case"chatTypeSecret":return Boolean(n.settings.byKey.hasPrivateChatsNotifications);case"chatTypeBasicGroup":case"chatTypeSuperGroup":return Boolean(n.settings.byKey.hasGroupNotifications);case"chatTypeChannel":return Boolean(n.settings.byKey.hasBroadcastNotifications)}return!1}(e,n))return;const{title:r,body:i}=function(e,t){const n=Object(c.e)(),{senderId:r,replyToMessageId:o}=t,i=r?Object(a.Db)(n,r):void 0,s=Object(d.t)(t),f=s&&o?Object(a.k)(n,e.id,o):void 0,{targetUserId:l,targetChatId:b}=s||{},h=l?Object(a.Db)(n,l):void 0,m=Object(d.U)(e),p=m?Object(a.Db)(n,m):void 0;let g;if(Object(d.db)(t)){const n=e&&(Object(d.jb)(e)||t.senderId===t.chatId)?e:i;g=Object(u.a)(t,n,h,f,b,{asPlain:!0})}else{const n=Object(d.I)(e.id,i),r=Object(d.R)(t);g=n?`${n}: ${r}`:r}return{title:Object(d.l)(e,p),body:g}}(e,t);if(f())navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({type:"newMessageNotification",payload:{title:r,body:i,chatId:e.id,messageId:t.id}});else{const n=Object(c.d)(),u=new Notification(r,{body:i,icon:"icon-192x192.png",badge:"icon-192x192.png",tag:t.id.toString(),vibrate:[200,100,200]});u.onclick=()=>{u.close(),n.focusMessage({chatId:e.id,messageId:t.id}),window.focus&&window.focus()}}}function p(){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(1),u=n(33),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){if(e.id===r.lb)return t("ServiceNotifications").toLowerCase();if(e.type&&"userTypeBot"===e.type)return"bot";if(!e.status)return"";switch(e.status.type){case"userStatusEmpty":return t("ALongTimeAgo");case"userStatusLastMonth":return t("WithinAMonth");case"userStatusLastWeek":return t("WithinAWeek");case"userStatusOffline":{const{wasOnline:n}=e.status;if(!n)return t("LastSeen.Offline");const r=new Date,o=new Date(1e3*n);if(o>=r)return t("LastSeen.JustNow");const c=new Date(r.getTime()-o.getTime());if(c.getTime()/1e3<60)return t("LastSeen.JustNow");if(c.getTime()/1e3<3600){return t("LastSeen.MinutesAgo",Math.floor(c.getTime()/1e3/60))}const d=new Date;if(d.setHours(0,0,0,0),o>d){if(c.getTime()/1e3<21600){return t("LastSeen.HoursAgo",Math.floor(c.getTime()/1e3/60/60))}return t("LastSeen.TodayAt",Object(u.h)(o))}const a=new Date;return a.setDate(r.getDate()-1),d.setHours(0,0,0,0),o>a?t("LastSeen.YesterdayAt",Object(u.h)(o)):t("LastSeen.AtDate",Object(u.b)(o))}case"userStatusOnline":return t("Online");case"userStatusRecently":return t("Lately");default:return}}function s(e){const{id:t,status:n,type:u}=e;return!!n&&(t!==r.lb&&("userStatusOnline"===n.type&&"userTypeBot"!==u))}function f(e){return!(!e.status||"userTypeBot"===e.type||e.id===r.lb)&&("userTypeDeleted"===e.type||"userTypeUnknown"===e.type)}function l(e){return"userTypeBot"===e.type}function b(e,t,n){return Object(o.k)(e,e=>{const r=Date.now()/1e3;if(n&&n.includes(e))return r+172800-(n.length-n.indexOf(e));const u=t[e];if(!u||!u.status)return 0;if("userStatusOnline"===u.status.type)return u.status.expires;if("userStatusOffline"===u.status.type&&u.status.wasOnline)return u.status.wasOnline;switch(u.status.type){case"userStatusRecently":return r-86400;case"userStatusLastWeek":return r-604800;case"userStatusLastMonth":return r-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 a})),n.d(t,"v",(function(){return i})),n.d(t,"t",(function(){return s})),n.d(t,"y",(function(){return f})),n.d(t,"u",(function(){return l})),n.d(t,"z",(function(){return b})),n.d(t,"j",(function(){return h})),n.d(t,"p",(function(){return m})),n.d(t,"i",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"x",(function(){return I})),n.d(t,"r",(function(){return O})),n.d(t,"m",(function(){return w})),n.d(t,"A",(function(){return j})),n.d(t,"c",(function(){return C})),n.d(t,"a",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"h",(function(){return M})),n.d(t,"g",(function(){return A})),n.d(t,"s",(function(){return k})),n.d(t,"b",(function(){return N})),n.d(t,"C",(function(){return T})),n.d(t,"B",(function(){return P})),n.d(t,"l",(function(){return D})),n.d(t,"k",(function(){return L})),n.d(t,"q",(function(){return F})),n.d(t,"n",(function(){return x})),n.d(t,"D",(function(){return B}));var r=n(5),u=n(1),o=n(3),c=n(27),d=n(11);function a(e){return e>0}function i(e){return s(e)||f(e)}function s(e){return"chatTypeBasicGroup"===e.type}function f(e){return"chatTypeSuperGroup"===e.type}function l(e){return"chatTypeChannel"===e.type}function b(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function h(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function m(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function p(e,t,n=!1){return n||t&&e.id===t.id&&t.isSelf?Object(d.b)("SavedMessages"):e.title||Object(d.b)("HiddenName")}function g(e){if(e.fullInfo)return e.fullInfo.about}function y(e){const{username:t}=e,{inviteLink:n}=e.fullInfo||{};return n&&n.length?n:t?"t.me/"+t:""}function v(e,t="normal"){if(e.avatarHash)switch(t){case"big":return`profile${e.id}?${e.avatarHash}`;default:return`avatar${e.id}?${e.avatarHash}`}}function I(e){return!e.lastMessage}function O(e){return Boolean(e.adminRights)}function w(e,t){return!!e.adminRights&&e.adminRights[t]}function j(e,t){return Boolean(e.currentUserBannedRights&&e.currentUserBannedRights[t]||e.defaultBannedRights&&e.defaultBannedRights[t])}function C(e,t){return t!==r.MAIN_THREAD_ID||!(e.isRestricted||e.migratedTo||e.isNotJoined)&&(!!e.isCreator||(!!a(e.id)||(l(e)?w(e,"postMessages"):O(e)||!j(e,"sendMessages"))))}function E(e,t=!1){if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1};const n=O(e);return{canAttachMedia:n||!j(e,"sendMedia"),canAttachPolls:(n||!j(e,"sendPolls"))&&(!a(e.id)||t),canSendStickers:n||!j(e,"sendStickers"),canSendGifs:n||!j(e,"sendGifs"),canAttachEmbedLinks:n||!j(e,"embedLinks")}}function S(e){return e.currentUserBannedRights&&e.currentUserBannedRights.sendMessages?"You are not allowed to send messages in this chat.":e.defaultBannedRights&&e.defaultBannedRights.sendMessages?"Sending messages is not allowed in this chat.":void 0}function M(e){if(e&&e.fullInfo)return e.fullInfo.slowMode}function A(e){return Math.max(e.joinDate||0,e.lastMessage?e.lastMessage.date:0)}function k(e){return e.folderId===u.g}function N(e){return s(e)||(f(e)||l(e))&&e.isCreator}function T(e,t,n,r){const u=n.excludedChatIds?new Set(n.excludedChatIds):void 0,o=n.excludedChatIds?new Set(n.includedChatIds):void 0,c=n.excludedChatIds?new Set(n.pinnedChatIds):void 0;return[(r||Object.keys(e).map(Number)).filter(r=>function(e,t,n,r,u,o){if(r&&r.has(e.id))return!1;if(u&&u.has(e.id))return!0;if(o&&o.has(e.id))return!0;if(k(e)&&t.excludeArchived)return!1;if(e.isMuted&&t.excludeMuted)return!1;if(!e.unreadCount&&!e.unreadMentionsCount&&!e.hasUnreadMark&&t.excludeRead)return!1;if(a(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(i(e))return!!t.groups;if(l(e))return!!t.channels}return!1}(e[r],n,t,u,o,c)),n.pinnedChatIds]}function P(e,t,n,r="all"){function u(e){if(!e||!e.lastMessage||e.migratedTo)return!1;switch(r){case"all":if(k(e))return!1;break;case"archived":if(!k(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,A,"desc")}}function D(e,t,n,r){const[u]=T(e,t,n,r),o=u.map(t=>e[t]).filter(e=>e&&e.lastMessage&&!e.isRestricted&&!e.isNotJoined);return{unreadDialogsCount:o.reduce((e,t)=>t.unreadCount||t.hasUnreadMark?e+1:e,0),hasActiveDialogs:o.some(e=>e.unreadMentionsCount||!e.isMuted&&(e.unreadCount||e.hasUnreadMark))}}function L(e,t,n,r,u){const{id:o,title:c,emoticon:d,description:a,pinnedChatIds:i,excludedChatIds:s,includedChatIds:f,excludeArchived:l,excludeMuted:b,excludeRead:h,...m}=n;if(Object.values(m).filter(Boolean).length>1||s&&s.length||f&&f.length){return u("Chats",function(e,t,n,r){const[u,o]=T(e,t,n,r),{pinnedChats:c,otherChats:d}=P(e,u,o,"folder");return c.length+d.length}(e,t,n,r))}return m.bots?u("FilterBots"):m.groups?u("FilterGroups"):m.channels?u("FilterChannels"):m.contacts?u("FilterContacts"):m.nonContacts?u("FilterNonContacts"):void 0}function F(e){return!!e&&e.id<0}function x(e,t){if(t&&!a(e))return t.isSelf?"You":Object(c.b)(t)}function B(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()+(r.length-r.indexOf(e))),o},"desc")}},function(e,t,n){"use strict";var r=n(0),u=n(7),o=n(20),c=n(38);n(84);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:I,ariaLabel:O,href:w,download:j,disabled:C,ripple:E,faded:S,tabIndex:M})=>{let A=Object(r.q)(null);e&&(A=e);const[k,N]=Object(r.r)(!1),T=Object(u.a)("Button",m,b,h,p&&"round",g&&"pill",y&&"fluid",C&&"disabled",v&&"text",I&&"loading",E&&"has-ripple",S&&"faded",k&&"clicked"),P=Object(r.m)(e=>{!C&&n&&n(e),N(!0),setTimeout(()=>{N(!1)},400)},[C,n]),D=Object(r.m)(e=>{e.preventDefault(),!C&&a&&a(e)},[a,C]);return w?r.a.createElement("a",{ref:A,className:T,href:w,title:O,download:j,tabIndex:M},l,!C&&E&&r.a.createElement(c.a,null)):r.a.createElement("button",{ref:A,type:t,className:T,onClick:P,onContextMenu:d,onMouseDown:D,onMouseEnter:i&&!C?i:void 0,onMouseLeave:s&&!C?s:void 0,onFocus:f&&!C?f:void 0,"aria-label":O,title:O,tabIndex:M},I?r.a.createElement("div",null,r.a.createElement("span",null,"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 a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return b}));var r=n(1);const u=new Set(["scroll","mouseenter","mouseleave"]),o={},c=new Map,d={};function a(e,t,n){const r=s(t,e);f(r,e)?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]++}(r,e,n):e.addEventListener(r,n)}function i(e,t,n){const r=s(t,e);f(r,e)?l(r,e):e.removeEventListener(r,n)}function s(e,t){const n=e.replace(/^on/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function f(e,t){return!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.o&&document.addEventListener("dblclick",()=>{console.log("DELEGATED EVENTS",{delegationRegistry:o,delegatedEventsByElement:c,documentEventCounters: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(7);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=Boolean(i.current),b=e||l;return{shouldRender:b,transitionClassNames:Object(u.a)(o&&"opacity-transition",o,s&&"open",b&&"shown",l&&"closing")}}},function(e,t,n){"use strict";n.d(t,"j",(function(){return d})),n.d(t,"k",(function(){return a})),n.d(t,"n",(function(){return i})),n.d(t,"h",(function(){return f})),n.d(t,"g",(function(){return l})),n.d(t,"b",(function(){return b})),n.d(t,"f",(function(){return h})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return y})),n.d(t,"i",(function(){return v})),n.d(t,"a",(function(){return I})),n.d(t,"l",(function(){return w})),n.d(t,"m",(function(){return j}));var r=n(11);const u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["January","February","March","April","May","June","July","August","September","October","November","December"],c=o.map(e=>e.toLowerCase());function d(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function a(e){return d(e).getTime()}function i(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function s(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function f(e){const t="number"==typeof e?new Date(e):e;return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function l(e){const t="number"==typeof e?new Date(e):e,n=d(new Date);if(t>=n)return f(t);const o=new Date(n);if(o.setDate(n.getDate()-7),t>=o)return Object(r.b)("Weekday.Short"+u[t.getDay()]);const c=t.getFullYear()!==n.getFullYear();return p(t,Object(r.b)(c?"formatDateScheduleYear":"formatDateSchedule")||(c?"d MMM yyyy":"d MMM"))}function b(e){return p("number"==typeof e?new Date(e):e,Object(r.b)("formatterYearMax")||"dd.MM.yyyy")}function h(e,t=!1){return p(e,Object(r.b)(t?"formatterMonthYear2":"formatterMonthYear")||"MMM yyyy")}function m(e,t=!1,n=!1){const o="number"==typeof e?new Date(e):e,c=d(new Date);if(!n){if(s(o)===s(c))return(t?C:E)(Object(r.b)("Weekday.Today"));const e=new Date(c);if(e.setDate(c.getDate()-1),s(o)===s(e))return(t?C:E)(Object(r.b)("Weekday.Yesterday"));const n=new Date(c),d=new Date(c);if(n.setDate(c.getDate()-7),d.setDate(c.getDate()+7),o>=n&&o<=d){const e=u[o.getDay()];return t?C(Object(r.b)("Weekday.Short"+e)):E(Object(r.b)("Weekday."+e))}}const a=o.getFullYear()!==c.getFullYear(),i=t?a?"formatDateScheduleYear":"formatDateSchedule":a?"chatFullDate":"chatDate";return(t?C:E)(p(o,Object(r.b)(i)||"d MMMM yyyy"))}function p(e,t){const n=e.getDate(),u=e.getMonth();return t.replace("LLLL",Object(r.b)(o[u])).replace("MMMM",Object(r.b)("Month.Gen"+o[u])).replace("MMM",Object(r.b)("Month.Short"+o[u])).replace("MM",String(u+1).padStart(2,"0")).replace("dd",String(n).padStart(2,"0")).replace("d",String(n)).replace("yyyy",String(e.getFullYear()))}function g(e){const t="number"==typeof e?new Date(e):e;return`${m(t,!0)}, ${f(t)}`}function y(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 v(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 I(e){return e.toLocaleString("en-US",{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 w(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(" "),o=t?u[0]:u[1],d=(t?u[1]:u[0]).toLowerCase(),a=c.findIndex(e=>e.startsWith(d));return-1!==a&&O(Number(o),a)?`${String(a+1).padStart(2,"0")}-${String(o).padStart(2,"0")}`:void 0}function j(e){return e+86400}function C(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function E(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";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-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-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","#21212140"],"--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-active":["#C8EBBC","#4F4A9F"],"--color-accent-own":["#4FAE4E","#FFFFFF"],"--color-message-meta-own":["#4FAE4EFF","#FFFFFF88"],"--color-own-links":["#52A1EF","#FFFFFF"],"--color-code-own":["#3C7940","#FFFFFF"]}')},function(e,t,n){"use strict";var r=n(0),u=n(7);n(89);t.a=e=>{const{icon:t,className:n,children:o,onClick:c,href:d,download:a,disabled:i,destructive:s,ariaLabel:f}=e,l=Object(r.m)(e=>{if(i||!c)return e.stopPropagation(),void e.preventDefault();c(e)},[i,c]),b=Object(r.m)(e=>{if(13===e.keyCode||32===e.keyCode)return i||!c?(e.stopPropagation(),void e.preventDefault()):void c(e)},[i,c]),h=Object(u.a)("MenuItem",n,i&&"disabled",s&&"destructive"),m=r.a.createElement(r.a.Fragment,null,t&&r.a.createElement("i",{className:"icon-"+t}),o);return d?r.a.createElement("a",{tabIndex:0,className:h,href:d,download:a,"aria-label":f,title:f,target:"_blank",rel:"noopener noreferrer"},m):r.a.createElement("div",{role:"button",tabIndex:0,className:h,onClick:l,onKeyDown:b,"aria-label":f,title:f},m)}},function(e,t,n){"use strict";var r=n(0),u=n(9);n(83);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";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return l}));var r=n(76),u=n.n(r),o=n(8),c=n(14),d=n(9);let a,i;const s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";async function f(e,t){for(b();!i.wasmReady;)await Object(d.e)(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.o)()||"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);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,"q",(function(){return o})),n.d(t,"G",(function(){return c})),n.d(t,"r",(function(){return d})),n.d(t,"F",(function(){return a})),n.d(t,"K",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"I",(function(){return f})),n.d(t,"H",(function(){return l})),n.d(t,"L",(function(){return m})),n.d(t,"v",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return I})),n.d(t,"J",(function(){return O})),n.d(t,"cb",(function(){return w})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return C})),n.d(t,"T",(function(){return E})),n.d(t,"bb",(function(){return S})),n.d(t,"f",(function(){return A})),n.d(t,"x",(function(){return k})),n.d(t,"ib",(function(){return N})),n.d(t,"jb",(function(){return T})),n.d(t,"t",(function(){return P})),n.d(t,"N",(function(){return D})),n.d(t,"M",(function(){return L})),n.d(t,"l",(function(){return F})),n.d(t,"E",(function(){return x})),n.d(t,"m",(function(){return B})),n.d(t,"gb",(function(){return R})),n.d(t,"fb",(function(){return U})),n.d(t,"O",(function(){return _})),n.d(t,"p",(function(){return G})),n.d(t,"hb",(function(){return $})),n.d(t,"n",(function(){return W})),n.d(t,"w",(function(){return K})),n.d(t,"lb",(function(){return z})),n.d(t,"mb",(function(){return V})),n.d(t,"e",(function(){return q})),n.d(t,"db",(function(){return Y})),n.d(t,"k",(function(){return J})),n.d(t,"P",(function(){return Z})),n.d(t,"Q",(function(){return X})),n.d(t,"S",(function(){return ee})),n.d(t,"R",(function(){return te})),n.d(t,"W",(function(){return ue})),n.d(t,"s",(function(){return oe})),n.d(t,"X",(function(){return ce})),n.d(t,"V",(function(){return ae})),n.d(t,"U",(function(){return ie})),n.d(t,"Z",(function(){return fe})),n.d(t,"Y",(function(){return le})),n.d(t,"u",(function(){return be})),n.d(t,"ab",(function(){return he})),n.d(t,"a",(function(){return me})),n.d(t,"o",(function(){return pe})),n.d(t,"kb",(function(){return ge})),n.d(t,"eb",(function(){return ye})),n.d(t,"C",(function(){return ve})),n.d(t,"A",(function(){return Ie})),n.d(t,"y",(function(){return Oe})),n.d(t,"D",(function(){return we})),n.d(t,"z",(function(){return je})),n.d(t,"B",(function(){return Ce})),n.d(t,"g",(function(){return Ee})),n.d(t,"h",(function(){return Se}));var r=n(1),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],a=n.isMin&&c&&!c.isMin,i={...c,...a?Object(u.j)(n,["isMin","accessHash"]):n,...r&&{photos:[r,...c.photos||[]]}};return i.id&&i.type?d(e,{...o,[t]:i}):e}function i(e,t){return Object.keys(t).forEach(n=>{e=a(e,Number(n),t[Number(n)])}),e}function s(e,t){const{byId:n}=e.chats;return Object.keys(t).map(Number).forEach(r=>{(!n[r]||n[r].isMin&&!t[r].isMin)&&(e=a(e,r,t[r]))}),e}function f(e,t,n){const u=n===r.g?"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=a(e={...e,chats:{...e.chats,listIds:o}},t,{folderId:n||void 0})}function l(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 b=n(5),h=n(6);function m(e,t,n=b.MAIN_THREAD_ID,r="thread"){return{...e,messages:{...e.messages,messageLists:t?[{chatId:t,threadId:n,type:r}]:void 0}}}function p(e,t,n){return g(e,t,{byId:n})}function g(e,t,n){const r=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...r,...n}}}}}function y(e,t,n,r,u){return function(e,t,n,r){const u=e.messages.byChatId[t];return g(e,t,{threadsById:{...u&&u.threadsById,[n]:{...u&&u.threadsById[n],...r}}})}(e,t,n,{[r]:u})}function v(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=I(e,t,n[t])}),e}function I(e,t,n){const r=Object(h.m)(e,t);return r&&Object.keys(n).every(e=>Boolean(r[Number(e)]))?e:p(e,t,{...n,...r})}function O(e,t,n,r){const u=Object(h.m)(e,t)||{},o={...u[n],...r};return o.id?p(e,t,{...u,[n]:o}):e}function w(e,t,n,r){const u=Object(h.nb)(e,t)||{},o={...u[n],...r};return o.id?P(e,t,{...u,[n]:o},void 0):e}function j(e,t,n){const r=Object(h.m)(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=>{let u=Object(h.X)(e,t,r),o=Object(h.db)(e,t,r),c=Object(h.Eb)(e,t,r),d=Object(h.gb)(e,t);n.forEach(e=>{u&&u.includes(e)&&(u=u.filter(t=>t!==e)),o&&o.includes(e)&&(o=o.filter(t=>t!==e)),c&&c.includes(e)&&(c=c.filter(t=>t!==e)),d&&d.includes(e)&&(d=d.filter(t=>t!==e))}),e=y(e,t,r,"listedIds",u),e=y(e,t,r,"outlyingIds",o),e=y(e,t,r,"viewportIds",c),e=y(e,t,r,"pinnedIds",d)}),c.length){const n=Object(h.y)(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(h.k)(e,o,c);r&&u===c&&(e=m(e,t)),d&&(e=O(e,o,c,{threadInfo:void 0}))})}return e=p(e,t,o)}function C(e,t,n){const r=Object(h.nb)(e,t);if(!r)return e;const o=Object(u.j)(r,n);let c=Object(h.lb)(e,t);return c&&(n.forEach(e=>{c.includes(e)&&(c=c.filter(t=>t!==e))}),e=y(e,t,b.MAIN_THREAD_ID,"scheduledIds",c)),e=P(e,t,o,void 0)}function E(e,t,n,r){const u=Object(h.X)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:y(e,t,n,"listedIds",M([...u||[],...o]))}function S(e,t,n,r){const u=Object(h.db)(e,t,n),o=u&&u.length?r.filter(e=>!u.includes(e)):r;return u&&!o.length?e:y(e,t,n,"outlyingIds",M([...u||[],...o]))}function M(e){return e.sort((e,t)=>e-t)}function A(e,t,n,u){const o=Object(h.Eb)(e,t,n)||[];if(o.includes(u))return e;return y(e,t,n,"viewportIds",M([...o.length<r.V?o:o.slice(-r.U/2),u]))}function k(e,t,n,r){const o=Object(h.Eb)(e,t,n)||[];return y(e,t,n,"viewportIds",Object(u.a)(o,r)?o:r)}function N(e,t,n,r){const u={...Object(h.zb)(e,t,n),...r};return u.threadId?y(e,t,n,"threadInfo",u):e}function T(e,t,n){return n.forEach(t=>{e=N(e,t.chatId,t.threadId,t)}),e}function P(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 D(e,t,n,r=!1){return{...e,focusedMessage:{...e.focusedMessage,chatId:t,messageId:n,noHighlight:r}}}function L(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 x(e,t,n,r,o,c,d,a=!1){const{selectedMessages:i}=e;c&&(d=Object(h.Z)(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(h.x)(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}}:B(e)}function B(e){return{...e,selectedMessages:void 0}}function R(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 U(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 $(e,t,n,r){const o=[...Object(h.vb)(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 W(e){const{emoji:t,stickers:n,hash:r}=e.stickers.forEmoji||{};return t?$(e,t,n,r):e}var H=n(47);function K(e,t){return{...e,users:{...e.users,byId:t}}}function z(e,t,n){const{byId:r}=e.users,{hash:o,userIds:c}=e.contactList||{},d=r[t],a=n.isMin&&d&&!d.isMin,i={...d,...a?Object(u.j)(n,["isMin","accessHash"]):n};return i.id&&i.type?(i.isContact&&c&&!c.includes(t)&&(e={...e,contactList:{hash:o||0,userIds:[t,...c]}}),K(e,{...r,[t]:i})):e}function V(e,t){return Object.keys(t).map(Number).forEach(n=>{e=z(e,n,t[n])}),e}function q(e,t){const{byId:n}=e.users;return Object.keys(t).map(Number).forEach(r=>{(!n[r]||n[r].isMin&&!t[r].isMin)&&(e=z(e,r,t[r]))}),e}function Y(e,t){return e.users.selectedId===t?e:{...e,users:{...e.users,selectedId:t}}}function J(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):H.a}},n)}const Q=e=>`${e.chatId}_${e.id}`;function Z(e,t){return{...e,globalSearch:{...e.globalSearch,...t}}}function X(e,t){return Z(e,{currentContent:t})}function ee(e,t,n,r,o){const{resultsByType:c}=e.globalSearch||{},d=t.reduce((e,t)=>(e[Q(t)]=t,e),{}),a=c&&c[r]?c[r].foundIds:void 0;if(void 0!==a&&Object.keys(d).every(e=>a.includes(Q(d[e]))))return te(e,{messages:!1});const i=a||[],s=t.map(e=>Q(e)),f=Array.prototype.concat(i,s),l=Object(u.a)(i,f)?i:f;return Z(e=te(e,{messages:!1}),{resultsByType:{...(e.globalSearch||{}).resultsByType,[r]:{totalCount:n,nextOffsetId:o,foundIds:l}}})}function te(e,t){return Z(e,{fetchingStatus:{...e.globalSearch.fetchingStatus,...t}})}var ne=n(4);function re(e,t,n){return{...e,localTextSearch:{byChatThreadKey:{...e.localTextSearch.byChatThreadKey,[t]:n}}}}function ue(e,t,n,r,u){const o=Object(ne.a)(t,n);return re(e,o,{...e.localTextSearch.byChatThreadKey[o],isActive:r,query:u})}function oe(e,t,n,r,u,o){const c=Object(ne.a)(t,n);return re(e,c,{...e.localTextSearch.byChatThreadKey[c],results:{foundIds:r,totalCount:u,nextOffsetId:o}})}function ce(e,t,n,r,o,c){const d=Object(ne.a)(t,n),{results:a}=e.localTextSearch.byChatThreadKey[d]||{},i=a&&a.foundIds||[],s=se(Object(u.o)(Array.prototype.concat(i,r)));return oe(e,t,n,Object(u.a)(i,s)?i:s,o,c)}function de(e,t,n){return{...e,localMediaSearch:{byChatId:{...e.localMediaSearch.byChatId,[t]:n}}}}function ae(e,t,n){return de(e,t,{...e.localMediaSearch.byChatId[t],currentType:n})}function ie(e,t,n,r,o,c){const{resultsByType:d}=e.localMediaSearch.byChatId[t]||{},a=d&&d[n]?d[n].foundIds:[],i=se(Object(u.o)(Array.prototype.concat(a,r)));return function(e,t,n,r,u,o){return de(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 se(e){return e.sort((e,t)=>e-t)}function fe(e,t){return{...e,management:{...e.management,progress:t}}}function le(e,t,n){return{...e,management:{...e.management,byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t]||{},...n}}}}}function be(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function he(e,t,n,r){switch(t){case"contact":return be(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==r&&{hasPrivateChatsMessagePreview:r}});case"group":return be(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==r&&{hasGroupMessagePreview:r}});case"broadcast":return be(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==r&&{hasBroadcastMessagePreview:r}});default:return}}function me(e,t){return{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function pe(e,t){return{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter(e=>e!==t),totalCount:e.blocked.totalCount-1}}}function ge(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}function ye(e,t){return{...e,payment:{...e.payment,shippingOptions:t}}}function ve(e,t){return{...e,payment:{...e.payment,formId:t}}}function Ie(e,t){return{...e,payment:{...e.payment,step:t}}}function Oe(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 we(e,t){return{...e,payment:{...e.payment,stripeCredentials:{...t}}}}function je(e,t){return{...e,payment:{...e.payment,...t}}}function Ce(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 Ee(e){return{...e,payment:{}}}function Se(e){return{...e,payment:{...e.payment,isPaymentModalOpen:!1}}}},function(e,t,n){"use strict";var r=n(0),u=n(7);t.a=Object(r.h)(({ref:e,id:t,className:n,value:o,label:c,error:d,success:a,disabled:i,readOnly:s,placeholder:f,autoComplete:l,inputMode:b,maxLength:h,onChange:m,onInput:p,onKeyPress:g,onKeyDown:y,onBlur:v})=>{const I=d||a||c,O=Object(u.a)("input-group",o&&"touched",d?"error":a&&"success",i&&"disabled",s&&"disabled",I&&"with-label",n);return r.a.createElement("div",{className:O},r.a.createElement("input",{ref:e,className:"form-control",type:"text",id:t,value:o||"",placeholder:f,maxLength:h,autoComplete:l,inputMode:b,disabled:i,readOnly:s,onChange:m,onInput:p,onKeyPress:g,onKeyDown:y,onBlur:v}),I&&r.a.createElement("label",{htmlFor:t},I))})},function(e,t,n){"use strict";var r=n(0),u=n(7),o=n(20);n(85);t.a=Object(r.h)(({id:e,name:t,value:n,label:c,subLabel:d,checked:a,disabled:i,round:s,blocking:f,isLoading:l,onChange:b,onCheck:h})=>{const m=Object(r.m)(e=>{b&&b(e),h&&h(e.currentTarget.checked)},[b,h]),p=Object(u.a)("Checkbox",i&&"disabled",s&&"round",l&&"loading",f&&"blocking");return r.a.createElement("label",{className:p},r.a.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:a,disabled:i,onChange:m}),r.a.createElement("div",{className:"Checkbox-main"},r.a.createElement("span",{className:"label"},c),d&&r.a.createElement("span",{className:"subLabel"},d)),l&&r.a.createElement(o.a,null))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(51);function u(e){return Object(r.a)({onEsc:e})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var r=n(0);let u,o=!1;const c=e=>{document.dispatchEvent(new Event("tt-event-heavy-animation-start")),o=!0,u&&(clearTimeout(u),u=void 0),u=window.setTimeout(()=>{o=!1,document.dispatchEvent(new Event("tt-event-heavy-animation-end")),u=void 0},e)};t.a=(e,t)=>{Object(r.n)(()=>(o&&e(),document.addEventListener("tt-event-heavy-animation-start",e),document.addEventListener("tt-event-heavy-animation-end",t),()=>{document.removeEventListener("tt-event-heavy-animation-end",t),document.removeEventListener("tt-event-heavy-animation-start",e)}),[t,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";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";var r=n(0),u=n(32),o=n(72),c=n(54),d=n(44),a=n(7),i=n(45);n(87);t.a=({ref:e,containerRef:t,isOpen:n,className:s,style:f,children:l,positionX:b="left",positionY:h="top",autoClose:m=!1,footer:p,noCloseOnBackdrop:g=!1,onCloseAnimationEnd:y,onClose:v,onMouseEnter:I,onMouseLeave:O})=>{let w=Object(r.q)(null);e&&(w=e);const j=t||w,{transitionClassNames:C}=Object(u.a)(n,y);Object(r.n)(()=>n&&v?Object(d.a)(v):void 0,[n,v]),Object(c.a)(([e])=>{void 0!==e&&Object(i.b)(200)},[n]);const E=((e,t,n)=>{const[u,o]=Object(r.r)(-1);Object(r.n)(()=>{o(-1)},[t]);return Object(r.m)(t=>{const r=e.current;if(!r)return;if(13===t.keyCode&&n)return void n();if(38!==t.keyCode&&40!==t.keyCode)return;const c=document.activeElement,d=Array.from(r.children);let a=c&&d.indexOf(c)||u;if(38===t.keyCode&&a>0)a--;else if(40===t.keyCode&&a<d.length-1)a++;else{if(1!==d.length)return;a=0}const i=d[a];i&&(o(a),i.focus())},[u,e,n])})(w,n,m?v:void 0);Object(o.a)(n,j,g?void 0:v);const S=Object(a.a)("bubble menu-container custom-scroll",h,b,p&&"with-footer",C);return r.a.createElement("div",{className:Object(a.a)("Menu no-selection",s),onKeyDown:n?E:void 0,onMouseEnter:I,onMouseLeave:n?O:void 0,style:f},n&&r.a.createElement("div",{className:"backdrop"}),r.a.createElement("div",{ref:w,className:S,style:`transform-origin: ${h} ${b}`,onClick:m?v:void 0},l,p&&r.a.createElement("div",{className:"footer"},p)))}},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 I}));var r=n(5),u=n(1),o=n(10),c=n(13),d=n(14),a=n(8),i=n(74),s=n.n(i),f=n(75),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(39);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.L){const n=e.startsWith("avatar")?u.N:u.M,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.o)()&&t){const n=await Object(h.b)(e,t);n&&(t=n)}const n=O(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=O(t),f=e.type}if("image/webp"===f&&!Object(a.o)()){const t=await Object(d.e)(s);URL.revokeObjectURL(s);const n=await Object(h.b)(e,t);n&&(s=O(n))}return p.set(e,s),s}(e,t,n).catch(e=>{u.o&&console.warn(e)}).finally(()=>{g.delete(e)});g.set(e,i)}return g.get(e)}function v(e){return p.get(e)}function I(e){Object(o.b)(e)}function O(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";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 o}));var r=n(9);let u=o();function o(){const e=.01*window.innerHeight;return document.documentElement.style.setProperty("--vh",e+"px"),{width:window.innerWidth,height:window.innerHeight}}const c=Object(r.g)(()=>{u=o()},250,!0);window.addEventListener("resize",c),window.addEventListener("orientationchange",c),t.a={get:()=>u}},function(e,t,n){"use strict";var r=n(0),u=n(2);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=(I=e.charCodeAt(b++))-48<10?I-22:I-65<26?I-65:I-97<26?I-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 I;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(1),s=n(3),f=n(7);function l(e){if(e)return e.includes("://")?e:"http://"+e}function b(e){if(!e)return;const t=l(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.o&&console.error("SafeLink.getDecodedUrl error ",e,t)}}t.a=Object(r.h)(Object(u.h)(void 0,(e,t)=>Object(s.l)(t,["openTelegramLink"]))(({url:e,text:t,className:n,children:u,openTelegramLink:o})=>{const c=Object(r.m)(t=>!(!(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&e&&(e.match(i.hb)||e.match(i.gb)))||(t.preventDefault(),o({url:e}),!1),[o,e]);if(!e)return;const d=Object(f.a)(n||"text-entity-link",t.length>50&&"long-word-break-all");return r.a.createElement("a",{href:l(e),title:b(e),target:"_blank",rel:"noopener noreferrer",className:d,onClick:c},u||t)}))},function(e,t,n){"use strict";var r=n(0),u=n(40);t.a=(e,t)=>{const n=Object(u.a)(t);return Object(r.n)(()=>e(n||[]),t)}},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)=>{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(9);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(49);n(88);t.a=({trigger:e,className:t,children:n,positionX:o="left",positionY:c="top",footer:d})=>{const a=Object(r.q)(null),i=Object(r.q)(null),[s,f]=Object(r.r)(!1);return r.a.createElement("div",{ref:i,className:"DropdownMenu "+(t||""),onKeyDown:e=>{const t=a.current;if(!s||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()}},e({onTrigger:()=>{f(!s)},isOpen:s}),r.a.createElement(u.a,{ref:a,containerRef:i,isOpen:s,className:t||"",positionX:o,positionY:c,footer:d,autoClose:!0,onClose:()=>{f(!1)}},n))}},function(e,t,n){"use strict";var r=n(15);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(25),o=n(1),c=n(30);const d=new Set(["key","ref","teactFastList","teactOrderKey"]),a={autoPlay:"autoplay",autoComplete:"autocomplete"},i={};function s(e,t,n,u,c,{skipComponentUpdate:d=!1,forceIndex:a=!1,fragment:i,moveDirection:g}={}){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&&l(n,u,c,e),t===n)return n;if(!t&&n){Object(r.d)(n)&&(n=f(n,u,c,e));const t=b(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=f(n,u,c,e));const o=b(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(g){const n=Object(r.b)(t),u=e.childNodes["up"===g?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]&&p(n,r,e.props[r])}),u.forEach(r=>{void 0!==t.props[r]&&e.props[r]!==t.props[r]&&(void 0===e.props[r]?m(n,r,t.props[r]):function(e,t,n,r){"value"===t?e.value=void 0!==r?r:"":(p(e,t,n),m(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.o&&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 s(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 s(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,f=[],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&&(f=f.concat(h(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,m=b&&l>o.index;b&&!m||l++,f.push(s(n,o.$element,e,t,r,{forceIndex:!0,...b&&{moveDirection:m?"down":"up"}}))}),a&&(f=f.concat(h(a,i,n,t)));return f}(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=s(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 f(e,t,n,u){if(!Object(r.d)(e))return e;const{componentInstance:o}=e;if(!o.isMounted){l(e=Object(r.i)(o),t,n,u);const c=e.children[0];Object(r.d)(c)&&(e.children=[f(c,e,0,u)]),o.isMounted=!0}return e}function l(e,t,n,r){const{componentInstance:u}=e;u.onUpdate=()=>{t.children[n]=s(r,t.children[n],u.$element,t,n,{skipComponentUpdate:!0})}}function b(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 b(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=>{m(o,e,n[e])}),e.children=u.map((t,n)=>s(o,void 0,t,e,n)),o}function h(e,t,n,r){if(1===e.length)return[s(n,void 0,e[0],r,t,{forceIndex:!0})];if(e.length>1){const u=document.createDocumentFragment(),o=e.map(e=>s(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 m(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.startsWith("data-")?e.setAttribute(t,n):d.has(t)||(e[a[t]||t]=n))}function p(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.startsWith("data-")?e.removeAttribute(t):d.has(t)||delete e[a[t]||t]}t.a={render:function(e,t){if(!t)return;let n=t.getAttribute("data-teact-head-id");n||(n=Object(u.a)(i),i[n]={children:[]},t.setAttribute("data-teact-head-id",n));const r=i[n];r.children=[s(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(35),c=n(22),d=n(2),a=n(3),i=n(7),s=n(24);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={}){if(!e.content.action)return[];const{text:s}=e.content.action,f=[],h={...i,maxTextLength:16};let g,y=p(s,"%action_origin%",t?!i.isEmbedded&&(v=t,I=i.asPlain,Object(u.fb)(v)?function(e,t){const n=Object(o.a)(Object(u.l)(e));return t?n:r.a.createElement(b,{className:"action-link",chatId:e.id},e&&Object(c.a)(n))}(v,I):m(v,I))||" ":"User");var v,I;return g=y.pop(),f.push(...y),y=p(g,"%target_user%",n?m(n,i.asPlain):"User"),g=y.pop(),f.push(...y),y=p(g,"%message%",d?function(e,t={}){const n=Object(u.M)(e),{photo:d,video:a,document:i,sticker:s}=Object(u.v)(e),f=n&&!d&&!a&&!i&&!s;let b=Object(o.a)(n,t.maxTextLength);d?b="a photo":a?b=a.isGif?"a GIF":"a video":i?b="a document":s&&(b=`«${n}»`);if(t.asPlain)return f?`«${b}»`:b;if(f)return r.a.createElement("span",null,"«",r.a.createElement(l,{className:"action-link",message:e},Object(c.a)(b)),"»");return r.a.createElement(l,{className:"action-link",message:e},Object(c.a)(b))}(d,h):"a message"),g=y.pop(),f.push(...y),y=p(g,"%product%",d?function(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}(d):"a product"),g=y.pop(),f.push(...y),y=p(g,"%target_chat%",a?function(e,t){if(t)return"another chat";return r.a.createElement(b,{className:"action-link",chatId:e},"another chat")}(a,i.asPlain):"another chat"),f.push(...y),i.asPlain?f.join("").trim():f}function m(e,t){const n=Object(o.a)(Object(u.Z)(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)),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,n){"use strict";var r=n(0),u=n(2),o=n(3),c=n(6);t.a=Object(u.h)((e,{userId:t})=>({userOrChat:t?Object(c.Db)(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"},n))},function(e,t,n){"use strict";var r=n(57),u=n(36);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("disable-animations"),document.documentElement.classList.add("theme-"+e),i&&i.setAttribute("content",n?"#212121":"#fff"),setTimeout(()=>{document.documentElement.classList.remove("disable-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 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+"c89514909950efc64f6f.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"01705582fc3eca0e007b.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"0dbbe0a906f6c2adf071.worker.js")}},function(e,t,n){e.exports=function(){return new Worker(n.p+"a66075669d8d0ac2d740.worker.js")}},function(e,t,n){"use strict";var r=n(2),u=n(8),o=n(11),c=n(71);Object(r.b)("init",e=>{const{theme:t,animationLevel:n,messageTextSize:r,language:d}=e.settings.byKey;Object(o.c)(d),document.documentElement.style.setProperty("--message-text-size",r+"px"),document.body.classList.add("initial"),document.body.classList.add("animation-level-"+n),document.body.classList.add(u.k?"is-touch-env":"is-pointer-env"),Object(c.a)(t,n>0),u.i&&document.body.classList.add("is-safari"),u.d?document.body.classList.add("is-ios"):u.b&&document.body.classList.add("is-android")}),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}))},function(e,t,n){"use strict";var r=n(2),u=n(1),o=n(10),c=n(26),d=n(13);Object(r.b)("initApi",(e,t)=>{const n=localStorage.getItem(u.C)||void 0;return Object(o.c)(t.apiUpdate,n),{...e,authIsSessionRemembered:Boolean(n)}}),Object(r.b)("setAuthPhoneNumber",(e,t,n)=>{const{phoneNumber:r}=n;return Object(o.a)("provideAuthPhoneNumber",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthCode",(e,t,n)=>{const{code:r}=n;return Object(o.a)("provideAuthCode",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("setAuthPassword",(e,t,n)=>{const{password:r}=n;return Object(o.a)("provideAuthPassword",r),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("uploadProfilePhoto",(e,t,n)=>{const{file:r}=n;Object(o.a)("uploadProfilePhoto",r)}),Object(r.b)("signUp",(e,t,n)=>{const{firstName:r,lastName:u}=n;return Object(o.a)("provideAuthRegistration",{firstName:r,lastName:u}),{...e,authIsLoading:!0,authError:void 0}}),Object(r.b)("returnToAuthPhoneNumber",e=>(Object(o.a)("restartAuth"),{...e,authError:void 0})),Object(r.b)("gotToAuthQrCode",e=>(Object(o.a)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0})),Object(r.b)("saveSession",(e,t,n)=>{const{sessionId:r}=n;localStorage.setItem(u.C,r)}),Object(r.b)("signOut",()=>{(async()=>{await Object(c.d)(),await Object(o.a)("destroy"),Object(r.d)().reset()})()}),Object(r.b)("reset",()=>{localStorage.removeItem(u.C),d.b(u.M),d.b(u.N),d.b(u.O),d.b(u.l),d.b(u.F),Object(r.d)().init()}),Object(r.b)("disconnect",()=>{(async()=>{await Object(o.a)("disconnect")})()}),Object(r.b)("loadNearestCountry",e=>{"connectionStateReady"===e.connectionState&&(async()=>{const e=await Object(o.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(2),u=n(1),o=n(26),c=n(41),d=n(11);Object(r.b)("apiUpdate",(e,t,n)=>{switch(u.o&&"updateUserStatus"!==n["@type"]&&console.log("[GramJs] UPDATE",n["@type"],{update:n}),n["@type"]){case"updateApiReady":!function(e){Object(o.c)(),Object(d.c)(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()});const{sessionId:u}=e;u&&t.authRememberMe&&Object(r.d)().saveSession({sessionId:u});break}}}(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"updateCurrentUser":!function(e){const{currentUser:t}=e;Object(r.g)({...Object(c.lb)(Object(r.e)(),t.id,t),currentUserId:t.id})}(n);break;case"error":"SESSION_REVOKED"===n.error.message&&t.signOut(),t.showError({error:n.error})}})},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(21),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(1),o=n(2),c=n(8),d=n(26);function a(e){const t=e.data;if(u.o&&console.log("[SW] New action from service worker",t),!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.j&&(window.addEventListener("load",async()=>{try{await navigator.serviceWorker.register(r),u.o&&console.log("[SW] ServiceWorker registered"),await navigator.serviceWorker.ready,navigator.serviceWorker.controller?(u.o&&console.log("[SW] ServiceWorker ready"),i()):(u.o&&console.error("[SW] ServiceWorker not available"),Object(o.d)().showError({error:{message:"SERVICE_WORKER_DISABLED"}}))}catch(e){u.o&&console.error("[SW] ServiceWorker registration failed: ",e)}}),window.addEventListener("focus",async()=>{await navigator.serviceWorker.ready,i()}));var s=n(61);const f={isLeftColumnShown:!0,isChatInfoShown:!1,uiReadyState:0,authRememberMe:!0,blocked:{ids:[],totalCount:0},users:{byId:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{}},messages:{byChatId:{}},scheduledMessages:{byChatId:{}},chatFolders:{byId:{}},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy"],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},featured:{setIds:[]},search:{},forEmoji:{}},gifs:{saved:{},search:{}},globalSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatId:{}},management:{byChatId:{}},topPeers:{},mediaViewer:{},audioPlayer:{},forwardMessages:{},pollResults:{},payment:{},notifications:[],errors:[],activeSessions:[],settings:{byKey:{messageTextSize:u.r,isBackgroundBlurred:!0,patternColor:u.s,animationLevel:u.d,messageSendKeyCombo:"enter",theme:"light",shouldAutoDownloadMediaFromContacts:!0,shouldAutoDownloadMediaInPrivateChats:!0,shouldAutoDownloadMediaInGroups:!0,shouldAutoDownloadMediaInChannels:!0,shouldAutoPlayGifs:!0,shouldAutoPlayVideos:!0,shouldSuggestStickers:!0,shouldLoopStickers:!0,language:"en"},privacy:{}},twoFaSettings:{}};var l=n(5),b=n(9),h=n(3),m=n(6);const p=Object(b.g)((function(){Object(b.c)(()=>{if(!g)return;const e=Object(o.e)();if(e.isLoggingOut)return;const t={...f,...Object(h.l)(e,["authState","authPhoneNumber","authRememberMe","authIsSessionRemembered","authNearestCountry","currentUserId","contactList","chatFolders","topPeers","recentEmojis","push"]),isChatInfoShown:v(e),users:I(e),chats:O(e),messages:w(e),globalSearch:{recentlyFoundChatIds:e.globalSearch.recentlyFoundChatIds},settings:j(e)},n=JSON.stringify(t);localStorage.setItem(u.A,n)})}),1e3,!1);let g=!1;function y(e){if(!u.z){if(localStorage.getItem(u.C))return g=!0,Object(o.a)(p),function(e){u.o&&console.time("global-state-cache-read");const t=localStorage.getItem(u.A),n=t?JSON.parse(t):void 0;u.o&&console.timeEnd("global-state-cache-read");n&&(n.settings.byKey={...e.settings.byKey,...n.settings.byKey});return{...e,...n}}(e);g=!1}}function v(e){return window.innerWidth>u.Z&&e.isChatInfoShown}function I(e){const{users:{byId:t,selectedId:n}}=e,r=[...(e.chats.listIds.active||[]).slice(0,u.y).filter(e=>e>0),...Object.keys(t)].slice(0,u.B);return{byId:Object(h.l)(t,r),selectedId:window.innerWidth>u.Z?n:void 0}}function O(e){const t=[...(e.chats.listIds.active||[]).slice(0,u.y)],{chatId:n}=Object(m.y)(e)||{};return{...e.chats,byId:Object(h.l)(e.chats.byId,n?[...t,n]:t),listIds:{active:t},isFullyLoaded:{},orderedPinnedIds:{active:e.chats.orderedPinnedIds.active}}}function w(e){const t={},{chatId:n}=Object(m.y)(e)||{};[...(e.chats.listIds.active||[]).slice(0,u.y),...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(h.l)(r.byId,u.viewportIds),threadsById:{[l.MAIN_THREAD_ID]:u}})});const r=Object(m.y)(e);return{byChatId:t,messageLists:!r||c.f?void 0:[{...r,threadId:l.MAIN_THREAD_ID,type:"thread"}]}}function j(e){const{byKey:t}=e.settings;return{byKey:t,privacy:{}}}u.z||(Object(o.b)("saveSession",()=>{g=!0,Object(o.a)(p)}),Object(o.b)("reset",()=>{g=!1,Object(o.f)(p),localStorage.removeItem(u.A)})),Object(o.b)("init",()=>{const e=Object(h.d)(f),t=y(e)||e,n=Object(m.y)(t)||{};return window.history.replaceState(n,""),t});var C=n(0),E=n(52);const S=String(Date.now()+Math.random());let M;localStorage.setItem("tt-active-tab",S);const A=window.setInterval(()=>{M&&localStorage.getItem("tt-active-tab")!==S&&(M(),clearInterval(A))},2e3);var k=n(31),N=(n(77),n(78),n(79),n(28)),T=n(32),P=n(14);const D=["400 1em Roboto","500 1em Roboto"];function L(){if("fonts"in document)return Promise.all(D.map(e=>document.fonts.load(e)))}var F=n(50),x=n(12),B=n(7),R=(n(81),n.p+"telegram-logo.df3a91becaa9678c529b4c4cadd45204.svg"),U=n.p+"monkey.a3d5fcdc50b18dc55695f7dd4101a8c9.svg";function _(){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(N.d)(n);return r?F.b(r,l.ApiMediaFormat.DataUri):void 0}))}const G={main:()=>Promise.all([Object(x.d)(x.a.Main,"Main").then(L),_()]),authPhoneNumber:()=>Promise.all([L(),Object(P.g)(R)]),authCode:()=>Object(P.g)(U),authPassword:()=>Object(P.g)(U),authQrCode:L};var $=Object(o.h)(e=>({uiReadyState:e.uiReadyState,hasCustomBackground:Boolean(e.settings.byKey.customBackground),isCustomBackgroundColor:Boolean((e.settings.byKey.customBackground||"").match(/^#[a-f\d]{6,8}$/i)),isRightColumnShown:Object(m.V)(e)}),(e,t)=>Object(h.l)(t,["setIsUiReady"]))(({page:e,children:t,hasCustomBackground:n,isCustomBackgroundColor:r,isRightColumnShown:u,setIsUiReady:o})=>{const[c,d]=Object(k.a)(),{shouldRender:a,transitionClassNames:i}=Object(T.a)(!c,void 0,!0);return Object(C.n)(()=>{let t;return Promise.race([Object(b.e)(700),G[e]()]).then(()=>{d(),o({uiReadyState:1}),t=window.setTimeout(()=>{o({uiReadyState:2})},1e3)}),()=>{t&&(clearTimeout(t),t=void 0),o({uiReadyState:0})}},[]),C.a.createElement("div",{id:"UiLoader"},t,a&&C.a.createElement("div",{className:Object(B.a)("mask",i)},"main"===e?C.a.createElement(C.a.Fragment,null,C.a.createElement("div",{className:"left"}),C.a.createElement("div",{className:Object(B.a)("middle",n&&!r&&"custom-bg-image",n&&r&&"custom-bg-color",u&&"with-right-column")}),u&&C.a.createElement("div",{className:"right"})):C.a.createElement("div",{className:"blank"})))}),W=n(18),H=n(29),K=n(43),z=n(42),V=n(16),q=n(48),Y=n(22),J=n(58),Q=n(37),Z=n(20);n(90);const X=200+u.c;var ee=Object(C.h)(({id:e,value:t,isLoading:n,onChange:r})=>{const u=Object(C.q)(null),[o,c]=Object(C.r)(),[d,a]=Object(C.r)(W.a);function i(e){c(e),a(function(e=""){return e.length?W.a.filter(t=>Object(q.a)(t.name,e)):W.a}(e))}const s=Object(C.m)(e=>{const{countryId:t}=e.currentTarget.firstElementChild.dataset,n=W.a.find(e=>e.id===t);n&&r(n),setTimeout(()=>i(void 0),X)},[r]),f=Object(C.m)(e=>{i(e.currentTarget.value)},[]),l=Object(C.m)(e=>{if(8!==e.keyCode)return;const n=e.currentTarget;t&&void 0===o&&(n.value=""),i(n.value)},[o,t]);return C.a.createElement(J.a,{className:"CountryCodeInput",trigger:({onTrigger:r,isOpen:c})=>{const d=()=>{if(c)return;setTimeout(()=>{u.current.select()},50),r();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},a=void 0!==o?o:t&&t.name||"";return C.a.createElement("div",{className:Object(B.a)("input-group",t&&"touched")},C.a.createElement("input",{ref:u,className:Object(B.a)("form-control",c&&"focus"),type:"text",id:e,value:a,autoComplete:"off",onClick:d,onFocus:d,onInput:f,onKeyDown:l}),C.a.createElement("label",null,"Country"),n?C.a.createElement(Z.a,{color:"black"}):C.a.createElement("i",{onClick:d,className:Object(B.a)("css-icon-down",c&&"open")}))}},d.map(e=>C.a.createElement(Q.a,{key:e.id,className:t&&e.id===t.id?"selected":"",onClick:s},C.a.createElement("span",{"data-country-id":e.id}),C.a.createElement("span",{className:"country-flag"},Object(Y.a)(e.flag,["hq_emoji"])),C.a.createElement("span",{className:"country-name"},e.name),C.a.createElement("span",{className:"country-code"},e.code))),!d.length&&C.a.createElement(Q.a,{key:"no-results",className:"no-results",disabled:!0},C.a.createElement("span",null,"No countries matched your filter.")))});let te=!1;var ne=Object(C.h)(Object(o.h)(e=>Object(h.l)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),(e,t)=>Object(h.l)(t,["setAuthPhoneNumber","setAuthRememberMe","clearAuthError","loadNearestCountry","gotToAuthQrCode"]))(({connectionState:e,authState:t,authPhoneNumber:n,authIsLoading:r,authIsLoadingQrCode:u,authError:o,authRememberMe:d,authNearestCountry:a,setAuthPhoneNumber:i,setAuthRememberMe:s,loadNearestCountry:f,clearAuthError:l,gotToAuthQrCode:b})=>{const h=Object(C.q)(null),[m,p]=Object(C.r)(),[g,y]=Object(C.r)(),[v,I]=Object(C.r)(!1),[O,w]=Object(C.r)(),j=m?`${m.code} ${g||""}`:g,E=j&&j.replace(/[^\d]+/g,"").length>=10;Object(C.n)(()=>{c.k||h.current.focus()},[m]),Object(C.n)(()=>{"connectionStateReady"!==e||a||f()},[e,a,f]),Object(C.n)(()=>{!a||m||v||p(Object(W.d)(a))},[m,a,v]);const S=Object(C.m)(e=>{const t=Object(W.e)(e),n=!m||t&&t.id!==m.id?t:m;e.length?(!m||n&&n.code!==m.code)&&p(n):p(void 0),y(Object(W.b)(e,n))},[m]);Object(C.n)(()=>{void 0===g&&n&&S(n)},[n,g,S]),Object(C.o)(()=>{h.current&&O&&h.current.setSelectionRange(...O)},[O]);const M=Object(C.m)(e=>{o&&l(),te||(te=!0,L(),Object(P.g)(U));const{value:t,selectionStart:n,selectionEnd:r}=e.target;w(n&&r&&r<t.length?[n,r]:void 0),I(!0),S(t)},[o,l,S]),A=Object(C.m)(e=>{s(e.target.checked)},[s]);const k="authorizationStateWaitPhoneNumber"===t;return C.a.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},C.a.createElement("div",{className:"auth-form"},C.a.createElement("div",{id:"logo"}),C.a.createElement("h2",null,"Sign in to Telegram"),C.a.createElement("p",{className:"note"},"Please confirm your country and",C.a.createElement("br",null),"enter your phone number."),C.a.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),r||E&&i({phoneNumber:j})}},C.a.createElement(ee,{id:"sign-in-phone-code",value:m,isLoading:!a&&!m,onChange:p}),C.a.createElement(z.a,{ref:h,id:"sign-in-phone-number",label:"Phone Number",value:j,error:o,inputMode:"tel",onChange:M}),C.a.createElement(K.a,{id:"sign-in-keep-session",label:"Keep me signed in",checked:Boolean(d),onChange:A}),E&&(k?C.a.createElement(H.a,{type:"submit",ripple:!0,isLoading:r},"Next"):C.a.createElement(V.a,null)),k&&C.a.createElement(H.a,{isText:!0,ripple:!0,isLoading:u,onClick:b},"Log in by QR code"))))})),re=n(17);var ue=Object(C.h)(()=>{const e=Object(re.a)(x.a.Auth,"AuthCode");return e?C.a.createElement(e,null):C.a.createElement(V.a,null)});var oe=Object(C.h)(()=>{const e=Object(re.a)(x.a.Auth,"AuthPassword");return e?C.a.createElement(e,null):C.a.createElement(V.a,null)});var ce=Object(C.h)(()=>{const e=Object(re.a)(x.a.Auth,"AuthRegister");return e?C.a.createElement(e,null):C.a.createElement(V.a,null)});var de=Object(C.h)(()=>{const e=Object(re.a)(x.a.Auth,"AuthQrCode");return e?C.a.createElement(e,null):C.a.createElement(V.a,null)});n(91);var ae=Object(C.h)(Object(o.h)(e=>Object(h.l)(e,["authState"]),(e,t)=>Object(h.l)(t,["reset","initApi"]))(({authState:e,reset:t,initApi:n})=>{switch(Object(C.n)(()=>{t(),n()},[t,n]),Object(C.n)(()=>{},[]),e){case"authorizationStateWaitCode":return C.a.createElement($,{page:"authCode",key:"authCode"},C.a.createElement(ue,null));case"authorizationStateWaitPassword":return C.a.createElement($,{page:"authPassword",key:"authPassword"},C.a.createElement(oe,null));case"authorizationStateWaitRegistration":return C.a.createElement(ce,null);case"authorizationStateWaitQrCode":return C.a.createElement($,{page:"authQrCode",key:"authQrCode"},C.a.createElement(de,null));case"authorizationStateWaitPhoneNumber":default:return C.a.createElement($,{page:"authPhoneNumber",key:"authPhoneNumber"},C.a.createElement(ne,null))}}));var ie=Object(C.h)(()=>{const e=Object(re.a)(x.a.Main,"Main");return e?C.a.createElement(e,null):void 0}),se=n.p+"app-inactive.bc7953c2dfebcabce2c43ca7dc778a89.png";n(92);var fe=()=>C.a.createElement("div",{id:"AppInactive"},C.a.createElement("div",{className:"content"},C.a.createElement("img",{src:se,alt:""}),C.a.createElement("h3",{className:"title"},"Such error, many tabs"),C.a.createElement("div",{className:"description"},"Telegram supports only one active tab with the app.",C.a.createElement("br",null),"Please reload this page to continue using this tab or close it."),C.a.createElement("div",{className:"actions"},C.a.createElement(H.a,{isText:!0,ripple:!0,onClick:()=>{window.location.reload()}},"Reload app"))));function le(){return o.c.createElement($,{page:"main",key:"main"},o.c.createElement(ie,null))}var be=Object(o.h)(e=>Object(h.l)(e,["authState","authIsSessionRemembered"]),(e,t)=>Object(h.l)(t,["disconnect"]))(({authState:e,authIsSessionRemembered:t,disconnect:n})=>{const[r,c]=Object(k.a)(!1);if(Object(C.n)(()=>{Object(E.b)(),M=()=>{n(),document.title=`${u.db}${u.D}`,c()}},[n,c]),r)return o.c.createElement(fe,null);if(e)switch(e){case"authorizationStateWaitPhoneNumber":case"authorizationStateWaitCode":case"authorizationStateWaitPassword":case"authorizationStateWaitRegistration":case"authorizationStateWaitQrCode":return o.c.createElement(ae,null);case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":return le()}return t?le():o.c.createElement(ae,null)});n(93);u.o&&console.log(">>> INIT"),Object(o.d)().init(),u.o&&console.log(">>> START INITIAL RENDER"),s.a.render(o.c.createElement(be,null),document.getElementById("root")),u.o&&console.log(">>> FINISH INITIAL RENDER"),document.addEventListener("dblclick",()=>{console.log("GLOBAL STATE",Object(o.e)())})}]);
|
||
//# sourceMappingURL=main.7f0fda135c2f9c60d5b5.js.map
|