tweb/public/main.829169e8a1e43b09c37f.b...

2 lines
12 KiB
JavaScript

!function(e){function t(t){for(var n,i,a=t[0],r=t[1],c=0,u=[];c<a.length;c++)i=a[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&u.push(o[i][0]),o[i]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(s&&s(t);u.length;)u.shift()()}var n={},o={10:0};function i(e){return a.p+""+({11:"npm.qr-code-styling"}[e]||e)+"."+{0:"2a4f4fc8429a146c36f1",1:"089c0c09ede981685ddf",2:"b7f6240317a9b5aa3720",3:"688cb1f6ce39c942ab37",4:"bb73e9e3036c006d762e",5:"b8cacf00b85c3288e698",6:"77d0690099bec1ee0f68",7:"4571e7886d6d546fae7b",8:"a077562e9b0a6f165898",9:"29682d51364d4b10884e",11:"e6c8c9bc70edf802150c",12:"ce49b9cff027f99f39f9",13:"3f18918f8b44b841a28e",14:"e68320ca92ec848dfaec",15:"1a8484fe21f596f3c348",16:"cc9d7be4b5ac4d33b3de",17:"fa9d8eafa35e66b8063f",18:"2307386a34c0bc57a425",19:"4e0f0741e91332a74442",20:"56c912310f01cae59eba",21:"cb4a6bb73241ff39add9",22:"eb23dd722388f69b90a4",23:"423c727f5e8f4a1385d6",24:"7749f373a90117097dd9",25:"f33152f5190a675a9ab0",26:"e568f6e5921d11b8b9da",27:"27d9f8e2a2751d7bdd37",28:"6667bb68e660e626d453",29:"ebf6a24ea4ecd9295f5e",30:"cc8ac699fee9d42f654f",31:"844e1be845b73985418e"}[e]+".chunk.js"}function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.e=function(e){var t=[],n=o[e];if(0!==n)if(n)t.push(n[2]);else{var r=new Promise((function(t,i){n=o[e]=[t,i]}));t.push(n[2]=r);var c=new Error;var u=function t(n,r){var u,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=n,u=function(n){s.onerror=s.onload=null,clearTimeout(d);var a=o[e];if(0!==a)if(a)if(0===r){var u=n&&("load"===n.type?"missing":n.type),l=n&&n.target&&n.target.src;c.message="Loading chunk "+e+" failed after 999999 retries.\n("+u+": "+l+")",c.name="ChunkLoadError",c.type=u,c.request=l,a[1](c),o[e]=void 0}else setTimeout((function(){var n=Date.now(),o=t(i(e)+"?"+n,r-1);document.head.appendChild(o)}),0);else o[e]=void 0};var d=setTimeout((function(){u({type:"timeout",target:s})}),12e4);return s.onerror=s.onload=u,s}(i(e),999999);document.head.appendChild(u)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(n,o,function(t){return e[t]}.bind(null,o));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var r=this.webpackJsonp=this.webpackJsonp||[],c=r.push.bind(r);r.push=t,r=r.slice();for(var u=0;u<r.length;u++)t(r[u]);var s=c;a(a.s=12)}([function(e,t,n){"use strict";n.r(t),n.d(t,"USER_AGENT",(function(){return i})),n.d(t,"IS_APPLE",(function(){return a})),n.d(t,"IS_ANDROID",(function(){return r})),n.d(t,"IS_CHROMIUM",(function(){return c})),n.d(t,"IS_APPLE_MOBILE",(function(){return u})),n.d(t,"IS_SAFARI",(function(){return s})),n.d(t,"IS_FIREFOX",(function(){return d})),n.d(t,"IS_MOBILE_SAFARI",(function(){return l})),n.d(t,"IS_MOBILE",(function(){return f}));var o=n(2);const i=navigator?navigator.userAgent:null,a=-1!==navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i),r=-1!==navigator.userAgent.toLowerCase().indexOf("android"),c=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),u=(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!o.a.MSStream,s=!!("safari"in o.a)||!(!i||!(/\b(iPad|iPhone|iPod)\b/.test(i)||i.match("Safari")&&!i.match("Chrome"))),d=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,l=s&&u,f=navigator.maxTouchPoints>0&&-1!=navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i)},function(e,t,n){"use strict";n.r(t),n.d(t,"IS_TOUCH_SUPPORTED",(function(){return o}));const o="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;t.default=o},function(e,t,n){"use strict";const o="undefined"!=typeof window?window:self;t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var o=n(1),i=n(0),a=n(6),r=n(4);const c=i.IS_SAFARI&&i.IS_MOBILE&&o.IS_TOUCH_SUPPORTED;if(c){let e="clientY",t=0;const n={capture:!0,passive:!1},o=n=>{const o=n.touches[0],i=Object(a.a)(o.target,"scrollable-y");if(i){const a=o[e],r=t-a,c=i.scrollTop,u=i.scrollHeight,s=i.clientHeight,d=c?Math.round(c+i.clientHeight+r):c+r;(u===s||d>=u||d<=0)&&n.preventDefault()}else n.preventDefault()};let i=0;document.addEventListener("focusin",a=>{!a.target.classList.contains("is-sticky-input-bugged")||a.timeStamp-i<50||(Object(r.a)(a.target),document.addEventListener("touchmove",o,n),document.addEventListener("touchstart",n=>{if(n.touches.length>1)return;const o=n.touches[0];t=o[e]}))},{passive:!0}),document.addEventListener("focusout",e=>{document.removeEventListener("touchmove",o,n),i=e.timeStamp},{passive:!0}),document.addEventListener("visibilitychange",()=>{document.activeElement&&document.activeElement.classList.contains("is-sticky-input-bugged")&&document.activeElement.blur&&Object(r.a)(document.activeElement)},{passive:!0})}function u(e){c&&e.classList.add("is-sticky-input-bugged")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(7);function i(e){e.style.transform="translateY(-99999px)",e.focus(),Object(o.a)().then(()=>{e.style.transform=""})}},function(e,t,n){"use strict";function o(e){if(e=e||window.event){e=e.originalEvent||e;try{e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0}catch(e){}}return!1}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function o(e,t){return e.closest("."+t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";let o;function i(e){o?o.push(e):(o=[e],requestAnimationFrame(()=>{const e=o;o=void 0,e.forEach(e=>e())}))}n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return d}));let a,r,c=!1;function u(e){a?c?e():a.push(e):(a=[e],requestAnimationFrame(()=>{c=!0;for(let e=0;e<a.length;++e)a[e]();a=void 0,c=!1}))}function s(){return r||(r=new Promise(e=>i(()=>e())),r.then(()=>{r=void 0}),r)}function d(){return new Promise(e=>{i(()=>{i(e)})})}},function(e,t,n){"use strict";const o={id:1025907,hash:"452b0359b988148995f22ff0f4229750",version:"1.4.1",versionFull:"1.4.1 (159)",build:159,langPackVersion:"0.4.0",langPack:"macos",langPackCode:"en",domains:["web.telegram.org"],baseDcId:2,isMainDomain:"web.telegram.org"===location.hostname,suffix:"K"};o.isMainDomain&&(o.id=2496,o.hash="8da85b0d5bfe62527e5b244c209159c3"),t.a=o},function(e,t,n){"use strict";function o(){return!(!document.activeElement||!document.activeElement.blur)&&(document.activeElement.blur(),!0)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";let o;function i(){return o||(o="fonts"in document?Promise.race([Promise.all(["400 1rem Roboto","500 1rem Roboto","500 1rem tgico"].map(e=>document.fonts.load(e))),new Promise(e=>setTimeout(e,1e3))]):Promise.resolve())}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";const o=-1!==navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i);t.a=o},function(e,t,n){"use strict";n.r(t);var o=n(8),i=n(9),a=n(5),r=n(3),c=n(10),u=n(11),s=n(0),d=(n(13),n(14),function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function r(e){try{u(o.next(e))}catch(e){a(e)}}function c(e){try{u(o.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,c)}u((o=o.apply(e,t||[])).next())}))});document.addEventListener("DOMContentLoaded",()=>d(void 0,void 0,void 0,(function*(){Element.prototype.toggleAttribute||(Element.prototype.toggleAttribute=function(e,t){return void 0!==t&&(t=!!t),this.hasAttribute(e)?!!t||(this.removeAttribute(e),!1):!1!==t&&(this.setAttribute(e,""),!0)});const e=window.visualViewport||window;let t,d=!1;const l=()=>{const n=.01*(d&&!v.default.isOverlayActive?e.height||e.innerHeight:window.innerHeight);t!==n&&(b.IS_TOUCH_SUPPORTED&&t<n&&n-t>1&&Object(i.a)(),t=n,document.documentElement.style.setProperty("--vh",n+"px"))},f=new Proxy(Worker,{construct:(e,t)=>new e(t[0]+location.search)});Worker=f;const[m,b,h,v,g,p,P]=yield Promise.all([n.e(24).then(n.bind(null,27)),Promise.resolve().then(n.bind(null,1)),Promise.resolve().then(n.bind(null,0)),n.e(20).then(n.bind(null,15)),Promise.all([n.e(0),n.e(22)]).then(n.bind(null,17)),Promise.all([n.e(0),n.e(1)]).then(n.bind(null,16)),n.e(28).then(n.bind(null,28))]);if(window.addEventListener("resize",l),l(),r.a){const t=()=>{d=1===n&&r.a&&!v.default.isOverlayActive,l(),e!==window&&(d?(window.removeEventListener("resize",l),e.addEventListener("resize",l)):(e.removeEventListener("resize",l),window.addEventListener("resize",l)))};let n;v.default.addEventListener("im_tab_change",e=>{const o=void 0!==n;n=e,(o||1===n)&&t()}),v.default.addEventListener("overlay_toggle",()=>{t()})}h.IS_FIREFOX&&!u.a&&document.addEventListener("dragstart",e=>{const t=e.target;if("IMG"===t.tagName&&t.classList.contains("emoji"))return Object(a.a)(e),!1}),document.addEventListener("dragstart",e=>{var t;if("IMG"===(null===(t=e.target)||void 0===t?void 0:t.tagName))return e.preventDefault(),!1}),h.IS_FIREFOX&&document.documentElement.classList.add("is-firefox"),h.IS_MOBILE&&document.documentElement.classList.add("is-mobile"),h.IS_APPLE?(h.IS_SAFARI&&document.documentElement.classList.add("is-safari"),h.IS_APPLE_MOBILE?document.documentElement.classList.add("is-ios"):document.documentElement.classList.add("is-mac")):h.IS_ANDROID&&document.documentElement.classList.add("is-android"),b.IS_TOUCH_SUPPORTED?document.documentElement.classList.add("is-touch"):document.documentElement.classList.add("no-touch");const y=performance.now(),E=p.default.getCacheLangPack(),[S,w]=yield Promise.all([g.default.getState(),E]);function I(e,t){e.style.opacity="0",t.then(()=>{window.requestAnimationFrame(()=>{e.style.opacity=""})})}p.default.setTimeFormat(S.settings.timeFormat),v.default.setThemeListener(),w.appVersion!==o.a.langPackVersion&&p.default.getLangPack(w.lang_code),console.log("got state, time:",performance.now()-y);const O=S.authState;if("authStateSignedIn"!==O._){console.log("Will mount auth page:",O._,Date.now()/1e3);const e=document.getElementById("auth-pages");let t,o;if(e){t=e.querySelector(".scrollable"),b.IS_TOUCH_SUPPORTED&&!s.IS_MOBILE_SAFARI||t.classList.add("no-scrollbar"),t.style.opacity="0";const n=document.createElement("div");n.classList.add("auth-placeholder"),t.prepend(n),t.append(n.cloneNode())}try{yield Promise.all([Promise.all([n.e(0),n.e(1)]).then(n.bind(null,24)),Promise.all([n.e(0),n.e(1)]).then(n.bind(null,26))]).then(([e,t])=>{e.default.setAuthorized(!1),t.default.forceUnsubscribe()})}catch(e){}switch(O._){case"authStateSignIn":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(13)]).then(n.bind(null,21))).default.mount();break;case"authStateSignQr":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(21)]).then(n.bind(null,20))).default.mount();break;case"authStateAuthCode":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(12)]).then(n.bind(null,22))).default.mount(O.sentCode);break;case"authStatePassword":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(15)]).then(n.bind(null,23))).default.mount();break;case"authStateSignUp":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(14)]).then(n.bind(null,25))).default.mount(O.authCode)}if(t){o&&(yield o);I(t,"fonts"in document?Promise.race([new Promise(e=>setTimeout(e,1e3)),document.fonts.ready]):Promise.resolve())}}else console.log("Will mount IM page:",Date.now()/1e3),I(document.getElementById("main-columns"),Object(c.a)()),(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(30)]).then(n.bind(null,19))).default.mount();const L=(yield n.e(17).then(n.bind(null,18))).ripple;Array.from(document.getElementsByClassName("rp")).forEach(e=>L(e))})))},function(e,t,n){},function(e,t,n){}]);
//# sourceMappingURL=main.829169e8a1e43b09c37f.bundle.js.map