(()=>{var e,t,n,r,o,a,i={71226:(e,t,n)=>{"use strict";n.d(t,{t9:()=>c,u3:()=>l,g8:()=>u});var r=n(83716),o=n(26926),a=n(69118);let i;const s=new Map,d=new Map;function u(e,t){return i||(r.eM&&console.log(">>> START LOAD WORKER"),i=new Worker(new URL(n.p+n.u(8090),n.b)),function(e){i.addEventListener("message",(t=>{let{data:n}=t;if("update"===n.type)e(n.update);else if("methodResponse"===n.type){const e=s.get(n.messageId);e&&(n.error?e.reject(n.error):e.resolve(n.response))}else if("methodCallback"===n.type){var r,o;null===(r=s.get(n.messageId))||void 0===r||null===(o=r.callback)||void 0===o||o.call(r,...n.callbackArgs)}else if("unhandledError"===n.type){var a;throw new Error(null===(a=n.error)||void 0===a?void 0:a.message)}}))}(e),"iOS"===t.platform&&window.addEventListener("focus",(()=>{g(),setTimeout((()=>g()),1e3)}))),f({type:"initApi",args:[t]})}function c(e){if(!i)return void(r.eM&&console.warn("API is not initialized"));for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o{try{await a}catch(e){}})(),a}function l(e){e.isCanceled=!0;const{messageId:t}=d.get(e)||{};t&&i.postMessage({type:"cancelProgress",messageId:t})}function f(e){const t=(0,o.Z)(s),n={messageId:t,...e},r={messageId:t},a=new Promise(((e,t)=>{Object.assign(r,{resolve:e,reject:t})}));if("args"in n&&"function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,d.set(e,r)}return s.set(t,r),a.catch((()=>{})).finally((()=>{s.delete(t),r.callback&&d.delete(r.callback)})),i.postMessage(n),a}const h=Date.now();async function g(){try{await Promise.race([f({type:"ping"}),(0,a.wO)(150).then((()=>Promise.reject(new Error("HEALTH_CHECK_TIMEOUT"))))])}catch(e){console.error(e),Date.now()-h>=5e3&&window.location.reload()}}},6137:(e,t,n)=>{"use strict";n.d(t,{IU:()=>o.I,Vv:()=>r.Vv,_Q:()=>r._Q,_f:()=>r._f});var r=n(94746),o=n(9077)},9077:(e,t,n)=>{"use strict";let r;n.d(t,{I:()=>r}),function(e){e[e.BlobUrl=0]="BlobUrl",e[e.Progressive=1]="Progressive",e[e.Stream=2]="Stream",e[e.DownloadUrl=3]="DownloadUrl",e[e.Text=4]="Text"}(r||(r={}))},94746:(e,t,n)=>{"use strict";let r;n.d(t,{Vv:()=>r,_Q:()=>a,_f:()=>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.Spoiler="MessageEntitySpoiler",e.Unknown="MessageEntityUnknown"}(r||(r={}));const o=-1,a="MESSAGE_DELETED"},58912:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(14050),o=n(46752),a=n(70692),i=n(60706),s=n(97799);function d(){return d=Object.assign||function(e){for(var t=1;t{I(),c.add(b),null==p||p()}),[b,I,p]),[E,P]=(0,r.eJ)(String(Math.random())),M=(0,r.I4)((()=>{!0===n&&P(String(Math.random())),null==m||m()}),[m,n]);return r.ZP.createElement(s.Z,d({className:(0,o.Z)(f,C,"shown"),size:t,play:!0===n?E:n,noLoop:l,onClick:g?void 0:M,onLoad:S},v))}))},97799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(14050),o=n(69118),a=n(46752),i=n(80036),s=n(18674),d=n(45332);let u,c;async function l(){return u||(u=n.e(7941).then(n.bind(n,67941)),c=(await u).default),u}setTimeout(l,3e3);const f=(0,r.X$)((e=>{let{ref:t,className:n,style:u,tgsUrl:f,play:h,playSegment:g,speed:p,noLoop:m,size:v,quality:y,isLowPriority:b,color:w,forceOnHeavyAnimation:I,onClick:C,onLoad:S,onEnded:E}=e,P=(0,r.sO)(null);t&&(P=t);const[M,A]=(0,r.eJ)(),k=(0,r.sO)(!1),_=(0,r.sO)(!1),N=(0,r.sO)(!0),T=(0,r.sO)();T.current=h;const x=(0,r.sO)();x.current=g,(0,r.d4)((()=>{if(M||!f)return;const e=()=>{if(!P.current)return;const e=new c(P.current,f,{noLoop:m,size:v,quality:y,isLowPriority:b},S,w,E);p&&e.setSpeed(p),A(e)};c?e():l().then((()=>{(0,o.T2)((()=>{P.current&&e()}))}))}),[w,M,f,b,m,S,y,v,p,E]),(0,r.d4)((()=>{M&&M.setColor(w)}),[w,M]),(0,r.d4)((()=>()=>{M&&M.destroy()}),[M]);const L=(0,r.I4)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];M&&(T.current||x.current)&&(x.current?M.playSegment(x.current):M.play(e))}),[M]),O=(0,r.I4)((()=>{M&&M.pause()}),[M]),B=(0,r.I4)((()=>{_.current=!0,M&&(k.current||(k.current=M.isPlaying()),O())}),[M,O]),R=(0,r.I4)((()=>{k.current&&L(m),k.current=!1,_.current=!1}),[m,L]),D=(0,r.I4)((()=>{(0,o.T2)(R)}),[R]);return(0,r.d4)((()=>{M&&(h||g?_.current?k.current=!0:L(m):_.current?k.current=!1:O())}),[M,h,g,m,L,O]),(0,r.d4)((()=>{M&&(N.current?N.current=!1:f&&(M.changeData(f),L()))}),[L,M,f]),(0,s.ZP)(B,R,I),(0,d.Z)(B,D),r.ZP.createElement("div",{ref:P,className:(0,a.Z)("AnimatedSticker",n),style:(0,i.Z)(void 0!==v&&`width: ${v}px; height: ${v}px;`,C&&"cursor: pointer",u),onClick:C})}))},10088:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(14050),o=n(33555);const a=36,i=2147483647;function s(e,t,n){let r;for(e=n?Math.floor(e/700):e>>1,e+=Math.floor(e/t),r=0;e>455;r+=a)e=Math.floor(e/35);return Math.floor(r+36*e/(e+38))}function d(e,t){const n=[],r=[],o=e.length;let d,u,c,l,f,h,g,p,m,v,y,b,w;for(d=128,c=0,l=72,f=e.lastIndexOf("-"),f<0&&(f=0),h=0;h=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(h))}for(g=f>0?f+1:0;g=o)throw RangeError("punycode_bad_input(1)");if(y=(I=e.charCodeAt(g++))-48<10?I-22:I-65<26?I-65:I-97<26?I-97:a,y>=a)throw RangeError("punycode_bad_input(2)");if(y>Math.floor((i-c)/m))throw RangeError("punycode_overflow(1)");if(c+=y*m,b=v<=l?1:v>=l+26?26:v-l,yMath.floor(i/(a-b)))throw RangeError("punycode_overflow(2)");m*=a-b}if(u=n.length+1,l=s(c-p,u,0===p),Math.floor(c/u)>i-d)throw RangeError("punycode_overflow(3)");d+=Math.floor(c/u),c%=u,t&&r.splice(c,0,e.charCodeAt(g-1)-65<26),n.splice(c,0,d),c++}var I;if(t)for(c=0,w=n.length;c{const t=[];let n=0;const r=e.length;let o;for(;n65535&&(o-=65536,t.push(String.fromCharCode(o>>>10&1023|55296)),o=56320|1023&o),t.push(String.fromCharCode(o))}return t.join("")})(n)}var u=n(83716),c=n(46752),l=n(81396);function f(e){if(!e)return;const t=(0,l.X)(e);if(t)try{let e=decodeURI(t.replace(/%%/g,"%25"));const n=e.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i);if(!n)return;const r=n[1];return e=e.replace(r,function(e){const t=e.split("."),n=[];for(let e=0;e{let{url:t,text:n,className:a,children:i,isRtl:s}=e;const{openUrl:d}=(0,o.Sv)(),u=i||n,h=t===u,g=(0,r.I4)((e=>!t||(e.preventDefault(),d({url:t,shouldSkipModal:h}),!1)),[h,d,t]);if(!t)return;const p=(0,c.Z)(a||"text-entity-link",n.length>50&&"long-word-break-all");return r.ZP.createElement("a",{href:(0,l.X)(t),title:f(t),target:"_blank",rel:"noopener noreferrer",className:p,onClick:g,dir:s?"rtl":"auto"},u)}))},13365:(e,t,n)=>{"use strict";n.d(t,{l:()=>h});const r=n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab.tgs",o=n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12.tgs",a=n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3e.tgs",i=n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e.tgs",s=n.p+"FoldersAll.3f9f9e243d19f0fbf9aa.tgs",d=n.p+"FoldersNew.9a40d71c0c8be70f5bd1.tgs",u=n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a.tgs",c=n.p+"Lock.12547a0228d4fa544e53.tgs",l=n.p+"Congratulations.b6623b8efc6fedec9d33.tgs",f=n.p+"Experimental.43d62096368bf5a00ae3.tgs",h={MonkeyIdle:r,MonkeyTracking:o,MonkeyClose:a,MonkeyPeek:i,FoldersAll:s,FoldersNew:d,DiscussionGroups:u,Lock:c,CameraFlip:n.p+"CameraFlip.1a9fe44cf01fcb22347d.tgs",HandFilled:n.p+"HandFilled.f87939d160f1dc288586.tgs",HandOutline:n.p+"HandOutline.f9831751ba60df30c484.tgs",Speaker:n.p+"Speaker.04bb3743412b41ff83c5.tgs",VoiceAllowTalk:n.p+"VoiceAllowTalk.a9cc7c39ec438973ddc9.tgs",VoiceMini:n.p+"VoiceMini.bf00ffdf69625c579569.tgs",VoiceMuted:n.p+"VoiceMuted.a4b4ec6bfd7c6c5fb275.tgs",VoiceOutlined:n.p+"VoiceOutlined.91b394ab3562cdfad6bc.tgs",Peach:n.p+"Peach.a289b2c54c563f11208f.tgs",Eggplant:n.p+"Eggplant.7693d877087b802d04be.tgs",Cumshot:n.p+"Cumshot.7a17984a6b80787dab34.tgs",JoinRequest:n.p+"Requests.af9f19772695a8898810.tgs",Invite:n.p+"Invite.4502ec3aa4249d6e6723.tgs",QrPlane:n.p+"QrPlane.a921709f266564f65b7e.tgs",Congratulations:l,Experimental:f}},15376:(e,t,n)=>{"use strict";n.d(t,{K2:()=>o,Oh:()=>i,mD:()=>a,v6:()=>s,yW:()=>r});function r(e){return e>536870912?`${(e/1073741824).toFixed(1)} GB`:e>524288?`${(e/1048576).toFixed(1)} MB`:`${(e/1024).toFixed(1)} KB`}function o(e){const{fileName:t,mimeType:n}=e;return a(t,n)}function a(e,t){return e&&-1!==e.indexOf(".")?e.split(".").pop():t.split("/").pop()}function i(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 s(e){return Boolean(e.previewBlobUrl||e.thumbnail)}},64784:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(33681);const o=new RegExp(`^(?:${r.Z.source})+$`,""),a=e=>{if(e.length>24)return!1;if(!Boolean(e.match(o)))return!1;let t=0;for(;r.Z.exec(e);)if(t++,t>3)return r.Z.lastIndex=0,!1;return t}},18005:(e,t,n)=>{"use strict";n.d(t,{D:()=>y});var r=n(14050),o=n(83158),a=n(48035),i=n(9937),s=n(996),d=n(32340),u=n(46752),c=n(88033),l=n(33555);const f=e=>{let{className:t,sender:n,children:o}=e;const{openChat:a}=(0,l.Sv)(),i=(0,r.I4)((()=>{n&&a({id:n.id})}),[n,a]);return n?r.ZP.createElement(c.Z,{className:(0,u.Z)("UserLink",t),onClick:i},o):o},h=e=>{let{className:t,message:n,children:o}=e;const{focusMessage:a}=(0,l.Sv)(),i=(0,r.I4)((()=>{n&&a({chatId:n.chatId,messageId:n.id})}),[a,n]);return n?r.ZP.createElement(c.Z,{className:(0,u.Z)("MessageLink",t),onClick:i},o):o},g=e=>{let{className:t,chatId:n,children:o}=e;const{openChat:a}=(0,l.Sv)(),i=(0,r.I4)((()=>{n&&a({id:n})}),[n,a]);return n?r.ZP.createElement(c.Z,{className:(0,u.Z)("ChatLink",t),onClick:i},o):o},p=e=>{let{className:t,groupCall:n,children:o}=e;const{joinGroupCall:a}=(0,l.Sv)(),i=(0,r.I4)((()=>{n&&a({id:n.id,accessHash:n.accessHash})}),[n,a]);return n?r.ZP.createElement(c.Z,{className:(0,u.Z)("GroupCallLink",t),onClick:i},o):o},m=32,v=" ";function y(e,t,n,r,o,a,s){let d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};if(!t.content.action)return[];const{text:u,translationValues:c,amount:l,currency:f,call:h,score:g}=t.content.action,p=[],m=d.asPlainText||d.asTextWithSpoilers,y="Chat.Service.Group.UpdatedPinnedMessage1"!==u||a?u:"Message.PinnedGenericMessage";let M,A=e(y,null!=c&&c.length?c:void 0);return y.includes("ScoredInGame")&&(A=A.replace("un1","%action_origin%").replace("un2","%message%")),A.includes("%payment_amount%")&&(M=P(A,"%payment_amount%",(0,i.x)(l,f,e.code)),A=M.pop(),p.push(...M)),M=P(A,"%action_origin%",n?C(n,m)||v:r?S(e,r,m)||v:"User"),A=M.pop(),p.push(...M),A.includes("%score%")&&(M=P(A,"%score%",g.toString()),A=M.pop(),p.push(...M)),M=P(A,"%target_user%",o?o.map((e=>C(e,m))).filter(Boolean):"User"),A=M.pop(),p.push(...M),M=P(A,"%message%",a?w(e,a,d):"a message"),A=M.pop(),p.push(...M),M=P(A,"%product%",a?b(a):"a product"),A=M.pop(),p.push(...M),M=P(A,"%target_chat%",s?E(s,m):"another chat"),p.push(...M),d.asPlainText?p.join("").trim():h?I(h,p):p}function b(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{asPlainText:a,asTextWithSpoilers:i}=n;if(a)return(0,o.MK)(e,t,void 0,m);const d=(0,s.e)(e,t,void 0,void 0,m);return i?r.ZP.createElement("span",null,d):r.ZP.createElement(h,{className:"action-link",message:t},d)}function I(e,t){return r.ZP.createElement(p,{groupCall:e},t)}function C(e,t){const n=(0,a.Z)((0,o.Js)(e),m);return t?n:r.ZP.createElement(f,{className:"action-link",sender:e},e&&(0,d.Z)(n))}function S(e,t,n){const i=(0,a.Z)((0,o.U)(e,t),m);return n?i:r.ZP.createElement(g,{className:"action-link",chatId:t.id},t&&(0,d.Z)(i))}function E(e,t){const n="another chat";return t?n:r.ZP.createElement(g,{className:"action-link",chatId:e},n)}function P(e,t,n){const r=e.indexOf(t);if(r<0||!n)return[e];const o=[];return o.push(e.substring(0,r)),Array.isArray(n)?n.forEach(((e,t)=>{o.push(e),t+1{"use strict";n.d(t,{X:()=>d,e:()=>u});var r=n(6137),o=n(83158),a=n(32340),i=n(20230),s=n(48035);function d(e,t,n,r,a,d){const{text:u,entities:c}=e.content.text||{};if(!u){const t=(0,o.UD)(e);return t?[(0,s.Z)(t,a)]:void 0}return(0,i.H)((0,s.Z)(u,a),c,t,n,void 0,e.id,r,d)}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o.lN;const{entities:c}=t.content.text||{},l=null==c?void 0:c.some((e=>e.type===r.Vv.Spoiler));if(!l){const r=(0,s.Z)((0,o.MK)(e,t,n),u);return i?(0,a.Z)(r,["emoji","highlight"],{highlight:i}):(0,a.Z)(r)}const f=!n&&(0,o.Eb)(t),h=f?`${f} `:"",g=d(t,i,void 0,!0,u),p=(0,o.Kk)(e,t,g);return[h,...Array.isArray(p)?p:[p]].filter(Boolean)}},32340:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g,h:()=>C});var r=n(14050),o=n(33681),a=n(83716),i=n(77361),s=n(34284),d=n(46752),u=n(60782),c=n(97373),l=n(10088);const f=/^[\d\wа-яё]$/i,h=/(\*\*|__).+?\1/g;function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["emoji"],n=arguments.length>2?arguments[2]:void 0;return"string"!=typeof e?[e]:(0,u.oA)(t.reduce(((e,t)=>{switch(t){case"escape_html":return p(e);case"hq_emoji":return o.Z.lastIndex=0,m(e,"big","jsx");case"emoji":return o.Z.lastIndex=0,m(e,"small","jsx");case"emoji_html":return o.Z.lastIndex=0,m(e,"small","html");case"br":return v(e,"jsx");case"br_html":return v(e,"html");case"highlight":return y(e,n.highlight);case"links":return w(e);case"simple_markdown":return I(e,"jsx");case"simple_markdown_html":return I(e,"html")}return e}),[e]))}function p(e){const t=document.createElement("div");return e.reduce(((e,n)=>"string"!=typeof n?(e.push(n),e):(t.innerText=n,e.push(t.innerHTML),e)),[])}function m(e,t,n){return i.op?e:e.reduce(((e,a)=>{if("string"!=typeof a)return e.push(a),e;const i=(a=(0,s.g6)(a)).split(o.Z),u=a.match(o.Z)||[];return e.push(i[0]),u.reduce(((e,o,a)=>{const u=(0,s.DW)(o);if(!u)return e;const c=`./img-apple-${"big"===t?"160":"64"}/${u}.png`,l=(0,d.Z)("emoji","small"===t&&"emoji-small");if("jsx"===n){const t=s.Uz.has(c);e.push(r.ZP.createElement("img",{src:c,className:`${l}${t?"":" opacity-transition slow shown"}`,alt:o,"data-path":c,onLoad:t?void 0:s.mE}))}"html"===n&&e.push(`${o}`);const f=2*a+2;return i[f]&&e.push(i[f]),e}),e)}),[])}function v(e,t){return e.reduce(((e,n)=>{if("string"!=typeof n)return e.push(n),e;const o=n.split(/\r\n|\r|\n/g).reduce(((e,n,o,a)=>{const i=n.trimLeft(),s=n.length-i.length;return e.push(String.fromCharCode(160).repeat(s)+i),o!==a.length-1&&e.push("jsx"===t?r.ZP.createElement("br",null):"
"),e}),[]);return[...e,...o]}),[])}function y(e,t){return e.reduce(((e,n)=>{if("string"!=typeof n||!t)return e.push(n),e;const o=n.toLowerCase(),a=o.indexOf(t.toLowerCase()),i=o[a+t.length];if(a<0||i&&i.match(f))return e.push(n),e;const s=[];return s.push(n.substring(0,a)),s.push(r.ZP.createElement("span",{className:"matching-text-highlight"},n.substring(a,a+t.length))),s.push(n.substring(a+t.length)),[...e,...s]}),[])}const b=new RegExp(`${a.FM}|${a.uW}`,"ig");function w(e){return e.reduce(((e,t)=>{if("string"!=typeof t)return e.push(t),e;const n=t.match(b);if(!n||!n.length)return e.push(t),e;const o=[];let a=n.shift(),i=0;for(;a;){const e=t.indexOf(a,i);o.push(t.substring(i,e)),a.startsWith("@")?o.push(r.ZP.createElement(c.Z,{username:a},a)):(a.endsWith("?")&&(a=a.slice(0,a.length-1)),o.push(r.ZP.createElement(l.Z,{text:a,url:a}))),i=e+a.length,a=n.shift()}return o.push(t.substring(i)),[...e,...o]}),[])}function I(e,t){return e.reduce(((e,n)=>{if("string"!=typeof n)return e.push(n),e;const o=n.split(h),a=n.match(h)||[];return e.push(o[0]),a.reduce(((e,n,a)=>{"jsx"===t?e.push(n.startsWith("**")?r.ZP.createElement("b",null,n.replace(/\*\*/g,"")):r.ZP.createElement("i",null,n.replace(/__/g,""))):e.push(n.startsWith("**")?`${n.replace(/\*\*/g,"")}`:`${n.replace(/__/g,"")}`);const i=2*a+2;return o[i]&&e.push(o[i]),e}),e)}),[])}function C(e,t){const n=(e.trim().match(/\n/g)||"").length+1,{lineHeight:r}=getComputedStyle(t),o=parseFloat(r.split("px")[0]);return t.clientHeight>=(n+1)*o}},20230:(e,t,n)=>{"use strict";n.d(t,{z:()=>S,H:()=>C});var r=n(14050),o=n(33555),a=n(6137),i=n(32340),s=n(64319),d=n(50711),u=n(97373),c=n(10088),l=n(46752),f=n(60706);const h=new Map,g=(0,l.y)("Spoiler"),p=(0,r.X$)((e=>{let{children:t,messageId:n}=e;const o=(0,r.sO)(null),[a,i,s]=(0,f.Z)(),d=(0,r.I4)((e=>{var t;e.preventDefault(),e.stopPropagation(),null===(t=h.get(n))||void 0===t||t.forEach((e=>e.reveal()));const r=o.current.innerText.length,a=1e3*Math.round(r/23),i=Math.max(5e3,Math.min(a,6e4));setTimeout((()=>{var e;null===(e=h.get(n))||void 0===e||e.forEach((e=>e.conceal())),s()}),i)}),[s,n]);return(0,r.d4)((()=>{if(n)return h.has(n)?h.get(n).push({reveal:i,conceal:s}):h.set(n,[{reveal:i,conceal:s}]),()=>{h.delete(n)}}),[s,d,a,n,i]),r.ZP.createElement("span",{className:g("&",!a&&"concealed",!a&&Boolean(n)&&"animated"),onClick:n&&!a?d:void 0},r.ZP.createElement("span",{className:g("content"),ref:o},t))}));var m=n(77510),v=n(12255),y=n(59107);const b=(0,r.X$)((e=>{let{text:t,className:n,noCopy:a,onWordWrapToggle:d}=e;const{showNotification:u}=(0,o.Sv)(),c=(0,r.sO)(null),f=(0,v.Z)(),h=(0,y.Z)(),[g,p]=(0,r.eJ)(!0),[m,b]=(0,r.eJ)(!1),w=(0,r.I4)((()=>{const e=(0,i.h)(t,c.current.parentElement);b(e)}),[t]);(0,r.d4)((()=>{g&&w()}),[w,g,t,f]);const I=(0,r.I4)((()=>{(0,s.TE)(t),u({message:h("TextCopied")})}),[h,u,t]),C=(0,r.I4)((()=>{p(!g),null==d||d(!g)}),[g,d]),S=(0,l.Z)("d09hp4fxFTuFw1emBUDA",!m&&a&&"We_Wcr7YvkkUM8ICjRAs"),E=(0,l.Z)("SwhO2lEtk47g68_ixpDe",n),P=(0,l.Z)("iEZTJnlmMCct8jJztTx8",g&&"B4kEjXkw8Sse9g0Xv_OO");return r.ZP.createElement("div",{className:E,ref:c},r.ZP.createElement("div",{className:S},m&&r.ZP.createElement("div",{className:P,onClick:C,title:"Word Wrap"},r.ZP.createElement("i",{className:"icon-word-wrap"})),!a&&r.ZP.createElement("div",{className:"deqdY4TS7mStC8qkslV4",onClick:I,title:h("Copy")},r.ZP.createElement("i",{className:"icon-copy"}))))})),w=(0,r.X$)((e=>{let{text:t,noCopy:n}=e;const[o,a]=(0,r.eJ)(!0),i=(0,r.I4)((e=>{a(e)}),[]),s=(0,l.Z)("text-entity-pre",!o&&"no-word-wrap");return r.ZP.createElement("pre",{className:s},r.ZP.createElement("div",{className:"pre-code custom-scroll-x"},t),r.ZP.createElement(b,{text:t,className:"code-overlay",onWordWrapToggle:i,noCopy:n}))})),I=(0,r.X$)((e=>{let{text:t,language:o,noCopy:a}=e;const[i,s]=(0,r.eJ)(!0),{result:d}=(0,m.Z)((()=>o?Promise.all([n.e(3966),n.e(4713)]).then(n.bind(n,94713)).then((e=>e.default(t,o))):Promise.resolve(void 0)),[o,t]),u=(0,r.I4)((e=>{s(e)}),[]);if(!d)return r.ZP.createElement(w,{text:t,noCopy:a});const c=(0,l.Z)("code-block",!i&&"no-word-wrap");return r.ZP.createElement("pre",{className:c},d,r.ZP.createElement(b,{text:t,className:"code-overlay",onWordWrapToggle:u,noCopy:a}))}));function C(e,t,n,o,s,d,f,h){if(!t||!t.length)return E(e,n,o,s,f);const g=[];let m=!1;const v=function(e){const t=new Set,n=[];return e.forEach(((r,o)=>{if(t.has(o))return;const a=P(r,o,e,t);a&&(a.organizedIndexes.forEach((e=>{t.add(e)})),n.push(a))})),n}(t);function y(t,g,v,b){const w=[],{entity:C,nestedEntities:S}=v,{offset:P,length:N,type:T}=C;let x=e.substring(t,P);const L=x.length;x&&(m&&x.length>0&&"\n"===x[0]&&(x=x.substr(1),m=!1),x&&w.push(...E(x,n,o,s,f)));const O=t+L,B=O+N;let R=e.substring(P,P+N);const D=[];if(m&&R.length>0&&"\n"===R[0]&&(R=R.substr(1),m=!1),T===a.Vv.Pre&&(m=!0),S.length){let e=O;S.forEach(((t,n)=>{const{renderResult:r,entityEndIndex:o}=y(e,B,t,n===S.length-1);D.push(...r),e=o}))}const $=s?function(e,t,n){const r="string"==typeof t?t:void 0,o=e.type===a.Vv.Pre?t.trimEnd():t,s=n.length?n.join(""):(0,i.Z)(o,["escape_html","emoji_html","br_html"]).join("");if(!r)return s;switch(e.type){case a.Vv.Bold:return`${s}`;case a.Vv.Italic:return`${s}`;case a.Vv.Underline:return`${s}`;case a.Vv.Code:return`${s}`;case a.Vv.Pre:return`\`\`\`${e.language||""}
${s}
\`\`\`
`;case a.Vv.Strike:return`${s}`;case a.Vv.MentionName:return`${s}`;case a.Vv.Url:case a.Vv.TextUrl:return`${s}`;case a.Vv.Spoiler:return`${s}`;default:return s}}(C,R,D):function(e,t,n,o,i,s,d){const f="string"==typeof t&&t,h=n.length?n:t;function g(){return E(h,o,void 0,void 0,s)}if(!f)return g();if(s){const t=g();return e.type===a.Vv.Spoiler?r.ZP.createElement(p,null,t):t}switch(e.type){case a.Vv.Bold:return r.ZP.createElement("strong",null,g());case a.Vv.Blockquote:return r.ZP.createElement("blockquote",null,g());case a.Vv.BotCommand:return r.ZP.createElement("a",{onClick:A,className:"text-entity-link",dir:"auto"},g());case a.Vv.Hashtag:case a.Vv.Cashtag:return r.ZP.createElement("a",{onClick:k,className:"text-entity-link",dir:"auto"},g());case a.Vv.Code:return r.ZP.createElement("code",{className:(0,l.Z)("text-entity-code",!d&&"clickable"),onClick:d?void 0:_,role:"textbox",tabIndex:0},g());case a.Vv.Email:return r.ZP.createElement("a",{href:`mailto:${f}`,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link",dir:"auto"},g());case a.Vv.Italic:return r.ZP.createElement("em",null,g());case a.Vv.MentionName:return r.ZP.createElement(u.Z,{userId:e.userId},g());case a.Vv.Mention:return r.ZP.createElement(u.Z,{username:f},g());case a.Vv.Phone:return r.ZP.createElement("a",{href:`tel:${f}`,className:"text-entity-link",dir:"auto"},g());case a.Vv.Pre:return r.ZP.createElement(I,{text:f,language:e.language,noCopy:d});case a.Vv.Strike:return r.ZP.createElement("del",null,g());case a.Vv.TextUrl:case a.Vv.Url:return r.ZP.createElement(c.Z,{url:M(f,e),text:f},g());case a.Vv.Underline:return r.ZP.createElement("ins",null,g());case a.Vv.Spoiler:return r.ZP.createElement(p,{messageId:i},g());default:return g()}}(C,R,D,n,d,f,h);if(Array.isArray($)?w.push(...$):w.push($),b&&B0&&"\n"===t[0]&&(t=t.substring(1)),t&&w.push(...E(t,n,o,s,f))}return{renderResult:w,entityEndIndex:B}}let b=0;return v.forEach(((t,n)=>{const{renderResult:r,entityEndIndex:o}=y(b,e.length,t,n===v.length-1);g.push(...r),b=o})),g}function S(e){const{text:t,entities:n}=e||{};if(!t)return"";const r=C(t,n,void 0,void 0,!0);return Array.isArray(r)?r.join(""):r}function E(e,t,n,r,o){if(Array.isArray(e)){const a=[];return e.forEach((e=>{a.push(...E(e,t,n,r,o))})),a}if(r)return(0,i.Z)(e,["escape_html","emoji_html","br_html"]);const a=[n?"hq_emoji":"emoji"];return o||a.push("br"),t?(0,i.Z)(e,a.concat("highlight"),{highlight:t}):(0,i.Z)(e,a)}function P(e,t,n,r){const{offset:o,length:a}=e,i=new Set([t]);if(r.has(t))return;const s=[];return n.filter(((e,n)=>n>t&&e.offset>=o&&e.offsetP(e,n.indexOf(e),n,r))).filter(Boolean).forEach((e=>{let t=!1;e.organizedIndexes.forEach((e=>{t||i.has(e)||(t=!0),i.add(e)})),t&&s.push(e)})),{entity:e,organizedIndexes:i,nestedEntities:s}}function M(e,t){const{type:n,url:r}=t;return n===a.Vv.TextUrl&&r?r:e}function A(e){(0,o.Sv)().sendBotCommand({command:e.currentTarget.innerText})}function k(e){(0,o.Sv)().setLocalTextSearchQuery({query:e.currentTarget.innerText}),(0,o.Sv)().searchTextMessagesLocal()}function _(e){(0,s.TE)(e.currentTarget.innerText),(0,o.Sv)().showNotification({message:(0,d.i0)("TextCopied")})}},30386:(e,t,n)=>{"use strict";n.d(t,{b:()=>i,q:()=>a});var r=n(83716),o=n(77361);function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o.cj||!document.activeElement||document.activeElement.id!==r.R2||!t&&e.target!==e.currentTarget||e.preventDefault()}function i(e){a(e,!0)}},97373:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(14050),o=n(33555),a=n(11192);const i=(0,o.c$)(((e,t)=>{let{userId:n}=t;return{userOrChat:n?(0,a.dy)(e,n):void 0}}))((e=>{let{username:t,userOrChat:n,children:a}=e;const{openChat:i,openChatByUsername:s}=(0,o.Sv)();return r.ZP.createElement("a",{onClick:()=>{n?i({id:n.id}):t&&s({username:t.substring(1)})},className:"text-entity-link",dir:"auto"},a)}))},231:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(14050),o=n(46752),a=n(80036),i=n(49204),s=n(68512);const d=e=>{let{ref:t,type:n="button",id:d,onClick:u,onContextMenu:c,onMouseDown:l,onMouseEnter:f,onMouseLeave:h,onFocus:g,children:p,size:m="default",color:v="primary",backgroundImage:y,className:b,round:w,pill:I,fluid:C,isText:S,isLoading:E,isShiny:P,ariaLabel:M,ariaControls:A,hasPopup:k,href:_,download:N,disabled:T,ripple:x,faded:L,tabIndex:O,isRtl:B,noPreventDefault:R,shouldStopPropagation:D,style:$}=e,F=(0,r.sO)(null);t&&(F=t);const[Z,U]=(0,r.eJ)(!1),j=(0,o.Z)("Button",b,m,v,w&&"round",I&&"pill",C&&"fluid",T&&"disabled",S&&"text",E&&"loading",x&&"has-ripple",L&&"faded",Z&&"clicked",y&&"with-image",P&&"shiny"),W=(0,r.I4)((e=>{!T&&u&&u(e),D&&e.stopPropagation(),U(!0),setTimeout((()=>{U(!1)}),400)}),[T,u,D]),V=(0,r.I4)((e=>{R||e.preventDefault(),!T&&l&&l(e)}),[T,R,l]);return _?r.ZP.createElement("a",{ref:F,id:d,className:j,href:_,title:M,download:N,tabIndex:O,dir:B?"rtl":void 0,"aria-label":M,"aria-controls":A,style:$},p,!T&&x&&r.ZP.createElement(s.Z,null)):r.ZP.createElement("button",{ref:F,id:d,type:n,className:j,onClick:W,onContextMenu:c,onMouseDown:V,onMouseEnter:f&&!T?f:void 0,onMouseLeave:h&&!T?h:void 0,onFocus:g&&!T?g:void 0,"aria-label":M,"aria-controls":A,"aria-haspopup":k,title:M,tabIndex:O,dir:B?"rtl":void 0,style:(0,a.Z)(y&&`background-image: url(${y})`)},E?r.ZP.createElement("div",null,r.ZP.createElement("span",{dir:B?"auto":void 0},"Please wait..."),r.ZP.createElement(i.Z,{color:S?"blue":"white"})):p,!T&&x&&r.ZP.createElement(s.Z,null))}},14605:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(14050),o=n(46752),a=n(59107),i=n(32340),s=n(49204);const d=(0,r.X$)((e=>{let{id:t,name:n,value:d,label:u,subLabel:c,checked:l,tabIndex:f,disabled:h,round:g,blocking:p,isLoading:m,className:v,onChange:y,onCheck:b}=e;const w=(0,a.Z)(),I=(0,r.I4)((e=>{y&&y(e),b&&b(e.currentTarget.checked)}),[y,b]),C=(0,o.Z)("Checkbox",h&&"disabled",g&&"round",m&&"loading",p&&"blocking",v);return r.ZP.createElement("label",{className:C,dir:w.isRtl?"rtl":void 0},r.ZP.createElement("input",{type:"checkbox",id:t,name:n,value:d,checked:l,disabled:h,tabIndex:f,onChange:I}),r.ZP.createElement("div",{className:"Checkbox-main"},r.ZP.createElement("span",{className:"label",dir:"auto"},"string"==typeof u?(0,i.Z)(u):u),c&&r.ZP.createElement("span",{className:"subLabel",dir:"auto"},(0,i.Z)(c))),m&&r.ZP.createElement(s.Z,null))}))},53106:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(52328);const a=e=>{let{trigger:t,className:n,children:a,positionX:i="left",positionY:s="top",footer:d,forceOpen:u,onOpen:c,onClose:l}=e;const f=(0,r.sO)(null),h=(0,r.sO)(null),[g,p]=(0,r.eJ)(!1),m=(0,r.I4)((()=>{p(!1),l&&l()}),[l]);return r.ZP.createElement("div",{ref:h,className:`DropdownMenu ${n||""}`,onKeyDown:e=>{const t=f.current;if(!g||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()}},t({onTrigger:()=>{p(!g),g?l&&l():c&&c()},isOpen:g}),r.ZP.createElement(o.Z,{ref:f,containerRef:h,isOpen:g||Boolean(u),className:n||"",positionX:i,positionY:s,footer:d,autoClose:!0,onClose:m,shouldSkipTransition:u},a))}},97687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(14050),o=n(46752),a=n(59107);const i=(0,r.X$)((e=>{let{ref:t,id:n,className:i,value:s,label:d,error:u,success:c,disabled:l,readOnly:f,placeholder:h,autoComplete:g,inputMode:p,maxLength:m,tabIndex:v,teactExperimentControlled:y,onChange:b,onInput:w,onKeyPress:I,onKeyDown:C,onBlur:S,onPaste:E}=e;const P=(0,a.Z)(),M=u||c||d,A=(0,o.Z)("input-group",s&&"touched",u?"error":c&&"success",l&&"disabled",f&&"disabled",M&&"with-label",i);return r.ZP.createElement("div",{className:A,dir:P.isRtl?"rtl":void 0},r.ZP.createElement("input",{ref:t,className:"form-control",type:"text",id:n,dir:"auto",value:s||"",tabIndex:v,placeholder:h,maxLength:m,autoComplete:g,inputMode:p,disabled:l,readOnly:f,onChange:b,onInput:w,onKeyPress:I,onKeyDown:C,onBlur:S,onPaste:E,"aria-label":M,teactExperimentControlled:y}),M&&r.ZP.createElement("label",{htmlFor:n},M))}))},88033:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(46752);const a=e=>{let{children:t,className:n,isRtl:a,onClick:i}=e;const s=(0,r.I4)((e=>{e.preventDefault(),i(e)}),[i]);return r.ZP.createElement("a",{href:"#",className:(0,o.Z)("Link",n),dir:a?"rtl":"auto",onClick:i?s:void 0},t)}},34288:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(14050),o=n(49204),a=n(46752);const i=(0,r.X$)((e=>{let{color:t="blue",backgroundColor:n,onClick:i}=e;return r.ZP.createElement("div",{className:(0,a.Z)("Loading",i&&"interactive"),onClick:i},r.ZP.createElement(o.Z,{color:t,backgroundColor:n}))}))},52328:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(14050),o=n(31212),a=n(72313),i=n(58758),s=n(274),d=n(23989),u=n(46752),c=n(80036),l=n(18674),f=n(46590),h=n(30386),g=n(77361);const p=e=>{let{ref:t,containerRef:n,isOpen:p,id:m,className:v,style:y,bubbleStyle:b,ariaLabelledBy:w,children:I,transformOriginX:C,transformOriginY:S,positionX:E="left",positionY:P="top",autoClose:M=!1,footer:A,noCloseOnBackdrop:k=!1,noCompact:_,onCloseAnimationEnd:N,onClose:T,onMouseEnter:x,onMouseLeave:L,shouldSkipTransition:O}=e,B=(0,r.sO)(null);t&&(B=t);const R=n||B,{transitionClassNames:D}=(0,o.Z)(p,N,O,void 0,O);(0,r.d4)((()=>p?(0,d.Z)(T):void 0),[p,T]),(0,f.Z)({isActive:p,onBack:T,shouldBeReplaced:!0}),(0,s.Z)((e=>{let[t]=e;(p||!p&&!0===t)&&(0,l.YW)(200)}),[p]);const $=(0,a.Z)(B,p,M?T:void 0,void 0,!0);(0,i.Z)(p,R,k?void 0:T);const F=(0,u.Z)("bubble menu-container custom-scroll",P,E,A&&"with-footer",D),Z=void 0!==S?`${S}px`:void 0,U=void 0!==C?`${C}px`:void 0;return r.ZP.createElement("div",{id:m,className:(0,u.Z)("Menu no-selection",!_&&g.FW&&"compact",!g.gk&&"no-blur",v),style:y,"aria-labelledby":w,role:w?"menu":void 0,onKeyDown:p?$:void 0,onMouseEnter:x,onMouseLeave:p?L:void 0},p&&r.ZP.createElement("div",{className:"backdrop",onMouseDown:h.b}),r.ZP.createElement("div",{ref:B,className:F,style:(0,c.Z)(`transform-origin: ${U||E} ${Z||P}`,b),onClick:M?T:void 0},I,A&&r.ZP.createElement("div",{className:"footer"},A)))}},58964:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(14050),o=n(83716),a=n(46752),i=n(59107),s=n(77361);const d=e=>{const{icon:t,customIcon:n,className:d,children:u,onClick:c,href:l,download:f,disabled:h,destructive:g,ariaLabel:p,onContextMenu:m}=e,v=(0,i.Z)(),y=(0,r.I4)((e=>{if(h||!c)return e.stopPropagation(),void e.preventDefault();c(e)}),[h,c]),b=(0,r.I4)((e=>{if(13===e.keyCode||32===e.keyCode)return h||!c?(e.stopPropagation(),void e.preventDefault()):void c(e)}),[h,c]),w=(0,a.Z)("MenuItem",d,h&&"disabled",g&&"destructive",s.FW&&"compact"),I=r.ZP.createElement(r.ZP.Fragment,null,!n&&t&&r.ZP.createElement("i",{className:`icon-${t}`,"data-char":t.startsWith("char-")?t.replace("char-",""):void 0}),n,u);return l?r.ZP.createElement("a",{tabIndex:0,className:w,href:l,download:f,"aria-label":p,title:p,target:l.startsWith(window.location.origin)||o.Cg?"_self":"_blank",rel:"noopener noreferrer",dir:v.isRtl?"rtl":void 0,onClick:c},I):r.ZP.createElement("div",{role:"button",tabIndex:0,className:w,onClick:y,onKeyDown:b,onContextMenu:m,"aria-label":p,title:p,dir:v.isRtl?"rtl":void 0},I)}},68512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(69118);const a=(0,r.X$)((()=>{const[e,t]=(0,r.eJ)([]),n=(0,r.Ye)((()=>(0,o.Ds)((()=>{t([])}),700,!1)),[]),a=(0,r.I4)((r=>{if(0!==r.button)return;const o=r.currentTarget,a=o.getBoundingClientRect(),i=o.offsetWidth/2;t([...e,{x:r.clientX-a.x-i/2,y:r.clientY-a.y-i/2,size:i}]),requestAnimationFrame((()=>{n()}))}),[e,n]);return r.ZP.createElement("div",{className:"ripple-container",onMouseDown:a},e.map((e=>{let{x:t,y:n,size:o}=e;return r.ZP.createElement("span",{style:`left: ${t}px; top: ${n}px; width: ${o}px; height: ${o}px;`})})))}))},49204:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(46752);const a=e=>{let{color:t="blue",backgroundColor:n}=e;return r.ZP.createElement("div",{className:(0,o.Z)("Spinner",t,n&&"with-background",`bg-${n}`)},r.ZP.createElement("div",null))}},2255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(14050),o=n(33555),a=n(83716),i=n(46752),s=n(82972),d=n(1279),u=n(65326),c=n(87204),l=n(18674);const f="Transition__slide--active",h=e=>{let{ref:t,activeKey:n,name:h,direction:g="auto",renderCount:p,shouldRestoreHeight:m,shouldCleanup:v,cleanupExceptionKey:y,id:b,className:w,onStart:I,onStop:C,children:S}=e;const{animationLevel:E}=(0,o.Rd)().settings.byKey,P=(0,r.sO)();let M=(0,r.sO)(null);t&&(M=t);const A=(0,r.sO)({}),k=(0,c.Z)(n),_=(0,u.Z)(),N=void 0!==k&&n!==k;!p&&N&&(A.current={[k]:A.current[k]}),A.current[n]=S,(0,r.bt)((()=>{function e(){if(!v)return;const e=void 0!==y?A.current[y]:void 0;A.current=e?{[y]:e}:{},_()}const t=M.current,r=t.children;if(1===r.length&&!N)return h.startsWith("slide-optimized")&&(r[0].style.transition="none",r[0].style.transform="translate3d(0, 0, 0)"),void r[0].classList.add(f);const o=Array.from(t.childNodes);if(!N||!o.length)return;P.current=n;const i=-1===g||"auto"===g&&k>n||"inverse"===g&&k{null==h||h(),m.style.transition="none",m.style.transform="translate3d(0, 0, 0)",p.style.transition="none",p.style.transform=`translate3d(${n?"-":""}100%, 0, 0)`,(0,s.Z)(p),m.style.transition="",m.style.transform=`translate3d(${n?"":"-"}100%, 0, 0)`,p.style.transition="",p.style.transform="translate3d(0, 0, 0)",m.classList.remove(f),p.classList.add(f),(0,d.L)(m,(()=>{o===i.current&&(m.style.transition="none",m.style.transform="",c&&(p.style.height="auto",u.style.height=`${p.clientHeight}px`),null==g||g(),v(),r())}))}))}(E,h,i,e,n,P,t,m,I,C,o[b],o[c]);if(t.classList.remove("animating"),t.classList.toggle("backwards",i),"none"===h||E===a.oB)return o.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle(f,t===b))})),void e();o.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove(f),e.classList.toggle("from",t===c),e.classList.toggle("through",t>c&&tb),e.classList.toggle("to",t===b))}));const w=(0,l.YW)();requestAnimationFrame((()=>{var r;function a(){requestAnimationFrame((()=>{if(n===P.current){if(t.classList.remove("animating","backwards"),o.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle(f,t===b))})),m){const e=t.querySelector(`.${f}`);e&&(e.style.height="auto",t.style.height=`${e.clientHeight}px`)}null==C||C(),w(),e()}}))}t.classList.add("animating"),null==I||I();const s="mv-slide"===h?null===(r=o[b])||void 0===r?void 0:r.firstChild:"reveal"===h&&i?o[c]:o[b];s?(0,d.f)(s,a):a()}))}),[n,k,N,g,h,I,C,p,m,v,y,E,_]),(0,r.bt)((()=>{if(m){const e=M.current,t=e.querySelector(`.${f}`)||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=`${t.clientHeight}px`,e.style.flexBasis=`${t.clientHeight}px`)}}),[m,S]);const T=A.current,x=Object.keys(p?new Array(p).fill(void 0):T).map(Number).map((e=>{const t=T[e];if(t)return r.ZP.createElement("div",{key:e,teactOrderKey:e},"function"==typeof t?t(e===n,e===k,n):t)}));return r.ZP.createElement("div",{ref:M,id:b,className:(0,i.Z)("Transition",w,h),teactFastList:!p},x)}},83716:(e,t,n)=>{"use strict";n.d(t,{$E:()=>$e,$O:()=>gt,$R:()=>Ie,AJ:()=>pe,AR:()=>Q,BR:()=>je,Bg:()=>pt,CX:()=>J,Cg:()=>u,Cy:()=>E,DC:()=>ke,DU:()=>ct,EG:()=>lt,EN:()=>$,Ed:()=>oe,FD:()=>ot,FM:()=>Xe,FS:()=>tt,FV:()=>st,Hk:()=>Z,It:()=>yt,Iz:()=>xe,J0:()=>G,Ji:()=>o,K2:()=>Te,K7:()=>Ce,LH:()=>Et,MP:()=>ge,Mo:()=>V,Mw:()=>Ae,Nf:()=>dt,Ng:()=>He,Nu:()=>d,Ov:()=>D,PM:()=>Re,Q:()=>Me,QU:()=>ie,Qx:()=>z,R2:()=>ne,Rk:()=>S,Ro:()=>Ct,S:()=>f,SG:()=>M,Ti:()=>h,Tj:()=>c,Uh:()=>w,V$:()=>ve,VC:()=>Ye,Vk:()=>U,Vv:()=>wt,Vx:()=>v,WS:()=>ut,Y:()=>ze,Y7:()=>_e,YQ:()=>O,ZT:()=>s,_m:()=>de,aC:()=>St,aw:()=>at,b6:()=>X,bK:()=>ye,bM:()=>Le,bW:()=>it,b_:()=>m,by:()=>N,ck:()=>be,dI:()=>Je,dW:()=>Ue,e7:()=>Ke,eA:()=>p,eM:()=>i,ee:()=>_,fK:()=>me,fo:()=>k,g:()=>bt,g$:()=>et,gJ:()=>C,hT:()=>L,iC:()=>r,jL:()=>nt,jT:()=>se,jV:()=>De,k:()=>Ze,kU:()=>Ve,ks:()=>ue,ku:()=>Oe,l3:()=>le,lF:()=>A,lO:()=>I,lW:()=>P,lo:()=>x,mU:()=>mt,mo:()=>j,mw:()=>H,nY:()=>re,oB:()=>q,oG:()=>Ge,oX:()=>y,o_:()=>te,ou:()=>g,p3:()=>vt,pJ:()=>It,pR:()=>We,pn:()=>F,pr:()=>Pt,qU:()=>W,qp:()=>Pe,rO:()=>he,rS:()=>B,r_:()=>ee,s2:()=>ae,s3:()=>Fe,sR:()=>ht,sd:()=>b,sg:()=>ce,t4:()=>ft,t_:()=>R,uW:()=>Qe,u_:()=>fe,ul:()=>l,w7:()=>Se,wG:()=>qe,xH:()=>a,xS:()=>Y,xn:()=>we,yK:()=>Ne,z7:()=>Ee,zH:()=>rt,zq:()=>Be,zy:()=>K});const r="Telegram WebZ",o="1.50.2",a="web.telegram.org",i=!1,s=!1,d=!1,u=!1,c=!1,l="https://telegra.ph/WebZ-Beta-04-01",f="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",h="Telegram",g=" [Inactive]",p=!1,m="user_auth",v="GramJs:sessionId",y="tt-passcode",b=!1,w="tt-global-state",I=500,C=200,S=30,E=!1,P="tt-media",M="tt-media-avatars",A="tt-media-progressive",k="tt-custom-bg",_="tt-lang-packs-v12",N=[1,5,10,50,100,500],T="undefined"!=typeof window&&window.innerHeight>=900,x=1,L=T?60:40,O=2*L,B=72,R=T?30:25,D=100,$=42,F=42,Z=20,U=30,j=200,W=500,V=20,z=1,H=1,G=1200,q=0,K=2,J=K,Y=16,X=17,Q=15,ee=1e4,te=3e3,ne="editable-message-text",re="editable-message-text-modal",oe=`.messages-layout .Transition__slide--active #${ne}, .messages-layout .Transition > .to #${ne}`,ae="data-has-custom-appendix",ie=1440,se=1150,de=1275,ue=925,ce=1340,le=600,fe=950,he=450,ge=1e11,pe="0",me=100,ve=1500,ye=250,be=600,we=500,Ie=(Math.round((ye+be)/2),new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),200),Ce=13,Se=11,Ee=160,Pe=120,Me=64,Ae=48,ke=32,_e=64,Ne=64,Te=160,xe=160,Le=140,Oe=100,Be=100,Re=140,De=140,$e="NO_STICKER_SET",Fe="recent",Ze="favorite",Ue="chatStickers",je="premium",We="en",Ve=200,ze=450,He="video/quicktime",Ge=new Set(["image/png","image/gif","image/jpeg"]),qe=new Set(["video/mp4"]),Ke=new Set(["audio/mp3","audio/ogg","audio/wav","audio/mpeg","audio/flac","audio/aac","audio/m4a","audio/mp4","audio/x-m4a"]),Je=new Set([...Ge,...qe]),Ye="The message is not supported on this version of Telegram.",Xe="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,63})\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)",Qe="(@[\\w\\d_-]+)",et=/^tg:(\/\/)?([?=&\d\w_-]+)?/,tt=/^(https?:\/\/)?t\.me\//,nt=/^(https?:\/\/)?telegram\.org\//,rt="https://t.me/",ot=new Set(["AU","BD","CA","CO","EG","HN","IE","IN","JO","MX","MY","NI","NZ","PH","PK","SA","SV","US"]),at="777000",it="42777",st="1271266957",dt=0,ut=1,ct=10,lt=5,ft=2147483646,ht="en",gt="android",pt=["android","ios","tdesktop","macos"],mt="https://bugs.telegram.org/?tag_ids=41&sort=time",vt="#99BA92",yt="#0F0F0F",bt="#4A8E3A8C",wt="#0A0A0A8C",It=524288,Ct=100,St=100*Ct,Et=!1,Pt={uploadMaxFileparts:[4e3,8e3],stickersFaved:[5,10],savedGifs:[200,400],dialogFiltersChats:[100,200],dialogFilters:[10,20],dialogFolderPinned:[5,10],captionLength:[1024,2048],channels:[500,1e3],channelsPublic:[10,20],aboutLength:[70,140]}},65456:(e,t,n)=>{"use strict";var r=n(33555),o=n(71226),a=n(83716),i=n(77361),s=n(28406),d=n(49524),u=n(17358),c=n(3100),l=n(706),f=n(5161),h=n(95281),g=n(5872);(0,r.iw)("initApi",(async(e,t)=>{a.Cg||(await(0,c.Qw)(),(0,c.f3)()),(0,o.g8)(t.apiUpdate,{userAgent:navigator.userAgent,platform:i.Lt,sessionData:(0,c.K8)(),isTest:window.location.search.includes("test"),isMovSupported:i.pA,isWebmSupported:i.Hh,maxBufferSize:i.l0})})),(0,r.iw)("setAuthPhoneNumber",((e,t,n)=>{const{phoneNumber:r}=n;return(0,o.t9)("provideAuthPhoneNumber",r.replace(/[^\d]/g,"")),{...e,authIsLoading:!0,authError:void 0}})),(0,r.iw)("setAuthCode",((e,t,n)=>{const{code:r}=n;return(0,o.t9)("provideAuthCode",r),{...e,authIsLoading:!0,authError:void 0}})),(0,r.iw)("setAuthPassword",((e,t,n)=>{const{password:r}=n;return(0,o.t9)("provideAuthPassword",r),{...e,authIsLoading:!0,authError:void 0}})),(0,r.iw)("uploadProfilePhoto",((e,t,n)=>{const{file:r}=n;(0,o.t9)("uploadProfilePhoto",r)})),(0,r.iw)("signUp",((e,t,n)=>{const{firstName:r,lastName:a}=n;return(0,o.t9)("provideAuthRegistration",{firstName:r,lastName:a}),{...e,authIsLoading:!0,authError:void 0}})),(0,r.iw)("returnToAuthPhoneNumber",(e=>((0,o.t9)("restartAuth"),{...e,authError:void 0}))),(0,r.iw)("goToAuthQrCode",(e=>((0,o.t9)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0}))),(0,r.iw)("saveSession",((e,t,n)=>{if(e.passcode.isScreenLocked)return;const{sessionData:r}=n;r?(0,c.wX)(n.sessionData,e.currentUserId):(0,c.jv)()})),(0,r.iw)("signOut",(async(e,t,n)=>{try{await(0,s.r1)(),await(0,o.t9)("destroy"),await(0,l.IT)(!1)}catch(e){}(0,r.Sv)().reset(),null!=n&&n.forceInitApi&&(0,r.Sv)().initApi()})),(0,r.iw)("reset",(()=>{(0,c.jv)(),(0,h.C8)(),d.clear(a.lW),d.clear(a.SG),d.clear(a.lF),d.clear(a.fo);const e=a.ee.replace(/\d+$/,""),t=(a.ee.match(/\d+$/)||[0])[0];for(let n=0;n{(0,o.t9)("disconnect")})),(0,r.iw)("loadNearestCountry",(async e=>{if("connectionStateReady"!==e.connectionState)return;const t=await(0,o.t9)("fetchNearestCountry");(0,r.R3)({...(0,r.Rd)(),authNearestCountry:t})})),(0,r.iw)("setDeviceToken",((e,t,n)=>({...e,push:{deviceToken:n,subscribedAt:Date.now()}}))),(0,r.iw)("deleteDeviceToken",(e=>({...e,push:void 0}))),(0,r.iw)("lockScreen",(async e=>{const t=JSON.stringify({...(0,c.K8)(),userId:e.currentUserId}),n=(0,g.Uf)(e);await(0,h.H4)(t,n),(0,h.J9)(),(0,c.jv)(),(0,u.w)(0),e=(0,r.Rd)(),(0,r.R3)((0,f.vu)(e,{isScreenLocked:!0,invalidAttemptsCount:0})),setTimeout((()=>{(0,r.R3)((0,f.ZI)((0,r.Rd)()))}),a.$R);try{await(0,s.r1)(),await(0,o.t9)("destroy",!0)}catch(e){}}))},51371:(e,t,n)=>{"use strict";var r=n(33555),o=n(91713),a=n(83716),i=n(71226),s=n(60782),d=n(28406),u=n(50711),c=n(11192),l=n(5161),f=n(83158);function h(e,t){let{visibility:n,allowedIds:r,deniedIds:o}=t;const{users:{byId:a},chats:{byId:i}}=e,s={visibility:n};let d,u;const c=e=>{if(!(0,f.YC)(e))return;const{id:t,accessHash:n}=a[e]||{};return t?{id:t,accessHash:n}:void 0},l=e=>{if((0,f.YC)(e))return;const t=i[e];return t?{id:t.id}:void 0};return"contacts"!==n&&"nobody"!==n||(d=r.map(c).filter(Boolean),u=r.map(l).filter(Boolean),d.length>0&&(s.allowedUsers=d),u.length>0&&(s.allowedChats=u)),"everybody"!==n&&"contacts"!==n||(d=o.map(c).filter(Boolean),u=o.map(l).filter(Boolean),d.length>0&&(s.blockedUsers=d),u.length>0&&(s.blockedChats=u)),s}(0,r.iw)("updateProfile",(async(e,t,n)=>{const{photo:a,firstName:s,lastName:d,bio:u,username:f}=n,{currentUserId:h}=e;if(h){if((0,r.R3)({...(0,r.Rd)(),profileEdit:{progress:o.rN.InProgress}}),a&&await(0,i.t9)("updateProfilePhoto",a),(s||d||u)&&await(0,i.t9)("updateProfile",{firstName:s,lastName:d,about:u})){e=(0,r.Rd)();const t=h&&(0,c.dy)(e,h);t&&(0,r.R3)((0,l.Nq)(e,t.id,{firstName:s,lastName:d,fullInfo:{...t.fullInfo,bio:u}}))}f&&await(0,i.t9)("updateUsername",f)&&h&&(0,r.R3)((0,l.Nq)((0,r.Rd)(),h,{username:f})),(0,r.R3)({...(0,r.Rd)(),profileEdit:{progress:o.rN.Complete}})}})),(0,r.iw)("checkUsername",(async(e,t,n)=>{const{username:a}=n;if(e.profileEdit&&e.profileEdit.progress===o.rN.InProgress)return;(0,r.R3)({...e,profileEdit:{progress:e.profileEdit?e.profileEdit.progress:o.rN.Idle,isUsernameAvailable:void 0}});const s=await(0,i.t9)("checkUsername",a);e=(0,r.Rd)(),(0,r.R3)({...e,profileEdit:{...e.profileEdit,isUsernameAvailable:s}})})),(0,r.iw)("loadWallpapers",(async()=>{const e=await(0,i.t9)("fetchWallpapers");if(!e)return;const t=(0,r.Rd)();(0,r.R3)({...t,settings:{...t.settings,loadedWallpapers:e.wallpapers}})})),(0,r.iw)("uploadWallpaper",(async(e,t,n)=>{const a=n,s=URL.createObjectURL(a);(0,r.R3)({...e,settings:{...e.settings,loadedWallpapers:[{slug:o.mp,document:{fileName:"",size:a.size,mimeType:a.type,previewBlobUrl:s}},...e.settings.loadedWallpapers||[]]}});const d=await(0,i.t9)("uploadWallpaper",a);if(!d)return;const{wallpaper:u}=d;if(!(e=(0,r.Rd)()).settings.loadedWallpapers)return;const c=e.settings.loadedWallpapers[0];if(!c||c.slug!==o.mp)return;const l={...u,document:{...u.document,previewBlobUrl:s}};(0,r.R3)({...e,settings:{...e.settings,loadedWallpapers:[l,...e.settings.loadedWallpapers.slice(1)]}})})),(0,r.iw)("loadBlockedContacts",(async e=>{var t,n;const o=await(0,i.t9)("fetchBlockedContacts");o&&(e=(0,r.Rd)(),null!==(t=o.users)&&void 0!==t&&t.length&&(e=(0,l.Sh)(e,(0,s.ee)(o.users,"id"))),null!==(n=o.chats)&&void 0!==n&&n.length&&(e=(0,l.GL)(e,(0,s.ee)(o.chats,"id"))),e={...e,blocked:{...e.blocked,ids:[...e.blocked.ids||[],...o.blockedIds],totalCount:o.totalCount}},(0,r.R3)(e))})),(0,r.iw)("blockContact",(async(e,t,n)=>{const{contactId:o,accessHash:a}=n;await(0,i.t9)("blockContact",o,a)&&(0,r.R3)((0,l.O4)((0,r.Rd)(),o))})),(0,r.iw)("unblockContact",(async(e,t,n)=>{const{contactId:o}=n;let a;if((0,f.YC)(o)){const t=(0,c.dy)(e,o);if(!t)return;a=t.accessHash}await(0,i.t9)("unblockContact",o,a)&&(0,r.R3)((0,l.rB)((0,r.Rd)(),o))})),(0,r.iw)("loadNotificationExceptions",(async e=>{const{serverTimeOffset:t}=e,n=await(0,i.t9)("fetchNotificationExceptions",{serverTimeOffset:t});n&&(0,r.R3)((0,l.aJ)((0,r.Rd)(),n))})),(0,r.iw)("loadNotificationSettings",(async e=>{const{serverTimeOffset:t}=e,n=await(0,i.t9)("fetchNotificationSettings",{serverTimeOffset:t});n&&(0,r.R3)((0,l.BI)((0,r.Rd)(),n))})),(0,r.iw)("updateNotificationSettings",(async(e,t,n)=>{const{peerType:o,isSilent:a,shouldShowPreviews:s}=n;await(0,i.t9)("updateNotificationSettings",o,{isSilent:a,shouldShowPreviews:s})&&(0,r.R3)((0,l.HN)((0,r.Rd)(),o,a,s))})),(0,r.iw)("updateWebNotificationSettings",((e,t,n)=>{(0,r.R3)((0,l.BI)(e,n));const{hasPushNotifications:o,hasWebNotifications:a}=e.settings.byKey;a&&o?(0,d.Ld)():(0,d.r1)()})),(0,r.iw)("updateContactSignUpNotification",(async(e,t,n)=>{const{isSilent:o}=n;await(0,i.t9)("updateContactSignUpNotification",o)&&(0,r.R3)((0,l.BI)((0,r.Rd)(),{hasContactJoinedNotifications:!o}))})),(0,r.iw)("loadLanguages",(async()=>{const e=await(0,i.t9)("fetchLanguages");e&&(0,r.R3)((0,l.BI)((0,r.Rd)(),{languages:e}))})),(0,r.iw)("loadPrivacySettings",(async e=>{const[t,n,o,a,s,d,u]=await Promise.all([(0,i.t9)("fetchPrivacySettings","phoneNumber"),(0,i.t9)("fetchPrivacySettings","lastSeen"),(0,i.t9)("fetchPrivacySettings","profilePhoto"),(0,i.t9)("fetchPrivacySettings","forwards"),(0,i.t9)("fetchPrivacySettings","chatInvite"),(0,i.t9)("fetchPrivacySettings","phoneCall"),(0,i.t9)("fetchPrivacySettings","phoneP2P")]);t&&n&&o&&a&&s&&d&&u&&(e=(0,r.Rd)(),(0,r.R3)({...e,settings:{...e.settings,privacy:{...e.settings.privacy,phoneNumber:t,lastSeen:n,profilePhoto:o,forwards:a,chatInvite:s,phoneCall:d,phoneP2P:u}}}))})),(0,r.iw)("setPrivacyVisibility",(async(e,t,n)=>{const{privacyKey:o,visibility:a}=n,{privacy:{[o]:s}}=e.settings;if(!s)return;const d=h(e,{visibility:a,allowedIds:[...s.allowUserIds,...s.allowChatIds],deniedIds:[...s.blockUserIds,...s.blockChatIds]}),u=await(0,i.t9)("setPrivacySettings",o,d);u&&(e=(0,r.Rd)(),(0,r.R3)({...e,settings:{...e.settings,privacy:{...e.settings.privacy,[o]:u}}}))})),(0,r.iw)("setPrivacySettings",(async(e,t,n)=>{const{privacyKey:o,isAllowList:a,contactsIds:s}=n,{privacy:{[o]:d}}=e.settings;if(!d)return;const u=h(e,{visibility:d.visibility,allowedIds:a?s:[...d.allowUserIds,...d.allowChatIds],deniedIds:a?[...d.blockUserIds,...d.blockChatIds]:s}),c=await(0,i.t9)("setPrivacySettings",o,u);c&&(e=(0,r.Rd)(),(0,r.R3)({...e,settings:{...e.settings,privacy:{...e.settings.privacy,[o]:c}}}))})),(0,r.iw)("updateIsOnline",((e,t,n)=>{(0,i.t9)("updateIsOnline",n)})),(0,r.iw)("loadContentSettings",(async()=>{const e=await(0,i.t9)("fetchContentSettings");e&&(0,r.R3)((0,l.BI)((0,r.Rd)(),e))})),(0,r.iw)("updateContentSettings",(async(e,t,n)=>{(0,r.R3)((0,l.BI)((0,r.Rd)(),{isSensitiveEnabled:n})),await(0,i.t9)("updateContentSettings",n)||(0,r.R3)((0,l.BI)((0,r.Rd)(),{isSensitiveEnabled:!n}))})),(0,r.iw)("loadCountryList",(async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{langCode:o}=n;o||(o=e.settings.byKey.language);const a=await(0,i.t9)("fetchCountryList",{langCode:o});a&&(0,r.R3)({...(0,r.Rd)(),countryList:a})})),(0,r.iw)("ensureTimeFormat",(async(e,t)=>{if(e.authNearestCountry){const n=a.FD.has(e.authNearestCountry.toUpperCase())?"12h":"24h";t.setSettingOption({timeFormat:n}),(0,u.qf)(n)}if(e.settings.byKey.wasTimeFormatSetManually)return;const n=await(0,i.t9)("fetchNearestCountry");if(n){const e=a.FD.has(n.toUpperCase())?"12h":"24h";t.setSettingOption({timeFormat:e}),(0,u.qf)(e)}})),(0,r.iw)("loadAppConfig",(async()=>{const e=await(0,i.t9)("fetchAppConfig");e&&(0,r.R3)({...(0,r.Rd)(),appConfig:e})})),(0,r.iw)("loadGlobalPrivacySettings",(async()=>{const e=await(0,i.t9)("fetchGlobalPrivacySettings");e&&(0,r.R3)((0,l.BI)((0,r.Rd)(),{shouldArchiveAndMuteNewNonContact:e.shouldArchiveAndMuteNewNonContact}))})),(0,r.iw)("updateGlobalPrivacySettings",(async(e,t,n)=>{const{shouldArchiveAndMuteNewNonContact:o}=n;(0,r.R3)((0,l.BI)((0,r.Rd)(),{shouldArchiveAndMuteNewNonContact:o}));const a=await(0,i.t9)("updateGlobalPrivacySettings",{shouldArchiveAndMuteNewNonContact:o});(0,r.R3)((0,l.BI)((0,r.Rd)(),{shouldArchiveAndMuteNewNonContact:a?a.shouldArchiveAndMuteNewNonContact:!o}))}))},28304:(e,t,n)=>{"use strict";var r=n(33555),o=n(83716),a=n(28406),i=n(5161),s=n(50711),d=n(11192),u=n(706),c=n(91947);(0,r.iw)("apiUpdate",((e,t,n)=>{switch(o.eM&&"updateUserStatus"!==n["@type"]&&"updateServerTimeOffset"!==n["@type"]&&console.log("[GramJs] UPDATE",n["@type"],{update:n}),n["@type"]){case"updateApiReady":!function(e){const{hasWebNotifications:t,hasPushNotifications:n}=(0,d.dZ)(e);t&&n&&(0,a.Ld)(),(0,s.m0)(e.settings.byKey.language)}(e);break;case"updateAuthorizationState":!function(e){let t=(0,r.Rd)();const n="authorizationStateReady"===t.authState,o=e.authorizationState;switch((0,r.R3)({...t,authState:o,authIsLoading:!1}),t=(0,r.Rd)(),o){case"authorizationStateLoggingOut":(0,u.IT)(!1),(0,r.R3)({...t,isLoggingOut:!0});break;case"authorizationStateWaitCode":(0,r.R3)({...t,authIsCodeViaApp:e.isCodeViaApp});break;case"authorizationStateWaitPassword":(0,r.R3)({...t,authHint:e.hint});break;case"authorizationStateWaitQrCode":(0,r.R3)({...t,authIsLoadingQrCode:!1,authQrCode:e.qrCode});break;case"authorizationStateReady":if(n)break;(0,u.IT)(!0),(0,r.R3)({...t,isLoggingOut:!1})}}(n);break;case"updateAuthorizationError":!function(e){(0,r.R3)({...(0,r.Rd)(),authError:e.message})}(n);break;case"updateConnectionState":!function(e){const{connectionState:t}=e,n=(0,r.Rd)();if(t!==n.connectionState&&((0,r.R3)({...n,connectionState:t}),"connectionStateBroken"===t)){const e=!n.authState||["authorizationStateWaitPhoneNumber","authorizationStateWaitCode","authorizationStateWaitPassword","authorizationStateWaitRegistration","authorizationStateWaitQrCode"].includes(n.authState);(0,r.Sv)().signOut({forceInitApi:e})}}(n);break;case"updateSession":!function(e){const{sessionData:t}=e,{authRememberMe:n,authState:o}=(0,r.Rd)(),a=!t||!t.mainDcId;n&&"authorizationStateReady"===o&&!a&&(0,r.Sv)().saveSession({sessionData:t})}(n);break;case"updateServerTimeOffset":!function(e){const t=(0,r.Rd)();t.serverTimeOffset!==e.serverTimeOffset&&(0,r.R3)({...t,serverTimeOffset:e.serverTimeOffset})}(n);break;case"updateCurrentUser":!function(e){const{currentUser:t}=e;(0,r.R3)({...(0,i.Nq)((0,r.Rd)(),t.id,t),currentUserId:t.id}),function(e){const t=localStorage.getItem(o.b_);if(!t)return;const n=JSON.parse(t);n.id=e,localStorage.setItem(o.b_,JSON.stringify(n))}(t.id)}(n);break;case"error":{"SESSION_REVOKED"===n.error.message&&t.signOut();const e=(0,c.J_)(n.error);e?t.addPaymentError({error:e}):(0,c.pF)(n.error)?t.closePaymentModal():t.showDialog&&t.showDialog({data:n.error});break}}}))},89005:(e,t,n)=>{"use strict";var r=n(33555),o=n(83716),a=n(77361),i=n(50711),s=n(27370),d=n(11192),u=n(706);!function(){function e(){const e=document.documentElement.className.match(/theme-(\w+)/),t=e?e[1]:"light",n=(0,r.Rd)(),a=(0,d.Pu)(n),{animationLevel:i}=n.settings.byKey;a!==t&&((0,s.Z)(a,i===o.zy),(0,r.R3)({...n}))}const t=window.matchMedia("(prefers-color-scheme: dark)");"function"==typeof t.addEventListener?t.addEventListener("change",e):"function"==typeof t.addListener&&t.addListener(e)}(),(0,r.iw)("init",(e=>{const{animationLevel:t,messageTextSize:n,language:r}=e.settings.byKey,c=(0,d.Pu)(e);(0,i.m0)(r,void 0,!0),document.documentElement.style.setProperty("--composer-text-size",`${Math.max(n,a.cj?16:15)}px`),document.documentElement.style.setProperty("--message-meta-height",`${Math.floor(1.3125*n)}px`),document.documentElement.style.setProperty("--message-text-size",`${n}px`),document.documentElement.setAttribute("data-message-text-size",n.toString()),document.body.classList.add("initial"),document.body.classList.add(`animation-level-${t}`),document.body.classList.add(a.$b?"is-touch-env":"is-pointer-env"),(0,s.Z)(c,t===o.zy),(0,u.px)(),a.cj?document.body.classList.add("is-ios"):a.wZ?document.body.classList.add("is-android"):a.jm&&document.body.classList.add("is-macos"),a.s$&&document.body.classList.add("is-safari")})),(0,r.iw)("setInstallPrompt",((e,t,n)=>{const{canInstall:r}=n;return{...e,canInstall:r}})),(0,r.iw)("setIsUiReady",((e,t,n)=>{const{uiReadyState:r}=n;return 2===r&&document.body.classList.remove("initial"),{...e,uiReadyState:r}})),(0,r.iw)("setAuthPhoneNumber",((e,t,n)=>{const{phoneNumber:r}=n;return{...e,authPhoneNumber:r}})),(0,r.iw)("setAuthRememberMe",((e,t,n)=>({...e,authRememberMe:Boolean(n)}))),(0,r.iw)("clearAuthError",(e=>({...e,authError:void 0}))),(0,r.iw)("disableHistoryAnimations",(()=>{setTimeout((()=>{(0,r.R3)({...(0,r.Rd)(),shouldSkipHistoryAnimations:!1}),document.body.classList.remove("no-animate")}),450),(0,r.R3)({...(0,r.Rd)(),shouldSkipHistoryAnimations:!0},{forceSyncOnIOs:!0})}))},73456:(e,t,n)=>{"use strict";var r=n(33555),o=n(5161);(0,r.iw)("setSettingOption",((e,t,n)=>(0,o.BI)(e,n))),(0,r.iw)("setThemeSettings",((e,t,n)=>{const{theme:r,...a}=n;return(0,o.lr)(e,r,a)})),(0,r.iw)("requestNextSettingsScreen",((e,t,n)=>({...e,settings:{...e.settings,nextScreen:n}})))},5872:(e,t,n)=>{"use strict";n.d(t,{J9:()=>S,QS:()=>C,Uf:()=>k,jA:()=>A});var r=n(65116),o=n(33555),a=n(6137),i=n(69118),s=n(83716),d=n(77361),u=n(18674),c=n(60782),l=n(11192),f=n(3100),h=n(35369),g=n(15780),p=n(83158),m=n(16974),v=n(5161),y=n(95281);const b=(0,i.P2)((()=>(0,i.Q8)(M)),5e3,!1);let w,I=!1;function C(){s.sd||((0,o.iw)("saveSession",(()=>{I||E()})),(0,o.iw)("reset",(()=>{localStorage.removeItem(s.Uh),I&&P()})))}function S(e){if(s.sd)return;const t=function(e){s.eM&&console.time("global-state-cache-read");const t=localStorage.getItem(s.Uh),n=t?JSON.parse(t):void 0;s.eM&&console.timeEnd("global-state-cache-read"),n&&function(e,t){var n;if("shouldAutoDownloadMediaFromContacts"in e.settings.byKey){const{shouldAutoDownloadMediaFromContacts:t,shouldAutoDownloadMediaInPrivateChats:n,shouldAutoDownloadMediaInGroups:r,shouldAutoDownloadMediaInChannels:o,shouldAutoPlayVideos:a,shouldAutoPlayGifs:i,...s}=e.settings.byKey;e.settings.byKey={...s,canAutoLoadPhotoFromContacts:t,canAutoLoadVideoFromContacts:t,canAutoLoadPhotoInPrivateChats:n,canAutoLoadVideoInPrivateChats:n,canAutoLoadPhotoInGroups:r,canAutoLoadVideoInGroups:r,canAutoLoadPhotoInChannels:o,canAutoLoadVideoInChannels:o,canAutoPlayVideos:a,canAutoPlayGifs:i}}e.settings.byKey={...t.settings.byKey,...e.settings.byKey},e.settings.themes={...t.settings.themes,...e.settings.themes},e.chatFolders={...t.chatFolders,...e.chatFolders},e.stickers.greeting||(e.stickers.greeting=t.stickers.greeting),e.stickers.premium||(e.stickers.premium=t.stickers.premium),e.activeDownloads||(e.activeDownloads={byChatId:{}}),e.serviceNotifications||(e.serviceNotifications=[]),void 0===e.audioPlayer.volume&&(e.audioPlayer.volume=s.Qx),void 0===e.audioPlayer.playbackRate&&(e.audioPlayer.playbackRate=s.mw),void 0===e.mediaViewer.volume&&(e.mediaViewer.volume=s.Qx),void 0===e.mediaViewer.playbackRate&&(e.mediaViewer.playbackRate=s.mw),e.groupCalls||(e.groupCalls=t.groupCalls),e.users.statusesById||(e.users.statusesById={}),e.messages.sponsoredByChatId||(e.messages.sponsoredByChatId={}),e.activeReactions||(e.activeReactions={}),e.pollModal||(e.pollModal={isOpen:!1}),e.attachMenu||(e.attachMenu={bots:{}}),e.trustedBotIds||(e.trustedBotIds=[]),e.passcode||(e.passcode={}),void 0===(null===(n=e.activeSessions)||void 0===n?void 0:n.byHash)&&(e.activeSessions={byHash:{},orderedHashes:[]}),e.activeWebSessions||(e.activeWebSessions={byHash:{},orderedHashes:[]}),e.transcriptions||(e.transcriptions={}),e.appConfig&&!e.appConfig.limits&&(e.appConfig.limits=s.pr)}(n,e);const r={...e,...n},o=d.wB?void 0:(0,g.V)();return{...r,messages:{...r.messages,messageLists:o?[o]:[]}}}(e);return t.passcode.hasPasscode||(0,f.ti)(!0)?(E(),t):void P()}function E(){I=!0,w=(0,i.Gq)(M,!0),window.addEventListener("blur",M),(0,r.ll)(b)}function P(){I=!1,(0,r.Iq)(b),window.removeEventListener("blur",M),w&&w()}function M(){const e=(0,o.Rd)();!I||e.isLoggingOut||(0,u.zG)()||A()}function A(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(0,o.Rd)(),{hasPasscode:n,isScreenLocked:r}=t.passcode,a=k(t);if(n){r||e||(0,y.H4)(void 0,a);const n=JSON.stringify((0,v.ZI)(t));localStorage.setItem(s.Uh,n)}else localStorage.setItem(s.Uh,a)}function k(e){const t={...h.Y,...(0,c.ei)(e,["appConfig","authState","authPhoneNumber","authRememberMe","authNearestCountry","currentUserId","contactList","topPeers","topInlineBots","recentEmojis","push","shouldShowContextMenuHint","leftColumnWidth","serviceNotifications"]),audioPlayer:{volume:e.audioPlayer.volume,playbackRate:e.audioPlayer.playbackRate,isMuted:e.audioPlayer.isMuted},mediaViewer:{volume:e.mediaViewer.volume,playbackRate:e.mediaViewer.playbackRate,isMuted:e.mediaViewer.isMuted},isChatInfoShown:_(e),users:N(e),chats:T(e),messages:x(e),globalSearch:{recentlyFoundChatIds:e.globalSearch.recentlyFoundChatIds},settings:L(e),chatFolders:O(e),groupCalls:B(e),availableReactions:R(e),isCallPanelVisible:void 0,trustedBotIds:e.trustedBotIds,passcode:(0,c.ei)(e.passcode,["isScreenLocked","hasPasscode","invalidAttemptsCount"])};return JSON.stringify(t)}function _(e){return window.innerWidth>s._m&&e.isChatInfoShown}function N(e){var t,n,r,o,a;const{users:{byId:i,statusesById:d},currentUserId:u}=e,{chatId:f}=(0,l.Bt)(e)||{},h=null===(t=(0,l.P2)(e))||void 0===t?void 0:t.map((e=>{let{id:t}=e;return t})),g=(0,c.Tw)([...u?[u]:[],...f&&(0,p.YC)(f)?[f]:[],...h||[],...e.topPeers.userIds||[],...(null===(n=(0,m.gO)(s.Nf))||void 0===n?void 0:n.filter(p.YC))||[],...(null===(r=(0,m.gO)(s.WS))||void 0===r?void 0:r.filter(p.YC))||[],...(null===(o=e.contactList)||void 0===o?void 0:o.userIds)||[],...(null===(a=e.globalSearch.recentlyFoundChatIds)||void 0===a?void 0:a.filter(p.YC))||[],...Object.keys(i)]).slice(0,s.lO);return{byId:(0,c.ei)(i,g),statusesById:(0,c.ei)(d,g)}}function T(e){const{chats:{byId:t},currentUserId:n}=e,r=(0,l.jr)(e),o=(0,c.Tw)([...n?[n]:[],...r?[r.id]:[],...(0,m.gO)(s.Nf)||[],...(0,m.gO)(s.WS)||[],...e.globalSearch.recentlyFoundChatIds||[],...Object.keys(t)]).slice(0,s.gJ);return{...e.chats,isFullyLoaded:{},byId:(0,c.ei)(e.chats.byId,o)}}function x(e){var t;const{currentUserId:n}=e,r={},{chatId:o,threadId:i,type:d}=(0,l.Bt)(e)||{};return[...o?[o]:[],...n?[n]:[],...(null===(t=(0,m.gO)(s.Nf))||void 0===t?void 0:t.slice(0,s.Rk))||[]].forEach((t=>{const n=e.messages.byChatId[t];if(!n)return;const o=n.threadsById[a._f];o&&o.viewportIds&&(r[t]={byId:(0,c.ei)(n.byId,o.viewportIds),threadsById:{[a._f]:o}})})),{byChatId:r,messageLists:o&&i&&d?[{chatId:o,threadId:i,type:d}]:[],sponsoredByChatId:{}}}function L(e){const{byKey:t,themes:n}=e.settings;return{byKey:t,themes:n,privacy:{},notifyExceptions:{}}}function O(e){return{...e.chatFolders,activeChatFolder:0}}function B(e){return{...e.groupCalls,byId:{},activeGroupCallId:void 0}}function R(e){var t;return null===(t=e.availableReactions)||void 0===t?void 0:t.map((e=>(0,c.ei)(e,["reaction","staticIcon","title","isInactive"])))}},22825:(e,t,n)=>{"use strict";n.d(t,{$l:()=>U,Bf:()=>g,G9:()=>p,GM:()=>S,H5:()=>T,Hd:()=>L,Hp:()=>M,Mg:()=>_,Nl:()=>A,Qm:()=>N,RT:()=>P,Ru:()=>y,SB:()=>$,Sm:()=>R,U:()=>C,VE:()=>k,YC:()=>h,ZV:()=>m,cc:()=>D,eA:()=>v,hu:()=>E,i4:()=>B,ih:()=>Z,l6:()=>w,pE:()=>O,pK:()=>b,q8:()=>x,zF:()=>F,zX:()=>I});var r=n(6137),o=n(83716),a=n(60782),i=n(93311),s=n(790),d=n(85765),u=n(76927);const c=Date.now()/1e3+31622400,l=3e9,f=3e8;function h(e){return"number"==typeof e?e>0:!e.startsWith("-")}function g(e){return p(e)||m(e)}function p(e){return"chatTypeBasicGroup"===e.type}function m(e){return"chatTypeSuperGroup"===e.type}function v(e){return"chatTypeChannel"===e.type}function y(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function b(e){return e===o.FV}function w(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function I(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function C(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return r||n&&t.id===n.id&&n.isSelf?e("SavedMessages"):t.title||e("HiddenName")}function S(e){if(e.fullInfo)return e.fullInfo.about}function E(e){const{username:t}=e;if(t)return`${o.zH}${t}`;const{inviteLink:n}=e.fullInfo||{};return n}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"photo";if(!e.avatarHash)return;const{fullInfo:r}=e;var o;return"video"===n?null!=r&&null!==(o=r.profilePhoto)&&void 0!==o&&o.isVideo?(0,u.D)(r.profilePhoto):void 0:"big"===t?`profile${e.id}?${e.avatarHash}`:`avatar${e.id}?${e.avatarHash}`}function M(e){return!e.lastMessage}function A(e){return Boolean(e.adminRights)}function k(e,t){return!!e.adminRights&&e.adminRights[t]}function _(e,t){var n,r;return Boolean((null===(n=e.currentUserBannedRights)||void 0===n?void 0:n[t])||(null===(r=e.defaultBannedRights)||void 0===r?void 0:r[t]))}function N(e,t){return t!==r._f||!(e.isRestricted||e.isForbidden||e.migratedTo||e.isNotJoined||b(e.id))&&(!!e.isCreator||!!h(e.id)||(v(e)?k(e,"postMessages"):A(e)||!_(e,"sendMessages")))}function T(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1};const n=A(e);return{canAttachMedia:n||!_(e,"sendMedia"),canAttachPolls:(n||!_(e,"sendPolls"))&&(!h(e.id)||t),canSendStickers:n||!_(e,"sendStickers"),canSendGifs:n||!_(e,"sendGifs"),canAttachEmbedLinks:n||!_(e,"embedLinks")}}function x(e,t,n){if(null!=t&&t.sendMessages){const{untilDate:n}=t;return n&&n2&&void 0!==arguments[2]?arguments[2]:{};return n[e.id]&&void 0!==n[e.id].isMuted?n[e.id].isMuted:e.isMuted||h(e.id)&&!t.hasPrivateChatsNotifications||v(e)&&!t.hasBroadcastNotifications||g(e)&&!t.hasGroupNotifications}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{hasPrivateChatsMessagePreview:r=!0,hasBroadcastMessagePreview:o=!0,hasGroupMessagePreview:a=!0}=t;return n[e.id]&&void 0!==n[e.id].shouldShowPreviews?n[e.id].shouldShowPreviews:h(e.id)&&r||v(e)&&o||g(e)&&a}function D(e){return p(e)||(m(e)||v(e))&&e.isCreator}function $(e,t,n){const{id:r,title:o,emoticon:a,description:i,pinnedChatIds:s,excludedChatIds:d,includedChatIds:u,excludeArchived:c,excludeMuted:l,excludeRead:f,...h}=t;return void 0!==n&&(Object.values(h).filter(Boolean).length>1||null!=d&&d.length||null!=u&&u.length)?e("Chats",n):h.bots?e("FilterBots"):h.groups?e("FilterGroups"):h.channels?e("FilterChannels"):h.contacts?e("FilterContacts"):h.nonContacts?e("FilterNonContacts"):void 0}function F(e,t,n){if(n&&!h(t))return n.isSelf?e("FromYou"):(0,i.Vl)(n)}function Z(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return(0,a.Xo)(e,(e=>{const o=t[e];if(!o)return 0;let a=0;return o.lastMessage&&(a+=o.lastMessage.date),n&&o.isVerified&&(a+=l),r&&r.includes(e)&&(a=Date.now()+f+(r.length-r.indexOf(e))),a}),"desc")}function U(e,t,n,r,o){if(!r)return t;const a=(0,d.W)(r);return t.filter((t=>{const r=n[t];return!!r&&a(C(e,r,void 0,t===o))}))}},83158:(e,t,n)=>{"use strict";n.d(t,{lN:()=>D,JE:()=>N,uw:()=>_e,k6:()=>le,yL:()=>B,$l:()=>o.$l,kK:()=>r.kK,H5:()=>o.H5,MR:()=>ve,NF:()=>xe,kw:()=>r.kw,cc:()=>o.cc,Qm:()=>o.Qm,RT:()=>o.RT,GM:()=>o.GM,hu:()=>o.hu,N0:()=>Ce,Hd:()=>o.Hd,U:()=>o.U,l6:()=>o.l6,ym:()=>ce,T7:()=>y,SB:()=>o.SB,N:()=>ge,Wc:()=>pe,VE:()=>o.VE,XV:()=>ke,Sc:()=>Me,N5:()=>K,oP:()=>J,nl:()=>ne,qp:()=>V,w6:()=>_,R5:()=>Ae,$D:()=>m,aE:()=>Q,ep:()=>be,c0:()=>we,d0:()=>l,eO:()=>oe,Tp:()=>f,nf:()=>ae,kG:()=>ye,Ti:()=>fe,DH:()=>ue,KK:()=>g,O$:()=>H,t9:()=>re,dT:()=>O,Y5:()=>q,zF:()=>o.zF,q8:()=>o.q8,_O:()=>v,eH:()=>x,bf:()=>X,Kk:()=>U,Eb:()=>Z,MK:()=>$,UD:()=>p,EU:()=>F,b7:()=>G,kd:()=>Y,s1:()=>ie,F$:()=>se,Cg:()=>de,bV:()=>Se,HV:()=>Ee,zX:()=>o.zX,OU:()=>P,RI:()=>M,Ow:()=>Te,Rs:()=>r.Rs,Vl:()=>r.Vl,Js:()=>r.Js,db:()=>r.db,Tq:()=>r.Tq,Dk:()=>Le.D,jC:()=>Pe,O9:()=>he,BM:()=>Ie,u8:()=>z,Lo:()=>C,Ul:()=>E,Nl:()=>o.Nl,pE:()=>o.pE,G9:()=>o.G9,eA:()=>o.eA,Bf:()=>o.Bf,Hp:()=>o.Hp,ZV:()=>o.ZV,pK:()=>o.pK,Ru:()=>o.Ru,NB:()=>r.NB,MF:()=>I,$R:()=>T,CD:()=>k,rl:()=>ee,hC:()=>te,CI:()=>A,B4:()=>b,ss:()=>w,jM:()=>S,cS:()=>r.cS,YC:()=>o.YC,kM:()=>r.kM,Mg:()=>o.Mg,Ak:()=>h,i4:()=>o.i4,Sm:()=>o.Sm,ih:()=>o.ih,Z0:()=>r.Z0});var r=n(93311),o=n(22825),a=n(6137),i=n(83716),s=n(77361),d=n(64784),u=n(33555);const c=new RegExp(i.FM,"i");function l(e){return`message${e.toString().replace(".","-")}`}function f(e){const{chatId:t,id:n,previousLocalId:r}=e;return function(e,t){return`msg${e}-${t}`}(t,S(e)&&r||n)}function h(e){const t=e.match(/^msg(-?\d+)-(\d+)/);return{chatId:t[1],messageId:Number(t[2])}}function g(e){return e.previousLocalId||e.id}function p(e){const{text:t,sticker:n,photo:r,video:o,audio:a,voice:s,document:d,poll:u,webPage:c,contact:l,invoice:f,location:h,game:g,action:p}=e.content;return t?t.text:n||r||o||a||s||d||l||u||c||f||h||g||null!=p&&p.phoneCall?void 0:i.VC}function m(e){const{text:t,sticker:n,photo:r,video:o,audio:a,voice:i,document:s,poll:u,webPage:c,contact:l}=e.content;return!!(n||null!=o&&o.isRound)||!(!t||r||o||a||i||s||u||c||l)&&((0,d.Z)(t.text)||!1)}function v(e){const{text:t}=e.content;if(t&&t.text.length<=6&&1===m(e))return t.text}function y(e){const{text:t}=e.content;let n;if(null!=t&&t.entities){let e=t.entities.find((e=>e.type===a.Vv.TextUrl));if(e&&(n=e.url.match(c)),!n&&(e=t.entities.find((e=>e.type===a.Vv.Url)),e)){const{offset:r,length:o}=e;n=t.text.substring(r,r+o).match(c)}}if(!n&&t&&(n=t.text.match(c)),n)return{url:n[0],domain:n[3]}}function b(e){return e.isOutgoing}function w(e){return Boolean(e.replyToMessageId)}function I(e){return Boolean(e.forwardInfo)}function C(e){return Boolean(e.content.action)}function S(e){return e.chatId===i.aw&&Math.round(e.id)!==e.id}function E(e){return Boolean(e.senderId)&&!(0,o.YC)(e.senderId)&&b(e)}function P(e,t){return(0,o.YC)(t.id)?(0,r.Js)(t):(0,o.U)(e,t)}function M(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function A(e){return e.id>i.MP}function k(e){return e.content.action&&"historyClear"===e.content.action.type}function _(e){const{content:t}=e,n=t.webPage?t.webPage.video:t.video,r=t.webPage?t.webPage.photo:t.photo,o=t.webPage?t.webPage.document:t.document;if(o)return o.fileName;if(n)return n.fileName;if(t.sticker){const e=t.sticker.isLottie?"tgs":t.sticker.isVideo?"webm":(0,s.on)()?"webp":"png";return`${t.sticker.id}.${e}`}if(t.audio)return t.audio.fileName;const a=f(e);return r?`${a}.jpg`:t.voice?s.m5?`${a}.ogg`:`${a}.wav`:a}function N(e){return!e.results.some((e=>e.count>0))}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now()/1e3;const{location:n}=e.content;return"geoLive"===(null==n?void 0:n.type)&&t-(e.date||0)>=n.period}function x(e){var t;return 1===(null===(t=e.inlineButtons)||void 0===t?void 0:t.length)&&1===e.inlineButtons[0].length&&e.inlineButtons[0][0]}var L=n(48035);function O(e){var t,n;return e.isOutgoing?null===(t=e.reactions)||void 0===t||null===(n=t.recentReactions)||void 0===n?void 0:n[0]:void 0}function B(e,t){var n;const{currentUserId:r}=e;return null==t||null===(n=t.recentReactions)||void 0===n?void 0:n.some((e=>{let{isUnread:t,userId:n}=e;return t&&n!==r}))}const R=["⠺","⠵","⠞","⠟"],D=80;function $(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const i=!n&&Z(t,o),s=i?`${i} `:"",d=(0,L.Z)(F(t),r),u=U(e,t,d,o,a);return`${s}${u}`}function F(e){const t=function(e){var t;const{transcriptionId:n}=e,r=(0,u.Rd)();return n&&(null===(t=r.transcriptions[n])||void 0===t?void 0:t.text)}(e),n=p(e);if(!n)return t;const{entities:r}=e.content.text||{};if(null==r||!r.length)return t?`${t}\n${n}`:n;const o=r.reduce(((e,t)=>{let{type:n,offset:r,length:o}=t;if(n!==a.Vv.Spoiler)return e;const i=function(e){return new Array(e).fill(void 0).map((()=>R[Math.floor(Math.random()*R.length)])).join("")}(o);return`${e.substr(0,r)}${i}${e.substr(r+o,e.length)}`}),n);return t?`${t}\n${o}`:o}function Z(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{photo:n,video:r,audio:o,voice:a,document:i,sticker:s,poll:d}=e.content;if(e.groupedId||n)return"🖼";if(r)return"📹";if(s)return s.emoji;if(o)return"🎧";if(a)return"🎤";if(i)return"📎";if(d)return"📊";const u=!t&&O(e);return u?u.reaction:void 0}function U(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{text:a,photo:s,video:d,audio:u,voice:c,document:l,sticker:f,contact:h,poll:g,invoice:p,location:m,game:v}=t.content;let y;t.groupedId&&(y=n||e("lng_in_dlg_album")),s&&(y=n||e("AttachPhoto")),d&&(y=n||e(d.isGif?"AttachGif":"AttachVideo")),f&&(y=e("AttachSticker").trim()),u&&(y=j(t)||e("AttachMusic")),c&&(y=n||e("AttachAudio")),l&&(y=o?l.fileName:n||l.fileName),h&&(y=e("AttachContact")),g&&(y=g.summary.question),p&&(y=`${e("PaymentInvoice")}: ${p.text}`),a&&(o&&y?y+=`\n${n}`:y=n),"geo"!==(null==m?void 0:m.type)&&"venue"!==(null==m?void 0:m.type)||(y=e("Message.Location")),"geoLive"===(null==m?void 0:m.type)&&(y=e("Message.LiveLocation")),v&&(y=`🎮 ${v.title}`);const b=!r&&O(t);return y&&b&&(y=`to your "${y}"`),y||i.VC}function j(e){const{audio:t,text:n}=e.content;return t&&[t.title,t.performer].filter(Boolean).join(" — ")||(null==n?void 0:n.text)}var W=n(15376);function V(e){return e.content}function z(e){return Boolean(H(e)||G(e)||Q(e)||X(e)||ne(e)||re(e)||K(e)||J(e)||Y(e))}function H(e){return e.content.photo}function G(e){return e.content.video}function q(e){const{video:t}=e.content;return null!=t&&t.isRound?t:void 0}function K(e){return e.content.action}function J(e){return e.content.audio}function Y(e){return e.content.voice}function X(e){return e.content.sticker}function Q(e){return e.content.document}function ee(e){const t=Q(e);return t?"photo"===t.mediaType:void 0}function te(e){const t=Q(e);return t?"video"===t.mediaType:void 0}function ne(e){return e.content.contact}function re(e){return e.content.poll}function oe(e){return e.content.invoice}function ae(e){return e.content.location}function ie(e){return e.content.webPage}function se(e){var t;return null===(t=ie(e))||void 0===t?void 0:t.photo}function de(e){var t;return null===(t=ie(e))||void 0===t?void 0:t.video}function ue(e){var t;return null===(t=function(e){const t=H(e)||G(e)||Q(e)||X(e)||se(e)||de(e);if(t)return t.thumbnail}(e))||void 0===t?void 0:t.dataUri}function ce(e){return`document${e.id}`}function le(e,t,n,r,o){const{long:a,lat:i,accessHash:s,accuracyRadius:d}=e;return`staticMap:${s}?lat=${i}&long=${a}&w=${t}&h=${n}&zoom=${r}&scale=${o}&accuracyRadius=${d}`}function fe(e,t){const{photo:n,video:r,sticker:o,audio:a,voice:i,document:s}=e.content,d=se(e),u=de(e),c=r||u,l=n||d,h=l||c||o||a||i||s;if(!h)return;const g=h.id,p=`${f(e)}${g?`:${g}`:""}`;if(c)switch(t){case"micro":case"pictogram":case"viewerPreview":return`${p}?size=m`;case"inline":return Ie(e)?void 0:me(c,p);case"viewerFull":return me(c,p);case"download":return`${p}?download`}if(l)switch(t){case"micro":case"pictogram":return`${p}?size=m`;case"inline":return Ie(e)?void 0:`${p}?size=x`;case"viewerPreview":return`${p}?size=x`;case"viewerFull":case"download":return`${p}?size=z`}if(s)switch(t){case"micro":case"pictogram":case"inline":case"viewerPreview":if(!(0,W.v6)(s)||Ie(e))return;return`${p}?size=m`;case"viewerFull":case"download":return p}if(o)switch(t){case"micro":return;case"pictogram":return`${p}?size=m`;case"inline":return p;case"download":return`${p}?download`}if(a)switch(t){case"micro":case"pictogram":return ve(a)?`${p}?size=m`:void 0;case"inline":return me(a,p);case"download":return`${p}?download`}if(i)switch(t){case"micro":case"pictogram":return;case"inline":return p;case"download":return`${p}?download`}}function he(e){if(e)return`webDocument:${e.url}`}function ge(e){const{photo:t}=e;if(t)return`photo${t.id}?size=x`}function pe(e){const{document:t}=e;if(t)return`document${t.id}`}function me(e,t){return s.I_&&s.s$?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function ve(e){return e.thumbnailSizes&&e.thumbnailSizes.length>0}function ye(e,t){var n;const{video:r,audio:o,voice:i,document:d}=e.content,u=r||de(e),c=null===(n=r||o||d)||void 0===n?void 0:n.size;return"download"===t&&s.I_&&c>s.l0&&!s.rT?a.IU.DownloadUrl:u&&s.I_&&("viewerFull"===t||"inline"===t)?a.IU.Progressive:o||i?i&&!s.m5?a.IU.BlobUrl:a.IU.Progressive:a.IU.BlobUrl}function be(e){const{photo:t,video:n,document:r}=e.content,o=se(e),a=de(e);if(t||o)return`photo${e.date}.jpeg`;const{fileName:i}=n||a||r||{};return i}function we(e){const{video:t,document:n}=e.content,r=de(e),{size:o}=t||r||n||{};return o}function Ie(e){const{photo:t,video:n,document:r}=e.content;return(null==t?void 0:t.blobUrl)||(null==n?void 0:n.blobUrl)||(null==r?void 0:r.previewBlobUrl)}function Ce(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Ae(e,t,n?"media":"inlineMedia")}function Se(e){return e.sizes.find((e=>"z"===e.type))||e.sizes.find((e=>"y"===e.type))||Ee(e)}function Ee(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 Pe(e){if(e.width&&e.height)return e}function Me(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=A(e),o=r||n,a=Number(t);return{isUploading:r,isTransferring:o,transferProgress:a}}function Ae(e,t,n){let r;switch(n){case"media":r=e=>{const t=G(e);return H(e)||t&&!t.isRound&&!t.isGif};break;case"documents":r=Q;break;case"links":r=e=>ie(e)||function(e){const{text:t}=e.content,n=t&&t.text.match(c);if(n)return{url:n[0],domain:n[3]}}(e);break;case"audio":r=J;break;case"voice":r=e=>{const t=G(e);return Y(e)||t&&t.isRound};break;case"inlineMedia":r=e=>{const t=G(e);return H(e)||t&&!t.isRound&&!t.isGif||ee(e)||te(e)};break;default:return[]}return t.reduce(((t,n)=>(e[n]&&r(e[n])&&t.push(n),t)),[])}function ke(e){const{audio:t,voice:n,video:r}=V(e),o=t||n||r||de(e);if(o)return o.duration}function _e(e,t){return`${e}_${t}`}const Ne={missing_payment_information:{field:"cardNumber",message:"Incorrect card number"},invalid_number:{field:"cardNumber",message:"Incorrect card number"},number:{field:"cardNumber",message:"Incorrect card number"},exp_year:{field:"expiry",message:"Incorrect year"},exp_month:{field:"expiry",message:"Incorrect month"},invalid_expiry_year:{field:"expiry",message:"Incorrect year"},invalid_expiry_month:{field:"expiry",message:"Incorrect month"},cvc:{field:"cvv",message:"Incorrect CVV"},invalid_cvc:{field:"cvv",message:"Incorrect CVV"}};function Te(e){const{message:t,code:n,param:r}=e,{field:o,message:a}=r?Ne[r]:Ne[n];return{field:o,message:a,description:t}}function xe(e){return`photo${e.id}?size=x`}var Le=n(76927)},76927:(e,t,n)=>{"use strict";function r(e){return`videoAvatar${e.id}?size=u`}n.d(t,{D:()=>r})},93311:(e,t,n)=>{"use strict";n.d(t,{Js:()=>l,NB:()=>g,Rs:()=>w,Tq:()=>f,Vl:()=>c,Z0:()=>v,cS:()=>p,db:()=>b,kK:()=>y,kM:()=>h,kw:()=>m});var r=n(83716),o=n(790),a=n(60782),i=n(82267),s=n(85765),d=n(6272);const u=[1,8,5,2,7,4,6];function c(e){if(e)switch(e.type){case"userTypeBot":case"userTypeRegular":return e.firstName||e.lastName;case"userTypeDeleted":case"userTypeUnknown":return"Deleted";default:return}}function l(e){if(e){if(g(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;if(e.phoneNumber)return`+${(0,d.un)(e.phoneNumber)}`;break;case"userTypeDeleted":case"userTypeUnknown":return"Deleted account"}}}function f(e,t,n,a){if(t.id===r.aw)return e("ServiceNotifications").toLowerCase();if(t.type&&"userTypeBot"===t.type)return e("Bot");if(!n)return"";switch(n.type){case"userStatusEmpty":return e("ALongTimeAgo");case"userStatusLastMonth":return e("WithinAMonth");case"userStatusLastWeek":return e("WithinAWeek");case"userStatusOffline":{const{wasOnline:t}=n;if(!t)return e("LastSeen.Offline");const r=new Date((new Date).getTime()+1e3*a),i=new Date(1e3*t);if(i>=r)return e("LastSeen.JustNow");const s=new Date(r.getTime()-i.getTime());if(s.getTime()/1e3<60)return e("LastSeen.JustNow");if(s.getTime()/1e3<3600)return e("LastSeen.MinutesAgo",Math.floor(s.getTime()/1e3/60));const d=new Date;if(d.setHours(0,0,0,0),i>new Date(d.getTime()+1e3*a))return s.getTime()/1e3<21600?e("LastSeen.HoursAgo",Math.floor(s.getTime()/1e3/60/60)):e("LastSeen.TodayAt",(0,o.mr)(e,i));const u=new Date;return u.setDate(r.getDate()-1),u.setHours(0,0,0,0),i>new Date(u.getTime()+1e3*a)?e("LastSeen.YesterdayAt",(0,o.mr)(e,i)):e("LastSeen.AtDate",(0,o.Tu)(e,i))}case"userStatusOnline":return e("Online");case"userStatusRecently":return e("Lately");default:return}}function h(e,t){const{id:n,type:o}=e;return!!t&&n!==r.aw&&"userStatusOnline"===t.type&&"userTypeBot"!==o}function g(e){return!e.noStatus&&"userTypeBot"!==e.type&&e.id!==r.aw&&("userTypeDeleted"===e.type||"userTypeUnknown"===e.type)}function p(e){return"userTypeBot"===e.type}function m(e){return!e.isContact&&!p(e)}function v(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return(0,a.Xo)(e,(e=>{const a=(0,i.b)(o);if(r&&r.includes(e))return a+172800-(r.length-r.indexOf(e));const s=t[e],d=n[e];if(!s||!d)return 0;if("userStatusOnline"===d.type)return d.expires;if("userStatusOffline"===d.type&&d.wasOnline)return d.wasOnline;switch(d.type){case"userStatusRecently":return a-86400;case"userStatusLastWeek":return a-604800;case"userStatusLastMonth":return a-18144e3;default:return 0}}),"desc")}function y(e,t,n,r,o){if(!n)return e;const a=(0,s.W)(n);return e.filter((e=>{const n=t[e];if(!n)return!1;const i=e===r?o:l(n);return i&&a(i)||a(n.username)}))}function b(e){return"number"==typeof e?Math.abs(e):Math.abs(Number(e))}function w(e){const t=e?b(e.id)%7:0;return u[t]}},33555:(e,t,n)=>{"use strict";n.d(t,{R3:()=>a,Rd:()=>o,Sv:()=>i,c$:()=>d,iw:()=>s});const r=(0,n(65116).gP)(),o=r.getGlobal,a=r.setGlobal,i=r.getActions,s=r.addActionHandler,d=r.withGlobal},35369:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});var r=n(91713),o=n(83716),a=n(77361);const i={isLeftColumnShown:!0,isChatInfoShown:!1,newChatMembersProgress:r.WB.Closed,uiReadyState:0,serverTimeOffset:0,authRememberMe:!0,countryList:{phoneCodes:[],general:[]},blocked:{ids:[],totalCount:0},users:{byId:{},statusesById:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{}},messages:{byChatId:{},messageLists:[],sponsoredByChatId:{}},groupCalls:{byId:{}},scheduledMessages:{byChatId:{}},chatFolders:{byId:{},activeChatFolder:0},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy"],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},greeting:{stickers:[]},premium:{stickers:[]},featured:{setIds:[]},search:{},forEmoji:{}},emojiKeywords:{},gifs:{saved:{},search:{}},inlineBots:{isLoading:!1,byUsername:{}},globalSearch:{},userSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatId:{}},management:{byChatId:{}},topPeers:{},topInlineBots:{},mediaViewer:{volume:o.Qx,playbackRate:o.mw,isMuted:!1},audioPlayer:{volume:o.Qx,playbackRate:o.mw,isMuted:!1},forwardMessages:{},pollResults:{},payment:{},notifications:[],dialogs:[],activeSessions:{byHash:{},orderedHashes:[]},activeWebSessions:{byHash:{},orderedHashes:[]},settings:{byKey:{theme:"light",shouldUseSystemTheme:!0,messageTextSize:a.cj?o.b6:a.jm?o.AR:o.xS,animationLevel:o.CX,messageSendKeyCombo:"enter",canAutoLoadPhotoFromContacts:!0,canAutoLoadPhotoInPrivateChats:!0,canAutoLoadPhotoInGroups:!0,canAutoLoadPhotoInChannels:!0,canAutoLoadVideoFromContacts:!0,canAutoLoadVideoInPrivateChats:!0,canAutoLoadVideoInGroups:!0,canAutoLoadVideoInChannels:!0,canAutoLoadFileFromContacts:!1,canAutoLoadFileInPrivateChats:!1,canAutoLoadFileInGroups:!1,canAutoLoadFileInChannels:!1,autoLoadFileMaxSizeMb:10,hasWebNotifications:!0,hasPushNotifications:!0,notificationSoundVolume:5,canAutoPlayGifs:!0,canAutoPlayVideos:!0,shouldSuggestStickers:!0,shouldLoopStickers:!0,language:"en",timeFormat:"24h",wasTimeFormatSetManually:!1,isConnectionStatusMinimized:!0,shouldArchiveAndMuteNewNonContact:!1},themes:{light:{isBlurred:!0,patternColor:o.g},dark:{isBlurred:!0,patternColor:o.Vv}},privacy:{},notifyExceptions:{}},twoFaSettings:{},passcode:{},activeReactions:{},shouldShowContextMenuHint:!0,activeDownloads:{byChatId:{}},serviceNotifications:[],statistics:{byChatId:{}},pollModal:{isOpen:!1},trustedBotIds:[],attachMenu:{bots:{}},transcriptions:{}}},53475:(e,t,n)=>{"use strict";n.d(t,{B1:()=>s,Dd:()=>p,GL:()=>c,Mg:()=>i,Pi:()=>h,SL:()=>d,a4:()=>u,fZ:()=>l,iX:()=>m,vv:()=>g});var r=n(83716),o=n(60782),a=n(11192);function i(e,t,n){return{...e,chats:{...e.chats,listIds:{...e.chats.listIds,[t]:n}}}}function s(e,t,n){const{[t]:r}=e.chats.listIds,o=null!=r&&r.length?n.filter((e=>!r.includes(e))):n;return r&&!o.length?e:i(e,t,[...r||[],...o])}function d(e,t){return{...e,chats:{...e.chats,byId:t}}}function u(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{byId:a}=e.chats,i=f(e,t,n,r,o);return i?d(e,{...a,[t]:i}):e}function c(e,t){const n=Object.keys(t).reduce(((n,r)=>{const o=f(e,r,t[r]);return o&&(n[r]=o),n}),{});return e=d(e,{...e.chats.byId,...n})}function l(e,t){const{byId:n}=e.chats;let r=!1;const o=Object.keys(t).reduce(((o,a)=>{if(!n[a]||n[a].isMin&&!t[a].isMin){const n=f(e,a,t[a]);n&&(o[a]=n,r||(r=!0))}return o}),{});return r?e=d(e,{...n,...o}):e}function f(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{byId:i}=e.chats,s=i[t],d=n.isMin&&s&&!s.isMin;n=a?n:(0,o.CE)(n,["unreadReactionsCount"]);const u={...s,...d?(0,o.CE)(n,["isMin","accessHash"]):n,...r&&{photos:[r,...s.photos||[]]}};if(u.id&&u.type)return u}function h(e,t,n){const o=n===r.WS?"archived":"active";let a=e.chats.listIds;return Object.keys(a).forEach((e=>{const n=a[e]||[];e!==o||n.includes(t)?e!==o&&n.includes(t)&&(a={...a,[e]:n.filter((e=>e!==t))}):a={...a,[e]:[...n,t]}})),u(e={...e,chats:{...e.chats,listIds:a}},t,{folderId:n||void 0})}function g(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}}}}function p(e,t){const n=(0,a.Ek)(e,t);if(!n)return e;const{[n]:r}=e.chats.listIds;return r&&(e=i(e,n,r.filter((e=>e!==t)))),u(e,t,{isNotJoined:!0})}function m(e,t,n){var r;const a=null===(r=t.fullInfo)||void 0===r?void 0:r.members,i=new Set(n.map((e=>e.userId))),s=[...(null==a?void 0:a.filter((e=>!i.has(e.userId))))||[],...n],d=(null==a?void 0:a.map((e=>{let{userId:t}=e;return t})))||[],c=s.map((e=>{let{userId:t}=e;return t}));return(0,o.et)(d,c)?e:u(e,t.id,{fullInfo:{...t.fullInfo,members:s}})}},5161:(e,t,n)=>{"use strict";n.d(t,{O4:()=>q,iX:()=>r.iX,c_:()=>o.c_,fZ:()=>r.fZ,m6:()=>o.m6,aK:()=>H,aJ:()=>z,zn:()=>P,Sh:()=>y,$S:()=>o.$S,ZI:()=>ee,Kn:()=>Q,bp:()=>ce,WY:()=>le,ft:()=>M,K4:()=>o.K4,bV:()=>o.bV,GK:()=>w,M6:()=>o.M6,i9:()=>o.i9,Dd:()=>r.Dd,vy:()=>f,rB:()=>K,g_:()=>c,Mg:()=>r.Mg,SL:()=>r.SL,Pb:()=>B,w3:()=>o.w3,BI:()=>W,lr:()=>V,pf:()=>o.pf,ps:()=>E,s5:()=>g,y9:()=>o.y9,fS:()=>de,bs:()=>oe,_7:()=>se,Q$:()=>re,Dq:()=>ue,vT:()=>ne,QD:()=>ie,QH:()=>ae,Ob:()=>o.Ob,a4:()=>r.a4,B1:()=>r.B1,vv:()=>r.vv,Pi:()=>r.Pi,cY:()=>o.cY,GL:()=>r.GL,Wy:()=>o.Wy,wV:()=>o.wV,cq:()=>o.cq,rq:()=>u,No:()=>k,Og:()=>_,xv:()=>T,px:()=>N,xj:()=>o.xj,c1:()=>F,z5:()=>$,qr:()=>O,dx:()=>R,fw:()=>j,H9:()=>U,kM:()=>he,HN:()=>G,ff:()=>o.ff,vu:()=>X,P4:()=>o.P4,TM:()=>te,Fn:()=>o.Fn,ze:()=>fe,yC:()=>ge,Rg:()=>d,z3:()=>s,IM:()=>l,sN:()=>o.sN,Xg:()=>o.Xg,j6:()=>o.j6,lG:()=>o.lG,IE:()=>J,Nq:()=>m,Lm:()=>I,Q3:()=>C,eD:()=>v});var r=n(53475),o=n(4907),a=n(60782),i=n(11192);function s(e,t,n,r,o){const i=r.map((t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t}));return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...(0,a.ee)(i,"id")},[t]:{...e.stickers[t],hash:n,..."search"===t?{resultIds:o}:{setIds:r.map((e=>{let{id:t}=e;return t}))}}}}}function d(e,t,n){const r=e.stickers.setsById[t]||{},o=e.stickers.added.setIds||[];let a=o;return n.installedDate&&o&&!o.includes(t)&&(a=[t,...a]),!n.installedDate&&null!=o&&o.includes(t)&&(a=a.filter((e=>e!==t))),{...e,stickers:{...e.stickers,added:{...e.stickers.added,setIds:a},setsById:{...e.stickers.setsById,[t]:{...r,...n}}}}}function u(e,t,n,r){const{results:o}=e.gifs.search;let a;if(t||!o)a=n;else{const e=new Set(o.map((e=>e.id)));a=[...o,...n.filter((t=>!e.has(t.id)))]}return{...e,gifs:{...e.gifs,search:{...e.gifs.search,offset:r,results:a}}}}function c(e,t){return{...e,animatedEmojis:t}}function l(e,t,n,r){const o=[...(0,i.Pk)(e,t),...n||[]],s=(0,a.Tw)(o.map((e=>{let{id:t}=e;return t}))),d=(0,a.ee)(o,"id"),u=s.map((e=>d[e]));return{...e,stickers:{...e.stickers,forEmoji:{emoji:t,stickers:u,hash:r}}}}function f(e){const{emoji:t,stickers:n,hash:r}=e.stickers.forEmoji||{};return t?l(e,t,n,r):e}var h=n(70735);function g(e,t){return{...e,users:{...e.users,byId:t}}}function p(e,t){const{userIds:n}=e.contactList||{};if(!n)return e;const r=t.filter((e=>(null==e?void 0:e.isContact)&&!n.includes(e.id))).map((e=>e.id));return 0===r.length?e:{...e,contactList:{userIds:[...r,...n]}}}function m(e,t,n){const{byId:r}=e.users,o=b(e,t,n);return o?g(e=p(e,[o]),{...r,[t]:o}):e}function v(e,t){const n=Object.keys(t).reduce(((n,r)=>{const o=b(e,r,t[r]);return o&&(n[r]=o),n}),{});return e=p(e=g(e,{...e.users.byId,...n}),Object.values(n))}function y(e,t){const{byId:n}=e.users;let r=!1;const o=Object.keys(t).reduce(((o,a)=>{if(!n[a]||n[a].isMin&&!t[a].isMin){const n=b(e,a,t[a]);n&&(o[a]=n,r||(r=!0))}return o}),{});return r?e=p(e=g(e,{...n,...o}),Object.values(o)):e}function b(e,t,n){const{byId:r}=e.users,o=r[t],i=n.isMin&&o&&!o.isMin,s={...o,...i?(0,a.CE)(n,["isMin","accessHash"]):n};if(s.id&&s.type)return s}function w(e,t){const{byId:n}=e.users,{userIds:o}=e.contactList||{};return e=g(e={...e,contactList:{userIds:o?o.filter((e=>e!==t)):h.D}},{...n,[t]:{...n[t],isContact:void 0}}),(0,r.a4)(e,t,{settings:void 0})}function I(e,t){return{...e,userSearch:{...e.userSearch,...t}}}function C(e,t){return I(e,{fetchingStatus:t})}function S(e,t,n){const{byId:r}=e.users,o=r[t];return o&&o.fullInfo?m(e,t,{...o,fullInfo:{...o.fullInfo,isBlocked:n}}):e}function E(e,t){return{...e,users:{...e.users,statusesById:t}}}function P(e,t){const{statusesById:n}=e.users,r=Object.keys(t).filter((e=>!n[e]));return r.length?e=E(e,{...n,...(0,a.ei)(t,r)}):e}function M(e){return{...e,newContact:void 0}}const A=e=>`${e.chatId}_${e.id}`;function k(e,t){return{...e,globalSearch:{...e.globalSearch,...t}}}function _(e,t){return k(e,{currentContent:t})}function N(e,t,n,r,o){var i;const{resultsByType:s}=e.globalSearch||{},d=t.reduce(((e,t)=>(e[A(t)]=t,e)),{}),u=null==s||null===(i=s[r])||void 0===i?void 0:i.foundIds;if(void 0!==u&&Object.keys(d).every((e=>u.includes(A(d[e])))))return T(e,{messages:!1});const c=u||[],l=t.map((e=>A(e))),f=Array.prototype.concat(c,l),h=(0,a.et)(c,f)?c:f;return k(e=T(e,{messages:!1}),{resultsByType:{...(e.globalSearch||{}).resultsByType,[r]:{totalCount:n,nextOffsetId:o,foundIds:h}}})}function T(e,t){return k(e,{fetchingStatus:{...e.globalSearch.fetchingStatus,...t}})}var x=n(83158);function L(e,t,n){return{...e,localTextSearch:{byChatThreadKey:{...e.localTextSearch.byChatThreadKey,[t]:n}}}}function O(e,t,n,r,o){const a=(0,x.uw)(t,n);return L(e,a,{...e.localTextSearch.byChatThreadKey[a],isActive:r,query:o})}function B(e,t,n,r,o,a){const i=(0,x.uw)(t,n);return L(e,i,{...e.localTextSearch.byChatThreadKey[i],results:{foundIds:r,totalCount:o,nextOffsetId:a}})}function R(e,t,n,r,o,i){const s=(0,x.uw)(t,n),{results:d}=e.localTextSearch.byChatThreadKey[s]||{},u=(null==d?void 0:d.foundIds)||[],c=Z((0,a.Tw)(Array.prototype.concat(u,r)));return B(e,t,n,(0,a.et)(u,c)?u:c,o,i)}function D(e,t,n){return{...e,localMediaSearch:{byChatId:{...e.localMediaSearch.byChatId,[t]:n}}}}function $(e,t,n){return D(e,t,{...e.localMediaSearch.byChatId[t],currentType:n})}function F(e,t,n,r,o,i){const{resultsByType:s}=e.localMediaSearch.byChatId[t]||{},d=null!=s&&s[n]?s[n].foundIds:[],u=Z((0,a.Tw)(Array.prototype.concat(d,r)));return function(e,t,n,r,o,a){return D(e,t,{...e.localMediaSearch.byChatId[t],resultsByType:{...(e.localMediaSearch.byChatId[t]||{}).resultsByType,[n]:{foundIds:r,totalCount:o,nextOffsetId:a}}})}(e,t,n,(0,a.et)(d,u)?d:u,o,i)}function Z(e){return e.sort(((e,t)=>t-e))}function U(e,t){return{...e,management:{...e.management,progress:t}}}function j(e,t,n){return{...e,management:{...e.management,byChatId:{...e.management.byChatId,[t]:{...e.management.byChatId[t]||{},...n}}}}}function W(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function V(e,t,n){return{...e,settings:{...e.settings,themes:{...e.settings.themes,[t]:{...e.settings.themes[t]||{},...n}}}}}function z(e,t){return t.forEach((t=>{const{chatId:n,...r}=t;e=H(e,n,r)})),e}function H(e,t,n){return{...e,settings:{...e.settings,notifyExceptions:{...e.settings.notifyExceptions,[t]:n}}}}function G(e,t,n,r){switch(t){case"contact":return W(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==r&&{hasPrivateChatsMessagePreview:r}});case"group":return W(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==r&&{hasGroupMessagePreview:r}});case"broadcast":return W(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==r&&{hasBroadcastMessagePreview:r}})}}function q(e,t){return e=S(e,t,!0),{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function K(e,t){return e=S(e,t,!1),{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter((e=>e!==t)),totalCount:e.blocked.totalCount-1}}}function J(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}var Y=n(35369);function X(e,t){return{...e,passcode:{...e.passcode,...t}}}function Q(e){return{...e,passcode:{}}}function ee(e){const{theme:t,shouldUseSystemTheme:n,animationLevel:r,language:o}=e.settings.byKey;return{...Y.Y,passcode:e.passcode,settings:{...Y.Y.settings,byKey:{...Y.Y.settings.byKey,theme:t,shouldUseSystemTheme:n,animationLevel:r,language:o}}}}function te(e,t){return{...e,payment:{...e.payment,shippingOptions:t}}}function ne(e,t){return{...e,payment:{...e.payment,requestId:t}}}function re(e,t){return{...e,payment:{...e.payment,step:t}}}function oe(e,t){const{title:n,text:r,amount:o,currency:a,isTest:i,photo:s,isRecurring:d,recurringTermsUrl:u}=t;return{...e,payment:{...e.payment,invoiceContent:{title:n,text:r,photo:s,amount:o,currency:a,isTest:i,isRecurring:d,recurringTermsUrl:u}}}}function ae(e,t){return{...e,payment:{...e.payment,stripeCredentials:{...t}}}}function ie(e,t){return{...e,payment:{...e.payment,smartGlocalCredentials:{...t}}}}function se(e,t){return{...e,payment:{...e.payment,...t}}}function de(e,t){return{...e,payment:{...e.payment,confirmPaymentUrl:t}}}function ue(e,t,n){if(!t||!n)return{...e,payment:{...e.payment,receipt:void 0}};const{invoice:r}=n.content,{photo:o,text:a,title:i}=r||{};return{...e,payment:{...e.payment,receipt:{...t,photo:o,text:a,title:i}}}}function ce(e){return{...e,payment:{}}}function le(e){return{...e,payment:{...e.payment,isPaymentModalOpen:!1}}}function fe(e,t,n){return{...e,statistics:{byChatId:{...e.statistics.byChatId,[t]:n}}}}function he(e,t){return{...e,statistics:{...e.statistics,currentMessage:t}}}function ge(e,t,n,r){return{...e,statistics:{...e.statistics,byChatId:{...e.statistics.byChatId,[t]:{...e.statistics.byChatId[t]||{},[n]:r}}}}}},4907:(e,t,n)=>{"use strict";n.d(t,{$S:()=>I,Fn:()=>A,K4:()=>m,M6:()=>_,Ob:()=>N,P4:()=>p,Wy:()=>s,Xg:()=>S,bV:()=>v,cY:()=>g,c_:()=>h,cq:()=>M,ff:()=>b,i9:()=>T,j6:()=>E,lG:()=>x,m6:()=>f,pf:()=>l,sN:()=>u,w3:()=>P,wV:()=>k,xj:()=>y,y9:()=>C});var r=n(6137),o=n(83716),a=n(11192),i=n(60782);function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r._f,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"thread",i=arguments.length>4?arguments[4]:void 0;const{messageLists:s}=e.messages;let d=s;if(i||o.Cg&&!o.Nu)d=t?[{chatId:t,threadId:n,type:a}]:[];else if(t){const e=s[s.length-1];e&&e.chatId===t&&e.threadId===n&&e.type===a||(d=e&&e.chatId===o.AJ?[...s.slice(0,-1),{chatId:t,threadId:n,type:a}]:[...s,{chatId:t,threadId:n,type:a}])}else d=s.slice(0,-1);return{...e,messages:{...e.messages,messageLists:d}}}function d(e,t,n){return c(e,t,{byId:n})}function u(e,t,n,r){const o=e.messages.byChatId[t];return c(e,t,{threadsById:{...null==o?void 0:o.threadsById,[n]:{...null==o?void 0:o.threadsById[n],...r}}})}function c(e,t,n){const r=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...r,...n}}}}}function l(e,t,n,r,o){return u(e,t,n,{[r]:o})}function f(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).forEach((t=>{e=h(e,t,n[t])})),e}function h(e,t,n){const r=(0,a.Zw)(e,t);return r&&Object.keys(n).every((e=>Boolean(r[Number(e)])))?e:d(e,t,{...n,...r})}function g(e,t,n,r){const o=(0,a.Zw)(e,t)||{},i={...o[n],...r};return i.id?d(e,t,{...o,[n]:i}):e}function p(e,t,n,r){const o=(0,a.Fn)(e,t)||{},i={...o[n],...r};return i.id?P(e,t,{...o,[n]:i}):e}function m(e,t,n){const r=(0,a.Zw)(e,t);if(!r)return e;const o=(0,i.CE)(r,n),u=Object.values((0,i.q0)(r,n)).filter((e=>{let{forwardInfo:t}=e;return null==t?void 0:t.isLinkedChannelPost}));if(Object.keys(e.messages.byChatId[t].threadsById).map(Number).forEach((r=>{const o=(0,a.tZ)(e,t,r);let i=(0,a.gb)(e,t,r),s=(0,a.qC)(e,t,r),d=(0,a.Cb)(e,t,r),u=(0,a.KB)(e,t),c=null==o?void 0:o.messagesCount;n.forEach((e=>{i&&i.includes(e)&&(i=i.filter((t=>t!==e)),void 0!==c&&(c-=1)),s&&s.includes(e)&&(s=s.filter((t=>t!==e))),d&&d.includes(e)&&(d=d.filter((t=>t!==e))),u&&u.includes(e)&&(u=u.filter((t=>t!==e)))})),e=l(e,t,r,"listedIds",i),e=l(e,t,r,"outlyingIds",s),e=l(e,t,r,"viewportIds",d),e=l(e,t,r,"pinnedIds",u),o&&void 0!==c&&(e=l(e,t,r,"threadInfo",{...o,messagesCount:c}))})),u.length){const n=(0,a.Bt)(e),r=n&&n.chatId===t&&"thread"===n.type,o=null==n?void 0:n.threadId;u.forEach((n=>{const{fromChatId:i,fromMessageId:d}=n.forwardInfo,u=(0,a.hj)(e,i,d);r&&o===d&&(e=s(e,t)),u&&(e=g(e,i,d,{threadInfo:void 0}))}))}return e=d(e,t,o)}function v(e,t,n){const o=(0,a.Fn)(e,t);if(!o)return e;const s=(0,i.CE)(o,n);let d=(0,a.qy)(e,t);return d&&(n.forEach((e=>{d.includes(e)&&(d=d.filter((t=>t!==e)))})),e=l(e,t,r._f,"scheduledIds",d)),P(e,t,s)}function y(e,t,n,r){const o=(0,a.gb)(e,t,n),i=null!=o&&o.length?r.filter((e=>!o.includes(e))):r;return o&&!i.length?e:l(e,t,n,"listedIds",w([...o||[],...i]))}function b(e,t,n,r){const o=(0,a.qC)(e,t,n),i=null!=o&&o.length?r.filter((e=>!o.includes(e))):r;return o&&!i.length?e:l(e,t,n,"outlyingIds",w([...o||[],...i]))}function w(e){return e.sort(((e,t)=>e-t))}function I(e,t,n,r){const i=(0,a.Cb)(e,t,n)||[];return i.includes(r)?e:l(e,t,n,"viewportIds",w([...i.length{e=S(e,t.chatId,t.threadId,t)})),e}function P(e,t,n){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})}function M(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return{...e,focusedMessage:{...e.focusedMessage,chatId:t,messageId:n,noHighlight:r,isResizingContainer:o}}}function A(e,t,n){return{...e,messages:{...e.messages,sponsoredByChatId:{...e.messages.sponsoredByChatId,[t]:n}}}}function k(e,t){return{...e,focusedMessage:{...e.focusedMessage,direction:t}}}function _(e,t,n){return{...e,selectedMessages:{chatId:t,messageIds:n?Array.prototype.concat([],n):[]}}}function N(e,t,n,r,o,s,d){let u=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const{selectedMessages:c}=e;s&&(d=(0,a.xH)(e,t,s));const l=d||[o];if(!c)return _(e,t,l);const{messageIds:f}=c;let h;const g=l.filter((e=>!f.includes(e)));if(g&&!g.length)h=f.filter((e=>!l.includes(e)));else if(u&&f.length){const s=(0,a.$W)(e,t,n,r),d=s.indexOf(f[f.length-1]),u=s.indexOf(o),c=Math.min(d,u),l=Math.max(d,u),g=s.slice(c,l+1);h=(0,i.Tw)([...f,...g])}else h=[...f,...g];return h.length?{...e,selectedMessages:{...c,messageIds:h}}:T(e)}function T(e){return{...e,selectedMessages:void 0}}function x(e,t,n,r,o){const{channelPostId:i,fromChatId:s}=t.forwardInfo||{};if(i&&s){const t=(0,a.tZ)(e,n,i);t&&(e=l(e,n,i,"threadInfo",{...t,lastMessageId:r,messagesCount:t.messagesCount+(o?-1:1)}))}return e}},14342:(e,t,n)=>{"use strict";n.d(t,{DI:()=>C,Ek:()=>b,FM:()=>u,IK:()=>h,LM:()=>g,Mw:()=>w,N:()=>y,P_:()=>l,QV:()=>P,UW:()=>S,YK:()=>f,Z1:()=>s,_5:()=>E,ep:()=>I,g4:()=>v,pk:()=>m,x$:()=>p,xo:()=>c});var r=n(6137),o=n(83158),a=n(86087),i=n(83716);function s(e,t){return e.chats.byId[t]}function d(e,t){const n=(0,o.zX)(t);return!!n&&(0,a.dy)(e,n)}function u(e,t){return t===e.currentUserId}function c(e,t){const n=d(e,t);return n&&(0,o.cS)(n)}function l(e){return Object.values(e.chats.byId).find((e=>{let{isSupport:t}=e;return t}))}function f(e,t){if(!(0,o.YC)(t.id)&&!(0,o.eA)(t)&&t.fullInfo)return t.fullInfo.members&&t.fullInfo.members.length!==i.mo?t.fullInfo.members.reduce(((t,n)=>{let{userId:r}=n;return r!==e.currentUserId&&e.users.byId[r]&&(0,o.kM)(e.users.byId[r],e.users.statusesById[r])?t+1:t}),0):t.fullInfo.onlineCount}function h(e,t){const n=s(e,t),r=n&&(0,o.zX)(n),i=r&&(0,a.dy)(e,r);if(i&&(0,o.cS)(i))return i}function g(e,t){const n=(0,a.dy)(e,t);return n&&(n.isVerified||e.trustedBotIds.includes(t))}function p(e,t){const n=s(e,t);if(n)return(0,a.kB)(e,t)?"bot":d(e,n)?"private":(0,o.eA)(n)?"channel":"chat"}function m(e,t){const n=s(e,t),a=h(e,t);if(!n||!a)return!1;if(n.lastMessage&&(0,o.CD)(n.lastMessage))return!0;const i=e.messages.byChatId[t];if(!i)return!1;const{listedIds:d}=i.threadsById[r._f]||{};return d&&!d.length}function v(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 b(e,t){const n=s(e,t);if(n&&y(e,t))return n.folderId===i.WS?"archived":"active"}function w(e,t){return e.chatFolders.byId[t]}function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.Nf;const{active:r,archived:o}=e.chats.orderedPinnedIds;if(n===i.Nf)return Boolean(null==r?void 0:r.includes(t));if(n===i.WS)return Boolean(null==o?void 0:o.includes(t));const{byId:a}=e.chatFolders,{pinnedChatIds:s}=a[n]||{};return Boolean(null==s?void 0:s.includes(t))}function C(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find((e=>e.username&&e.username.toLowerCase()===n))}function S(e){return Boolean(s(e,i.aw))}function E(e,t){var n;const r=s(e,t);if(!r)return;const o=null==r||null===(n=r.fullInfo)||void 0===n?void 0:n.sendAsId;return o?(0,a.dy)(e,o)||s(e,o):void 0}function P(e,t){var n;if((null===(n=e.openChatWithText)||void 0===n?void 0:n.chatId)===t)return e.openChatWithText.text}},11192:(e,t,n)=>{"use strict";n.d(t,{xs:()=>ge,_k:()=>ue,zB:()=>v,tH:()=>y,Oh:()=>b,g4:()=>s.g4,x$:()=>s.x$,bH:()=>Ae,__:()=>_e,xl:()=>ce,Nu:()=>fe,nB:()=>le,Eh:()=>$e,Z1:()=>s.Z1,IK:()=>s.IK,DI:()=>s.DI,Mw:()=>s.Mw,Ek:()=>s.Ek,hj:()=>X,ZB:()=>te,Zw:()=>A,YK:()=>s.YK,X5:()=>be,jr:()=>M,yN:()=>f,JX:()=>qe,pP:()=>We,we:()=>Ze,$W:()=>x,Bt:()=>P,y5:()=>l,n5:()=>Fe,q6:()=>Be,Ms:()=>j,s:()=>F,_$:()=>$,kK:()=>ee,hI:()=>U,wU:()=>Z,yZ:()=>z,It:()=>ve,G$:()=>ne,y8:()=>Ce,cv:()=>de,ku:()=>Le,pk:()=>s.pk,N:()=>s.N,ep:()=>s.ep,xo:()=>s.xo,FM:()=>s.FM,wV:()=>d.wV,a6:()=>Ee,te:()=>he,Ev:()=>ye,CA:()=>we,zQ:()=>Ve,_X:()=>re,KA:()=>J,EV:()=>xe,vk:()=>Ie,oe:()=>d.oe,Jf:()=>He,UW:()=>s.UW,LM:()=>s.LM,s4:()=>d.s4,b9:()=>Y,VF:()=>Te,gb:()=>N,CP:()=>w,cu:()=>I,ji:()=>C,aW:()=>je,xH:()=>Se,FT:()=>Me,tV:()=>W,NJ:()=>rt,dZ:()=>nt,dT:()=>ae,qC:()=>T,eh:()=>Je,kb:()=>Ke,sp:()=>Ye,KB:()=>O,EB:()=>Qe,$$:()=>Xe,rd:()=>me,Bz:()=>se,p9:()=>H,Yy:()=>D,QV:()=>s.QV,Wq:()=>ze,qy:()=>B,Tm:()=>Q,Fn:()=>k,Vt:()=>R,D7:()=>Pe,_5:()=>s._5,Ur:()=>ie,yB:()=>Ne,Aq:()=>De,Jg:()=>tt,fS:()=>Oe,aT:()=>Ue,Ny:()=>h,E_:()=>g,Pk:()=>p,i3:()=>et,P_:()=>s.P_,Pu:()=>Ge,Db:()=>K,tZ:()=>V,Cm:()=>G,qS:()=>q,uZ:()=>pe,dy:()=>d.dy,Bk:()=>d.Bk,ss:()=>d.ss,Cb:()=>L,P2:()=>Re});var r=n(91713),o=n(77361),a=n(6137),i=n(83716),s=n(14342),d=n(86087),u=n(83158),c=n(60782);function l(e){return e.stickers.search}function f(e){return e.gifs.search}function h(e,t){return e.stickers.setsById[t]}function g(e,t){return Object.values(e.stickers.setsById).find((e=>e.shortName.toLowerCase()===t.toLowerCase()))}function p(e,t){const n=Object.values(e.stickers.setsById);let r=[];return e.stickers.favorite.stickers.forEach((e=>{e.emoji===t&&r.push(e)})),n.forEach((e=>{let{packs:n}=e;n&&(r=r.concat(n[t]||[],n[m(t)]||[]))})),r}function m(e){return e.replace("️","")}function v(e,t){const{animatedEmojis:n}=e;if(!n||!n.stickers)return;const r=m(t);return n.stickers.find((e=>e.emoji===t||e.emoji===r))}function y(e,t){const{animatedEmojiEffects:n}=e;if(!n||!n.stickers)return;const r=m(t);return n.stickers.find((e=>e.emoji===t||e.emoji===r))}function b(e,t){var n;return null==e||null===(n=e.appConfig)||void 0===n?void 0:n.emojiSounds[m(t)]}function w(e,t){const n=m(t);return"🍑"===n?"Peach":"🍆"===n?"Eggplant":void 0}function I(e){return"Eggplant"===e?"Cumshot":void 0}function C(e){return"Cumshot"===e?"🍆":void 0}var S=n(82267),E=n(70735);function P(e){const{messageLists:t}=e.messages;if(t.length)return t[t.length-1]}function M(e){const{chatId:t}=P(e)||{};return t?(0,s.Z1)(e,t):void 0}function A(e,t){var n;return null===(n=e.messages.byChatId[t])||void 0===n?void 0:n.byId}function k(e,t){var n;return null===(n=e.scheduledMessages.byChatId[t])||void 0===n?void 0:n.byId}function _(e,t,n,r){const o=e.messages.byChatId[t];if(!o)return;const a=o.threadsById[n];return a?a[r]:void 0}function N(e,t,n){return _(e,t,n,"listedIds")}function T(e,t,n){return _(e,t,n,"outlyingIds")}function x(e,t,n,r){switch(r){case"thread":return L(e,t,n);case"pinned":return O(e,t);case"scheduled":return B(e,t)}}function L(e,t,n){return _(e,t,n,"viewportIds")}function O(e,t){return _(e,t,a._f,"pinnedIds")}function B(e,t){return _(e,t,a._f,"scheduledIds")}function R(e,t,n){return _(e,t,n,"scrollOffset")}function D(e,t,n){return _(e,t,n,"replyingToId")}function $(e,t,n){return _(e,t,n,"editingId")}function F(e,t,n){return _(e,t,n,"editingDraft")}function Z(e,t){return _(e,t,a._f,"editingScheduledId")}function U(e,t){return _(e,t,a._f,"editingScheduledDraft")}function j(e,t,n){return _(e,t,n,"draft")}function W(e,t,n){return _(e,t,n,"noWebPage")}function V(e,t,n){return _(e,t,n,"threadInfo")}function z(e,t,n){return _(e,t,n,"firstMessageId")}function H(e,t,n){return _(e,t,n,"replyStack")}function G(e,t,n){if(n===a._f)return(0,s.Z1)(e,t);const r=V(e,t,n);return r?(0,s.Z1)(e,r.originChannelId||t):void 0}function q(e,t,n){if(n===a._f)return;const r=V(e,t,n);return r?r.topMessageId:void 0}function K(e,t,n){const r=e.messages.byChatId[t];if(!r)return;const{replyToMessageId:o,replyToTopMessageId:a}=n;return o||a?Object.values(r.threadsById).find((e=>e.threadInfo&&(o&&o===e.threadInfo.topMessageId||a&&a===e.threadInfo.topMessageId))):void 0}function J(e,t,n){const r=P(e);if(!r)return!1;const{threadInfo:o}=K(e,t,n)||{};return t===r.chatId&&(r.threadId===a._f||o&&r.threadId===o.threadId)}function Y(e,t,n){const r=L(e,t,n);if(!r||!r.length)return!0;let o;if(n===a._f){const n=(0,s.Z1)(e,t);if(!n||!n.lastMessage)return!0;o=n.lastMessage.id}else{const r=V(e,t,n);if(!r||!r.lastMessageId)return;o=r.lastMessageId}return o>i.MP&&!X(e,t,o)||r[r.length-1]>=o}function X(e,t,n){const r=A(e,t);return r?r[n]:void 0}function Q(e,t,n){const r=k(e,t);return r?r[n]:void 0}function ee(e,t,n,r){if("scheduled"===r){const n=Z(e,t);return n?Q(e,t,n):void 0}{const r=$(e,t,n);return r?X(e,t,r):void 0}}function te(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 ne(e,t){const{chatId:n,messageId:r}=e.focusedMessage||{};return n===t?r:void 0}function re(e,t){const n=ne(e,t.chatId);return!!n&&(n===t.id||n===t.previousLocalId)}function oe(e,t){const{lastReadOutboxMessageId:n}=(0,s.Z1)(e,t.chatId)||{};return(0,u.CI)(t)||!n||n2&&void 0!==arguments[2]&&arguments[2];return oe(e,t)||n?(0,u.RI)(t):"read"}function ie(e,t){const{senderId:n}=t;if(n)return(0,u.YC)(n)?(0,d.dy)(e,n):(0,s.Z1)(e,n)}function se(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n){const{senderUserId:n,hiddenUserName:r}=t.forwardInfo||{};if(n)return(0,u.YC)(n)?(0,d.dy)(e,n):(0,s.Z1)(e,n);if(r)return}const{senderId:r}=t;if(r)return(0,u.YC)(r)?(0,d.dy)(e,r):(0,s.Z1)(e,r)}function de(e,t){const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?(0,s.Z1)(e,n.fromChatId):n.senderUserId?(0,d.dy)(e,n.senderUserId)||(0,s.Z1)(e,n.senderUserId):void 0}function ue(e,t,n){var r,o,a,i,d,c;const l=(0,s.Z1)(e,t.chatId);if(!l||l.isRestricted)return{};const f=(0,u.YC)(l.id),h=(0,s.FM)(e,t.chatId),g=(0,u.G9)(l),p=(0,u.ZV)(l),m=(0,u.eA)(l),v=(0,u.CI)(t),y=(0,u.jM)(t),b=(0,u.B4)(t),w=(0,u.Lo)(t),{content:I}=t,C=(h||p&&(0,u.VE)(l,"pinMessages")||m&&(0,u.VE)(l,"editMessages")||(0,S.b)(e.serverTimeOffset)-t.date<172800)&&!(I.sticker||I.contact||I.poll||I.action||I.audio||null!==(r=I.video)&&void 0!==r&&r.isRound||I.location)&&!(0,u.MF)(t)&&!t.viaBotId&&!l.isForbidden,E=!v&&!y&&!l.isForbidden&&(0,u.Qm)(l,n),P=f||l.isCreator||!m&&!(0,u.Mg)(l,"pinMessages")||(0,u.VE)(l,"pinMessages");let M=!v&&!y&&!w&&P,A=!1;const k=O(e,l.id);M&&(A=Boolean(k&&k.includes(t.id)),M=!A);const _=!v&&!y&&(f||b||g||l.isCreator||(0,u.VE)(l,"deleteMessages")),N=!f&&!b,T=_&&!l.isForbidden&&(f&&!h||g&&(b||(0,u.VE)(l,"deleteMessages")||l.isCreator)),x=!v&&!w&&C&&(b||m&&(l.isCreator||(0,u.VE)(l,"editMessages"))),L=!v&&!w,B=Boolean(t.content.sticker),R=B&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some((e=>{let{id:n}=e;return n===t.id}))}(e,t.content.sticker),D=!w&&B&&!R,$=!w&&R,F=!w,Z=!w&&(m||p),U=!w,j=Boolean((null===(o=I.webPage)||void 0===o?void 0:o.document)||(null===(a=I.webPage)||void 0===a?void 0:a.video)||(null===(i=I.webPage)||void 0===i?void 0:i.photo)||I.audio||I.voice||I.photo||I.video||I.document||I.sticker),W=null===(d=t.content.video)||void 0===d?void 0:d.isGif,V=I.poll,z=!(null!=V&&V.summary.closed)&&!(null!=V&&V.summary.quiz)&&(null==V||null===(c=V.results.results)||void 0===c?void 0:c.some((e=>e.isChosen))),H=b&&V&&!V.summary.closed;return{noOptions:[E,x,M,A,N,_,T,L,D,$,F,Z,U,j,W,z,H].every((e=>!e)),canReply:E,canEdit:x,canPin:M,canUnpin:A,canReport:N,canDelete:_,canDeleteForAll:T,canForward:L,canFaveSticker:D,canUnfaveSticker:$,canCopy:F,canCopyLink:Z,canSelect:U,canDownload:j,canSaveGif:W,canRevote:z,canClosePoll:H}}function ce(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=P(e)||{},o=n&&A(e,n);if(!o||!t||!r)return{};const a=t.map((t=>o[t]&&ue(e,o[t],r))).filter(Boolean);return{canDelete:a.every((e=>e.canDelete)),canDeleteForAll:a.every((e=>e.canDeleteForAll))}}function le(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=P(e)||{},o=n&&A(e,n);return!!(o&&t&&r)&&t.map((t=>o[t]&&ue(e,o[t],r))).filter(Boolean).every((e=>e.canReport))}function fe(e){const{messageIds:t}=e.selectedMessages||{},{chatId:n,threadId:r}=P(e)||{},o=n&&A(e,n);return!!(o&&t&&r)&&t.map((t=>o[t]&&ue(e,o[t],r))).filter(Boolean).some((e=>e.canDownload))}function he(e,t){const n=e.activeDownloads.byChatId[t.chatId];return!!n&&n.includes(t.id)}function ge(e,t){return e.activeDownloads.byChatId[t]||E.D}function pe(e,t){var n;return null===(n=e.fileUploads.byMessageLocalId[(0,u.KK)(t)])||void 0===n?void 0:n.progress}function me(e,t,n){if(n===a._f){const n=(0,s.Z1)(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return n.lastMessage?(0,u.CI)(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?Math.min(r.lastReadInboxMessageId,r.lastMessageId||1/0):r.topMessageId}}function ve(e,t,n){const r=(0,s.Z1)(e,t);if(n===a._f){if(!r)return}else{const r=V(e,t,n);if(!r||void 0!==r.lastMessageId&&r.lastMessageId===r.lastReadInboxMessageId)return}const o=T(e,t,n),d=N(e,t,n),u=A(e,t);if(!u||!o&&!d)return;const c=me(e,t,n);if(!c&&r&&r.isNotJoined)return;const l=t===i.aw?e.serviceNotifications.reduce(((e,t)=>!t.isUnread&&t.id>e?t.id:e),-1):-1;function f(e){return e.find((e=>(!c||e>c)&&u[e]&&(!u[e].isOutgoing||u[e].isFromScheduled)&&e>l))}if(o){const e=f(o);if(e)return e}if(d){const e=f(d);if(e)return e}}function ye(e){const{forwardMessages:t,switchBotInline:n}=e;return Boolean(n||t.isModalShown)}function be(e,t){const n=Object.values(e.chats.byId).find((e=>(0,u.Ru)(e)&&e.lastMessage&&e.lastMessage.id===t));if(n)return n.id;const{byChatId:r}=e.messages;return Object.keys(r).find((n=>{const o=(0,s.Z1)(e,n);return o&&(0,u.Ru)(o)&&r[o.id].byId[t]}))}function we(e){const{selectedMessages:t}=e;return Boolean(t)}function Ie(e,t){const{messageIds:n}=e.selectedMessages||{};return!!n&&n.includes(t)}function Ce(e,t,n){const r=A(e,t);if(r)return Object.values(r).filter((e=>e.groupedId===n&&e.forwardInfo)).map((e=>{let{forwardInfo:t}=e;return t.fromMessageId}))}function Se(e,t,n){const r=A(e,t);if(r)return Object.keys(r).map(Number).filter((e=>r[e].groupedId===n))}function Ee(e,t,n){const{messageIds:r}=e.selectedMessages||{};if(!r)return!1;const o=Se(e,t,n);return o&&o.every((e=>r.includes(e)))}function Pe(e){const{messageIds:t}=e.selectedMessages||{};return t?t.length:0}function Me(e,t){const n=(0,s.Z1)(e,t);if(!n)return;if(!(0,s.xo)(e,n))return;const r=A(e,t),o=L(e,t,a._f);if(!r||!o)return;const i=(0,c.dF)(o,(e=>!r[e].isOutgoing&&Boolean(r[e].keyboardButtons))),d=(0,c.dF)(o,(e=>Boolean(r[e].shouldHideKeyboardButtons)));return i&&d&&d>i?void 0:i?r[i]:void 0}function Ae(e,t){const n=(0,s.Z1)(e,t.chatId);if(!n)return;const r=ie(e,t),o=Boolean((0,u.O$)(t)||(0,u.F$)(t)),a=Boolean((0,u.b7)(t)||(0,u.Cg)(t)),i=Boolean((0,u.oP)(t)||(0,u.kd)(t)||(0,u.aE)(t)),{canAutoLoadPhotoFromContacts:d,canAutoLoadPhotoInPrivateChats:c,canAutoLoadPhotoInGroups:l,canAutoLoadPhotoInChannels:f,canAutoLoadVideoFromContacts:h,canAutoLoadVideoInPrivateChats:g,canAutoLoadVideoInGroups:p,canAutoLoadVideoInChannels:m,canAutoLoadFileFromContacts:v,canAutoLoadFileInPrivateChats:y,canAutoLoadFileInGroups:b,canAutoLoadFileInChannels:w}=e.settings.byKey;return o?ke({global:e,chat:n,sender:r,canAutoLoadMediaFromContacts:d,canAutoLoadMediaInPrivateChats:c,canAutoLoadMediaInGroups:l,canAutoLoadMediaInChannels:f}):a?ke({global:e,chat:n,sender:r,canAutoLoadMediaFromContacts:h,canAutoLoadMediaInPrivateChats:g,canAutoLoadMediaInGroups:p,canAutoLoadMediaInChannels:m}):!i||ke({global:e,chat:n,sender:r,canAutoLoadMediaFromContacts:v,canAutoLoadMediaInPrivateChats:y,canAutoLoadMediaInGroups:b,canAutoLoadMediaInChannels:w})}function ke(e){let{global:t,chat:n,sender:r,canAutoLoadMediaFromContacts:o,canAutoLoadMediaInPrivateChats:a,canAutoLoadMediaInGroups:i,canAutoLoadMediaInChannels:s}=e;const c=Boolean(r&&(r.id===t.currentUserId||(0,d.nM)(t,r)));return Boolean(c&&o||!c&&a&&(0,u.YC)(n.id)||i&&(0,u.Bf)(n)||s&&(0,u.eA)(n))}function _e(e,t){const n=(0,u.b7)(t)||(0,u.Cg)(t);if(!n)return;const{canAutoPlayVideos:r,canAutoPlayGifs:o}=e.settings.byKey,a=n.isGif||n.isRound;return r&&!a||o&&a}function Ne(e){return e.settings.byKey.shouldLoopStickers}function Te(e){const{serviceNotifications:t}=e,n=Math.max(...t.map((e=>{let{id:t}=e;return t})));return t.find((e=>{let{id:t,isHidden:r}=e;return!r&&t===n}))}function xe(e,t){var n;return!!t&&(t.isProtected||(null===(n=(0,s.Z1)(e,t.chatId))||void 0===n?void 0:n.isProtected))}function Le(e,t,n){var r;if(null!==(r=(0,s.Z1)(e,t))&&void 0!==r&&r.isProtected)return!0;if(!n)return!1;const o=A(e,t);return n.some((e=>{var t;return null===(t=o[e])||void 0===t?void 0:t.isProtected}))}function Oe(e,t){const n=(0,s.Z1)(e,t),r=n&&(0,u.eA)(n)?e.messages.sponsoredByChatId[t]:void 0;return r&&r.expiresAt>=Math.round(Date.now()/1e3)?r:void 0}function Be(e,t){var n,r,o;if(t===i.aw)return;const a=(0,u.YC)(t),d=null===(n=e.appConfig)||void 0===n?void 0:n.defaultReaction,{availableReactions:c}=e;if(!d||null==c||!c.some((e=>e.reaction===d&&!e.isInactive)))return;if(a)return d;const l=null===(r=(0,s.Z1)(e,t))||void 0===r||null===(o=r.fullInfo)||void 0===o?void 0:o.enabledReactions;return null!=l&&l.includes(d)?d:void 0}function Re(e){const{chatId:t,threadId:n}=P(e)||{};if(!t||!n)return;const r=_(e,t,n,"viewportIds");return r?r.map((n=>{const{senderId:r}=X(e,t,n)||{};return r?(0,d.dy)(e,r):void 0})).filter(Boolean):void 0}function De(e){var t;return"scheduled"===(null===(t=P(e))||void 0===t?void 0:t.type)}function $e(e,t){var n;const r=(0,s.FM)(e,t),o=t===i.FV&&(0,s.IK)(e,t);return Boolean(!r&&!o&&(0,u.YC)(t)&&(null===(n=(0,d.ss)(e,t))||void 0===n?void 0:n.wasOnline))}function Fe(e){const{chatId:t,threadId:n}=P(e)||{};if(!t||!n)return;const r=(0,u.uw)(t,n),o=e.localTextSearch.byChatThreadKey[r];return o&&o.isActive?o:void 0}function Ze(e){const{chatId:t}=P(e)||{};if(t)return e.localMediaSearch.byChatId[t]}function Ue(e,t){return e.statistics.byChatId[t]}function je(e,t){return e.management.byChatId[t]}function We(e){const{chatId:t,threadId:n}=P(e)||{};if(!t||!n)return;if((0,u.YC)(t))return"user";const r=(0,s.Z1)(e,t);return r?(0,u.Bf)(r)?"group":"channel":void 0}function Ve(e){const{mediaViewer:t}=e;return Boolean(t.mediaId||t.avatarOwnerId)}function ze(e){return function(e){const{pollResults:t}=e;return Boolean(t.messageId)}(e)?r.qt.PollResults:!o.wB&&Fe(e)?r.qt.Search:function(e){const{chatId:t,threadId:n}=P(e)||{};if(!t||!n)return;const r=e.management.byChatId[t];return r&&r.isActive?r:void 0}(e)?r.qt.Management:function(e){return!!e.isStatisticsShown&&Boolean(e.statistics.currentMessageId)}(e)?r.qt.MessageStatistics:function(e){var t;if(!e.isStatisticsShown)return!1;const{chatId:n}=P(e)||{},r=n?(0,s.Z1)(e,n):void 0;return null==r||null===(t=r.fullInfo)||void 0===t?void 0:t.canViewStatistics}(e)?r.qt.Statistics:void 0!==l(e).query?r.qt.StickerSearch:void 0!==f(e).query?r.qt.GifSearch:e.newChatMembersProgress!==r.WB.Closed?r.qt.AddingMembers:e.isChatInfoShown&&P(e)?r.qt.ChatInfo:void 0}function He(e){return void 0!==ze(e)}function Ge(e){const{theme:t,shouldUseSystemTheme:n}=e.settings.byKey;return n?(0,o.vn)():t}function qe(e){return e.globalSearch.query}function Ke(e){return e.payment.inputInvoice}function Je(e){return e.payment.formId}function Ye(e){return e.payment.requestId}function Xe(e){var t;return null===(t=e.payment.nativeParams)||void 0===t?void 0:t.publishableKey}function Qe(e){var t;return null===(t=e.payment.nativeParams)||void 0===t?void 0:t.publicToken}function et(e){return e.payment.stripeCredentials}function tt(e){return e.payment.smartGlocalCredentials}function nt(e){return e.settings.byKey}function rt(e){return e.settings.notifyExceptions}},86087:(e,t,n)=>{"use strict";n.d(t,{Bk:()=>u,dy:()=>o,kB:()=>l,nM:()=>c,oe:()=>d,s4:()=>i,ss:()=>a,wV:()=>s});var r=n(83158);function o(e,t){return e.users.byId[t]}function a(e,t){return e.users.statusesById[t]}function i(e,t){var n;const r=o(e,t);return null==r||null===(n=r.fullInfo)||void 0===n?void 0:n.isBlocked}function s(e){return!!e.currentUserId&&Boolean(e.users.byId[e.currentUserId].isPremium)}function d(e){var t,n;return null===(t=null===(n=e.appConfig)||void 0===n?void 0:n.isPremiumPurchaseBlocked)||void 0===t||t}function u(e,t){const n=t.replace(/[^0-9]/g,"");return Object.values(e.users.byId).find((e=>(null==e?void 0:e.phoneNumber)===n))}function c(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}function l(e,t){const n=o(e,t);if(n&&(0,r.cS)(n))return n}},77510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);const o=(e,t,n)=>{const[o,a]=(0,r.eJ)(!1),[i,s]=(0,r.eJ)(),[d,u]=(0,r.eJ)(n);return(0,r.d4)((()=>{a(!0);let t=!1;return e().then((e=>{t||(a(!1),u(e))}),(e=>{t||(a(!1),s(e))})),()=>{t=!0}}),t),{isLoading:o,error:i,result:d}}},45332:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);function o(e,t){(0,r.d4)((()=>(e&&!document.hasFocus()&&e(),e&&window.addEventListener("blur",e),t&&window.addEventListener("focus",t),()=>{t&&window.removeEventListener("focus",t),e&&window.removeEventListener("blur",e)})),[e,t])}},18360:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(87204);function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=(0,r.Z)(e,t);return n||null!=e?e:o}},67360:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(69118);function a(e,t,n,a,i){const s=(0,r.I4)(e,t);return(0,r.Ye)((()=>(0,o.Ds)(s,n,!a,!i)),[s,n,a,i])}},274:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(87204);const a=(e,t,n)=>{const a=(0,o.Z)(t);return(0,r.d4)((()=>e(a||[])),t,n)}},60706:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[t,n]=(0,r.eJ)(e),o=(0,r.I4)((()=>{n(!0)}),[]),a=(0,r.I4)((()=>{n(!1)}),[]);return[t,o,a]}},65326:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);const o=()=>{const[,e]=(0,r.eJ)(!1);return(0,r.I4)((()=>{e((e=>!e))}),[])}},18674:(e,t,n)=>{"use strict";n.d(t,{YW:()=>u,ZP:()=>c,zG:()=>d});var r=n(14050);const o="tt-event-heavy-animation-start",a="tt-event-heavy-animation-end";let i,s=!1;function d(){return s}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;function t(){i&&(clearTimeout(i),i=void 0),s=!1,document.dispatchEvent(new Event(a))}return s||(s=!0,document.dispatchEvent(new Event(o))),i&&(clearTimeout(i),i=void 0),i=window.setTimeout(t,e),t}const c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,r.d4)((()=>{if(!n)return s&&e(),document.addEventListener(o,e),document.addEventListener(a,t),()=>{document.removeEventListener(a,t),document.removeEventListener(o,e)}}),[n,t,e])}},46590:(e,t,n)=>{"use strict";n.d(t,{O:()=>u,Z:()=>P});var r=n(29290),o=n(14050),a=n(83716),i=n(69118),s=n(77361),d=n(65116);const u=window.location.hash,c=`${window.location.pathname}${window.location.search}`,l=Number(new Date);let f,h,g=!1,p=[],m=[],v=!1;function y(){v&&setTimeout((()=>{v=!1}),350)}function b(){const e=p.filter((e=>"go"===e.type)),t=p.filter((e=>"go"!==e.type)),n=e.reduce(((e,t)=>e+t.delta),0);p=[],n&&(window.history.go(n),t.length)?m.push(...t):w(t)}function w(e){e.forEach((e=>window.history[e.type](e.data,"",e.hash)))}function I(e){p.length||(0,i.T2)(b),p.push(e)}function C(){h=0,f=[{index:0,onBack:()=>window.history.back()}],window.history.replaceState({index:0,historyUniqueSessionId:l},c)}function S(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=e;for(let e=h-1;e>0&&f[e].isClosed;e--)t++;return t&&(g=!0,I({type:"go",delta:-t})),t}function E(){for(let n=f.length-1;n>0;n--){var e,t;f[n].isClosed||(v&&(0,d.Sv)().disableHistoryAnimations(),null===(e=(t=f[n]).onBack)||void 0===e||e.call(t))}C()}function P(e){let{isActive:t,shouldBeReplaced:n,hash:a,onBack:i}=e;const s=(0,o.sO)(),d=(0,o.sO)(!1),u=(0,o.sO)(!0),c=()=>{s.current&&f[s.current]&&!d.current&&(f[s.current].isClosed=!0,d.current=!0,s.current!==h||n||(h-=S()))};(0,o.d4)((()=>(u.current=!1,()=>{t&&!d.current&&c()})),[]),(0,r.Z)((()=>{u.current&&!t||(t?function(){const e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||f[h].shouldBeReplaced;s.current=e?h:++h,h=s.current;const t=f[s.current];var r;t&&!t.isClosed&&(null===(r=t.markReplaced)||void 0===r||r.call(t)),f[s.current]={index:s.current,onBack:i,shouldBeReplaced:n,markReplaced:()=>{d.current=!0}};for(let e=s.current+1;ef,window.TEST_getHistoryCursor=()=>h),s.cj&&(window.addEventListener("touchstart",(function(e){const t=e.touches[0].pageX;(t<=300||t>=window.innerWidth-300)&&(v=!0)})),window.addEventListener("touchend",y),window.addEventListener("popstate",y)),C(),window.addEventListener("popstate",(e=>{let{state:t}=e;if(g)return g=!1,void(m.length&&(w(m),m=[]));if(!t)return E(),void window.location.hash;const{index:n,historyUniqueSessionId:r}=t;if(r===l){if(n!==h)if(nn-e;t--){var o,a;f[t].isClosed?e++:(v&&(0,d.Sv)().disableHistoryAnimations(),null===(o=(a=f[t]).onBack)||void 0===o||o.call(a))}const t=S(e);h+=n-h-t,h<0&&(h=0)}else n>h&&(g=!0,I({type:"go",delta:-(n-h)}))}else E()}))},72313:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);const o=(e,t,n,o,a)=>{const[i,s]=(0,r.eJ)(-1);return(0,r.d4)((()=>{s(-1);const n=e.current;t&&n&&!a&&(n.tabIndex=-1,n.focus())}),[e,t,a]),(0,r.I4)((t=>{const r=e.current;if(!r)return;if(13===t.keyCode&&n)return void n(i);if(38!==t.keyCode&&40!==t.keyCode)return;const a=document.activeElement,d=Array.from(o?r.querySelectorAll(o):r.children);let u=a&&d.indexOf(a)||i;if(38===t.keyCode&&u>0)u--;else if(40===t.keyCode&&u{"use strict";n.d(t,{Z:()=>i});var r=n(50711),o=n(65326),a=n(29290);const i=()=>{const e=(0,o.Z)();return(0,a.Z)((()=>r.ll(e)),[e]),r.i0}},70692:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(31212);function o(e){const t=Boolean(e),{transitionClassNames:n}=(0,r.Z)(t,void 0,t,"slow");return n}},48778:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(14050),o=n(99203),a=n(65326);const i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=(0,o.o5)(e,t),d=(0,a.Z)();return(0,r.d4)((()=>{if(i)return(0,o.Qt)(d)}),[i,d]),(0,r.d4)((()=>{n||s||(0,o.$y)(e,t).then(d)}),[e,d,s,t,n]),s}},29290:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(87204);const o=(e,t)=>{const n=(0,r.Z)(t);n&&!t.some(((e,t)=>e!==n[t]))||e(n||[])}},87204:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);const o=function(e,t){const n=(0,r.sO)(),{current:o}=n;return t&&void 0===e||(n.current=e),o}},31212:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(14050),o=n(46752);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fast",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const[s,d]=(0,r.eJ)(!e),u=(0,r.sO)(),[c,l]=(0,r.eJ)(e&&n);if(e)d(!1),l(!0),u.current&&(window.clearTimeout(u.current),u.current=void 0);else if(l(!1),!s&&!u.current){const e=()=>{d(!0),t&&t(),u.current=void 0};i?e():u.current=window.setTimeout(e,350)}const f=c&&!(i&&!e),h=Boolean(u.current),g=e||h,p=(0,o.Z)(a&&"opacity-transition",a,f&&"open",g&&"shown",h&&"closing");return{shouldRender:g,transitionClassNames:p,hasShownClass:g,hasOpenClass:f}}},58758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(14050);function o(e,t,n){(0,r.d4)((()=>{const r=e=>{const r=t.current,o=e.target;r&&o&&(r.contains(e.target)&&!o.classList.contains("backdrop")||(e.preventDefault(),e.stopPropagation(),n&&n()))};return e&&n&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}}),[e,t,n])}},12255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(14050),o=n(69118),a=n(43858),i=n(67360);const s=()=>{const[e,t]=(0,r.eJ)(a.Z.get()),[n,s]=(0,r.eJ)(!1),d=(0,i.Z)(s,[],250,!0);return(0,r.d4)((()=>{const e=(0,o.P2)((()=>{s(!0)}),250,!0),n=(0,o.P2)((()=>{t(a.Z.get()),d(!1)}),250,!1),r=()=>{e(),n()};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}}),[d]),{...e,isResizing:n}}},31664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(14050),o=n(26926),a=n(83716);const i=new Set(["scroll","mouseenter","mouseleave","load"]),s={},d={},u=new Map;function c(e,t){const n=e.replace(/^on/,"").replace(/Capture$/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function l(e,t,n){return!n&&!i.has(e)&&"VIDEO"!==t.tagName&&"IFRAME"!==t.tagName}function f(e,t,n){s[e]||(s[e]=0,document.addEventListener(e,g)),function(e){return d[e]||(d[e]=new Map),d[e]}(e).set(t,n),function(e){const t=u.get(e);if(t)return t;const n=new Set;return u.set(e,n),n}(t).add(e),s[e]++}function h(e,t){s[e]--,s[e]||document.removeEventListener(e,g),d[e].delete(t),u.get(t).delete(e)}function g(e){const t=d[e.type];if(t){let n=!1,r=e.target;const o=()=>{n=!0},a=()=>{e.preventDefault()},i=new Proxy(e,{get:(e,t)=>"currentTarget"===t?r:"stopPropagation"===t||"stopImmediatePropagation"===t?o:"preventDefault"===t?a:Reflect.get(e,t)});for(;r&&r!==document.body;){const e=t.get(r);if(e&&(e(i),n))return;r=r.parentNode}}}a.eM&&document.addEventListener("dblclick",(()=>{const e=Object.keys(s).length,t=Object.values(s).reduce(((e,t)=>e+t),0),n=Object.keys(d).length,r=Object.values(d).reduce(((e,t)=>e+t.size),0),o=u.size,a=Array.from(u.values()).reduce(((e,t)=>e+t.size),0);console.warn("DELEGATED EVENTS STATS",{delegatedHandlersCount1:t,delegatedHandlersCount2:r,delegatedEventTypesCount:a,delegationRegistriesCount:n,delegationElementsCount:o,documentListenersCount:e})}));var p=n(60782);const m=new Set(["key","ref","teactFastList","teactOrderKey"]),v=new Set(["dir","role","form"]),y=["INPUT","TEXTAREA","SELECT"],b={autoPlay:"autoplay",autoComplete:"autocomplete"},w={};function I(e,t,n,o,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const{skipComponentUpdate:d,fragment:u}=s;let{nextSibling:c}=s;const l=t&&(0,r.op)(t),f=n&&(0,r.op)(n),h=n;if(!d&&l&&f&&!(0,r.k)(t,n)&&(n=S(t,n)),!d&&f&&n.componentInstance.isMounted&&E(e,n,o,i),t===n)return n;if(a.eM&&n){const e="target"in n&&n.target;if(e&&(!t||"target"in t&&e!==t.target))throw new Error("[Teact] Cached virtual element was moved within tree")}if(!t&&n)if(f)P(e,n=C(e,n,o,i),{nextSibling:c,fragment:u});else{const t=M(h);h.target=t,_(u||e,t,c)}else if(t&&!n)A(e,t,void 0);else if(t&&n)if((0,r.k)(t,n))if(c||(c=N(t)),f)n=C(e,n,o,i),A(e,t,void 0),P(e,n,{nextSibling:c,fragment:u});else{const n=M(h);h.target=n,A(e,t,n,c)}else if(l&&f)n.children=T(t,n,e,c);else{const o=t,a=o.target;if(h.target=a,o.target=void 0,(0,r.HI)(t)){const r=n;r.props.ref=t.props.ref,c&&_(e,a,c),O(t,r,a),r.children=T(t,r,a)}}return n}function C(e,t,n,o){const{componentInstance:a}=t;if(!a.isMounted){E(e,t=(0,r.Hb)(a),n,o);const i=t.children[0];(0,r.op)(i)&&(t.children=[C(e,i,t,0)]),a.isMounted=!0}return t}function S(e,t){return e.componentInstance.props=t.componentInstance.props,(0,r.SO)(e.componentInstance)}function E(e,t,n,r){const{componentInstance:o}=t;o.onUpdate=()=>{n.children[r]=I(e,n.children[r],o.$element,n,r,{skipComponentUpdate:!0})}}function P(e,t,n){t.children=t.children.map(((r,o)=>I(e,void 0,r,t,o,n)))}function M(e){if((0,r.V2)(e))return document.createTextNode("");if((0,r.iB)(e))return document.createTextNode(e.value);const{tag:t,props:n,children:o=[]}=e,a=document.createElement(t);return"object"==typeof n.ref&&(n.ref.current=a),L(t,n),Object.entries(n).forEach((e=>{let[t,r]=e;void 0!==n[t]&&B(a,t,r)})),function(e,t){y.includes(e.tagName)&&(t.defaultValue&&B(e,"value",t.defaultValue),t.defaultChecked&&B(e,"checked",t.defaultChecked))}(a,n),e.children=o.map(((t,n)=>I(a,void 0,t,e,n))),a}function A(e,t,n,o){(0,r.op)(t)?((0,r.su)(t.componentInstance),function(e,t){t.children.forEach((n=>{I(e,n,void 0,t,-1)}))}(e,t),n&&_(e,n,o)):(n?e.replaceChild(n,t.target):e.removeChild(t.target),k(t))}function k(e){if((0,r.op)(e))(0,r.su)(e.componentInstance);else if((0,r.HI)(e)&&(e.target&&function(e){const t=u.get(e);t&&(t.forEach((t=>h(t,e))),u.delete(e))}(e.target),e.props.ref&&(e.props.ref.current=void 0)),e.target&&(e.target=void 0),!(0,r.f4)(e))return;e.children.forEach(k)}function _(e,t,n){n?e.insertBefore(t,n):e.appendChild(t)}function N(e){if((0,r.op)(e))return N(e.children[e.children.length-1]);const t=e.target,{nextSibling:n}=t;return n||void 0}function T(e,t,n,o){if(a.eM&&function(e){const t=e[0];if(t&&"props"in t&&void 0!==t.props.key){const t=e.reduce(((e,t)=>("props"in t&&t.props.key&&e.push(t.props.key),e)),[]);if(t.length!==(0,p.Tw)(t).length)throw new Error("[Teact] Children keys are not unique")}}(t.children),t.props.teactFastList)return function(e,t,n){const o=new Set(t.children.map((e=>{const t="props"in e&&e.props.key;return a.eM&&(0,r.f4)(e)&&null==t&&console.warn("Missing `key` in `teactFastList`"),t})));let i=0;const s=e.children.reduce(((e,r,a)=>{let s="props"in r?r.props.key:void 0;const d=null!=s;if(d&&!o.has(s))return I(n,r,void 0,t,-1),e;if(!d){const o=t.children[a],i=o&&"props"in o?o.props.key:void 0;if(!o||i)return I(n,r,void 0,t,-1),e;s=`__indexKey#${a}`}return e[s]={$element:r,index:i++,orderKey:"props"in r?r.props.teactOrderKey:void 0},e}),{});let d,u,c=[],l=0;return t.children.forEach(((e,r)=>{const o="props"in e?e.props.key:`__indexKey#${r}`,a=s[o];if(!a)return d||(d=[],u=r),void d.push(e);d&&(c=c.concat(x(d,u,n,t)),d=void 0,u=void 0);const i="props"in e?e.props.teactOrderKey:void 0,f=a.index!==l&&a.orderKey!==i,h=f&&l>a.index;f&&!h||l++,c.push(I(n,a.$element,e,t,r,{nextSibling:f?n.childNodes[h?r+1:r]:void 0}))})),d&&(c=c.concat(x(d,u,n,t))),c}(e,t,n);const i=e.children.length,s=t.children.length,d=Math.max(i,s),u=[],c=s>i?document.createDocumentFragment():void 0,l=e.children[i-1],f=o||(s>i&&l?N(l):void 0);for(let r=0;r=i?{fragment:c}:{nextSibling:o});a&&u.push(a)}return c&&_(n,c,f),u}function x(e,t,n,r){const o=n.childNodes[t];if(1===e.length)return[I(n,void 0,e[0],r,t,{nextSibling:o})];const a=document.createDocumentFragment(),i=e.map(((e,o)=>I(n,void 0,e,r,t+o,{fragment:a})));return _(n,a,o),i}function L(e,t){if(!t.teactExperimentControlled)return;const n=void 0!==t.value,r=void 0!==t.checked;if(!n&&!r||!y.includes(e.toUpperCase()))return;const{value:o,checked:a,onInput:i,onChange:s}=t;t.onChange=void 0,t.onInput=e=>{null==i||i(e),null==s||s(e),void 0!==o&&(e.currentTarget.value=o),void 0!==a&&(e.currentTarget.checked=a)}}function O(e,t,n){L(n.tagName,t.props);const r=Object.entries(e.props),o=Object.entries(t.props);r.forEach((e=>{let[r,o]=e;const a=t.props[r];void 0!==o&&(void 0===a||o!==a&&r.startsWith("on"))&&function(e,t,n){"className"===t?e.className="":"value"===t?e.value="":"style"===t?e.style.cssText="":"dangerouslySetInnerHTML"===t?e.innerHTML="":t.startsWith("on")?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=c(t,e);l(o,e,r)?h(o,e):e.removeEventListener(o,n,r)}(e,t,n,t.endsWith("Capture")):t.startsWith("data-")||t.startsWith("aria-")||v.has(t)?e.removeAttribute(t):m.has(t)||delete e[b[t]||t]}(n,r,o)})),o.forEach((t=>{let[r,o]=t;const a=e.props[r];void 0!==o&&o!==a&&B(n,r,o)}))}function B(e,t,n){"className"===t?e.className=n:"value"===t?e.value!==n&&(e.value=n):"style"===t?e.style.cssText=n:"dangerouslySetInnerHTML"===t?e.innerHTML=n.__html:t.startsWith("on")?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=c(t,e);l(o,e,r)?f(o,e,n):e.addEventListener(o,n,r)}(e,t,n,t.endsWith("Capture")):t.startsWith("data-")||t.startsWith("aria-")||v.has(t)?e.setAttribute(t,n):m.has(t)||(e[b[t]||t]=n)}const R={render:function(e,t){let n=t.getAttribute("data-teact-head-id");n||(n=(0,o.Z)(w),w[n]={children:[]},t.setAttribute("data-teact-head-id",n));const r=w[n],a=I(t,r.children[0],e,r,0);r.children=a?[a]:[]}}},14050:(e,t,n)=>{"use strict";n.d(t,{HI:()=>g,Hb:()=>k,I4:()=>D,SO:()=>M,V2:()=>f,X$:()=>F,Ye:()=>R,ZP:()=>Z,bt:()=>B,d4:()=>O,eJ:()=>x,f4:()=>m,iB:()=>h,k:()=>A,op:()=>p,sO:()=>$,su:()=>_});var r=n(83716),o=n(69118),a=n(60782),i=n(275),s=n(33592);let d;!function(e){e[e.Empty=0]="Empty",e[e.Text=1]="Text",e[e.Tag=2]="Tag",e[e.Component=3]="Component"}(d||(d={}));const u=Symbol("Fragment"),c=new Set(["TeactMemoWrapper","TeactNContainer","Button","ListItem","MenuItem"]);let l;function f(e){return e.type===d.Empty}function h(e){return e.type===d.Text}function g(e){return e.type===d.Tag}function p(e){return e.type===d.Component}function m(e){return g(e)||p(e)}function v(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:[];const n=I(t).map(S);return{type:d.Component,componentInstance:e,props:e.props,children:n.length?n:[E()]}}function w(e,t,n){return{type:d.Tag,tag:e,props:t,children:I(n).map(S)}}function I(e){let t=e.length-1;for(;t>=0&&C(e[t]);t--);return t+17&&console.warn(`[Teact] Slow component render: ${n}, ${Math.round(t)} ms`),P[n].renderTimes.push(t),P[n].renderCount++}}catch(t){(0,s.S)(t),o=e.renderedValue}if(e.isMounted&&o===e.renderedValue)return e.$element;e.renderedValue=o;const a=Array.isArray(o)?o:[o];return e.$element=b(e,a),e.$element}function A(e,t){return typeof e!=typeof t||e.type!==t.type||(h(e)&&h(t)?e.value!==t.value:g(e)&&g(t)?e.tag!==t.tag||e.props.key!==t.props.key:!(!p(e)||!p(t)||e.componentInstance.Component===t.componentInstance.Component&&e.props.key===t.props.key))}function k(e){return M(e),e.isMounted=!0,e.$element}function _(e){e.isMounted&&(e.hooks.effects.byCursor.forEach((e=>{if(e.cleanup)try{e.cleanup()}catch(e){(0,s.S)(e)}finally{e.cleanup=void 0}})),e.isMounted=!1,function(e){e.hooks.effects.byCursor.forEach((e=>{e.cleanup=void 0,e.effect=void 0,e.dependencies=void 0})),e.hooks.state.byCursor.forEach((e=>{e.value=void 0,e.nextValue=void 0,e.setter=void 0})),e.hooks.memos.byCursor.forEach((e=>{e.value=void 0,e.dependencies=void 0})),e.hooks.refs.byCursor.forEach((e=>{e.current=void 0})),e.hooks=void 0,e.$element=void 0,e.renderedValue=void 0,e.Component=void 0,e.props=void 0,e.forceUpdate=void 0,e.onUpdate=void 0}(e))}function N(e){e.isMounted&&(e.hooks.state.byCursor.forEach((e=>{e.value=e.nextValue})),e.prepareForFrame=(0,o.wT)((()=>N(e))),e.forceUpdate=(0,o.mS)((()=>T(e))))}function T(e){if(!e.isMounted||!e.onUpdate)return;const t=e.$element;M(e),e.$element!==t&&e.onUpdate()}function x(e,t){const{cursor:n,byCursor:a}=l.hooks.state;var i;return void 0===a[n]&&(a[n]={value:e,nextValue:e,setter:(i=l,e=>{a[n].nextValue!==e&&(a[n].nextValue="function"==typeof e?e(a[n].value):e,i.prepareForFrame&&i.forceUpdate||(i.prepareForFrame=(0,o.wT)((()=>N(i))),i.forceUpdate=(0,o.mS)((()=>T(i)))),i.prepareForFrame(),i.forceUpdate(),r.ZT&&"TeactNContainer"!==i.name&&console.log("[Teact.useState]",i.name,i.Component&&i.Component.DEBUG_contentComponentName?`> ${i.Component.DEBUG_contentComponentName}`:"",t?`State update for ${t}, next value: `:`State update at cursor #${n}, next value: `,a[n].nextValue))})}),l.hooks.state.cursor++,[a[n].value,a[n].setter]}function L(e,t,n,o,a){var i;const{cursor:d,byCursor:u}=l.hooks.effects,c=l;function f(){if(!c.isMounted)return;const{cleanup:e}=u[d];if(e)try{let t;if(r.eM&&(t=performance.now()),e(),r.eM){const e=performance.now()-t,n=c.name;e>7&&console.warn(`[Teact] Slow cleanup at effect cursor #${d}: ${n}, ${Math.round(e)} ms`)}}catch(e){(0,s.S)(e)}finally{u[d].cleanup=void 0}}function h(){if(!c.isMounted)return;let e;f(),r.eM&&(e=performance.now());const t=n();if("function"==typeof t&&(u[d].cleanup=t),r.eM){const t=performance.now()-e,n=c.name;t>7&&console.warn(`[Teact] Slow effect at cursor #${d}: ${n}, ${Math.round(t)} ms`)}}if(void 0!==u[d]&&o&&u[d].dependencies){if(o.some(((e,t)=>e!==u[d].dependencies[t]))){if(a){const e=o.reduce(((e,t,n)=>{const r=u[d].dependencies[n];return t!==r&&e.push(`${n}: ${r} => ${t}`),e}),[]);console.log(`[Teact] Effect "${a}" caused by dependencies.`,e.join(", "))}t(f),e(h)}}else a&&console.log(`[Teact] Effect "${a}" caused by missing dependencies.`),t(f),e(h);u[d]={effect:n,dependencies:o,cleanup:null===(i=u[d])||void 0===i?void 0:i.cleanup},l.hooks.effects.cursor++}function O(e,t,n){return L(o.T2,o.D0,e,t,n)}function B(e,t,n){return L(o.R3,o.zD,e,t,n)}function R(e,t,n){const{cursor:o,byCursor:a}=l.hooks.memos;let{value:s}=a[o]||{};return(void 0===a[o]||t.some(((e,t)=>e!==a[o].dependencies[t])))&&(r.eM&&n&&console.log(`[Teact.useMemo] ${l.name} (${n}): Update is caused by:`,a[o]?(0,i.c)(t,a[o].dependencies).join(", "):"[first render]"),s=e()),a[o]={value:s,dependencies:t},l.hooks.memos.cursor++,s}function D(e,t,n){return R((()=>e),t,n)}function $(e){const{cursor:t,byCursor:n}=l.hooks.refs;return n[t]||(n[t]={current:e}),l.hooks.refs.cursor++,n[t]}function F(e,t){return function(n){return R((()=>v(e,n)),Object.values(n),t)}}document.addEventListener("dblclick",(()=>{console.warn("COMPONENTS",(0,a.Xo)(Object.values(P),"renderCount","desc"))}));const Z={createElement:v,Fragment:u}},65116:(e,t,n)=>{"use strict";n.d(t,{Iq:()=>k,Rd:()=>S,Sv:()=>E,c$:()=>_,gP:()=>N,ll:()=>A});var r=n(14050),o=n(83716),a=n(65326),i=n(26926),s=n(69118),d=n(275),u=n(60782),c=n(33592),l=n(18674);function f(){return f=Object.assign||function(e){for(var t=1;t{h=void 0})),m={},v=[function(){let e;o.eM&&(e=performance.now());for(const e of b.values()){const{mapStateToProps:t,ownProps:n,mappedProps:r,forceUpdate:a}=e;let i;try{i=t(g,n)}catch(e){return void(0,c.S)(e)}o.eM&&Object.values(i).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(i).length&&!(0,d.Z)(r,i)&&(o.ZT&&console.log("[TeactN] Will update",e.DEBUG_componentName,"caused by",(0,d.c)(r,i).join(", ")),e.mappedProps=i,e.areMappedPropsChanged=!0,e.DEBUG_updates++,a())}if(o.eM){const t=performance.now()-e;t>7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],y={},b=new Map,w=(0,s.$6)(I);function I(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e||!(0,l.zG)()?v.forEach((e=>e(g))):(0,s.T2)(w)}function C(e,t){if("object"==typeof e&&e!==g){if(o.eM){if(e.DEBUG_capturedId&&e.DEBUG_capturedId!==h)throw new Error("[TeactN.setGlobal] Attempt to set an outdated global");h=void 0}g=e,null!=t&&t.forceSyncOnIOs?I(!0):w(null==t?void 0:t.forceOnHeavyAnimation)}}function S(){return o.eM&&(h=Math.random(),g={...g,DEBUG_capturedId:h},p()),g}function E(){return y}let P=[];function M(e,t){m[e]||(m[e]=[],y[e]=(t,n)=>{!function(e,t,n){if(P.push((()=>{var r;null===(r=m[e])||void 0===r||r.forEach((e=>{const r=e(o.eM?S():g,y,t);r&&"function"!=typeof r.then&&C(r,n)}))})),1===P.length)try{for(;P.length;)P[0](),P.shift()}finally{P=[]}}(e,t,n)}),m[e].push(t)}function A(e){v.push(e)}function k(e){const t=v.indexOf(e);-1!==t&&v.splice(t,1)}function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>({});return t=>function n(o){n.DEBUG_contentComponentName=t.name;const[s]=(0,r.eJ)((0,i.Z)(b)),u=(0,a.Z)();(0,r.d4)((()=>()=>{b.delete(s)}),[s]);let l=b.get(s);if(l||(l={mapStateToProps:e,ownProps:o,areMappedPropsChanged:!1,forceUpdate:u,DEBUG_updates:0,DEBUG_componentName:t.name},b.set(s,l)),l.areMappedPropsChanged&&(l.areMappedPropsChanged=!1),!l.mappedProps||!(0,d.Z)(l.ownProps,o)){l.ownProps=o;try{l.mappedProps=e(g,o)}catch(e){(0,c.S)(e)}}return r.ZP.createElement(t,f({},l.mappedProps,o))}}function N(){return{getGlobal:S,setGlobal:C,getActions:E,addActionHandler:M,withGlobal:_}}o.eM&&(window.getGlobal=S,document.addEventListener("dblclick",(()=>{console.warn("GLOBAL CONTAINERS",(0,u.Xo)(Array.from(b.values()).map((e=>{let{DEBUG_componentName:t,DEBUG_updates:n}=e;return{DEBUG_componentName:t,DEBUG_updates:n}})),"DEBUG_updates","desc"))})))},33681:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,l:()=>a});const r=/\uFE0F/g,o=String.fromCharCode(8205);function a(e){return e.indexOf(o)<0?e.replace(r,""):e}const i=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g},91713:(e,t,n)=>{"use strict";let r,o,a,i,s,d,u,c,l,f,h,g,p,m;n.d(t,{Cr:()=>c,KB:()=>m,MT:()=>a,Nh:()=>l,Uq:()=>r,WB:()=>g,bZ:()=>u,du:()=>i,fo:()=>o,mp:()=>v,nJ:()=>s,qt:()=>d,rN:()=>f,u1:()=>y,vi:()=>p,wv:()=>h}),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"}(o||(o={})),function(e){e[e.Main=0]="Main",e[e.EditProfile=1]="EditProfile",e[e.Notifications=2]="Notifications",e[e.DataStorage=3]="DataStorage",e[e.Language=4]="Language",e[e.ActiveSessions=5]="ActiveSessions",e[e.General=6]="General",e[e.GeneralChatBackground=7]="GeneralChatBackground",e[e.GeneralChatBackgroundColor=8]="GeneralChatBackgroundColor",e[e.Privacy=9]="Privacy",e[e.PrivacyPhoneNumber=10]="PrivacyPhoneNumber",e[e.PrivacyLastSeen=11]="PrivacyLastSeen",e[e.PrivacyProfilePhoto=12]="PrivacyProfilePhoto",e[e.PrivacyPhoneCall=13]="PrivacyPhoneCall",e[e.PrivacyPhoneP2P=14]="PrivacyPhoneP2P",e[e.PrivacyForwarding=15]="PrivacyForwarding",e[e.PrivacyGroupChats=16]="PrivacyGroupChats",e[e.PrivacyPhoneNumberAllowedContacts=17]="PrivacyPhoneNumberAllowedContacts",e[e.PrivacyPhoneNumberDeniedContacts=18]="PrivacyPhoneNumberDeniedContacts",e[e.PrivacyLastSeenAllowedContacts=19]="PrivacyLastSeenAllowedContacts",e[e.PrivacyLastSeenDeniedContacts=20]="PrivacyLastSeenDeniedContacts",e[e.PrivacyProfilePhotoAllowedContacts=21]="PrivacyProfilePhotoAllowedContacts",e[e.PrivacyProfilePhotoDeniedContacts=22]="PrivacyProfilePhotoDeniedContacts",e[e.PrivacyPhoneCallAllowedContacts=23]="PrivacyPhoneCallAllowedContacts",e[e.PrivacyPhoneCallDeniedContacts=24]="PrivacyPhoneCallDeniedContacts",e[e.PrivacyPhoneP2PAllowedContacts=25]="PrivacyPhoneP2PAllowedContacts",e[e.PrivacyPhoneP2PDeniedContacts=26]="PrivacyPhoneP2PDeniedContacts",e[e.PrivacyForwardingAllowedContacts=27]="PrivacyForwardingAllowedContacts",e[e.PrivacyForwardingDeniedContacts=28]="PrivacyForwardingDeniedContacts",e[e.PrivacyGroupChatsAllowedContacts=29]="PrivacyGroupChatsAllowedContacts",e[e.PrivacyGroupChatsDeniedContacts=30]="PrivacyGroupChatsDeniedContacts",e[e.PrivacyBlockedUsers=31]="PrivacyBlockedUsers",e[e.Folders=32]="Folders",e[e.FoldersCreateFolder=33]="FoldersCreateFolder",e[e.FoldersEditFolder=34]="FoldersEditFolder",e[e.FoldersEditFolderFromChatList=35]="FoldersEditFolderFromChatList",e[e.FoldersIncludedChats=36]="FoldersIncludedChats",e[e.FoldersIncludedChatsFromChatList=37]="FoldersIncludedChatsFromChatList",e[e.FoldersExcludedChats=38]="FoldersExcludedChats",e[e.FoldersExcludedChatsFromChatList=39]="FoldersExcludedChatsFromChatList",e[e.TwoFaDisabled=40]="TwoFaDisabled",e[e.TwoFaNewPassword=41]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=42]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=43]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=44]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=45]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=46]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=47]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=48]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=49]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=50]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=51]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=52]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=53]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=54]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=55]="TwoFaCongratulations",e[e.QuickReaction=56]="QuickReaction",e[e.ActiveWebsites=57]="ActiveWebsites",e[e.PasscodeDisabled=58]="PasscodeDisabled",e[e.PasscodeNewPasscode=59]="PasscodeNewPasscode",e[e.PasscodeNewPasscodeConfirm=60]="PasscodeNewPasscodeConfirm",e[e.PasscodeEnabled=61]="PasscodeEnabled",e[e.PasscodeChangePasscodeCurrent=62]="PasscodeChangePasscodeCurrent",e[e.PasscodeChangePasscodeNew=63]="PasscodeChangePasscodeNew",e[e.PasscodeChangePasscodeConfirm=64]="PasscodeChangePasscodeConfirm",e[e.PasscodeTurnOff=65]="PasscodeTurnOff",e[e.PasscodeCongratulations=66]="PasscodeCongratulations",e[e.Experimental=67]="Experimental"}(a||(a={})),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"}(i||(i={})),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"}(s||(s={})),function(e){e[e.ChatInfo=0]="ChatInfo",e[e.Search=1]="Search",e[e.Management=2]="Management",e[e.Statistics=3]="Statistics",e[e.MessageStatistics=4]="MessageStatistics",e[e.StickerSearch=5]="StickerSearch",e[e.GifSearch=6]="GifSearch",e[e.PollResults=7]="PollResults",e[e.AddingMembers=8]="AddingMembers"}(d||(d={})),function(e){e[e.Inline=0]="Inline",e[e.ScheduledInline=1]="ScheduledInline",e[e.SharedMedia=2]="SharedMedia",e[e.ProfileAvatar=3]="ProfileAvatar",e[e.SettingsAvatar=4]="SettingsAvatar",e[e.MiddleHeaderAvatar=5]="MiddleHeaderAvatar",e[e.Album=6]="Album",e[e.ScheduledAlbum=7]="ScheduledAlbum",e[e.SearchResult=8]="SearchResult"}(u||(u={})),function(e){e[e.Inline=0]="Inline",e[e.SharedMedia=1]="SharedMedia",e[e.Search=2]="Search"}(c||(c={})),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.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"}(h||(h={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Loading=2]="Loading"}(g||(g={})),function(e){e[e.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList"}(p||(p={})),function(e){e[e.ShippingInfo=0]="ShippingInfo",e[e.Shipping=1]="Shipping",e[e.PaymentInfo=2]="PaymentInfo",e[e.Checkout=3]="Checkout",e[e.ConfirmPayment=4]="ConfirmPayment"}(m||(m={}));const v="UPLOADING_WALLPAPER_SLUG";let y;!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.ChannelRemovedUsers=7]="ChannelRemovedUsers",e[e.GroupUserPermissionsCreate=8]="GroupUserPermissionsCreate",e[e.GroupUserPermissions=9]="GroupUserPermissions",e[e.ChatAdministrators=10]="ChatAdministrators",e[e.GroupRecentActions=11]="GroupRecentActions",e[e.ChatAdminRights=12]="ChatAdminRights",e[e.ChatNewAdminRights=13]="ChatNewAdminRights",e[e.GroupMembers=14]="GroupMembers",e[e.GroupAddAdmins=15]="GroupAddAdmins",e[e.Invites=16]="Invites",e[e.EditInvite=17]="EditInvite",e[e.Reactions=18]="Reactions",e[e.InviteInfo=19]="InviteInfo",e[e.JoinRequests=20]="JoinRequests"}(y||(y={}))},9933:(e,t,n)=>{"use strict";n.d(t,{M8:()=>s,cK:()=>a,jt:()=>i,vr:()=>d});var r=n(69118);let o;function a(e,t){t||(o&&!o.isCancelled&&(o.isCancelled=!0),o=t={isCancelled:!1}),!t.isCancelled&&e()&&(0,r.T2)((()=>{a(e,t)}))}function i(e){e()&&(0,r.T2)((()=>{i(e)}))}const s={linear:e=>e,easeIn:e=>e**1.675,easeOut:e=>-1*e**1.675,easeInOut:e=>.5*(Math.sin((e-.5)*Math.PI)+1),easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e**3,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e*e**3,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e*e**3,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e*e**4,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e*e**4};function d(e){let{timing:t=s.linear,onUpdate:n,duration:r,onEnd:o,from:a,to:d}=e;const u=Date.now();let c=!1;return i((()=>{if(c)return!1;let e=(Date.now()-u)/r;e>1&&(e=1);const i=t(e);if("number"==typeof a&&"number"==typeof d)n(a+(d-a)*i);else if(Array.isArray(a)&&Array.isArray(d)){const e=a.map(((e,t)=>e+(d[t]-e)*i));n(e)}return 1===e&&o&&o(),e<1})),()=>{c=!0,o&&o()}}},17358:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var r=n(83716);function o(e){"function"==typeof window.navigator.setAppBadge&&window.navigator.setAppBadge(e).catch((e=>{r.eM&&console.error(e)}))}},275:(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 o=0;o(e[r]!==t[r]&&n.push(`${r}: ${e[r]} => ${t[r]}`),n)),[])}n.d(t,{Z:()=>r,c:()=>o})},46752:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),a=1;a(t&&(Array.isArray(t)?e.push(...t):e.push(`${n}--${t}`)),e)),[n]).join(" ")}}n.d(t,{Z:()=>r,y:()=>o})},80036:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nr})},49524:(e,t,n)=>{"use strict";n.d(t,{Type:()=>o,clear:()=>s,fetch:()=>a,save:()=>i});const r=self.caches;let o;async function a(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(r)try{const i=new Request(t.replace(/:/g,"_")),s=await r.open(e),d=await s.match(i);if(!d)return;const u=d.headers.get("Content-Type");switch(n){case o.Text:return await d.text();case o.Blob:{if(t.startsWith("avatar")&&u&&u.startsWith("text"))return;const e=await d.blob(),n=!e.type||!a&&e.type.includes("html");let r=e.type||u;return n&&r?(a||(r=r.replace(/html/gi,"")),new Blob([e],{type:r})):e}case o.Json:return await d.json();case o.ArrayBuffer:return await d.arrayBuffer();default:return}}catch(e){return void console.warn(e)}}async function i(e,t,n){if(r)try{const o="string"==typeof n||n instanceof Blob||n instanceof ArrayBuffer?n:JSON.stringify(n),a=new Request(t.replace(/:/g,"_")),i=new Response(o),s=await r.open(e);return await s.put(a,i)}catch(e){return void console.warn(e)}}async function s(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",e[e.ArrayBuffer=3]="ArrayBuffer"}(o||(o={}))},16063:(e,t,n)=>{"use strict";function r(){const e=[];function t(t){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}return{runCallbacks:function(){for(var t=arguments.length,n=new Array(t),r=0;r{e(...n)}))},addCallback:function(n){return e.push(n),()=>{t(n)}},removeCallback:t,hasCallbacks:function(){return Boolean(e.length)}}}n.d(t,{_:()=>r})},23989:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(517);function o(e){return(0,r.Z)({onEsc:e})}},517:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={Enter:"onEnter",Backspace:"onBackspace",Delete:"onDelete",Esc:"onEsc",Escape:"onEsc",ArrowUp:"onUp",ArrowDown:"onDown",ArrowLeft:"onLeft",ArrowRight:"onRight",Tab:"onTab"},o={onEnter:[],onDelete:[],onBackspace:[],onEsc:[],onUp:[],onDown:[],onLeft:[],onRight:[],onTab:[]};function a(e){return i()||document.addEventListener("keydown",s,!0),Object.keys(e).forEach((t=>{const n=e[t];if(!n)return;const r=o[t];r&&r.push(n)})),()=>{!function(e){Object.keys(e).forEach((t=>{const n=e[t],r=o[t];if(r){const e=r.findIndex((e=>e===n));-1!==e&&r.splice(e,1)}})),i()||document.removeEventListener("keydown",s,!1)}(e)}}function i(){return Object.values(o).some((e=>Boolean(e.length)))}function s(e){const t=r[e.key];if(!t)return;const{length:n}=o[t];n&&(e.stopPropagation(),(0,o[t][n-1])(e))}},64319:(e,t,n)=>{"use strict";n.d(t,{TE:()=>i,VP:()=>s,yl:()=>o});var r=n(83716);const o=window.navigator.clipboard&&window.ClipboardItem,a=document.createElement("textarea");a.setAttribute("readonly",""),a.tabIndex=-1,a.className="visually-hidden";const i=e=>{a.value=e,document.body.appendChild(a);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);a.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(a)},s=e=>{if(!e)return;const t=document.createElement("canvas"),n=t.getContext("2d"),r=new Image;r.onload=e=>{if(n&&e.currentTarget){const r=e.currentTarget;t.width=r.width,t.height=r.height,n.drawImage(r,0,0,r.width,r.height),t.toBlob(d,"image/png",1)}},r.src=e};async function d(e){if(e&&o)try{var t,n;await(null===(t=(n=window.navigator.clipboard).write)||void 0===t?void 0:t.call(n,[new ClipboardItem({[e.type]:e})]))}catch(e){r.eM&&console.error(e)}}},1279:(e,t,n)=>{"use strict";function r(e,t,n){a("transitionend",e,t,n)}function o(e,t,n){a("animationend",e,t,n)}function a(e,t,n,r){let o=!1;t.addEventListener(e,(function a(i){o||i.target!==i.currentTarget||r&&(i instanceof TransitionEvent&&i.propertyName===r||i instanceof AnimationEvent&&i.animationName===r)||(o=!0,t.removeEventListener(e,a),setTimeout((()=>{n()}),50))}))}n.d(t,{L:()=>r,f:()=>o})},790:(e,t,n)=>{"use strict";n.d(t,{$Y:()=>d,D:()=>m,IS:()=>_,J_:()=>b,SA:()=>M,Tu:()=>g,VX:()=>h,ZK:()=>I,_F:()=>u,dJ:()=>y,j1:()=>w,k9:()=>C,kj:()=>c,mB:()=>v,mr:()=>f,np:()=>p,rM:()=>S,xH:()=>P,xR:()=>i,xk:()=>k,zk:()=>s});var r=n(15155);const o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=["January","February","March","April","May","June","July","August","September","October","November","December"].map((e=>e.toLowerCase())),i=864e5;function s(e){return u(new Date)===u(e)}function d(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function u(e){return d(e).getTime()}function c(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function l(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function f(e,t){const n="number"==typeof t?new Date(t):t,r=e.timeFormat||"24h";let o=n.getHours(),a="";return"12h"===r&&(a=o>=12?" PM":" AM",o=o>12?o%12:o),`${String(o).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}${a}`}function h(e,t){const n="number"==typeof t?new Date(t):t,r=d(new Date);if(n>=r)return f(e,n);const a=new Date(r);if(a.setDate(r.getDate()-7),n>=a)return e(`Weekday.Short${o[n.getDay()]}`);const i=n.getFullYear()===r.getFullYear();return P(n,e.code,i)}function g(e,t){return P(t,e.code,!1,"numeric")}function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return P(t,e.code,!1,n?"short":"long",!0)}function m(e,t){const n=Math.floor(t/i);return t<0?0:n<1?C(t/1e3):n<7?e("Days",n):n<30?e("Weeks",Math.floor(n/7)):n<365?e("Months",Math.floor(n/30)):e("Years",Math.floor(n/365))}function v(e,t){return t<6e4?Math.ceil(t/1e3):t<36e5?Math.ceil(t/6e4):t2&&void 0!==arguments[2]?arguments[2]:t;const r=t-n;return r<60?e("LiveLocationUpdated.JustNow"):r<3600?e("LiveLocationUpdated.MinutesAgo",Math.floor(r/60)):e("LiveLocationUpdated.TodayAt",f(e,n))}function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!t)return;const r=[],o=[{multiplier:1,type:"Seconds"},{multiplier:60,type:"Minutes"},{multiplier:60,type:"Hours"},{multiplier:24,type:"Days"},{multiplier:7,type:"Weeks"}];let a=1;o.forEach(((e,n)=>{if(a*=e.multiplier,t=0;--e)0===i[e].duration&&i.splice(e,1);return i.map((t=>e(t.type,t.duration,"i"))).join(", ")}function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4?arguments[4]:void 0;const i="number"==typeof t?new Date(t):t,s=d(new Date);if(!r){if(l(i)===l(s))return(a||!n?T:N)(e("Weekday.Today"));const t=new Date(s);if(t.setDate(s.getDate()-1),l(i)===l(t))return(a||!n?T:N)(e("Weekday.Yesterday"));const r=new Date(s),d=new Date(s);if(r.setDate(s.getDate()-7),d.setDate(s.getDate()+7),i>=r&&i<=d){const t=o[i.getDay()];return(a||!n?T:N)(e(n?`Weekday.Short${t}`:`Weekday.${t}`))}}const u=i.getFullYear()===s.getFullYear(),c=P(i,e.code,u,n?"short":"long");return(a||!n?T:N)(c)}function I(e,t,n){const r="number"==typeof t?new Date(t):t;return`${w(e,r,!0,void 0,n)}, ${f(e,r)}`}function C(e,t){const n=Math.floor(e/3600),r=Math.floor(e%3600/60),o=Math.floor(e%3600%60),a=t?Math.floor(t/3600):0,i=t?Math.floor(t%3600/60):0;let s="";return n>0||a>0?(s+=`${String(n).padStart(2,"0")}:`,s+=`${String(r).padStart(2,"0")}:`):s+=i>=10?`${String(r).padStart(2,"0")}:`:`${String(r)}:`,s+=String(o).padStart(2,"0"),s}function S(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 o=(e=Math.floor(e/60))%60;e-=o;const a=(e=Math.floor(e/60))%60;return a>0&&t.push(String(a).padStart(2,"0")),t.push(String(o).padStart(a>0?2:1,"0")),t.push(String(r).padStart(2,"0")),`${t.join(":")},${String(n).padStart(2,"0")}`}const E=(0,r.Z)((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"short",o=arguments.length>4?arguments[4]:void 0;return new Date(e).toLocaleString(t,{year:n?void 0:"numeric",month:r,day:o?void 0:"numeric"})}));function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"short",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const a="number"==typeof e?new Date(e):e,i=u(a);return E(i,t,n,r,o)}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";const n="number"==typeof e?new Date(e):e;return n.toLocaleString(t,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2021;if(t>11||e>31)return!1;const r=new Date(n,t,e);return!Number.isNaN(r.getTime())&&r.getDate()===e}function k(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";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||!A(t,n-1,r||void 0)?void 0:`${r?`${r}-`:""}${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}const o=e.split(" "),i=t?o[0]:o[1],s=(t?o[1]:o[0]).toLowerCase(),d=a.findIndex((e=>e.startsWith(s)));return-1!==d&&A(Number(i),d)?`${String(d+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`:void 0}function _(e){return e+i/1e3}function N(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function T(e){return`${e[0].toUpperCase()}${e.slice(1)}`}},34284:(e,t,n)=>{"use strict";n.d(t,{DW:()=>l,NM:()=>f,Uz:()=>d,Wg:()=>h,g6:()=>c,mE:()=>u});var r=n(33681),o=n(15155);const a=["female_sign","male_sign","medical_symbol"],i=[[/\u{1f3f3}\u200d\u{1f308}/gu,"🏳️‍🌈"],[/\u{1f3f3}\u200d\u26a7\ufe0f/gu,"🏳️‍⚧️"],[/\u{1f937}\u200d\u2642[^\ufe0f]/gu,"🤷‍♂️"]];function s(e){const t=e.split("-").map((e=>parseInt(e,16)));return String.fromCodePoint(...t)}const d=new Set;function u(e){e.currentTarget.classList.add("open"),d.add(e.currentTarget.dataset.path)}function c(e){if(!e.match(r.Z))return e;for(const[t,n]of i)e=e.replace(t,n);return e}const l=(0,o.Z)((function(e){return function(e){let t;if(1===e.length)t=e.charCodeAt(0).toString(16).padStart(4,"0");else{const n=[];for(let t=0;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}((0,r.l)(e))}));function f(e){const t={categories:[],emojis:{}};for(let n=0;ne.codePointAt(0)+127397));return String.fromCodePoint(...n)}},81396:(e,t,n)=>{"use strict";function r(e){if(e)return e.includes("://")?e:`http://${e}`}n.d(t,{X:()=>r})},77361:(e,t,n)=>{"use strict";n.d(t,{Bi:()=>N,cL:()=>B,wZ:()=>v,gk:()=>$,vX:()=>k,FW:()=>F,op:()=>E,EA:()=>U,cj:()=>m,jm:()=>p,pA:()=>L,rT:()=>D,m5:()=>A,Xp:()=>h,I_:()=>M,fl:()=>b,t0:()=>_,s$:()=>y,i4:()=>Z,Mc:()=>P,wB:()=>I,p7:()=>C,$b:()=>w,mh:()=>S,Hh:()=>O,s0:()=>T,aZ:()=>R,l0:()=>W,gZ:()=>j,Lt:()=>g,vn:()=>u,on:()=>a});var r=n(83716);let o;function a(){return Boolean(o)}var i,s;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=>{o=e}));let d=null!==(i=(s=window).matchMedia)&&void 0!==i&&i.call(s,"(prefers-color-scheme: dark)").matches?"dark":"light";function u(){return d}function c(e){d=e.matches?"dark":"light"}const l=window.matchMedia("(prefers-color-scheme: dark)");var f;"function"==typeof l.addEventListener?l.addEventListener("change",c):"function"==typeof l.addListener&&l.addListener(c);const h=window.location.host===r.xH,g=function(){const{userAgent:e,platform:t}=window.navigator;let n;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="macOS":-1!==["iPhone","iPad","iPod"].indexOf(t)?n="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="Windows":/Android/.test(e)?n="Android":/Linux/.test(t)&&(n="Linux"),n}(),p="macOS"===g,m="iOS"===g,v="Android"===g,y=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),b=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone||document.referrer.includes("android-app://"),w=window.matchMedia("(pointer: coarse)").matches,I=window.innerWidth<=r.l3||window.innerWidth<=r.u_&&window.innerHeight<=r.rO,C=!I&&window.innerWidth<=r.ks,S=Boolean(window.navigator.mediaDevices&&"getUserMedia"in window.navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext)),E=(document.documentElement.style,g&&(p||m)&&function(){const e=document.createElement("span");e.classList.add("emoji-test-element"),document.body.appendChild(e),e.innerText="🫱🏻";const t=e.offsetWidth;e.innerText="❤️";const n=e.offsetWidth;return document.body.removeChild(e),Math.abs(t-n)<5}()),P="serviceWorker"in navigator,M=P,A=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),k=!r.Cg&&"filter"in(document.createElement("canvas").getContext("2d")||{}),_="requestFullscreen"in document.createElement("div"),N=!navigator.userAgent.includes("Firefox"),T=v?"slide-fade":m?"slide-layers":"push-slide",x=document.createElement("video"),L=Boolean(x.canPlayType(r.Ng).replace("no","")||m||p);L&&(r.wG.add(r.Ng),r.dI.add(r.Ng));const O=Boolean(x.canPlayType('video/webm; codecs="vp9"').replace("no",""))&&!(p&&y),B=window.devicePixelRatio||1,R=!0,D=Boolean(null===(f=navigator.storage)||void 0===f?void 0:f.getDirectory);D&&(async()=>{try{const e=await navigator.storage.getDirectory();await e.removeEntry("downloads",{recursive:!0})}catch{}})();const $=!r.Cg&&(CSS.supports("backdrop-filter: blur()")||CSS.supports("-webkit-backdrop-filter: blur()")),F=!w,Z=!p&&!m&&!v,U="onbeforeinstallprompt"in window,j=Z?300:750,W=1048576*(v||m?512:2e3)},71394:(e,t,n)=>{"use strict";n.d(t,{A9:()=>a,YJ:()=>i,ao:()=>f,gm:()=>l,hl:()=>s,jj:()=>u,pt:()=>d,ud:()=>c});var r=n(69118);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let o=r.length;const a=new Uint8Array(o);for(;o--;)a[o]=r.charCodeAt(o);return new Blob([a],{type:n})}function i(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 s(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}function d(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e}))}function u(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 c(e){const t=await u(e);return Promise.race([(0,r.wO)(2e3),new Promise(((e,n)=>{t.onseeked=()=>{t.videoWidth&&t.videoHeight||e(void 0);const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight,n.getContext("2d").drawImage(t,0,0),e(n.toDataURL("image/jpeg"))},t.onerror=n,t.currentTime=Math.min(t.duration,1)}))])}async function l(e){return(await fetch(e)).blob()}function f(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}"undefined"==typeof File&&(self.File=class extends Blob{constructor(e,t,n){if(n){const{type:t,...r}=n;super(e,{type:t}),o(this,"name",void 0),Object.assign(this,r)}else super(e),o(this,"name",void 0);this.name=t}})},16974:(e,t,n)=>{"use strict";n.d(t,{M2:()=>M,O6:()=>k,S1:()=>b,Yz:()=>C,aE:()=>I,gO:()=>w,jK:()=>P,r_:()=>A,wC:()=>S,xW:()=>E});var r=n(65116),o=n(33555),a=n(83716),i=n(11192),s=n(83158),d=n(69118),u=n(60782),c=n(275),l=n(16063);const f=L();let h=f.prevGlobal,g=f.prepared,p=f.results,m=f.callbacks;const v=(0,d.P2)((()=>{(0,d.Q8)((()=>{_((0,o.Rd)())}))}),500);let y=!1;function b(){y=!0,(0,r.ll)(v),(0,o.iw)("reset",O),_((0,o.Rd)())}function w(e){return y||b(),p.orderedIdsByFolderId[e]}function I(e){return y||b(),p.pinnedCountByFolderId[e]||0}function C(){return y||b(),p.chatsCountByFolderId}function S(){return y||b(),p.unreadCountersByFolderId}function E(){var e;return(null===(e=S()[a.Nf])||void 0===e?void 0:e.notificationsCount)||0}function P(e){return g.chatSummariesById.get(e).order}function M(e,t){return m.orderedIdsByFolderId[e]||(m.orderedIdsByFolderId[e]=(0,l._)()),m.orderedIdsByFolderId[e].addCallback(t)}function A(e){return m.chatsCountByFolderId.addCallback(e)}function k(e){return m.unreadCountersByFolderId.addCallback(e)}function _(e){let t;a.eM&&(t=performance.now());const n=Boolean(e.chats.listIds.active&&N(a.Nf,e.chats.listIds.active,e.chats.orderedPinnedIds.active)),r=Boolean(e.chats.listIds.archived&&N(a.WS,e.chats.listIds.archived,e.chats.orderedPinnedIds.archived)),o=e.chats.isFullyLoaded.active!==h.isAllFolderFullyLoaded,d=e.chats.isFullyLoaded.archived!==h.isArchivedFolderFullyLoaded,l=e.chatFolders.byId!==h.foldersById,f=e.chats.byId!==h.chatsById,m=e.users.byId!==h.usersById,v=(0,i.dZ)(e)!==h.notifySettings,y=(0,i.NJ)(e)!==h.notifyExceptions;let b=[];if((o||d)&&(b=b.concat(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];t&&n.push(a.WS);const r=e.chats.isFullyLoaded.active,o=e.chats.isFullyLoaded.archived;if(r&&o){const e=Object.keys(g.folderSummariesById).filter((e=>!p.orderedIdsByFolderId[e])).map(Number);n=n.concat(e)}return h.isAllFolderFullyLoaded=r,h.isArchivedFolderFullyLoaded=o,n}(e,d))),!(n||r||l||f||m||v||y))return void(b.length&&x(b));const w=h.allFolderListIds,I=h.archivedFolderListIds;if(function(e,t,n,r){const o=[];if(t){const t=e.chats.listIds.active,n=e.chats.orderedPinnedIds.active;g.folderSummariesById[a.Nf]=T(a.Nf,t,n),h.allFolderListIds=t,h.allFolderPinnedIds=n,o.push(a.Nf)}if(n){const t=e.chats.listIds.archived,n=e.chats.orderedPinnedIds.archived;g.folderSummariesById[a.WS]=T(a.WS,t,n),h.archivedFolderListIds=t,h.archivedFolderPinnedIds=n,o.push(a.WS)}if(r){const t=e.chatFolders.byId;Object.values(t).forEach((e=>{e!==h.foldersById[e.id]&&(g.folderSummariesById[e.id]=function(e){return{...e,orderedPinnedIds:e.pinnedChatIds,excludedChatIds:e.excludedChatIds?new Set(e.excludedChatIds):void 0,includedChatIds:e.excludedChatIds?new Set(e.includedChatIds):void 0,pinnedChatIds:e.excludedChatIds?new Set(e.pinnedChatIds):void 0}}(e),o.push(e.id))})),h.foldersById=t}}(e,n,r,l),b=b.concat(function(e,t,n,r,o,d){const l=e.chats.byId,f=e.users.byId,m=(0,i.dZ)(e),v=(0,i.NJ)(e),y=Object.values(g.folderSummariesById),b=new Set,w=e.chats.listIds.active,I=e.chats.listIds.archived;let C=[...w||[],...I||[]];return w===o&&I===d||(C=(0,u.Tw)(C.concat(o||[],d||[]))),C.forEach((e=>{const o=l[e];if(!t&&!n&&!r&&o===h.chatsById[e]&&f[e]===h.usersById[e])return;let i;if(o){const n=g.chatSummariesById.get(e),r=function(e,t,n,r){const{id:o,type:i,lastMessage:d,isRestricted:u,isNotJoined:c,migratedTo:l,folderId:f,unreadCount:h,unreadMentionsCount:g,hasUnreadMark:p,joinDate:m,draftDate:v}=e,y="chatTypePrivate"===i&&r;return{id:o,type:i,isListed:Boolean(d&&!u&&!c&&!l),isArchived:f===a.WS,isMuted:(0,s.i4)(e,t,n),isUnread:Boolean(h||g||p),unreadCount:h,unreadMentionsCount:g,order:Math.max(m||0,v||0,(null==d?void 0:d.date)||0),isUserBot:y?"userTypeBot"===y.type:void 0,isUserContact:y?y.isContact:void 0}}(o,m,v,f[e]);if(!t&&n&&(0,c.Z)(r,n))return;g.chatSummariesById.set(e,r),i=function(e,t){return t.reduce(((t,n)=>(function(e,t){var n,r,o;if(!e.isListed)return!1;const{id:i,type:s}=e;if(t.listIds)return!(e.isArchived&&t.id===a.Nf||!e.isArchived&&t.id===a.WS)&&t.listIds.has(i);if(null!==(n=t.excludedChatIds)&&void 0!==n&&n.has(i))return!1;if(null!==(r=t.includedChatIds)&&void 0!==r&&r.has(i))return!0;if(null!==(o=t.pinnedChatIds)&&void 0!==o&&o.has(i))return!0;if(t.excludeArchived&&e.isArchived)return!1;if(t.excludeRead&&!e.isUnread)return!1;if(t.excludeMuted&&e.isMuted&&!e.unreadMentionsCount)return!1;if("chatTypePrivate"===s)if(e.isUserBot){if(t.bots)return!0}else{if(t.contacts&&e.isUserContact)return!0;if(t.nonContacts&&!e.isUserContact)return!0}else{if("chatTypeChannel"===s)return Boolean(t.channels);if("chatTypeBasicGroup"===s||"chatTypeSuperGroup"===s)return Boolean(t.groups)}return!1}(e,n)&&t.push(n.id),t)),[]).sort()}(r,y),i.forEach((e=>{b.add(e)}))}else g.chatSummariesById.delete(e),i=[];const d=g.folderIdsByChatId[e]||[];if((0,u.et)(i,d))return;const w=function(e,t,n){const r=new Set(t),o=new Set(n),a=[];return(0,u.Tw)([...t,...n]).forEach((t=>{let n=p.orderedIdsByFolderId[t];r.has(t)&&!o.has(t)?(g.chatIdsByFolderId[t].delete(e),a.push(t),n&&(n=n.filter((t=>t!==e)),g.isOrderedListJustPatched[t]=!0)):!r.has(t)&&o.has(t)&&(g.chatIdsByFolderId[t]||(g.chatIdsByFolderId[t]=new Set),g.chatIdsByFolderId[t].add(e),n&&(n.push(e),g.isOrderedListJustPatched[t]=!0)),p.orderedIdsByFolderId[t]=n})),g.folderIdsByChatId[e]=n,a}(e,d,i);w.forEach((e=>{b.add(e)}))})),h.chatsById=l,h.usersById=f,h.notifySettings=m,h.notifyExceptions=v,Array.from(b)}(e,l||n||r,v,y,w,I)),x((0,u.Tw)(b)),a.eM){const e=performance.now()-t;e>6&&console.warn(`Slow \`updateFolderManager\`: ${Math.round(e)} ms`)}}function N(e,t,n){const r=e===a.Nf?h.allFolderListIds:h.archivedFolderListIds,o=e===a.Nf?h.allFolderPinnedIds:h.archivedFolderPinnedIds;return r!==t||o!==n}function T(e,t,n){return{id:e,listIds:new Set(t),orderedPinnedIds:n,pinnedChatIds:new Set(n)}}function x(e){let t=!1,n=!1;if(Array.from(e).forEach((e=>{const{pinnedCount:r,orderedIds:o}=function(e){const t=g.folderSummariesById[e];if(!t)return{};const{orderedPinnedIds:n,pinnedChatIds:r}=t,{chatSummariesById:o,chatIdsByFolderId:{[e]:a}}=g,{orderedIdsByFolderId:{[e]:i}}=p,s=a?null==n?void 0:n.filter((e=>a.has(e))):n,d=i||a&&Array.from(a)||[],u=(r?d.filter((e=>!r.has(e))):d).sort(((e,t)=>o.get(t).order-o.get(e).order));return{pinnedCount:(null==s?void 0:s.length)||0,orderedIds:[...s||[],...u]}}(e);if(!o)return;const a=p.orderedIdsByFolderId[e],i=p.pinnedCountByFolderId[e];var s;a&&void 0!==i&&i===r&&!g.isOrderedListJustPatched[e]&&(0,u.et)(o,a)||(g.isOrderedListJustPatched[e]=!1,p.orderedIdsByFolderId[e]=o,p.pinnedCountByFolderId[e]=r,null===(s=m.orderedIdsByFolderId[e])||void 0===s||s.runCallbacks(o));const d=p.chatsCountByFolderId[e],l=o.length;n||(n=d!==l),p.chatsCountByFolderId[e]=l;const f=p.unreadCountersByFolderId[e],h=function(e){const{chatSummariesById:t}=g,{orderedIdsByFolderId:{[e]:n}}=p;return n.reduce(((e,n)=>{const r=t.get(n);return r?(r.isUnread&&(e.chatsCount++,r.unreadMentionsCount&&(e.notificationsCount+=r.unreadMentionsCount),r.isMuted||(r.unreadCount?e.notificationsCount+=r.unreadCount:r.unreadMentionsCount||(e.notificationsCount+=1))),e):e}),{chatsCount:0,notificationsCount:0})}(e);t||(t=!f||!(0,c.Z)(h,f)),p.unreadCountersByFolderId[e]=h})),n){const e={...p.chatsCountByFolderId};p.chatsCountByFolderId=e,m.chatsCountByFolderId.runCallbacks(e)}if(t){const e={...p.unreadCountersByFolderId};p.unreadCountersByFolderId=e,m.unreadCountersByFolderId.runCallbacks(e)}}function L(){return{prevGlobal:{foldersById:{},chatsById:{},usersById:{},notifySettings:{},notifyExceptions:{}},prepared:{folderSummariesById:{},chatSummariesById:new Map,folderIdsByChatId:{},chatIdsByFolderId:{},isOrderedListJustPatched:{}},results:{orderedIdsByFolderId:{},pinnedCountByFolderId:{},chatsCountByFolderId:{},unreadCountersByFolderId:{}},callbacks:{orderedIdsByFolderId:{},chatsCountByFolderId:(0,l._)(),unreadCountersByFolderId:(0,l._)()}}}function O(){const e=L();h=e.prevGlobal,g=e.prepared,p=e.results,m=e.callbacks}},82972:(e,t,n)=>{"use strict";function r(e){e.offsetWidth}n.d(t,{Z:()=>r})},9937:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return new Intl.NumberFormat(n,{style:"currency",currency:t}).format(e/10**o(t))}function o(e){return"CLF"===e?4:["BHD","IQD","JOD","KWD","LYD","OMR","TND"].includes(e)?3:["BIF","BYR","CLP","CVE","DJF","GNF","ISK","JPY","KMF","KRW","MGA","PYG","RWF","UGX","UYI","VND","VUV","XAF","XOF","XPF"].includes(e)?0:"MRO"===e?1:2}n.d(t,{x:()=>r})},26926:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=e=>{let t;do{t=String(Math.random()).replace("0.","id")}while(e.hasOwnProperty(t));return t}},91947:(e,t,n)=>{"use strict";n.d(t,{J_:()=>d,ZP:()=>s,pF:()=>u});var r=n(83716);const o={CHAT_RESTRICTED:"You can't send messages in this chat, you were restricted",CHAT_SEND_POLL_FORBIDDEN:"You can't create polls in this chat",CHAT_SEND_STICKERS_FORBIDDEN:"You can't send stickers in this chat",CHAT_SEND_GIFS_FORBIDDEN:"You can't send gifs in this chat",CHAT_SEND_MEDIA_FORBIDDEN:"You can't send media in this chat",CHAT_LINK_EXISTS:"The chat is public, you can't hide the history to new users",SLOWMODE_WAIT_X:"Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.",USER_BANNED_IN_CHANNEL:"You're banned from sending messages in supergroups / channels",USER_IS_BLOCKED:"You were blocked by this user",YOU_BLOCKED_USER:"You blocked this user",IMAGE_PROCESS_FAILED:"Failure while processing image",MEDIA_EMPTY:"The provided media object is invalid",MEDIA_INVALID:"Media invalid",PHOTO_EXT_INVALID:"The extension of the photo is invalid",PHOTO_INVALID_DIMENSIONS:"The photo dimensions are invalid",PHOTO_SAVE_FILE_INVALID:"Internal issues, try again later",MESSAGE_DELETE_FORBIDDEN:"You can't delete one of the messages you tried to delete, most likely because it is a service message.",MESSAGE_POLL_CLOSED:"Poll closed",MESSAGE_EDIT_TIME_EXPIRED:"You can't edit this message anymore.",PINNED_DIALOGS_TOO_MUCH:"Sorry, you can only pin 5 chats to the top",CHANNEL_PRIVATE:"This channel is private",MEDIA_CAPTION_TOO_LONG:"The provided caption is too long",ADDRESS_STREET_LINE1_INVALID:"The address you provided is not valid",ADDRESS_STREET_LINE2_INVALID:"The address you provided is not valid",ADDRESS_CITY_INVALID:"The city you provided is not valid",ADDRESS_COUNTRY_INVALID:"The country you provided is not valid",ADDRESS_POSTCODE_INVALID:"The postcode you provided is not valid",ADDRESS_STATE_INVALID:"The state you provided is not valid",REQ_INFO_NAME_INVALID:"The name you provided is not valid",REQ_INFO_PHONE_INVALID:"The phone you provided is not valid",REQ_INFO_EMAIL_INVALID:"The email you provided is not valid",LINK_NOT_MODIFIED:"This discussion is already linked to the channel",MESSAGE_TOO_LONG:"Message is too long",SERVICE_WORKER_DISABLED:"Service Worker is disabled. Streaming media may not be supported. Try reloading the page without holding key",MESSAGE_TOO_LONG_PLEASE_REMOVE_CHARACTERS:"The provided message is too long. Please remove {EXTRA_CHARS_COUNT} character{PLURAL_S}.",FRESH_RESET_AUTHORISATION_FORBIDDEN:"You can’t logout other sessions if less than 24 hours have passed since you logged on the current session",BOTS_TOO_MUCH:"There are too many bots in this chat/channel",BOT_GROUPS_BLOCKED:"This bot can't be added to groups",USERS_TOO_MUCH:"The maximum number of users has been exceeded",USER_CHANNELS_TOO_MUCH:"One of the users you tried to add is already in too many channels/supergroups",USER_KICKED:"This user was kicked from this supergroup/channel",USER_NOT_MUTUAL_CONTACT:"The provided user is not a mutual contact",USER_PRIVACY_RESTRICTED:"The user's privacy settings do not allow you to do this",INVITE_HASH_EMPTY:"The invite hash is empty",INVITE_HASH_EXPIRED:"The invite link has expired",INVITE_HASH_INVALID:"The invite hash is invalid",CHANNELS_TOO_MUCH:"You have joined too many channels/supergroups",USER_ALREADY_PARTICIPANT:"You already in the group",SCHEDULE_DATE_INVALID:"Invalid schedule date provided",WALLPAPER_DIMENSIONS_INVALID:"The wallpaper dimensions are invalid, please select another file",ADMINS_TOO_MUCH:"There are too many admins",ADMIN_RANK_EMOJI_NOT_ALLOWED:"An admin rank cannot contain emojis",ADMIN_RANK_INVALID:"The specified admin rank is invalid",FRESH_CHANGE_ADMINS_FORBIDDEN:"You were just elected admin, you can't add or modify other admins yet",INPUT_USER_DEACTIVATED:"The specified user was deleted",BOT_PRECHECKOUT_TIMEOUT:"The request for payment has expired"};r.eM&&(o.CHAT_WRITE_FORBIDDEN="You can't write in this chat",o.CHAT_ADMIN_REQUIRED="You must be an admin in this chat to do this");const a={ADDRESS_STREET_LINE1_INVALID:{field:"streetLine1",message:"Incorrect street address"},ADDRESS_STREET_LINE2_INVALID:{field:"streetLine2",message:"Incorrect street address"},ADDRESS_CITY_INVALID:{field:"city",message:"Incorrect city"},ADDRESS_COUNTRY_INVALID:{field:"countryIso2",message:"Incorrect country"},ADDRESS_POSTCODE_INVALID:{field:"postCode",message:"Incorrect post code"},ADDRESS_STATE_INVALID:{field:"state",message:"Incorrect state"},REQ_INFO_NAME_INVALID:{field:"fullName",message:"Incorrect name"},REQ_INFO_PHONE_INVALID:{field:"phone",message:"Incorrect phone"},REQ_INFO_EMAIL_INVALID:{field:"email",message:"Incorrect email"}},i=new Set(["BOT_PRECHECKOUT_FAILED","PAYMENT_FAILED"]);function s(e){const{message:t,isSlowMode:n,textParams:r}=e;if(n){const e=t.indexOf(" (caused by");return e>0?t.substring(0,e):t}let a=o[t];return a&&r&&(a=Object.keys(r).reduce(((e,t)=>e.replace(t,r[t])),a)),a}function d(e){return a[e.message]}function u(e){return i.has(e.message)}},33592:(e,t,n)=>{"use strict";n.d(t,{S:()=>a}),n(83716);var r=n(69118);function o(e){e instanceof ErrorEvent&&"ResizeObserver loop limit exceeded"===e.message||(e.preventDefault(),a(e instanceof ErrorEvent?e.error||e.message:e.reason))}function a(e){console.error(e)}window.addEventListener("error",o),window.addEventListener("unhandledrejection",o),(0,r.P2)(window.alert,1e3)},36046:(e,t,n)=>{"use strict";n.d(t,{G:()=>i,e:()=>a});var r=n(33555);let o;function a(){window.addEventListener("beforeinstallprompt",(e=>{o=async()=>{e.prompt(),"accepted"===(await e.userChoice).outcome&&(0,r.Sv)().setInstallPrompt({canInstall:!1})},(0,r.Sv)().setInstallPrompt({canInstall:!0})}))}function i(){return o}},60782:(e,t,n)=>{"use strict";function r(e,t){return e.reduce(((e,n)=>(e[n[t]]=n,e)),{})}function o(e,t){return Object.keys(e).reduce(((n,r,o)=>(n[r]=t(e[r],r,o,e),n)),{})}function a(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}function i(e,t){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}function s(e,t){const n=new Set(t.map(String));return a(e,Object.keys(e).filter((e=>!n.has(e))))}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";function r(e,t,n,r){const o=("function"==typeof n?n(e):e[n])||0,a=("function"==typeof n?n(t):t[n])||0;return r?o-a:a-o}if(Array.isArray(t)){const[o,a]=Array.isArray(n)?n:[n,n],[i,s]=t,d="asc"===o,u="asc"===a;return e.sort(((e,t)=>r(e,t,i,d)||r(e,t,s,u)))}const o="asc"===n;return e.sort(((e,n)=>r(e,n,t,o)))}function u(e){return Array.from(new Set(e))}function c(e){return e.filter(Boolean)}function l(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}function f(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 g(e,t){const n=[];for(let r=0;r(t[n]=p(e[n]),t)),{})}function m(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return e[n]}n.d(t,{CE:()=>s,Q8:()=>o,Tw:()=>u,Vl:()=>g,Xh:()=>p,Xo:()=>d,YE:()=>f,dF:()=>m,eL:()=>h,ee:()=>r,ei:()=>a,et:()=>l,oA:()=>c,q0:()=>i})},50711:(e,t,n)=>{"use strict";n.d(t,{Pn:()=>I,i0:()=>w,ll:()=>p,m0:()=>C,qf:()=>S});var r=n(33555),o=n(83716),a=n(49524),i=n(71226),s=n(16063),d=n(2155);const u=/%\d?\$?[sdf@]/g,c=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],l={en:e=>1!==e?6:2,ar:e=>0===e?1:1===e?2:2===e?3:e%100>=3&&e%100<=10?4:e%100>=11?5:6,ca:e=>1!==e?6:2,de:e=>1!==e?6:2,es:e=>1!==e?6:2,fa:e=>e>1?6:2,fr:e=>e>1?6:2,id:()=>0,it:e=>1!==e?6:2,ko:()=>0,ms:()=>0,nl:e=>1!==e?6:2,pl:e=>1===e?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,pt_BR:e=>e>1?6:2,ru:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,tr:e=>e>1?6:2,uk:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,uz:e=>e>1?6:2},f=new Map;let h,g;const{addCallback:p,removeCallback:m,runCallbacks:v}=(0,s._)();let y,b;const w=(e,t,n)=>{var r,o;if(void 0!==t){const r=Array.isArray(t)?JSON.stringify(t):t,o=f.get(`${e}_${r}_${n}`);if(o)return o}if(!h&&!g)return e;const a=(null===(r=h)||void 0===r?void 0:r[e])||(null===(o=g)||void 0===o?void 0:o[e]);return a?M(a,e,t,n):(g||E(),e)};async function I(e,t){let n=await a.fetch(o.ee,`${o.$O}_${e}_${t}`,a.Type.Json);return n||(n=await async function(e,t,n){const r=await(0,i.t9)("fetchLangStrings",{langPack:e,langCode:t,keys:[n]});if(null!=r&&r.length)return await a.save(o.ee,`${e}_${t}_${n}`,r[0]),r[0]}(o.$O,e,t)),M(n,t)}async function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(h&&e===y)return void(t&&t());let i=await a.fetch(o.ee,e,a.Type.Json);if(!i&&(n&&await E(),i=await P(e),!i))return;f.clear(),y=e,h=i,document.documentElement.lang=e;const{languages:s,timeFormat:d}=(0,r.Rd)().settings.byKey,u=null==s?void 0:s.find((t=>t.langCode===e));w.isRtl=Boolean(null==u?void 0:u.rtl),w.code=e,w.langName=null==u?void 0:u.nativeName,w.timeFormat=d,t&&t(),v()}function S(e){e&&e===b||(b=e,w.timeFormat=e,v())}async function E(){g||(g=(await n.e(1915).then(n.bind(n,31915))).default,v())}async function P(e){const t=await(0,i.t9)("fetchLangPack",{sourceLangPacks:o.Bg,langCode:e});if(t)return await a.save(o.ee,e,t.langPack),t.langPack}function M(e,t,n,r){const a="number"==typeof n?function(e){const t=y||o.sR,n=l[t]?l[t](e):0;return c[n]}(n):"value",i=e?e[a]||e.otherValue||e.value:void 0;if(!i||!i.trim()){const e=t.split(".");return e[e.length-1]}if(void 0!==n){const e=function(e,t){t=Array.isArray(t)?t:[t];const n=e.split(u),r=n.shift();return n.reduce(((e,n,r)=>`${e}${String(t[r]||"")}${n}`),r||"")}(i,"i"===r?(0,d.kh)(n):n),o=Array.isArray(n)?JSON.stringify(n):n;return f.set(`${t}_${o}_${r}`,e),e}return i}},28712:(e,t,n)=>{"use strict";n.d(t,{Kh:()=>o,NM:()=>a,t7:()=>i,uZ:()=>r});const r=(e,t,n)=>Math.min(n,Math.max(t,e)),o=(e,t,n)=>e>=t&&e<=n,a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.round(e*10**t)/10**t},i=(e,t,n)=>(1-n)*e+n*t},40647:(e,t,n)=>{"use strict";n.d(t,{cC:()=>b,he:()=>v,UV:()=>y,Iq:()=>w});var r=n(6137),o=n(83716),a=n(71226),i=n(49524),s=n(71394),d=n(77361);const u=48e3;async function c(e){const t=await new Response(e).arrayBuffer();return new Promise((e=>{const r=new Uint8Array(t);let o=new Worker(new URL(n.p+n.u(5745),n.b)),a=new Worker(new URL(n.p+n.u(5993),n.b));o.onmessage=e=>{null===e.data?a.postMessage({command:"done"}):a.postMessage({command:"encode",buffers:e.data},e.data.map((e=>{let{buffer:t}=e;return t})))},a.onmessage=t=>{"page"===t.data.message&&(e(new Blob([t.data.page],{type:"audio/wav"})),o.terminate(),o=void 0,a.terminate(),a=void 0)},a.postMessage({command:"init",wavBitDepth:16,wavSampleRate:u}),o.postMessage({command:"init",decoderSampleRate:u,outputBufferSampleRate:u}),o.postMessage({command:"decode",pages:r},[r.buffer])}))}var l=n(10862);const f={[r.IU.BlobUrl]:i.Type.Blob,[r.IU.Text]:i.Type.Text,[r.IU.DownloadUrl]:void 0,[r.IU.Progressive]:void 0,[r.IU.Stream]:void 0},h=new Map,g=new Map,p=new Map,m=new Map;function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(t===r.IU.Progressive)return d.I_?I(e):v(e,r.IU.BlobUrl,n,a,i);if(t===r.IU.DownloadUrl)return d.I_?C(e):v(e,r.IU.BlobUrl,n,a,i);if(!g.has(e)){const r=S(e,t,n).catch((e=>{o.eM&&console.warn(e)})).finally((()=>{g.delete(e),p.delete(e),m.delete(e)}));g.set(e,r)}if(a&&i){let t=p.get(e);t||(t=new Map,p.set(e,t)),t.set(i,a)}return g.get(e)}function y(e){return h.get(e)}function b(e){p.forEach(((t,n)=>{t.forEach((t=>{if(t===e){const e=m.get(n);if(!e)return;(0,a.u3)(e),m.delete(n),p.delete(n)}}))}))}function w(e,t){const n=p.get(e);n&&n.delete(t)}function I(e){const t=`./progressive/${e}`;return h.set(e,t),Promise.resolve(t)}function C(e){return Promise.resolve(`./download/${e}`)}async function S(e,t,n){if(!o.Cy){const r=e.startsWith("avatar")?o.SG:o.lW,a=await i.fetch(r,e,f[t],n);if(a){let t=a;if("audio/ogg"!==a.type||d.m5||(t=await c(t)),"image/webp"===a.type&&!(0,d.on)()&&t){const n=await(0,l._y)(e,t);n&&(t=n)}const n=P(t);return h.set(e,n),n}}if(t===r.IU.Stream){const n=new MediaSource,r=URL.createObjectURL(n);let o=!1;return n.addEventListener("sourceopen",(()=>{if(o)return;o=!0;const r=n.addSourceBuffer("audio/mpeg"),i=E(e,n,r);m.set(e,i),(0,a.t9)("downloadMedia",{url:e,mediaFormat:t},i)})),h.set(e,r),r}const u=E(e);m.set(e,u);const g=await(0,a.t9)("downloadMedia",{url:e,mediaFormat:t,isHtmlAllowed:n},u);if(!g)throw new Error(`Failed to fetch media ${e}`);let{prepared:p,mimeType:v}=g;if("audio/ogg"===v&&!d.m5){const e=await(0,s.gm)(p);URL.revokeObjectURL(p);const t=await c(e);p=P(t),v=t.type}if("image/webp"===v&&!(0,d.on)()){const t=await(0,s.gm)(p);URL.revokeObjectURL(p);const n=await(0,l._y)(e,t);n&&(p=P(n))}return h.set(e,p),p}function E(e,t,n){const r=(o,a)=>{var i;null===(i=p.get(e))||void 0===i||i.forEach((e=>{e(o),e.isCanceled&&(r.isCanceled=!0)})),1===o&&(null==t||t.endOfStream()),a&&(null==n||n.appendBuffer(a))};return r}function P(e){return e instanceof Blob?URL.createObjectURL(e):e}d.I_&&navigator.serviceWorker.addEventListener("message",(async e=>{const{type:t,messageId:n,params:o}=e.data;if("requestPart"!==t)return;const i=await(0,a.t9)("downloadMedia",{mediaFormat:r.IU.Progressive,...o});if(!i)return;const{arrayBuffer:s,mimeType:d,fullSize:u}=i;navigator.serviceWorker.controller.postMessage({type:"partResponse",messageId:n,result:{arrayBuffer:s,mimeType:d,fullSize:u}},[s])}))},70735:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});const r=[]},99203:(e,t,n)=>{"use strict";n.d(t,{$y:()=>c,Qt:()=>f,gl:()=>a,o5:()=>l});var r=n(83716),o=n(16063);let a;!function(e){e[e.Auth=0]="Auth",e[e.Main=1]="Main",e[e.Extra=2]="Extra",e[e.Calls=3]="Calls"}(a||(a={}));const i={},s={},{addCallback:d,runCallbacks:u}=(0,o._)();async function c(e,t){if(!i[e]){switch(e){case a.Auth:i[a.Auth]=n.e(3041).then(n.bind(n,51133));break;case a.Main:r.eM&&console.log(">>> START LOAD MAIN BUNDLE"),i[a.Main]=Promise.all([n.e(1989),n.e(7916),n.e(9970),n.e(5769)]).then(n.bind(n,73181));break;case a.Extra:i[a.Extra]=Promise.all([n.e(1989),n.e(7916),n.e(3779)]).then(n.bind(n,90952));break;case a.Calls:i[a.Calls]=Promise.all([n.e(1989),n.e(9970),n.e(9954)]).then(n.bind(n,47903))}i[e].then(u)}const o=await i[e];return s[e]||(s[e]=o),l(e,t)}function l(e,t){const n=s[e];if(n)return n[t]}const f=d},28406:(e,t,n)=>{"use strict";n.d(t,{KC:()=>T,Ld:()=>M,Nz:()=>w,TO:()=>k,Vr:()=>N,q3:()=>b,r1:()=>S,rh:()=>_});var r=n(71226),o=n(6137),a=n(18005),i=n(83716),s=n(33555),d=n(83158),u=n(5161),c=n(11192),l=n(77361),f=n(50711),h=n(40647),g=n(69118);function p(e){const t=e.toJSON();return JSON.stringify({endpoint:t.endpoint,keys:t.keys})}function m(){return!!l.Mc&&("showNotification"in ServiceWorkerRegistration.prototype?"denied"===Notification.permission?(i.eM&&console.warn("[PUSH] The user has blocked push notifications."),!1):"PushManager"in window||(i.eM&&console.warn("[PUSH] Push messaging isn't supported."),!1):(i.eM&&console.warn("[PUSH] Push notifications aren't supported."),!1))}function v(){return"Notification"in window?"denied"!==Notification.permission||(i.eM&&console.warn("[PUSH] The user has blocked push notifications."),!1):(i.eM&&console.warn("[PUSH] This browser does not support desktop notification"),!1)}const y=new Set;async function b(e,t){if(void 0!==e&&y.has(e))return;const{notificationSoundVolume:n}=(0,c.dZ)((0,s.Rd)()),r=t?t/10:n/10;if(0===r)return;const o=new Audio("./notification.mp3");o.volume=r,o.setAttribute("mozaudiochannel","notification"),void 0!==e&&(o.addEventListener("ended",(()=>{y.add(e)}),{once:!0}),setTimeout((()=>{y.delete(e)}),3e3));try{await o.play()}catch(e){i.eM&&console.warn("[PUSH] Unable to play notification sound")}}const w=(0,g.Ds)(b,1e3,!0,!1);async function I(){"Notification"in window&&(["granted","denied"].includes(Notification.permission)||await Notification.requestPermission())}async function C(e){const t=(0,s.Rd)(),n=(0,s.Sv)();if(e)try{const t=p(e);return await(0,r.t9)("unregisterDevice",t),await e.unsubscribe(),void n.deleteDeviceToken()}catch(e){i.eM&&console.log("[PUSH] Unable to unsubscribe from push.",e)}t.push&&(await(0,r.t9)("unregisterDevice",t.push.deviceToken),n.deleteDeviceToken())}async function S(){if(!m())return;const e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();await C(t)}let E=!1;async function P(){if(E)return(0,c.dZ)((0,s.Rd)());const[e,t]=await Promise.all([(0,r.t9)("fetchNotificationSettings",{serverTimeOffset:(0,s.Rd)().serverTimeOffset}),(0,r.t9)("fetchNotificationExceptions",{serverTimeOffset:(0,s.Rd)().serverTimeOffset})]);if(!e)return(0,c.dZ)((0,s.Rd)());let n=(0,u.BI)((0,s.Rd)(),e);return t&&(n=(0,u.aJ)(n,t)),(0,s.R3)(n),E=!0,(0,c.dZ)(n)}async function M(){if(!m())return void await I();const e=await navigator.serviceWorker.ready;let t=await e.pushManager.getSubscription();if(function(e){const t=(0,s.Rd)();return!t.push||!e||p(e)!==t.push.deviceToken||Date.now()-t.push.subscribedAt>432e5}(t)){await C(t);try{t=await e.pushManager.subscribe({userVisibleOnly:!0});const n=p(t);i.eM&&console.log("[PUSH] Received push subscription: ",n),await(0,r.t9)("registerDevice",n),(0,s.Sv)().setDeviceToken(n)}catch(e){"denied"===Notification.permission?i.eM&&console.warn("[PUSH] The user has blocked push notifications."):i.eM&&(console.log("[PUSH] Unable to subscribe to push.",e),e.code===DOMException.ABORT_ERR&&await I())}}}async function A(e){const t=(0,d.RT)(e);if(!t)return;let n=h.UV(t);return n||(await h.he(t,o.IU.BlobUrl),n=h.UV(t)),n}async function k(e){let{call:t,user:n}=e;const{hasWebNotifications:r}=await P();if(document.hasFocus()||!r)return;if(!v())return;const o=await A(n),a={body:(0,d.Js)(n),icon:o,badge:o,tag:`call_${t.id}`};"vibrate"in navigator&&(a.vibrate=[200,100,200]);const i=new Notification((0,f.i0)("VoipIncoming"),a);i.onclick=()=>{i.close(),window.focus&&window.focus()}}async function _(e){let{chat:t,message:n,isReaction:r=!1}=e;const{hasWebNotifications:o}=await P();if(!function(e){if(!E)return!1;const t=(0,s.Rd)();if((0,d.i4)(e,(0,c.dZ)(t),(0,c.NJ)(t))||e.isNotJoined||!e.isListed)return!1;if(l.$b){const{chatId:n,type:r}=(0,c.Bt)(t)||{};return!(n===e.id&&"thread"===r)}return!document.hasFocus()}(t))return;const u=v();if(!o||!u){if(r)return;return void w(String(n.id)||t.id)}if(!u)return;if(!n.id)return;const h=(0,d.dT)(n);if(r&&!h)return;const g=await A(t),{title:p,body:y}=function(e,t,n){const r=(0,s.Rd)(),{replyToMessageId:o}=t;let{senderId:u}=t;n&&(u=n.userId);const{isScreenLocked:l}=r.passcode,h=u?(0,c.dy)(r,u):void 0,g=(0,d.N5)(t),p=g&&o?(0,c.hj)(r,e.id,o):void 0,{targetUserIds:m,targetChatId:v}=g||{},y=m?m.map((e=>(0,c.dy)(r,e))).filter(Boolean):void 0,b=(0,d.zX)(e),w=b?(0,c.dy)(r,b):void 0;let I;if(!l&&(0,d.Sm)(e,(0,c.dZ)(r),(0,c.NJ)(r)))if((0,d.Lo)(t)){const n=e&&((0,d.eA)(e)||t.senderId===t.chatId);I=(0,a.D)(f.i0,t,n?void 0:h,n?e:void 0,y,p,v,{asPlainText:!0})}else{const n=(0,d.zF)(f.i0,e.id,h),r=(0,d.MK)(f.i0,t,!1,60,!1);I=n?`${n}: ${r}`:r}else I="New message";return{title:l?i.iC:(0,d.U)(f.i0,e,w),body:I}}(t,n,h);if(m()){var b;null!==(b=navigator.serviceWorker)&&void 0!==b&&b.controller&&navigator.serviceWorker.controller.postMessage({type:"showMessageNotification",payload:{title:p,body:y,icon:g,chatId:t.id,messageId:n.id,shouldReplaceHistory:!0,reaction:null==h?void 0:h.reaction}})}else{const e=(0,s.Sv)(),o={body:y,icon:g,badge:g,tag:String(n.id)};"vibrate"in navigator&&(o.vibrate=[200,100,200]);const a=new Notification(p,o);a.onclick=()=>{a.close(),e.focusMessage({chatId:t.id,messageId:n.id,shouldReplaceHistory:!0}),window.focus&&window.focus()},a.onshow=()=>{r||w(String(n.id)||t.id)}}}function N(e){var t;!i.Cg&&null!==(t=navigator.serviceWorker)&&void 0!==t&&t.controller&&navigator.serviceWorker.controller.postMessage({type:"closeMessageNotifications",payload:e})}function T(){var e;null!==(e=navigator.serviceWorker)&&void 0!==e&&e.controller&&navigator.serviceWorker.controller.postMessage({type:"clientReady"})}},95281:(e,t,n)=>{"use strict";n.d(t,{AU:()=>i,C8:()=>c,H4:()=>s,J9:()=>u,so:()=>d});var r=n(49524),o=n(83716);let a;async function i(e){a=await l(e)}async function s(e,t){if(!a)throw new Error("[api/passcode] Missing current passcode");await Promise.all([(async()=>{if(!e)return;const t=await g(e,a);await f("sessionEncrypted",t)})(),(async()=>{if(!t)return;const e=await g(t,a);await f("globalEncrypted",e)})()])}async function d(e){const t=await l(e),[n,r]=await Promise.all([h("sessionEncrypted"),h("globalEncrypted")]);if(!n||!r)throw new Error("[api/passcode] Missing required stored fields");const[o,i]=await Promise.all([p(n,t),p(r,t)]);return a=t,{sessionJson:o,globalJson:i}}function u(){a=void 0}function c(){return u(),r.clear(o.oX)}function l(e){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(`${e}harder better faster stronger`))}async function f(e,t){await r.save(o.oX,e,t)}function h(e){return r.fetch(o.oX,e,r.Type.ArrayBuffer)}async function g(e,t){const n=crypto.getRandomValues(new Uint8Array(12)),r={name:"AES-GCM",iv:n},o=await crypto.subtle.importKey("raw",t,r,!1,["encrypt"]),a=(new TextEncoder).encode(e),i=await crypto.subtle.encrypt(r,o,a),s=new Uint8Array(i),d=new Uint8Array(12+s.length);return d.set(n,0),d.set(s,12),d.buffer}async function p(e,t){const n=new Uint8Array(e),r={name:"AES-GCM",iv:n.slice(0,12)},o=await crypto.subtle.importKey("raw",t,r,!1,["decrypt"]),a=n.slice(12),i=await crypto.subtle.decrypt(r,o,a);return(new TextDecoder).decode(i)}},6272:(e,t,n)=>{"use strict";n.d(t,{U9:()=>a,WZ:()=>d,g3:()=>i,un:()=>s});const r="X",o="XXX XXX XXX XXX";function a(e,t){return e.filter((e=>e.iso2===t))}function i(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=n.replace(/[^\d+]+/g,"");r.startsWith("+")&&(r=r.substr(1));const o=e.filter((e=>r.startsWith(e.countryCode))),a=o.map((e=>(e.prefixes||[""]).map((t=>({code:`${e.countryCode}${t}`,country:e}))))).flat(),i=a.filter((e=>{let{code:t}=e;return r.startsWith(t)})).sort(((e,t)=>e.code.length-t.code.length));return null===(t=i[i.length-1])||void 0===t?void 0:t.country}function s(e,t){if(!e)return"";let n=e.replace(/[^\d]+/g,"");if(t)n=n.substr(t.countryCode.length);else if(e.startsWith("+"))return e;const a=function(e,t){if(!t||0===t.length)return o;if(1===t.length)return t[0];const n=t.find((e=>e.startsWith(r)))||o,a=t.filter((t=>{const n=t.replace(/[^\dX]+/g,"");if(n.startsWith(r))return!1;for(let t=0;tn.length-1||n[t]!==r&&n[t]!==e[t])return!1;return!0}));return 1===a.length?a[0]:n}(n,null==t?void 0:t.patterns),i=[];let s=0;for(let e=0;e{"use strict";n.d(t,{V:()=>i,q:()=>a});var r=n(6137),o=n(46590);const a=(e,t,n)=>e.toString()+("thread"!==t?`_${t}`:-1!==n?`_${n}`:"");function i(){if(!o.O)return;const[e,t]=o.O.replace(/^#/,"").split("_");if(null==e||!e.match(/^-?\d+$/))return;const n=["thread","pinned","scheduled"].includes(t);return{chatId:e,type:Boolean(t)&&n?t:"thread",threadId:Boolean(t)&&!n?Number(t):r._f}}},69118:(e,t,n)=>{"use strict";function r(e,t){let n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(){for(var a=arguments.length,i=new Array(a),s=0;s{o&&e(...i),n=void 0}),t)}}function o(e,t){let n,r,o,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(){r=!0;for(var i=arguments.length,s=new Array(i),d=0;d{if(!r)return self.clearInterval(n),void(n=void 0);r=!1,e(...o)}),t))}}function a(e){return d(v,e)}function i(e){return d(y,e)}function s(e){return d(b,e)}function d(e,t){let n,r=!1;return function(){for(var o=arguments.length,a=new Array(o),i=0;i{r=!1,t(...n)})))}}function u(e,t){self.requestIdleCallback?self.requestIdleCallback(e,{timeout:t}):b(e)}n.d(t,{$6:()=>s,D0:()=>y,Ds:()=>r,Gq:()=>I,P2:()=>o,Pn:()=>l,Q8:()=>u,R3:()=>b,T2:()=>v,mS:()=>a,wO:()=>c,wT:()=>i,zD:()=>w});const c=e=>new Promise((t=>{setTimeout((()=>t()),e)}));function l(){return new Promise((e=>{v(e)}))}let f,h,g,p,m;function v(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f?t?h.push(e):f.push(e):(f=t?[]:[e],h=t?[e]:[],requestAnimationFrame((()=>{const e=f,t=h;f=void 0,h=void 0,t.forEach((e=>e())),e.forEach((e=>e()))})))}function y(e){v(e,!0)}function b(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g?t?p.push(e):g.push(e):(g=t?[]:[e],p=t?[e]:[],Promise.resolve().then((()=>{const e=g,t=p;g=void 0,p=void 0,t.forEach((e=>e())),e.forEach((e=>e()))})))}function w(e){b(e,!0)}function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return m||(m=[],self.addEventListener("beforeunload",(()=>{m.forEach((e=>e()))}))),t?m.push(e):m.unshift(e),()=>{m=m.filter((t=>t!==e))}}},85765:(e,t,n)=>{"use strict";let r;n.d(t,{W:()=>a,Z:()=>o});try{r=/[^\p{L}\p{M}]+/iu}catch(e){r=/[^\wа-яё]+/i}function o(e,t){if(!e||!t)return!1;const n="string"==typeof t?t.toLowerCase().split(r):t,o=e.toLowerCase();if(1===n.length&&!o.includes(n[0]))return!1;let a;return n.every((e=>!!o.includes(e)&&(a||(a=o.split(r)),a.some((t=>t.startsWith(e))))))}function a(e){const t=e.toLowerCase().split(r);return e=>o(e,t)}},82267:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=e=>Math.floor(Date.now()/1e3)+e},3100:(e,t,n)=>{"use strict";n.d(t,{f3:()=>g,jv:()=>l,ti:()=>u,Qw:()=>h,K8:()=>f,wX:()=>c});function r(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}let o;function a(){return o||(o=function(e,t){const n=(!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var t=function(){return indexedDB.databases().finally(e)};o=setInterval(t,100),t()})).finally((function(){return clearInterval(o)})):Promise.resolve()).then((()=>{const e=indexedDB.open("keyval-store");return e.onupgradeneeded=()=>e.result.createObjectStore(t),r(e)}));var o;return(e,r)=>n.then((n=>r(n.transaction(t,e).objectStore(t))))}(0,"keyval")),o}var i=n(83716),s=n(49524);const d=[1,2,3,4,5];function u(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&localStorage.getItem(i.Vx))return!0;if(p())return!0;const t=localStorage.getItem(i.b_);if(!t)return!1;try{const e=JSON.parse(t);return Boolean(e&&e.id&&e.dcID)}catch(e){return!1}}function c(e,t){const{mainDcId:n,keys:r,hashes:o}=e;localStorage.setItem(i.b_,JSON.stringify({dcID:n,id:t})),localStorage.setItem("dc",String(n)),Object.keys(r).map(Number).forEach((e=>{localStorage.setItem(`dc${e}_auth_key`,JSON.stringify(r[e]))})),o&&Object.keys(o).map(Number).forEach((e=>{localStorage.setItem(`dc${e}_hash`,JSON.stringify(o[e]))}))}function l(){[i.b_,"dc",...d.map((e=>`dc${e}_auth_key`)),...d.map((e=>`dc${e}_hash`)),...d.map((e=>`dc${e}_server_salt`))].forEach((e=>{localStorage.removeItem(e)}))}function f(){if(!u())return;const e=JSON.parse(localStorage.getItem(i.b_));if(!e)return;const t=Number(e.dcID),n={},r={};return d.forEach((e=>{try{const t=localStorage.getItem(`dc${e}_auth_key`);t&&(n[e]=JSON.parse(t));const o=localStorage.getItem(`dc${e}_hash`);o&&(r[e]=JSON.parse(o))}catch(e){i.eM&&console.warn("Failed to load stored session",e)}})),Object.keys(n).length?{mainDcId:t,keys:n,hashes:r}:void 0}async function h(){const e=localStorage.getItem(i.Vx);if(!e)return;const t=await function(e,t=a()){return t("readonly",(t=>r(t.get(e))))}(`GramJs:${e}`);try{c(JSON.parse(t))}catch(e){i.eM&&console.warn("Failed to load legacy session",e)}}async function g(){localStorage.removeItem(i.Vx);const e=await function(e=a()){return e("readonly",(e=>{if(e.getAllKeys)return r(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},r(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}();await Promise.all([s.clear("GramJs"),...e.filter((e=>"string"==typeof e&&e.startsWith("GramJs:GramJs-session-"))).map((e=>function(e,t=a()){return t("readwrite",(t=>(t.delete(e),r(t.transaction))))}(e)))])}function p(){var e;const t=JSON.parse(localStorage.getItem(i.Uh)||"{}");return Boolean(null==t||null===(e=t.passcode)||void 0===e?void 0:e.isScreenLocked)}},27370:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(9933),o=n(69118);const a=JSON.parse('{"--color-primary":["#3390EC","#8774E1"],"--color-primary-opacity":["#50A2E980","#8378DB80"],"--color-primary-shade":["#4a95d6","#7b71c6"],"--color-background":["#FFFFFF","#212121"],"--color-background-compact-menu":["#FFFFFFBB","#212121DD"],"--color-background-compact-menu-reactions":["#FFFFFFEB","#212121DD"],"--color-background-compact-menu-hover":["#00000011","#00000066"],"--color-background-secondary":["#f4f4f5","#0F0F0F"],"--color-background-secondary-accent":["#E4E4E5","#100f10"],"--color-background-own":["#EEFFDE","#766AC8"],"--color-background-own-apple":["#DCF8C5","#766AC8"],"--color-background-selected":["#F4F4F5","#2C2C2C"],"--color-background-own-selected":["#d0ffac","#6549d4"],"--color-chat-hover":["#F4F4F5","#2C2C2C"],"--color-chat-active":["#3390EC","#766AC8"],"--color-item-active":["#ededed","#292929"],"--color-text":["#000000","#FFFFFF"],"--color-text-secondary":["#707579","#AAAAAA"],"--color-icon-secondary":["#707579","#AAAAAA"],"--color-text-secondary-apple":["#8E8E92","#AAAAAA"],"--color-borders":["#DADCE0","#303030"],"--color-borders-input":["#DADCE0","#5B5B5A"],"--color-dividers":["#C8C6CC","#404040"],"--color-links":["#3390EC","#8774E1"],"--color-gray":["#C4C9CC","#717579"],"--color-pinned":["#C4C9CC","#707579"],"--color-default-shadow":["#72727240","#1010109c"],"--color-light-shadow":["#7272722B","#00000040"],"--color-green":["#00C73E","#8774E1"],"--color-text-meta-colored":["#4DCD5E","#8378DB"],"--color-reply-hover":["#F4F4F4","#272727"],"--color-reply-active":["#E8E9E9","#2E2F2F"],"--color-reply-own-hover":["#D9F5CE","#8775DA"],"--color-reply-own-hover-apple":["#cbefb7","#8775DA"],"--color-reply-own-active":["#C5ECBE","#917DEA"],"--color-reply-own-active-apple":["#bae6a8","#917DEA"],"--color-accent-own":["#45AF54","#FFFFFF"],"--color-message-meta-own":["#4FAE4EFF","#FFFFFF88"],"--color-own-links":["#3390EC","#FFFFFF"],"--color-code":["#4a729a","#8774E1"],"--color-code-own":["#3c7940","#FFFFFF"],"--color-code-bg":["#70757914","#00000080"],"--color-code-own-bg":["#70757914","#00000050"],"--color-composer-button":["#707579CC","#AAAAAACC"],"--color-message-reaction":["#ebf3fd","#2b2a35"],"--color-message-reaction-hover":["#c5def9","#343147"],"--color-message-reaction-own":["#cef0ba","#675CAF"],"--color-message-reaction-hover-own":["#b5e0a4","#5B529B"],"--color-voice-transcribe-button":["#e8f3ff","#2a2a3c"],"--color-voice-transcribe-button-own":["#cceebf","#8373d3"]}');var i=n(28712);let s=!1;const d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,u=new Set(["--color-primary-shade","--color-text-secondary"]),c=Object.keys(a).map((e=>({property:e,colors:[l(a[e][0]),l(a[e][1])]})));function l(e){const t=d.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 f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;c.forEach((r=>{let{property:o,colors:a}=r;const s=Math.round((0,i.t7)(a[e].r,a[t].r,n)),d=Math.round((0,i.t7)(a[e].g,a[t].g,n)),c=Math.round((0,i.t7)(a[e].b,a[t].b,n)),l=void 0!==a[e].a?Math.round((0,i.t7)(a[e].a,a[t].a,n)):void 0;document.documentElement.style.setProperty(o,void 0!==l?`rgba(${s},${d},${c},${l/255})`:`rgb(${s},${d},${c})`),u.has(o)&&document.documentElement.style.setProperty(`${o}-rgb`,`${s},${d},${c}`)}))}const h=(e,t)=>{const n=`theme-${e}`;if(document.documentElement.classList.contains(n))return;const a="dark"===e,i=s&&t,d=a?0:1,u=a?1:0,c=Date.now(),l=document.querySelector('meta[name="theme-color"]');document.documentElement.classList.remove("theme-"+(a?"light":"dark")),s&&document.documentElement.classList.add("no-animations"),document.documentElement.classList.add(n),l&&l.setAttribute("content",a?"#212121":"#fff"),setTimeout((()=>{document.documentElement.classList.remove("no-animations")}),500),s=!0,i?(0,o.T2)((()=>{(0,r.cK)((()=>{const e=Math.min((Date.now()-c)/200,1);return f(d,u,function(e){return 1-(1-e)**3.5}(e)),e<1}))})):f(d,u)}},2155:(e,t,n)=>{"use strict";n.d(t,{Xv:()=>d,bi:()=>s,kh:()=>a,sS:()=>c});var r=n(33681),o=n(34284);function a(e){return String(e).replace(/\d(?=(\d{3})+$)/g,"$& ")}function i(e){return".0"===String(e.toFixed(1)).substr(-2)?Math.round(e):e.toFixed(1).replace(".",",")}function s(e){return e<1e3?e:e<1e6?`${i(e/1e3)}K`:`${i(e/1e6)}M`}const d=(0,n(15155).Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map((e=>{if(!e.length)return"";const t=(e=(0,o.g6)(e)).match(r.Z);return t&&e.startsWith(t[0])?t[0]:e.match(/./u)[0].toUpperCase()})).join("")})),u=["B","KB","MB","GB"];function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0===t)return e("FileSize.B",0);const r=1024,o=Math.floor(Math.log(t)/Math.log(r)),a=(t/r**o).toFixed(Math.max(n,0));return e(`FileSize.${u[o]}`,a)}},48035:(e,t,n)=>{"use strict";function r(e,t){return!e||!t||e.length<=t?e:`${e.substring(0,t)}...`}n.d(t,{Z:()=>r})},10862:(e,t,n)=>{"use strict";n.d(t,{Hu:()=>d,_y:()=>u,p6:()=>c});var r=n(77361),o=n(71394),a=n(69118);let i,s;const d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";async function u(e,t){for(l();!s.wasmReady;)await(0,a.wO)(2e3);const{result:n,width:r,height:o}=await function(e,t){return new Promise((n=>{s.requests||(s.requests=new Map),s.requests.set(e,n),s.postMessage({id:e,blob:t})}))}(e,t);if(r&&o)return function(e){let{result:t,width:n,height:r}=e;return i||(i=document.createElement("canvas")),new Promise((e=>{const o=new ImageData(t,n,r);i.width=n,i.height=r,i.getContext("2d").putImageData(o,0,0),i.toBlob((t=>{e(null!=t?t:void 0)}),"image/png",1)}))}({result:n,width:r,height:o})}async function c(e,t){if((0,r.on)()||"data:image/webp"!==t.substr(0,15))return t;l();const n=await u(e,(0,o.A9)(t));if(!n)throw new Error(`Can't convert webp to png. Url: ${t}`);return(0,o.YJ)(n)}function l(){s||(s=new Worker(new URL(n.p+n.u(9536),n.b)),s.wasmReady=!1,s.onmessage=f)}function f(e){const{id:t}=e.data;switch(e.data.type){case"initialized":s.wasmReady=!0;break;case"result":if(s.requests.has(t)){const n=s.requests.get(t);s.requests.delete(t),n(e.data)}}}},706:(e,t,n)=>{"use strict";n.d(t,{IT:()=>l,W8:()=>h,px:()=>f});var r=n(83716),o=n(33555),a=n(3100);const i=["t.me","telegram.me"].map((e=>`//${e}/_websync_?`)),s=`${r.Ji} Z`,d="tgme_sync",u=()=>Math.floor(Number(new Date)/1e3);let c;const l=e=>{if(r.Nu)return;const t=u(),{canRedirect:n,ts:o}=JSON.parse(localStorage.getItem(d)||"{}");return n!==e||o+86400<=t?Promise.all(i.map((t=>new Promise(((n,r)=>{const o=document.createElement("script"),a=()=>Boolean(document.body.removeChild(o));o.src=t+new URLSearchParams({authed:Number(e).toString(),version:s}),document.body.appendChild(o),o.onload=()=>{(e=>{const t=u();localStorage.setItem(d,JSON.stringify({canRedirect:e,ts:t}))})(e),a(),c&&(clearTimeout(c),c=void 0),f(),n()},o.onerror=()=>{a(),r()}}))))):Promise.resolve()};function f(){if(r.eM)return;if(void 0!==c)return;const e=u(),{ts:t}=JSON.parse(localStorage.getItem(d)||"{}"),n=86400-(e-t);c=setTimeout((()=>{const{authState:e}=(0,o.Rd)(),t="authorizationStateReady"===e||(0,a.ti)(!0);l(t)}),Math.max(0,1e3*n))}function h(){localStorage.removeItem(d)}},43858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h,z:()=>l});var r=n(69118),o=n(83716),a=n(77361);const i=a.wB&&f(),s=window.innerHeight;let d=l(),u=!1;const c=(0,r.P2)((()=>{d=l(),!u&&((d.width<=o.l3||d.width<=o.u_&&d.height<=o.rO)!==a.wB||a.wB&&i!==f())&&window.location.reload()}),250,!0);function l(){let e;e=a.cj?window.visualViewport.height+window.visualViewport.pageTop:window.innerHeight;const t=.01*e;return document.documentElement.style.setProperty("--vh",`${t}px`),{width:window.innerWidth,height:window.innerHeight}}function f(){return a.cj?window.matchMedia("(orientation: landscape)").matches:window.matchMedia("screen and (min-device-aspect-ratio: 1/1) and (orientation: landscape)").matches}window.addEventListener("orientationchange",c),a.cj?window.visualViewport.addEventListener("resize",c):window.addEventListener("resize",c);const h={get:()=>d,getIsKeyboardVisible:()=>s>d.height,disableRefresh:function(){u=!0},enableRefresh:function(){u=!1}}},15155:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r=new WeakMap;function o(e){return function(){let t=r.get(e);for(var n=arguments.length,o=new Array(n),a=0;a{self,e.exports=(()=>{var e={192:(e,t)=>{var n,r,o=function(){var e=function(e,t){var n=e,r=i[t],o=null,a=0,d=null,m=[],v={},b=function(e,t){o=function(e){for(var t=new Array(e),n=0;n=7&&S(e),null==d&&(d=M(n,r,m)),P(d,t)},w=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||a<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||a<=t+r||(o[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},I=function(){for(var e=8;e>r&1);o[Math.floor(r/3)][r%3+a-8-3]=i}for(r=0;r<18;r+=1)i=!e&&1==(t>>r&1),o[r%3+a-8-3][Math.floor(r/3)]=i},E=function(e,t){for(var n=r<<3|t,i=s.getBCHTypeInfo(n),d=0;d<15;d+=1){var u=!e&&1==(i>>d&1);d<6?o[d][8]=u:d<8?o[d+1][8]=u:o[a-15+d][8]=u}for(d=0;d<15;d+=1)u=!e&&1==(i>>d&1),d<8?o[8][a-d-1]=u:d<9?o[8][15-d-1+1]=u:o[8][15-d-1]=u;o[a-8][8]=!e},P=function(e,t){for(var n=-1,r=a-1,i=7,d=0,u=s.getMaskFunction(t),c=a-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var l=0;l<2;l+=1)if(null==o[r][c-l]){var f=!1;d>>i&1)),u(r,c-l)&&(f=!f),o[r][c-l]=f,-1==(i-=1)&&(d+=1,i=7)}if((r+=n)<0||a<=r){r-=n,n=-n;break}}},M=function(e,t,n){for(var r=c.getRSBlocks(e,t),o=l(),a=0;a8*d)throw"code length overflow. ("+o.getLengthInBits()+">"+8*d+")";for(o.getLengthInBits()+4<=8*d&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*d||(o.put(236,8),o.getLengthInBits()>=8*d));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,a=new Array(t.length),i=new Array(t.length),d=0;d=0?g.getAt(p):0}}var m=0;for(f=0;fr)&&(e=r,t=n)}return t}())},v.createTableTag=function(e,t){e=e||2;var n="";n+='',n+="";for(var r=0;r";for(var o=0;o';n+=""}return(n+="")+"
"},v.createSvgTag=function(e,t,n,r){var o={};"object"==typeof arguments[0]&&(e=(o=arguments[0]).cellSize,t=o.margin,n=o.alt,r=o.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var a,i,s,d,u=v.getModuleCount()*e+2*t,c="";for(d="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",c+=''+A(r.text)+"":"",c+=n.text?''+A(n.text)+"":"",c+='',c+='"},v.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=v.getModuleCount()*e+2*t,r=t,o=n-t;return y(n,n,(function(t,n){if(r<=t&&t"};var A=function(e){for(var t="",n=0;n":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=r}}return t};return v.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,o,a,i=1*v.getModuleCount()+2*e,s=e,d=i-e,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},c={"██":"▀","█ ":"▀"," █":" "," ":" "},l="";for(t=0;t=d?c[a]:u[a];l+="\n"}return i%2&&e>0?l.substring(0,l.length-i-1)+Array(i+1).join("▀"):l.substring(0,l.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,o,a,i=v.getModuleCount()*e+2*t,s=t,d=i-t,u=Array(e+1).join("██"),c=Array(e+1).join(" "),l="",f="";for(n=0;n>>8),t.push(255&i)):t.push(r)}}return t}};var t,n,r,o,a,i={L:1,M:0,Q:3,H:2},s=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,r=7973,a=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(o={}).getBCHTypeInfo=function(e){for(var t=e<<10;a(t)-a(n)>=0;)t^=n<=0;)t^=r<5&&(n+=3+a-5)}for(r=0;r=256;)t-=255;return e[t]}}}();function u(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n>>7-t%8&1)},put:function(e,t){for(var r=0;r>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},f=function(e){var t=e,n={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var n=t,o=0;o+2>>8&255)+(255&o),e.put(o,13),n+=2}if(n>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var o=0;o0&&(t+=","),t+=e[n];return t+"]"}};return t},v=function(e){var t=e,n=0,r=0,o=0,a={read:function(){for(;o<8;){if(n>=t.length){if(0==o)return-1;throw"unexpected end of file./"+o}var e=t.charAt(n);if(n+=1,"="==e)return o=0,-1;e.match(/^\s$/)||(r=r<<6|i(e.charCodeAt(0)),o+=6)}var a=r>>>o-8&255;return o-=8,a}},i=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return a},y=function(e,t,n){for(var r=function(e,t){var n=e,r=t,o=new Array(e*t),a={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=i(2);e.writeByte(2);for(var o=0;t.length-o>255;)e.writeByte(255),e.writeBytes(t,o,255),o+=255;e.writeByte(t.length-o),e.writeBytes(t,o,t.length-o),e.writeByte(0),e.writeString(";")}},i=function(e){for(var t=1<>>t!=0)throw"length over";for(;u+t>=8;)d.writeByte(255&(e<>>=8-u,c=0,u=0;c|=e<0&&d.writeByte(c)}});f.write(t,r);var h=0,g=String.fromCharCode(o[h]);for(h+=1;h=6;)a(e>>>t-6),t-=6},o.flush=function(){if(t>0&&(a(e<<6-t),e=0,t=0),n%3!=0)for(var o=3-n%3,i=0;i>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},void 0===(r="function"==typeof(n=function(){return o})?n.apply(t,[]):n)||(e.exports=r)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{"use strict";n.d(r,{default:()=>E});const e=e=>!!e&&"object"==typeof e&&!Array.isArray(e);function t(n,...r){if(!r.length)return n;const o=r.shift();return void 0!==o&&e(n)&&e(o)?(n=Object.assign({},n),Object.keys(o).forEach((r=>{const a=n[r],i=o[r];Array.isArray(a)&&Array.isArray(i)?n[r]=i:e(a)&&e(i)?n[r]=t(Object.assign({},a),i):n[r]=i})),t(n,...r)):n}function o(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function a(e){return new Promise((t=>{const n=new FileReader;n.onloadend=()=>t(n.result),n.readAsDataURL(e)}))}const i={L:.07,M:.15,Q:.25,H:.3};class s{constructor({svg:e,type:t}){this._svg=e,this._type=t}draw(e,t,n,r){let o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;default:o=this._drawSquare}o.call(this,{x:e,y:t,size:n,getNeighbor:r})}_rotateFigure({x:e,y:t,size:n,rotation:r=0,draw:o}){var a;const i=e+n/2,s=t+n/2;o(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*r/Math.PI},${i},${s})`)}_basicDot(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(n+t/2)),this._element.setAttribute("cy",String(r+t/2)),this._element.setAttribute("r",String(t/2))}}))}_basicSquare(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(n)),this._element.setAttribute("y",String(r)),this._element.setAttribute("width",String(t)),this._element.setAttribute("height",String(t))}}))}_basicSideRounded(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${n} ${r}v ${t}h `+t/2+`a ${t/2} ${t/2}, 0, 0, 0, 0 ${-t}`)}}))}_basicCornerRounded(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${n} ${r}v ${t}h ${t}v `+-t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${-t/2} ${-t/2}`)}}))}_basicCornerExtraRounded(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${n} ${r}v ${t}h ${t}a ${t} ${t}, 0, 0, 0, ${-t} ${-t}`)}}))}_basicCornersRounded(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${n} ${r}v `+t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${t/2} ${t/2}h `+t/2+"v "+-t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${-t/2} ${-t/2}`)}}))}_drawDot({x:e,y:t,size:n}){this._basicDot({x:e,y:t,size:n,rotation:0})}_drawSquare({x:e,y:t,size:n}){this._basicSquare({x:e,y:t,size:n,rotation:0})}_drawRounded({x:e,y:t,size:n,getNeighbor:r}){const o=r?+r(-1,0):0,a=r?+r(1,0):0,i=r?+r(0,-1):0,s=r?+r(0,1):0,d=o+a+i+s;if(0!==d)if(d>2||o&&a||i&&s)this._basicSquare({x:e,y:t,size:n,rotation:0});else{if(2===d){let r=0;return o&&i?r=Math.PI/2:i&&a?r=Math.PI:a&&s&&(r=-Math.PI/2),void this._basicCornerRounded({x:e,y:t,size:n,rotation:r})}if(1===d){let r=0;return i?r=Math.PI/2:a?r=Math.PI:s&&(r=-Math.PI/2),void this._basicSideRounded({x:e,y:t,size:n,rotation:r})}}else this._basicDot({x:e,y:t,size:n,rotation:0})}_drawExtraRounded({x:e,y:t,size:n,getNeighbor:r}){const o=r?+r(-1,0):0,a=r?+r(1,0):0,i=r?+r(0,-1):0,s=r?+r(0,1):0,d=o+a+i+s;if(0!==d)if(d>2||o&&a||i&&s)this._basicSquare({x:e,y:t,size:n,rotation:0});else{if(2===d){let r=0;return o&&i?r=Math.PI/2:i&&a?r=Math.PI:a&&s&&(r=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:t,size:n,rotation:r})}if(1===d){let r=0;return i?r=Math.PI/2:a?r=Math.PI:s&&(r=-Math.PI/2),void this._basicSideRounded({x:e,y:t,size:n,rotation:r})}}else this._basicDot({x:e,y:t,size:n,rotation:0})}_drawClassy({x:e,y:t,size:n,getNeighbor:r}){const o=r?+r(-1,0):0,a=r?+r(1,0):0,i=r?+r(0,-1):0,s=r?+r(0,1):0;0!==o+a+i+s?o||i?a||s?this._basicSquare({x:e,y:t,size:n,rotation:0}):this._basicCornerRounded({x:e,y:t,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:t,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:t,size:n,rotation:Math.PI/2})}_drawClassyRounded({x:e,y:t,size:n,getNeighbor:r}){const o=r?+r(-1,0):0,a=r?+r(1,0):0,i=r?+r(0,-1):0,s=r?+r(0,1):0;0!==o+a+i+s?o||i?a||s?this._basicSquare({x:e,y:t,size:n,rotation:0}):this._basicCornerExtraRounded({x:e,y:t,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:t,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:t,size:n,rotation:Math.PI/2})}}class d{constructor({svg:e,type:t}){this._svg=e,this._type=t}draw(e,t,n,r){let o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;default:o=this._drawDot}o.call(this,{x:e,y:t,size:n,rotation:r})}_rotateFigure({x:e,y:t,size:n,rotation:r=0,draw:o}){var a;const i=e+n/2,s=t+n/2;o(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*r/Math.PI},${i},${s})`)}_basicDot(e){const{size:t,x:n,y:r}=e,o=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${n+t/2} ${r}a ${t/2} ${t/2} 0 1 0 0.1 0zm 0 ${o}a ${t/2-o} ${t/2-o} 0 1 1 -0.1 0Z`)}}))}_basicSquare(e){const{size:t,x:n,y:r}=e,o=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${n} ${r}v ${t}h ${t}v `+-t+"z"+`M ${n+o} ${r+o}h `+(t-2*o)+"v "+(t-2*o)+"h "+(2*o-t)+"z")}}))}_basicExtraRounded(e){const{size:t,x:n,y:r}=e,o=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${n} ${r+2.5*o}v `+2*o+`a ${2.5*o} ${2.5*o}, 0, 0, 0, ${2.5*o} ${2.5*o}h `+2*o+`a ${2.5*o} ${2.5*o}, 0, 0, 0, ${2.5*o} ${2.5*-o}v `+-2*o+`a ${2.5*o} ${2.5*o}, 0, 0, 0, ${2.5*-o} ${2.5*-o}h `+-2*o+`a ${2.5*o} ${2.5*o}, 0, 0, 0, ${2.5*-o} ${2.5*o}`+`M ${n+2.5*o} ${r+o}h `+2*o+`a ${1.5*o} ${1.5*o}, 0, 0, 1, ${1.5*o} ${1.5*o}v `+2*o+`a ${1.5*o} ${1.5*o}, 0, 0, 1, ${1.5*-o} ${1.5*o}h `+-2*o+`a ${1.5*o} ${1.5*o}, 0, 0, 1, ${1.5*-o} ${1.5*-o}v `+-2*o+`a ${1.5*o} ${1.5*o}, 0, 0, 1, ${1.5*o} ${1.5*-o}`)}}))}_drawDot({x:e,y:t,size:n,rotation:r}){this._basicDot({x:e,y:t,size:n,rotation:r})}_drawSquare({x:e,y:t,size:n,rotation:r}){this._basicSquare({x:e,y:t,size:n,rotation:r})}_drawExtraRounded({x:e,y:t,size:n,rotation:r}){this._basicExtraRounded({x:e,y:t,size:n,rotation:r})}}class u{constructor({svg:e,type:t}){this._svg=e,this._type=t}draw(e,t,n,r){let o;o="square"===this._type?this._drawSquare:this._drawDot,o.call(this,{x:e,y:t,size:n,rotation:r})}_rotateFigure({x:e,y:t,size:n,rotation:r=0,draw:o}){var a;const i=e+n/2,s=t+n/2;o(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*r/Math.PI},${i},${s})`)}_basicDot(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(n+t/2)),this._element.setAttribute("cy",String(r+t/2)),this._element.setAttribute("r",String(t/2))}}))}_basicSquare(e){const{size:t,x:n,y:r}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(n)),this._element.setAttribute("y",String(r)),this._element.setAttribute("width",String(t)),this._element.setAttribute("height",String(t))}}))}_drawDot({x:e,y:t,size:n,rotation:r}){this._basicDot({x:e,y:t,size:n,rotation:r})}_drawSquare({x:e,y:t,size:n,rotation:r}){this._basicSquare({x:e,y:t,size:n,rotation:r})}}const c="circle";var l=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{d(r.next(e))}catch(e){a(e)}}function s(e){try{d(r.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}d((r=r.apply(e,t||[])).next())}))};const f=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],h=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class g{constructor(e){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=e}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}drawQR(e){return l(this,void 0,void 0,(function*(){const t=e.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,r=this._options.shape===c?n/Math.sqrt(2):n,o=Math.floor(r/t);let a={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=e,this._options.image){if(yield this.loadImage(),!this._image)return;const{imageOptions:e,qrOptions:n}=this._options,r=e.imageSize*i[n.errorCorrectionLevel],s=Math.floor(r*t*t),d=this._image instanceof SVGImageElement?this._image.width.baseVal.value:this._image.naturalWidth,u=this._image instanceof SVGImageElement?this._image.height.baseVal.value:this._image.naturalHeight;a=function({originalHeight:e,originalWidth:t,maxHiddenDots:n,maxHiddenAxisDots:r,dotSize:o}){const a={x:0,y:0},i={x:0,y:0};if(e<0||t<0||n<=0||o<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const s=e&&t?e/t:1;return a.x=Math.floor(Math.sqrt(n/s)),a.x<=0&&(a.x=1),r&&rn||r&&r{var r,o,i,s,d,u;return!(this._options.imageOptions.hideBackgroundDots&&e>=(t-a.hideXDots)/2&&e<(t+a.hideXDots)/2&&n>=(t-a.hideYDots)/2&&n<(t+a.hideYDots)/2||(null===(r=f[e])||void 0===r?void 0:r[n])||(null===(o=f[e-t+7])||void 0===o?void 0:o[n])||(null===(i=f[e])||void 0===i?void 0:i[n-t+7])||(null===(s=h[e])||void 0===s?void 0:s[n])||(null===(d=h[e-t+7])||void 0===d?void 0:d[n])||(null===(u=h[e])||void 0===u?void 0:u[n-t+7]))})),this.drawCorners(),this._options.image&&(yield this.drawImage({width:a.width,height:a.height,count:t,dotSize:o}))}))}drawBackground(){var e,t,n;const r=this._element,o=this._options;if(r){const r=null===(e=o.backgroundOptions)||void 0===e?void 0:e.gradient,a=null===(t=o.backgroundOptions)||void 0===t?void 0:t.color;if((r||a)&&this._createColor({options:r,color:a,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"background-color"}),null===(n=o.backgroundOptions)||void 0===n?void 0:n.round){const e=Math.min(o.width,o.height),t=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),t.setAttribute("x",String((o.width-e)/2)),t.setAttribute("y",String((o.height-e)/2)),t.setAttribute("width",String(e)),t.setAttribute("height",String(e)),t.setAttribute("rx",String(e/2*o.backgroundOptions.round)),this._backgroundClipPath.appendChild(t)}}}drawDots(e){var t,n;if(!this._qr)throw"QR code is not defined";const r=this._options,o=this._qr.getModuleCount();if(o>r.width||o>r.height)throw"The canvas is too small.";const a=Math.min(r.width,r.height)-2*r.margin,i=r.shape===c?a/Math.sqrt(2):a,d=Math.floor(i/o),u=Math.floor((r.width-o*d)/2),l=Math.floor((r.height-o*d)/2),f=new s({svg:this._element,type:r.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._dotsClipPath.style.transformOrigin="center",this._dotsClipPath.style.transform="rotate(90deg) scale(1, -1)",this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(t=r.dotsOptions)||void 0===t?void 0:t.gradient,color:r.dotsOptions.color,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"dot-color"});for(let t=0;t!(t+n<0||r+a<0||t+n>=o||r+a>=o)&&!(e&&!e(t+n,r+a))&&!!this._qr&&this._qr.isDark(t+n,r+a))),f._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(f._element));if(r.shape===c){const e=Math.floor((a/d-o)/2),t=o+2*e,n=u-e*d,r=l-e*d,i=[],s=Math.floor(t/2);for(let n=0;n=e-1&&n<=t-e&&r>=e-1&&r<=t-e||Math.sqrt((n-s)*(n-s)+(r-s)*(r-s))>s?i[n][r]=0:i[n][r]=this._qr.isDark(r-2*e<0?r:r>=o?r-2*e:r-e,n-2*e<0?n:n>=o?n-2*e:n-e)?1:0}for(let e=0;e{var r;return!!(null===(r=i[e+t])||void 0===r?void 0:r[o+n])})),f._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(f._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const e=this._element,t=this._options;if(!e)throw"Element code is not defined";const n=this._qr.getModuleCount(),r=Math.min(t.width,t.height)-2*t.margin,o=t.shape===c?r/Math.sqrt(2):r,a=Math.floor(o/n),i=7*a,l=3*a,g=Math.floor((t.width-n*a)/2),p=Math.floor((t.height-n*a)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((([e,r,o])=>{var c,m,v,y,b,w,I,C,S,E,P,M;const A=g+e*a*(n-7),k=p+r*a*(n-7);let _=this._dotsClipPath,N=this._dotsClipPath;if(((null===(c=t.cornersSquareOptions)||void 0===c?void 0:c.gradient)||(null===(m=t.cornersSquareOptions)||void 0===m?void 0:m.color))&&(_=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),_.setAttribute("id",`clip-path-corners-square-color-${e}-${r}`),this._defs.appendChild(_),this._cornersSquareClipPath=this._cornersDotClipPath=N=_,this._createColor({options:null===(v=t.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(y=t.cornersSquareOptions)||void 0===y?void 0:y.color,additionalRotation:o,x:A,y:k,height:i,width:i,name:`corners-square-color-${e}-${r}`})),null===(b=t.cornersSquareOptions)||void 0===b?void 0:b.type){const e=new d({svg:this._element,type:t.cornersSquareOptions.type});e.draw(A,k,i,o),e._element&&_&&_.appendChild(e._element)}else{const e=new s({svg:this._element,type:t.dotsOptions.type});for(let t=0;t{var o;return!!(null===(o=f[t+e])||void 0===o?void 0:o[n+r])})),e._element&&_&&_.appendChild(e._element))}if(((null===(I=t.cornersDotOptions)||void 0===I?void 0:I.gradient)||(null===(C=t.cornersDotOptions)||void 0===C?void 0:C.color))&&(N=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),N.setAttribute("id",`clip-path-corners-dot-color-${e}-${r}`),this._defs.appendChild(N),this._cornersDotClipPath=N,this._createColor({options:null===(S=t.cornersDotOptions)||void 0===S?void 0:S.gradient,color:null===(E=t.cornersDotOptions)||void 0===E?void 0:E.color,additionalRotation:o,x:A+2*a,y:k+2*a,height:l,width:l,name:`corners-dot-color-${e}-${r}`})),null===(P=t.cornersDotOptions)||void 0===P?void 0:P.type){const e=new u({svg:this._element,type:t.cornersDotOptions.type});e.draw(A+2*a,k+2*a,l,o),e._element&&N&&N.appendChild(e._element)}else{const e=new s({svg:this._element,type:t.dotsOptions.type});for(let t=0;t{var o;return!!(null===(o=h[t+e])||void 0===o?void 0:o[n+r])})),e._element&&N&&N.appendChild(e._element))}}))}loadImage(){return new Promise(((e,t)=>{const n=this._options,r=new Image;if(!n.image)return t("Image is not defined");"string"==typeof n.imageOptions.crossOrigin&&(r.crossOrigin=n.imageOptions.crossOrigin),this._image=r,r.onload=()=>{e()},r.src=n.image}))}drawImage({width:e,height:t,count:n,dotSize:r}){return l(this,void 0,void 0,(function*(){const o=this._options,i=Math.floor((o.width-n*r)/2),s=Math.floor((o.height-n*r)/2),d=i+o.imageOptions.margin+(n*r-e)/2,u=s+o.imageOptions.margin+(n*r-t)/2,c=e-2*o.imageOptions.margin,l=t-2*o.imageOptions.margin,f=document.createElementNS("http://www.w3.org/2000/svg","image");f.setAttribute("x",String(d)),f.setAttribute("y",String(u)),f.setAttribute("width",`${c}px`),f.setAttribute("height",`${l}px`);const h=yield function(e){return t=this,void 0,r=function*(){return fetch(e).then((e=>e.blob())).then(a)},new((n=void 0)||(n=Promise))((function(e,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function i(e){try{s(r.throw(e))}catch(e){o(e)}}function s(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,i)}s((r=r.apply(t,[])).next())}));var t,n,r}(o.image||"");f.setAttribute("href",h||""),this._element.appendChild(f)}))}_createColor({options:e,color:t,additionalRotation:n,x:r,y:o,height:a,width:i,name:s}){const d=i>a?i:a,u=document.createElementNS("http://www.w3.org/2000/svg","rect");if(u.setAttribute("x",String(r)),u.setAttribute("y",String(o)),u.setAttribute("height",String(a)),u.setAttribute("width",String(i)),u.setAttribute("clip-path",`url('#clip-path-${s}')`),e){let t;if("radial"===e.type)t=document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),t.setAttribute("id",s),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("fx",String(r+i/2)),t.setAttribute("fy",String(o+a/2)),t.setAttribute("cx",String(r+i/2)),t.setAttribute("cy",String(o+a/2)),t.setAttribute("r",String(d/2));else{const d=((e.rotation||0)+n)%(2*Math.PI),u=(d+2*Math.PI)%(2*Math.PI);let c=r+i/2,l=o+a/2,f=r+i/2,h=o+a/2;u>=0&&u<=.25*Math.PI||u>1.75*Math.PI&&u<=2*Math.PI?(c-=i/2,l-=a/2*Math.tan(d),f+=i/2,h+=a/2*Math.tan(d)):u>.25*Math.PI&&u<=.75*Math.PI?(l-=a/2,c-=i/2/Math.tan(d),h+=a/2,f+=i/2/Math.tan(d)):u>.75*Math.PI&&u<=1.25*Math.PI?(c+=i/2,l+=a/2*Math.tan(d),f-=i/2,h-=a/2*Math.tan(d)):u>1.25*Math.PI&&u<=1.75*Math.PI&&(l+=a/2,c+=i/2/Math.tan(d),h-=a/2,f-=i/2/Math.tan(d)),t=document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),t.setAttribute("id",s),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("x1",String(Math.round(c))),t.setAttribute("y1",String(Math.round(l))),t.setAttribute("x2",String(Math.round(f))),t.setAttribute("y2",String(Math.round(h)))}e.colorStops.forEach((({offset:e,color:n})=>{const r=document.createElementNS("http://www.w3.org/2000/svg","stop");r.setAttribute("offset",100*e+"%"),r.setAttribute("stop-color",n),t.appendChild(r)})),u.setAttribute("fill",`url('#${s}')`),this._defs.appendChild(t)}else t&&u.setAttribute("fill",t);this._element.appendChild(u)}}const p="canvas",m={};for(let e=0;e<=40;e++)m[e]=e;const v={type:p,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:m[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};function y(e){const t=Object.assign({},e);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map((e=>Object.assign(Object.assign({},e),{offset:Number(e.offset)}))),t}function b(e){const t=Object.assign({},e);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=Object.assign(Object.assign({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=Object.assign({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=y(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=Object.assign({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=y(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=Object.assign({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=y(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=Object.assign({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=y(t.backgroundOptions.gradient))),t}var w=n(192),I=n.n(w),C=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{d(r.next(e))}catch(e){a(e)}}function s(e){try{d(r.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}d((r=r.apply(e,t||[])).next())}))};class S{constructor(e){this._options=e?b(t(v,e)):v,this.update()}static _clearContainer(e){e&&(e.innerHTML="")}_setupSvg(){if(!this._qr)return;const e=new g(this._options);this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then((()=>{var t;this._svg&&(null===(t=this._extension)||void 0===t||t.call(this,e.getElement(),this._options))}))}_setupCanvas(){var e;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(e=this._svgDrawingPromise)||void 0===e?void 0:e.then((()=>{if(!this._svg)return;const e=this._svg,t=(new XMLSerializer).serializeToString(e),n="data:image/svg+xml;base64,"+btoa(t),r=new Image;return new Promise((e=>{r.onload=()=>{var t,n;null===(n=null===(t=this._canvas)||void 0===t?void 0:t.getContext("2d"))||void 0===n||n.drawImage(r,0,0),e()},r.src=n}))})))}_getElement(e="png"){return C(this,void 0,void 0,(function*(){if(!this._qr)throw"QR code is empty";return"svg"===e.toLowerCase()?(this._svg&&this._svgDrawingPromise||this._setupSvg(),yield this._svgDrawingPromise,this._svg):(this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),yield this._canvasDrawingPromise,this._canvas)}))}update(e){S._clearContainer(this._container),this._options=e?b(t(this._options,e)):this._options,this._options.data&&(this._qr=I()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===p?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._options.type===p?this._canvas&&e.appendChild(this._canvas):this._svg&&e.appendChild(this._svg),this._container=e}}applyExtension(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()}deleteExtension(){this._extension=void 0,this.update()}getRawData(e="png"){return C(this,void 0,void 0,(function*(){if(!this._qr)throw"QR code is empty";const t=yield this._getElement(e);if(!t)return null;if("svg"===e.toLowerCase()){const e=(new XMLSerializer).serializeToString(t);return new Blob(['\r\n'+e],{type:"image/svg+xml"})}return new Promise((n=>t.toBlob(n,`image/${e}`,1)))}))}download(e){return C(this,void 0,void 0,(function*(){if(!this._qr)throw"QR code is empty";let t="png",n="qr";"string"==typeof e?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(n=e.name),e.extension&&(t=e.extension));const r=yield this._getElement(t);if(r)if("svg"===t.toLowerCase()){let e=(new XMLSerializer).serializeToString(r);e='\r\n'+e,o("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),`${n}.svg`)}else o(r.toDataURL(`image/${t}`),`${n}.${t}`)}))}}const E=S})(),r.default})()},2092:(e,t,n)=>{"use strict";e.exports=n.p+"lock.f11661905df47960fa3e.png"}},s={};function d(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return i[e].call(n.exports,n,n.exports,d),n.exports}d.m=i,d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);d.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,d.d(o,a),o},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,n)=>(d.f[n](e,t),t)),[])),d.u=e=>e+"."+{67:"b87adfdac989dff54cd1",143:"e2c1115f073082dddbdf",154:"8c2ff697b6d4cafdb776",191:"1fa0f260d53e7abfe9ed",209:"ca4daa9ff624b3bf5614",212:"e663b8258cc54ba69359",244:"ae966e72f128eda340fc",256:"ff0f01bea01003a78a3c",370:"5addeb3fc94386c23602",483:"35b0f80df29ece6559a6",625:"c4bfccd5c44b3331f5a7",713:"894ffda65a82196537e1",730:"2e172af489ed6ff0e496",831:"f5c222cee9c1b1b68852",905:"60ca606f19ffdd6d94a4",958:"c56f02be3f4f5db2aedf",1098:"4a6d3970af492938a672",1142:"59a69270adc0978a6156",1161:"9bcab8bec6aedc27da89",1276:"07f8a81b011d56580ad6",1360:"1a681d99506a88d29942",1402:"35efd1623401c0a6ada2",1418:"a8ffdf6d23ac65ebfa95",1437:"53e04fe5063aee60d350",1514:"64267b1f36585be79543",1516:"da9e1bb1e960c0bc0077",1627:"c1c005ef2bed8d1b9561",1641:"d99075923e2b8c9e5f72",1699:"258d1e759822ec152b75",1752:"272d78459ec80c5b3dba",1879:"60ac065c7d88c4f46b54",1915:"c5b3f01035517153521f",1917:"2928ac2003a7061dc059",1933:"b2033cfa79d272a8fe62",1954:"d569fdd7ba86d9776a5c",1967:"3cec93c3a4dcd79e0488",1989:"0025e1e3daa2e03db755",2001:"8c68420c13854bbc24fe",2002:"8481843cd3d445486865",2054:"9c1890f62ccae40eeec2",2098:"890557cbbc0c46a9f08f",2137:"3af5405dff8273180346",2138:"fbfb10a62455b7b043b7",2243:"f82c54d3a849d4a487b4",2251:"2bf10b1f578543d75e54",2342:"f8d4331788cc89a2b694",2369:"d952921438994721f7d0",2390:"d7ecc2f228aef9b009e4",2537:"94c17bfafc8acf1a9cd2",2690:"4d73e3084ae3a2a6f64c",2741:"9f3aba6b2cd0b453f9a5",2767:"2121cd909c7aa572c7fd",2853:"c4ae910d407f42b72912",2892:"b8b8cd5c2b1df51e3492",2993:"46030e301a7e5eac5ca4",3041:"c6282dbe4f2e955c0940",3075:"9c2f4f4a3c19eb56b751",3076:"a7f6caf93b4b88180a6f",3098:"448b2ceaf9f37e849d7e",3108:"8f30bf9e3324a376f4ee",3124:"076a04e3a1b8d27db111",3147:"5a6cc01866d92675c748",3163:"6761cefaf572d1748946",3268:"7cace4f58c3fac9c74da",3280:"c61f120392215be6557a",3288:"4a69264995d9f806de13",3309:"620314c64d80c35257fc",3311:"2ff5c61aa4212045c410",3404:"70f366c6fa25f799e549",3408:"25202d3ff038f4194bd9",3411:"8f5d1095651d61b8f424",3420:"3a5367f73895e3c3c1f4",3472:"615d222fdc0dcfa591d8",3488:"54332bf5929df0077432",3505:"58e185c3b757b41576a2",3539:"498df8847f9f9d5a0937",3585:"3853a59a7d0336a03fde",3588:"d6cc0e28e0d962d3157c",3656:"279c48ec3d47a9000fa9",3698:"3541c155e1b629af7d33",3779:"4d6bd41f17d13e8a84a9",3800:"96da4150cdeeba708556",3848:"ee699a3ab25cc6ca726d",3863:"d5fde682a12d7aa54672",3866:"df9f4de3c91bbda53861",3881:"8521d06f92c7b8b273ce",3894:"9ec589a8d0b8850ef326",3936:"a3325e628347fac10d84",3966:"097d0a2dd03e55cf7c46",4037:"af37477886b6cfd1194e",4039:"bcd470032085a33ee54b",4231:"d59a6f0c70fb98d4bcf0",4276:"9240959928e16f250f8f",4303:"58ff7d91e35a9b3c2756",4314:"0d8ed2badacc96e873cb",4334:"e493d976600a04c160e4",4408:"0fb28033cf23ddbc23a6",4484:"ba496a0faf977e32f6ef",4536:"acd06cb972eebae2e5e4",4566:"5eb1a1b10803fa99c22d",4569:"385b6cf4a46b7115c2db",4646:"7ebe551cdd0f4b9c9e92",4685:"88d39506fe34588ed78d",4686:"125b32545c1a0a0d5d3e",4710:"0a0b5e901cf0b5d6fd93",4713:"4c9628f9719b8f99bdfc",4723:"38c6e4a29e0fdfa7afa8",4747:"a51da29105f71545b275",4753:"17105da93bd7006f8573",4835:"0964f1a24a6398e35c12",4838:"71c5c5739a3ed2bad3ee",4850:"bc9242dc125cb10484bc",4933:"c0f777add150aed6dd31",4973:"9e1f1935e024e1bf929d",4986:"962334f1a027906974fd",5040:"99ef443d75bf87559776",5060:"7cd173e6b1393947bb3b",5066:"d9d0cb326f6f7d743f3a",5099:"655521533cb48ebec54c",5119:"090f02fee771b8f5e65c",5204:"55dc1f02973adc8b29ab",5239:"73400cf76a319169f599",5246:"32626d81771d640604dd",5281:"0b7b900d2540db49ae8f",5297:"01b37c1c033b4b7c5732",5309:"ba1a5dde297758458683",5344:"5c9eaedbce0a63ae3e63",5368:"892f890338957f00fc23",5386:"9f0180dc5c168ff288bf",5434:"249f262bbc62d09db4f0",5474:"aedf972792d2c11b7940",5588:"56e673e74137435b5023",5603:"0302646e1ffabe87d525",5699:"78a750acf4e0fff43bde",5745:"53fc0ce876a7dce21370",5769:"b79cb7f201c2caabed11",5855:"c34458d02e95d2ec3d71",5930:"9dcde09591068799ffc3",5993:"7a57e87ff9a577929387",5999:"3b1c15d4285915dddc03",6052:"ca3c1bee89e20d16318d",6146:"e892062054e79d879e6b",6220:"4626eab605f1f3f5fae7",6284:"412fe22eb5e792b8236b",6297:"a40c32123d663a5d397e",6346:"3a08cef57225b5dd0723",6401:"65204bd5a1f1d34e1fdc",6483:"49cb2949d98e5010ceff",6548:"6abe878180ff54087f58",6642:"765cb88c978f7f6366d8",6688:"a5a6ef9c1044e440d8aa",6770:"260c086c5e5b2e226e40",6798:"a48f1b663374c1fcdf24",6889:"94df7712273c4f61ab30",6892:"1bf37b40183987140fc9",6931:"5d8b023307c7a880a8f1",6941:"7a0e1012e31f72681952",6969:"d2b2e882f924d7d5e877",6972:"45d9b899b7178fdb92c1",7049:"6f2636c871a83f167b6e",7052:"d8a4a1431f93b64b9a87",7119:"03b2ee63b97712464a63",7125:"57c858da5d4ff67e8141",7316:"2a3dfa1eba460895cf64",7388:"7bec01a290d868ba2d42",7501:"9f45796679951ac21293",7551:"6e574d5a75cf073215df",7556:"701477404ee235a07786",7794:"5d3eabab5ee771b3e859",7799:"690560cf65f3d985dde5",7897:"01558917b3d0fc1d388f",7916:"8f0854e45a011f6c9f3c",7941:"77c1fdd28946c8a30daa",7963:"8b010994867f46020df9",8063:"627d5ae10e2e502e9e38",8090:"5de28988b3c3b42fb17f",8138:"9b29a768a035996247bd",8208:"9a2d0eeec5f8bb07cdd3",8294:"12b38bd567e102c27c8e",8369:"c6ae120b122d07384b7d",8401:"a8ba266b7a79ef7dfe1d",8435:"5f667e46d196564970b9",8505:"f588195fa145445de93b",8530:"a4d7f28c015d01eaf776",8663:"3215036b0069a8dcc16e",8709:"51c7b7103b230d767ea7",8812:"a39ba81372544f20ba3f",8815:"fd39d74554c793313d5b",8822:"3e199b60162d8b8314aa",8878:"a7b117d54d54258e5f26",8913:"1773658335e9a4527e40",9071:"c587e7d4b0df5f41a587",9125:"221d966328061801dce3",9223:"b65193470f36938b0d9b",9227:"c34f2b1661736507d402",9285:"3aedc94598376aee9274",9328:"545adb935b7615fd8d16",9338:"cf9b08f5551ab6096a70",9375:"40298b58e46ff66877d6",9379:"5f47d04a09f26df77d30",9400:"9f2f9a821c3a64e5473d",9486:"66f6169ec02590019bbf",9535:"35b32969dfafdbc17a45",9536:"52b3efcf5de741667a33",9565:"05a813d6f1c60da0196b",9606:"f9fa653821fc0f019fad",9623:"a319f64448a91c662f4d",9635:"01582125f331f7f89adb",9641:"8b340949ffd52cb38c60",9657:"376f100fba6d94cfca1b",9682:"730455c56a4729444e9d",9783:"6fb3455cb9b01926cb10",9822:"ec3817f08021427f5550",9954:"f39b7b0520721eeabe09",9970:"964e193d8151fd02d513"}[e]+".js",d.miniCssF=e=>(({3041:"BundleAuth",3779:"BundleExtra",5769:"BundleMain",9954:"BundleCalls"}[e]||e)+"."+{3041:"c6282dbe4f2e955c0940",3472:"615d222fdc0dcfa591d8",3779:"4d6bd41f17d13e8a84a9",5769:"b79cb7f201c2caabed11",7916:"8f0854e45a011f6c9f3c",8878:"a7b117d54d54258e5f26",9954:"f39b7b0520721eeabe09"}[e]+".css"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="telegram-t:",d.l=(e,t,o,a)=>{if(n[e])n[e].push(t);else{var i,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c{i.onerror=i.onload=null,clearTimeout(h);var o=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(r))),t)return t(r)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var t=d.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),o=e=>new Promise(((t,n)=>{var r=d.miniCssF(e),o=d.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=a=>{if(o.onerror=o.onload=null,"load"===a.type)n();else{var i=a&&("load"===a.type?"missing":a.type),s=a&&a.target&&a.target.href||t,d=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");d.code="CSS_CHUNK_LOAD_FAILED",d.type=i,d.request=s,o.parentNode.removeChild(o),r(d)}},o.href=t,document.head.appendChild(o)})(e,o,t,n)})),a={179:0},d.f.miniCss=(e,t)=>{a[e]?t.push(a[e]):0!==a[e]&&{3041:1,3472:1,3779:1,5769:1,7916:1,8878:1,9954:1}[e]&&t.push(a[e]=o(e).then((()=>{a[e]=0}),(t=>{throw delete a[e],t})))},(()=>{d.b=document.baseURI||self.location.href;var e={179:0};d.f.j=(t,n)=>{var r=d.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var a=d.p+d.u(t),i=new Error;d.l(a,(n=>{if(d.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,r[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,i,s]=n,u=0;if(a.some((t=>0!==e[t]))){for(r in i)d.o(i,r)&&(d.m[r]=i[r]);s&&s(d)}for(t&&t(n);u{"use strict";d(33592);var e=d(83716),t=d(33555),n=d(77361),r=d(28406);function o(n){const o=n.data;if(e.ZT&&console.log("[SW] Message from worker",o),!o.type)return;const a=(0,t.Sv)(),i=o.payload;switch(o.type){case"focusMessage":a.focusMessage&&a.focusMessage(i);break;case"playNotificationSound":(0,r.Nz)(o.payload.id)}}function a(){navigator.serviceWorker.removeEventListener("message",o),navigator.serviceWorker.addEventListener("message",o),(0,r.KC)()}n.Mc&&(window.addEventListener("load",(async()=>{try{if(!navigator.serviceWorker.controller){const t=await navigator.serviceWorker.getRegistrations();t.length&&(e.eM&&console.log("[SW] Hard reload detected, re-enabling Service Worker"),await Promise.all(t.map((e=>e.unregister()))))}await navigator.serviceWorker.register(new URL(d.p+d.u(1516),d.b)),e.eM&&console.log("[SW] ServiceWorker registered"),await navigator.serviceWorker.ready,navigator.serviceWorker.controller?(e.eM&&console.log("[SW] ServiceWorker ready"),a()):(e.eM&&console.error("[SW] ServiceWorker not available"),n.cj||n.wZ||e.Cg||(0,t.Sv)().showDialog({data:{message:"SERVICE_WORKER_DISABLED",hasErrorKey:!0}}))}catch(t){e.eM&&console.error("[SW] ServiceWorker registration failed: ",t)}})),window.addEventListener("focus",(async()=>{await navigator.serviceWorker.ready,a()})));var i=d(14050),s=d(31664),u=d(36046),c=d(35369),l=d(5872),f=d(60782),h=d(5161),g=d(3100);(0,l.QS)(),(0,t.iw)("init",(()=>{const t=(0,f.Xh)(c.Y);let n=(0,l.J9)(t)||t;e.Nu&&(n.authState="authorizationStateReady");const{hasPasscode:r,isScreenLocked:o}=n.passcode;return r&&!o&&(n=(0,h.vu)(n,{isScreenLocked:!0}),(0,g.jv)()),n}));var p=d(43858);const m="tt-active-tab",v=String(Date.now()+Math.random());let y;localStorage.setItem(m,v);const b=window.setInterval((()=>{y&&localStorage.getItem(m)!==v&&(y(),clearInterval(b))}),2e3);var w=d(46752),I=d(60706),C=d(87204),S=(d(89005),d(73456),d(65456),d(51371),d(28304),d(46590)),E=d(18360);const P=d.p+"monkey.a3d5fcdc50b18dc55695.svg";var M=d(71394);const A=["400 1em Roboto","500 1em Roboto"];function k(){if("fonts"in document)return Promise.all(A.map((e=>document.fonts.load(e))))}var _=d(6272),N=d(50711),T=d(59107);const x=(e,t)=>{const[n,r]=(0,i.eJ)();return e&&N.Pn(e,t).then(r),n};function L(){let e=navigator.language;return e&&"pt-br"!==e&&(e=e.substr(0,2)),e}var O=d(231),B=d(14605),R=d(97687),D=d(34288),$=d(85765),F=d(32340),Z=d(34284),U=d(29290),j=d(53106),W=d(58964),V=d(49204);const z=200+e.fK,H=(0,i.X$)((0,t.c$)((e=>{const{countryList:{phoneCodes:t}}=e;return{phoneCodeList:t}}))((e=>{let{id:t,value:n,isLoading:r,onChange:o,phoneCodeList:a}=e;const s=(0,T.Z)(),d=(0,i.sO)(null),[u,c]=(0,i.eJ)(),[l,f]=(0,i.eJ)([]),h=(0,i.I4)((e=>{c(e),f(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t.length)return e;const n=(0,$.W)(t);return e.filter((e=>n(e.defaultName)||e.name&&n(e.name)))}(a,e))}),[a]);(0,U.Z)((e=>{let[t]=e;0===(null==t?void 0:t.length)&&a.length>0&&h(u)}),[a,h]);const g=(0,i.I4)((e=>{o(e),setTimeout((()=>h(void 0)),z)}),[o,h]),p=(0,i.I4)((e=>{h(e.currentTarget.value)}),[h]),m=(0,i.I4)((e=>{if(8!==e.keyCode)return;const t=e.currentTarget;n&&void 0===u&&(t.value=""),h(t.value)}),[u,h,n]),v=(0,i.I4)((e=>{let{onTrigger:o,isOpen:a}=e;const c=()=>{if(a)return;setTimeout((()=>{d.current.select()}),50),o();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},l=null!=u?u:(null==n?void 0:n.name)||(null==n?void 0:n.defaultName)||"";return i.ZP.createElement("div",{className:(0,w.Z)("input-group",n&&"touched")},i.ZP.createElement("input",{ref:d,className:(0,w.Z)("form-control",a&&"focus"),type:"text",id:t,value:l,autoComplete:"off",onClick:c,onFocus:c,onInput:e=>{p(e),c()},onKeyDown:m}),i.ZP.createElement("label",null,s("Login.SelectCountry.Title")),r?i.ZP.createElement(V.Z,{color:"black"}):i.ZP.createElement("i",{onClick:c,className:(0,w.Z)("css-icon-down",a&&"open")}))}),[u,p,m,t,r,s,n]);return i.ZP.createElement(j.Z,{className:"CountryCodeInput",trigger:v},l.map((e=>i.ZP.createElement(W.Z,{key:`${e.iso2}-${e.countryCode}`,className:n&&e.iso2===n.iso2?"selected":"",onClick:()=>g(e)},i.ZP.createElement("span",{className:"country-flag"},(0,F.Z)((0,Z.Wg)(e.iso2),["hq_emoji"])),i.ZP.createElement("span",{className:"country-name"},e.name||e.defaultName),i.ZP.createElement("span",{className:"country-code"},"+",e.countryCode)))),!l.length&&i.ZP.createElement(W.Z,{key:"no-results",className:"no-results",disabled:!0},i.ZP.createElement("span",null,s("lng_country_none"))))})));let G=!1;const q=(0,i.X$)((0,t.c$)((e=>{const{settings:{byKey:{language:t}},countryList:{phoneCodes:n}}=e;return{...(0,f.ei)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),language:t,phoneCodeList:n}}))((e=>{let{connectionState:r,authState:o,authPhoneNumber:a,authIsLoading:s,authIsLoadingQrCode:d,authError:u,authRememberMe:c,authNearestCountry:l,phoneCodeList:f,language:h}=e;const{setAuthPhoneNumber:g,setAuthRememberMe:p,loadNearestCountry:m,loadCountryList:v,clearAuthError:y,goToAuthQrCode:b,setSettingOption:w}=(0,t.Sv)(),C=(0,T.Z)(),S=(0,i.sO)(null),E=L(),A=x(E,"ContinueOnThisLanguage"),[$,F]=(0,i.eJ)(),[Z,U]=(0,i.eJ)(),[j,W]=(0,i.eJ)(!1),[V,z]=(0,i.eJ)(),[q,K,J]=(0,I.Z)(),Y=$?`+${$.countryCode} ${Z||""}`:Z,X=Y&&Y.replace(/[^\d]+/g,"").length>=7;(0,i.d4)((()=>{n.$b||S.current.focus()}),[$]),(0,i.d4)((()=>{"connectionStateReady"!==r||l||m()}),[r,l,m]),(0,i.d4)((()=>{"connectionStateReady"===r&&v({langCode:h})}),[r,h,v]),(0,i.d4)((()=>{l&&f&&!$&&!j&&F((0,_.U9)(f,l)[0])}),[$,l,j,f]);const Q=(0,i.I4)((e=>{e.length||U("");const t=f&&(0,_.g3)(f,e),n=!$||t&&t.iso2!==$.iso2||!t&&e.length?t:$;(!$||!n||n&&n.iso2!==$.iso2)&&F(n),U((0,_.un)(e,n))}),[f,$]),ee=(0,i.I4)((()=>{K(),(0,N.m0)(E,(()=>{J(),w({language:E})}))}),[K,w,E,J]);(0,i.d4)((()=>{void 0===Z&&a&&Q(a)}),[a,Z,Q]),(0,i.bt)((()=>{S.current&&V&&S.current.setSelectionRange(...V)}),[V]);const te=(0,i.sO)(!1),ne=(0,i.I4)((()=>{te.current=!0,requestAnimationFrame((()=>{te.current=!1}))}),[]),re=(0,i.I4)((e=>{F(e),U("")}),[]),oe=(0,i.I4)((e=>{u&&y(),G||(G=!0,k(),(0,M.pt)(P));const{value:t,selectionStart:r,selectionEnd:o}=e.target;z(r&&o&&o1&&!te.current;Q(a?`${$.countryCode} ${t}`:t)}),[u,y,$,Y,Q]),ae=(0,i.I4)((e=>{p(e.target.checked)}),[p]),ie="authorizationStateWaitPhoneNumber"===o;return i.ZP.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},i.ZP.createElement("div",{className:"auth-form"},i.ZP.createElement("div",{id:"logo"}),i.ZP.createElement("h1",null,"Telegram"),i.ZP.createElement("p",{className:"note"},C("StartText")),i.ZP.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),s||X&&g({phoneNumber:Y})}},i.ZP.createElement(H,{id:"sign-in-phone-code",value:$,isLoading:!l&&!$,onChange:re}),i.ZP.createElement(R.Z,{ref:S,id:"sign-in-phone-number",label:C("Login.PhonePlaceholder"),value:Y,error:u&&C(u),inputMode:"tel",onChange:oe,onPaste:n.s$?ne:void 0}),i.ZP.createElement(B.Z,{id:"sign-in-keep-session",label:"Keep me signed in",checked:Boolean(c),onChange:ae}),X&&(ie?i.ZP.createElement(O.Z,{type:"submit",ripple:!0,isLoading:s},C("Login.Next")):i.ZP.createElement(D.Z,null)),ie&&i.ZP.createElement(O.Z,{isText:!0,ripple:!0,isLoading:d,onClick:b},C("Login.QR.Login")),E&&E!==h&&A&&i.ZP.createElement(O.Z,{isText:!0,isLoading:q,onClick:ee},A))))})));var K=d(99203),J=d(48778);const Y=(0,i.X$)((()=>{const e=(0,J.Z)(K.gl.Auth,"AuthCode");return e?i.ZP.createElement(e,null):i.ZP.createElement(D.Z,null)})),X=(0,i.X$)((()=>{const e=(0,J.Z)(K.gl.Auth,"AuthPassword");return e?i.ZP.createElement(e,null):i.ZP.createElement(D.Z,null)})),Q=(0,i.X$)((()=>{const e=(0,J.Z)(K.gl.Auth,"AuthRegister");return e?i.ZP.createElement(e,null):i.ZP.createElement(D.Z,null)}));var ee=d(91915),te=d.n(ee),ne=d(13365),re=d(70692);const oe=d.p+"blank.8dd283bceccca95a48d8.png";var ae=d(58912);const ie=new(te())({width:280,height:280,image:oe,margin:10,type:"svg",dotsOptions:{type:"rounded"},cornersSquareOptions:{type:"extra-rounded"},imageOptions:{imageSize:.4,margin:8},qrOptions:{errorCorrectionLevel:"M"}}),se=(0,i.X$)((0,t.c$)((e=>{const{connectionState:t,authState:n,authQrCode:r,settings:{byKey:{language:o}}}=e;return{connectionState:t,authState:n,authQrCode:r,language:o}}))((n=>{let{connectionState:r,authState:o,authQrCode:a,language:s}=n;const{returnToAuthPhoneNumber:d,setSettingOption:u}=(0,t.Sv)(),c=L(),l=(0,T.Z)(),f=(0,i.sO)(null),h=x(c,"ContinueOnThisLanguage"),[g,p,m]=(0,I.Z)(),[v,y,b]=(0,I.Z)(),C=(0,re.Z)(v);(0,i.d4)((()=>{if(!a)return()=>{b()};if("connectionStateReady"!==r)return;const e=f.current,t=`tg://login?token=${a.token}`;ie.update({data:t}),v||(ie.append(e),y())}),[r,a,v,y,b]),(0,i.d4)((()=>{"connectionStateReady"===r&&(0,N.m0)(e.sR)}),[r]);const S=(0,i.I4)((()=>{p(),(0,N.m0)(c,(()=>{m(),u({language:c})}))}),[p,u,c,m]),E="authorizationStateWaitQrCode"===o;return i.ZP.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},i.ZP.createElement("div",{className:"auth-form qr"},i.ZP.createElement("div",{className:"qr-outer"},i.ZP.createElement("div",{className:(0,w.Z)("qr-inner",C),key:"qr-inner"},i.ZP.createElement("div",{key:"qr-container",className:"qr-container",ref:f,style:"width: 280px; height: 280px"}),i.ZP.createElement(ae.Z,{tgsUrl:ne.l.QrPlane,size:54,className:"qr-plane",nonInteractive:!0,noLoop:!1})),!v&&i.ZP.createElement("div",{className:"qr-loading"},i.ZP.createElement(D.Z,null))),i.ZP.createElement("h1",null,l("Login.QR.Title")),i.ZP.createElement("ol",null,i.ZP.createElement("li",null,i.ZP.createElement("span",null,l("Login.QR.Help1"))),i.ZP.createElement("li",null,i.ZP.createElement("span",null,(0,F.Z)(l("Login.QR2.Help2"),["simple_markdown"]))),i.ZP.createElement("li",null,i.ZP.createElement("span",null,l("Login.QR.Help3")))),E&&i.ZP.createElement(O.Z,{isText:!0,onClick:d},l("Login.QR.Cancel")),c&&c!==s&&h&&i.ZP.createElement(O.Z,{isText:!0,isLoading:g,onClick:S},h)))}))),de=(0,i.X$)((0,t.c$)((e=>(0,f.ei)(e,["authState"])))((e=>{let{isActive:r,authState:o}=e;const{reset:a,initApi:s,returnToAuthPhoneNumber:d,goToAuthQrCode:u}=(0,t.Sv)();(0,i.d4)((()=>{r&&(a(),s())}),[r,a,s]);const c="iOS"===n.Lt||"Android"===n.Lt;switch((0,S.Z)({isActive:!c&&"authorizationStateWaitPhoneNumber"===o||c&&"authorizationStateWaitQrCode"===o,onBack:()=>{c?d():u()}}),(0,i.d4)((()=>(p.Z.disableRefresh(),()=>{p.Z.enableRefresh()})),[]),(0,E.Z)("authorizationStateReady"!==o?o:void 0,!0)){case"authorizationStateWaitCode":return i.ZP.createElement(Y,null);case"authorizationStateWaitPassword":return i.ZP.createElement(X,null);case"authorizationStateWaitRegistration":return i.ZP.createElement(Q,null);case"authorizationStateWaitPhoneNumber":return i.ZP.createElement(q,null);case"authorizationStateWaitQrCode":return i.ZP.createElement(se,null);default:return c?i.ZP.createElement(q,null):i.ZP.createElement(se,null)}}))),ue=(0,i.X$)((()=>{const e=(0,J.Z)(K.gl.Main,"Main");return e?i.ZP.createElement(e,null):void 0})),ce=(0,i.X$)((e=>{const{isLocked:t}=e,n=(0,J.Z)(K.gl.Main,"LockScreen",!t);return n?i.ZP.createElement(n,e):void 0})),le=d.p+"app-inactive.da3925145f0a7111c0f1.png",fe=()=>{const e=(0,i.I4)((()=>{window.location.reload()}),[]);return i.ZP.createElement("div",{id:"AppInactive"},i.ZP.createElement("div",{className:"content"},i.ZP.createElement("img",{src:le,alt:""}),i.ZP.createElement("h3",{className:"title"},"Such error, many tabs"),i.ZP.createElement("div",{className:"description"},"Telegram supports only one active tab with the app.",i.ZP.createElement("br",null),"Please reload this page to continue using this tab or close it."),i.ZP.createElement("div",{className:"actions"},i.ZP.createElement(O.Z,{isText:!0,ripple:!0,onClick:e},"Reload app"))))};var he=d(2255),ge=d(6137),pe=d(22825),me=d(11192),ve=d(31212),ye=d(69118),be=d(40647);const we=d.p+"telegram-logo.1b2bb5b107f046ea9325.svg",Ie=d.p+"reaction-thumbs.055e95b0046e542feaa8.png",Ce=d.p+"reaction-thumbs-premium.90a93ca72212c7039b46.png";var Se=d(2092);function Ee(){const{listIds:e,byId:n}=(0,t.Rd)().chats;if(e.active)return Promise.all(e.active.slice(0,10).map((e=>{const t=n[e];if(!t)return;const r=(0,pe.RT)(t);return r?be.he(r,ge.IU.BlobUrl):void 0})))}const Pe={main:e=>Promise.all([(0,K.$y)(K.gl.Main,"Main").then(k),Ee(),(0,M.pt)(e?Ce:Ie)]),authPhoneNumber:()=>Promise.all([k(),(0,M.pt)(we)]),authCode:()=>(0,M.pt)(P),authPassword:()=>(0,M.pt)(P),authQrCode:k,lock:()=>Promise.all([k(),(0,M.pt)(Se)])},Me=(0,t.c$)((e=>{const t=(0,me.Pu)(e);return{shouldSkipHistoryAnimations:e.shouldSkipHistoryAnimations,uiReadyState:e.uiReadyState,isRightColumnShown:(0,me.Jf)(e),leftColumnWidth:e.leftColumnWidth,theme:t,isCurrentUserPremium:(0,me.wV)(e)}}))((n=>{let{page:r,children:o,isRightColumnShown:a,shouldSkipHistoryAnimations:s,leftColumnWidth:d,theme:u,isCurrentUserPremium:c}=n;const{setIsUiReady:l}=(0,t.Sv)(),[f,h]=(0,I.Z)(),{shouldRender:g,transitionClassNames:p}=(0,ve.Z)(!f,void 0,!0);return(0,i.d4)((()=>{let e;return Promise.race([(0,ye.wO)(700),r?(async()=>{try{await Pe[r](c)}catch(e){}})():Promise.resolve()]).then((()=>{h(),l({uiReadyState:1}),e=window.setTimeout((()=>{l({uiReadyState:2})}),1e3)})),()=>{e&&(clearTimeout(e),e=void 0),l({uiReadyState:0})}}),[]),i.ZP.createElement("div",{id:"UiLoader",className:"aKlI8dMOx5QqHb2eTwiM",style:`--theme-background-color: ${"dark"===u?e.It:e.p3}`},o,g&&!s&&Boolean(r)&&i.ZP.createElement("div",{className:(0,w.Z)("dDIGwEoHlINzvf7LzGwy",p)},"main"===r?i.ZP.createElement(i.ZP.Fragment,null,i.ZP.createElement("div",{className:"s_eiw3FJDNGVyMHHEr_w",style:d?`width: ${d}px`:void 0}),i.ZP.createElement("div",{className:(0,w.Z)("v5WSHYkqrlK9GvmSI1zN",p)}),a&&i.ZP.createElement("div",{className:"BlQSOI0qSg9HDzgQGwdw"})):i.ZP.createElement("div",{className:"J5QD898gcautir6pK9xA"})))}));var Ae;!function(e){e[e.auth=0]="auth",e[e.lock=1]="lock",e[e.main=2]="main",e[e.inactive=3]="inactive"}(Ae||(Ae={}));const ke=(0,t.c$)((e=>{var t,n;return{authState:e.authState,isScreenLocked:null===(t=e.passcode)||void 0===t?void 0:t.isScreenLocked,hasPasscode:null===(n=e.passcode)||void 0===n?void 0:n.hasPasscode}}))((r=>{let{authState:o,isScreenLocked:a,hasPasscode:s}=r;const{disconnect:d}=(0,t.Sv)(),[u,c]=(0,I.Z)(!1),l="iOS"===n.Lt||"Android"===n.Lt;let f,h;if((0,i.d4)((()=>{(0,p.z)(),y=()=>{d(),document.title=`${e.Ti}${e.ou}`,c()}}),[d,c]),(0,i.d4)((()=>{const e=document.body,t=e=>{e.preventDefault(),e.dataTransfer&&(e.target.dataset.dropzone?e.dataTransfer.dropEffect="copy":e.dataTransfer.dropEffect="none")},n=e=>{e.preventDefault()};return e.addEventListener("drop",n),e.addEventListener("dragover",t),e.addEventListener("dragenter",t),()=>{e.removeEventListener("drop",n),e.removeEventListener("dragover",t),e.removeEventListener("dragenter",t)}}),[]),u)f=Ae.inactive;else if(a)h="lock",f=Ae.lock;else if(o)switch(o){case"authorizationStateWaitPhoneNumber":h="authPhoneNumber",f=Ae.auth;break;case"authorizationStateWaitCode":h="authCode",f=Ae.auth;break;case"authorizationStateWaitPassword":h="authPassword",f=Ae.auth;break;case"authorizationStateWaitRegistration":f=Ae.auth;break;case"authorizationStateWaitQrCode":h="authQrCode",f=Ae.auth;break;case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":h="main",f=Ae.main}else(0,g.ti)(!0)?(h="main",f=Ae.main):s?f=Ae.lock:(h=l?"authPhoneNumber":"authQrCode",f=Ae.auth);const m=(0,C.Z)(f);function v(e){switch(f){case Ae.auth:return i.ZP.createElement(de,{isActive:e});case Ae.main:return i.ZP.createElement(ue,null);case Ae.lock:return i.ZP.createElement(ce,{isLocked:a});case Ae.inactive:return i.ZP.createElement(fe,null)}}return i.ZP.createElement(Me,{key:"Loader",page:h},i.ZP.createElement(he.Z,{name:"fade",activeKey:f,shouldCleanup:!0,className:(0,w.Z)("full-height",(f===Ae.auth||m===Ae.auth)&&"is-auth")},v))}));e.eM&&console.log(">>> INIT"),n.EA&&(0,u.e)(),(0,t.Sv)().init(),e.eM&&console.log(">>> START INITIAL RENDER"),function(){const t=document.getElementById("the-manifest-placeholder");if(!t)return;const r=`site${n.jm?"_apple":""}${e.eM?"_dev":""}.webmanifest`;t.setAttribute("href",r)}(),s.Z.render(i.ZP.createElement(ke,null),document.getElementById("root")),e.eM&&console.log(">>> FINISH INITIAL RENDER"),e.eM&&document.addEventListener("dblclick",(()=>{console.warn("GLOBAL STATE",(0,t.Rd)())}))})()})(); //# sourceMappingURL=main.fea46d371c68d7d09599.js.map