class t{validate({storageLimitGb:e,currentTotalBytes:s,existingEntryBytes:B,incomingEntryBytes:n,errorMessagePrefix:d}){const c=t.#t(e),r=s+n-B;if(r>c){const o=r-c;throw new Error(`${d} exceeded: ${t.#e(r)} GB / ${t.#e(c)} GB (exceeded by ${t.#c(o)})`)}}static#e(e){return(e/(1024*1024*1024)).toFixed(2)}static#t(e){return e*1024*1024*1024}static#c(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:e>=1024?`${(e/1024).toFixed(2)} KB`:`${e} B`}}export{t as StorageLimitValidator};
