import { o } from "./chunk-IKP3YN53.js"; // node_modules/@arcgis/core/core/jsonMap.js var s = class { constructor(s2, o3 = { ignoreUnknown: false, useNumericKeys: false }) { this.jsonToAPI = s2, this.options = o3, this.apiValues = [], this.jsonValues = [], this.apiToJSON = this._invertMap(s2), this.apiValues = this._getKeysSorted(this.apiToJSON), this.jsonValues = this._getKeysSorted(this.jsonToAPI), this.read = (t) => this.fromJSON(t), this.write = (s3, o4, i) => { const n = this.toJSON(s3); n !== void 0 && o(i, n, o4); }, this.write.isJSONMapWriter = true; } toJSON(t) { if (this.apiToJSON.hasOwnProperty(t)) { const s2 = this.apiToJSON[t]; return this.options.useNumericKeys ? +s2 : s2; } return this.options.ignoreUnknown ? void 0 : t; } fromJSON(t) { return this.jsonToAPI.hasOwnProperty(t) ? this.jsonToAPI[t] : this.options.ignoreUnknown ? void 0 : t; } _invertMap(t) { const s2 = {}; for (const o3 in t) s2[t[o3]] = o3; return s2; } _getKeysSorted(t) { const s2 = []; for (const o3 in t) s2.push(o3); return s2.sort(), s2; } }; function o2() { return function(t, o3) { return new s(t, { ignoreUnknown: true, ...o3 }); }; } export { s, o2 as o }; //# sourceMappingURL=chunk-PDKDCAAD.js.map