UNPKG

weak-dictionary

Version:
1 lines 10.9 kB
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.weakdictionary=n():t.weakdictionary=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";var r=e(1)["default"],o=function(){this._weakMap=new r,this._keys=[]};o.prototype.set=function(t,n){return this._keys.push(t),this._weakMap.set(t,n)},o.prototype.has=function(t){return this._weakMap.has(t)},o.prototype.get=function(t){return this._weakMap.get(t)},o.prototype["delete"]=function(t){var n=this._weakMap["delete"](t);return this._keys.splice(this._keys.indexOf(t),1),n},o.prototype.forEach=function(t){var n=this;this._keys.forEach(function(e){n.has(e)&&t(e,n.get(e))})},o.prototype.clear=function(){var t=this;this._keys.forEach(function(n){if(t.has(n)){var e=t.get(n);e&&t["delete"](n)}}),this._weakMap=new r,this._keys=[]},o.prototype.getKeys=function(){return this._keys},o.prototype.getSize=function(){return this.refresh(),this._keys.length},o.prototype.refresh=function(){var t=this,n=[];this._keys.forEach(function(e){t.has(e)||n.push(e)})},t.exports=o},function(t,n,e){t.exports={"default":e(2),__esModule:!0}},function(t,n,e){e(3),e(4),e(30),t.exports=e(17).WeakMap},function(t,n){},function(t,n,e){e(5);var r=e(8);r.NodeList=r.HTMLCollection=r.Array},function(t,n,e){"use strict";var r=e(6),o=e(7),i=e(8),u=e(9);t.exports=e(13)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n){t.exports=function(){}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n){t.exports={}},function(t,n,e){var r=e(10),o=e(12);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(11);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){"use strict";var r=e(14),o=e(15),i=e(18),u=e(19),s=e(24),c=e(25)("iterator"),f=e(8),a=e(28),p=e(29),h=e(20).getProto,l=!([].keys&&"next"in[].keys()),y="@@iterator",v="keys",d="values",x=function(){return this};t.exports=function(t,n,e,g,_,w,b){a(e,n,g);var k,m,E=function(t){if(!l&&t in j)return j[t];switch(t){case v:return function(){return new e(this,t)};case d:return function(){return new e(this,t)}}return function(){return new e(this,t)}},M=n+" Iterator",j=t.prototype,O=j[c]||j[y]||_&&j[_],A=O||E(_);if(O){var S=h(A.call(new t));p(S,M,!0),!r&&s(j,y)&&u(S,c,x)}if(r&&!b||!l&&c in j||u(j,c,A),f[n]=A,f[M]=x,_)if(k={values:_==d?A:E(d),keys:w?A:E(v),entries:_!=d?A:E("entries")},b)for(m in k)m in j||i(j,m,k[m]);else o(o.P+o.F*l,n,k);return k}},function(t,n){t.exports=!0},function(t,n,e){var r=e(16),o=e(17),i="prototype",u=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,e){var c,f,a,p,h=t&s.G,l=t&s.P,y=h?r:t&s.S?r[n]:(r[n]||{})[i],v=h?o:o[n]||(o[n]={});h&&(e=n);for(c in e)f=!(t&s.F)&&y&&c in y,f&&c in v||(a=f?y[c]:e[c],h&&"function"!=typeof y[c]?p=e[c]:t&s.B&&f?p=u(a,r):t&s.W&&y[c]==a?!function(t){p=function(n){return this instanceof t?new t(n):t(n)},p[i]=t[i]}(a):p=l&&"function"==typeof a?u(Function.call,a):a,v[c]=p,l&&((v[i]||(v[i]={}))[c]=a))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){var e=t.exports={version:"1.2.5"};"number"==typeof __e&&(__e=e)},function(t,n,e){t.exports=e(19)},function(t,n,e){var r=e(20),o=e(21);t.exports=e(22)?function(t,n,e){return r.setDesc(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){var e=Object;t.exports={create:e.create,getProto:e.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:e.getOwnPropertyDescriptor,setDesc:e.defineProperty,setDescs:e.defineProperties,getKeys:e.keys,getNames:e.getOwnPropertyNames,getSymbols:e.getOwnPropertySymbols,each:[].forEach}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){t.exports=!e(23)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(26)("wks"),o=e(27),i=e(16).Symbol;t.exports=function(t){return r[t]||(r[t]=i&&i[t]||(i||o)("Symbol."+t))}},function(t,n,e){var r=e(16),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){"use strict";var r=e(20),o=e(21),i=e(29),u={};e(19)(u,e(25)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r.create(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n,e){var r=e(20).setDesc,o=e(24),i=e(25)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){"use strict";var r=e(20),o=e(18),i=e(31),u=e(34),s=e(24),c=i.frozenStore,f=i.WEAK,a=Object.isExtensible||u,p={},h=e(49)("WeakMap",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){if(u(t)){if(!a(t))return c(this).get(t);if(s(t,f))return t[f][this._i]}},set:function(t,n){return i.def(this,t,n)}},i,!0,!0);7!=(new h).set((Object.freeze||Object)(p),7).get(p)&&r.each.call(["delete","has","get","set"],function(t){var n=h.prototype,e=n[t];o(n,t,function(n,r){if(u(n)&&!a(n)){var o=c(this)[t](n,r);return"set"==t?this:o}return e.call(this,n,r)})})},function(t,n,e){"use strict";var r=e(19),o=e(32),i=e(33),u=e(35),s=e(36),c=e(45),f=e(27)("weak"),a=e(34),p=e(24),h=Object.isExtensible||a,l=c(5),y=c(6),v=0,d=function(t){return t._l||(t._l=new x)},x=function(){this.a=[]},g=function(t,n){return l(t.a,function(t){return t[0]===n})};x.prototype={get:function(t){var n=g(this,t);return n?n[1]:void 0},has:function(t){return!!g(this,t)},set:function(t,n){var e=g(this,t);e?e[1]=n:this.a.push([t,n])},"delete":function(t){var n=y(this.a,function(n){return n[0]===t});return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,r){var i=t(function(t,o){u(t,i,n),t._i=v++,t._l=void 0,void 0!=o&&s(o,e,t[r],t)});return o(i.prototype,{"delete":function(t){return a(t)?h(t)?p(t,f)&&p(t[f],this._i)&&delete t[f][this._i]:d(this)["delete"](t):!1},has:function(t){return a(t)?h(t)?p(t,f)&&p(t[f],this._i):d(this).has(t):!1}}),i},def:function(t,n,e){return h(i(n))?(p(n,f)||r(n,f,{}),n[f][t._i]=e):d(t).set(n,e),t},frozenStore:d,WEAK:f}},function(t,n,e){var r=e(18);t.exports=function(t,n){for(var e in n)r(t,e,n[e]);return t}},function(t,n,e){var r=e(34);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError(e+": use the 'new' operator!");return t}},function(t,n,e){var r=e(37),o=e(39),i=e(40),u=e(33),s=e(41),c=e(43);t.exports=function(t,n,e,f){var a,p,h,l=c(t),y=r(e,f,n?2:1),v=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(i(l))for(a=s(t.length);a>v;v++)n?y(u(p=t[v])[0],p[1]):y(t[v]);else for(h=l.call(t);!(p=h.next()).done;)o(h,y,p.value,n)}},function(t,n,e){var r=e(38);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(33);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(i){var u=t["return"];throw void 0!==u&&r(u.call(t)),i}}},function(t,n,e){var r=e(8),o=e(25)("iterator"),i=Array.prototype;t.exports=function(t){return(r.Array||i[o])===t}},function(t,n,e){var r=e(42),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(44),o=e(25)("iterator"),i=e(8);t.exports=e(17).getIteratorMethod=function(t){return void 0!=t?t[o]||t["@@iterator"]||i[r(t)]:void 0}},function(t,n,e){var r=e(11),o=e(25)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=(n=Object(t))[o])?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(37),o=e(10),i=e(46),u=e(41),s=e(47);t.exports=function(t){var n=1==t,e=2==t,c=3==t,f=4==t,a=6==t,p=5==t||a;return function(h,l,y){for(var v,d,x=i(h),g=o(x),_=r(l,y,3),w=u(g.length),b=0,k=n?s(h,w):e?s(h,0):void 0;w>b;b++)if((p||b in g)&&(v=g[b],d=_(v,b,x),t))if(n)k[b]=d;else if(d)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:k.push(v)}else if(f)return!1;return a?-1:c||f?f:k}}},function(t,n,e){var r=e(12);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(34),o=e(48),i=e(25)("species");t.exports=function(t,n){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),new(void 0===e?Array:e)(n)}},function(t,n,e){var r=e(11);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(16),o=e(20),i=e(15),u=e(23),s=e(19),c=e(32),f=e(36),a=e(35),p=e(34),h=e(22),l=e(29);t.exports=function(t,n,e,y,v,d){var x=r[t],g=x,_=v?"set":"add",w=g&&g.prototype,b={};return h&&"function"==typeof g&&(d||w.forEach&&!u(function(){(new g).entries().next()}))?(g=n(function(n,e){a(n,g,t),n._c=new x,void 0!=e&&f(e,v,n[_],n)}),o.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(t){var n="add"==t||"set"==t;t in w&&(!d||"clear"!=t)&&s(g.prototype,t,function(e,r){if(!n&&d&&!p(e))return"get"==t?void 0:!1;var o=this._c[t](0===e?0:e,r);return n?this:o})}),"size"in w&&o.setDesc(g.prototype,"size",{get:function(){return this._c.size}})):(g=y.getConstructor(n,t,v,_),c(g.prototype,e)),l(g,t),b[t]=g,i(i.G+i.W+i.F,b),d||y.setStrong(g,t,v),g}}])});