Socket
Socket
Sign inDemoInstall

autofetch

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autofetch - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

dist/index.browser.js

@@ -1,2 +0,2 @@

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(this,function(){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var o=r(1),n=r(3),i=n.fetchDecorator;t.exports={fetch:i(o)}},function(t,e,r){r(2),t.exports=self.fetch.bind(self)},function(t,e){!function(t){"use strict";function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function r(t){return"string"!=typeof t&&(t=String(t)),t}function o(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return h.iterable&&(e[Symbol.iterator]=function(){return e}),e}function n(t){this.map={},t instanceof n?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function i(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function s(t){var e=new FileReader;return e.readAsArrayBuffer(t),a(e)}function c(t){var e=new FileReader;return e.readAsText(t),a(e)}function f(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(h.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(h.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(h.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(t){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob?(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(s)},this.text=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return c(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=i(this);return t?t:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(t){var e=t.toUpperCase();return m.indexOf(e)>-1?e:t}function l(t,e){e=e||{};var r=e.body;if(l.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new n(t.headers)),this.method=t.method,this.mode=t.mode,r||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new n(e.headers)),this.method=u(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function d(t){var e=new n,r=(t.getAllResponseHeaders()||"").trim().split("\n");return r.forEach(function(t){var r=t.trim().split(":"),o=r.shift().trim(),n=r.join(":").trim();e.append(o,n)}),e}function y(t,e){e||(e={}),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof n?e.headers:new n(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var h={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};n.prototype.append=function(t,o){t=e(t),o=r(o);var n=this.map[t];n||(n=[],this.map[t]=n),n.push(o)},n.prototype.delete=function(t){delete this.map[e(t)]},n.prototype.get=function(t){var r=this.map[e(t)];return r?r[0]:null},n.prototype.getAll=function(t){return this.map[e(t)]||[]},n.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},n.prototype.set=function(t,o){this.map[e(t)]=[r(o)]},n.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(o){t.call(e,o,r,this)},this)},this)},n.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),o(t)},n.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),o(t)},n.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),o(t)},h.iterable&&(n.prototype[Symbol.iterator]=n.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},f.call(l.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var b=[301,302,303,307,308];y.redirect=function(t,e){if(b.indexOf(e)===-1)throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=n,t.Request=l,t.Response=y,t.fetch=function(t,e){return new Promise(function(r,o){function n(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=l.prototype.isPrototypeOf(t)&&!e?t:new l(t,e);var a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:d(a),url:n()},e="response"in a?a.response:a.responseText;r(new y(e,t))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),i.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(t,e,r){"use strict";function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function n(t,e){var r={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=r(4),c=r(9),f=function(t){return t},u="",l=function(t){return t},p=function(t,e,r){var o=e.ssl,n=(e.method,e.query);return"function"==typeof r?r(t,e):("string"==typeof r&&(t=t.replace(/^\/\//,r)),/^\/\//.test(t)&&(t=(o?"https":"http")+":"+t),n&&(t+=""+(t.match(/\?/)?"&":"?")+s.stringify(n)),t)},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.method,o=void 0===r?"GET":r,f=e.query,l=void 0===f?{}:f,d=e.data,y=void 0===d?{}:d,h=e.body,m=void 0===h?{}:h,b=e.headers,v=void 0===b?{}:b,w=(e.json,n(e,["method","query","data","body","headers","json"])),g="GET"===o||"HEAD"===o;return g?l="object"===("undefined"==typeof l?"undefined":a(l))?i({},l,y,m):0===Object.keys(l).length?y:l:m="object"!==("undefined"==typeof m?"undefined":a(m))||m instanceof FormData?0!==Object.keys(m).length||m instanceof FormData?m:y:i({},y,m),v=new Headers(v),g?"":v.set("Content-Type",v.get("Content-Type")||c(m))&&(m=s.stringify(m)),{url:p(t,options,u),options:i({method:o,query:l},g?{}:m,{headers:v},w)}},y=function(t){var e=function(){return t.call.apply(t,[void 0].concat(o(d.apply(void 0,arguments)))).then(l).then(f)};return e.callback=function(t){"function"==typeof t&&(f=t),delete e.callback},e.baseHost=function(t){u=t},e};t.exports={fetchDecorator:y}},function(t,e,r){"use strict";var o=r(5),n=r(8),i=r(7);t.exports={formats:i,parse:n,stringify:o}},function(t,e,r){"use strict";var o=r(6),n=r(7),i={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:o.encode,serializeDate:function(t){return a.call(t)},skipNulls:!1,strictNullHandling:!1},c=function t(e,r,n,i,a,s,c,f,u,l,p){var d=e;if("function"==typeof c)d=c(r,d);else if(d instanceof Date)d=l(d);else if(null===d){if(i)return s?s(r):r;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||o.isBuffer(d))return s?[p(s(r))+"="+p(s(d))]:[p(r)+"="+p(String(d))];var y=[];if("undefined"==typeof d)return y;var h;if(Array.isArray(c))h=c;else{var m=Object.keys(d);h=f?m.sort(f):m}for(var b=0;b<h.length;++b){var v=h[b];a&&null===d[v]||(y=Array.isArray(d)?y.concat(t(d[v],n(r,v),n,i,a,s,c,f,u,l,p)):y.concat(t(d[v],r+(u?"."+v:"["+v+"]"),n,i,a,s,c,f,u,l,p)))}return y};t.exports=function(t,e){var r=t,o=e||{},a="undefined"==typeof o.delimiter?s.delimiter:o.delimiter,f="boolean"==typeof o.strictNullHandling?o.strictNullHandling:s.strictNullHandling,u="boolean"==typeof o.skipNulls?o.skipNulls:s.skipNulls,l="boolean"==typeof o.encode?o.encode:s.encode,p=l?"function"==typeof o.encoder?o.encoder:s.encoder:null,d="function"==typeof o.sort?o.sort:null,y="undefined"!=typeof o.allowDots&&o.allowDots,h="function"==typeof o.serializeDate?o.serializeDate:s.serializeDate;if("undefined"==typeof o.format)o.format=n.default;else if(!Object.prototype.hasOwnProperty.call(n.formatters,o.format))throw new TypeError("Unknown format option provided.");var m,b,v=n.formatters[o.format];if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof o.filter?(b=o.filter,r=b("",r)):Array.isArray(o.filter)&&(b=o.filter,m=b);var w=[];if("object"!=typeof r||null===r)return"";var g;g=o.arrayFormat in i?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var O=i[g];m||(m=Object.keys(r)),d&&m.sort(d);for(var j=0;j<m.length;++j){var x=m[j];u&&null===r[x]||(w=w.concat(c(r[x],x,O,f,u,p,b,d,y,h,v)))}return w.join(a)}},function(t,e){"use strict";var r=Object.prototype.hasOwnProperty,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}();e.arrayToObject=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},o=0;o<t.length;++o)"undefined"!=typeof t[o]&&(r[o]=t[o]);return r},e.merge=function(t,o,n){if(!o)return t;if("object"!=typeof o){if(Array.isArray(t))t.push(o);else{if("object"!=typeof t)return[t,o];t[o]=!0}return t}if("object"!=typeof t)return[t].concat(o);var i=t;return Array.isArray(t)&&!Array.isArray(o)&&(i=e.arrayToObject(t,n)),Array.isArray(t)&&Array.isArray(o)?(o.forEach(function(o,i){r.call(t,i)?t[i]&&"object"==typeof t[i]?t[i]=e.merge(t[i],o,n):t.push(o):t[i]=o}),t):Object.keys(o).reduce(function(t,r){var i=o[r];return Object.prototype.hasOwnProperty.call(t,r)?t[r]=e.merge(t[r],i,n):t[r]=i,t},i)},e.decode=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},e.encode=function(t){if(0===t.length)return t;for(var e="string"==typeof t?t:String(t),r="",n=0;n<e.length;++n){var i=e.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=e.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&e.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},e.compact=function(t,r){if("object"!=typeof t||null===t)return t;var o=r||[],n=o.indexOf(t);if(n!==-1)return o[n];if(o.push(t),Array.isArray(t)){for(var i=[],a=0;a<t.length;++a)t[a]&&"object"==typeof t[a]?i.push(e.compact(t[a],o)):"undefined"!=typeof t[a]&&i.push(t[a]);return i}var s=Object.keys(t);return s.forEach(function(r){t[r]=e.compact(t[r],o)}),t},e.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},e.isBuffer=function(t){return null!==t&&"undefined"!=typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}},function(t,e){"use strict";var r=String.prototype.replace,o=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return r.call(t,o,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(t,e,r){"use strict";var o=r(6),n=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:o.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(t,e){for(var r={},o=t.split(e.delimiter,e.parameterLimit===1/0?void 0:e.parameterLimit),i=0;i<o.length;++i){var a,s,c=o[i],f=c.indexOf("]=")===-1?c.indexOf("="):c.indexOf("]=")+1;f===-1?(a=e.decoder(c),s=e.strictNullHandling?null:""):(a=e.decoder(c.slice(0,f)),s=e.decoder(c.slice(f+1))),n.call(r,a)?r[a]=[].concat(r[a]).concat(s):r[a]=s}return r},s=function t(e,r,o){if(!e.length)return r;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(t(e,r,o));else{n=o.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,s=parseInt(a,10);!isNaN(s)&&i!==a&&String(s)===a&&s>=0&&o.parseArrays&&s<=o.arrayLimit?(n=[],n[s]=t(e,r,o)):n[a]=t(e,r,o)}return n},c=function(t,e,r){if(t){var o=r.allowDots?t.replace(/\.([^\.\[]+)/g,"[$1]"):t,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,c=i.exec(o),f=[];if(c[1]){if(!r.plainObjects&&n.call(Object.prototype,c[1])&&!r.allowPrototypes)return;f.push(c[1])}for(var u=0;null!==(c=a.exec(o))&&u<r.depth;)u+=1,(r.plainObjects||!n.call(Object.prototype,c[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&f.push(c[1]);return c&&f.push("["+o.slice(c.index)+"]"),s(f,e,r)}};t.exports=function(t,e){var r=e||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||o.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===t||null===t||"undefined"==typeof t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?a(t,r):t,s=r.plainObjects?Object.create(null):{},f=Object.keys(n),u=0;u<f.length;++u){var l=f[u],p=c(l,n[l],r);s=o.merge(s,p,r)}return o.compact(s)}},function(t,e,r){"use strict";"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(10)},function(t,e){"use strict";t.exports={formData:"multipart/form-data",form:"application/x-www-form-urlencoded",json:"application/json",text:"text/plain"}}])});
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(this,function(){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var o=r(1),n=r(3),i=n.fetchDecorator;t.exports={fetch:i(o)}},function(t,e,r){r(2),t.exports=self.fetch.bind(self)},function(t,e){!function(t){"use strict";function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function r(t){return"string"!=typeof t&&(t=String(t)),t}function o(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return h.iterable&&(e[Symbol.iterator]=function(){return e}),e}function n(t){this.map={},t instanceof n?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function i(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function s(t){var e=new FileReader;return e.readAsArrayBuffer(t),a(e)}function c(t){var e=new FileReader;return e.readAsText(t),a(e)}function f(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(h.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(h.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(h.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(t){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob?(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(s)},this.text=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return c(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=i(this);return t?t:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(t){var e=t.toUpperCase();return m.indexOf(e)>-1?e:t}function l(t,e){e=e||{};var r=e.body;if(l.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new n(t.headers)),this.method=t.method,this.mode=t.mode,r||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new n(e.headers)),this.method=u(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function d(t){var e=new n,r=(t.getAllResponseHeaders()||"").trim().split("\n");return r.forEach(function(t){var r=t.trim().split(":"),o=r.shift().trim(),n=r.join(":").trim();e.append(o,n)}),e}function y(t,e){e||(e={}),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof n?e.headers:new n(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var h={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};n.prototype.append=function(t,o){t=e(t),o=r(o);var n=this.map[t];n||(n=[],this.map[t]=n),n.push(o)},n.prototype.delete=function(t){delete this.map[e(t)]},n.prototype.get=function(t){var r=this.map[e(t)];return r?r[0]:null},n.prototype.getAll=function(t){return this.map[e(t)]||[]},n.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},n.prototype.set=function(t,o){this.map[e(t)]=[r(o)]},n.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(o){t.call(e,o,r,this)},this)},this)},n.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),o(t)},n.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),o(t)},n.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),o(t)},h.iterable&&(n.prototype[Symbol.iterator]=n.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},f.call(l.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var b=[301,302,303,307,308];y.redirect=function(t,e){if(b.indexOf(e)===-1)throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=n,t.Request=l,t.Response=y,t.fetch=function(t,e){return new Promise(function(r,o){function n(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=l.prototype.isPrototypeOf(t)&&!e?t:new l(t,e);var a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:d(a),url:n()},e="response"in a?a.response:a.responseText;r(new y(e,t))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),i.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(t,e,r){"use strict";function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function n(t,e){var r={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=r(4),c=r(9),f=function(t){return t},u="",l=function(t){return t},p=function(t,e,r){var o=e.ssl,n=(e.method,e.query);return"function"==typeof r?r(t,e):("string"==typeof r&&(t=t.replace(/^\/\//,r)),/^\/\//.test(t)&&(t=(o?"https":"http")+":"+t),n&&(t+=""+(t.match(/\?/)?"&":"?")+s.stringify(n)),t)},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.method,o=void 0===r?"GET":r,f=e.query,l=void 0===f?{}:f,d=e.data,y=void 0===d?{}:d,h=e.body,m=void 0===h?{}:h,b=e.headers,v=void 0===b?{}:b,w=(e.json,n(e,["method","query","data","body","headers","json"])),g="GET"===o||"HEAD"===o;g?l="object"===("undefined"==typeof l?"undefined":a(l))?i({},l,y,m):0===Object.keys(l).length?y:l:m="object"!==("undefined"==typeof m?"undefined":a(m))||m instanceof FormData?0!==Object.keys(m).length||m instanceof FormData?m:y:i({},y,m),v=new Headers(v),g?"":v.set("Content-Type",v.get("Content-Type")||c(m))&&(m=s.stringify(m));var O=i({method:o,query:l},g?{}:m,{headers:v},w);return{url:p(t,O,u),options:O}},y=function(t){var e=function(){return t.call.apply(t,[void 0].concat(o(d.apply(void 0,arguments)))).then(l).then(f)};return e.callback=function(t){"function"==typeof t&&(f=t),delete e.callback},e.baseHost=function(t){u=t},e};t.exports={fetchDecorator:y}},function(t,e,r){"use strict";var o=r(5),n=r(8),i=r(7);t.exports={formats:i,parse:n,stringify:o}},function(t,e,r){"use strict";var o=r(6),n=r(7),i={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:o.encode,serializeDate:function(t){return a.call(t)},skipNulls:!1,strictNullHandling:!1},c=function t(e,r,n,i,a,s,c,f,u,l,p){var d=e;if("function"==typeof c)d=c(r,d);else if(d instanceof Date)d=l(d);else if(null===d){if(i)return s?s(r):r;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||o.isBuffer(d))return s?[p(s(r))+"="+p(s(d))]:[p(r)+"="+p(String(d))];var y=[];if("undefined"==typeof d)return y;var h;if(Array.isArray(c))h=c;else{var m=Object.keys(d);h=f?m.sort(f):m}for(var b=0;b<h.length;++b){var v=h[b];a&&null===d[v]||(y=Array.isArray(d)?y.concat(t(d[v],n(r,v),n,i,a,s,c,f,u,l,p)):y.concat(t(d[v],r+(u?"."+v:"["+v+"]"),n,i,a,s,c,f,u,l,p)))}return y};t.exports=function(t,e){var r=t,o=e||{},a="undefined"==typeof o.delimiter?s.delimiter:o.delimiter,f="boolean"==typeof o.strictNullHandling?o.strictNullHandling:s.strictNullHandling,u="boolean"==typeof o.skipNulls?o.skipNulls:s.skipNulls,l="boolean"==typeof o.encode?o.encode:s.encode,p=l?"function"==typeof o.encoder?o.encoder:s.encoder:null,d="function"==typeof o.sort?o.sort:null,y="undefined"!=typeof o.allowDots&&o.allowDots,h="function"==typeof o.serializeDate?o.serializeDate:s.serializeDate;if("undefined"==typeof o.format)o.format=n.default;else if(!Object.prototype.hasOwnProperty.call(n.formatters,o.format))throw new TypeError("Unknown format option provided.");var m,b,v=n.formatters[o.format];if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof o.filter?(b=o.filter,r=b("",r)):Array.isArray(o.filter)&&(b=o.filter,m=b);var w=[];if("object"!=typeof r||null===r)return"";var g;g=o.arrayFormat in i?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var O=i[g];m||(m=Object.keys(r)),d&&m.sort(d);for(var j=0;j<m.length;++j){var x=m[j];u&&null===r[x]||(w=w.concat(c(r[x],x,O,f,u,p,b,d,y,h,v)))}return w.join(a)}},function(t,e){"use strict";var r=Object.prototype.hasOwnProperty,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}();e.arrayToObject=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},o=0;o<t.length;++o)"undefined"!=typeof t[o]&&(r[o]=t[o]);return r},e.merge=function(t,o,n){if(!o)return t;if("object"!=typeof o){if(Array.isArray(t))t.push(o);else{if("object"!=typeof t)return[t,o];t[o]=!0}return t}if("object"!=typeof t)return[t].concat(o);var i=t;return Array.isArray(t)&&!Array.isArray(o)&&(i=e.arrayToObject(t,n)),Array.isArray(t)&&Array.isArray(o)?(o.forEach(function(o,i){r.call(t,i)?t[i]&&"object"==typeof t[i]?t[i]=e.merge(t[i],o,n):t.push(o):t[i]=o}),t):Object.keys(o).reduce(function(t,r){var i=o[r];return Object.prototype.hasOwnProperty.call(t,r)?t[r]=e.merge(t[r],i,n):t[r]=i,t},i)},e.decode=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},e.encode=function(t){if(0===t.length)return t;for(var e="string"==typeof t?t:String(t),r="",n=0;n<e.length;++n){var i=e.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=e.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&e.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},e.compact=function(t,r){if("object"!=typeof t||null===t)return t;var o=r||[],n=o.indexOf(t);if(n!==-1)return o[n];if(o.push(t),Array.isArray(t)){for(var i=[],a=0;a<t.length;++a)t[a]&&"object"==typeof t[a]?i.push(e.compact(t[a],o)):"undefined"!=typeof t[a]&&i.push(t[a]);return i}var s=Object.keys(t);return s.forEach(function(r){t[r]=e.compact(t[r],o)}),t},e.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},e.isBuffer=function(t){return null!==t&&"undefined"!=typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}},function(t,e){"use strict";var r=String.prototype.replace,o=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return r.call(t,o,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(t,e,r){"use strict";var o=r(6),n=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:o.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(t,e){for(var r={},o=t.split(e.delimiter,e.parameterLimit===1/0?void 0:e.parameterLimit),i=0;i<o.length;++i){var a,s,c=o[i],f=c.indexOf("]=")===-1?c.indexOf("="):c.indexOf("]=")+1;f===-1?(a=e.decoder(c),s=e.strictNullHandling?null:""):(a=e.decoder(c.slice(0,f)),s=e.decoder(c.slice(f+1))),n.call(r,a)?r[a]=[].concat(r[a]).concat(s):r[a]=s}return r},s=function t(e,r,o){if(!e.length)return r;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(t(e,r,o));else{n=o.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,s=parseInt(a,10);!isNaN(s)&&i!==a&&String(s)===a&&s>=0&&o.parseArrays&&s<=o.arrayLimit?(n=[],n[s]=t(e,r,o)):n[a]=t(e,r,o)}return n},c=function(t,e,r){if(t){var o=r.allowDots?t.replace(/\.([^\.\[]+)/g,"[$1]"):t,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,c=i.exec(o),f=[];if(c[1]){if(!r.plainObjects&&n.call(Object.prototype,c[1])&&!r.allowPrototypes)return;f.push(c[1])}for(var u=0;null!==(c=a.exec(o))&&u<r.depth;)u+=1,(r.plainObjects||!n.call(Object.prototype,c[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&f.push(c[1]);return c&&f.push("["+o.slice(c.index)+"]"),s(f,e,r)}};t.exports=function(t,e){var r=e||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||o.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===t||null===t||"undefined"==typeof t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?a(t,r):t,s=r.plainObjects?Object.create(null):{},f=Object.keys(n),u=0;u<f.length;++u){var l=f[u],p=c(l,n[l],r);s=o.merge(s,p,r)}return o.compact(s)}},function(t,e,r){"use strict";"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(10)},function(t,e){"use strict";t.exports={formData:"multipart/form-data",form:"application/x-www-form-urlencoded",json:"application/json",text:"text/plain"}}])});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguYnJvd3Nlci5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9pbmRleC5icm93c2VyLmpzIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==

@@ -1,2 +0,2 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function n(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=r(1),l=r(6),f=function(e){return e},u="",s=function(e){return e},p=function(e,t,r){var o=t.ssl,n=(t.method,t.query);return"function"==typeof r?r(e,t):("string"==typeof r&&(e=e.replace(/^\/\//,r)),/^\/\//.test(e)&&(e=(o?"https":"http")+":"+e),n&&(e+=""+(e.match(/\?/)?"&":"?")+c.stringify(n)),e)},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.method,o=void 0===r?"GET":r,f=t.query,s=void 0===f?{}:f,y=t.data,d=void 0===y?{}:y,m=t.body,b=void 0===m?{}:m,h=t.headers,v=void 0===h?{}:h,g=(t.json,n(t,["method","query","data","body","headers","json"])),j="GET"===o||"HEAD"===o;return j?s="object"===("undefined"==typeof s?"undefined":a(s))?i({},s,d,b):0===Object.keys(s).length?d:s:b="object"!==("undefined"==typeof b?"undefined":a(b))||b instanceof FormData?0!==Object.keys(b).length||b instanceof FormData?b:d:i({},d,b),v=new Headers(v),j?"":v.set("Content-Type",v.get("Content-Type")||l(b))&&(b=c.stringify(b)),{url:p(e,options,u),options:i({method:o,query:s},j?{}:b,{headers:v},g)}},d=function(e){var t=function(){return e.call.apply(e,[void 0].concat(o(y.apply(void 0,arguments)))).then(s).then(f)};return t.callback=function(e){"function"==typeof e&&(f=e),delete t.callback},t.baseHost=function(e){u=e},t};e.exports={fetchDecorator:d}},function(e,t,r){"use strict";var o=r(2),n=r(5),i=r(4);e.exports={formats:i,parse:n,stringify:o}},function(e,t,r){"use strict";var o=r(3),n=r(4),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:o.encode,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},l=function e(t,r,n,i,a,c,l,f,u,s,p){var y=t;if("function"==typeof l)y=l(r,y);else if(y instanceof Date)y=s(y);else if(null===y){if(i)return c?c(r):r;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||o.isBuffer(y))return c?[p(c(r))+"="+p(c(y))]:[p(r)+"="+p(String(y))];var d=[];if("undefined"==typeof y)return d;var m;if(Array.isArray(l))m=l;else{var b=Object.keys(y);m=f?b.sort(f):b}for(var h=0;h<m.length;++h){var v=m[h];a&&null===y[v]||(d=Array.isArray(y)?d.concat(e(y[v],n(r,v),n,i,a,c,l,f,u,s,p)):d.concat(e(y[v],r+(u?"."+v:"["+v+"]"),n,i,a,c,l,f,u,s,p)))}return d};e.exports=function(e,t){var r=e,o=t||{},a="undefined"==typeof o.delimiter?c.delimiter:o.delimiter,f="boolean"==typeof o.strictNullHandling?o.strictNullHandling:c.strictNullHandling,u="boolean"==typeof o.skipNulls?o.skipNulls:c.skipNulls,s="boolean"==typeof o.encode?o.encode:c.encode,p=s?"function"==typeof o.encoder?o.encoder:c.encoder:null,y="function"==typeof o.sort?o.sort:null,d="undefined"!=typeof o.allowDots&&o.allowDots,m="function"==typeof o.serializeDate?o.serializeDate:c.serializeDate;if("undefined"==typeof o.format)o.format=n.default;else if(!Object.prototype.hasOwnProperty.call(n.formatters,o.format))throw new TypeError("Unknown format option provided.");var b,h,v=n.formatters[o.format];if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof o.filter?(h=o.filter,r=h("",r)):Array.isArray(o.filter)&&(h=o.filter,b=h);var g=[];if("object"!=typeof r||null===r)return"";var j;j=o.arrayFormat in i?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var O=i[j];b||(b=Object.keys(r)),y&&b.sort(y);for(var w=0;w<b.length;++w){var x=b[w];u&&null===r[x]||(g=g.concat(l(r[x],x,O,f,u,p,h,y,d,m,v)))}return g.join(a)}},function(e,t){"use strict";var r=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)"undefined"!=typeof e[o]&&(r[o]=e[o]);return r},t.merge=function(e,o,n){if(!o)return e;if("object"!=typeof o){if(Array.isArray(e))e.push(o);else{if("object"!=typeof e)return[e,o];e[o]=!0}return e}if("object"!=typeof e)return[e].concat(o);var i=e;return Array.isArray(e)&&!Array.isArray(o)&&(i=t.arrayToObject(e,n)),Array.isArray(e)&&Array.isArray(o)?(o.forEach(function(o,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],o,n):e.push(o):e[i]=o}),e):Object.keys(o).reduce(function(e,r){var i=o[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=t.merge(e[r],i,n):e[r]=i,e},i)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},t.compact=function(e,r){if("object"!=typeof e||null===e)return e;var o=r||[],n=o.indexOf(e);if(n!==-1)return o[n];if(o.push(e),Array.isArray(e)){for(var i=[],a=0;a<e.length;++a)e[a]&&"object"==typeof e[a]?i.push(t.compact(e[a],o)):"undefined"!=typeof e[a]&&i.push(e[a]);return i}var c=Object.keys(e);return c.forEach(function(r){e[r]=t.compact(e[r],o)}),e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t){"use strict";var r=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";var o=r(3),n=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:o.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<o.length;++i){var a,c,l=o[i],f=l.indexOf("]=")===-1?l.indexOf("="):l.indexOf("]=")+1;f===-1?(a=t.decoder(l),c=t.strictNullHandling?null:""):(a=t.decoder(l.slice(0,f)),c=t.decoder(l.slice(f+1))),n.call(r,a)?r[a]=[].concat(r[a]).concat(c):r[a]=c}return r},c=function e(t,r,o){if(!t.length)return r;var n,i=t.shift();if("[]"===i)n=[],n=n.concat(e(t,r,o));else{n=o.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,c=parseInt(a,10);!isNaN(c)&&i!==a&&String(c)===a&&c>=0&&o.parseArrays&&c<=o.arrayLimit?(n=[],n[c]=e(t,r,o)):n[a]=e(t,r,o)}return n},l=function(e,t,r){if(e){var o=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,l=i.exec(o),f=[];if(l[1]){if(!r.plainObjects&&n.call(Object.prototype,l[1])&&!r.allowPrototypes)return;f.push(l[1])}for(var u=0;null!==(l=a.exec(o))&&u<r.depth;)u+=1,(r.plainObjects||!n.call(Object.prototype,l[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&f.push(l[1]);return l&&f.push("["+o.slice(l.index)+"]"),c(f,t,r)}};e.exports=function(e,t){var r=t||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||o.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?a(e,r):e,c=r.plainObjects?Object.create(null):{},f=Object.keys(n),u=0;u<f.length;++u){var s=f[u],p=l(s,n[s],r);c=o.merge(c,p,r)}return o.compact(c)}},function(e,t,r){"use strict";"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(7)},function(e,t){"use strict";e.exports={formData:"multipart/form-data",form:"application/x-www-form-urlencoded",json:"application/json",text:"text/plain"}}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function n(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=r(1),l=r(6),f=function(e){return e},u="",s=function(e){return e},p=function(e,t,r){var o=t.ssl,n=(t.method,t.query);return"function"==typeof r?r(e,t):("string"==typeof r&&(e=e.replace(/^\/\//,r)),/^\/\//.test(e)&&(e=(o?"https":"http")+":"+e),n&&(e+=""+(e.match(/\?/)?"&":"?")+c.stringify(n)),e)},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.method,o=void 0===r?"GET":r,f=t.query,s=void 0===f?{}:f,y=t.data,d=void 0===y?{}:y,m=t.body,b=void 0===m?{}:m,h=t.headers,v=void 0===h?{}:h,g=(t.json,n(t,["method","query","data","body","headers","json"])),j="GET"===o||"HEAD"===o;j?s="object"===("undefined"==typeof s?"undefined":a(s))?i({},s,d,b):0===Object.keys(s).length?d:s:b="object"!==("undefined"==typeof b?"undefined":a(b))||b instanceof FormData?0!==Object.keys(b).length||b instanceof FormData?b:d:i({},d,b),v=new Headers(v),j?"":v.set("Content-Type",v.get("Content-Type")||l(b))&&(b=c.stringify(b));var O=i({method:o,query:s},j?{}:b,{headers:v},g);return{url:p(e,O,u),options:O}},d=function(e){var t=function(){return e.call.apply(e,[void 0].concat(o(y.apply(void 0,arguments)))).then(s).then(f)};return t.callback=function(e){"function"==typeof e&&(f=e),delete t.callback},t.baseHost=function(e){u=e},t};e.exports={fetchDecorator:d}},function(e,t,r){"use strict";var o=r(2),n=r(5),i=r(4);e.exports={formats:i,parse:n,stringify:o}},function(e,t,r){"use strict";var o=r(3),n=r(4),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:o.encode,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},l=function e(t,r,n,i,a,c,l,f,u,s,p){var y=t;if("function"==typeof l)y=l(r,y);else if(y instanceof Date)y=s(y);else if(null===y){if(i)return c?c(r):r;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||o.isBuffer(y))return c?[p(c(r))+"="+p(c(y))]:[p(r)+"="+p(String(y))];var d=[];if("undefined"==typeof y)return d;var m;if(Array.isArray(l))m=l;else{var b=Object.keys(y);m=f?b.sort(f):b}for(var h=0;h<m.length;++h){var v=m[h];a&&null===y[v]||(d=Array.isArray(y)?d.concat(e(y[v],n(r,v),n,i,a,c,l,f,u,s,p)):d.concat(e(y[v],r+(u?"."+v:"["+v+"]"),n,i,a,c,l,f,u,s,p)))}return d};e.exports=function(e,t){var r=e,o=t||{},a="undefined"==typeof o.delimiter?c.delimiter:o.delimiter,f="boolean"==typeof o.strictNullHandling?o.strictNullHandling:c.strictNullHandling,u="boolean"==typeof o.skipNulls?o.skipNulls:c.skipNulls,s="boolean"==typeof o.encode?o.encode:c.encode,p=s?"function"==typeof o.encoder?o.encoder:c.encoder:null,y="function"==typeof o.sort?o.sort:null,d="undefined"!=typeof o.allowDots&&o.allowDots,m="function"==typeof o.serializeDate?o.serializeDate:c.serializeDate;if("undefined"==typeof o.format)o.format=n.default;else if(!Object.prototype.hasOwnProperty.call(n.formatters,o.format))throw new TypeError("Unknown format option provided.");var b,h,v=n.formatters[o.format];if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof o.filter?(h=o.filter,r=h("",r)):Array.isArray(o.filter)&&(h=o.filter,b=h);var g=[];if("object"!=typeof r||null===r)return"";var j;j=o.arrayFormat in i?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var O=i[j];b||(b=Object.keys(r)),y&&b.sort(y);for(var w=0;w<b.length;++w){var x=b[w];u&&null===r[x]||(g=g.concat(l(r[x],x,O,f,u,p,h,y,d,m,v)))}return g.join(a)}},function(e,t){"use strict";var r=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)"undefined"!=typeof e[o]&&(r[o]=e[o]);return r},t.merge=function(e,o,n){if(!o)return e;if("object"!=typeof o){if(Array.isArray(e))e.push(o);else{if("object"!=typeof e)return[e,o];e[o]=!0}return e}if("object"!=typeof e)return[e].concat(o);var i=e;return Array.isArray(e)&&!Array.isArray(o)&&(i=t.arrayToObject(e,n)),Array.isArray(e)&&Array.isArray(o)?(o.forEach(function(o,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],o,n):e.push(o):e[i]=o}),e):Object.keys(o).reduce(function(e,r){var i=o[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=t.merge(e[r],i,n):e[r]=i,e},i)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},t.compact=function(e,r){if("object"!=typeof e||null===e)return e;var o=r||[],n=o.indexOf(e);if(n!==-1)return o[n];if(o.push(e),Array.isArray(e)){for(var i=[],a=0;a<e.length;++a)e[a]&&"object"==typeof e[a]?i.push(t.compact(e[a],o)):"undefined"!=typeof e[a]&&i.push(e[a]);return i}var c=Object.keys(e);return c.forEach(function(r){e[r]=t.compact(e[r],o)}),e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t){"use strict";var r=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";var o=r(3),n=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:o.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<o.length;++i){var a,c,l=o[i],f=l.indexOf("]=")===-1?l.indexOf("="):l.indexOf("]=")+1;f===-1?(a=t.decoder(l),c=t.strictNullHandling?null:""):(a=t.decoder(l.slice(0,f)),c=t.decoder(l.slice(f+1))),n.call(r,a)?r[a]=[].concat(r[a]).concat(c):r[a]=c}return r},c=function e(t,r,o){if(!t.length)return r;var n,i=t.shift();if("[]"===i)n=[],n=n.concat(e(t,r,o));else{n=o.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,c=parseInt(a,10);!isNaN(c)&&i!==a&&String(c)===a&&c>=0&&o.parseArrays&&c<=o.arrayLimit?(n=[],n[c]=e(t,r,o)):n[a]=e(t,r,o)}return n},l=function(e,t,r){if(e){var o=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,l=i.exec(o),f=[];if(l[1]){if(!r.plainObjects&&n.call(Object.prototype,l[1])&&!r.allowPrototypes)return;f.push(l[1])}for(var u=0;null!==(l=a.exec(o))&&u<r.depth;)u+=1,(r.plainObjects||!n.call(Object.prototype,l[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&f.push(l[1]);return l&&f.push("["+o.slice(l.index)+"]"),c(f,t,r)}};e.exports=function(e,t){var r=t||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||o.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?a(e,r):e,c=r.plainObjects?Object.create(null):{},f=Object.keys(n),u=0;u<f.length;++u){var s=f[u],p=l(s,n[s],r);c=o.merge(c,p,r)}return o.compact(c)}},function(e,t,r){"use strict";"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(7)},function(e,t){"use strict";e.exports={formData:"multipart/form-data",form:"application/x-www-form-urlencoded",json:"application/json",text:"text/plain"}}])});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vdXRpbHMuanMiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9
{
"name": "autofetch",
"version": "1.1.0",
"version": "1.1.1",
"description": "fetch for node",

@@ -5,0 +5,0 @@ "main": "src/index.node.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc