Socket
Socket
Sign inDemoInstall

axe

Package Overview
Dependencies
93
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.6 to 5.0.0

2

dist/axe.min.js

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

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Axe=t()}}(function(){var t,e,r=(t=function(t,e){"use strict";var r=S.document,n=P(r)&&P(r.createElement);t.exports=function(t){return n?r.createElement(t):{}}},function(r){return e||t(e={exports:{},parent:r},e.exports),e.exports});!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?void 0:window);var n=function(t,e){var r="000000000"+t;return r.substr(r.length-e)};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,s="object"==("undefined"==typeof window?"undefined":o(window))?window:self,a=Object.keys(s).length,u=n(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+a.toString(36),4),c=function(){return u},l="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;if(l){var f=Math.pow(2,32)-1;i=function(){return Math.abs(l.getRandomValues(new Uint32Array(1))[0]/f)}}else i=Math.random;var p=i,h={},y=0,d=4,m=36,b=Math.pow(m,d);function g(){return n((p()*b<<0).toString(m),d)}function v(){return y=y<b?y:0,++y-1}function w(){return"c"+(new Date).getTime().toString(m)+n(v().toString(m),d)+c()+(g()+g())}w.slug=function(){var t=(new Date).getTime().toString(36),e=v().toString(36).slice(-4),r=c().slice(0,1)+c().slice(-1),n=g().slice(-2);return t.slice(-2)+e+r+n},w.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},w.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},w.fingerprint=c,h=w;var _=function(t){var e=Array.prototype.slice.call(arguments,1);return e.length&&(t=t.toString().replace(/(%?)(%([jds]))/g,function(t,r,n,o){var i=e.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(e.unshift(i),t):i})),e.length&&(t=t.toString()+" "+e.join(" ")),""+t.toString().replace(/%{2,2}/g,"%")},T=["%s","%d","%i","%f","%j","%o","%O","%%"],O=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},S={},E=S="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=E);var j={},k=j={version:"2.6.11"};"number"==typeof __e&&(__e=k);var x=function(t,e,r){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}};function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var P=function(t){return"object"==A(t)?null!==t:"function"==typeof t},C=function(t){if(!P(t))throw TypeError(t+" is not an object!");return t},R=function(t){try{return!!t()}catch(e){return!0}},M=!R(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),q=!M&&!R(function(){return 7!=Object.defineProperty(r({})("div"),"a",{get:function(){return 7}}).a}),D={},L=Object.defineProperty;D.f=M?Object.defineProperty:function(t,r,n){if(C(t),r=function(t,e){if(!P(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!P(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!P(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!P(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}(r,!0),C(n),q)try{return L(t,r,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[r]=n.value),t};var I=M?function(t,e,r){return D.f(t,e,function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}(1,r))}:function(t,e,r){return t[e]=r,t},H={}.hasOwnProperty,N=function(t,e){return H.call(t,e)},U={},z=function t(e,r,n){var o,i,s,a=e&t.F,u=e&t.G,c=e&t.S,l=e&t.P,f=e&t.B,p=e&t.W,h=u?j:j[r]||(j[r]={}),y=h.prototype,d=u?S:c?S[r]:(S[r]||{}).prototype;for(o in u&&(n=r),n)(i=!a&&d&&void 0!==d[o])&&N(h,o)||(s=i?d[o]:n[o],h[o]=u&&"function"!=typeof d[o]?n[o]:f&&i?x(s,S):p&&d[o]==s?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(s):l&&"function"==typeof s?x(Function.call,s):s,l&&((h.virtual||(h.virtual={}))[o]=s,e&t.R&&y&&!y[o]&&I(y,o,s)))};z.F=1,z.G=2,z.S=4,z.P=8,z.B=16,z.W=32,z.U=64,z.R=128,U=z;var F,X={}.toString,B=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==function(t){return X.call(t).slice(8,-1)}(t)?t.split(""):Object(t)},$=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},W=function(t){return B($(t))},J=Math.ceil,G=Math.floor,K=function(t){return isNaN(t=+t)?0:(t>0?G:J)(t)},Q=Math.min,Y=Math.max,V=Math.min,Z=S["__core-js_shared__"]||(S["__core-js_shared__"]={});(F=function(t,e){return Z[t]||(Z[t]=void 0!==e?e:{})})("versions",[]).push({version:j.version,mode:"pure",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"});var tt,et,rt=0,nt=Math.random(),ot=F("keys"),it=(et=!1,function(t,e,r){var n,o,i=W(t),s=(o=i.length)>0?Q(K(o),9007199254740991):0,a=function(t,e){return(t=K(t))<0?Y(t+e,0):V(t,e)}(r,s);if(et&&e!=e){for(;s>a;)if((n=i[a++])!=n)return!0}else for(;s>a;a++)if((et||a in i)&&i[a]===e)return et||a||0;return!et&&-1}),st=ot[tt="IE_PROTO"]||(ot[tt]=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++rt+nt).toString(36))}(tt)),at="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ut=Object.keys||function(t){return function(t,e){var r,n=W(t),o=0,i=[];for(r in n)r!=st&&N(n,r)&&i.push(r);for(;e.length>o;)N(n,r=e[o++])&&(~it(i,r)||i.push(r));return i}(t,at)},ct={};ct.f=Object.getOwnPropertySymbols;var lt={};lt.f={}.propertyIsEnumerable;var ft=Object.assign,pt=!ft||R(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=ft({},t)[r]||Object.keys(ft({},e)).join("")!=n})?function(t,e){for(var r=Object($(t)),n=arguments.length,o=1,i=ct.f,s=lt.f;n>o;)for(var a,u=B(arguments[o++]),c=i?ut(u).concat(i(u)):ut(u),l=c.length,f=0;l>f;)a=c[f++],M&&!s.call(u,a)||(r[a]=u[a]);return r}:ft;U(U.S+U.F,"Object",{assign:pt});var ht,yt={__esModule:!0},dt=(ht={default:j.Object.assign,__esModule:!0})&&ht.__esModule?ht:{default:ht};yt.default=dt.default||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});var bt,gt=(bt=yt)&&bt.__esModule?bt:{default:bt};mt.default=function(t,e){for(var r=(0,gt.default)({},t),n=0;n<e.length;n++)delete r[e[n]];return r},mt=mt.default;var vt={},wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!O(t))throw new Error("`err` must be an Error");if(!Array.isArray(e))throw new Error("`fields` must be an Array");var r={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).concat(Object.getOwnPropertyNames(t)).forEach(function(e){"function"!=typeof t[e]&&(r[e]=t[e])}),!r.name&&t.constructor.name&&(r.name=t.constructor.name),Array.isArray(e)&&0!==e.length?r.filter(function(t){return e.includes(t)}):r},_t={};function Tt(t){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}_t=Et,Et.default=Et,Et.stable=kt,Et.stableStringify=kt;var Ot=[],St=[];function Et(t,e,r){var n;for(function t(e,r,n,o){var i;if("object"==Tt(e)&&null!==e){for(i=0;i<n.length;i++)if(n[i]===e){var s=Object.getOwnPropertyDescriptor(o,r);return void(void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:"[Circular]"}),Ot.push([o,r,e,s])):St.push([e,r]):(o[r]="[Circular]",Ot.push([o,r,e])))}if(n.push(e),Array.isArray(e))for(i=0;i<e.length;i++)t(e[i],i,n,e);else{var a=Object.keys(e);for(i=0;i<a.length;i++){var u=a[i];t(e[u],u,n,e)}}n.pop()}}(t,"",[],void 0),n=0===St.length?JSON.stringify(t,e,r):JSON.stringify(t,xt(e),r);0!==Ot.length;){var o=Ot.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return n}function jt(t,e){return t<e?-1:t>e?1:0}function kt(t,e,r){var n,o=function t(e,r,n,o){var i;if("object"==Tt(e)&&null!==e){for(i=0;i<n.length;i++)if(n[i]===e){var s=Object.getOwnPropertyDescriptor(o,r);return void(void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:"[Circular]"}),Ot.push([o,r,e,s])):St.push([e,r]):(o[r]="[Circular]",Ot.push([o,r,e])))}if("function"==typeof e.toJSON)return;if(n.push(e),Array.isArray(e))for(i=0;i<e.length;i++)t(e[i],i,n,e);else{var a={},u=Object.keys(e).sort(jt);for(i=0;i<u.length;i++){var c=u[i];t(e[c],c,n,e),a[c]=e[c]}if(void 0===o)return a;Ot.push([o,r,e]),o[r]=a}n.pop()}}(t,"",[],void 0)||t;for(n=0===St.length?JSON.stringify(o,e,r):JSON.stringify(o,xt(e),r);0!==Ot.length;){var i=Ot.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return n}function xt(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(St.length>0)for(var n=0;n<St.length;n++){var o=St[n];if(o[1]===e&&o[0]===r){r="[Circular]",St.splice(n,1);break}}return t.call(this,e,r)}}var At={exports:{}};function Pt(t){if(t)return function(t){for(var e in Pt.prototype)t[e]=Pt.prototype[e];return t}(t)}function Ct(t){return(Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rt(t){return(Rt="function"==typeof Symbol&&"symbol"==Ct(Symbol.iterator)?function(t){return Ct(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Ct(t)})(t)}At.exports=Pt,Pt.prototype.on=Pt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Pt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},Pt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},Pt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Pt.prototype.hasListeners=function(t){return!!this.listeners(t).length},At=At.exports;var Mt=function(t){return null!==t&&"object"===Rt(t)},qt={};function Dt(t){return(Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lt(t){return(Lt="function"==typeof Symbol&&"symbol"==Dt(Symbol.iterator)?function(t){return Dt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Dt(t)})(t)}function It(t){if(t)return function(t){for(var e in It.prototype)Object.prototype.hasOwnProperty.call(It.prototype,e)&&(t[e]=It.prototype[e]);return t}(t)}qt=It,It.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},It.prototype.parse=function(t){return this._parser=t,this},It.prototype.responseType=function(t){return this._responseType=t,this},It.prototype.serialize=function(t){return this._serializer=t,this},It.prototype.timeout=function(t){if(!t||"object"!==Lt(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},It.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var Ht=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];It.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(n){console.error(n)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&Ht.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},It.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},It.prototype.then=function(t,e){var r=this;if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){n.on("abort",function(){var t=new Error("Aborted");t.code="ABORTED",t.status=r.status,t.method=r.method,t.url=r.url,e(t)}),n.end(function(r,n){r?e(r):t(n)})})}return this._fullfilledPromise.then(t,e)},It.prototype.catch=function(t){return this.then(void 0,t)},It.prototype.use=function(t){return t(this),this},It.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},It.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},It.prototype.get=function(t){return this._header[t.toLowerCase()]},It.prototype.getHeader=It.prototype.get,It.prototype.set=function(t,e){if(Mt(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},It.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},It.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(Mt(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(r,t[r]);return this}if(Array.isArray(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(t,e[n]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},It.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},It.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},It.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},It.prototype.redirects=function(t){return this._maxRedirects=t,this},It.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},It.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},It.prototype.send=function(t){var e=Mt(t),r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&Mt(this._data))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this._data[n]=t[n]);else"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(r||this.type("json"),this)},It.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},It.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.slice(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,e)+"?"+r.join("&")}}},It.prototype._appendQueryString=function(){console.warn("Unsupported")},It.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error("".concat(t+e,"ms exceeded"));n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},It.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};var Nt={type:function(t){return t.split(/ *; */).shift()},params:function(t){return t.split(/ *; */).reduce(function(t,e){var r=e.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(t[n]=o),t},{})},parseLinks:function(t){return t.split(/ *, */).reduce(function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t},{})}},Ut={};function zt(t){if(t)return function(t){for(var e in zt.prototype)Object.prototype.hasOwnProperty.call(zt.prototype,e)&&(t[e]=zt.prototype[e]);return t}(t)}Ut=zt,zt.prototype.get=function(t){return this.header[t.toLowerCase()]},zt.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=Nt.type(e);var r=Nt.params(e);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=Nt.parseLinks(t.link))}catch(o){}},zt.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t};var Ft={};function Xt(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(t){Xt.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this._defaults.push({fn:t,args:r}),this}}),Xt.prototype._setDefaults=function(t){this._defaults.forEach(function(e){var r;t[e.fn].apply(t,function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(r=e.args)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}())})},Ft=Xt;var Bt,$t={};function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jt(t){return(Jt="function"==typeof Symbol&&"symbol"==Wt(Symbol.iterator)?function(t){return Wt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Wt(t)})(t)}function Gt(){}"undefined"!=typeof window?Bt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),Bt=void 0):Bt=self;var Kt=$t=$t=function(t,e){return"function"==typeof e?new $t.Request("GET",t).end(e):1===arguments.length?new $t.Request("GET",t):new $t.Request(t,e)};$t.Request=re,Kt.getXHR=function(){if(Bt.XMLHttpRequest&&(!Bt.location||"file:"!==Bt.location.protocol||!Bt.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(r){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw new Error("Browser-only version of superagent could not find XHR")};var Qt="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function Yt(t){if(!Mt(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Vt(e,r,t[r]);return e.join("&")}function Vt(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach(function(r){Vt(t,e,r)});else if(Mt(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&Vt(t,"".concat(e,"[").concat(n,"]"),r[n]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(r));else t.push(encodeURIComponent(e))}function Zt(t){for(var e,r,n={},o=t.split("&"),i=0,s=o.length;i<s;++i)-1===(r=(e=o[i]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function te(t){return/[/+]json($|[^-\w])/.test(t)}function ee(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,r,n,o,i=t.split(/\r?\n/),s={},a=0,u=i.length;a<u;++a)-1!==(e=(r=i[a]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),o=Qt(r.slice(e+1)),s[n]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function re(t,e){var r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t,e=null,n=null;try{n=new ee(r)}catch(o){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=o,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",n);try{r._isResponseOK(n)||(t=new Error(n.statusText||"Unsuccessful HTTP response"))}catch(o){t=o}t?(t.original=e,t.response=n,t.status=n.status,r.callback(t,n)):r.callback(null,n)})}function ne(t,e,r){var n=Kt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}Kt.serializeObject=Yt,Kt.parseString=Zt,Kt.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},Kt.serialize={"application/x-www-form-urlencoded":Yt,"application/json":_t},Kt.parse={"application/x-www-form-urlencoded":Zt,"application/json":JSON.parse},Ut(ee.prototype),ee.prototype._parseBody=function(t){var e=Kt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&te(this.type)&&(e=Kt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},ee.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot ".concat(e," ").concat(r," (").concat(this.status,")"),o=new Error(n);return o.status=this.status,o.method=e,o.url=r,o},Kt.Response=ee,At(re.prototype),qt(re.prototype),re.prototype.type=function(t){return this.set("Content-Type",Kt.types[t]||t),this},re.prototype.accept=function(t){return this.set("Accept",Kt.types[t]||t),this},re.prototype.auth=function(t,e,r){return 1===arguments.length&&(e=""),"object"===Jt(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"}),this._auth(t,e,r,function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")})},re.prototype.query=function(t){return"string"!=typeof t&&(t=Yt(t)),t&&this._query.push(t),this},re.prototype.attach=function(t,e,r){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},re.prototype._getFormData=function(){return this._formData||(this._formData=new Bt.FormData),this._formData},re.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},re.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},re.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},re.prototype.buffer=re.prototype.ca,re.prototype.ca=re.prototype.agent,re.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},re.prototype.pipe=re.prototype.write,re.prototype._isHost=function(t){return t&&"object"===Jt(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},re.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||Gt,this._finalizeQueryString(),this._end()},re.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},re.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=Kt.getXHR();var e=this.xhr,r=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===r){var n;try{n=e.status}catch(o){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(t._uploadTimeoutTimer)),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.addEventListener("progress",n.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",n.bind(null,"upload"))}catch(a){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(u){return this.callback(u)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],i=this._serializer||Kt.serialize[o?o.split(";")[0]:""];!i&&te(o)&&(i=Kt.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&e.setRequestHeader(s,this.header[s]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},Kt.agent=function(){return new Ft},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){Ft.prototype[t.toLowerCase()]=function(e,r){var n=new Kt.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}}),Ft.prototype.del=Ft.prototype.delete,Kt.get=function(t,e,r){var n=Kt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},Kt.head=function(t,e,r){var n=Kt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},Kt.options=function(t,e,r){var n=Kt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Kt.del=ne,Kt.delete=ne,Kt.patch=function(t,e,r){var n=Kt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Kt.post=function(t,e,r){var n=Kt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Kt.put=function(t,e,r){var n=Kt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.boolean=function(t){return"string"==typeof t?/^(true|t|ye[s\u017F]|y|on|1)$/i.test(t.trim()):"number"==typeof t?1===t:"boolean"==typeof t&&t};var ie,se,ae,ue="4.0.6",ce=ie={};function le(){throw new Error("setTimeout has not been defined")}function fe(){throw new Error("clearTimeout has not been defined")}function pe(t){if(se===setTimeout)return setTimeout(t,0);if((se===le||!se)&&setTimeout)return se=setTimeout,setTimeout(t,0);try{return se(t,0)}catch(e){try{return se.call(null,t,0)}catch(e){return se.call(this,t,0)}}}!function(){try{se="function"==typeof setTimeout?setTimeout:le}catch(e){se=le}try{ae="function"==typeof clearTimeout?clearTimeout:fe}catch(e){ae=fe}}();var he,ye=[],de=!1,me=-1;function be(){de&&he&&(de=!1,he.length?ye=he.concat(ye):me=-1,ye.length&&ge())}function ge(){if(!de){var t=pe(be);de=!0;for(var r=ye.length;r;){for(he=ye,ye=[];++me<r;)he&&he[me].run();me=-1,r=ye.length}he=null,de=!1,function(t){if(ae===clearTimeout)return clearTimeout(t);if((ae===fe||!ae)&&clearTimeout)return ae=clearTimeout,clearTimeout(t);try{ae(t)}catch(e){try{return ae.call(null,t)}catch(e){return ae.call(this,t)}}}(t)}}function ve(t,e){this.fun=t,this.array=e}function we(){}ce.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ye.push(new ve(t,e)),1!==ye.length||de||pe(ge)},ve.prototype.run=function(){this.fun.apply(null,this.array)},ce.title="browser",ce.browser=!0,ce.env={},ce.argv=[],ce.version="",ce.versions={},ce.on=we,ce.addListener=we,ce.once=we,ce.off=we,ce.removeListener=we,ce.removeAllListeners=we,ce.emit=we,ce.prependListener=we,ce.prependOnceListener=we,ce.listeners=function(t){return[]},ce.binding=function(t){throw new Error("process.binding is not supported")},ce.cwd=function(){return"/"},ce.chdir=function(t){throw new Error("process.chdir is not supported")},ce.umask=function(){return 0};var _e={};return function(t){"use strict";function e(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=oe.boolean,i=["config","log"],s=["trace","debug","info","warn","error","fatal"],a="https://api.cabinjs.com",u="production",c="`level` invalid, must be: ".concat(s.join(", "));function l(t){return null==t||"object"==n(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function f(t){return void 0===t}function p(t){return"object"==n(t)&&null!==t&&!Array.isArray(t)}function y(t){return"string"==typeof t}function d(t){return"function"==typeof t}_e=function(){function n(){var r=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.config=Object.assign({key:"",endpoint:a,headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||o(t.env.SHOW_STACK),showMeta:!t.env.SHOW_META||o(t.env.SHOW_META),silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!t.browser&&"production"===u,callback:!1,appInfo:!t.env.APP_INFO||o(t.env.APP_INFO)},c),this.appInfo=!!this.config.appInfo&&!!d(vt)&&vt(),this.log=this.log.bind(this);var l=Object.keys(this.config.logger).filter(function(t){return!i.includes(t)}),f=!0,p=!1,h=void 0;try{for(var y,m=l[Symbol.iterator]();!(f=(y=m.next()).done);f=!0){var b=y.value;this[b]=this.config.logger[b]}}catch(S){p=!0,h=S}finally{try{f||null==m.return||m.return()}finally{if(p)throw h}}var g=!0,v=!1,w=void 0;try{for(var _,T=function(){var t=_.value;r[t]=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r.log.apply(r,e([t].concat([].slice.call(o))))}},O=s[Symbol.iterator]();!(g=(_=O.next()).done);g=!0)T()}catch(S){v=!0,w=S}finally{try{g||null==O.return||O.return()}finally{if(v)throw w}}this.setLevel=this.setLevel.bind(this),this.setName=this.setName.bind(this),this.setCallback=this.setCallback.bind(this),this.config.name&&this.setName(this.config.name),this.setLevel(this.config.level),this.err=this.error,this.warning=this.warn}var m,b,g;return m=n,(b=[{key:"setCallback",value:function(t){this.config.callback=t}},{key:"setLevel",value:function(t){if(!y(t)||!s.includes(t))throw new Error(c);y(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=s.slice(s.indexOf(t))}},{key:"setName",value:function(t){if(!y(t))throw new Error("`name` must be a String");y(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}},{key:"log",value:function(r,n,o){for(var i=this,u=[r,n],c=arguments.length,m=new Array(c>3?c-3:0),b=3;b<c;b++)m[b-3]=arguments[b];f(o)||u.push(o),u=u.concat([].slice.call(m));var g,v=this.config,w=0;"warning"===r&&(r="warn"),"err"===r&&(r="error"),O(r)?(o=n,n=r,r="error"):y(r)&&s.includes(r)||(o=n,n=r,r="info",w=-1),u.length>=4+w?(n=_.apply(void 0,e(u.slice(1+w))),o={}):u.length===3+w&&y(n)&&T.filter(function(t){return n.includes(t)}).length>0?(n=_(n,o),o={}):O(n)||(O(o)?o={err:wt(o)}:p(o)||f(o)||null===o?y(n)||(n=_(n)):(n=_(n,o),o={})),p(o)||(o={}),O(n)?(g=n,p(o.err)||(o.err=wt(g)),n=n.message):O(o.err)&&(g=o.err);var S=d(v.callback)&&(!("boolean"==typeof o.callback)||o.callback);(o=mt(o,["callback"])).level=r,this.appInfo&&(o.app=this.appInfo);var E=_t({message:n,meta:o});if(v.capture&&v.levels.includes(r)&&(!O(g)||!g._captureFailed)){if(v.endpoint===a&&!v.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");var j=$t.post(v.endpoint).set("X-Request-Id",h()).timeout(v.timeout);t.browser||j.set("User-Agent","axe/".concat(ue)),v.key&&j.auth(v.key),l(v.headers)||j.set(v.headers),j.retry(v.retry).type("application/json").send(E).end(function(t){t&&(t._captureFailed=!0,i.config.logger.error(t))})}if(S&&v.callback(r,n,o),v.silent)return E;if(!v.levels.includes(r))return E;var k=r;-1===w?k="log":"fatal"===r&&(k="error");var x=mt(o,["level","err"]);return"error"===k&&O(g)&&v.showStack?!v.showMeta||l(x)?this.config.logger.error(g):this.config.logger.error(g,x):!v.showMeta||l(x)?this.config.logger[k](n):this.config.logger[k](n,x),E}}])&&r(m.prototype,b),g&&r(m,g),n}()}.call(this,ie),_e});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Axe=t()}}(function(){var t,e,r=(t=function(t,e){"use strict";var r=S.document,n=P(r)&&P(r.createElement);t.exports=function(t){return n?r.createElement(t):{}}},function(r){return e||t(e={exports:{},parent:r},e.exports),e.exports});!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?void 0:window);var n=function(t,e){var r="000000000"+t;return r.substr(r.length-e)};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,s="object"==("undefined"==typeof window?"undefined":o(window))?window:self,a=Object.keys(s).length,u=n(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+a.toString(36),4),c=function(){return u},l=window.crypto||window.msCrypto;if(l){var f=Math.pow(2,32)-1;i=function(){return Math.abs(l.getRandomValues(new Uint32Array(1))[0]/f)}}else i=Math.random;var p=i,h={},y=0,d=4,m=36,b=Math.pow(m,d);function g(){return n((p()*b<<0).toString(m),d)}function v(){return y=y<b?y:0,++y-1}function w(){return"c"+(new Date).getTime().toString(m)+n(v().toString(m),d)+c()+(g()+g())}w.slug=function(){var t=(new Date).getTime().toString(36),e=v().toString(36).slice(-4),r=c().slice(0,1)+c().slice(-1),n=g().slice(-2);return t.slice(-2)+e+r+n},w.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},w.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},w.fingerprint=c,h=w;var _=function(t){var e=Array.prototype.slice.call(arguments,1);return e.length&&(t=t.toString().replace(/(%?)(%([jds]))/g,function(t,r,n,o){var i=e.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(e.unshift(i),t):i})),e.length&&(t=t.toString()+" "+e.join(" ")),""+t.toString().replace(/%{2,2}/g,"%")},T=["%s","%d","%i","%f","%j","%o","%O","%%"],O=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},S={},E=S="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=E);var j={},k=j={version:"2.6.10"};"number"==typeof __e&&(__e=k);var x=function(t,e,r){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}};function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var P=function(t){return"object"==A(t)?null!==t:"function"==typeof t},C=function(t){if(!P(t))throw TypeError(t+" is not an object!");return t},R=function(t){try{return!!t()}catch(e){return!0}},L=!R(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),M=!L&&!R(function(){return 7!=Object.defineProperty(r({})("div"),"a",{get:function(){return 7}}).a}),q={},D=Object.defineProperty;q.f=L?Object.defineProperty:function(t,r,n){if(C(t),r=function(t,e){if(!P(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!P(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!P(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!P(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}(r,!0),C(n),M)try{return D(t,r,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[r]=n.value),t};var N=L?function(t,e,r){return q.f(t,e,function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}(1,r))}:function(t,e,r){return t[e]=r,t},I={}.hasOwnProperty,H=function(t,e){return I.call(t,e)},U={},z=function t(e,r,n){var o,i,s,a=e&t.F,u=e&t.G,c=e&t.S,l=e&t.P,f=e&t.B,p=e&t.W,h=u?j:j[r]||(j[r]={}),y=h.prototype,d=u?S:c?S[r]:(S[r]||{}).prototype;for(o in u&&(n=r),n)(i=!a&&d&&void 0!==d[o])&&H(h,o)||(s=i?d[o]:n[o],h[o]=u&&"function"!=typeof d[o]?n[o]:f&&i?x(s,S):p&&d[o]==s?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(s):l&&"function"==typeof s?x(Function.call,s):s,l&&((h.virtual||(h.virtual={}))[o]=s,e&t.R&&y&&!y[o]&&N(y,o,s)))};z.F=1,z.G=2,z.S=4,z.P=8,z.B=16,z.W=32,z.U=64,z.R=128,U=z;var F,X={}.toString,B=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==function(t){return X.call(t).slice(8,-1)}(t)?t.split(""):Object(t)},$=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},W=function(t){return B($(t))},J=Math.ceil,G=Math.floor,K=function(t){return isNaN(t=+t)?0:(t>0?G:J)(t)},Q=Math.min,Y=Math.max,V=Math.min,Z=S["__core-js_shared__"]||(S["__core-js_shared__"]={});(F=function(t,e){return Z[t]||(Z[t]=void 0!==e?e:{})})("versions",[]).push({version:j.version,mode:"pure",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"});var tt,et,rt=0,nt=Math.random(),ot=F("keys"),it=(et=!1,function(t,e,r){var n,o,i=W(t),s=(o=i.length)>0?Q(K(o),9007199254740991):0,a=function(t,e){return(t=K(t))<0?Y(t+e,0):V(t,e)}(r,s);if(et&&e!=e){for(;s>a;)if((n=i[a++])!=n)return!0}else for(;s>a;a++)if((et||a in i)&&i[a]===e)return et||a||0;return!et&&-1}),st=ot[tt="IE_PROTO"]||(ot[tt]=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++rt+nt).toString(36))}(tt)),at="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ut=Object.keys||function(t){return function(t,e){var r,n=W(t),o=0,i=[];for(r in n)r!=st&&H(n,r)&&i.push(r);for(;e.length>o;)H(n,r=e[o++])&&(~it(i,r)||i.push(r));return i}(t,at)},ct={};ct.f=Object.getOwnPropertySymbols;var lt={};lt.f={}.propertyIsEnumerable;var ft=Object.assign,pt=!ft||R(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=ft({},t)[r]||Object.keys(ft({},e)).join("")!=n})?function(t,e){for(var r=Object($(t)),n=arguments.length,o=1,i=ct.f,s=lt.f;n>o;)for(var a,u=B(arguments[o++]),c=i?ut(u).concat(i(u)):ut(u),l=c.length,f=0;l>f;)a=c[f++],L&&!s.call(u,a)||(r[a]=u[a]);return r}:ft;U(U.S+U.F,"Object",{assign:pt});var ht,yt={__esModule:!0},dt=(ht={default:j.Object.assign,__esModule:!0})&&ht.__esModule?ht:{default:ht};yt.default=dt.default||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};var mt={};Object.defineProperty(mt,"__esModule",{value:!0});var bt,gt=(bt=yt)&&bt.__esModule?bt:{default:bt};mt.default=function(t,e){for(var r=(0,gt.default)({},t),n=0;n<e.length;n++)delete r[e[n]];return r},mt=mt.default;var vt={},wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!O(t))throw new Error("`err` must be an Error");if(!Array.isArray(e))throw new Error("`fields` must be an Array");var r={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).concat(Object.getOwnPropertyNames(t)).forEach(function(e){"function"!=typeof t[e]&&(r[e]=t[e])}),!r.name&&t.constructor.name&&(r.name=t.constructor.name),Array.isArray(e)&&0!==e.length?r.filter(function(t){return e.includes(t)}):r},_t={};function Tt(t){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}_t=Et,Et.default=Et,Et.stable=kt,Et.stableStringify=kt;var Ot=[],St=[];function Et(t,e,r){var n;for(function t(e,r,n,o){var i;if("object"==Tt(e)&&null!==e){for(i=0;i<n.length;i++)if(n[i]===e){var s=Object.getOwnPropertyDescriptor(o,r);return void(void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:"[Circular]"}),Ot.push([o,r,e,s])):St.push([e,r]):(o[r]="[Circular]",Ot.push([o,r,e])))}if(n.push(e),Array.isArray(e))for(i=0;i<e.length;i++)t(e[i],i,n,e);else{var a=Object.keys(e);for(i=0;i<a.length;i++){var u=a[i];t(e[u],u,n,e)}}n.pop()}}(t,"",[],void 0),n=0===St.length?JSON.stringify(t,e,r):JSON.stringify(t,xt(e),r);0!==Ot.length;){var o=Ot.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return n}function jt(t,e){return t<e?-1:t>e?1:0}function kt(t,e,r){var n,o=function t(e,r,n,o){var i;if("object"==Tt(e)&&null!==e){for(i=0;i<n.length;i++)if(n[i]===e){var s=Object.getOwnPropertyDescriptor(o,r);return void(void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:"[Circular]"}),Ot.push([o,r,e,s])):St.push([e,r]):(o[r]="[Circular]",Ot.push([o,r,e])))}if("function"==typeof e.toJSON)return;if(n.push(e),Array.isArray(e))for(i=0;i<e.length;i++)t(e[i],i,n,e);else{var a={},u=Object.keys(e).sort(jt);for(i=0;i<u.length;i++){var c=u[i];t(e[c],c,n,e),a[c]=e[c]}if(void 0===o)return a;Ot.push([o,r,e]),o[r]=a}n.pop()}}(t,"",[],void 0)||t;for(n=0===St.length?JSON.stringify(o,e,r):JSON.stringify(o,xt(e),r);0!==Ot.length;){var i=Ot.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return n}function xt(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(St.length>0)for(var n=0;n<St.length;n++){var o=St[n];if(o[1]===e&&o[0]===r){r="[Circular]",St.splice(n,1);break}}return t.call(this,e,r)}}var At={exports:{}};function Pt(t){if(t)return function(t){for(var e in Pt.prototype)t[e]=Pt.prototype[e];return t}(t)}function Ct(t){return(Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rt(t){return(Rt="function"==typeof Symbol&&"symbol"==Ct(Symbol.iterator)?function(t){return Ct(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Ct(t)})(t)}At.exports=Pt,Pt.prototype.on=Pt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Pt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},Pt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},Pt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Pt.prototype.hasListeners=function(t){return!!this.listeners(t).length},At=At.exports;var Lt=function(t){return null!==t&&"object"===Rt(t)},Mt={};function qt(t){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dt(t){return(Dt="function"==typeof Symbol&&"symbol"==qt(Symbol.iterator)?function(t){return qt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":qt(t)})(t)}function Nt(t){if(t)return function(t){for(var e in Nt.prototype)Object.prototype.hasOwnProperty.call(Nt.prototype,e)&&(t[e]=Nt.prototype[e]);return t}(t)}Mt=Nt,Nt.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},Nt.prototype.parse=function(t){return this._parser=t,this},Nt.prototype.responseType=function(t){return this._responseType=t,this},Nt.prototype.serialize=function(t){return this._serializer=t,this},Nt.prototype.timeout=function(t){if(!t||"object"!==Dt(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},Nt.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var It=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];Nt.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(n){console.error(n)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&It.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},Nt.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},Nt.prototype.then=function(t,e){var r=this;if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(t,e){n.on("abort",function(){var t=new Error("Aborted");t.code="ABORTED",t.status=r.status,t.method=r.method,t.url=r.url,e(t)}),n.end(function(r,n){r?e(r):t(n)})})}return this._fullfilledPromise.then(t,e)},Nt.prototype.catch=function(t){return this.then(void 0,t)},Nt.prototype.use=function(t){return t(this),this},Nt.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},Nt.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},Nt.prototype.get=function(t){return this._header[t.toLowerCase()]},Nt.prototype.getHeader=Nt.prototype.get,Nt.prototype.set=function(t,e){if(Lt(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},Nt.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},Nt.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(Lt(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(r,t[r]);return this}if(Array.isArray(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(t,e[n]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},Nt.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},Nt.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},Nt.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},Nt.prototype.redirects=function(t){return this._maxRedirects=t,this},Nt.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},Nt.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},Nt.prototype.send=function(t){var e=Lt(t),r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&Lt(this._data))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this._data[n]=t[n]);else"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(r||this.type("json"),this)},Nt.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},Nt.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.slice(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,e)+"?"+r.join("&")}}},Nt.prototype._appendQueryString=function(){console.warn("Unsupported")},Nt.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error("".concat(t+e,"ms exceeded"));n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},Nt.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};var Ht={type:function(t){return t.split(/ *; */).shift()},params:function(t){return t.split(/ *; */).reduce(function(t,e){var r=e.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(t[n]=o),t},{})},parseLinks:function(t){return t.split(/ *, */).reduce(function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t},{})}},Ut={};function zt(t){if(t)return function(t){for(var e in zt.prototype)Object.prototype.hasOwnProperty.call(zt.prototype,e)&&(t[e]=zt.prototype[e]);return t}(t)}Ut=zt,zt.prototype.get=function(t){return this.header[t.toLowerCase()]},zt.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=Ht.type(e);var r=Ht.params(e);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=Ht.parseLinks(t.link))}catch(o){}},zt.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t};var Ft={};function Xt(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(t){Xt.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this._defaults.push({fn:t,args:r}),this}}),Xt.prototype._setDefaults=function(t){this._defaults.forEach(function(e){var r;t[e.fn].apply(t,function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(r=e.args)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}())})},Ft=Xt;var Bt,$t={};function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jt(t){return(Jt="function"==typeof Symbol&&"symbol"==Wt(Symbol.iterator)?function(t){return Wt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Wt(t)})(t)}function Gt(){}"undefined"!=typeof window?Bt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),Bt=void 0):Bt=self;var Kt=$t=$t=function(t,e){return"function"==typeof e?new $t.Request("GET",t).end(e):1===arguments.length?new $t.Request("GET",t):new $t.Request(t,e)};$t.Request=re,Kt.getXHR=function(){if(Bt.XMLHttpRequest&&(!Bt.location||"file:"!==Bt.location.protocol||!Bt.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(r){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw new Error("Browser-only version of superagent could not find XHR")};var Qt="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function Yt(t){if(!Lt(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Vt(e,r,t[r]);return e.join("&")}function Vt(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach(function(r){Vt(t,e,r)});else if(Lt(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&Vt(t,"".concat(e,"[").concat(n,"]"),r[n]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(r));else t.push(encodeURIComponent(e))}function Zt(t){for(var e,r,n={},o=t.split("&"),i=0,s=o.length;i<s;++i)-1===(r=(e=o[i]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function te(t){return/[/+]json($|[^-\w])/.test(t)}function ee(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,r,n,o,i=t.split(/\r?\n/),s={},a=0,u=i.length;a<u;++a)-1!==(e=(r=i[a]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),o=Qt(r.slice(e+1)),s[n]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function re(t,e){var r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t,e=null,n=null;try{n=new ee(r)}catch(o){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=o,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",n);try{r._isResponseOK(n)||(t=new Error(n.statusText||"Unsuccessful HTTP response"))}catch(o){t=o}t?(t.original=e,t.response=n,t.status=n.status,r.callback(t,n)):r.callback(null,n)})}function ne(t,e,r){var n=Kt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}Kt.serializeObject=Yt,Kt.parseString=Zt,Kt.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},Kt.serialize={"application/x-www-form-urlencoded":Yt,"application/json":_t},Kt.parse={"application/x-www-form-urlencoded":Zt,"application/json":JSON.parse},Ut(ee.prototype),ee.prototype._parseBody=function(t){var e=Kt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&te(this.type)&&(e=Kt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},ee.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot ".concat(e," ").concat(r," (").concat(this.status,")"),o=new Error(n);return o.status=this.status,o.method=e,o.url=r,o},Kt.Response=ee,At(re.prototype),Mt(re.prototype),re.prototype.type=function(t){return this.set("Content-Type",Kt.types[t]||t),this},re.prototype.accept=function(t){return this.set("Accept",Kt.types[t]||t),this},re.prototype.auth=function(t,e,r){return 1===arguments.length&&(e=""),"object"===Jt(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"}),this._auth(t,e,r,function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")})},re.prototype.query=function(t){return"string"!=typeof t&&(t=Yt(t)),t&&this._query.push(t),this},re.prototype.attach=function(t,e,r){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},re.prototype._getFormData=function(){return this._formData||(this._formData=new Bt.FormData),this._formData},re.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},re.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},re.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},re.prototype.buffer=re.prototype.ca,re.prototype.ca=re.prototype.agent,re.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},re.prototype.pipe=re.prototype.write,re.prototype._isHost=function(t){return t&&"object"===Jt(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},re.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||Gt,this._finalizeQueryString(),this._end()},re.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},re.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=Kt.getXHR();var e=this.xhr,r=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===r){var n;try{n=e.status}catch(o){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(t._uploadTimeoutTimer)),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.addEventListener("progress",n.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",n.bind(null,"upload"))}catch(a){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(u){return this.callback(u)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],i=this._serializer||Kt.serialize[o?o.split(";")[0]:""];!i&&te(o)&&(i=Kt.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&e.setRequestHeader(s,this.header[s]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},Kt.agent=function(){return new Ft},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){Ft.prototype[t.toLowerCase()]=function(e,r){var n=new Kt.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}}),Ft.prototype.del=Ft.prototype.delete,Kt.get=function(t,e,r){var n=Kt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},Kt.head=function(t,e,r){var n=Kt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},Kt.options=function(t,e,r){var n=Kt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Kt.del=ne,Kt.delete=ne,Kt.patch=function(t,e,r){var n=Kt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Kt.post=function(t,e,r){var n=Kt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Kt.put=function(t,e,r){var n=Kt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.boolean=function(t){return"string"==typeof t?/^(true|t|ye[s\u017F]|y|on|1)$/i.test(t.trim()):"number"==typeof t?1===t:"boolean"==typeof t&&t};var ie,se,ae,ue="5.0.0",ce=ie={};function le(){throw new Error("setTimeout has not been defined")}function fe(){throw new Error("clearTimeout has not been defined")}function pe(t){if(se===setTimeout)return setTimeout(t,0);if((se===le||!se)&&setTimeout)return se=setTimeout,setTimeout(t,0);try{return se(t,0)}catch(e){try{return se.call(null,t,0)}catch(e){return se.call(this,t,0)}}}!function(){try{se="function"==typeof setTimeout?setTimeout:le}catch(e){se=le}try{ae="function"==typeof clearTimeout?clearTimeout:fe}catch(e){ae=fe}}();var he,ye=[],de=!1,me=-1;function be(){de&&he&&(de=!1,he.length?ye=he.concat(ye):me=-1,ye.length&&ge())}function ge(){if(!de){var t=pe(be);de=!0;for(var r=ye.length;r;){for(he=ye,ye=[];++me<r;)he&&he[me].run();me=-1,r=ye.length}he=null,de=!1,function(t){if(ae===clearTimeout)return clearTimeout(t);if((ae===fe||!ae)&&clearTimeout)return ae=clearTimeout,clearTimeout(t);try{ae(t)}catch(e){try{return ae.call(null,t)}catch(e){return ae.call(this,t)}}}(t)}}function ve(t,e){this.fun=t,this.array=e}function we(){}ce.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ye.push(new ve(t,e)),1!==ye.length||de||pe(ge)},ve.prototype.run=function(){this.fun.apply(null,this.array)},ce.title="browser",ce.browser=!0,ce.env={},ce.argv=[],ce.version="",ce.versions={},ce.on=we,ce.addListener=we,ce.once=we,ce.off=we,ce.removeListener=we,ce.removeAllListeners=we,ce.emit=we,ce.prependListener=we,ce.prependOnceListener=we,ce.listeners=function(t){return[]},ce.binding=function(t){throw new Error("process.binding is not supported")},ce.cwd=function(){return"/"},ce.chdir=function(t){throw new Error("process.chdir is not supported")},ce.umask=function(){return 0};var _e={};return function(t){"use strict";function e(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=oe.boolean,i=["config","log"],s=["trace","debug","info","warn","error","fatal"],a={warning:"warn",err:"error"},u="https://api.cabinjs.com",c="production",l="`level` invalid, must be: ".concat(s.join(", "));function f(t){return null==t||"object"==n(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function p(t){return void 0===t}function y(t){return"object"==n(t)&&null!==t&&!Array.isArray(t)}function d(t){return"string"==typeof t}function m(t){return"function"==typeof t}_e=function(){function n(){var r=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.config=Object.assign({key:"",endpoint:u,headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||o(t.env.SHOW_STACK),showMeta:!t.env.SHOW_META||o(t.env.SHOW_META),silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!t.browser&&"production"===c,callback:!1,appInfo:!t.env.APP_INFO||o(t.env.APP_INFO)},a),this.appInfo=!!this.config.appInfo&&!!m(vt)&&vt(),this.log=this.log.bind(this);var l=Object.keys(this.config.logger).filter(function(t){return!i.includes(t)}),f=!0,p=!1,h=void 0;try{for(var y,d=l[Symbol.iterator]();!(f=(y=d.next()).done);f=!0){var b=y.value;this[b]=this.config.logger[b]}}catch(S){p=!0,h=S}finally{try{f||null==d.return||d.return()}finally{if(p)throw h}}var g=!0,v=!1,w=void 0;try{for(var _,T=function(){var t=_.value;r[t]=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return r.log.apply(r,e([t].concat([].slice.call(o))))}},O=s[Symbol.iterator]();!(g=(_=O.next()).done);g=!0)T()}catch(S){v=!0,w=S}finally{try{g||null==O.return||O.return()}finally{if(v)throw w}}this.setLevel=this.setLevel.bind(this),this.getNormalizedLevel=this.getNormalizedLevel.bind(this),this.setName=this.setName.bind(this),this.setCallback=this.setCallback.bind(this),this.config.name&&this.setName(this.config.name),this.setLevel(this.config.level),this.err=this.error,this.warning=this.warn}var b,g,v;return b=n,(g=[{key:"setCallback",value:function(t){this.config.callback=t}},{key:"setLevel",value:function(t){if(!d(t)||!s.includes(t))throw new Error(l);d(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=s.slice(s.indexOf(t))}},{key:"getNormalizedLevel",value:function(t){return d(t)?d(a[t])?a[t]:s.includes(t)?t:"info":"info"}},{key:"setName",value:function(t){if(!d(t))throw new Error("`name` must be a String");d(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}},{key:"log",value:function(r,n,o){for(var i=this,c=[],l=arguments.length,b=new Array(l>3?l-3:0),g=3;g<l;g++)b[g-3]=arguments[g];p(r)||c.push(r),p(n)||c.push(n),p(o)||c.push(o),c=c.concat([].slice.call(b));var v,w=this.config,S=0;if(d(r)&&d(a[r])?r=a[r]:O(r)?(o=n,n=r,r="error"):d(r)&&s.includes(r)||(o=n,n=r,r=this.getNormalizedLevel(r),S=-1),(y(n)||Array.isArray(n))&&d(o)){var E=o;o=n,n=E}p(n)&&(n=r),1!==c.slice(1+S).length||d(n)||O(n)?c.length>=4+S?(n=_.apply(void 0,e(c.slice(1+S))),o={}):c.length===3+S&&d(n)&&T.filter(function(t){return n.includes(t)}).length>0?(n=_(n,o),o={}):O(n)||(O(o)?o={err:wt(o)}:y(o)||p(o)||null===o?d(n)||(n=_(n)):(n=_(n,o),o={})):(o={message:n},n=r),p(o)||y(o)?y(o)||(o={}):o={meta:o},O(n)?(v=n,y(o.err)||(o.err=wt(v)),n=n.message):O(o.err)&&(v=o.err);var j=m(w.callback)&&(!("boolean"==typeof o.callback)||o.callback);(o=mt(o,["callback"])).level=r,this.appInfo&&(o.app=this.appInfo);var k=_t({message:n,meta:o});if(w.capture&&w.levels.includes(r)&&(!O(v)||!v._captureFailed)){if(w.endpoint===u&&!w.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");var x=$t.post(w.endpoint).set("X-Request-Id",h()).timeout(w.timeout);t.browser||x.set("User-Agent","axe/".concat(ue)),w.key&&x.auth(w.key),f(w.headers)||x.set(w.headers),x.retry(w.retry).type("application/json").send(k).end(function(t){t&&(t._captureFailed=!0,i.config.logger.error(t))})}if(j&&w.callback(r,n,o),w.silent)return k;if(!w.levels.includes(r))return k;var A=r;-1===S?A="log":"fatal"===r&&(A="error");var P=mt(o,["level","err"]);return"error"===A&&O(v)&&w.showStack?!w.showMeta||f(P)?this.config.logger.error(v):this.config.logger.error(v,P):!w.showMeta||f(P)?this.config.logger[A](n):this.config.logger[A](n,P),k}}])&&r(b.prototype,g),v&&r(b,v),n}()}.call(this,ie),_e});

@@ -47,2 +47,6 @@ "use strict";

var levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];
var aliases = {
warning: 'warn',
err: 'error'
};
var endpoint = 'https://api.cabinjs.com';

@@ -175,2 +179,3 @@ var env = process.env.NODE_ENV || 'development';

this.setLevel = this.setLevel.bind(this);
this.getNormalizedLevel = this.getNormalizedLevel.bind(this);
this.setName = this.setName.bind(this);

@@ -203,2 +208,10 @@ this.setCallback = this.setCallback.bind(this); // set the logger name

}, {
key: "getNormalizedLevel",
value: function getNormalizedLevel(level) {
if (!isString(level)) return 'info';
if (isString(aliases[level])) return aliases[level];
if (!levels.includes(level)) return 'info';
return level;
}
}, {
key: "setName",

@@ -216,3 +229,5 @@ value: function setName(name) {

var originalArgs = [level, message];
var originalArgs = [];
if (!isUndefined(level)) originalArgs.push(level);
if (!isUndefined(message)) originalArgs.push(message);
if (!isUndefined(meta)) originalArgs.push(meta);

@@ -227,6 +242,6 @@

var modifier = 0;
if (level === 'warning') level = 'warn';
if (level === 'err') level = 'error';
if (isError(level)) {
if (isString(level) && isString(aliases[level])) {
level = aliases[level];
} else if (isError(level)) {
meta = message;

@@ -238,9 +253,25 @@ message = level;

message = level;
level = 'info';
level = this.getNormalizedLevel(level);
modifier = -1;
} // if there are four or more args
// then infer to use util.format on everything
} // bunyan support (meta, message)
if (originalArgs.length >= 4 + modifier) {
if ((isObject(message) || Array.isArray(message)) && isString(meta)) {
var _meta = meta;
meta = message;
message = _meta;
} // if message was undefined then set it to level
if (isUndefined(message)) message = level; // if only `message` was passed then if it was an Object
// preserve it as an Object by setting it as meta
if (originalArgs.slice(1 + modifier).length === 1 && !isString(message) && !isError(message)) {
meta = {
message: message
};
message = level;
} else if (originalArgs.length >= 4 + modifier) {
// if there are four or more args
// then infer to use util.format on everything
message = format.apply(void 0, _toConsumableArray(originalArgs.slice(1 + modifier)));

@@ -274,3 +305,5 @@ meta = {};

if (!isObject(meta)) meta = {};
if (!isUndefined(meta) && !isObject(meta)) meta = {
meta: meta
};else if (!isObject(meta)) meta = {};
var err;

@@ -277,0 +310,0 @@

{
"name": "axe",
"description": "Logging add-on to send logs over HTTP to your server in Node and Browser environments. Works with any logger! Chop up your logs consistently! Made for Cabin and Lad.",
"version": "4.0.6",
"version": "5.0.0",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com)",

@@ -6,0 +6,0 @@ "ava": {

@@ -303,2 +303,3 @@ # Axe

* `axe.setLevel(level)` - sets the log `level` (String) severity to capture (must be valid enumerable level)
* `axe.getNormalizedLevel(level)` - gets the normalized log `level` (String) severity (normalizes to known logger levels, e.g. "warning" => "warn", "err" => "error", "log" => "info")
* `axe.setName(name)` - sets the `name` (String) property (some loggers like `pino` will prefix logs with the name set here)

@@ -305,0 +306,0 @@ * `axe.setCallback(callback)` - sets the `callback` (Function) property (see `callback` option above and [Slack example below](#send-logs-to-slack)

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc