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

@microlink/mql

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microlink/mql - npm Package Compare versions

Comparing version 0.5.16 to 0.5.17

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.5.17](https://github.com/microlinkhq/mql/compare/v0.5.16...v0.5.17) (2020-02-03)
### Features
* update dependencies ([06e7ae2](https://github.com/microlinkhq/mql/commit/06e7ae2b8c195cbdb20e01f48d3ff3f551dd1cd6))
### [0.5.16](https://github.com/microlinkhq/mql/compare/v0.5.15...v0.5.16) (2020-01-18)

@@ -7,0 +14,0 @@

2091

dist/mql.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('url')) :
typeof define === 'function' && define.amd ? define(['url'], factory) :
(global = global || self, global.mql = factory(global.url));
}(this, (function (url) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.mql = factory());
}(this, (function () { 'use strict';
url = url && url.hasOwnProperty('default') ? url['default'] : url;
function encode(obj, pfx) {
var k, i, tmp, str='';
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
for (k in obj) {
if ((tmp = obj[k]) !== void 0) {
if (Array.isArray(tmp)) {
for (i=0; i < tmp.length; i++) {
str && (str += '&');
str += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);
}
} else {
str && (str += '&');
str += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);
}
}
}
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
return (pfx || '') + str;
}
function toValue(mix) {
if (!mix) return '';
var str = decodeURIComponent(mix);
if (str === 'false') return false;
if (str === 'true') return true;
return (+str * 0 === 0) ? (+str) : str;
}
function decode(str) {
var tmp, k, out={}, arr=str.split('&');
while (tmp = arr.shift()) {
tmp = tmp.split('=');
k = tmp.shift();
if (out[k] !== void 0) {
out[k] = [].concat(out[k], toValue(tmp.shift()));
} else {
out[k] = toValue(tmp.shift());
}
}
return out;
}
var qss_m = /*#__PURE__*/Object.freeze({
__proto__: null,
encode: encode,
decode: decode
});
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn, module) {

@@ -25,4 +69,4 @@ return module = { exports: {} }, fn(module, module.exports), module.exports;

(function (global, factory) {
factory(exports) ;
}(commonjsGlobal, (function (exports) {
module.exports = factory() ;
}(commonjsGlobal, (function () {
/*! MIT License © Sindre Sorhus */

@@ -76,3 +120,2 @@

const supportsStreams = typeof globals.ReadableStream === 'function';
const supportsFormData = typeof globals.FormData === 'function';

@@ -271,10 +314,6 @@ const deepMerge = (...sources) => {

url.search = new URLSearchParams(this._options.searchParams);
this.request = new globals.Request(url, this.request);
this.request = new globals.Request(new globals.Request(url, this.request), this._options);
}
if (((supportsFormData && this._options.body instanceof globals.FormData) || this._options.body instanceof URLSearchParams) && this.request.headers.has('content-type')) {
throw new Error(`The \`content-type\` header cannot be used with a ${this._options.body.constructor.name} body. It will be set automatically.`);
}
if (this._options.json) {
if (this._options.json !== undefined) {
this._options.body = JSON.stringify(this._options.json);

@@ -426,6 +465,6 @@ this.request.headers.set('content-type', 'application/json');

if (this._options.timeout === false) {
return globals.fetch(this.request);
return globals.fetch(this.request.clone());
}
return timeout(globals.fetch(this.request), this._options.timeout, this.abortController);
return timeout(globals.fetch(this.request.clone()), this._options.timeout, this.abortController);
}

@@ -488,2 +527,4 @@

ky.HTTPError = HTTPError;
ky.TimeoutError = TimeoutError;
ky.create = newDefaults => createInstance(validateAndMerge(newDefaults));

@@ -498,1674 +539,188 @@ ky.extend = newDefaults => createInstance(validateAndMerge(defaults, newDefaults));

exports.HTTPError = HTTPError;
exports.TimeoutError = TimeoutError;
exports.default = index;
return index;
Object.defineProperty(exports, '__esModule', { value: true });
})));
});
unwrapExports(umd);
var kyUmd = umd;
function encode(obj, pfx) {
var k, i, tmp, str='';
var _rollupPluginShim1 = str => str;
for (k in obj) {
if ((tmp = obj[k]) !== void 0) {
if (Array.isArray(tmp)) {
for (i=0; i < tmp.length; i++) {
str && (str += '&');
str += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);
}
} else {
str && (str += '&');
str += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);
}
}
var _rollupPluginShim1$1 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': _rollupPluginShim1
});
const copyProperty = (to, from, property, ignoreNonConfigurable) => {
// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.
// `Function#prototype` is non-writable and non-configurable so can never be modified.
if (property === 'length' || property === 'prototype') {
return;
}
return (pfx || '') + str;
}
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
function toValue(mix) {
if (!mix) return '';
var str = decodeURIComponent(mix);
if (str === 'false') return false;
if (str === 'true') return true;
return (+str * 0 === 0) ? (+str) : str;
}
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
return;
}
function decode(str) {
var tmp, k, out={}, arr=str.split('&');
Object.defineProperty(to, property, fromDescriptor);
};
while (tmp = arr.shift()) {
tmp = tmp.split('=');
k = tmp.shift();
if (out[k] !== void 0) {
out[k] = [].concat(out[k], toValue(tmp.shift()));
} else {
out[k] = toValue(tmp.shift());
}
// `Object.defineProperty()` throws if the property exists, is not configurable and either:
// - one its descriptors is changed
// - it is non-writable and its value is changed
const canCopyProperty = function (toDescriptor, fromDescriptor) {
return toDescriptor === undefined || toDescriptor.configurable || (
toDescriptor.writable === fromDescriptor.writable &&
toDescriptor.enumerable === fromDescriptor.enumerable &&
toDescriptor.configurable === fromDescriptor.configurable &&
(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)
);
};
const changePrototype = (to, from) => {
const fromPrototype = Object.getPrototypeOf(from);
if (fromPrototype === Object.getPrototypeOf(to)) {
return;
}
return out;
Object.setPrototypeOf(to, fromPrototype);
};
const wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\n${fromBody}`;
const toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');
const toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');
// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.
// We use `bind()` instead of a closure for the same reason.
// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.
const changeToString = (to, from, name) => {
const withName = name === '' ? '' : `with ${name.trim()}() `;
const newToString = wrappedToString.bind(null, withName, from.toString());
// Ensure `to.toString.toString` is non-enumerable and has the same `same`
Object.defineProperty(newToString, 'name', toStringName);
Object.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});
};
const mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {
const {name} = to;
for (const property of Reflect.ownKeys(from)) {
copyProperty(to, from, property, ignoreNonConfigurable);
}
changePrototype(to, from);
changeToString(to, from, name);
return to;
};
var mimicFn_1 = mimicFn;
var helpers = {
isFunction: obj => typeof obj === 'function',
isString: obj => typeof obj === 'string',
composeErrorMessage: (code, description) => `${code}, ${description}`,
inherits: (ctor, superCtor) => {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
};
const {isFunction, composeErrorMessage} = helpers;
function interfaceObject (error, ...props) {
Object.assign(error, ...props);
error.description = isFunction(error.message) ? error.message(error) : error.message;
error.message = error.code
? composeErrorMessage(error.code, error.description)
: error.description;
}
var qss_m = /*#__PURE__*/Object.freeze({
__proto__: null,
encode: encode,
decode: decode
});
var addErrorProps = interfaceObject;
const word = '[a-fA-F\\d:]';
const b = options => options && options.includeBoundaries ?
`(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` :
'';
var cleanStack = getCjsExportFromNamespace(_rollupPluginShim1$1);
const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
const {isString} = helpers;
const v6seg = '[a-fA-F\\d]{1,4}';
const v6 = `
(
(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(%[0-9a-zA-Z]{1,})? // %eth0 %1
`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim();
function createExtendError (ErrorClass, classProps) {
function ExtendError (props) {
const error = new ErrorClass();
const errorProps = isString(props) ? {message: props} : props;
addErrorProps(error, classProps, errorProps);
const ip = options => options && options.exact ?
new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) :
new RegExp(`(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(options)})`, 'g');
error.stack = cleanStack(error.stack);
return error
}
ip.v4 = options => options && options.exact ? new RegExp(`^${v4}$`) : new RegExp(`${b(options)}${v4}${b(options)}`, 'g');
ip.v6 = options => options && options.exact ? new RegExp(`^${v6}$`) : new RegExp(`${b(options)}${v6}${b(options)}`, 'g');
ExtendError.prototype = ErrorClass.prototype;
mimicFn_1(ExtendError, ErrorClass);
var ipRegex = ip;
return ExtendError
}
var tlds = [
"aaa",
"aarp",
"abarth",
"abb",
"abbott",
"abbvie",
"abc",
"able",
"abogado",
"abudhabi",
"ac",
"academy",
"accenture",
"accountant",
"accountants",
"aco",
"active",
"actor",
"ad",
"adac",
"ads",
"adult",
"ae",
"aeg",
"aero",
"aetna",
"af",
"afamilycompany",
"afl",
"africa",
"ag",
"agakhan",
"agency",
"ai",
"aig",
"aigo",
"airbus",
"airforce",
"airtel",
"akdn",
"al",
"alfaromeo",
"alibaba",
"alipay",
"allfinanz",
"allstate",
"ally",
"alsace",
"alstom",
"am",
"americanexpress",
"americanfamily",
"amex",
"amfam",
"amica",
"amsterdam",
"analytics",
"android",
"anquan",
"anz",
"ao",
"aol",
"apartments",
"app",
"apple",
"aq",
"aquarelle",
"ar",
"arab",
"aramco",
"archi",
"army",
"arpa",
"art",
"arte",
"as",
"asda",
"asia",
"associates",
"at",
"athleta",
"attorney",
"au",
"auction",
"audi",
"audible",
"audio",
"auspost",
"author",
"auto",
"autos",
"avianca",
"aw",
"aws",
"ax",
"axa",
"az",
"azure",
"ba",
"baby",
"baidu",
"banamex",
"bananarepublic",
"band",
"bank",
"bar",
"barcelona",
"barclaycard",
"barclays",
"barefoot",
"bargains",
"baseball",
"basketball",
"bauhaus",
"bayern",
"bb",
"bbc",
"bbt",
"bbva",
"bcg",
"bcn",
"bd",
"be",
"beats",
"beauty",
"beer",
"bentley",
"berlin",
"best",
"bestbuy",
"bet",
"bf",
"bg",
"bh",
"bharti",
"bi",
"bible",
"bid",
"bike",
"bing",
"bingo",
"bio",
"biz",
"bj",
"black",
"blackfriday",
"blanco",
"blockbuster",
"blog",
"bloomberg",
"blue",
"bm",
"bms",
"bmw",
"bn",
"bnl",
"bnpparibas",
"bo",
"boats",
"boehringer",
"bofa",
"bom",
"bond",
"boo",
"book",
"booking",
"bosch",
"bostik",
"boston",
"bot",
"boutique",
"box",
"br",
"bradesco",
"bridgestone",
"broadway",
"broker",
"brother",
"brussels",
"bs",
"bt",
"budapest",
"bugatti",
"build",
"builders",
"business",
"buy",
"buzz",
"bv",
"bw",
"by",
"bz",
"bzh",
"ca",
"cab",
"cafe",
"cal",
"call",
"calvinklein",
"cam",
"camera",
"camp",
"cancerresearch",
"canon",
"capetown",
"capital",
"capitalone",
"car",
"caravan",
"cards",
"care",
"career",
"careers",
"cars",
"cartier",
"casa",
"case",
"caseih",
"cash",
"casino",
"cat",
"catering",
"catholic",
"cba",
"cbn",
"cbre",
"cbs",
"cc",
"cd",
"ceb",
"center",
"ceo",
"cern",
"cf",
"cfa",
"cfd",
"cg",
"ch",
"chanel",
"channel",
"chase",
"chat",
"cheap",
"chintai",
"christmas",
"chrome",
"chrysler",
"church",
"ci",
"cipriani",
"circle",
"cisco",
"citadel",
"citi",
"citic",
"city",
"cityeats",
"ck",
"cl",
"claims",
"cleaning",
"click",
"clinic",
"clinique",
"clothing",
"cloud",
"club",
"clubmed",
"cm",
"cn",
"co",
"coach",
"codes",
"coffee",
"college",
"cologne",
"com",
"comcast",
"commbank",
"community",
"company",
"compare",
"computer",
"comsec",
"condos",
"construction",
"consulting",
"contact",
"contractors",
"cooking",
"cookingchannel",
"cool",
"coop",
"corsica",
"country",
"coupon",
"coupons",
"courses",
"cr",
"credit",
"creditcard",
"creditunion",
"cricket",
"crown",
"crs",
"cruise",
"cruises",
"csc",
"cu",
"cuisinella",
"cv",
"cw",
"cx",
"cy",
"cymru",
"cyou",
"cz",
"dabur",
"dad",
"dance",
"data",
"date",
"dating",
"datsun",
"day",
"dclk",
"dds",
"de",
"deal",
"dealer",
"deals",
"degree",
"delivery",
"dell",
"deloitte",
"delta",
"democrat",
"dental",
"dentist",
"desi",
"design",
"dev",
"dhl",
"diamonds",
"diet",
"digital",
"direct",
"directory",
"discount",
"discover",
"dish",
"diy",
"dj",
"dk",
"dm",
"dnp",
"do",
"docs",
"doctor",
"dodge",
"dog",
"doha",
"domains",
"dot",
"download",
"drive",
"dtv",
"dubai",
"duck",
"dunlop",
"duns",
"dupont",
"durban",
"dvag",
"dvr",
"dz",
"earth",
"eat",
"ec",
"eco",
"edeka",
"edu",
"education",
"ee",
"eg",
"email",
"emerck",
"energy",
"engineer",
"engineering",
"enterprises",
"epost",
"epson",
"equipment",
"er",
"ericsson",
"erni",
"es",
"esq",
"estate",
"esurance",
"et",
"etisalat",
"eu",
"eurovision",
"eus",
"events",
"everbank",
"exchange",
"expert",
"exposed",
"express",
"extraspace",
"fage",
"fail",
"fairwinds",
"faith",
"family",
"fan",
"fans",
"farm",
"farmers",
"fashion",
"fast",
"fedex",
"feedback",
"ferrari",
"ferrero",
"fi",
"fiat",
"fidelity",
"fido",
"film",
"final",
"finance",
"financial",
"fire",
"firestone",
"firmdale",
"fish",
"fishing",
"fit",
"fitness",
"fj",
"fk",
"flickr",
"flights",
"flir",
"florist",
"flowers",
"fly",
"fm",
"fo",
"foo",
"food",
"foodnetwork",
"football",
"ford",
"forex",
"forsale",
"forum",
"foundation",
"fox",
"fr",
"free",
"fresenius",
"frl",
"frogans",
"frontdoor",
"frontier",
"ftr",
"fujitsu",
"fujixerox",
"fun",
"fund",
"furniture",
"futbol",
"fyi",
"ga",
"gal",
"gallery",
"gallo",
"gallup",
"game",
"games",
"gap",
"garden",
"gb",
"gbiz",
"gd",
"gdn",
"ge",
"gea",
"gent",
"genting",
"george",
"gf",
"gg",
"ggee",
"gh",
"gi",
"gift",
"gifts",
"gives",
"giving",
"gl",
"glade",
"glass",
"gle",
"global",
"globo",
"gm",
"gmail",
"gmbh",
"gmo",
"gmx",
"gn",
"godaddy",
"gold",
"goldpoint",
"golf",
"goo",
"goodhands",
"goodyear",
"goog",
"google",
"gop",
"got",
"gov",
"gp",
"gq",
"gr",
"grainger",
"graphics",
"gratis",
"green",
"gripe",
"grocery",
"group",
"gs",
"gt",
"gu",
"guardian",
"gucci",
"guge",
"guide",
"guitars",
"guru",
"gw",
"gy",
"hair",
"hamburg",
"hangout",
"haus",
"hbo",
"hdfc",
"hdfcbank",
"health",
"healthcare",
"help",
"helsinki",
"here",
"hermes",
"hgtv",
"hiphop",
"hisamitsu",
"hitachi",
"hiv",
"hk",
"hkt",
"hm",
"hn",
"hockey",
"holdings",
"holiday",
"homedepot",
"homegoods",
"homes",
"homesense",
"honda",
"honeywell",
"horse",
"hospital",
"host",
"hosting",
"hot",
"hoteles",
"hotels",
"hotmail",
"house",
"how",
"hr",
"hsbc",
"ht",
"hu",
"hughes",
"hyatt",
"hyundai",
"ibm",
"icbc",
"ice",
"icu",
"id",
"ie",
"ieee",
"ifm",
"ikano",
"il",
"im",
"imamat",
"imdb",
"immo",
"immobilien",
"in",
"industries",
"infiniti",
"info",
"ing",
"ink",
"institute",
"insurance",
"insure",
"int",
"intel",
"international",
"intuit",
"investments",
"io",
"ipiranga",
"iq",
"ir",
"irish",
"is",
"iselect",
"ismaili",
"ist",
"istanbul",
"it",
"itau",
"itv",
"iveco",
"iwc",
"jaguar",
"java",
"jcb",
"jcp",
"je",
"jeep",
"jetzt",
"jewelry",
"jio",
"jlc",
"jll",
"jm",
"jmp",
"jnj",
"jo",
"jobs",
"joburg",
"jot",
"joy",
"jp",
"jpmorgan",
"jprs",
"juegos",
"juniper",
"kaufen",
"kddi",
"ke",
"kerryhotels",
"kerrylogistics",
"kerryproperties",
"kfh",
"kg",
"kh",
"ki",
"kia",
"kim",
"kinder",
"kindle",
"kitchen",
"kiwi",
"km",
"kn",
"koeln",
"komatsu",
"kosher",
"kp",
"kpmg",
"kpn",
"kr",
"krd",
"kred",
"kuokgroup",
"kw",
"ky",
"kyoto",
"kz",
"la",
"lacaixa",
"ladbrokes",
"lamborghini",
"lamer",
"lancaster",
"lancia",
"lancome",
"land",
"landrover",
"lanxess",
"lasalle",
"lat",
"latino",
"latrobe",
"law",
"lawyer",
"lb",
"lc",
"lds",
"lease",
"leclerc",
"lefrak",
"legal",
"lego",
"lexus",
"lgbt",
"li",
"liaison",
"lidl",
"life",
"lifeinsurance",
"lifestyle",
"lighting",
"like",
"lilly",
"limited",
"limo",
"lincoln",
"linde",
"link",
"lipsy",
"live",
"living",
"lixil",
"lk",
"llc",
"loan",
"loans",
"locker",
"locus",
"loft",
"lol",
"london",
"lotte",
"lotto",
"love",
"lpl",
"lplfinancial",
"lr",
"ls",
"lt",
"ltd",
"ltda",
"lu",
"lundbeck",
"lupin",
"luxe",
"luxury",
"lv",
"ly",
"ma",
"macys",
"madrid",
"maif",
"maison",
"makeup",
"man",
"management",
"mango",
"map",
"market",
"marketing",
"markets",
"marriott",
"marshalls",
"maserati",
"mattel",
"mba",
"mc",
"mckinsey",
"md",
"me",
"med",
"media",
"meet",
"melbourne",
"meme",
"memorial",
"men",
"menu",
"meo",
"merckmsd",
"metlife",
"mg",
"mh",
"miami",
"microsoft",
"mil",
"mini",
"mint",
"mit",
"mitsubishi",
"mk",
"ml",
"mlb",
"mls",
"mm",
"mma",
"mn",
"mo",
"mobi",
"mobile",
"mobily",
"moda",
"moe",
"moi",
"mom",
"monash",
"money",
"monster",
"mopar",
"mormon",
"mortgage",
"moscow",
"moto",
"motorcycles",
"mov",
"movie",
"movistar",
"mp",
"mq",
"mr",
"ms",
"msd",
"mt",
"mtn",
"mtr",
"mu",
"museum",
"mutual",
"mv",
"mw",
"mx",
"my",
"mz",
"na",
"nab",
"nadex",
"nagoya",
"name",
"nationwide",
"natura",
"navy",
"nba",
"nc",
"ne",
"nec",
"net",
"netbank",
"netflix",
"network",
"neustar",
"new",
"newholland",
"news",
"next",
"nextdirect",
"nexus",
"nf",
"nfl",
"ng",
"ngo",
"nhk",
"ni",
"nico",
"nike",
"nikon",
"ninja",
"nissan",
"nissay",
"nl",
"no",
"nokia",
"northwesternmutual",
"norton",
"now",
"nowruz",
"nowtv",
"np",
"nr",
"nra",
"nrw",
"ntt",
"nu",
"nyc",
"nz",
"obi",
"observer",
"off",
"office",
"okinawa",
"olayan",
"olayangroup",
"oldnavy",
"ollo",
"om",
"omega",
"one",
"ong",
"onl",
"online",
"onyourside",
"ooo",
"open",
"oracle",
"orange",
"org",
"organic",
"origins",
"osaka",
"otsuka",
"ott",
"ovh",
"pa",
"page",
"panasonic",
"panerai",
"paris",
"pars",
"partners",
"parts",
"party",
"passagens",
"pay",
"pccw",
"pe",
"pet",
"pf",
"pfizer",
"pg",
"ph",
"pharmacy",
"phd",
"philips",
"phone",
"photo",
"photography",
"photos",
"physio",
"piaget",
"pics",
"pictet",
"pictures",
"pid",
"pin",
"ping",
"pink",
"pioneer",
"pizza",
"pk",
"pl",
"place",
"play",
"playstation",
"plumbing",
"plus",
"pm",
"pn",
"pnc",
"pohl",
"poker",
"politie",
"porn",
"post",
"pr",
"pramerica",
"praxi",
"press",
"prime",
"pro",
"prod",
"productions",
"prof",
"progressive",
"promo",
"properties",
"property",
"protection",
"pru",
"prudential",
"ps",
"pt",
"pub",
"pw",
"pwc",
"py",
"qa",
"qpon",
"quebec",
"quest",
"qvc",
"racing",
"radio",
"raid",
"re",
"read",
"realestate",
"realtor",
"realty",
"recipes",
"red",
"redstone",
"redumbrella",
"rehab",
"reise",
"reisen",
"reit",
"reliance",
"ren",
"rent",
"rentals",
"repair",
"report",
"republican",
"rest",
"restaurant",
"review",
"reviews",
"rexroth",
"rich",
"richardli",
"ricoh",
"rightathome",
"ril",
"rio",
"rip",
"rmit",
"ro",
"rocher",
"rocks",
"rodeo",
"rogers",
"room",
"rs",
"rsvp",
"ru",
"rugby",
"ruhr",
"run",
"rw",
"rwe",
"ryukyu",
"sa",
"saarland",
"safe",
"safety",
"sakura",
"sale",
"salon",
"samsclub",
"samsung",
"sandvik",
"sandvikcoromant",
"sanofi",
"sap",
"sapo",
"sarl",
"sas",
"save",
"saxo",
"sb",
"sbi",
"sbs",
"sc",
"sca",
"scb",
"schaeffler",
"schmidt",
"scholarships",
"school",
"schule",
"schwarz",
"science",
"scjohnson",
"scor",
"scot",
"sd",
"se",
"search",
"seat",
"secure",
"security",
"seek",
"select",
"sener",
"services",
"ses",
"seven",
"sew",
"sex",
"sexy",
"sfr",
"sg",
"sh",
"shangrila",
"sharp",
"shaw",
"shell",
"shia",
"shiksha",
"shoes",
"shop",
"shopping",
"shouji",
"show",
"showtime",
"shriram",
"si",
"silk",
"sina",
"singles",
"site",
"sj",
"sk",
"ski",
"skin",
"sky",
"skype",
"sl",
"sling",
"sm",
"smart",
"smile",
"sn",
"sncf",
"so",
"soccer",
"social",
"softbank",
"software",
"sohu",
"solar",
"solutions",
"song",
"sony",
"soy",
"space",
"spiegel",
"sport",
"spot",
"spreadbetting",
"sr",
"srl",
"srt",
"st",
"stada",
"staples",
"star",
"starhub",
"statebank",
"statefarm",
"statoil",
"stc",
"stcgroup",
"stockholm",
"storage",
"store",
"stream",
"studio",
"study",
"style",
"su",
"sucks",
"supplies",
"supply",
"support",
"surf",
"surgery",
"suzuki",
"sv",
"swatch",
"swiftcover",
"swiss",
"sx",
"sy",
"sydney",
"symantec",
"systems",
"sz",
"tab",
"taipei",
"talk",
"taobao",
"target",
"tatamotors",
"tatar",
"tattoo",
"tax",
"taxi",
"tc",
"tci",
"td",
"tdk",
"team",
"tech",
"technology",
"tel",
"telecity",
"telefonica",
"temasek",
"tennis",
"teva",
"tf",
"tg",
"th",
"thd",
"theater",
"theatre",
"tiaa",
"tickets",
"tienda",
"tiffany",
"tips",
"tires",
"tirol",
"tj",
"tjmaxx",
"tjx",
"tk",
"tkmaxx",
"tl",
"tm",
"tmall",
"tn",
"to",
"today",
"tokyo",
"tools",
"top",
"toray",
"toshiba",
"total",
"tours",
"town",
"toyota",
"toys",
"tr",
"trade",
"trading",
"training",
"travel",
"travelchannel",
"travelers",
"travelersinsurance",
"trust",
"trv",
"tt",
"tube",
"tui",
"tunes",
"tushu",
"tv",
"tvs",
"tw",
"tz",
"ua",
"ubank",
"ubs",
"uconnect",
"ug",
"uk",
"unicom",
"university",
"uno",
"uol",
"ups",
"us",
"uy",
"uz",
"va",
"vacations",
"vana",
"vanguard",
"vc",
"ve",
"vegas",
"ventures",
"verisign",
"versicherung",
"vet",
"vg",
"vi",
"viajes",
"video",
"vig",
"viking",
"villas",
"vin",
"vip",
"virgin",
"visa",
"vision",
"vista",
"vistaprint",
"viva",
"vivo",
"vlaanderen",
"vn",
"vodka",
"volkswagen",
"volvo",
"vote",
"voting",
"voto",
"voyage",
"vu",
"vuelos",
"wales",
"walmart",
"walter",
"wang",
"wanggou",
"warman",
"watch",
"watches",
"weather",
"weatherchannel",
"webcam",
"weber",
"website",
"wed",
"wedding",
"weibo",
"weir",
"wf",
"whoswho",
"wien",
"wiki",
"williamhill",
"win",
"windows",
"wine",
"winners",
"wme",
"wolterskluwer",
"woodside",
"work",
"works",
"world",
"wow",
"ws",
"wtc",
"wtf",
"xbox",
"xerox",
"xfinity",
"xihuan",
"xin",
"कॉम", // xn--11b4c3d
"セール", // xn--1ck2e1b
"佛山", // xn--1qqw23a
"ಭಾರತ", // xn--2scrj9c
"慈善", // xn--30rr7y
"集团", // xn--3bst00m
"在线", // xn--3ds443g
"한국", // xn--3e0b707e
"ଭାରତ", // xn--3hcrj9c
"大众汽车", // xn--3oq18vl8pn36a
"点看", // xn--3pxu8k
"คอม", // xn--42c2d9a
"ভাৰত", // xn--45br5cyl
"ভারত", // xn--45brj9c
"八卦", // xn--45q11c
"موقع", // xn--4gbrim
"বাংলা", // xn--54b7fta0cc
"公益", // xn--55qw42g
"公司", // xn--55qx5d
"香格里拉", // xn--5su34j936bgsg
"网站", // xn--5tzm5g
"移动", // xn--6frz82g
"我爱你", // xn--6qq986b3xl
"москва", // xn--80adxhks
"қаз", // xn--80ao21a
"католик", // xn--80aqecdr1a
"онлайн", // xn--80asehdb
"сайт", // xn--80aswg
"联通", // xn--8y0a063a
"срб", // xn--90a3ac
"бг", // xn--90ae
"бел", // xn--90ais
"קום", // xn--9dbq2a
"时尚", // xn--9et52u
"微博", // xn--9krt00a
"淡马锡", // xn--b4w605ferd
"ファッション", // xn--bck1b9a5dre4c
"орг", // xn--c1avg
"नेट", // xn--c2br7g
"ストア", // xn--cck2b3b
"삼성", // xn--cg4bki
"சிங்கப்பூர்", // xn--clchc0ea0b2g2a9gcd
"商标", // xn--czr694b
"商店", // xn--czrs0t
"商城", // xn--czru2d
"дети", // xn--d1acj3b
"мкд", // xn--d1alf
"ею", // xn--e1a4c
"ポイント", // xn--eckvdtc9d
"新闻", // xn--efvy88h
"工行", // xn--estv75g
"家電", // xn--fct429k
"كوم", // xn--fhbei
"中文网", // xn--fiq228c5hs
"中信", // xn--fiq64b
"中国", // xn--fiqs8s
"中國", // xn--fiqz9s
"娱乐", // xn--fjq720a
"谷歌", // xn--flw351e
"భారత్", // xn--fpcrj9c3d
"ලංකා", // xn--fzc2c9e2c
"電訊盈科", // xn--fzys8d69uvgm
"购物", // xn--g2xx48c
"クラウド", // xn--gckr3f0f
"ભારત", // xn--gecrj9c
"通販", // xn--gk3at1e
"भारतम्", // xn--h2breg3eve
"भारत", // xn--h2brj9c
"भारोत", // xn--h2brj9c8c
"网店", // xn--hxt814e
"संगठन", // xn--i1b6b1a6a2e
"餐厅", // xn--imr513n
"网络", // xn--io0a7i
"ком", // xn--j1aef
"укр", // xn--j1amh
"香港", // xn--j6w193g
"诺基亚", // xn--jlq61u9w7b
"食品", // xn--jvr189m
"飞利浦", // xn--kcrx77d1x4a
"台湾", // xn--kprw13d
"台灣", // xn--kpry57d
"手表", // xn--kpu716f
"手机", // xn--kput3i
"мон", // xn--l1acc
"الجزائر", // xn--lgbbat1ad8j
"عمان", // xn--mgb9awbf
"ارامكو", // xn--mgba3a3ejt
"ایران", // xn--mgba3a4f16a
"العليان", // xn--mgba7c0bbn0a
"اتصالات", // xn--mgbaakc7dvf
"امارات", // xn--mgbaam7a8h
"بازار", // xn--mgbab2bd
"پاکستان", // xn--mgbai9azgqp6j
"الاردن", // xn--mgbayh7gpa
"موبايلي", // xn--mgbb9fbpob
"بارت", // xn--mgbbh1a
"بھارت", // xn--mgbbh1a71e
"المغرب", // xn--mgbc0a9azcg
"ابوظبي", // xn--mgbca7dzdo
"السعودية", // xn--mgberp4a5d4ar
"ڀارت", // xn--mgbgu82a
"كاثوليك", // xn--mgbi4ecexp
"سودان", // xn--mgbpl2fh
"همراه", // xn--mgbt3dhd
"عراق", // xn--mgbtx2b
"مليسيا", // xn--mgbx4cd0ab
"澳門", // xn--mix891f
"닷컴", // xn--mk1bu44c
"政府", // xn--mxtq1m
"شبكة", // xn--ngbc5azd
"بيتك", // xn--ngbe9e0a
"عرب", // xn--ngbrx
"გე", // xn--node
"机构", // xn--nqv7f
"组织机构", // xn--nqv7fs00ema
"健康", // xn--nyqy26a
"ไทย", // xn--o3cw4h
"سورية", // xn--ogbpf8fl
"招聘", // xn--otu796d
"рус", // xn--p1acf
"рф", // xn--p1ai
"珠宝", // xn--pbt977c
"تونس", // xn--pgbs0dh
"大拿", // xn--pssy2u
"みんな", // xn--q9jyb4c
"グーグル", // xn--qcka1pmc
"ελ", // xn--qxam
"世界", // xn--rhqv96g
"書籍", // xn--rovu88b
"ഭാരതം", // xn--rvc1e0am3e
"ਭਾਰਤ", // xn--s9brj9c
"网址", // xn--ses554g
"닷넷", // xn--t60b56a
"コム", // xn--tckwe
"天主教", // xn--tiq49xqyj
"游戏", // xn--unup4y
"vermögensberater", // xn--vermgensberater-ctb
"vermögensberatung", // xn--vermgensberatung-pwb
"企业", // xn--vhquv
"信息", // xn--vuq861b
"嘉里大酒店", // xn--w4r85el8fhu5dnra
"嘉里", // xn--w4rs40l
"مصر", // xn--wgbh1c
"قطر", // xn--wgbl6a
"广东", // xn--xhq521b
"இலங்கை", // xn--xkc2al3hye2a
"இந்தியா", // xn--xkc2dl3a5ee0h
"հայ", // xn--y9a3aq
"新加坡", // xn--yfro4i67o
"فلسطين", // xn--ygbi2ammx
"政务", // xn--zfr164b
"xperia",
"xxx",
"xyz",
"yachts",
"yahoo",
"yamaxun",
"yandex",
"ye",
"yodobashi",
"yoga",
"yokohama",
"you",
"youtube",
"yt",
"yun",
"za",
"zappos",
"zara",
"zero",
"zip",
"zippo",
"zm",
"zone",
"zuerich",
"zw"
];
var createExtendError_1 = createExtendError;
var urlRegex = options => {
options = {
strict: true,
...options
};
const {inherits} = helpers;
const protocol = `(?:(?:[a-z]+:)?//)${options.strict ? '' : '?'}`;
const auth = '(?:\\S+(?::\\S*)?@)?';
const ip = ipRegex.v4().source;
const host = '(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)';
const domain = '(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*';
const tld = `(?:\\.${options.strict ? '(?:[a-z\\u00a1-\\uffff]{2,})' : `(?:${tlds.sort((a, b) => b.length - a.length).join('|')})`})\\.?`;
const port = '(?::\\d{2,5})?';
const path = '(?:[/?#][^\\s"]*)?';
const regex = `(?:${protocol}|www\\.)${auth}(?:localhost|${ip}|${host}${domain}${tld})${port}${path}`;
return options.exact ? new RegExp(`(?:^${regex}$)`, 'i') : new RegExp(regex, 'ig');
};
const REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/;
const URL$1 = commonjsGlobal.window ? window.URL : url.URL;
const urlRegex$1 = urlRegex({ exact: true });
function createError (className) {
if (typeof className !== 'string') {
throw new TypeError('Expected className to be a string')
}
const REGEX_HTTP_PROTOCOL = /^https?:\/\//i;
if (REGEX_CLASS_NAME.test(className)) {
throw new Error('className contains invalid characters')
}
var isUrlHttp = url => {
try {
const { href } = new URL$1(url);
return REGEX_HTTP_PROTOCOL.test(href) && urlRegex$1.test(href)
} catch (err) {
return false
function ErrorClass () {
Object.defineProperty(this, 'name', {
configurable: true,
value: className,
writable: true
});
Error.captureStackTrace(this, this.constructor);
}
inherits(ErrorClass, Error);
mimicFn_1(ErrorClass, Error);
return ErrorClass
}
var createError_1 = createError;
const createErrorClass = ErrorClass => (className, props) => {
const errorClass = createError_1(className || ErrorClass.name);
return createExtendError_1(errorClass, props)
};
var lib = createErrorClass(Error);
var type = createErrorClass(TypeError);
var range = createErrorClass(RangeError);
var eval_1 = createErrorClass(EvalError);
var syntax = createErrorClass(SyntaxError);
var reference = createErrorClass(ReferenceError);
var uri = createErrorClass(URIError);
lib.type = type;
lib.range = range;
lib.eval = eval_1;
lib.syntax = syntax;
lib.reference = reference;
lib.uri = uri;
/*!

@@ -2331,181 +886,9 @@ * Determine if an object is a Buffer

var _rollupPluginShim1 = str => str;
var _rollupPluginShim1$1 = /*#__PURE__*/Object.freeze({
var _rollupPluginShim2 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': _rollupPluginShim1
'default': window
});
const copyProperty = (to, from, property, ignoreNonConfigurable) => {
// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.
// `Function#prototype` is non-writable and non-configurable so can never be modified.
if (property === 'length' || property === 'prototype') {
return;
}
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
return;
}
Object.defineProperty(to, property, fromDescriptor);
};
// `Object.defineProperty()` throws if the property exists, is not configurable and either:
// - one its descriptors is changed
// - it is non-writable and its value is changed
const canCopyProperty = function (toDescriptor, fromDescriptor) {
return toDescriptor === undefined || toDescriptor.configurable || (
toDescriptor.writable === fromDescriptor.writable &&
toDescriptor.enumerable === fromDescriptor.enumerable &&
toDescriptor.configurable === fromDescriptor.configurable &&
(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)
);
};
const changePrototype = (to, from) => {
const fromPrototype = Object.getPrototypeOf(from);
if (fromPrototype === Object.getPrototypeOf(to)) {
return;
}
Object.setPrototypeOf(to, fromPrototype);
};
const wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\n${fromBody}`;
const toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');
const toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');
// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.
// We use `bind()` instead of a closure for the same reason.
// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.
const changeToString = (to, from, name) => {
const withName = name === '' ? '' : `with ${name.trim()}() `;
const newToString = wrappedToString.bind(null, withName, from.toString());
// Ensure `to.toString.toString` is non-enumerable and has the same `same`
Object.defineProperty(newToString, 'name', toStringName);
Object.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});
};
const mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {
const {name} = to;
for (const property of Reflect.ownKeys(from)) {
copyProperty(to, from, property, ignoreNonConfigurable);
}
changePrototype(to, from);
changeToString(to, from, name);
return to;
};
var mimicFn_1 = mimicFn;
var helpers = {
isFunction: obj => typeof obj === 'function',
isString: obj => typeof obj === 'string',
composeErrorMessage: (code, description) => `${code}, ${description}`,
inherits: (ctor, superCtor) => {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
};
const {isFunction, composeErrorMessage} = helpers;
function interfaceObject (error, ...props) {
Object.assign(error, ...props);
error.description = isFunction(error.message) ? error.message(error) : error.message;
error.message = error.code
? composeErrorMessage(error.code, error.description)
: error.description;
}
var addErrorProps = interfaceObject;
var cleanStack = getCjsExportFromNamespace(_rollupPluginShim1$1);
const {isString} = helpers;
function createExtendError (ErrorClass, classProps) {
function ExtendError (props) {
const error = new ErrorClass();
const errorProps = isString(props) ? {message: props} : props;
addErrorProps(error, classProps, errorProps);
error.stack = cleanStack(error.stack);
return error
}
ExtendError.prototype = ErrorClass.prototype;
mimicFn_1(ExtendError, ErrorClass);
return ExtendError
}
var createExtendError_1 = createExtendError;
const {inherits} = helpers;
const REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/;
function createError (className) {
if (typeof className !== 'string') {
throw new TypeError('Expected className to be a string')
}
if (REGEX_CLASS_NAME.test(className)) {
throw new Error('className contains invalid characters')
}
function ErrorClass () {
Object.defineProperty(this, 'name', {
configurable: true,
value: className,
writable: true
});
Error.captureStackTrace(this, this.constructor);
}
inherits(ErrorClass, Error);
mimicFn_1(ErrorClass, Error);
return ErrorClass
}
var createError_1 = createError;
const createErrorClass = ErrorClass => (className, props) => {
const errorClass = createError_1(className || ErrorClass.name);
return createExtendError_1(errorClass, props)
};
var lib = createErrorClass(Error);
var type = createErrorClass(TypeError);
var range = createErrorClass(RangeError);
var eval_1 = createErrorClass(EvalError);
var syntax = createErrorClass(SyntaxError);
var reference = createErrorClass(ReferenceError);
var uri = createErrorClass(URIError);
lib.type = type;
lib.range = range;
lib.eval = eval_1;
lib.syntax = syntax;
lib.reference = reference;
lib.uri = uri;
const ENDPOINT = {

@@ -2516,7 +899,7 @@ FREE: 'https://api.microlink.io',

const isTimeoutError = err =>
const isTimeoutError = (err, statusCode) =>
// client side error
err.name === 'TimeoutError' ||
// server side error
(err.name === 'HTTPError' && err.statusCode.toString()[0] === '5') ||
(err.name === 'HTTPError' && statusCode.toString()[0] === '5') ||
// browser side unexpected error

@@ -2552,3 +935,3 @@ err.type === 'invalid-json';

timeout: 30000,
json: true
responseType: 'json'
};

@@ -2563,5 +946,6 @@

} catch (err) {
const { name, statusCode = 500, body: rawBody, message: rawMessage } = err;
const { name, message: rawMessage, response = {} } = err;
const { statusCode = 500, body: rawBody } = response;
if (isTimeoutError(err)) {
if (isTimeoutError(err, statusCode)) {
const message = `The \`url\` as \`${url}\` reached timeout after ${opts.retry.maxRetryAfter}ms.`;

@@ -2584,2 +968,3 @@ throw new MicrolinkError({

: { message: rawMessage, status: 'fail' };
const message = body.data ? body.data[Object.keys(body.data)[0]] : body.message;

@@ -2628,3 +1013,4 @@

const { default: ky } = kyUmd;
var require$$1 = getCjsExportFromNamespace(_rollupPluginShim2);
const { encode: stringify } = qss_m;

@@ -2634,10 +1020,22 @@

const { URL: URL$1 } = require$$1;
const REGEX_HTTP_PROTOCOL = /^https?:\/\//i;
const MicrolinkError = lib('MicrolinkError');
// TODO: `json` because always is the output serialized.
const got = async (url, { json, ...opts }) => {
// lightweight version of `is-url-http`
const isUrlHttp = url => {
try {
const response = await ky(url, opts);
return REGEX_HTTP_PROTOCOL.test(new URL$1(url).href)
} catch (err) {
return false
}
};
const got = async (url, { responseType, ...opts }) => {
try {
const response = await kyUmd(url, opts);
const body = await response.json();

@@ -2648,5 +1046,4 @@ const { headers, status: statusCode, statusText: statusMessage } = response;

if (err.response) {
err.body = await err.response.json();
err.statusCode = err.response.status;
err.headers = err.response.headers;
const { response } = err;
err.response = { ...response, statusCode: response.status, body: await response.json() };
}

@@ -2663,3 +1060,3 @@ throw err

flatten: flat,
VERSION: '0.5.16'
VERSION: '0.5.17'
});

@@ -2666,0 +1063,0 @@

@@ -1,4 +0,4 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("url")):"function"==typeof define&&define.amd?define(["url"],t):(e=e||self).mql=t(e.url)}(this,(function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.default||e}var o,s=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,r){!function(e){
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).mql=e()}(this,(function(){"use strict";function t(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}var e=Object.freeze({__proto__:null,encode:function(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n},decode:function(e){for(var r,o,s={},n=e.split("&");r=n.shift();)void 0!==s[o=(r=r.split("=")).shift()]?s[o]=[].concat(s[o],t(r.shift())):s[o]=t(r.shift());return s}}),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.default||t}var s=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function(){
/*! MIT License © Sindre Sorhus */
const r={},o=e=>"undefined"!=typeof self&&self&&e in self?self:"undefined"!=typeof window&&window&&e in window?window:void 0!==t&&t&&e in t?t:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0,s=["Headers","Request","Response","ReadableStream","fetch","AbortController","FormData"];for(const e of s)Object.defineProperty(r,e,{get(){const t=o(e),r=t&&t[e];return"function"==typeof r?r.bind(t):r}});const a=e=>null!==e&&"object"==typeof e,n="function"==typeof r.AbortController,i="function"==typeof r.ReadableStream,c="function"==typeof r.FormData,l=(...e)=>{let t={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(a(r))for(let[e,o]of Object.entries(r))a(o)&&Reflect.has(t,e)&&(o=l(t[e],o)),t={...t,[e]:o};return t},u=["get","post","put","patch","head","delete"],p={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},d=[413,429,503],f=Symbol("stop");class h extends Error{constructor(e){super(e.statusText),this.name="HTTPError",this.response=e}}class m extends Error{constructor(){super("Request timed out"),this.name="TimeoutError"}}const b=e=>new Promise(t=>setTimeout(t,e)),g=(e,t,r)=>new Promise((o,s)=>{const a=setTimeout(()=>{r&&r.abort(),s(new m)},t);e.then(o).catch(s).then(()=>{clearTimeout(a)})}),y=e=>u.includes(e)?e.toUpperCase():e,w={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:d},k=(e={})=>{if("number"==typeof e)return{...w,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...w,...e,afterStatusCodes:d}},v=2147483647;class j{constructor(e,t={}){if(this._retryCount=0,this._input=e,this._options={credentials:this._input.credentials||"same-origin",...t,hooks:l({beforeRequest:[],beforeRetry:[],afterResponse:[]},t.hooks),method:y(t.method||this._input.method),prefixUrl:String(t.prefixUrl||""),retry:k(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:void 0===t.timeout?1e4:t.timeout},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof r.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(n&&(this.abortController=new r.AbortController,this._options.signal&&(this._options.signal.addEventListener("abort",()=>{this.abortController.abort()}),this._options.signal=this.abortController.signal)),this.request=new r.Request(this._input,this._options),this._options.searchParams){const e=new URL(this.request.url);e.search=new URLSearchParams(this._options.searchParams),this.request=new r.Request(e,this.request)}if((c&&this._options.body instanceof r.FormData||this._options.body instanceof URLSearchParams)&&this.request.headers.has("content-type"))throw new Error(`The \`content-type\` header cannot be used with a ${this._options.body.constructor.name} body. It will be set automatically.`);this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new r.Request(this.request,{body:this._options.body}));const o=async()=>{if(this._options.timeout>v)throw new RangeError(`The \`timeout\` option cannot be greater than ${v}`);await b(1);let e=await this._fetch();for(const t of this._options.hooks.afterResponse){const o=await t(this.request,this._options,e.clone());o instanceof r.Response&&(e=o)}if(!e.ok&&this._options.throwHttpErrors)throw new h(e);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!i)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(e.clone(),this._options.onDownloadProgress)}return e},s=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(o):o();for(const[e,t]of Object.entries(p))s[e]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||t);const r=(await s).clone();return"json"===e&&204===r.status?"":r[e]()};return s}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(e instanceof m)){if(e instanceof h){if(!this._options.retry.statusCodes.includes(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),v);if(0!==r&&this._retryCount>0){await b(r);for(const e of this._options.hooks.beforeRetry)if(await e(this.request,this._options,t,this._retryCount)===f)return;return this._retry(e)}if(this._options.throwHttpErrors)throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}return!1===this._options.timeout?r.fetch(this.request):g(r.fetch(this.request),this._options.timeout,this.abortController)}_stream(e,t){const o=Number(e.headers.get("content-length"))||0;let s=0;return new r.Response(new r.ReadableStream({start(r){const a=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:o},new Uint8Array),async function e(){const{done:n,value:i}=await a.read();n?r.close():(t&&(s+=i.byteLength,t({percent:0===o?0:s/o,transferredBytes:s,totalBytes:o},i)),r.enqueue(i),e())}()}}))}}const x=(...e)=>{for(const t of e)if((!a(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return l({},...e)},_=e=>{const t=(t,r)=>new j(t,x(e,r));for(const r of u)t[r]=(t,o)=>new j(t,x(e,o,{method:r}));return t.create=e=>_(x(e)),t.extend=t=>_(x(e,t)),t.stop=f,t};var $=_();e.HTTPError=h,e.TimeoutError=m,e.default=$,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(o=s)&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")&&o.default;var a=s;function n(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}var i=Object.freeze({__proto__:null,encode:function(e,t){var r,o,s,a="";for(r in e)if(void 0!==(s=e[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)a&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else a&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(t||"")+a},decode:function(e){for(var t,r,o={},s=e.split("&");t=s.shift();)void 0!==o[r=(t=t.split("=")).shift()]?o[r]=[].concat(o[r],n(t.shift())):o[r]=n(t.shift());return o}});const c=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=[a-fA-F\\d:])|(?<=[a-fA-F\\d:])(?=\\s|$))":"",l="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",u="[a-fA-F\\d]{1,4}",p=`\n(\n(?:${u}:){7}(?:${u}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${u}:){6}(?:${l}|:${u}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${u}:){5}(?::${l}|(:${u}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${u}:){4}(?:(:${u}){0,1}:${l}|(:${u}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${u}:){3}(?:(:${u}){0,2}:${l}|(:${u}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${u}:){2}(?:(:${u}){0,3}:${l}|(:${u}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${u}:){1}(?:(:${u}){0,4}:${l}|(:${u}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::${u}){0,5}:${l}|(?::${u}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),d=e=>e&&e.exact?new RegExp(`(?:^${l}$)|(?:^${p}$)`):new RegExp(`(?:${c(e)}${l}${c(e)})|(?:${c(e)}${p}${c(e)})`,"g");d.v4=e=>e&&e.exact?new RegExp(`^${l}$`):new RegExp(`${c(e)}${l}${c(e)}`,"g"),d.v6=e=>e&&e.exact?new RegExp(`^${p}$`):new RegExp(`${c(e)}${p}${c(e)}`,"g");var f=d,h=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","active","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afamilycompany","afl","africa","ag","agakhan","agency","ai","aig","aigo","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blanco","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnl","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","budapest","bugatti","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","ceb","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dodge","dog","doha","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epost","epson","equipment","er","ericsson","erni","es","esq","estate","esurance","et","etisalat","eu","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glade","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodhands","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","industries","infiniti","info","ing","ink","institute","insurance","insure","int","intel","international","intuit","investments","io","ipiranga","iq","ir","irish","is","iselect","ismaili","ist","istanbul","it","itau","itv","iveco","iwc","jaguar","java","jcb","jcp","je","jeep","jetzt","jewelry","jio","jlc","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","lk","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","lupin","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","meo","merckmsd","metlife","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","mutual","mv","mw","mx","my","mz","na","nab","nadex","nagoya","name","nationwide","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","panerai","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","qvc","racing","radio","raid","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sapo","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","spiegel","sport","spot","spreadbetting","sr","srl","srt","st","stada","staples","star","starhub","statebank","statefarm","statoil","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiftcover","swiss","sx","sy","sydney","symantec","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","telecity","telefonica","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","uconnect","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vista","vistaprint","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","ಭಾರತ","慈善","集团","在线","한국","ଭାରତ","大众汽车","点看","คอม","ভাৰত","ভারত","八卦","موقع","বাংলা","公益","公司","香格里拉","网站","移动","我爱你","москва","қаз","католик","онлайн","сайт","联通","срб","бг","бел","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","ею","ポイント","新闻","工行","家電","كوم","中文网","中信","中国","中國","娱乐","谷歌","భారత్","ලංකා","電訊盈科","购物","クラウド","ભારત","通販","भारतम्","भारत","भारोत","网店","संगठन","餐厅","网络","ком","укр","香港","诺基亚","食品","飞利浦","台湾","台灣","手表","手机","мон","الجزائر","عمان","ارامكو","ایران","العليان","اتصالات","امارات","بازار","پاکستان","الاردن","موبايلي","بارت","بھارت","المغرب","ابوظبي","السعودية","ڀارت","كاثوليك","سودان","همراه","عراق","مليسيا","澳門","닷컴","政府","شبكة","بيتك","عرب","გე","机构","组织机构","健康","ไทย","سورية","招聘","рус","рф","珠宝","تونس","大拿","みんな","グーグル","ελ","世界","書籍","ഭാരതം","ਭਾਰਤ","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","مصر","قطر","广东","இலங்கை","இந்தியா","հայ","新加坡","فلسطين","政务","xperia","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zippo","zm","zone","zuerich","zw"];const m=t.window?window.URL:e.URL,b=(e=>{const t=`(?:${`(?:(?:[a-z]+:)?//)${(e={strict:!0,...e}).strict?"":"?"}`}|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${f.v4().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*${`(?:\\.${e.strict?"(?:[a-z\\u00a1-\\uffff]{2,})":`(?:${h.sort((e,t)=>t.length-e.length).join("|")})`})\\.?`})(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return e.exact?new RegExp(`(?:^${t}$)`,"i"):new RegExp(t,"ig")})({exact:!0}),g=/^https?:\/\//i;var y=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},w=v;
const t={},e=t=>"undefined"!=typeof self&&self&&t in self?self:"undefined"!=typeof window&&window&&t in window?window:void 0!==r&&r&&t in r?r:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0,o=["Headers","Request","Response","ReadableStream","fetch","AbortController","FormData"];for(const r of o)Object.defineProperty(t,r,{get(){const t=e(r),o=t&&t[r];return"function"==typeof o?o.bind(t):o}});const s=t=>null!==t&&"object"==typeof t,n="function"==typeof t.AbortController,i="function"==typeof t.ReadableStream,a=(...t)=>{let e={};for(const r of t)if(Array.isArray(r))Array.isArray(e)||(e=[]),e=[...e,...r];else if(s(r))for(let[t,o]of Object.entries(r))s(o)&&Reflect.has(e,t)&&(o=a(e[t],o)),e={...e,[t]:o};return e},c=["get","post","put","patch","head","delete"],u={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},f=[413,429,503],p=Symbol("stop");class l extends Error{constructor(t){super(t.statusText),this.name="HTTPError",this.response=t}}class h extends Error{constructor(){super("Request timed out"),this.name="TimeoutError"}}const d=t=>new Promise(e=>setTimeout(e,t)),y=t=>c.includes(t)?t.toUpperCase():t,m={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:f},b=(t={})=>{if("number"==typeof t)return{...m,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...m,...t,afterStatusCodes:f}};class w{constructor(e,r={}){if(this._retryCount=0,this._input=e,this._options={credentials:this._input.credentials||"same-origin",...r,hooks:a({beforeRequest:[],beforeRetry:[],afterResponse:[]},r.hooks),method:y(r.method||this._input.method),prefixUrl:String(r.prefixUrl||""),retry:b(r.retry),throwHttpErrors:!1!==r.throwHttpErrors,timeout:void 0===r.timeout?1e4:r.timeout},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof t.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(n&&(this.abortController=new t.AbortController,this._options.signal&&(this._options.signal.addEventListener("abort",()=>{this.abortController.abort()}),this._options.signal=this.abortController.signal)),this.request=new t.Request(this._input,this._options),this._options.searchParams){const e=new URL(this.request.url);e.search=new URLSearchParams(this._options.searchParams),this.request=new t.Request(new t.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new t.Request(this.request,{body:this._options.body}));const o=async()=>{if(this._options.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await d(1);let e=await this._fetch();for(const r of this._options.hooks.afterResponse){const o=await r(this.request,this._options,e.clone());o instanceof t.Response&&(e=o)}if(!e.ok&&this._options.throwHttpErrors)throw new l(e);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!i)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(e.clone(),this._options.onDownloadProgress)}return e},s=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(o):o();for(const[t,e]of Object.entries(u))s[t]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||e);const r=(await s).clone();return"json"===t&&204===r.status?"":r[t]()};return s}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof h)){if(t instanceof l){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),2147483647);if(0!==r&&this._retryCount>0){await d(r);for(const t of this._options.hooks.beforeRetry)if(await t(this.request,this._options,e,this._retryCount)===p)return;return this._retry(t)}if(this._options.throwHttpErrors)throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?t.fetch(this.request.clone()):(e=t.fetch(this.request.clone()),r=this._options.timeout,o=this.abortController,new Promise((t,s)=>{const n=setTimeout(()=>{o&&o.abort(),s(new h)},r);e.then(t).catch(s).then(()=>{clearTimeout(n)})}));var e,r,o}_stream(e,r){const o=Number(e.headers.get("content-length"))||0;let s=0;return new t.Response(new t.ReadableStream({start(t){const n=e.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:o},new Uint8Array),async function e(){const{done:i,value:a}=await n.read();i?t.close():(r&&(s+=a.byteLength,r({percent:0===o?0:s/o,transferredBytes:s,totalBytes:o},a)),t.enqueue(a),e())}()}}))}}const g=(...t)=>{for(const e of t)if((!s(e)||Array.isArray(e))&&void 0!==e)throw new TypeError("The `options` argument must be an object");return a({},...t)},_=t=>{const e=(e,r)=>new w(e,g(t,r));for(const r of c)e[r]=(e,o)=>new w(e,g(t,o,{method:r}));return e.HTTPError=l,e.TimeoutError=h,e.create=t=>_(g(t)),e.extend=e=>_(g(t,e)),e.stop=p,e};return _()}()})),n=Object.freeze({__proto__:null,default:t=>t});const i=(t,e,r,o)=>{if("length"===r||"prototype"===r)return;const s=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!a(s,n)&&o||Object.defineProperty(t,r,n)},a=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},c=(t,e)=>`/* Wrapped ${t}*/\n${e}`,u=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),f=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");var p=(t,e,{ignoreNonConfigurable:r=!1}={})=>{const{name:o}=t;for(const o of Reflect.ownKeys(e))i(t,e,o,r);return((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)})(t,e),((t,e,r)=>{const o=""===r?"":`with ${r.trim()}() `,s=c.bind(null,o,e.toString());Object.defineProperty(s,"name",f),Object.defineProperty(t,"toString",{...u,value:s})})(t,e,o),t},l={isFunction:t=>"function"==typeof t,isString:t=>"string"==typeof t,composeErrorMessage:(t,e)=>`${t}, ${e}`,inherits:(t,e)=>{t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:h,composeErrorMessage:d}=l;var y=function(t,...e){Object.assign(t,...e),t.description=h(t.message)?t.message(t):t.message,t.message=t.code?d(t.code,t.description):t.description},m=o(n);const{isString:b}=l;var w=function(t,e){function r(r){const o=new t,s=b(r)?{message:r}:r;return y(o,e,s),o.stack=m(o.stack),o}return r.prototype=t.prototype,p(r,t),r};const{inherits:g}=l,_=/[^0-9a-zA-Z_$]/;var j=function(t){if("string"!=typeof t)throw new TypeError("Expected className to be a string");if(_.test(t))throw new Error("className contains invalid characters");function e(){Object.defineProperty(this,"name",{configurable:!0,value:t,writable:!0}),Error.captureStackTrace(this,this.constructor)}return g(e,Error),p(e,Error),e};const E=t=>(e,r)=>{const o=j(e||t.name);return w(o,r)};var R=E(Error),O=E(TypeError),v=E(RangeError),T=E(EvalError),C=E(SyntaxError),x=E(ReferenceError),A=E(URIError);R.type=O,R.range=v,R.eval=T,R.syntax=C,R.reference=x,R.uri=A;
/*!

@@ -9,3 +9,4 @@ * Determine if an object is a Buffer

* @license MIT
*/function k(e){return e}function v(e,t){const r=(t=t||{}).delimiter||".",o=t.maxDepth,s=t.transformKey||k,a={};return function e(n,i,c){c=c||1,Object.keys(n).forEach((function(l){const u=n[l],p=t.safe&&Array.isArray(u),d=Object.prototype.toString.call(u),f=y(u),h="[object Object]"===d||"[object Array]"===d,m=i?i+r+s(l):s(l);if(!p&&!f&&h&&Object.keys(u).length&&(!t.maxDepth||c<o))return e(u,m,c+1);a[m]=u}))}(e),a}v.flatten=v,v.unflatten=function e(t,r){const o=(r=r||{}).delimiter||".",s=r.overwrite||!1,a=r.transformKey||k,n={};if(y(t)||"[object Object]"!==Object.prototype.toString.call(t))return t;function i(e){const t=Number(e);return isNaN(t)||-1!==e.indexOf(".")||r.object?e:t}return t=Object.keys(t).reduce((e,s)=>{const a=Object.prototype.toString.call(t[s]);return!("[object Object]"===a||"[object Array]"===a)||function(e){const t=Object.prototype.toString.call(e),r="[object Array]"===t,o="[object Object]"===t;if(!e)return!0;if(r)return!e.length;if(o)return!Object.keys(e).length}(t[s])?(e[s]=t[s],e):function(e,t,r){return Object.keys(r).reduce((function(t,s){return t[e+o+s]=r[s],t}),t)}(s,e,v(t[s],r))},{}),Object.keys(t).forEach((function(c){const l=c.split(o).map(a);let u=i(l.shift()),p=i(l[0]),d=n;for(;void 0!==p;){const e=Object.prototype.toString.call(d[u]),t="[object Object]"===e||"[object Array]"===e;if(!s&&!t&&void 0!==d[u])return;(s&&!t||!s&&null==d[u])&&(d[u]="number"!=typeof p||r.object?{}:[]),d=d[u],l.length>0&&(u=i(l.shift()),p=i(l[0]))}d[u]=e(t[c],r)})),n};var j=Object.freeze({__proto__:null,default:e=>e});const x=(e,t,r,o)=>{if("length"===r||"prototype"===r)return;const s=Object.getOwnPropertyDescriptor(e,r),a=Object.getOwnPropertyDescriptor(t,r);!_(s,a)&&o||Object.defineProperty(e,r,a)},_=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},$=(e,t)=>`/* Wrapped ${e}*/\n${t}`,E=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),R=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");var O=(e,t,{ignoreNonConfigurable:r=!1}={})=>{const{name:o}=e;for(const o of Reflect.ownKeys(t))x(e,t,o,r);return((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const o=""===r?"":`with ${r.trim()}() `,s=$.bind(null,o,t.toString());Object.defineProperty(s,"name",R),Object.defineProperty(e,"toString",{...E,value:s})})(e,t,o),e},z={isFunction:e=>"function"==typeof e,isString:e=>"string"==typeof e,composeErrorMessage:(e,t)=>`${e}, ${t}`,inherits:(e,t)=>{e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:q,composeErrorMessage:T}=z;var C=function(e,...t){Object.assign(e,...t),e.description=q(e.message)?e.message(e):e.message,e.message=e.code?T(e.code,e.description):e.description},A=r(j);const{isString:S}=z;var P=function(e,t){function r(r){const o=new e,s=S(r)?{message:r}:r;return C(o,t,s),o.stack=A(o.stack),o}return r.prototype=e.prototype,O(r,e),r};const{inherits:U}=z,D=/[^0-9a-zA-Z_$]/;var N=function(e){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(D.test(e))throw new Error("className contains invalid characters");function t(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),Error.captureStackTrace(this,this.constructor)}return U(t,Error),O(t,Error),t};const I=e=>(t,r)=>{const o=N(t||e.name);return P(o,r)};var L=I(Error),F=I(TypeError),M=I(RangeError),B=I(EvalError),H=I(SyntaxError),K=I(ReferenceError),V=I(URIError);L.type=F,L.range=M,L.eval=B,L.syntax=H,L.reference=K,L.uri=V;const W={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"},J=e=>"TimeoutError"===e.name||"HTTPError"===e.name&&"5"===e.statusCode.toString()[0]||"invalid-json"===e.type;var Z=function({VERSION:e,MicrolinkError:t,isUrlHttp:r,stringify:o,got:s,flatten:a}){const n=e=>{if("object"!=typeof e)return;const t=a(e);return Object.keys(t).reduce((e,r)=>({...e,[`data.${r}`]:t[r]}),{})},i={retry:3,timeout:3e4,json:!0},c=async(e,r,o={})=>{o={...i,...o};try{const e=await s(r,o),{body:t}=e;return{...t,response:e}}catch(r){const{name:s,statusCode:a=500,body:n,message:i}=r;if(J(r)){const r=`The \`url\` as \`${e}\` reached timeout after ${o.retry.maxRetryAfter}ms.`;throw new t({url:e,data:{url:r},status:"fail",code:"TimeoutError"===s?"ETIMEOUTCLIENT":"ETIMEOUT",message:r,more:"https://microlink.io/docs/api/api-parameters/url",statusCode:a})}const c=n?"string"==typeof n||Buffer.isBuffer(n)?JSON.parse(n):n:{message:i,status:"fail"},l=c.data?c.data[Object.keys(c.data)[0]]:c.message;throw t({...c,message:l,url:e,statusCode:a})}},l=(e,{data:t,apiKey:r,endpoint:s,...i}={})=>{const c=!!r;return[`${s||W[c?"PRO":"FREE"]}?${o({url:e,...n(t),...a(i)})}`,{headers:c?{"x-api-key":r}:{}}]},u=async(e,o={})=>{((e="")=>{if(!r(e)){const r=`The \`url\` as \`${e}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new t({url:e,data:{url:r},status:"fail",code:"EINVALURLCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}})(e);const[s,a]=l(e,o);return c(e,s,{...o,...a})};return u.MicrolinkError=t,u.getApiUrl=l,u.fetchFromApi=c,u.mapRules=n,u.version=e,u.stream=s.stream,u},G=r(i);const{default:Q}=a,{encode:X}=G;return Z({MicrolinkError:L("MicrolinkError"),isUrlHttp:e=>{try{const{href:t}=new m(e);return g.test(t)&&b.test(t)}catch(e){return!1}},stringify:X,got:async(e,{json:t,...r})=>{try{const t=await Q(e,r),o=await t.json(),{headers:s,status:a,statusText:n}=t;return{url:t.url,body:o,headers:s,statusCode:a,statusMessage:n}}catch(e){throw e.response&&(e.body=await e.response.json(),e.statusCode=e.response.status,e.headers=e.response.headers),e}},flatten:w,VERSION:"0.5.16"})}));
*/
var q=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},S=P;function k(t){return t}function P(t,e){const r=(e=e||{}).delimiter||".",o=e.maxDepth,s=e.transformKey||k,n={};return function t(i,a,c){c=c||1,Object.keys(i).forEach((function(u){const f=i[u],p=e.safe&&Array.isArray(f),l=Object.prototype.toString.call(f),h=q(f),d="[object Object]"===l||"[object Array]"===l,y=a?a+r+s(u):s(u);if(!p&&!h&&d&&Object.keys(f).length&&(!e.maxDepth||c<o))return t(f,y,c+1);n[y]=f}))}(t),n}P.flatten=P,P.unflatten=function t(e,r){const o=(r=r||{}).delimiter||".",s=r.overwrite||!1,n=r.transformKey||k,i={};if(q(e)||"[object Object]"!==Object.prototype.toString.call(e))return e;function a(t){const e=Number(t);return isNaN(e)||-1!==t.indexOf(".")||r.object?t:e}return e=Object.keys(e).reduce((t,s)=>{const n=Object.prototype.toString.call(e[s]);return!("[object Object]"===n||"[object Array]"===n)||function(t){const e=Object.prototype.toString.call(t),r="[object Array]"===e,o="[object Object]"===e;if(!t)return!0;if(r)return!t.length;if(o)return!Object.keys(t).length}(e[s])?(t[s]=e[s],t):function(t,e,r){return Object.keys(r).reduce((function(e,s){return e[t+o+s]=r[s],e}),e)}(s,t,P(e[s],r))},{}),Object.keys(e).forEach((function(c){const u=c.split(o).map(n);let f=a(u.shift()),p=a(u[0]),l=i;for(;void 0!==p;){const t=Object.prototype.toString.call(l[f]),e="[object Object]"===t||"[object Array]"===t;if(!s&&!e&&void 0!==l[f])return;(s&&!e||!s&&null==l[f])&&(l[f]="number"!=typeof p||r.object?{}:[]),l=l[f],u.length>0&&(f=a(u.shift()),p=a(u[0]))}l[f]=t(e[c],r)})),i};var U=Object.freeze({__proto__:null,default:window});const N={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"};var D=function({VERSION:t,MicrolinkError:e,isUrlHttp:r,stringify:o,got:s,flatten:n}){const i=t=>{if("object"!=typeof t)return;const e=n(t);return Object.keys(e).reduce((t,r)=>({...t,[`data.${r}`]:e[r]}),{})},a={retry:3,timeout:3e4,responseType:"json"},c=async(t,r,o={})=>{o={...a,...o};try{const t=await s(r,o),{body:e}=t;return{...e,response:t}}catch(r){const{name:s,message:n,response:i={}}=r,{statusCode:a=500,body:c}=i;if(((t,e)=>"TimeoutError"===t.name||"HTTPError"===t.name&&"5"===e.toString()[0]||"invalid-json"===t.type)(r,a)){const r=`The \`url\` as \`${t}\` reached timeout after ${o.retry.maxRetryAfter}ms.`;throw new e({url:t,data:{url:r},status:"fail",code:"TimeoutError"===s?"ETIMEOUTCLIENT":"ETIMEOUT",message:r,more:"https://microlink.io/docs/api/api-parameters/url",statusCode:a})}const u=c?"string"==typeof c||Buffer.isBuffer(c)?JSON.parse(c):c:{message:n,status:"fail"},f=u.data?u.data[Object.keys(u.data)[0]]:u.message;throw e({...u,message:f,url:t,statusCode:a})}},u=(t,{data:e,apiKey:r,endpoint:s,...a}={})=>{const c=!!r;return[`${s||N[c?"PRO":"FREE"]}?${o({url:t,...i(e),...n(a)})}`,{headers:c?{"x-api-key":r}:{}}]},f=async(t,o={})=>{((t="")=>{if(!r(t)){const r=`The \`url\` as \`${t}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new e({url:t,data:{url:r},status:"fail",code:"EINVALURLCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}})(t);const[s,n]=u(t,o);return c(t,s,{...o,...n})};return f.MicrolinkError=e,f.getApiUrl=u,f.fetchFromApi=c,f.mapRules=i,f.version=t,f.stream=s.stream,f},I=o(e),L=o(U);const{encode:$}=I,{URL:H}=L,M=/^https?:\/\//i;return D({MicrolinkError:R("MicrolinkError"),isUrlHttp:t=>{try{return M.test(new H(t).href)}catch(t){return!1}},stringify:$,got:async(t,{responseType:e,...r})=>{try{const e=await s(t,r),o=await e.json(),{headers:n,status:i,statusText:a}=e;return{url:e.url,body:o,headers:n,statusCode:i,statusMessage:a}}catch(t){if(t.response){const{response:e}=t;t.response={...e,statusCode:e.status,body:await e.json()}}throw t}},flatten:S,VERSION:"0.5.17"})}));
//# sourceMappingURL=mql.min.js.map

@@ -5,3 +5,3 @@ {

"homepage": "https://nicedoc.io/microlinkhq/mql",
"version": "0.5.16",
"version": "0.5.17",
"browser": "src/browser.js",

@@ -31,6 +31,6 @@ "main": "src/node.js",

"flat": "~5.0.0",
"got": "~9.6.0",
"is-url-http": "~1.2.4",
"ky": "~0.16.1",
"ky-universal": "~0.3.0",
"got": "~10.4.0",
"is-url-http": "~2.0.0",
"ky": "~0.17.0",
"ky-universal": "~0.4.0",
"qss": "~2.0.3",

@@ -100,3 +100,4 @@ "whoops": "~4.1.0"

"esm"
]
],
"timeout": "1m"
},

@@ -116,8 +117,6 @@ "commitlint": {

"package.json": [
"finepack",
"git add"
"finepack"
],
"*.js,!*.min.js": [
"prettier-standard",
"git add"
"prettier-standard"
]

@@ -124,0 +123,0 @@ },

'use strict'
const { default: ky } = require('ky-universal')
const { encode: stringify } = require('qss')
const isUrlHttp = require('is-url-http')
const ky = require('ky-universal')
const whoops = require('whoops')
const flatten = require('flat')
const whoops = require('whoops')
const { URL } = require('url')
const factory = require('./factory')
const REGEX_HTTP_PROTOCOL = /^https?:\/\//i
const MicrolinkError = whoops('MicrolinkError')
// TODO: `json` because always is the output serialized.
const got = async (url, { json, ...opts }) => {
// lightweight version of `is-url-http`
const isUrlHttp = url => {
try {
return REGEX_HTTP_PROTOCOL.test(new URL(url).href)
} catch (err) {
return false
}
}
const got = async (url, { responseType, ...opts }) => {
try {
const response = await ky(url, opts)

@@ -21,5 +32,4 @@ const body = await response.json()

if (err.response) {
err.body = await err.response.json()
err.statusCode = err.response.status
err.headers = err.response.headers
const { response } = err
err.response = { ...response, statusCode: response.status, body: await response.json() }
}

@@ -26,0 +36,0 @@ throw err

@@ -6,7 +6,7 @@ const ENDPOINT = {

const isTimeoutError = err =>
const isTimeoutError = (err, statusCode) =>
// client side error
err.name === 'TimeoutError' ||
// server side error
(err.name === 'HTTPError' && err.statusCode.toString()[0] === '5') ||
(err.name === 'HTTPError' && statusCode.toString()[0] === '5') ||
// browser side unexpected error

@@ -42,3 +42,3 @@ err.type === 'invalid-json'

timeout: 30000,
json: true
responseType: 'json'
}

@@ -53,5 +53,6 @@

} catch (err) {
const { name, statusCode = 500, body: rawBody, message: rawMessage } = err
const { name, message: rawMessage, response = {} } = err
const { statusCode = 500, body: rawBody } = response
if (isTimeoutError(err)) {
if (isTimeoutError(err, statusCode)) {
const message = `The \`url\` as \`${url}\` reached timeout after ${opts.retry.maxRetryAfter}ms.`

@@ -74,2 +75,3 @@ throw new MicrolinkError({

: { message: rawMessage, status: 'fail' }
const message = body.data ? body.data[Object.keys(body.data)[0]] : body.message

@@ -76,0 +78,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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