tweb/public/15.04217e6c6e21ea0189db.chunk.js

2 lines
615 KiB
JavaScript
Raw Normal View History

2021-10-07 15:14:57 +02:00
(this.webpackJsonp=this.webpackJsonp||[]).push([[15],{104:function(e,t,s){"use strict";s.d(t,"a",(function(){return n}));var i=s(49);class n{constructor(e,t){this.inputField=e,this.size=t,this.max=45,this.needFrame=0,this.container=document.createElement("div"),this.container.classList.add("media-sticker-wrapper");const s=e.input;s.addEventListener("blur",()=>{this.playAnimation(0)}),s.addEventListener("input",t=>{this.playAnimation(e.value.length)})}playAnimation(e){if(!this.animation)return;let t;(e=Math.min(e,30))?(t=Math.round(Math.min(this.max,e)*(165/this.max)+11.33),this.idleAnimation&&(this.idleAnimation.stop(!0),this.idleAnimation.canvas.style.display="none"),this.animation.canvas.style.display=""):t=0;const s=this.needFrame>t?-1:1;this.animation.setDirection(s),0!==this.needFrame&&0===t&&this.animation.setSpeed(7),this.needFrame=t,this.animation.play()}load(){return this.loadPromise?this.loadPromise:this.loadPromise=Promise.all([i.b.loadAnimationFromURL({container:this.container,loop:!0,autoplay:!0,width:this.size,height:this.size},"assets/img/TwoFactorSetupMonkeyIdle.tgs").then(e=>(this.idleAnimation=e,this.inputField.value.length||e.play(),i.b.waitForFirstFrame(e))),i.b.loadAnimationFromURL({container:this.container,loop:!1,autoplay:!1,width:this.size,height:this.size},"assets/img/TwoFactorSetupMonkeyTracking.tgs").then(e=>(this.animation=e,this.inputField.value.length||(this.animation.canvas.style.display="none"),this.animation.addEventListener("enterFrame",e=>{(1===this.animation.direction&&e>=this.needFrame||-1===this.animation.direction&&e<=this.needFrame)&&(this.animation.setSpeed(1),this.animation.pause()),0===e&&0===this.needFrame&&this.idleAnimation&&(this.idleAnimation.canvas.style.display="",this.idleAnimation.play(),this.animation.canvas.style.display="none")}),i.b.waitForFirstFrame(e)))])}remove(){this.animation&&this.animation.remove(),this.idleAnimation&&this.idleAnimation.remove()}}},105:function(e,t,s){"use strict";s.d(t,"a",(function(){return n}));var i=s(38);class n extends i.b{constructor(e){super(Object.assign({plainText:!0},e));const t=this.input;t.type="tel",t.setAttribute("required",""),t.autocomplete="off";let s=0;this.input.addEventListener("input",t=>{this.input.classList.remove("error"),this.setLabel();const i=this.value.replace(/\D/g,"").slice(0,e.length);this.setValueSilently(i);const n=this.value.length;if(n===e.length)e.onFill(this.value);else if(n===s)return;s=n})}}},138:function(e,t,s){"use strict";s.r(t),s.d(t,"AppDialogsManager",(function(){return Fo}));var i=s(39),n=s(67),a=s(15),o=s(41),r=s(46),l=s(28),c=s(4),d=s(110),h=s(0);var u=!!document.createElement("video").canPlayType("video/quicktime")||h.IS_SAFARI||h.IS_APPLE_MOBILE,p=s(113);const m=new Set(["image/jpeg","image/png","image/gif","image/bmp","video/mp4","video/webm"]);u&&m.add("video/quicktime"),p.a&&m.add("image/webp");var g=m;function b(e,t){e.setAttribute("dir","auto"),e.innerHTML=t}var v=s(37),f=s(97),y=s(56);function w(e){Object(y.d)(e.history,(t,s,i)=>{t.action.photo||(i.splice(s,1),void 0!==e.count&&--e.count)})}var L=s(32);class S{constructor(e){this.previous=[],this.next=[],this.reverse=!1,this.loadCount=50,this.loadWhenLeft=20,this.loadedAllUp=!1,this.loadedAllDown=!1,Object(L.g)(this,e)}setTargets(e,t,s){this.previous=e,this.next=t,this.reverse=s}get index(){return void 0!==this.count?this.previous.length:-1}reset(e=!1){this.current=void 0,this.previous=[],this.next=[],this.loadedAllUp=this.loadedAllDown=e,this.loadPromiseUp=this.loadPromiseDown=null}go(e,t=!0){let s,i;if(e>0){if(s=this.next.splice(0,e),i=s.pop(),!i)return;this.previous.push(this.current,...s)}else{if(s=this.previous.splice(this.previous.length+e,-e),i=s.shift(),!i)return;this.next.unshift(...s,this.current)}return this.next.length<this.loadWhenLeft&&this.load(!this.reverse),this.previous.length<this.loadWhenLeft&&this.load(this.reverse),this.current=i,t&&this.onJump&&this.onJump(i,e>0),this.current}load(e){if(e&&this.loadedAllDown)return Promise.resolve();if(!e&&this.loadedAllUp)return Promise.resolve();if(e&&this.loadPromiseDown)retur
2021-10-07 15:21:26 +02:00
//# sourceMappingURL=15.04217e6c6e21ea0189db.chunk.js.map