@microlink/mql
Advanced tools
Comparing version 0.5.15 to 0.5.16
@@ -5,2 +5,4 @@ # Changelog | ||
### [0.5.16](https://github.com/microlinkhq/mql/compare/v0.5.15...v0.5.16) (2020-01-18) | ||
### [0.5.15](https://github.com/microlinkhq/mql/compare/v0.5.14...v0.5.15) (2019-12-20) | ||
@@ -7,0 +9,0 @@ |
@@ -2332,7 +2332,66 @@ (function (global, factory) { | ||
const mimicFn = (to, from) => { | ||
for (const prop of Reflect.ownKeys(from)) { | ||
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); | ||
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; | ||
@@ -2342,4 +2401,2 @@ }; | ||
var mimicFn_1 = mimicFn; | ||
var default_1 = mimicFn; | ||
mimicFn_1.default = default_1; | ||
@@ -2487,4 +2544,2 @@ var helpers = { | ||
const fetchFromApiOpts = { | ||
encoding: 'utf8', | ||
cache: false, | ||
retry: 3, | ||
@@ -2574,5 +2629,4 @@ timeout: 30000, | ||
// TODO: `cache` is destructuring because is not supported on browser side yet. | ||
// TODO: `json` because always is the output serialized. | ||
const got = async (url, { json, cache, ...opts }) => { | ||
const got = async (url, { json, ...opts }) => { | ||
try { | ||
@@ -2599,3 +2653,3 @@ const response = await ky(url, opts); | ||
flatten: flat, | ||
VERSION: '0.5.15' | ||
VERSION: '0.5.16' | ||
}); | ||
@@ -2602,0 +2656,0 @@ |
!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){ | ||
/*! 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],h=Symbol("stop");class f 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 x{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 f(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 f){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)===h)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 j=(...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 x(t,j(e,r));for(const r of u)t[r]=(t,o)=>new x(t,j(e,o,{method:r}));return t.create=e=>_(j(e)),t.extend=t=>_(j(e,t)),t.stop=h,t};var $=_();e.HTTPError=f,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 h=d,f=["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|${h.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,})":`(?:${f.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 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; | ||
/*! | ||
@@ -9,3 +9,3 @@ * 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),h=y(u),f="[object Object]"===d||"[object Array]"===d,m=i?i+r+s(l):s(l);if(!p&&!h&&f&&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 x=Object.freeze({__proto__:null,default:e=>e});const j=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};var _=j,$=j;_.default=$;var E={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:R,composeErrorMessage:z}=E;var q=function(e,...t){Object.assign(e,...t),e.description=R(e.message)?e.message(e):e.message,e.message=e.code?z(e.code,e.description):e.description},O=r(x);const{isString:T}=E;var C=function(e,t){function r(r){const o=new e,s=T(r)?{message:r}:r;return q(o,t,s),o.stack=O(o.stack),o}return r.prototype=e.prototype,_(r,e),r};const{inherits:A}=E,S=/[^0-9a-zA-Z_$]/;var U=function(e){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(S.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 A(t,Error),_(t,Error),t};const P=e=>(t,r)=>{const o=U(t||e.name);return C(o,r)};var N=P(Error),D=P(TypeError),I=P(RangeError),L=P(EvalError),M=P(SyntaxError),F=P(ReferenceError),B=P(URIError);N.type=D,N.range=I,N.eval=L,N.syntax=M,N.reference=F,N.uri=B;const H={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"},K=e=>"TimeoutError"===e.name||"HTTPError"===e.name&&"5"===e.statusCode.toString()[0]||"invalid-json"===e.type;var V=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={encoding:"utf8",cache:!1,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(K(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||H[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},J=r(i);const{default:W}=a,{encode:Z}=J;return V({MicrolinkError:N("MicrolinkError"),isUrlHttp:e=>{try{const{href:t}=new m(e);return g.test(t)&&b.test(t)}catch(e){return!1}},stringify:Z,got:async(e,{json:t,cache:r,...o})=>{try{const t=await W(e,o),r=await t.json(),{headers:s,status:a,statusText:n}=t;return{url:t.url,body:r,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.15"})})); | ||
*/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"})})); | ||
//# sourceMappingURL=mql.min.js.map |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://nicedoc.io/microlinkhq/mql", | ||
"version": "0.5.15", | ||
"version": "0.5.16", | ||
"browser": "src/browser.js", | ||
@@ -33,3 +33,3 @@ "main": "src/node.js", | ||
"is-url-http": "~1.2.4", | ||
"ky": "~0.16.0", | ||
"ky": "~0.16.1", | ||
"ky-universal": "~0.3.0", | ||
@@ -36,0 +36,0 @@ "qss": "~2.0.3", |
@@ -12,5 +12,4 @@ 'use strict' | ||
// TODO: `cache` is destructuring because is not supported on browser side yet. | ||
// TODO: `json` because always is the output serialized. | ||
const got = async (url, { json, cache, ...opts }) => { | ||
const got = async (url, { json, ...opts }) => { | ||
try { | ||
@@ -17,0 +16,0 @@ const response = await ky(url, opts) |
@@ -39,4 +39,2 @@ const ENDPOINT = { | ||
const fetchFromApiOpts = { | ||
encoding: 'utf8', | ||
cache: false, | ||
retry: 3, | ||
@@ -43,0 +41,0 @@ timeout: 30000, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
291153
2698
Updatedky@~0.16.1