let table,timer;const cache=new Map;function toRadix(a,b=255){if(!table){table=Array(b);for(let a=0;a<b;a++)table[a]=a+1;table=String.fromCharCode.apply(null,table)}let c,d=a,e="";for(;c=d%b,e=table.charAt(c)+e,d=0|d/b,!!d;);return e}export default function(a){if(!timer)timer=setTimeout(clear,1);else if(cache.has(a))return cache.get(a);const b=toRadix("number"==typeof a?a:lcg(a));return 2e5<cache.size&&cache.clear(),cache.set(a,b),b}function lcg(a){if("number"==typeof a)return a&4294967295;let b=0;for(let c=0;c<a.length;c++)b=(b*33^a.charCodeAt(c))&4294967295;return b+2147483648}function clear(){timer=null,cache.clear()}