diff --git a/dist/index.js b/dist/index.js index ff7c00c..b1825e7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,3 +1,3 @@ /*! For license information please see index.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Pokedex=t():e.Pokedex=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={669:(e,t,r)=>{e.exports=r(609)},970:(e,t,r)=>{"use strict";var n=r(867),o=r(26),i=r(97),a=r(327),s=r(685),c=r(687),u=r(938).http,f=r(938).https,l=r(310),d=r(796),h=r(288).version,p=r(61),m=r(481),v=r(655),g=r(263),y=/https:?/;function b(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,b(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,r){var _;function w(){e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_)}var E=function(e){w(),t(e)},S=function(e){w(),r(e)},x=e.data,R=e.headers,I={};if(Object.keys(R).forEach((function(e){I[e.toLowerCase()]=e})),"user-agent"in I?R[I["user-agent"]]||delete R[I["user-agent"]]:R["User-Agent"]="axios/"+h,x&&!n.isStream(x)){if(Buffer.isBuffer(x));else if(n.isArrayBuffer(x))x=Buffer.from(new Uint8Array(x));else{if(!n.isString(x))return S(p("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));x=Buffer.from(x,"utf-8")}I["content-length"]||(R["Content-Length"]=x.length)}var O=void 0;e.auth&&(O=(e.auth.username||"")+":"+(e.auth.password||""));var k=i(e.baseURL,e.url),N=l.parse(k),j=N.protocol||"http:";if(!O&&N.auth){var T=N.auth.split(":");O=(T[0]||"")+":"+(T[1]||"")}O&&I.authorization&&delete R[I.authorization];var A=y.test(j),C=A?e.httpsAgent:e.httpAgent,P={path:a(N.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:R,agent:C,agents:{http:e.httpAgent,https:e.httpsAgent},auth:O};e.socketPath?P.socketPath=e.socketPath:(P.hostname=N.hostname,P.port=N.port);var B,L=e.proxy;if(!L&&!1!==L){var D=j.slice(0,-1)+"_proxy",q=process.env[D]||process.env[D.toUpperCase()];if(q){var U=l.parse(q),M=process.env.no_proxy||process.env.NO_PROXY,F=!0;if(M&&(F=!M.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&N.hostname.substr(N.hostname.length-e.length)===e||N.hostname===e)}))),F&&(L={host:U.hostname,port:U.port,protocol:U.protocol},U.auth)){var z=U.auth.split(":");L.auth={username:z[0],password:z[1]}}}}L&&(P.headers.host=N.hostname+(N.port?":"+N.port:""),b(P,L,j+"//"+N.hostname+(N.port?":"+N.port:"")+P.path));var H=A&&(!L||y.test(L.protocol));e.transport?B=e.transport:0===e.maxRedirects?B=H?c:s:(e.maxRedirects&&(P.maxRedirects=e.maxRedirects),B=H?f:u),e.maxBodyLength>-1&&(P.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(P.insecureHTTPParser=e.insecureHTTPParser);var W=B.request(P,(function(t){if(!W.aborted){var r=t,i=t.req||W;if(204!==t.statusCode&&"HEAD"!==i.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(d.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:i};if("stream"===e.responseType)a.data=r,o(E,S,a);else{var s=[],c=0;r.on("data",(function(t){s.push(t),c+=t.length,e.maxContentLength>-1&&c>e.maxContentLength&&(r.destroy(),S(p("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,i)))})),r.on("error",(function(t){W.aborted||S(m(t,e,null,i))})),r.on("end",(function(){var t=Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=n.stripBOM(t))),a.data=t,o(E,S,a)}))}}}));if(W.on("error",(function(t){W.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||S(m(t,e,null,W))})),e.timeout){var $=parseInt(e.timeout,10);if(isNaN($))return void S(p("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",W));W.setTimeout($,(function(){W.abort();var t=e.transitional||v.transitional;S(p("timeout of "+$+"ms exceeded",e,t.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",W))}))}(e.cancelToken||e.signal)&&(_=function(e){W.aborted||(W.abort(),S(!e||e&&e.type?new g("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_))),n.isStream(x)?x.on("error",(function(t){S(m(t,e,null,W))})).pipe(W):W.end(x)}))}},448:(e,t,r)=>{"use strict";var n=r(867),o=r(26),i=r(372),a=r(327),s=r(97),c=r(109),u=r(985),f=r(61),l=r(655),d=r(263);e.exports=function(e){return new Promise((function(t,r){var h,p=e.data,m=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(p)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(b+":"+_)}var w=s(e.baseURL,e.url);function E(){if(y){var n="getAllResponseHeaders"in y?c(y.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y};o((function(e){t(e),g()}),(function(e){r(e),g()}),i),y=null}}if(y.open(e.method.toUpperCase(),a(w,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(r(f("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){r(f("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||l.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||u(w))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in y&&n.forEach(m,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),v&&"json"!==v&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(r(!e||e&&e.type?new d("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),y.send(p)}))}},609:(e,t,r)=>{"use strict";var n=r(867),o=r(849),i=r(321),a=r(185),s=function e(t){var r=new i(t),s=o(i.prototype.request,r);return n.extend(s,i.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(655));s.Axios=i,s.Cancel=r(263),s.CancelToken=r(972),s.isCancel=r(502),s.VERSION=r(288).version,s.all=function(e){return Promise.all(e)},s.spread=r(713),s.isAxiosError=r(268),e.exports=s,e.exports.default=s},263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,r)=>{"use strict";var n=r(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(867),o=r(327),i=r(782),a=r(572),s=r(185),c=r(875),u=c.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=e;r.length;){var d=r.shift(),h=r.shift();try{l=d(l)}catch(e){h(e);break}}try{o=a(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=f},782:(e,t,r)=>{"use strict";var n=r(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:(e,t,r)=>{"use strict";var n=r(793),o=r(303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},61:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},572:(e,t,r)=>{"use strict";var n=r(867),o=r(527),i=r(502),a=r(655),s=r(263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},185:(e,t,r)=>{"use strict";var n=r(867);e.exports=function(e,t){t=t||{};var r={};function o(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function i(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return o(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(void 0,t[r])}function c(r){return r in t?o(e[r],t[r]):r in e?o(void 0,e[r]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,o=t(e);n.isUndefined(o)&&t!==c||(r[e]=o)})),r}},26:(e,t,r)=>{"use strict";var n=r(61);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:(e,t,r)=>{"use strict";var n=r(867),o=r(655);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},655:(e,t,r)=>{"use strict";var n=r(867),o=r(16),i=r(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?c=r(448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=r(970)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u},288:e=>{e.exports={version:"0.24.0"}},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,r)=>{"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,r)=>{"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:(e,t,r)=>{"use strict";var n=r(867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:(e,t,r)=>{"use strict";var n=r(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:(e,t,r)=>{"use strict";var n=r(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(o(n," has been removed"+(t?" in "+t:"")));return t&&!i[n]&&(i[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},867:(e,t,r)=>{"use strict";var n=r(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r{var n;e.exports=function(){if(!n){try{n=r(Object(function(){var e=new Error("Cannot find module 'debug'");throw e.code="MODULE_NOT_FOUND",e}()))("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},938:(e,t,r)=>{var n=r(310),o=n.URL,i=r(685),a=r(687),s=r(781).Writable,c=r(491),u=r(261),f=["abort","aborted","connect","error","socket","timeout"],l=Object.create(null);f.forEach((function(e){l[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var d=E("ERR_INVALID_URL","Invalid URL",TypeError),h=E("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),p=E("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),m=E("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=E("ERR_STREAM_WRITE_AFTER_END","write after end");function g(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function y(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(i){var a=i+":",s=r[a]=e[i],f=t[i]=Object.create(s);Object.defineProperties(f,{request:{value:function(e,i,s){if(x(e)){var f;try{f=_(new o(e))}catch(t){f=n.parse(e)}if(!x(f.protocol))throw new d({input:e});e=f}else o&&e instanceof o?e=_(e):(s=i,i=e,e={protocol:a});return R(i)&&(s=i,i=null),(i=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,i)).nativeProtocols=r,x(i.host)||x(i.hostname)||(i.hostname="::1"),c.equal(i.protocol,a,"protocol mismatch"),u("options",i),new g(i,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=f.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function b(){}function _(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function w(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function E(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function S(e){for(var t of f)e.removeListener(t,l[t]);e.on("error",b),e.abort()}function x(e){return"string"==typeof e||e instanceof String}function R(e){return"function"==typeof e}g.prototype=Object.create(s.prototype),g.prototype.abort=function(){S(this._currentRequest),this.emit("abort")},g.prototype.write=function(e,t,r){if(this._ending)throw new v;if(!(x(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;R(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new m),this.abort()):r&&r()},g.prototype.end=function(e,t,r){if(R(e)?(r=e,e=t=null):R(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},g.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},g.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},g.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){g.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(g.prototype,e,{get:function(){return this._currentRequest[e]}})})),g.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},g.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,f))o.on(i,l[i]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,c=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(S(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new p);else{var o,i=this._options.beforeRedirect;i&&(o=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],w(/^content-/i,this._options.headers));var s,f=w(/^host$/i,this._options.headers),l=n.parse(this._currentUrl),d=f||l.host,m=/^\w+:/.test(r)?this._currentUrl:n.format(Object.assign(l,{host:d}));try{s=n.resolve(m,r)}catch(e){return void this.emit("error",new h({cause:e}))}u("redirecting to",s),this._isRedirect=!0;var v=n.parse(s);if(Object.assign(this._options,v),(v.protocol!==l.protocol&&"https:"!==v.protocol||v.host!==d&&!function(e,t){c(x(e)&&x(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(v.host,d))&&w(/^(?:authorization|cookie)$/i,this._options.headers),R(i)){var g={headers:e.headers,statusCode:t},y={url:m,method:a,headers:o};try{i(this._options,g,y)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new h({cause:e}))}}},e.exports=y({http:i,https:a}),e.exports.wrap=y},483:e=>{e.exports=function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};t[a][0].call(u.exports,(function(e){return o(t[a][1][e]||e)}),u,u.exports,e,t,r,n)}return r[a].exports}for(var i=void 0,a=0;a=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function b(e){var t=h[e.name],r={};r.promise=new a((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function _(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var r=h[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function E(e,t){return new a((function(r,n){if(h[e.name]=h[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);b(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var r=a.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(l)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},r(t),_(e)}}))}function S(e){return E(e,!1)}function x(e){return E(e,!0)}function R(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.versione.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function I(e){return i([g(atob(e.data))],{type:e.type})}function O(e){return e&&e.__local_forage_encoded_blob}function k(e){var t=this,r=t._initReady().then((function(){var e=h[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(r,e,e),r}function N(e,t,r,n){void 0===n&&(n=1);try{var o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),x(e)})).then((function(){return function(e){b(e);for(var t=h[e.name],r=t.forages,n=0;n>4,f[c++]=(15&n)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return u}function J(e){var t,r=new Uint8Array(e),n="";for(t=0;t>2],n+=T[(3&r[t])<<4|r[t+1]>>4],n+=T[(15&r[t+1])<<2|r[t+2]>>6],n+=T[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var V={serialize:function(e,t){var r="";if(e&&(r=$.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===$.call(e.buffer))){var n,o=C;e instanceof ArrayBuffer?(n=e,o+=P):(n=e.buffer,"[object Int8Array]"===r?o+=L:"[object Uint8Array]"===r?o+=D:"[object Uint8ClampedArray]"===r?o+=q:"[object Int16Array]"===r?o+=U:"[object Uint16Array]"===r?o+=F:"[object Int32Array]"===r?o+=M:"[object Uint32Array]"===r?o+=z:"[object Float32Array]"===r?o+=H:"[object Float64Array]"===r?o+=W:t(new Error("Failed to get type for BinaryArray"))),t(o+J(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r="~~local_forage_type~"+e.type+"~"+J(this.result);t(C+B+r)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if(e.substring(0,9)!==C)return JSON.parse(e);var t,r=e.substring(13),n=e.substring(9,13);if(n===B&&A.test(r)){var o=r.match(A);t=o[1],r=r.substring(o[0].length)}var a=G(r);switch(n){case P:return a;case B:return i([a],{type:t});case L:return new Int8Array(a);case D:return new Uint8Array(a);case q:return new Uint8ClampedArray(a);case U:return new Int16Array(a);case F:return new Uint16Array(a);case M:return new Int32Array(a);case z:return new Uint32Array(a);case H:return new Float32Array(a);case W:return new Float64Array(a);default:throw new Error("Unkown type: "+n)}},stringToBuffer:G,bufferToString:J};function X(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function K(e,t,r,n,o,i){e.executeSql(r,n,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,a):X(e,t,(function(){e.executeSql(r,n,o,i)}),i)}),i):i(e,a)}),i)}function Y(e,t,r,n){var o=this;e=u(e);var i=new a((function(i,a){o.ready().then((function(){void 0===t&&(t=null);var s=t,c=o._dbInfo;c.serializer.serialize(t,(function(t,u){u?a(u):c.db.transaction((function(r){K(r,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(Y.apply(o,[e,s,r,n-1]));a(t)}}))}))})).catch(a)}));return s(i,r),i}var Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var o=new a((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(o){X(o,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=V,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){K(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,a=i.length,s=0;s '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var o=[],i=0;i0}var te={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=Z(e,this._defaultConfig),ee()?(this._dbInfo=t,t.serializer=V,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,o=n.length,i=localStorage.length,a=1,s=0;s=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],o=0;o=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):a.reject("Invalid arguments"),s(n,t),n}},re=function(e,t){for(var r=e.length,n=0;n{"use strict";e.exports=require("assert")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},781:e=>{"use strict";e.exports=require("stream")},310:e=>{"use strict";e.exports=require("url")},796:e=>{"use strict";e.exports=require("zlib")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Pokedex:()=>d});var e=r(483),t=r.n(e);const o=JSON.parse('[["getBerry","name","berry/:id/"],["getBerryFirmness","name","berry-firmness/:id/"],["getBerryFlavor","name","berry-flavor/:id/"],["getContestType","name","contest-type/:id/"],["getContestEffect","id","contest-effect/:id/"],["getSuperContestEffect","id","super-contest-effect/:id/"],["getEncounterMethod","name","encounter-method/:id/"],["getEncounterCondition","name","encounter-condition/:id/"],["getEncounterConditionValue","name","encounter-condition-value/:id/"],["getEvolutionChain","id","evolution-chain/:id/"],["getEvolutionTrigger","name","evolution-trigger/:id/"],["getGeneration","name","generation/:id/"],["getPokedex","name","pokedex/:id/"],["getVersion","name","version/:id/"],["getVersionGroup","name","version-group/:id/"],["getItem","name","item/:id/"],["getItemAttribute","name","item-attribute/:id/"],["getItemCategory","name","item-category/:id/"],["getItemFlingEffect","name","item-fling-effect/:id/"],["getItemPocket","name","item-pocket/:id/"],["getMachine","id","machine/:id/"],["getMove","name","move/:id/"],["getMoveAilment","name","move-ailment/:id/"],["getMoveBattleStyle","name","move-battle-style/:id/"],["getMoveCategory","name","move-category/:id/"],["getMoveDamageClass","name","move-damage-class/:id/"],["getMoveLearnMethod","name","move-learn-method/:id/"],["getMoveTarget","name","move-target/:id/"],["getLocation","name","location/:id/"],["getLocationArea","name","location-area/:id/"],["getPalParkArea","name","pal-park-area/:id/"],["getRegion","name","region/:id/"],["getAbility","name","ability/:id/"],["getCharacteristic","id","characteristic/:id/"],["getEggGroup","name","egg-group/:id/"],["getGender","name","gender/:id/"],["getGrowthRate","name","growth-rate/:id/"],["getNature","name","nature/:id/"],["getPokeathlonStat","name","pokeathlon-stat/:id/"],["getPokemon","name","pokemon/:id/"],["getPokemonEncounterAreas","name","pokemon/:id/encounters/"],["getPokemonColor","name","pokemon-color/:id/"],["getPokemonForm","name","pokemon-form/:id/"],["getPokemonHabitat","name","pokemon-habitat/:id/"],["getPokemonShape","name","pokemon-shape/:id/"],["getPokemonSpecies","name","pokemon-species/:id/"],["getStat","name","stat/:id/"],["getType","name","type/:id/"],["getLanguage","name","language/:id/"]]'),i=JSON.parse('[["getEndpoints",""],["getBerries","berry/"],["getBerriesFirmnesss","berry-firmness/"],["getBerriesFlavors","berry-flavor/"],["getContestTypes","contest-type/"],["getContestEffects","contest-effect/"],["getSuperContestEffects","super-contest-effect/"],["getEncounterMethods","encounter-method/"],["getEncounterConditions","encounter-condition/"],["getEncounterConditionValues","encounter-condition-value/"],["getEvolutionChains","evolution-chain/"],["getEvolutionTriggers","evolution-trigger/"],["getGenerations","generation/"],["getPokedexs","pokedex/"],["getVersions","version/"],["getVersionGroups","version-group/"],["getItems","item/"],["getItemAttributes","item-attribute/"],["getItemCategories","item-category/"],["getItemFlingEffects","item-fling-effect/"],["getItemPockets","item-pocket/"],["getMachines","machine/"],["getMoves","move/"],["getMoveAilments","move-ailment/"],["getMoveBattleStyles","move-battle-style/"],["getMoveCategories","move-category/"],["getMoveDamageClasses","move-damage-class/"],["getMoveLearnMethods","move-learn-method/"],["getMoveTargets","move-target/"],["getLocations","location/"],["getLocationAreas","location-area/"],["getPalParkAreas","pal-park-area/"],["getRegions","region/"],["getAbilities","ability/"],["getCharacteristics","characteristic/"],["getEggGroups","egg-group/"],["getGenders","gender/"],["getGrowthRates","growth-rate/"],["getNatures","nature/"],["getPokeathlonStats","pokeathlon-stat/"],["getPokemons","pokemon/"],["getPokemonColors","pokemon-color/"],["getPokemonForms","pokemon-form/"],["getPokemonHabitats","pokemon-habitat/"],["getPokemonShapes","pokemon-shape/"],["getPokemonSpecies","pokemon-species/"],["getStats","stat/"],["getTypes","type/"],["getLanguages","language/"]]');var a=r(669),s=r.n(a);const c="pokeapi-js-wrapper-";function u(e,r){return new Promise(((n,o)=>{t().ready().then((()=>{t().getItem(`${c}${r}`).then((t=>{null===t?f(e,r).then((e=>{n(e)})).catch((e=>{o(e)})):n(addCacheMark(t))})).catch((t=>{f(e,r).then((e=>{n(e)})).catch((e=>{o(e)}))}))})).catch((t=>{f(e,r).then((e=>{n(e)})).catch((e=>{o(e)}))}))}))}function f(e,r){return new Promise(((n,o)=>{let i={baseURL:`${e.protocol}://${e.hostName}/`,timeout:e.timeout};s().get(r,i).then((i=>{i.status>=400?o(i):(e.cache&&t().setItem(`${c}${r}`,i.data),n(i.data))})).catch((e=>{o(e)}))}))}class l{constructor(e={}){this.protocol="https",this.hostName="pokeapi.co",this.versionPath="/api/v2/",this.offset=0,this.limit=1e5,this.timeout=1e4,this.cache=!0,this.cacheImages=!1,e.hasOwnProperty("protocol")&&(this.protocol=e.protocol),e.hasOwnProperty("hostName")&&(this.hostName=e.hostName),e.hasOwnProperty("versionPath")&&(this.versionPath=e.versionPath),e.hasOwnProperty("offset")&&(this.offset=e.offset-1),e.hasOwnProperty("limit")&&(this.limit=e.limit),e.hasOwnProperty("timeout")&&(this.timeout=e.timeout),e.hasOwnProperty("cache")&&(this.cache=e.cache),e.hasOwnProperty("cacheImages")&&(this.cacheImages=e.cacheImages)}}t().config({name:"pokeapi-js-wrapper"});class d{constructor(e){this.config=new l(e),o.forEach((e=>{const t=function(e){return`${e[0]}By${function([e,...t]){return e.toUpperCase()+t.join("").toLowerCase()}(e[1])}`}(e);this[t]=t=>{if(t){if("number"==typeof t||"string"==typeof t)return u(this.config,`${this.config.versionPath}${e[2].replace(":id",t)}`);if("object"==typeof t)return Promise.all(function(e,t,r){return r.map((r=>u(e,`${e.versionPath}${t[2].replace(":id",r)}`)))}(this.config,e,t))}},this[function(e){return`${e[0]}`}(e)]=this[t]})),i.forEach((e=>{const t=`${e[0]}List`;this[t]=t=>{var r=this.config.limit,n=this.config.offset;return t&&(t.hasOwnProperty("offset")&&(n=t.offset),t.hasOwnProperty("limit")&&(r=t.limit)),u(this.config,`${this.config.versionPath}${e[1]}?limit=${r}&offset=${n}`)},this[e[0]]=this[t]})),this.config.cacheImages&&navigator&&window&&"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("./pokeapi-js-wrapper-sw.js",{scope:"./"}).catch((e=>{console.log("Pokeapi-js-wrapper SW installation failed with the following error:"),console.error(e)}))}))}getConfig(){return this.config}getCacheLength(){return t().length()}clearCache(){return t().clear()}resource(e){return"string"==typeof e?u(this.config,e):Array.isArray(e)?Promise.all(e.map((e=>u(this.config,e)))):"String or Array is required"}}})(),n})())); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Pokedex=t():e.Pokedex=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={505:(e,t,r)=>{e.exports=r(15)},960:(e,t,r)=>{"use strict";var n=r(516),o=r(522),i=r(615),a=r(106),s=r(611),c=r(692),u=r(164).http,f=r(164).https,l=r(16),d=r(725),h=r(641).version,p=r(763),m=r(449),v=r(987),g=r(928),y=/https:?/;function b(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,b(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,r){var _;function w(){e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_)}var E=function(e){w(),t(e)},S=function(e){w(),r(e)},R=e.data,x=e.headers,I={};if(Object.keys(x).forEach((function(e){I[e.toLowerCase()]=e})),"user-agent"in I?x[I["user-agent"]]||delete x[I["user-agent"]]:x["User-Agent"]="axios/"+h,R&&!n.isStream(R)){if(Buffer.isBuffer(R));else if(n.isArrayBuffer(R))R=Buffer.from(new Uint8Array(R));else{if(!n.isString(R))return S(p("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));R=Buffer.from(R,"utf-8")}I["content-length"]||(x["Content-Length"]=R.length)}var O=void 0;e.auth&&(O=(e.auth.username||"")+":"+(e.auth.password||""));var k=i(e.baseURL,e.url),N=l.parse(k),j=N.protocol||"http:";if(!O&&N.auth){var A=N.auth.split(":");O=(A[0]||"")+":"+(A[1]||"")}O&&I.authorization&&delete x[I.authorization];var T=y.test(j),C=T?e.httpsAgent:e.httpAgent,P={path:a(N.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:x,agent:C,agents:{http:e.httpAgent,https:e.httpsAgent},auth:O};e.socketPath?P.socketPath=e.socketPath:(P.hostname=N.hostname,P.port=N.port);var B,L=e.proxy;if(!L&&!1!==L){var D=j.slice(0,-1)+"_proxy",q=process.env[D]||process.env[D.toUpperCase()];if(q){var U=l.parse(q),M=process.env.no_proxy||process.env.NO_PROXY,F=!0;if(M&&(F=!M.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&N.hostname.substr(N.hostname.length-e.length)===e||N.hostname===e)}))),F&&(L={host:U.hostname,port:U.port,protocol:U.protocol},U.auth)){var z=U.auth.split(":");L.auth={username:z[0],password:z[1]}}}}L&&(P.headers.host=N.hostname+(N.port?":"+N.port:""),b(P,L,j+"//"+N.hostname+(N.port?":"+N.port:"")+P.path));var H=T&&(!L||y.test(L.protocol));e.transport?B=e.transport:0===e.maxRedirects?B=H?c:s:(e.maxRedirects&&(P.maxRedirects=e.maxRedirects),B=H?f:u),e.maxBodyLength>-1&&(P.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(P.insecureHTTPParser=e.insecureHTTPParser);var W=B.request(P,(function(t){if(!W.aborted){var r=t,i=t.req||W;if(204!==t.statusCode&&"HEAD"!==i.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(d.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:i};if("stream"===e.responseType)a.data=r,o(E,S,a);else{var s=[],c=0;r.on("data",(function(t){s.push(t),c+=t.length,e.maxContentLength>-1&&c>e.maxContentLength&&(r.destroy(),S(p("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,i)))})),r.on("error",(function(t){W.aborted||S(m(t,e,null,i))})),r.on("end",(function(){var t=Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=n.stripBOM(t))),a.data=t,o(E,S,a)}))}}}));if(W.on("error",(function(t){W.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||S(m(t,e,null,W))})),e.timeout){var $=parseInt(e.timeout,10);if(isNaN($))return void S(p("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",W));W.setTimeout($,(function(){W.abort();var t=e.transitional||v.transitional;S(p("timeout of "+$+"ms exceeded",e,t.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",W))}))}(e.cancelToken||e.signal)&&(_=function(e){W.aborted||(W.abort(),S(!e||e&&e.type?new g("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_))),n.isStream(R)?R.on("error",(function(t){S(m(t,e,null,W))})).pipe(W):W.end(R)}))}},592:(e,t,r)=>{"use strict";var n=r(516),o=r(522),i=r(948),a=r(106),s=r(615),c=r(631),u=r(202),f=r(763),l=r(987),d=r(928);e.exports=function(e){return new Promise((function(t,r){var h,p=e.data,m=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(p)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(b+":"+_)}var w=s(e.baseURL,e.url);function E(){if(y){var n="getAllResponseHeaders"in y?c(y.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y};o((function(e){t(e),g()}),(function(e){r(e),g()}),i),y=null}}if(y.open(e.method.toUpperCase(),a(w,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(r(f("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){r(f("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||l.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||u(w))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in y&&n.forEach(m,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),v&&"json"!==v&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(r(!e||e&&e.type?new d("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),y.send(p)}))}},15:(e,t,r)=>{"use strict";var n=r(516),o=r(12),i=r(155),a=r(343),s=function e(t){var r=new i(t),s=o(i.prototype.request,r);return n.extend(s,i.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(987));s.Axios=i,s.Cancel=r(928),s.CancelToken=r(191),s.isCancel=r(864),s.VERSION=r(641).version,s.all=function(e){return Promise.all(e)},s.spread=r(980),s.isAxiosError=r(19),e.exports=s,e.exports.default=s},928:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},191:(e,t,r)=>{"use strict";var n=r(928);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},155:(e,t,r)=>{"use strict";var n=r(516),o=r(106),i=r(471),a=r(490),s=r(343),c=r(841),u=c.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=e;r.length;){var d=r.shift(),h=r.shift();try{l=d(l)}catch(e){h(e);break}}try{o=a(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=f},471:(e,t,r)=>{"use strict";var n=r(516);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},615:(e,t,r)=>{"use strict";var n=r(137),o=r(680);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},763:(e,t,r)=>{"use strict";var n=r(449);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},490:(e,t,r)=>{"use strict";var n=r(516),o=r(881),i=r(864),a=r(987),s=r(928);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},449:e=>{"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},343:(e,t,r)=>{"use strict";var n=r(516);e.exports=function(e,t){t=t||{};var r={};function o(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function i(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return o(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(void 0,t[r])}function c(r){return r in t?o(e[r],t[r]):r in e?o(void 0,e[r]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,o=t(e);n.isUndefined(o)&&t!==c||(r[e]=o)})),r}},522:(e,t,r)=>{"use strict";var n=r(763);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},881:(e,t,r)=>{"use strict";var n=r(516),o=r(987);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},987:(e,t,r)=>{"use strict";var n=r(516),o=r(18),i=r(449),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?c=r(592):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=r(960)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u},641:e=>{e.exports={version:"0.24.0"}},12:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(516);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},680:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},948:(e,t,r)=>{"use strict";var n=r(516);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},137:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},19:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},202:(e,t,r)=>{"use strict";var n=r(516);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},18:(e,t,r)=>{"use strict";var n=r(516);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},631:(e,t,r)=>{"use strict";var n=r(516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},980:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},841:(e,t,r)=>{"use strict";var n=r(641).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(o(n," has been removed"+(t?" in "+t:"")));return t&&!i[n]&&(i[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},516:(e,t,r)=>{"use strict";var n=r(12),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r{var n;e.exports=function(){if(!n){try{n=r(Object(function(){var e=new Error("Cannot find module 'debug'");throw e.code="MODULE_NOT_FOUND",e}()))("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},164:(e,t,r)=>{var n=r(16),o=n.URL,i=r(611),a=r(692),s=r(203).Writable,c=r(613),u=r(507),f=!1;try{c(new o)}catch(e){f="ERR_INVALID_URL"===e.code}var l=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],d=["abort","aborted","connect","error","socket","timeout"],h=Object.create(null);d.forEach((function(e){h[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var p=O("ERR_INVALID_URL","Invalid URL",TypeError),m=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),v=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",m),g=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),y=O("ERR_STREAM_WRITE_AFTER_END","write after end"),b=s.prototype.destroy||E;function _(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof m?e:new m({cause:e}))}},this._performRequest()}function w(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",a=r[i]=e[n],s=t[n]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,n,a){return o&&e instanceof o?e=x(e):N(e)?e=x(S(e)):(a=n,n=R(e),e={protocol:i}),j(n)&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,N(n.host)||N(n.hostname)||(n.hostname="::1"),c.equal(n.protocol,i,"protocol mismatch"),u("options",n),new _(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=s.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function E(){}function S(e){var t;if(f)t=new o(e);else if(!N((t=R(n.parse(e))).protocol))throw new p({input:e});return t}function R(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new p({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new p({input:e.href||e});return e}function x(e,t){var r=t||{};for(var n of l)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),""!==r.port&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function I(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function O(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function k(e,t){for(var r of d)e.removeListener(r,h[r]);e.on("error",E),e.destroy(t)}function N(e){return"string"==typeof e||e instanceof String}function j(e){return"function"==typeof e}_.prototype=Object.create(s.prototype),_.prototype.abort=function(){k(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return k(this._currentRequest,e),b.call(this,e),this},_.prototype.write=function(e,t,r){if(this._ending)throw new y;if(!(N(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;j(t)&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new g),this.abort()):r&&r()},_.prototype.end=function(e,t,r){if(j(e)?(r=e,e=t=null):j(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,d))o.on(i,h[i]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,c=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(k(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new v;var a=this._options.beforeRedirect;a&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],I(/^content-/i,this._options.headers));var l,d,h=I(/^host$/i,this._options.headers),p=S(this._currentUrl),m=h||p.host,g=/^\w+:/.test(i)?this._currentUrl:n.format(Object.assign(p,{host:m})),y=(l=i,d=g,f?new o(l,d):S(n.resolve(d,l)));if(u("redirecting to",y.href),this._isRedirect=!0,x(y,this._options),(y.protocol!==p.protocol&&"https:"!==y.protocol||y.host!==m&&!function(e,t){c(N(e)&&N(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(y.host,m))&&I(/^(?:authorization|cookie)$/i,this._options.headers),j(a)){var b={headers:e.headers,statusCode:t},_={url:g,method:s,headers:r};a(this._options,b,_),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=w({http:i,https:a}),e.exports.wrap=w},790:e=>{e.exports=function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};t[a][0].call(u.exports,(function(e){return o(t[a][1][e]||e)}),u,u.exports,e,t,r,n)}return r[a].exports}for(var i=void 0,a=0;a=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function b(e){var t=h[e.name],r={};r.promise=new a((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function _(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var r=h[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function E(e,t){return new a((function(r,n){if(h[e.name]=h[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);b(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var r=a.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(l)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},r(t),_(e)}}))}function S(e){return E(e,!1)}function R(e){return E(e,!0)}function x(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.versione.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function I(e){return i([g(atob(e.data))],{type:e.type})}function O(e){return e&&e.__local_forage_encoded_blob}function k(e){var t=this,r=t._initReady().then((function(){var e=h[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(r,e,e),r}function N(e,t,r,n){void 0===n&&(n=1);try{var o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),R(e)})).then((function(){return function(e){b(e);for(var t=h[e.name],r=t.forages,n=0;n>4,f[c++]=(15&n)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return u}function J(e){var t,r=new Uint8Array(e),n="";for(t=0;t>2],n+=A[(3&r[t])<<4|r[t+1]>>4],n+=A[(15&r[t+1])<<2|r[t+2]>>6],n+=A[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var V={serialize:function(e,t){var r="";if(e&&(r=$.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===$.call(e.buffer))){var n,o=C;e instanceof ArrayBuffer?(n=e,o+=P):(n=e.buffer,"[object Int8Array]"===r?o+=L:"[object Uint8Array]"===r?o+=D:"[object Uint8ClampedArray]"===r?o+=q:"[object Int16Array]"===r?o+=U:"[object Uint16Array]"===r?o+=F:"[object Int32Array]"===r?o+=M:"[object Uint32Array]"===r?o+=z:"[object Float32Array]"===r?o+=H:"[object Float64Array]"===r?o+=W:t(new Error("Failed to get type for BinaryArray"))),t(o+J(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r="~~local_forage_type~"+e.type+"~"+J(this.result);t(C+B+r)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if(e.substring(0,9)!==C)return JSON.parse(e);var t,r=e.substring(13),n=e.substring(9,13);if(n===B&&T.test(r)){var o=r.match(T);t=o[1],r=r.substring(o[0].length)}var a=G(r);switch(n){case P:return a;case B:return i([a],{type:t});case L:return new Int8Array(a);case D:return new Uint8Array(a);case q:return new Uint8ClampedArray(a);case U:return new Int16Array(a);case F:return new Uint16Array(a);case M:return new Int32Array(a);case z:return new Uint32Array(a);case H:return new Float32Array(a);case W:return new Float64Array(a);default:throw new Error("Unkown type: "+n)}},stringToBuffer:G,bufferToString:J};function X(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function K(e,t,r,n,o,i){e.executeSql(r,n,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,a):X(e,t,(function(){e.executeSql(r,n,o,i)}),i)}),i):i(e,a)}),i)}function Y(e,t,r,n){var o=this;e=u(e);var i=new a((function(i,a){o.ready().then((function(){void 0===t&&(t=null);var s=t,c=o._dbInfo;c.serializer.serialize(t,(function(t,u){u?a(u):c.db.transaction((function(r){K(r,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(Y.apply(o,[e,s,r,n-1]));a(t)}}))}))})).catch(a)}));return s(i,r),i}var Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var o=new a((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(o){X(o,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=V,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new a((function(t,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){K(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,a=i.length,s=0;s '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var o=[],i=0;i0}var te={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=Z(e,this._defaultConfig),ee()?(this._dbInfo=t,t.serializer=V,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,o=n.length,i=localStorage.length,a=1,s=0;s=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],o=0;o=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):a.reject("Invalid arguments"),s(n,t),n}},re=function(e,t){for(var r=e.length,n=0;n{"use strict";e.exports=require("assert")},611:e=>{"use strict";e.exports=require("http")},692:e=>{"use strict";e.exports=require("https")},203:e=>{"use strict";e.exports=require("stream")},16:e=>{"use strict";e.exports=require("url")},725:e=>{"use strict";e.exports=require("zlib")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{Pokedex:()=>d});var e=r(790),t=r.n(e);const o=JSON.parse('[["getBerry","name","berry/:id/"],["getBerryFirmness","name","berry-firmness/:id/"],["getBerryFlavor","name","berry-flavor/:id/"],["getContestType","name","contest-type/:id/"],["getContestEffect","id","contest-effect/:id/"],["getSuperContestEffect","id","super-contest-effect/:id/"],["getEncounterMethod","name","encounter-method/:id/"],["getEncounterCondition","name","encounter-condition/:id/"],["getEncounterConditionValue","name","encounter-condition-value/:id/"],["getEvolutionChain","id","evolution-chain/:id/"],["getEvolutionTrigger","name","evolution-trigger/:id/"],["getGeneration","name","generation/:id/"],["getPokedex","name","pokedex/:id/"],["getVersion","name","version/:id/"],["getVersionGroup","name","version-group/:id/"],["getItem","name","item/:id/"],["getItemAttribute","name","item-attribute/:id/"],["getItemCategory","name","item-category/:id/"],["getItemFlingEffect","name","item-fling-effect/:id/"],["getItemPocket","name","item-pocket/:id/"],["getMachine","id","machine/:id/"],["getMove","name","move/:id/"],["getMoveAilment","name","move-ailment/:id/"],["getMoveBattleStyle","name","move-battle-style/:id/"],["getMoveCategory","name","move-category/:id/"],["getMoveDamageClass","name","move-damage-class/:id/"],["getMoveLearnMethod","name","move-learn-method/:id/"],["getMoveTarget","name","move-target/:id/"],["getLocation","name","location/:id/"],["getLocationArea","name","location-area/:id/"],["getPalParkArea","name","pal-park-area/:id/"],["getRegion","name","region/:id/"],["getAbility","name","ability/:id/"],["getCharacteristic","id","characteristic/:id/"],["getEggGroup","name","egg-group/:id/"],["getGender","name","gender/:id/"],["getGrowthRate","name","growth-rate/:id/"],["getNature","name","nature/:id/"],["getPokeathlonStat","name","pokeathlon-stat/:id/"],["getPokemon","name","pokemon/:id/"],["getPokemonEncounterAreas","name","pokemon/:id/encounters/"],["getPokemonColor","name","pokemon-color/:id/"],["getPokemonForm","name","pokemon-form/:id/"],["getPokemonHabitat","name","pokemon-habitat/:id/"],["getPokemonShape","name","pokemon-shape/:id/"],["getPokemonSpecies","name","pokemon-species/:id/"],["getStat","name","stat/:id/"],["getType","name","type/:id/"],["getLanguage","name","language/:id/"]]'),i=JSON.parse('[["getEndpoints",""],["getBerries","berry/"],["getBerriesFirmnesss","berry-firmness/"],["getBerriesFlavors","berry-flavor/"],["getContestTypes","contest-type/"],["getContestEffects","contest-effect/"],["getSuperContestEffects","super-contest-effect/"],["getEncounterMethods","encounter-method/"],["getEncounterConditions","encounter-condition/"],["getEncounterConditionValues","encounter-condition-value/"],["getEvolutionChains","evolution-chain/"],["getEvolutionTriggers","evolution-trigger/"],["getGenerations","generation/"],["getPokedexs","pokedex/"],["getVersions","version/"],["getVersionGroups","version-group/"],["getItems","item/"],["getItemAttributes","item-attribute/"],["getItemCategories","item-category/"],["getItemFlingEffects","item-fling-effect/"],["getItemPockets","item-pocket/"],["getMachines","machine/"],["getMoves","move/"],["getMoveAilments","move-ailment/"],["getMoveBattleStyles","move-battle-style/"],["getMoveCategories","move-category/"],["getMoveDamageClasses","move-damage-class/"],["getMoveLearnMethods","move-learn-method/"],["getMoveTargets","move-target/"],["getLocations","location/"],["getLocationAreas","location-area/"],["getPalParkAreas","pal-park-area/"],["getRegions","region/"],["getAbilities","ability/"],["getCharacteristics","characteristic/"],["getEggGroups","egg-group/"],["getGenders","gender/"],["getGrowthRates","growth-rate/"],["getNatures","nature/"],["getPokeathlonStats","pokeathlon-stat/"],["getPokemons","pokemon/"],["getPokemonColors","pokemon-color/"],["getPokemonForms","pokemon-form/"],["getPokemonHabitats","pokemon-habitat/"],["getPokemonShapes","pokemon-shape/"],["getPokemonSpecies","pokemon-species/"],["getStats","stat/"],["getTypes","type/"],["getLanguages","language/"]]');var a=r(505),s=r.n(a);const c="pokeapi-js-wrapper-";function u(e,r){return new Promise(((n,o)=>{t().ready().then((()=>{t().getItem(`${c}${r}`).then((t=>{null===t?f(e,r).then((e=>{n(e)})).catch((e=>{o(e)})):n(addCacheMark(t))})).catch((t=>{f(e,r).then((e=>{n(e)})).catch((e=>{o(e)}))}))})).catch((t=>{f(e,r).then((e=>{n(e)})).catch((e=>{o(e)}))}))}))}function f(e,r){return new Promise(((n,o)=>{let i={baseURL:`${e.protocol}://${e.hostName}/`,timeout:e.timeout};s().get(r,i).then((i=>{i.status>=400?o(i):(e.cache&&t().setItem(`${c}${r}`,i.data),n(i.data))})).catch((e=>{o(e)}))}))}class l{constructor(e={}){this.protocol="https",this.hostName="pokeapi.co",this.versionPath="/api/v2/",this.offset=0,this.limit=1e5,this.timeout=1e4,this.cache=!0,this.cacheImages=!1,e.hasOwnProperty("protocol")&&(this.protocol=e.protocol),e.hasOwnProperty("hostName")&&(this.hostName=e.hostName),e.hasOwnProperty("versionPath")&&(this.versionPath=e.versionPath),e.hasOwnProperty("offset")&&(this.offset=e.offset-1),e.hasOwnProperty("limit")&&(this.limit=e.limit),e.hasOwnProperty("timeout")&&(this.timeout=e.timeout),e.hasOwnProperty("cache")&&(this.cache=e.cache),e.hasOwnProperty("cacheImages")&&(this.cacheImages=e.cacheImages)}}t().config({name:"pokeapi-js-wrapper"});class d{constructor(e){this.config=new l(e),o.forEach((e=>{const t=function(e){return`${e[0]}By${function([e,...t]){return e.toUpperCase()+t.join("").toLowerCase()}(e[1])}`}(e);this[t]=t=>{if(t){if("number"==typeof t||"string"==typeof t)return u(this.config,`${this.config.versionPath}${e[2].replace(":id",t)}`);if("object"==typeof t)return Promise.all(function(e,t,r){return r.map((r=>u(e,`${e.versionPath}${t[2].replace(":id",r)}`)))}(this.config,e,t))}},this[function(e){return`${e[0]}`}(e)]=this[t]})),i.forEach((e=>{const t=`${e[0]}List`;this[t]=t=>{var r=this.config.limit,n=this.config.offset;return t&&(t.hasOwnProperty("offset")&&(n=t.offset),t.hasOwnProperty("limit")&&(r=t.limit)),u(this.config,`${this.config.versionPath}${e[1]}?limit=${r}&offset=${n}`)},this[e[0]]=this[t]})),this.config.cacheImages&&navigator&&window&&"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("./pokeapi-js-wrapper-sw.js",{scope:"./"}).catch((e=>{console.log("Pokeapi-js-wrapper SW installation failed with the following error:"),console.error(e)}))}))}getConfig(){return this.config}getCacheLength(){return t().length()}clearCache(){return t().clear()}resource(e){return"string"==typeof e?u(this.config,e):Array.isArray(e)?Promise.all(e.map((e=>u(this.config,e)))):"String or Array is required"}}})(),n})())); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7abfac5..f82bc27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pokeapi-js-wrapper", - "version": "1.2.3", + "version": "1.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pokeapi-js-wrapper", - "version": "1.2.3", + "version": "1.2.4", "license": "MPL-2.0", "dependencies": { "axios": "^0.24.0", @@ -19,10 +19,10 @@ "copy-webpack-plugin": "^11.0.0", "doctoc": "^2.2.1", "http-server": "^14.1.1", - "mocha": "^10.2.0", + "mocha": "^10.4.0", "mock-local-storage": "^1.1.24", "nyc": "^15.1.0", - "webpack": "^5.88.1", + "webpack": "^5.91.0", "webpack-cli": "^5.1.4" } }, @@ -480,9 +480,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" @@ -508,19 +508,19 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", + "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@nodelib/fs.scandir": { @@ -625,9 +625,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/json-schema": { @@ -646,10 +646,13 @@ } }, "node_modules/@types/node": { - "version": "20.4.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz", - "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==", - "dev": true + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/unist": { "version": "2.0.7", @@ -658,9 +661,9 @@ "dev": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", @@ -680,9 +683,9 @@ "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { @@ -703,15 +706,15 @@ "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -739,28 +742,28 @@ "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -768,24 +771,24 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -794,12 +797,12 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -894,8 +897,9 @@ }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -948,8 +952,9 @@ }, "node_modules/ajv-keywords": { "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, - "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" } @@ -1017,8 +1022,9 @@ }, "node_modules/assertion-error": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, - "license": "MIT", "engines": { "node": "*" } @@ -1102,9 +1108,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -1121,10 +1127,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -1134,9 +1140,10 @@ } }, "node_modules/buffer-from": { - "version": "1.1.1", - "dev": true, - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/caching-transform": { "version": "4.0.0", @@ -1188,9 +1195,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001516", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz", - "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==", + "version": "1.0.30001589", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz", + "integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==", "dev": true, "funding": [ { @@ -1218,18 +1225,18 @@ } }, "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "type-detect": "^4.0.8" }, "engines": { "node": ">=4" @@ -1282,9 +1289,13 @@ } }, "node_modules/check-error": { - "version": "1.0.2", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, - "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { "node": "*" } @@ -1677,9 +1688,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.461", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.461.tgz", - "integrity": "sha512-1JkvV2sgEGTDXjdsaQCeSwYYuhLRphRpc+g6EHTFELJXEiznLt3/0pZ9JuAOQ5p2rI3YxKTbivtvajirIfhrEQ==", + "version": "1.4.679", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.679.tgz", + "integrity": "sha512-NhQMsz5k0d6m9z3qAxnsOR/ebal4NAGsrNVRwcDo4Kc/zQ7KdsTKZUxZoygHcVRb0QDW3waEDIcE3isZ79RP6g==", "dev": true }, "node_modules/emoji-regex": { @@ -1688,9 +1699,9 @@ "license": "MIT" }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -1833,9 +1844,9 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1850,8 +1861,9 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -1863,9 +1875,9 @@ } }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -1905,9 +1917,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -1991,9 +2003,10 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, - "license": "MIT", "engines": { "node": "*" } @@ -2087,18 +2100,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -2324,9 +2325,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -2838,21 +2839,6 @@ "node": ">= 10.13.0" } }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/js-yaml": { "version": "3.14.0", "dev": true, @@ -2873,8 +2859,9 @@ }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/lie": { "version": "3.1.1", @@ -2999,12 +2986,12 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/markdown-table": { @@ -3441,9 +3428,9 @@ } }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -3453,13 +3440,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -3474,10 +3460,6 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/ansi-regex": { @@ -3599,6 +3581,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mocha/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3704,21 +3705,6 @@ "node": ">=8" } }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/mocha/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3793,18 +3779,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -3823,9 +3797,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -4457,9 +4431,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -4529,6 +4503,18 @@ "dev": true, "license": "ISC" }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/source-map": { "version": "0.5.7", "dev": true, @@ -4549,8 +4535,9 @@ }, "node_modules/source-map-support/node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4643,6 +4630,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4665,9 +4667,9 @@ } }, "node_modules/terser": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.0.tgz", - "integrity": "sha512-JpcpGOQLOXm2jsomozdMDpd5f8ZHh1rR48OFgWUH3QsyZcfPgv2qDCYbcDEAYNd4OZRj2bWYKpwdll/udZCk/Q==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.2.tgz", + "integrity": "sha512-sHXmLSkImesJ4p5apTeT63DsV4Obe1s37qT8qvwHRmVxKTBH7Rv9Wr26VcAMmLbmk9UliiwK8z+657NyJHHy/w==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -4683,16 +4685,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -4790,6 +4792,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/unified": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", @@ -4856,9 +4864,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -4944,9 +4952,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -4957,34 +4965,34 @@ } }, "node_modules/webpack": { - "version": "5.88.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.1.tgz", - "integrity": "sha512-FROX3TxQnC/ox4N+3xQoWZzvGXSuscxR32rbzjpXgEzWudJFEJBpdlkkob2ylrv5yzzufD1zph1OoFsLtm6stQ==", + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.16.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -5366,4 +5374,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index e2f5c19..71a0f6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pokeapi-js-wrapper", - "version": "1.2.3", + "version": "1.2.4", "description": "An API wrapper for PokeAPI", "main": "dist/index.js", "module": "src/index.js", @@ -51,10 +51,10 @@ "copy-webpack-plugin": "^11.0.0", "doctoc": "^2.2.1", "http-server": "^14.1.1", - "mocha": "^10.2.0", + "mocha": "^10.4.0", "mock-local-storage": "^1.1.24", "nyc": "^15.1.0", - "webpack": "^5.88.1", + "webpack": "^5.91.0", "webpack-cli": "^5.1.4" } }