import{ua as m}from"./chunk-OXZWBTVI.js";import{X as s,gb as p}from"./chunk-5ONOZUNN.js";var f=class a{decimalPipe=s(m);transform(t,e=!1){if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let r=this.#t(),n=r?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r?1e3:1024));i=Math.min(i,n.length-1);let l=t/Math.pow(r?1e3:1024,i),o=this.decimalPipe.transform(l,"1.0-2");return o?`${o} ${e?n[i]:n[i].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(r=>e.includes(r)):!1}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=p({name:"bytes",type:a,pure:!0})};export{f as a};
