/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/js-linkedmap@1.0.0/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var isArrayLike=require("celia/isArrayLike"),_forEach=require("celia/_forEach"),forOwn=require("celia/forOwn"),append=require("celia/_append"),alias=require("celia/alias"),LinkedMap=function(t){this.clear().putAll(t)};LinkedMap.prototype._clone=function(t){t._link=this._link.slice(0);var e=Object.create(null);return forOwn(this._map,(function(t,n){e[n]=t})),t._map=e,t},LinkedMap.prototype._getHash=function(t){return String(t)},LinkedMap.prototype.clear=function(){return this._link=[],this._map=Object.create(null),this},LinkedMap.prototype.clone=function(){return this._clone(new LinkedMap)},LinkedMap.prototype.containsKey=function(t){return t in this._map},LinkedMap.prototype.containsValue=function(t){var e=this._link,n=this._map;return e.some((function(e){return n[e]===t}))},LinkedMap.prototype.forEach=function(t){var e=this._link,n=this._map;return _forEach(e,(function(e){return t(n[e],e)})),this},LinkedMap.prototype.get=function(t,e){t=this._getHash(t);var n=this._map[t];return void 0===n?e:n},LinkedMap.prototype.isEmpty=function(){return 0===this._link.length},LinkedMap.prototype.keys=function(t){return t?_forEach(this._link,t):this._link.slice(0)},LinkedMap.prototype.put=function(t,e){t=this._getHash(t);var n=this._link,i=this._map;return!(t in i)&&append(n,t),i[t]=e,this},LinkedMap.prototype.putAll=function(t){var e=this,n=0;return isArrayLike(t)?_forEach(t,(function(t){var i=t[0],r=t[1];e.put(i,r),n++})):forOwn(t,(function(t,i){e.put(i,t),n++})),n},LinkedMap.prototype.remove=function(t,e){var n=arguments.length,i=!1,r=this._map;switch(n){case 1:(t=this._getHash(t))in r&&(delete r[t],i=!0);break;case 2:(t=this._getHash(t))in r&&r[t]===e&&(delete r[t],i=!0);break;default:return!1}if(i){var a=this._link;a.splice(a.indexOf(t),1)}return i},LinkedMap.prototype.replace=function(t,e,n){var i=arguments.length,r=this._map;switch(i){case 2:if((t=this._getHash(t))in r)return r[t]=e,!0;break;case 3:if((t=this._getHash(t))in r&&r[t]===e)return r[t]=n,!0}return!1},LinkedMap.prototype.size=function(){return this._link.length},LinkedMap.prototype.toString=function(){return"[object LinkedMap]"},LinkedMap.prototype.values=function(t){var e=this._link,n=this._map;return t?_forEach(e,(function(e,i){return t(n[e],i)})):e.map((function(t){return n[t]}))};var proto=LinkedMap.prototype;Symbol&&Symbol.iterator&&(proto[Symbol.iterator]=function(){var t=this._link,e=this._map,n=0,i=t.length;return{next:function(){var r=t[n];return{value:[r,e[r],n],done:++n>i}}}}),alias(proto,{keys:"keySet",put:"set",remove:"delete"}),module.exports=LinkedMap;
//# sourceMappingURL=/sm/39624057a357289a44c4beff0b861def09aaa7687a8a688559c95180c09be6cc.map