import{h as y,i as D}from"./chunk-ISCRPPFS.js";import{c as i,d as P}from"./chunk-GYIOPDJL.js";import{f as p}from"./chunk-EBMUBP7P.js";var s,h=p(()=>{"use strict";s=(()=>{class l{static{this.setParam=null}static{this.sys=null}static{this.locale="sl-SI"}static{this.formatting={datetime:{date:"dd.MM.yyyy",dateTime:"dd.MM.yyyy HH:mm"},numeral:{currencyCode:"EUR",decimalSeparator:",",thousandsSeparator:"."}}}}return l})()});var S,T=p(()=>{"use strict";D();P();h();S=class l{static currency(t,r,n=s.sys?.defaultDecimalPlacesPrice||2){if(t===void 0&&(t=0),!i.isSet(r))return l.decimal(t,n);let a={style:"currency",currency:r,minimumFractionDigits:s.sys?.defaultDecimalPlacesPrice,maximumFractionDigits:s.sys?.defaultDecimalPlacesPrice};return new Intl.NumberFormat(s.locale,a).format(t)}static decimal(t,r=s.sys?.defaultDecimalPlacesPrice||2,n=s.formatting.numeral.decimalSeparator,a=s.formatting.numeral.thousandsSeparator){let e=i.numToStr(i.isNumber(t)?t:i.strToFloat(t));if(i.isEmpty(e)&&(e="0"),e.indexOf(".")===-1&&i.isSet(r)&&r>0)e+=".0";else if(r===0)return i.isNumber(t)?i.numToStr(t):i.numToStr(i.strToNum(t));let m=e.split("."),c=i.zeroPad(m[1]||"",r);e=`${m[0]}.${c}`;let d=e.indexOf(".");return d>-1&&n!=="."?(e=e.replace(".",n),e.substring(0,d+(r||0)+1)):e}static thousands(t,r=s.formatting.numeral.thousandsSeparator){let n=t.indexOf(".")>-1,a=n?t.indexOf("."):t.indexOf(",");n?r=",":!n&&r===","&&(r=".");let e=t.substring(0,a),m=0,c="";for(let o=0;o<e.length;o++){if(e[o]!=="0"){m=o;break}c+="0"}let d=m>0?m-1:0,f="";for(let o=e.length-1;o>=m;o--){let g=e[o],u=e.length-o+d;f=(u>m&&u<e.length&&u%3===0?r:"")+g+f}return(f!="0"?c:"")+f+t.substring(a)}static formatNumberToThousands(t,r=0,n=s.formatting.numeral.thousandsSeparator){if(t==null||t==="")return"0";let a=typeof t=="string"?parseFloat(t):t;return isNaN(a)?"0":a.toLocaleString(s.locale||"en-US",{minimumFractionDigits:r,maximumFractionDigits:r})}static date(t,r=s.formatting.datetime.date,n="MMM d yyyy hh:mma"){return this.datetime(t,r,n)}static dateFromIso(t,r=s.formatting.datetime.date){if(!i.isSet(t)||i.isString(t)&&t.length===0)return"";let n=t instanceof Date?t.toISOString():i.collapseWhitespace(t),a=y.fromISO(n);return a.isValid?a.toFormat(r):(console.error("Invalid date format"),n)}static datetime(t,r,n="MMM d yyyy hh:mma"){if(i.notSet(t))return"";let a=y.fromFormat(i.collapseWhitespace(t),n);return a.isValid?a.toFormat(r):(console.error("Invalid date format"),t)}}});export{s as a,h as b,S as c,T as d};
