import{a as R}from"./chunk-MJMWESWV.js";import{c as d,d as x}from"./chunk-N5JHJM4A.js";import{c as $,f as v}from"./chunk-Y4JXSDKI.js";import{c as a,d as j}from"./chunk-I6HXBYFU.js";import{Lb as L,Nb as l,Nd as N,Td as q,ed as I,od as y,qa as z,ra as B,va as O,yb as c}from"./chunk-HEIW4SFT.js";j();y();j();y();v();var T=(()=>{class r{constructor(t){this.translate=t}formatElapsedTimeDigits(t,e){let i=Math.floor(t/1e3),s=Math.floor(i/60),g=Math.floor(s/60),S=Math.floor(g/24),P=Math.floor(S/30),D=Math.floor(P/12),M=i%60,b=s%60,n=a.zeroPadBefore(a.numToStr(g),2),o=a.zeroPadBefore(a.numToStr(b),2),f=a.zeroPadBefore(a.numToStr(M),2);switch(e){case"minutes":return`${n}:${o}`;case"full":default:return`${n}:${o}:${f}`}}formatElapsedTime(t,e="full",i="long",s=!1){let g=Math.floor(t/1e3),S=Math.floor(g/60),P=Math.floor(S/60),D=Math.floor(P/24),M=Math.floor(D/30),b=Math.floor(M/12),n=g%60,o=S%60,f=P%24,U=D%30,E=M%12,m=n&&s?"":this.translateUnit(n,"second",i),u=o&&s?"":this.translateUnit(o,"minute",i),p=f&&s?"":this.translateUnit(f,"hour",i),F=U&&s?"":this.translateUnit(U,"day",i),C=E&&s?"":this.translateUnit(E,"month",i),w=b&&s?"":this.translateUnit(b,"year",i);switch(e){case"seconds":return m;case"minutes":return n===0?`${u}`:`${u} ${m}`;case"hours":return o===0&&n===0?`${p}`:`${p} ${u} ${m}`;case"days":return f===0&&o===0&&n===0?`${F}`:`${F} ${p} ${u} ${m}`;case"months":return U===0&&f===0&&o===0&&n===0?`${C}`:`${C} ${F} ${p} ${u} ${m}`;case"years":return E===0&&U===0&&f===0&&o===0&&n===0?`${w}`:`${w} ${C} ${F} ${p} ${u} ${m}`;case"=years":return w;case"=months":return C;case"=days":return F;case"=hours":return p;case"=minutes":return u;case"=seconds":return m;case"full":default:let h="";return b>0&&(h+=w+" "),M>0&&(h+=C+" "),D>0&&(h+=F+" "),P>0&&(h+=p+" "),S>0&&(h+=u+" "),n>0&&(h+=m+" "),h.trim()}}translateUnit(t,e,i){let s=`TimeUnit${i==="short"?"Short":""}${R.capitalFirst(e)}`;return this.translate.instant(s,{value:t})}static{this.\u0275fac=function(e){return new(e||r)(O($))}}static{this.\u0275prov=z({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();v();var K=(()=>{class r{constructor(t,e,i){this.formatterService=t,this.translate=e,this.cdr=i,this.lastValue="",this.langChangeSub=null}transform(t,e,i,s){return this.langChangeSub||(this.langChangeSub=this.translate.onLangChange.subscribe(()=>{this.lastValue=this.updateValue(t,e,i,s),this.cdr.markForCheck()})),this.lastValue=this.updateValue(t,e,i,s),this.lastValue}updateValue(t,e,i,s){return a.isSet(t)?this.formatterService.formatElapsedTime(t,e,i,s):""}ngOnDestroy(){this.langChangeSub?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||r)(c(T,16),c($,16),c(I,16))}}static{this.\u0275pipe=l({name:"pawFormatElapsed",type:r,pure:!1,standalone:!1})}}return r})();j();y();var X=(()=>{class r{constructor(t){this.formatterService=t}transform(t,e){return a.isSet(t)?this.formatterService.formatElapsedTimeDigits(t,e):""}static{this.\u0275fac=function(e){return new(e||r)(c(T,16))}}static{this.\u0275pipe=l({name:"pawFormatElapsedDigits",type:r,pure:!0,standalone:!1})}}return r})();q();x();y();var _=(()=>{class r{transform(t,e,i){return d.thousands(d.currency(t,i,e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275pipe=l({name:"pawFormatCurrency",type:r,pure:!0,standalone:!1})}}return r})();x();j();x();y();v();var at=(()=>{class r{constructor(t,e){this.translate=t,this.cdr=e,this.lastValue="",this.langChangeSub=null}transform(t){return this.langChangeSub||(this.langChangeSub=this.translate.onLangChange.subscribe(()=>{this.lastValue=this.updateValue(t),this.cdr.markForCheck()})),this.lastValue=this.updateValue(t),this.lastValue}updateValue(t){return a.isSet(t)?a.isString(t)?d.dateFromIso(t):d.dateFromIso(t.toISOString()):""}ngOnDestroy(){this.langChangeSub?.unsubscribe()}static{this.\u0275fac=function(e){return new(e||r)(c($,16),c(I,16))}}static{this.\u0275pipe=l({name:"pawFormatDate",type:r,pure:!1,standalone:!1})}}return r})();y();var yt=(()=>{class r{static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275mod=L({type:r})}static{this.\u0275inj=B({imports:[N]})}}return r})();export{_ as a,T as b,K as c,X as d,at as e,yt as f};
