Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.2.3 to 1.2.4

libs/complier.js

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 f(t){var e=new FileReader;return e.readAsText(t),a(e)}function c(){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 f(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 b.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 b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},c.call(l.prototype),c.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 m=[301,302,303,307,308];y.redirect=function(t,e){if(m.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),f=r(9),c=r(10),u=function(t){return t},l={},p="",d=function(t){return t},y=function(t){return t instanceof Headers?function(){return Array.from(t.keys()).reduce(function(e,r){return e[r]=t.get(r),e},{})}():t},h=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)},b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.method,o=void 0===r?"GET":r,u=e.query,d=void 0===u?{}:u,b=e.data,m=void 0===b?{}:b,v=e.body,w=void 0===v?{}:v,g=e.headers,O=void 0===g?{}:g,j=(e.json,n(e,["method","query","data","body","headers","json"])),x="GET"===o||"HEAD"===o;if(x?d="object"===("undefined"==typeof d?"undefined":a(d))?i({},d,m,w):0===Object.keys(d).length?m:d:w="object"!==("undefined"==typeof w?"undefined":a(w))||w instanceof FormData?0!==Object.keys(w).length||w instanceof FormData?w:m:i({},m,w),O=new Headers(i({},y(O),y(l))),x?"":O.set("Content-Type",O.get("Content-Type")||f(w)),"object"===("undefined"==typeof w?"undefined":a(w)))switch(O.get("Content-Type")){case c.form:w=s.stringify(w);break;case c.formData:var E=function(){var t=new FormData;return Object.keys(w).forEach(function(e){t.set(e,w[e])}),w=t,"break"}();if("break"===E)break}var A=i({method:o,query:d,headers:O},j);return x||(A.body=w),[h(t,A,p),A]},m=function(t){var e=function(){return t.call.apply(t,[void 0].concat(o(b.apply(void 0,arguments)))).then(d).then(u)};return e.callback=function(t){"function"==typeof t&&(u=t),delete e.callback},e.baseHost=function(t){p=t},e.headers=function(t){if("object"!==("undefined"==typeof t?"undefined":a(t))&&"function"!=typeof t)throw new Error("global headers must be object or function");l=t,delete e.headers},e};t.exports={fetchDecorator:m}},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},f=function t(e,r,n,i,a,s,f,c,u,l,p){var d=e;if("function"==typeof f)d=f(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(f))h=f;else{var b=Object.keys(d);h=c?b.sort(c):b}for(var m=0;m<h.length;++m){var v=h[m];a&&null===d[v]||(y=Array.isArray(d)?y.concat(t(d[v],n(r,v),n,i,a,s,f,c,u,l,p)):y.concat(t(d[v],r+(u?"."+v:"["+v+"]"),n,i,a,s,f,c,u,l,p)))}return y};t.exports=function(t,e){var r=t,o=e||{},a="undefined"==typeof o.delimiter?s.delimiter:o.delimiter,c="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 b,m,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?(m=o.filter,r=m("",r)):Array.isArray(o.filter)&&(m=o.filter,b=m);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];b||(b=Object.keys(r)),d&&b.sort(d);for(var j=0;j<b.length;++j){var x=b[j];u&&null===r[x]||(w=w.concat(f(r[x],x,O,c,u,p,m,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,f=o[i],c=f.indexOf("]=")===-1?f.indexOf("="):f.indexOf("]=")+1;c===-1?(a=e.decoder(f),s=e.strictNullHandling?null:""):(a=e.decoder(f.slice(0,c)),s=e.decoder(f.slice(c+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},f=function(t,e,r){if(t){var o=r.allowDots?t.replace(/\.([^\.\[]+)/g,"[$1]"):t,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,f=i.exec(o),c=[];if(f[1]){if(!r.plainObjects&&n.call(Object.prototype,f[1])&&!r.allowPrototypes)return;c.push(f[1])}for(var u=0;null!==(f=a.exec(o))&&u<r.depth;)u+=1,(r.plainObjects||!n.call(Object.prototype,f[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&c.push(f[1]);return f&&c.push("["+o.slice(f.index)+"]"),s(c,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):{},c=Object.keys(n),u=0;u<c.length;++u){var l=c[u],p=f(l,n[l],r);s=o.merge(s,p,r)}return o.compact(s)}},function(t,e,r){"use strict";var o="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},n=r(10),i=function(t,e){if(t instanceof FormData)return n.formData;if("string"==typeof t)try{if(JSON.parse(t))return n.json}catch(t){return n.text}return"object"===("undefined"==typeof t?"undefined":o(t))?e?n.json:n.form:n.text};t.exports=i},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 f(t){var e=new FileReader;return e.readAsText(t),a(e)}function c(){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 f(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 b.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 b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},c.call(l.prototype),c.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 m=[301,302,303,307,308];y.redirect=function(t,e){if(m.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),f=r(9),c=r(10),u=function(t){return t},l={},p="",d=function(t){return t},y=function(t){return t instanceof Headers?function(){return Array.from(t.keys()).reduce(function(e,r){return e[r]=t.get(r),e},{})}():t},h=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)},b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.method,o=void 0===r?"GET":r,u=e.query,d=void 0===u?{}:u,b=e.data,m=void 0===b?{}:b,v=e.body,w=void 0===v?{}:v,g=e.headers,O=void 0===g?{}:g,j=(e.json,n(e,["method","query","data","body","headers","json"])),x="GET"===o||"HEAD"===o,E=!!window&&w instanceof FormData;if(x?d="object"===("undefined"==typeof d?"undefined":a(d))?i({},d,m,w):0===Object.keys(d).length?m:d:w="object"!==("undefined"==typeof w?"undefined":a(w))||E?0!==Object.keys(w).length||E?w:m:i({},m,w),O=new Headers(i({},y(O),y(l))),x?"":O.set("Content-Type",O.get("Content-Type")||f(w)),"object"===("undefined"==typeof w?"undefined":a(w)))switch(O.get("Content-Type")){case c.form:w=s.stringify(w);break;case c.formData:var A=function(){var t=new FormData;return Object.keys(w).forEach(function(e){t.set(e,w[e])}),w=t,"break"}();if("break"===A)break}var T=i({method:o,query:d,headers:O},j);return x||(T.body=w),[h(t,T,p),T]},m=function(t){var e=function(){return t.call.apply(t,[void 0].concat(o(b.apply(void 0,arguments)))).then(d).then(u)};return e.callback=function(t){"function"==typeof t&&(u=t),delete e.callback},e.baseHost=function(t){p=t},e.headers=function(t){if("object"!==("undefined"==typeof t?"undefined":a(t))&&"function"!=typeof t)throw new Error("global headers must be object or function");l=t,delete e.headers},e};t.exports={fetchDecorator:m}},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},f=function t(e,r,n,i,a,s,f,c,u,l,p){var d=e;if("function"==typeof f)d=f(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(f))h=f;else{var b=Object.keys(d);h=c?b.sort(c):b}for(var m=0;m<h.length;++m){var v=h[m];a&&null===d[v]||(y=Array.isArray(d)?y.concat(t(d[v],n(r,v),n,i,a,s,f,c,u,l,p)):y.concat(t(d[v],r+(u?"."+v:"["+v+"]"),n,i,a,s,f,c,u,l,p)))}return y};t.exports=function(t,e){var r=t,o=e||{},a="undefined"==typeof o.delimiter?s.delimiter:o.delimiter,c="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 b,m,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?(m=o.filter,r=m("",r)):Array.isArray(o.filter)&&(m=o.filter,b=m);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];b||(b=Object.keys(r)),d&&b.sort(d);for(var j=0;j<b.length;++j){var x=b[j];u&&null===r[x]||(w=w.concat(f(r[x],x,O,c,u,p,m,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,f=o[i],c=f.indexOf("]=")===-1?f.indexOf("="):f.indexOf("]=")+1;c===-1?(a=e.decoder(f),s=e.strictNullHandling?null:""):(a=e.decoder(f.slice(0,c)),s=e.decoder(f.slice(c+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},f=function(t,e,r){if(t){var o=r.allowDots?t.replace(/\.([^\.\[]+)/g,"[$1]"):t,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,f=i.exec(o),c=[];if(f[1]){if(!r.plainObjects&&n.call(Object.prototype,f[1])&&!r.allowPrototypes)return;c.push(f[1])}for(var u=0;null!==(f=a.exec(o))&&u<r.depth;)u+=1,(r.plainObjects||!n.call(Object.prototype,f[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&c.push(f[1]);return f&&c.push("["+o.slice(f.index)+"]"),s(c,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):{},c=Object.keys(n),u=0;u<c.length;++u){var l=c[u],p=f(l,n[l],r);s=o.merge(s,p,r)}return o.compact(s)}},function(t,e,r){"use strict";var o="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},n=r(10),i=function(t,e){if(t instanceof FormData)return n.formData;if("string"==typeof t)try{if(JSON.parse(t))return n.json}catch(t){return n.text}return"object"===("undefined"==typeof t?"undefined":o(t))?e?n.json:n.form:n.text};t.exports=i},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 n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(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 o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}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),f=r(6),l=r(7),u=function(e){return e},s={},p="",d=function(e){return e},y=function(e){return e instanceof Headers?function(){return Array.from(e.keys()).reduce(function(t,r){return t[r]=e.get(r),t},{})}():e},m=function(e,t,r){var n=t.ssl,o=(t.method,t.query);return"function"==typeof r?r(e,t):("string"==typeof r&&(e=e.replace(/^\/\//,r)),/^\/\//.test(e)&&(e=(n?"https":"http")+":"+e),o&&(e+=""+(e.match(/\?/)?"&":"?")+c.stringify(o)),e)},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.method,n=void 0===r?"GET":r,u=t.query,d=void 0===u?{}:u,b=t.data,h=void 0===b?{}:b,v=t.body,g=void 0===v?{}:v,j=t.headers,O=void 0===j?{}:j,w=(t.json,o(t,["method","query","data","body","headers","json"])),x="GET"===n||"HEAD"===n;if(x?d="object"===("undefined"==typeof d?"undefined":a(d))?i({},d,h,g):0===Object.keys(d).length?h:d:g="object"!==("undefined"==typeof g?"undefined":a(g))||g instanceof FormData?0!==Object.keys(g).length||g instanceof FormData?g:h:i({},h,g),O=new Headers(i({},y(O),y(s))),x?"":O.set("Content-Type",O.get("Content-Type")||f(g)),"object"===("undefined"==typeof g?"undefined":a(g)))switch(O.get("Content-Type")){case l.form:g=c.stringify(g);break;case l.formData:var A=function(){var e=new FormData;return Object.keys(g).forEach(function(t){e.set(t,g[t])}),g=e,"break"}();if("break"===A)break}var D=i({method:n,query:d,headers:O},w);return x||(D.body=g),[m(e,D,p),D]},h=function(e){var t=function(){return e.call.apply(e,[void 0].concat(n(b.apply(void 0,arguments)))).then(d).then(u)};return t.callback=function(e){"function"==typeof e&&(u=e),delete t.callback},t.baseHost=function(e){p=e},t.headers=function(e){if("object"!==("undefined"==typeof e?"undefined":a(e))&&"function"!=typeof e)throw new Error("global headers must be object or function");s=e,delete t.headers},t};e.exports={fetchDecorator:h}},function(e,t,r){"use strict";var n=r(2),o=r(5),i=r(4);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(3),o=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:n.encode,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,r,o,i,a,c,f,l,u,s,p){var d=t;if("function"==typeof f)d=f(r,d);else if(d instanceof Date)d=s(d);else if(null===d){if(i)return c?c(r):r;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||n.isBuffer(d))return c?[p(c(r))+"="+p(c(d))]:[p(r)+"="+p(String(d))];var y=[];if("undefined"==typeof d)return y;var m;if(Array.isArray(f))m=f;else{var b=Object.keys(d);m=l?b.sort(l):b}for(var h=0;h<m.length;++h){var v=m[h];a&&null===d[v]||(y=Array.isArray(d)?y.concat(e(d[v],o(r,v),o,i,a,c,f,l,u,s,p)):y.concat(e(d[v],r+(u?"."+v:"["+v+"]"),o,i,a,c,f,l,u,s,p)))}return y};e.exports=function(e,t){var r=e,n=t||{},a="undefined"==typeof n.delimiter?c.delimiter:n.delimiter,l="boolean"==typeof n.strictNullHandling?n.strictNullHandling:c.strictNullHandling,u="boolean"==typeof n.skipNulls?n.skipNulls:c.skipNulls,s="boolean"==typeof n.encode?n.encode:c.encode,p=s?"function"==typeof n.encoder?n.encoder:c.encoder:null,d="function"==typeof n.sort?n.sort:null,y="undefined"!=typeof n.allowDots&&n.allowDots,m="function"==typeof n.serializeDate?n.serializeDate:c.serializeDate;if("undefined"==typeof n.format)n.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,n.format))throw new TypeError("Unknown format option provided.");var b,h,v=o.formatters[n.format];if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof n.filter?(h=n.filter,r=h("",r)):Array.isArray(n.filter)&&(h=n.filter,b=h);var g=[];if("object"!=typeof r||null===r)return"";var j;j=n.arrayFormat in i?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var O=i[j];b||(b=Object.keys(r)),d&&b.sort(d);for(var w=0;w<b.length;++w){var x=b[w];u&&null===r[x]||(g=g.concat(f(r[x],x,O,l,u,p,h,d,y,m,v)))}return g.join(a)}},function(e,t){"use strict";var r=Object.prototype.hasOwnProperty,n=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):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},t.merge=function(e,n,o){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];e[n]=!0}return e}if("object"!=typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],n,o):e.push(n):e[i]=n}),e):Object.keys(n).reduce(function(e,r){var i=n[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=t.merge(e[r],i,o):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="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(o):i<128?r+=n[i]:i<2048?r+=n[192|i>>6]+n[128|63&i]:i<55296||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},t.compact=function(e,r){if("object"!=typeof e||null===e)return e;var n=r||[],o=n.indexOf(e);if(o!==-1)return n[o];if(n.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],n)):"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],n)}),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,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";var n=r(3),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<n.length;++i){var a,c,f=n[i],l=f.indexOf("]=")===-1?f.indexOf("="):f.indexOf("]=")+1;l===-1?(a=t.decoder(f),c=t.strictNullHandling?null:""):(a=t.decoder(f.slice(0,l)),c=t.decoder(f.slice(l+1))),o.call(r,a)?r[a]=[].concat(r[a]).concat(c):r[a]=c}return r},c=function e(t,r,n){if(!t.length)return r;var o,i=t.shift();if("[]"===i)o=[],o=o.concat(e(t,r,n));else{o=n.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&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=e(t,r,n)):o[a]=e(t,r,n)}return o},f=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,f=i.exec(n),l=[];if(f[1]){if(!r.plainObjects&&o.call(Object.prototype,f[1])&&!r.allowPrototypes)return;l.push(f[1])}for(var u=0;null!==(f=a.exec(n))&&u<r.depth;)u+=1,(r.plainObjects||!o.call(Object.prototype,f[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&l.push(f[1]);return f&&l.push("["+n.slice(f.index)+"]"),c(l,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||n.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 o="string"==typeof e?a(e,r):e,c=r.plainObjects?Object.create(null):{},l=Object.keys(o),u=0;u<l.length;++u){var s=l[u],p=f(s,o[s],r);c=n.merge(c,p,r)}return n.compact(c)}},function(e,t,r){"use strict";var n="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},o=r(7),i=function(e,t){if(e instanceof FormData)return o.formData;if("string"==typeof e)try{if(JSON.parse(e))return o.json}catch(e){return o.text}return"object"===("undefined"==typeof e?"undefined":n(e))?t?o.json:o.form:o.text};e.exports=i},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 n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(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 o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}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),f=r(6),l=r(7),u=function(e){return e},s={},p="",d=function(e){return e},y=function(e){return e instanceof Headers?function(){return Array.from(e.keys()).reduce(function(t,r){return t[r]=e.get(r),t},{})}():e},b=function(e,t,r){var n=t.ssl,o=(t.method,t.query);return"function"==typeof r?r(e,t):("string"==typeof r&&(e=e.replace(/^\/\//,r)),/^\/\//.test(e)&&(e=(n?"https":"http")+":"+e),o&&(e+=""+(e.match(/\?/)?"&":"?")+c.stringify(o)),e)},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.method,n=void 0===r?"GET":r,u=t.query,d=void 0===u?{}:u,m=t.data,h=void 0===m?{}:m,v=t.body,g=void 0===v?{}:v,j=t.headers,O=void 0===j?{}:j,w=(t.json,o(t,["method","query","data","body","headers","json"])),x="GET"===n||"HEAD"===n,A=!!window&&g instanceof FormData;if(x?d="object"===("undefined"==typeof d?"undefined":a(d))?i({},d,h,g):0===Object.keys(d).length?h:d:g="object"!==("undefined"==typeof g?"undefined":a(g))||A?0!==Object.keys(g).length||A?g:h:i({},h,g),O=new Headers(i({},y(O),y(s))),x?"":O.set("Content-Type",O.get("Content-Type")||f(g)),"object"===("undefined"==typeof g?"undefined":a(g)))switch(O.get("Content-Type")){case l.form:g=c.stringify(g);break;case l.formData:var D=function(){var e=new FormData;return Object.keys(g).forEach(function(t){e.set(t,g[t])}),g=e,"break"}();if("break"===D)break}var k=i({method:n,query:d,headers:O},w);return x||(k.body=g),[b(e,k,p),k]},h=function(e){var t=function(){return e.call.apply(e,[void 0].concat(n(m.apply(void 0,arguments)))).then(d).then(u)};return t.callback=function(e){"function"==typeof e&&(u=e),delete t.callback},t.baseHost=function(e){p=e},t.headers=function(e){if("object"!==("undefined"==typeof e?"undefined":a(e))&&"function"!=typeof e)throw new Error("global headers must be object or function");s=e,delete t.headers},t};e.exports={fetchDecorator:h}},function(e,t,r){"use strict";var n=r(2),o=r(5),i=r(4);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(3),o=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:n.encode,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,r,o,i,a,c,f,l,u,s,p){var d=t;if("function"==typeof f)d=f(r,d);else if(d instanceof Date)d=s(d);else if(null===d){if(i)return c?c(r):r;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||n.isBuffer(d))return c?[p(c(r))+"="+p(c(d))]:[p(r)+"="+p(String(d))];var y=[];if("undefined"==typeof d)return y;var b;if(Array.isArray(f))b=f;else{var m=Object.keys(d);b=l?m.sort(l):m}for(var h=0;h<b.length;++h){var v=b[h];a&&null===d[v]||(y=Array.isArray(d)?y.concat(e(d[v],o(r,v),o,i,a,c,f,l,u,s,p)):y.concat(e(d[v],r+(u?"."+v:"["+v+"]"),o,i,a,c,f,l,u,s,p)))}return y};e.exports=function(e,t){var r=e,n=t||{},a="undefined"==typeof n.delimiter?c.delimiter:n.delimiter,l="boolean"==typeof n.strictNullHandling?n.strictNullHandling:c.strictNullHandling,u="boolean"==typeof n.skipNulls?n.skipNulls:c.skipNulls,s="boolean"==typeof n.encode?n.encode:c.encode,p=s?"function"==typeof n.encoder?n.encoder:c.encoder:null,d="function"==typeof n.sort?n.sort:null,y="undefined"!=typeof n.allowDots&&n.allowDots,b="function"==typeof n.serializeDate?n.serializeDate:c.serializeDate;if("undefined"==typeof n.format)n.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,n.format))throw new TypeError("Unknown format option provided.");var m,h,v=o.formatters[n.format];if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof n.filter?(h=n.filter,r=h("",r)):Array.isArray(n.filter)&&(h=n.filter,m=h);var g=[];if("object"!=typeof r||null===r)return"";var j;j=n.arrayFormat in i?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var O=i[j];m||(m=Object.keys(r)),d&&m.sort(d);for(var w=0;w<m.length;++w){var x=m[w];u&&null===r[x]||(g=g.concat(f(r[x],x,O,l,u,p,h,d,y,b,v)))}return g.join(a)}},function(e,t){"use strict";var r=Object.prototype.hasOwnProperty,n=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):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},t.merge=function(e,n,o){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];e[n]=!0}return e}if("object"!=typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],n,o):e.push(n):e[i]=n}),e):Object.keys(n).reduce(function(e,r){var i=n[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=t.merge(e[r],i,o):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="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(o):i<128?r+=n[i]:i<2048?r+=n[192|i>>6]+n[128|63&i]:i<55296||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},t.compact=function(e,r){if("object"!=typeof e||null===e)return e;var n=r||[],o=n.indexOf(e);if(o!==-1)return n[o];if(n.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],n)):"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],n)}),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,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";var n=r(3),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<n.length;++i){var a,c,f=n[i],l=f.indexOf("]=")===-1?f.indexOf("="):f.indexOf("]=")+1;l===-1?(a=t.decoder(f),c=t.strictNullHandling?null:""):(a=t.decoder(f.slice(0,l)),c=t.decoder(f.slice(l+1))),o.call(r,a)?r[a]=[].concat(r[a]).concat(c):r[a]=c}return r},c=function e(t,r,n){if(!t.length)return r;var o,i=t.shift();if("[]"===i)o=[],o=o.concat(e(t,r,n));else{o=n.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&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=e(t,r,n)):o[a]=e(t,r,n)}return o},f=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,f=i.exec(n),l=[];if(f[1]){if(!r.plainObjects&&o.call(Object.prototype,f[1])&&!r.allowPrototypes)return;l.push(f[1])}for(var u=0;null!==(f=a.exec(n))&&u<r.depth;)u+=1,(r.plainObjects||!o.call(Object.prototype,f[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&l.push(f[1]);return f&&l.push("["+n.slice(f.index)+"]"),c(l,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||n.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 o="string"==typeof e?a(e,r):e,c=r.plainObjects?Object.create(null):{},l=Object.keys(o),u=0;u<l.length;++u){var s=l[u],p=f(s,o[s],r);c=n.merge(c,p,r)}return n.compact(c)}},function(e,t,r){"use strict";var n="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},o=r(7),i=function(e,t){if(e instanceof FormData)return o.formData;if("string"==typeof e)try{if(JSON.parse(e))return o.json}catch(e){return o.text}return"object"===("undefined"==typeof e?"undefined":n(e))?t?o.json:o.form:o.text};e.exports=i},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

@@ -44,9 +44,10 @@ const qs = require('qs');

isGet ?
(query = typeof query === 'object' ?
{ ...query, ...data, ...body } :
(Object.keys(query).length === 0 ? data : query)) :
(body = typeof body === 'object' && !(body instanceof FormData) ?
const bodyIsFormData = window ? body instanceof FormData : false;
isGet ? (query = typeof query === 'object' ?
{ ...query, ...data, ...body } :
(Object.keys(query).length === 0 ? data : query)) :
(body = typeof body === 'object' && !bodyIsFormData ?
{ ...data, ...body } :
(Object.keys(body).length === 0 && !(body instanceof FormData) ? data : body));
(Object.keys(body).length === 0 && !bodyIsFormData ? data : body));

@@ -53,0 +54,0 @@ headers = new Headers({

{
"name": "autofetch",
"version": "1.2.3",
"version": "1.2.4",
"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