/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{ArcadeExecutionError as r}from"./executionError.js";function t(r){return r.toLowerCase().replaceAll(/[\s-]+/g,"")}class o{constructor(r,o){const e=new Map;for(const n of r){const r=t(n);if(e.has(r))throw new Error(`${n} already added as ${e.get(r)}`);e.set(r,n)}if(null!=o)for(const[n,s]of o){const r=t(n);if(e.has(r))throw new Error(`${n} already associated with ${e.get(r)}`);e.set(r,s)}this._enumMap=e}lookup(r){return this._enumMap.get(t(r))}get(t){const o=this.lookup(t);if(null==o)throw new r(null,"InvalidParameter",null);return o}}export{o as StringEnum,t as toStringEnumKey};
