"use strict";(self.webpackChunk_pixelpay_ui_core=self.webpackChunk_pixelpay_ui_core||[]).push([[6031],{"./dist/ui-stencil/p-7e202c6b.entry.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{x_number:()=>h});var _p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./dist/ui-stencil/p-444192d7.js");const h=class{constructor(i){(0,_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.r)(this,i),this.value=0,this.from=0,this.fixed=0,this.thousandsSeparator=",",this.interval=1,this.withoutAnimation=!1,this.lastNumber=void 0,this.actualNumber=void 0,this.typingTimer=void 0}watchValue(){this.withoutAnimation?(this.actualNumber=this.numberWithCommas(this.value),this.lastNumber=this.value):(clearTimeout(this.typingTimer),this.typingTimer=setTimeout(this.animateNumber,1e3*this.interval))}componentWillLoad(){this.lastNumber=this.from,this.actualNumber=this.from.toFixed(this.fixed)}componentDidLoad(){this.withoutAnimation?this.actualNumber=this.numberWithCommas(this.value):setTimeout((()=>{this.animateNumber()}),300)}animateNumber(){let t=null;const i=s=>{null!=t||(t=s);const h=Math.min((s-t)/1e3,1);this.actualNumber=this.numberWithCommas(h*(this.value-this.lastNumber)+this.lastNumber),h<1?window.requestAnimationFrame(i):this.lastNumber=this.value};window.requestAnimationFrame(i)}numberWithCommas(t){return parseFloat(t).toFixed(this.fixed).replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator)}render(){return(0,_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.h)(_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.H,{key:"0df9333b9b74a5153c2f904867fe8fb8443f42f5"},this.actualNumber)}static get watchers(){return{value:["watchValue"]}}};h.style="x-number{display:inline-block}"}}]);