/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{clone as i}from"../lang.js";class s{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(t){const e=new s;return this._values.forEach((s,r)=>{t&&t.has(r)||e.set(r,i(s.value),s.origin)}),e}get(i,s){s=this._normalizeOrigin(s);const t=this._values.get(i);return null==s||t?.origin===s?t?.value:void 0}originOf(i){return this._values.get(i)?.origin??7}keys(i){i=this._normalizeOrigin(i);const s=[...this._values.keys()];return null==i?s:s.filter(s=>this._values.get(s)?.origin===i)}set(i,s,e){if(0===(e=this._normalizeOrigin(e))){const s=this._values.get(i);if(null!=s?.origin&&s.origin>e)return}this._values.set(i,new t(s,e))}delete(i,s){null!=(s=this._normalizeOrigin(s))&&this._values.get(i)?.origin!==s||this._values.delete(i)}has(i,s){return null!=(s=this._normalizeOrigin(s))?this._values.get(i)?.origin===s:this._values.has(i)}isAtOrigin(i,s){return s=this._normalizeOrigin(s),this.has(i,s)&&this.originOf(i)===s}isBelowOrigin(i,s){return s=this._normalizeOrigin(s),!this.has(i)||this.originOf(i)<s}forEach(i){this._values.forEach(({value:s},t)=>i(s,t))}_normalizeOrigin(i){if(null!=i)return 0===i?i:7}}class t{constructor(i,s){this.value=i,this.origin=s}}export{s as DefaultsStore};
