/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/date","../../core/JSONSupport","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/enumeration","../../core/accessorSupport/decorators/subclass","../../intl/date","../../intl/number"],(function(t,r,e,o,i,a,s,n,p,c,u,m){"use strict";var l;let d=l=function(r){function e(t){var e;return(e=r.call(this,t)||this).dateFormat=null,e.dateTimeFormatOptions=null,e.digitSeparator=!1,e.places=null,e}t._inheritsLoose(e,r);var o=e.prototype;return o.clone=function(){return new l({dateFormat:this.dateFormat,digitSeparator:this.digitSeparator,places:this.places})},o.format=function(t){return this.dateFormat?u.formatDate(t,{...u.convertDateFormatToIntlOptions(this.dateFormat),...this.dateTimeFormatOptions}):m.formatNumber(t,m.convertNumberFormatToIntlOptions(this))},o.formatRasterPixelValue=function(t){let r,e;return t.trim().includes(",")?(r=",",e=r+" ",this._formatDelimitedString(t,r,e,this)):t.trim().includes(";")?(r=";",e=r+" ",this._formatDelimitedString(t,r,e,this)):t.trim().includes(" ")?(r=e=" ",this._formatDelimitedString(t,r,e,this)):this.format(Number(t))},o._formatDelimitedString=function(t,r,e,o){return t&&r&&e&&o?t.trim().split(r).map((t=>this.format(Number(t)))).join(e):t},e}(o.JSONSupport);r.__decorate([p.enumeration(e.dictionary)],d.prototype,"dateFormat",void 0),r.__decorate([i.property({type:Object,json:{read:!1}})],d.prototype,"dateTimeFormatOptions",void 0),r.__decorate([i.property({type:Boolean,json:{write:!0}})],d.prototype,"digitSeparator",void 0),r.__decorate([i.property({type:n.Integer,json:{write:!0}})],d.prototype,"places",void 0),d=l=r.__decorate([c.subclass("esri.popup.support.FieldInfoFormat")],d);return d}));
