tweb/public/0.32932e6b1ccf767530d6.chunk.js
2022-04-26 00:08:39 +03:00

2 lines
26 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[0],{102:function(t,e,i){"use strict";i.d(e,"a",(function(){return h})),i.d(e,"b",(function(){return c}));var s=i(93),r=i(36),n=i(115),a=i(0),o=i(103);var h;function c(t){if(void 0===t.margin&&(t.margin=0),void 0===t.maxDistance&&(t.maxDistance=1500),void 0===t.axis&&(t.axis="y"),a.a.settings.animationsEnabled||(t.forceDirection=h.Static),t.forceDirection===h.Static)return t.forceDuration=0,l(t);const e=Object(r.d)().then(()=>l(t));return"y"===t.axis?Object(s.b)(e):e}function l(t){const{element:e,container:i,getNormalSize:s,axis:r,margin:a,position:h,forceDirection:c,maxDistance:m,forceDuration:p}=t;if(!Object(o.a)(e))return Object(n.c)(i),Promise.resolve();const f="y"===r?"top":"left",v="y"===r?"bottom":"right",g="y"===r?"height":"width",y="y"===r?"scrollHeight":"scrollWidth",b="y"===r?"scrollTop":"scrollLeft",w=e.getBoundingClientRect(),k=i.getBoundingClientRect?i.getBoundingClientRect():document.body.getBoundingClientRect(),F=w[f]-k[f],L=e[y],E=s?s({rect:k}):k[g];let M=i[b];const O=i[y];let I;switch(h){case"start":I=F-a;break;case"end":I=w[v]-k[v]+a;break;case"nearest":case"center":if(L<E)I=F+L/2-E/2;else{if(t.fallbackToElementStartWhenCentering&&t.fallbackToElementStartWhenCentering!==e)return t.element=t.fallbackToElementStartWhenCentering,t.position="start",l(t);I=F-a}}if(Math.abs(I-(a||0))<1)return Object(n.c)(i),Promise.resolve();if("y"===r&&void 0===c&&(I>m?(M=i.scrollTop+=I-m,I=m):I<-m&&(M=i.scrollTop+=I+m,I=-m)),I<0){const t=-M;I=Math.max(I,t)}else if(I>0){const t=O-(M+E);I=Math.min(I,t)}const D=i[b]+I,C=Math.abs(I),A=null!=p?p:250+C/1500*350,S=Date.now(),j=C<500?u:d,x=()=>{const t=A?Math.min((Date.now()-S)/A,1):1,e=I*(1-j(t));return i[b]=Math.round(D-e),t<1};if(!A||!I)return Object(n.c)(i),x(),Promise.resolve();if(t.startCallback){const e=O-Math.round(D+i["y"===r?"offsetHeight":"offsetWidth"]);t.startCallback({scrollSize:O,scrollPosition:M,distanceToEnd:e,path:I,duration:A,containerRect:k,elementRect:w})}return Object(n.b)(x,i)}function d(t){return 1-Math.pow(1-t,5)}function u(t){return 1-Math.pow(1-t,3.5)}!function(t){t[t.Up=0]="Up",t[t.Down=1]="Down",t[t.Static=2]="Static"}(h||(h={}))},103:function(t,e,i){"use strict";function s(t){return null==t?void 0:t.isConnected}i.d(e,"a",(function(){return s}))},104:function(t,e,i){"use strict";function s(t,e,i){return t<e?e:t>i?i:t}i.d(e,"a",(function(){return s}))},115:function(t,e,i){"use strict";i.d(e,"c",(function(){return a})),i.d(e,"b",(function(){return o})),i.d(e,"a",(function(){return h}));var s=i(36),r=i(10);const n=new Map;function a(t){const e=function(t){return n.get(t)}(t);e&&(e.isCancelled=!0,e.deferred.resolve())}function o(t,e,i){return i||(i=function(t){a(t);const e={isCancelled:!1,deferred:Object(r.a)()};return n.set(t,e),e.deferred.then(()=>{n.delete(t)}),e}(e)),Object(s.b)(()=>{i.isCancelled||(t()?o(t,e,i):i.deferred.resolve())}),i.deferred}function h(t){Object(s.b)(()=>{t()&&h(t)})}},116:function(t,e,i){"use strict";function s(t,e){if(t.parentElement===e)return t;for(;t.parentElement;)if((t=t.parentElement).parentElement===e)return t;return null}i.d(e,"a",(function(){return s}))},130:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var s=i(140),r=i(0),n=i(36),a=i(102),o=i(116),h=i(95);function c(t,e,i,c,l=250,d){const u=Object(s.a)(e,t||"tabs"===e.dataset.animation?"tabs":"navigation",l,c);if(t){const s=new Proxy(u,{apply:(e,i,s)=>{const r=+s[0],n=void 0===s[1]||s[1],a=t.querySelector(`[data-tab="${r}"]`)||t.children[r];c(a,r,n)}}),c=(s,o,h=!0)=>{const c=e.children[o];if(i){const t=i(o,c,h);if(void 0!==t&&!t)return}d&&d.scrollIntoViewNew({element:s.parentElement.children[o],position:"center",forceDirection:h?void 0:a.a.Static,forceDuration:l,axis:"x"}),r.a.settings.animationsEnabled||(h=!1);const f=u.prevId();if(s.classList.contains("active")||o===f)return!1;const v=t.querySelector(p.toLowerCase()+".active");Object(n.b)(()=>{v&&v.classList.remove("active")}),m&&-1!==f&&h&&Object(n.b)(()=>{const t=s.querySelector("i"),e=s.parentElement.children[f].querySelector("i");e.classList.remove("animate"),t.classList.remove("animate");const i=e.parentElement.parentElement.offsetLeft-t.parentElement.parentElement.offsetLeft,r=e.clientWidth/t.clientWidth;t.style.transform=`translate3d(${i}px, 0, 0) scale3d(${r}, 1, 1)`,requestAnimationFrame(()=>{t.classList.add("animate"),t.style.transform="none"})}),Object(n.b)(()=>{s.classList.add("active")}),u(o,h)},m=!t.classList.contains("no-stripe"),p=t.firstElementChild.tagName;return t.addEventListener("click",(function(e){let i,s=e.target;if(s=Object(o.a)(s,t),!s)return!1;if(s.dataset.tab){if(i=+s.dataset.tab,-1===i)return!1}else i=Object(h.a)(s);c(s,i)})),s}return u}},139:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var s=i(62);function r(t,e,i,r,n=!0){if(t<i&&e<r&&n)return Object(s.c)(t,e);let a=i,o=r;return t/e>i/r?o=e*i/t|0:(a=t*r/e|0,a>i&&(o=o*i/a|0,a=i)),n&&a>=t&&o>=e&&(a=t,o=e),Object(s.c)(a,o)}i(1).a.calcImageInBox=r},140:function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var s=i(0),r=i(10),n=i(93),a=i(95),o=i(33);function h(t,e,i){const s=e.getBoundingClientRect().width,r=[t,e];return i&&r.reverse(),r[0].style.filter="brightness(80%)",r[0].style.transform=`translate3d(${.25*-s}px, 0, 0)`,r[1].style.transform=`translate3d(${s}px, 0, 0)`,t.classList.add("active"),t.offsetWidth,t.style.transform="",t.style.filter="",()=>{e.style.transform=e.style.filter=""}}function c(t,e,i){const s=e.getBoundingClientRect().width,r=[t,e];return i&&r.reverse(),r[0].style.transform=`translate3d(${-s}px, 0, 0)`,r[1].style.transform=`translate3d(${s}px, 0, 0)`,t.classList.add("active"),t.offsetWidth,t.style.transform="",()=>{e.style.transform=""}}const l=(t,e,i,s,r=!0)=>{let n=null;switch(e){case"tabs":n=c;break;case"navigation":n=h}return t.dataset.animation=e,d(t,n,i,s,r)},d=(t,e,i,h,c=!0,l=!1,d=!0)=>{const u=new Map;let m,p=null;if(d){const i=e?"transitionend":"animationend",s=e=>{if(Object(o.a)(e),e.target.parentElement!==t)return;const r=u.get(e.target);r&&r(),e.target===p&&(!m&&c||(m&&(m.resolve(),m=void 0),h&&h(f.prevId()),t.classList.remove("animating","backwards","disable-hover"),l&&(t.removeEventListener(i,s),p=m=void 0,u.clear())))};t.addEventListener(i,s)}function f(o,l=!0,v){v&&(p=v),o instanceof HTMLElement&&(o=Object(a.a)(o));const g=f.prevId();if(o===g)return!1;const y=t.children[o];if(s.a.settings.animationsEnabled&&-1!==g||(l=!1),!d){const e=t.dataset.timeout;void 0!==e&&clearTimeout(+e),delete t.dataset.timeout}if(!l){if(p)p.classList.remove("active","to","from");else if(y){const t=u.get(y);t&&t()}return y&&(y.classList.remove("to","from"),y.classList.add("active")),t.classList.remove("animating","backwards","disable-hover"),p=y,void(h&&h(o))}d||(t.dataset.timeout=""+window.setTimeout(()=>{y.classList.remove("to"),p&&p.classList.remove("from"),t.classList.remove("animating","backwards","disable-hover"),delete t.dataset.timeout},i)),p&&(p.classList.remove("to"),p.classList.add("from")),t.classList.add("animating");const b=g<o;let w;if(t.classList.toggle("backwards",!b),y&&(e?w=e(y,p,b):y.classList.add("active"),y.classList.remove("from"),y.classList.add("to")),y&&u.set(y,()=>{y.classList.remove("to"),u.delete(y)}),p){const t=p,e=()=>{t.classList.remove("active","from"),w&&w(),u.delete(t)};if(y)u.set(t,e);else{const s=window.setTimeout(e,i);u.set(t,()=>{clearTimeout(s),u.delete(t)})}c&&(m||(m=Object(r.a)()),Object(n.b)(m,2*i))}p=y}return f.prevId=()=>p?Object(a.a)(p):-1,f}},188:function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var s=i(2);let r;if(s.g)try{r=+navigator.userAgent.match(/Version\/(.+?) /)[1]>=14}catch(t){r=!1}else r=!0;var n=r,a=i(15),o=i(62),h=i(104),c=i(71),l=function(t,e,i,s){return new(i||(i=Promise))((function(r,n){function a(t){try{h(s.next(t))}catch(t){n(t)}}function o(t){try{h(s.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,o)}h((s=s.apply(t,e||[])).next())}))};const d=new class{constructor(){this.cache=new Map}getCache(t){let e=this.cache.get(t);return e||this.cache.set(t,e={frames:new Map,counter:0}),++e.counter,e.frames}releaseCache(t){const e=this.cache.get(t);e&&!--e.counter&&this.cache.delete(t)}getCacheCounter(t){const e=this.cache.get(t);return null==e?void 0:e.counter}generateName(t,e,i,s,r){return[t,e,i,s?"colored":"",r||""].filter(Boolean).join("-")}};class u extends a.a{constructor({el:t,worker:e,options:i}){super(!0),this.reqId=0,this.width=0,this.height=0,this.paused=!0,this.direction=1,this.speed=1,this.autoplay=!0,this.loop=!0,this.group="",this.cachingDelta=0,this.reqId=++u.reqId,this.el=t,this.worker=e;for(let t in i)this.hasOwnProperty(t)&&(this[t]=i[t]);let r;this._loop=this.loop,this._autoplay=this.autoplay,this.initFrame=i.initFrame,this.color=i.color,this.inverseColor=i.inverseColor,this.name=i.name,this.skipFirstFrameRendering=i.skipFirstFrameRendering,this.toneIndex=i.toneIndex,void 0!==i.skipRatio?r=i.skipRatio:(s.a||s.c||s.b&&!s.g)&&this.width<100&&this.height<100&&!i.needUpscale&&(r=.5),this.skipDelta=void 0!==r?1/r|0:1;const a=Object(h.a)(window.devicePixelRatio,1,2);a>1&&(i.needUpscale?(this.width=Math.round(this.width*a),this.height=Math.round(this.height*a)):a>1&&(this.width>100&&this.height>100?s.b||!o.b.isMobile?(this.width=Math.round(this.width*a),this.height=Math.round(this.height*a)):a>2.5&&(this.width=Math.round(this.width*(a-1.5)),this.height=Math.round(this.height*(a-1.5))):(this.width=Math.round(this.width*Math.max(1.5,a-1.5)),this.height=Math.round(this.height*Math.max(1.5,a-1.5))))),i.noCache||(s.b&&this.width>100&&this.height>100?this.cachingDelta=2:this.width<100&&this.height<100?this.cachingDelta=1/0:this.cachingDelta=4),this.canvas||(this.canvas=document.createElement("canvas"),this.canvas.classList.add("rlottie"),this.canvas.width=this.width,this.canvas.height=this.height),this.context=this.canvas.getContext("2d"),n&&(this.clamped=new Uint8ClampedArray(this.width*this.height*4)),this.imageData=new ImageData(this.width,this.height),this.name?(this.cacheName=d.generateName(this.name,this.width,this.height,this.color,this.toneIndex),this.frames=d.getCache(this.cacheName)):this.frames=new Map}clearCache(){this.cachingDelta!==1/0&&(this.cacheName&&d.getCacheCounter(this.cacheName)>1||this.frames.clear())}sendQuery(t,...e){this.worker.sendQuery(t,this.reqId,...e)}loadFromData(t){this.sendQuery("loadFromData",t,this.width,this.height,this.toneIndex)}play(){this.paused&&(this.paused=!1,this.setMainLoop())}pause(t=!0){this.paused||(this.paused=!0,t&&clearTimeout(this.rafId))}resetCurrentFrame(){var t;return this.curFrame=null!==(t=this.initFrame)&&void 0!==t?t:1===this.direction?this.minFrame:this.maxFrame}stop(t=!0){this.pause();const e=this.resetCurrentFrame();t&&this.requestFrame(e)}restart(){this.stop(!1),this.play()}setSpeed(t){this.speed!==t&&(this.speed=t,this.paused||this.setMainLoop())}setDirection(t){this.direction!==t&&(this.direction=t,this.paused||this.setMainLoop())}remove(){c.a.onDestroy(this.reqId),this.pause(),this.sendQuery("destroy"),this.cacheName&&d.releaseCache(this.cacheName),this.cleanup()}applyColor(t){const[e,i,s]=this.color;for(let r=0,n=t.length;r<n;r+=4)0!==t[r+3]&&(t[r]=e,t[r+1]=i,t[r+2]=s)}applyInversing(t){const[e,i,s]=this.inverseColor;for(let r=0,n=t.length;r<n;r+=4)0===t[r+3]?(t[r]=e,t[r+1]=i,t[r+2]=s,t[r+3]=255):t[r+3]=0}renderFrame2(t,e){try{this.color&&this.applyColor(t),this.inverseColor&&this.applyInversing(t),this.imageData.data.set(t),this.context.putImageData(this.imageData,0,0)}catch(t){return console.error("RLottiePlayer renderFrame error:",t,this.width,this.height),this.autoplay=!1,void this.pause()}this.dispatchEvent("enterFrame",e)}renderFrame(t,e){if(this.cachingDelta&&(e%this.cachingDelta||!e)&&!this.frames.has(e)&&this.frames.set(e,new Uint8ClampedArray(t)),this.frInterval){const i=Date.now()-this.frThen;if(i<0)return this.rafId&&clearTimeout(this.rafId),this.rafId=window.setTimeout(()=>{this.renderFrame2(t,e)},this.frInterval>-i?-i%this.frInterval:this.frInterval)}this.renderFrame2(t,e)}requestFrame(t){const e=this.frames.get(t);e?this.renderFrame(e,t):(this.clamped&&!this.clamped.length&&(this.clamped=new Uint8ClampedArray(this.width*this.height*4)),this.sendQuery("renderFrame",t,this.clamped))}onLap(){return!!this.loop||(this.pause(!1),!1)}mainLoopForwards(){const{skipDelta:t,maxFrame:e}=this,i=this.curFrame+t>e?this.curFrame=this.loop?this.minFrame:this.maxFrame:this.curFrame+=t;return this.requestFrame(i),!(i+t>e)||this.onLap()}mainLoopBackwards(){const{skipDelta:t,minFrame:e}=this,i=this.curFrame-t<e?this.curFrame=this.loop?this.maxFrame:this.minFrame:this.curFrame-=t;return this.requestFrame(i),!(i-t<e)||this.onLap()}setMainLoop(){clearTimeout(this.rafId),this.frInterval=1e3/this.fps/this.speed*this.skipDelta,this.frThen=Date.now()-this.frInterval;const t=(1===this.direction?this.mainLoopForwards:this.mainLoopBackwards).bind(this);if(this.currentMethod=t,this.frameListener){void 0!==this.listenerResults.enterFrame&&this.frameListener(this.curFrame)}}playPart(t){this.pause();const{from:e,to:i,callback:s}=t;return this.curFrame=e-1,this.playToFrame({frame:i,direction:i>e?1:-1,callback:s})}playToFrame(t){this.pause();const{frame:e,speed:i,callback:s,direction:r}=t;this.setDirection(void 0===r?this.curFrame>e?-1:1:r),void 0!==i&&this.setSpeed(i);const n=[this.curFrame,e];-1===this.direction&&n.reverse(),this.loop=!1,this.setMinMax(n[0],n[1]),this.playToFrameOnFrameCallback&&this.removeEventListener("enterFrame",this.playToFrameOnFrameCallback),s&&(this.playToFrameOnFrameCallback=t=>{t===e&&(this.removeEventListener("enterFrame",this.playToFrameOnFrameCallback),s())},this.addEventListener("enterFrame",this.playToFrameOnFrameCallback)),this.play()}setColor(t,e){this.color=t,e&&this.paused&&this.renderFrame2(this.imageData.data,this.curFrame)}setInverseColor(t){this.inverseColor=t}setMinMax(t=0,e=this.frameCount-1){this.minFrame=t,this.maxFrame=e}onLoad(t,e){return l(this,void 0,void 0,(function*(){this.frameCount=t,this.fps=e,this.setMinMax(),void 0!==this.initFrame&&(this.initFrame=Object(h.a)(this.initFrame,this.minFrame,this.maxFrame));const i=this.resetCurrentFrame();if(this.fps<60&&1!==this.skipDelta){const t=60/e;this.skipDelta=this.skipDelta/t|0}this.frInterval=1e3/this.fps/this.speed*this.skipDelta,this.frThen=Date.now()-this.frInterval,!this.skipFirstFrameRendering&&this.requestFrame(i),this.dispatchEvent("ready"),this.addEventListener("enterFrame",()=>{this.dispatchEvent("firstFrame"),!this.canvas.parentNode&&this.el&&this.el.appendChild(this.canvas),this.frameListener=()=>{if(this.paused)return;const t=Date.now();this.frThen=t+this.frInterval;this.currentMethod()||this.loop||!this.autoplay||(this.autoplay=!1)},this.addEventListener("enterFrame",this.frameListener),"none"===this.group&&this.autoplay&&this.play()},{once:!0})}))}}u.reqId=0},62:function(t,e,i){"use strict";i.d(e,"c",(function(){return h})),i.d(e,"a",(function(){return s}));var s,r=i(1),n=i(139),a=i(15);class o{constructor(t=0,e=t){this.width=t,this.height=e}aspect(t,e){return Object(n.a)(this.width,this.height,t.width,t.height,e)}aspectFitted(t){return this.aspect(t,!0)}aspectCovered(t){return this.aspect(t,!1)}}function h(t,e){return new o(t,e)}!function(t){t[t.mobile=0]="mobile",t[t.medium=1]="medium",t[t.large=2]="large"}(s||(s={}));class c extends a.a{constructor(){super(),this.screenSizes=[{key:s.mobile,value:600},{key:s.medium,value:1275},{key:s.large,value:1680}],this.sizes={handhelds:{regular:h(270,270),webpage:h(270,200),album:h(270,0),esgSticker:h(68,68),animatedSticker:h(180,180),staticSticker:h(180,180),emojiSticker:h(112,112),poll:h(240,0),round:h(200,200),documentName:h(200,0)},desktop:{regular:h(420,340),webpage:h(420,340),album:h(420,0),esgSticker:h(80,80),animatedSticker:h(200,200),staticSticker:h(200,200),emojiSticker:h(112,112),poll:h(330,0),round:h(280,280),documentName:h(240,0)}},this.isMobile=!1,this.handleResize=()=>{const t=window.innerWidth;let e=this.screenSizes[0].key;for(let i=this.screenSizes.length-1;i>=0;--i)if(this.screenSizes[i].value<t){e=(this.screenSizes[i+1]||this.screenSizes[i]).key;break}const i=this.activeScreen;this.activeScreen=e,this.isMobile=this.activeScreen===s.mobile,this.active=this.isMobile?this.sizes.handhelds:this.sizes.desktop,i!==e&&void 0!==i&&this.dispatchEvent("changeScreen",i,e),void 0!==i&&this.dispatchEvent("resize")},window.addEventListener("resize",()=>{this.rAF&&window.cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{this.handleResize(),this.rAF=0})}),this.handleResize()}}const l=new c;r.a.mediaSizes=l,e.b=l},71:function(t,e,i){"use strict";function s(){return new Worker(i.p+"rlottie.worker.086dfed03cbca80766c6.bundle.worker.js")}var r=i(82),n=i(1),a=i(16),o=i(4),h=i(8),c=i(188),l=i(2),d=i(15);class u extends d.a{constructor(t){super(),this.worker=t,this.worker.onerror=t=>{try{this.dispatchEvent("workerError",t),this.cleanup(),this.terminate()}catch(t){}},this.worker.onmessage=t=>{this.dispatchEvent(t.data.queryMethodListener,...t.data.queryMethodArguments)}}postMessage(t){this.worker.postMessage(t)}terminate(){this.worker.terminate()}sendQuery(t,...e){if(l.g)this.worker.postMessage({queryMethod:t,queryMethodArguments:e});else{const i=[];e.forEach(t=>{t instanceof ArrayBuffer&&i.push(t),"object"==typeof t&&t.buffer instanceof ArrayBuffer&&i.push(t.buffer)}),this.worker.postMessage({queryMethod:t,queryMethodArguments:e},i)}}}var m=i(47),p=function(t,e,i,s){return new(i||(i=Promise))((function(r,n){function a(t){try{h(s.next(t))}catch(t){n(t)}}function o(t){try{h(s.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,o)}h((s=s.apply(t,e||[])).next())}))};const f=new class{constructor(){this.isWebAssemblySupported="undefined"!=typeof WebAssembly,this.loadPromise=this.isWebAssemblySupported?void 0:Promise.reject(),this.loaded=!1,this.workersLimit=4,this.players={},this.workers=[],this.curWorkerNum=0,this.log=Object(o.b)("LOTTIE",o.a.Error),this.onPlayerLoaded=(t,e,i)=>{const s=this.players[t];s?(this.log.debug("onPlayerLoaded"),s.onLoad(e,i)):this.log.warn("onPlayerLoaded on destroyed player:",t,e)},this.onFrame=(t,e,i)=>{const s=this.players[t];s?(void 0!==s.clamped&&(s.clamped=i),s.renderFrame(i,e)):this.log.warn("onFrame on destroyed player:",t,e)},this.onPlayerError=(t,e)=>{const i=this.players[t];if(i){r.a.getAnimations(i.el).forEach(t=>{r.a.checkAnimation(t,!0,!0)})}}}getAnimation(t){for(const e in this.players)if(this.players[e].el===t)return this.players[e];return null}setLoop(t){for(const e in this.players){const i=this.players[e];i.loop=t,i.autoplay=i._autoplay}}loadLottieWorkers(){return this.loadPromise?this.loadPromise:this.loadPromise=new Promise((t,e)=>{let i=this.workersLimit;for(let r=0;r<this.workersLimit;++r){const n=this.workers[r]=new u(new s);n.addEventListener("ready",()=>{this.log("worker #"+r+" ready"),n.addEventListener("frame",this.onFrame),n.addEventListener("loaded",this.onPlayerLoaded),n.addEventListener("error",this.onPlayerError),--i,i||(this.log("workers ready"),t(),this.loaded=!0)},{once:!0}),n.addEventListener("workerError",t=>{e("rlottie load error: "+t.message),this.loaded=!1},{once:!0})}})}loadAnimationAsAsset(t,e){return t.name=e,this.loadAnimationFromURL(t,"assets/tgs/"+e+".json")}loadAnimationFromURL(t,e){return this.isWebAssemblySupported?(this.loaded||this.loadLottieWorkers(),fetch(e).then(t=>t.headers&&"application/octet-stream"!==t.headers.get("content-type")?t.blob():t.arrayBuffer().then(t=>h.a.invokeCrypto("gzipUncompress",t)).then(t=>Object(m.a)(t,""))).then(i=>{const s=Object.assign(t,{animationData:i,needUpscale:!0});return s.name||(s.name=e),this.loadAnimationWorker(s)})):this.loadPromise}waitForFirstFrame(t){return Promise.race([new Promise(e=>{t.addEventListener("firstFrame",e,{once:!0})}),Object(a.a)(2500)]).then(()=>t)}loadAnimationWorker(t,e=t.group||"",i){return p(this,void 0,void 0,(function*(){if(!this.isWebAssemblySupported)return this.loadPromise;if(this.loaded||(yield this.loadLottieWorkers()),i&&!i())throw new Error("middleware");if(t.width&&t.height||(t.width=parseInt(t.container.style.width),t.height=parseInt(t.container.style.height)),!t.width||!t.height)throw new Error("No size for sticker!");t.group=e;const s=this.initPlayer(t.container,t);return"none"!==e&&r.a.addAnimation(s,e),s}))}onDestroy(t){delete this.players[t]}destroyWorkers(){this.workers.forEach((t,e)=>{t.terminate(),this.log("worker #"+e+" terminated")}),this.log("workers destroyed"),this.workers.length=0}initPlayer(t,e){const i=new c.a({el:t,worker:this.workers[this.curWorkerNum++],options:e});return this.players[i.reqId]=i,this.curWorkerNum>=this.workers.length&&(this.curWorkerNum=0),i.loadFromData(e.animationData),i}};n.a.lottieLoader=f;e.a=f},76:function(t,e,i){"use strict";function s(t,e){const i=t.indexOf(e),s=-1!==i&&t.splice(i,1);return s&&s[0]}i.d(e,"a",(function(){return s}))},79:function(t,e,i){"use strict";function s(t,e){for(let i=t.length-1;i>=0;--i)e(t[i],i,t)}i.d(e,"a",(function(){return s}))},82:function(t,e,i){"use strict";var s=i(0),r=i(2),n=i(1),a=i(103),o=i(188),h=i(76),c=i(79);const l=new class{constructor(){this.visible=new Set,this.byGroups={},this.lockedGroups={},this.onlyOnePlayableGroup="",this.intersectionLockedGroups={},this.videosLocked=!1,this.observer=new IntersectionObserver(t=>{for(const e of t){const t=e.target;for(const i in this.byGroups){if(this.intersectionLockedGroups[i])continue;const s=this.byGroups[i].find(e=>e.el===t);if(s){if(e.isIntersecting)this.visible.add(s),this.checkAnimation(s,!1);else{this.visible.delete(s),this.checkAnimation(s,!0);const t=s.animation;t instanceof o.a&&t.clearCache()}break}}}}),this.overrideIdleGroups=new Set,s.a.addEventListener("media_play",({doc:t})=>{"round"===t.type&&(this.videosLocked=!0,this.checkAnimations())}),s.a.addEventListener("media_pause",()=>{this.videosLocked&&(this.videosLocked=!1,this.checkAnimations())})}setOverrideIdleGroup(t,e){e?this.overrideIdleGroups.add(t):this.overrideIdleGroups.delete(t)}getAnimations(t){const e=[];for(const i in this.byGroups)for(const s of this.byGroups[i])s.el===t&&e.push(s);return e}removeAnimation(t){const{el:e,animation:i}=t;i.remove(),i instanceof HTMLVideoElement&&r.g&&setTimeout(()=>{i.src="",i.load()},1e3);const s=this.byGroups[t.group];s&&(Object(h.a)(s,t),s.length||delete this.byGroups[t.group]),this.observer.unobserve(e),this.visible.delete(t)}addAnimation(t,e=""){var i;const r={el:t instanceof o.a?t.el:t,animation:t,group:e};t instanceof o.a&&!s.a.settings.stickers.loop&&t.loop&&(t.loop=s.a.settings.stickers.loop),(null!==(i=this.byGroups[e])&&void 0!==i?i:this.byGroups[e]=[]).push(r),this.observer.observe(r.el)}checkAnimations(t,e,i=!1){if(void 0!==e&&!this.byGroups[e])return;const s=void 0!==e?[e]:Object.keys(this.byGroups);for(const e of s){const s=this.byGroups[e];Object(c.a)(s,e=>{this.checkAnimation(e,t,i)})}}checkAnimation(t,e=!1,i=!1){const{el:r,animation:n,group:o}=t;i||!Object(a.a)(r)&&!this.lockedGroups[o]?this.removeAnimation(t):e||this.onlyOnePlayableGroup&&this.onlyOnePlayableGroup!==o||n instanceof HTMLVideoElement&&this.videosLocked?n.paused||n.pause():!(n.paused&&this.visible.has(t)&&n.autoplay)||this.onlyOnePlayableGroup&&this.onlyOnePlayableGroup!==o||s.a.idle.isIDLE&&!this.overrideIdleGroups.has(t.group)||n.play()}setOnlyOnePlayableGroup(t){this.onlyOnePlayableGroup=t}lockGroup(t){this.lockedGroups[t]=!0}unlockGroup(t){delete this.lockedGroups[t],this.checkAnimations(void 0,t)}refreshGroup(t){const e=this.byGroups[t];e&&e.length&&(e.forEach(t=>{this.observer.unobserve(t.el)}),window.requestAnimationFrame(()=>{e.forEach(t=>{this.observer.observe(t.el)})}))}lockIntersectionGroup(t){this.intersectionLockedGroups[t]=!0}unlockIntersectionGroup(t){delete this.intersectionLockedGroups[t],this.refreshGroup(t)}};n.a&&(n.a.animationIntersector=l),e.a=l},90:function(t,e,i){"use strict";i.d(e,"a",(function(){return d}));var s=i(71),r=i(130),n=i(1),a=i(102),o=i(95);const h=new class{constructor(){this.pageId=-1,this.pagesDiv=document.getElementById("auth-pages"),this.scrollableDiv=this.pagesDiv.querySelector(".scrollable"),this.selectTab=Object(r.a)(null,this.scrollableDiv.querySelector(".tabs-container"),null,()=>{var t;(null===(t=this.page)||void 0===t?void 0:t.onShown)&&this.page.onShown()})}setPage(t){if(t.isAuthPage){this.pagesDiv.style.display="";let e=Object(o.a)(t.pageEl);if(this.pageId===e)return;this.selectTab(e),-1!==this.pageId&&e>1&&s.a.loadLottieWorkers(),this.pageId=e,this.scrollableDiv&&Object(a.b)({container:this.scrollableDiv,element:this.scrollableDiv.firstElementChild,position:"start"})}else this.pagesDiv.style.display="none",t.pageEl.style.display="",this.pageId=-1;this.page=t}};n.a.pagesManager=h;var c=h,l=function(t,e,i,s){return new(i||(i=Promise))((function(r,n){function a(t){try{h(s.next(t))}catch(t){n(t)}}function o(t){try{h(s.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,o)}h((s=s.apply(t,e||[])).next())}))};class d{constructor(t,e,i,s,r){this.isAuthPage=e,this.onFirstMount=i,this.onMount=s,this.onShown=r,this.installed=!1,this.pageEl=document.body.querySelector("."+t)}mount(...t){return l(this,void 0,void 0,(function*(){if(this.onMount&&this.onMount(...t),!this.installed){if(this.onFirstMount)try{const e=this.onFirstMount(...t);e instanceof Promise&&(yield e)}catch(t){console.error("PAGE MOUNT ERROR:",t)}this.installed=!0}c.setPage(this)}))}}},93:function(t,e,i){"use strict";i.d(e,"b",(function(){return d})),i.d(e,"d",(function(){return m})),i.d(e,"c",(function(){return p}));var s=i(10),r=i(0),n=i(1),a=i(16);let o=!1,h=Object(s.a)(),c=0;h.resolve();const l=console.log.bind(console.log,"[HEAVY-ANIMATION]:");function d(t,e){o||(h=Object(s.a)(),r.a.dispatchEvent("event-heavy-animation-start"),o=!0,n.b&&l("start")),++c,n.b&&l("attach promise, length:",c,e);const i=[void 0!==e?Object(a.a)(e):void 0,t.finally(()=>{})].filter(Boolean),d=performance.now(),m=h;return Promise.race(i).then(()=>{h!==m||h.isFulfilled||(--c,n.b&&l("promise end, length:",c,performance.now()-d),c<=0&&u())}),h}function u(){h.isFulfilled||(o=!1,c=0,r.a.dispatchEvent("event-heavy-animation-end"),h.resolve(),n.b&&l("end"))}function m(){u()}function p(){return h}e.a=function(t,e,i){o&&t();const s=i?i.add(r.a):r.a.addEventListener.bind(r.a),n=i?i.removeManual.bind(i,r.a):r.a.removeEventListener.bind(r.a);return s("event-heavy-animation-start",t),s("event-heavy-animation-end",e),()=>{n("event-heavy-animation-end",e),n("event-heavy-animation-start",t)}}},95:function(t,e,i){"use strict";function s(t){if(!t.parentNode)return-1;let e=0;for(;null!==(t=t.previousElementSibling);)++e;return e}i.d(e,"a",(function(){return s}))}}]);
//# sourceMappingURL=0.32932e6b1ccf767530d6.chunk.js.map