import{r as registerInstance}from"./index-08b73e9e.js";import{d as dist}from"./index-3fe5e103.js";import"./_commonjsHelpers-9943807e.js";var styleCss=".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}";var SmoothlyDisplayAmount=function(){function t(t){registerInstance(this,t)}t.prototype.format=function(t){var s=3;var r=2;var i=dist.Currency.decimalDigits(this.currency)?dist.Currency.decimalDigits(this.currency):r;var e=t.length;var n;var o=t;if(o=="")o="0";if(t.includes(".")){n=t.indexOf(".");if(n==0){o="0"+o;n++}e=n;o=o.padEnd(n+i+1,"0");o=o.substring(0,n+i+1)}else{o=o+".";n=o.length-1;o=o.padEnd(n+i+1,"0")}var a=Math.ceil(e/s)-1;if(a>0){for(var l=0;l<a;l++){var m=e-(a-l)*s;o=o.slice(0,m)+" "+o.slice(m,o.length);e++}}return o};t.prototype.render=function(){return[typeof this.amount=="number"?this.format(this.amount.toString()):this.format(this.amount)," ",this.currency]};return t}();SmoothlyDisplayAmount.style=styleCss;export{SmoothlyDisplayAmount as smoothly_display_amount};