import{b as n}from"./chunk-5IDV7BCW.js";var r=class{static parseDecimal(t,e=2){if(t==null||t==="")return null;let s=typeof t=="string"?t:String(t),i=parseFloat(s);return isNaN(i)?null:parseFloat(n.decimal(i,e))}static formatForInput(t,e=2){if(t===null||t===0)return"";let s=parseFloat(String(t));return isNaN(s)?"":n.decimal(s,e)}static parseId(t){if(!t)return null;let e=typeof t=="string"?parseInt(t):t;return isNaN(e)?null:e}static compareUserIds(t,e){if(!t||!e)return!1;let s=typeof t=="string"?parseInt(t):t,i=typeof e=="string"?parseInt(e):e;return!isNaN(s)&&!isNaN(i)&&s===i}};var a=class{static createDate(t){if(!t)return null;if(t instanceof Date)return t;let e=new Date(t);return isNaN(e.getTime())?null:e}static formatDateForDisplay(t,e){return t?typeof t=="string"?n.dateFromIso(t,e):n.dateFromIso(t.toISOString(),e):""}static validateDateRange(t,e){if(!t||!e)return!0;let s=this.createDate(t),i=this.createDate(e);return!s||!i?!0:i>s}static formatForApi(t){if(!t)return null;let e=this.createDate(t);return e?e.toISOString().split("T")[0]:null}static parseIsoWithDefault(t,e=null){return t&&this.createDate(t)||e}};export{r as a,a as b};
