Comparing version 9.0.3 to 9.0.4
@@ -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).Cabin=t()}}((function(){!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 t=function(t,e){var r="000000000"+t;return r.substr(r.length-e)};function e(t){return(e="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 r,n="object"==("undefined"==typeof window?"undefined":e(window))?window:self,o=Object.keys(n).length,i=t(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+o.toString(36),4),s=function(){return i},a="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;if(a){var u=Math.pow(2,32)-1;r=function(){return Math.abs(a.getRandomValues(new Uint32Array(1))[0]/u)}}else r=Math.random;var c=r,l={},f=0,p=Math.pow(36,4);function h(){return t((c()*p<<0).toString(36),4)}function y(){return f=f<p?f:0,++f-1}function d(){return"c"+(new Date).getTime().toString(36)+t(y().toString(36),4)+s()+(h()+h())}d.slug=function(){var t=(new Date).getTime().toString(36),e=y().toString(36).slice(-4),r=s().slice(0,1)+s().slice(-1),n=h().slice(-2);return t.slice(-2)+e+r+n},d.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},d.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},d.fingerprint=s,l=d;var m=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,"%")},b=["%s","%d","%i","%f","%j","%o","%O","%%"],g=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},v={};(function(t){(function(){"use strict";function e(t){return(e="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 r=/^\[object .+?Constructor\]$/,n=/^(?:0|[1-9]\d*)$/,o="object"==(void 0===t?"undefined":e(t))&&t&&t.Object===Object&&t,i="object"==("undefined"==typeof self?"undefined":e(self))&&self&&self.Object===Object&&self,s=o||i||Function("return this")();function a(t,e){return!(!t||!t.length)&&function(t,e,r){if(e!=e)return function(t,e,r,n){for(var o=t.length,i=-1;++i<o;)if(e(t[i],i,t))return i;return-1}(t,l);for(var n=-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e)>-1}function u(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function c(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function l(t){return t!=t}function f(t,e){return t.has(e)}function p(t,e){return function(r){return t(e(r))}}var h,y=Array.prototype,d=Function.prototype,m=Object.prototype,b=s["__core-js_shared__"],g=(h=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",_=d.toString,w=m.hasOwnProperty,S=m.toString,O=RegExp("^"+_.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=s.Symbol,T=p(Object.getPrototypeOf,Object),E=m.propertyIsEnumerable,A=y.splice,k=j?j.isConcatSpreadable:void 0,x=Object.getOwnPropertySymbols,C=Math.max,P=M(s,"Map"),R=M(Object,"create");function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function N(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function I(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function L(t){var e=-1,r=t?t.length:0;for(this.__data__=new I;++e<r;)this.add(t[e])}function q(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function H(t,r){var n,o,i=t.__data__;return("string"==(o=e(n=r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof r?"string":"hash"]:i.map}function M(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!V(t)||(e=t,g&&g in e))&&(G(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}(t)?O:r).test(function(t){if(null!=t){try{return _.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}(n)?n:void 0}D.prototype.clear=function(){this.__data__=R?R(null):{}},D.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},D.prototype.get=function(t){var e=this.__data__;if(R){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return w.call(e,t)?e[t]:void 0},D.prototype.has=function(t){var e=this.__data__;return R?void 0!==e[t]:w.call(e,t)},D.prototype.set=function(t,e){return this.__data__[t]=R&&void 0===e?"__lodash_hash_undefined__":e,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(t){var e=this.__data__,r=q(e,t);return!(r<0||(r==e.length-1?e.pop():A.call(e,r,1),0))},N.prototype.get=function(t){var e=this.__data__,r=q(e,t);return r<0?void 0:e[r][1]},N.prototype.has=function(t){return q(this.__data__,t)>-1},N.prototype.set=function(t,e){var r=this.__data__,n=q(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},I.prototype.clear=function(){this.__data__={hash:new D,map:new(P||N),string:new D}},I.prototype.delete=function(t){return H(this,t).delete(t)},I.prototype.get=function(t){return H(this,t).get(t)},I.prototype.has=function(t){return H(this,t).has(t)},I.prototype.set=function(t,e){return H(this,t).set(t,e),this},L.prototype.add=L.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},L.prototype.has=function(t){return this.__data__.has(t)};var U=x?p(x,Object):et,z=x?function(t){for(var e=[];t;)c(e,U(t)),t=T(t);return e}:et;function F(t){return Q(t)||X(t)||!!(k&&t&&t[k])}function $(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t<e}function B(t){if("string"==typeof t||function(t){return"symbol"==e(t)||W(t)&&"[object Symbol]"==S.call(t)}(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function X(t){return function(t){return W(t)&&J(t)}(t)&&w.call(t,"callee")&&(!E.call(t,"callee")||"[object Arguments]"==S.call(t))}var Q=Array.isArray;function J(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!G(t)}function G(t){var e=V(t)?S.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function V(t){var r=e(t);return!!t&&("object"==r||"function"==r)}function W(t){return!!t&&"object"==e(t)}function K(t){return J(t)?function(t,e){var r=Q(t)||X(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!w.call(t,i)||o&&("length"==i||$(i,n))||r.push(i);return r}(t,!0):function(t){if(!V(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n=(r=(e=t)&&e.constructor,e===("function"==typeof r&&r.prototype||m)),o=[];for(var i in t)("constructor"!=i||!n&&w.call(t,i))&&o.push(i);return o}(t)}var Y,Z,tt=(Y=function(t,e){return null==t?{}:(e=u(function t(e,r,n,o,i){var s=-1,a=e.length;for(n||(n=F),i||(i=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,o,i):c(i,u):o||(i[i.length]=u)}return i}(e,1),B),function(t,e){return function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var s=e[n],a=t[s];r(a,s)&&(i[s]=a)}return i}(t=Object(t),e,(function(e,r){return r in t}))}(t,function(t,e,r,n){var o=-1,i=a,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;e.length>=200&&(i=f,s=!1,e=new L(e));t:for(;++o<u;){var p=t[o],h=p;if(p=0!==p?p:0,s&&h==h){for(var y=l;y--;)if(e[y]===h)continue t;c.push(p)}else i(e,h,void 0)||c.push(p)}return c}(function(t){return function(t,e,r){var n=e(t);return Q(t)?n:c(n,r(t))}(t,K,z)}(t),e)))},Z=C(void 0===Z?Y.length-1:Z,0),function(){for(var t=arguments,e=-1,r=C(t.length-Z,0),n=Array(r);++e<r;)n[e]=t[Z+e];e=-1;for(var o=Array(Z+1);++e<Z;)o[e]=t[e];return o[Z]=n,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(Y,this,o)});function et(){return[]}v=tt}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _={},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!g(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},S={};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)}S=E,E.default=E,E.stable=k,E.stableStringify=k;var j=[],T=[];function E(t,e,r){var n;for(function t(e,r,n,o){var i;if("object"==O(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]"}),j.push([o,r,e,s])):T.push([e,r]):(o[r]="[Circular]",j.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===T.length?JSON.stringify(t,e,r):JSON.stringify(t,x(e),r);0!==j.length;){var o=j.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return n}function A(t,e){return t<e?-1:t>e?1:0}function k(t,e,r){var n,o=function t(e,r,n,o){var i;if("object"==O(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]"}),j.push([o,r,e,s])):T.push([e,r]):(o[r]="[Circular]",j.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(A);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;j.push([o,r,e]),o[r]=a}n.pop()}}(t,"",[],void 0)||t;for(n=0===T.length?JSON.stringify(o,e,r):JSON.stringify(o,x(e),r);0!==j.length;){var i=j.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return n}function x(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(T.length>0)for(var n=0;n<T.length;n++){var o=T[n];if(o[1]===e&&o[0]===r){r="[Circular]",T.splice(n,1);break}}return t.call(this,e,r)}}var C={exports:{}};function P(t){if(t)return function(t){for(var e in P.prototype)t[e]=P.prototype[e];return t}(t)}C.exports=P,P.prototype.on=P.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},P.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},P.prototype.off=P.prototype.removeListener=P.prototype.removeAllListeners=P.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},P.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},P.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},P.prototype.hasListeners=function(t){return!!this.listeners(t).length},C=C.exports;var R=String.prototype.replace,D=/%20/g,N={default:"RFC3986",formatters:{RFC1738:function(t){return R.call(t,D,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"};function I(t){return(I="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 L=Object.prototype.hasOwnProperty,q=Array.isArray,H=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),M={combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],s=Object.keys(i),a=0;a<s.length;++a){var u=s[a],c=i[u];"object"==I(c)&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:i,prop:u}),r.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(q(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==I(t)?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var s="",a=0;a<i.length;++a){var u=i.charCodeAt(a);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===N.RFC1738&&(40===u||41===u)?s+=i.charAt(a):u<128?s+=H[u]:u<2048?s+=H[192|u>>6]+H[128|63&u]:u<55296||u>=57344?s+=H[224|u>>12]+H[128|u>>6&63]+H[128|63&u]:(a+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(a)),s+=H[240|u>>18]+H[128|u>>12&63]+H[128|u>>6&63]+H[128|63&u])}return s},isBuffer:function(t){return!(!t||"object"!=I(t)||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(q(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=I(r)){if(q(e))e.push(r);else{if(!e||"object"!=I(e))return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!L.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=I(e))return[e].concat(r);var o=e;return q(e)&&!q(r)&&(o=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r}(e,n)),q(e)&&q(r)?(r.forEach((function(r,o){if(L.call(e,o)){var i=e[o];i&&"object"==I(i)&&r&&"object"==I(r)?e[o]=t(i,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var i=r[o];return L.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e}),o)}};function U(t){return(U="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 z=Object.prototype.hasOwnProperty,F={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},$=Array.isArray,B=Array.prototype.push,X=function(t,e){B.apply(t,$(e)?e:[e])},Q=Date.prototype.toISOString,J=N.default,G={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:M.encode,encodeValuesOnly:!1,format:J,formatter:N.formatters[J],indices:!1,serializeDate:function(t){return Q.call(t)},skipNulls:!1,strictNullHandling:!1},V=function t(e,r,n,o,i,s,a,u,c,l,f,p,h,y){var d,m=e;if("function"==typeof a?m=a(r,m):m instanceof Date?m=l(m):"comma"===n&&$(m)&&(m=M.maybeMap(m,(function(t){return t instanceof Date?l(t):t}))),null===m){if(o)return s&&!h?s(r,G.encoder,y,"key",f):r;m=""}if("string"==typeof(d=m)||"number"==typeof d||"boolean"==typeof d||"symbol"==U(d)||"bigint"==typeof d||M.isBuffer(m))return s?[p(h?r:s(r,G.encoder,y,"key",f))+"="+p(s(m,G.encoder,y,"value",f))]:[p(r)+"="+p(String(m))];var b,g=[];if(void 0===m)return g;if("comma"===n&&$(m))b=[{value:m.length>0?m.join(",")||null:void 0}];else if($(a))b=a;else{var v=Object.keys(m);b=u?v.sort(u):v}for(var _=0;_<b.length;++_){var w=b[_],S="object"==U(w)&&void 0!==w.value?w.value:m[w];if(!i||null!==S){var O=$(m)?"function"==typeof n?n(r,w):r:r+(c?"."+w:"["+w+"]");X(g,t(S,O,n,o,i,s,a,u,c,l,f,p,h,y))}}return g},W=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,n=t,o=function(t){if(!t)return G;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||G.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=N.default;if(void 0!==t.format){if(!z.call(N.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=N.formatters[r],o=G.filter;return("function"==typeof t.filter||$(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:G.addQueryPrefix,allowDots:void 0===t.allowDots?G.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:G.charsetSentinel,delimiter:void 0===t.delimiter?G.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:G.encode,encoder:"function"==typeof t.encoder?t.encoder:G.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:G.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:G.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:G.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:G.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):$(o.filter)&&(r=o.filter);var i,s=[];if("object"!=U(n)||null===n)return"";i=e&&e.arrayFormat in F?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=F[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var u=0;u<r.length;++u){var c=r[u];o.skipNulls&&null===n[c]||X(s,V(n[c],c,a,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var l=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),l.length>0?f+l:""}});function K(t){return(K="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 Y(t){return(Y="function"==typeof Symbol&&"symbol"==K(Symbol.iterator)?function(t){return K(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":K(t)})(t)}var Z=function(t){return null!==t&&"object"===Y(t)},tt={};function et(t){return(et="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"==et(Symbol.iterator)?function(t){return et(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":et(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)}tt=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"!==rt(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 ot=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),it=new Set([408,413,429,500,502,503,504,521,522,524]);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&&it.has(e.status))return!0;if(t){if(t.code&&ot.has(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.timedoutError=null,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(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)e(r.timedoutError);else{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(Z(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(Z(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._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=Z(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&&Z(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"])&&(r=r.toLowerCase().trim()),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)||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.timedoutError=n,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 st={};function at(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ut(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}st.type=function(t){return t.split(/ *; */).shift()},st.params=function(t){var e,r={},n=at(t.split(/ *; */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *= */),i=o.shift(),s=o.shift();i&&s&&(r[i]=s)}}catch(a){n.e(a)}finally{n.f()}return r},st.parseLinks=function(t){var e,r={},n=at(t.split(/ *, */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *; */),i=o[0].slice(1,-1);r[o[1].split(/ *= */)[1].slice(1,-1)]=i}}catch(s){n.e(s)}finally{n.f()}return r};var ct={};function lt(t){if(t)return function(t){for(var e in lt.prototype)Object.prototype.hasOwnProperty.call(lt.prototype,e)&&(t[e]=lt.prototype[e]);return t}(t)}ct=lt,lt.prototype.get=function(t){return this.header[t.toLowerCase()]},lt.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=st.type(e);var r=st.params(e);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=st.parseLinks(t.link))}catch(o){}},lt.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 pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ht(){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){ht.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}})),ht.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,function(t){return function(t){if(Array.isArray(t))return pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return pt(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pt(t,void 0):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.args))}))},ft=ht;var yt,dt={};function mt(t){return(mt="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 bt(t){return(bt="function"==typeof Symbol&&"symbol"==mt(Symbol.iterator)?function(t){return mt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":mt(t)})(t)}function gt(){}"undefined"!=typeof window?yt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),yt=void 0):yt=self;var vt=dt=dt=function(t,e){return"function"==typeof e?new dt.Request("GET",t).end(e):1===arguments.length?new dt.Request("GET",t):new dt.Request(t,e)};dt.Request=Et,vt.getXHR=function(){if(yt.XMLHttpRequest&&(!yt.location||"file:"!==yt.location.protocol||!yt.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 _t="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function wt(t){if(!Z(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&St(e,r,t[r]);return e.join("&")}function St(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach((function(r){St(t,e,r)}));else if(Z(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&St(t,"".concat(e,"[").concat(n,"]"),r[n]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function Ot(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 jt(t){return/[/+]json($|[^-\w])/i.test(t)}function Tt(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=_t(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 Et(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 Tt(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||n.text||"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 At(t,e,r){var n=vt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}vt.serializeObject=wt,vt.parseString=Ot,vt.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"},vt.serialize={"application/x-www-form-urlencoded":W.stringify,"application/json":S},vt.parse={"application/x-www-form-urlencoded":Ot,"application/json":JSON.parse},ct(Tt.prototype),Tt.prototype._parseBody=function(t){var e=vt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&jt(this.type)&&(e=vt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},Tt.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},vt.Response=Tt,C(Et.prototype),tt(Et.prototype),Et.prototype.type=function(t){return this.set("Content-Type",vt.types[t]||t),this},Et.prototype.accept=function(t){return this.set("Accept",vt.types[t]||t),this},Et.prototype.auth=function(t,e,r){return 1===arguments.length&&(e=""),"object"===bt(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")}))},Et.prototype.query=function(t){return"string"!=typeof t&&(t=wt(t)),t&&this._query.push(t),this},Et.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},Et.prototype._getFormData=function(){return this._formData||(this._formData=new yt.FormData),this._formData},Et.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)},Et.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)},Et.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},Et.prototype.ca=Et.prototype.agent,Et.prototype.buffer=Et.prototype.ca,Et.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},Et.prototype.pipe=Et.prototype.write,Et.prototype._isHost=function(t){return t&&"object"===bt(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},Et.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()},Et.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},Et.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=vt.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||vt.serialize[o?o.split(";")[0]:""];!i&&jt(o)&&(i=vt.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)},vt.agent=function(){return new ft},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){ft.prototype[t.toLowerCase()]=function(e,r){var n=new vt.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}})),ft.prototype.del=ft.prototype.delete,vt.get=function(t,e,r){var n=vt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},vt.head=function(t,e,r){var n=vt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},vt.options=function(t,e,r){var n=vt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vt.del=At,vt.delete=At,vt.patch=function(t,e,r){var n=vt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vt.post=function(t,e,r){var n=vt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vt.put=function(t,e,r){var n=vt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var kt={};Object.defineProperty(kt,"__esModule",{value:!0}),kt.boolean=void 0,kt.boolean=function(t){return"string"==typeof t?["true","t","yes","y","on","1"].includes(t.trim().toLowerCase()):"number"==typeof t?1===t:"boolean"==typeof t&&t};var xt,Ct,Pt,Rt="7.0.2",Dt=xt={};function Nt(){throw new Error("setTimeout has not been defined")}function It(){throw new Error("clearTimeout has not been defined")}function Lt(t){if(Ct===setTimeout)return setTimeout(t,0);if((Ct===Nt||!Ct)&&setTimeout)return Ct=setTimeout,setTimeout(t,0);try{return Ct(t,0)}catch(e){try{return Ct.call(null,t,0)}catch(e){return Ct.call(this,t,0)}}}!function(){try{Ct="function"==typeof setTimeout?setTimeout:Nt}catch(t){Ct=Nt}try{Pt="function"==typeof clearTimeout?clearTimeout:It}catch(t){Pt=It}}();var qt,Ht=[],Mt=!1,Ut=-1;function zt(){Mt&&qt&&(Mt=!1,qt.length?Ht=qt.concat(Ht):Ut=-1,Ht.length&&Ft())}function Ft(){if(!Mt){var t=Lt(zt);Mt=!0;for(var e=Ht.length;e;){for(qt=Ht,Ht=[];++Ut<e;)qt&&qt[Ut].run();Ut=-1,e=Ht.length}qt=null,Mt=!1,function(t){if(Pt===clearTimeout)return clearTimeout(t);if((Pt===It||!Pt)&&clearTimeout)return Pt=clearTimeout,clearTimeout(t);try{Pt(t)}catch(e){try{return Pt.call(null,t)}catch(e){return Pt.call(this,t)}}}(t)}}function $t(t,e){this.fun=t,this.array=e}function Bt(){}Dt.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];Ht.push(new $t(t,e)),1!==Ht.length||Mt||Lt(Ft)},$t.prototype.run=function(){this.fun.apply(null,this.array)},Dt.title="browser",Dt.browser=!0,Dt.env={},Dt.argv=[],Dt.version="",Dt.versions={},Dt.on=Bt,Dt.addListener=Bt,Dt.once=Bt,Dt.off=Bt,Dt.removeListener=Bt,Dt.removeAllListeners=Bt,Dt.emit=Bt,Dt.prependListener=Bt,Dt.prependOnceListener=Bt,Dt.listeners=function(t){return[]},Dt.binding=function(t){throw new Error("process.binding is not supported")},Dt.cwd=function(){return"/"},Dt.chdir=function(t){throw new Error("process.chdir is not supported")},Dt.umask=function(){return 0};var Xt={};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 Jt(t){return function(t){if(Array.isArray(t))return Gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vt(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(t){(function(){"use strict";function e(t){return(e="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 r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw s}}}}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(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 a(t){return(a="function"==typeof Symbol&&"symbol"==e(Symbol.iterator)?function(t){return e(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)})(t)}var u=kt.boolean,c=new Set(["config","log"]),f=["trace","debug","info","warn","error","fatal"],p={warning:"warn",err:"error"},h="https://api.cabinjs.com",y="`level` invalid, must be: ".concat(f.join(", "));function d(t){return null==t||"object"===a(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function O(t){return void 0===t}function j(t){return"object"===a(t)&&null!==t&&!Array.isArray(t)}function T(t){return"string"==typeof t}function E(t){return"function"==typeof t}var A=function(){function e(){var o=this,i=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,e),this.config=Object.assign({key:"",endpoint:h,headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||u(t.env.SHOW_STACK),showMeta:!t.env.SHOW_META||u(t.env.SHOW_META),silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!t.browser&&!0,callback:!1,appInfo:!t.env.APP_INFO||u(t.env.APP_INFO)},i),this.appInfo=!!this.config.appInfo&&!!E(_)&&_(),this.log=this.log.bind(this);var s,a=n(Object.keys(this.config.logger).filter((function(t){return!c.has(t)})));try{for(a.s();!(s=a.n()).done;){var l=s.value;this[l]=this.config.logger[l]}}catch(m){a.e(m)}finally{a.f()}var p,y=n(f);try{var d=function(){var t=p.value;o[t]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return o.log.apply(o,r([t].concat([].slice.call(n))))}};for(y.s();!(p=y.n()).done;)d()}catch(m){y.e(m)}finally{y.f()}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 o,i;return o=e,(i=[{key:"setCallback",value:function(t){this.config.callback=t}},{key:"setLevel",value:function(t){if(!T(t)||!f.includes(t))throw new Error(y);T(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=f.slice(f.indexOf(t))}},{key:"getNormalizedLevel",value:function(t){return T(t)?T(p[t])?p[t]:f.includes(t)?t:"info":"info"}},{key:"setName",value:function(t){if(!T(t))throw new Error("`name` must be a String");T(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}},{key:"log",value:function(e,n,o){var i=this,s=[];O(e)||s.push(e),O(n)||s.push(n),O(o)||s.push(o);for(var a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];s=s.concat([].slice.call(u));var y=this.config,_=0;T(e)&&T(p[e])?e=p[e]:g(e)?(o=n,n=e,e="error"):T(e)&&f.includes(e)||(o=n,n=e,e=this.getNormalizedLevel(e),_=-1);var A,k=!1;if((j(n)||Array.isArray(n))&&T(o)){k=!0;var x=o;o=n,n=T(x)&&s.length>=3+_?m.apply(void 0,r(s.slice(2+_))):x}O(n)&&(n=e),1!==s.slice(1+_).length||T(n)||g(n)?!k&&s.length>=4+_?(n=m.apply(void 0,r(s.slice(1+_))),o={}):!k&&s.length===3+_&&T(n)&&b.filter((function(t){return n.includes(t)})).length>0?(n=m(n,o),o={}):g(n)||(g(o)?o={err:w(o)}:j(o)||O(o)||null===o?T(n)||(n=m(n)):(n=m(n,o),o={})):(o={message:n},n=e),O(o)||j(o)?j(o)||(o={}):o={meta:o},g(n)?(A=n,j(o.err)||(o.err=w(A)),n=n.message):g(o.err)&&(A=o.err);var C=E(y.callback)&&(!function(t){return"boolean"==typeof t}(o.callback)||o.callback);(o=v(o,["callback"])).level=e,this.appInfo&&(o.app=this.appInfo);var P=S({message:n,meta:o});if(y.capture&&y.levels.includes(e)&&(!g(A)||!A._captureFailed)){if(y.endpoint===h&&!y.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");var R=dt.post(y.endpoint).set("X-Request-Id",l()).timeout(y.timeout);t.browser||R.set("User-Agent","axe/".concat(Rt)),y.key&&R.auth(y.key),d(y.headers)||R.set(y.headers),R.type("application/json").send(P).retry(y.retry).end((function(t){t&&(t._captureFailed=!0,i.config.logger.error(t))}))}if(C&&y.callback(e,n,o),y.silent)return P;if(!y.levels.includes(e))return P;var D=e;-1===_?D="log":"fatal"===e&&(D="error");var N=v(o,["level","err"]);return"error"===D&&g(A)&&y.showStack?!y.showMeta||d(N)?this.config.logger.error(A):this.config.logger.error(A,N):!y.showMeta||d(N)?this.config.logger[D](n):this.config.logger[D](n,N),P}}])&&s(o.prototype,i),e}();Xt=A}).call(this)}).call(this,xt);var Wt=function(t){return null==t||"object"==Qt(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length},Kt=function(t){return null===t},Yt=function(t){return void 0===t},Zt=function(t){return"object"==Qt(t)&&null!==t&&!Array.isArray(t)},te=function(t){return"string"==typeof t},ee=function(t){return"function"==typeof t};return function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=Object.assign({key:"",capture:null,axe:{},logger:null,meta:{},parseRequest:{},errorProps:[],message:_},e),!Wt(this.config.axe)&&this.config.key&&(this.config.axe.key=this.config.key),Wt(this.config.axe)||"boolean"!=typeof this.config.capture||(this.config.axe.capture=this.config.capture),Wt(this.config.axe)?this.config.key||this.config.capture?this.config.logger=new Xt(Object.assign(this.config.key?{key:this.config.key}:{},this.config.capture?{capture:this.config.capture}:{})):Zt(this.config.logger)||(this.config.logger=new Xt):this.config.logger=new Xt(this.config.axe),this.logger=this.config.logger,this.parseArg=this.parseArg.bind(this),Object.keys(this.logger).filter((function(t){return ee(r.logger[t])})).forEach((function(t){r[t]=function(){for(var e,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];o[1]&&(o[1]=r.parseArg(o[1])),(e=r.logger)[t].apply(e,Jt([].slice.call(o)))}})),this.err=this.error,this.warning=this.warn,this.setMeta=this.setMeta.bind(this),this.setUser=this.setUser.bind(this),ee(_)&&(this.middleware=_.bind(this))}var e,r,n;return e=t,(r=[{key:"parseArg",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Zt(t)?(Object.assign(t,this.config.meta),t):(t=Yt(t)||Kt(t)?{}:g(t)?{err:w(t,this.config.errorProps)}:Array.isArray(t)||te(t)||"number"==typeof t?{value:t}:ee(t)?{value:t.toString()}:{},Object.assign(t,this.config.meta),t)}},{key:"setMeta",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.meta=t}},{key:"setUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.meta.user=t}}])&&Vt(e.prototype,r),n&&Vt(e,n),t}()})); | ||
!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).Cabin=t()}}((function(){!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 t=function(t,e){var r="000000000"+t;return r.substr(r.length-e)};function e(t){return(e="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 r,n="object"==("undefined"==typeof window?"undefined":e(window))?window:self,o=Object.keys(n).length,i=t(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+o.toString(36),4),s=function(){return i},a="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;if(a){var u=Math.pow(2,32)-1;r=function(){return Math.abs(a.getRandomValues(new Uint32Array(1))[0]/u)}}else r=Math.random;var c=r,l={},f=0,p=Math.pow(36,4);function h(){return t((c()*p<<0).toString(36),4)}function y(){return f=f<p?f:0,++f-1}function d(){return"c"+(new Date).getTime().toString(36)+t(y().toString(36),4)+s()+(h()+h())}d.slug=function(){var t=(new Date).getTime().toString(36),e=y().toString(36).slice(-4),r=s().slice(0,1)+s().slice(-1),n=h().slice(-2);return t.slice(-2)+e+r+n},d.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},d.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},d.fingerprint=s,l=d;var m=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,"%")},b=["%s","%d","%i","%f","%j","%o","%O","%%"],g=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},v={};(function(t){(function(){"use strict";function e(t){return(e="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 r=/^\[object .+?Constructor\]$/,n=/^(?:0|[1-9]\d*)$/,o="object"==(void 0===t?"undefined":e(t))&&t&&t.Object===Object&&t,i="object"==("undefined"==typeof self?"undefined":e(self))&&self&&self.Object===Object&&self,s=o||i||Function("return this")();function a(t,e){return!(!t||!t.length)&&function(t,e,r){if(e!=e)return function(t,e,r,n){for(var o=t.length,i=-1;++i<o;)if(e(t[i],i,t))return i;return-1}(t,l);for(var n=-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e)>-1}function u(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function c(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function l(t){return t!=t}function f(t,e){return t.has(e)}function p(t,e){return function(r){return t(e(r))}}var h,y=Array.prototype,d=Function.prototype,m=Object.prototype,b=s["__core-js_shared__"],g=(h=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",_=d.toString,w=m.hasOwnProperty,S=m.toString,O=RegExp("^"+_.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=s.Symbol,T=p(Object.getPrototypeOf,Object),E=m.propertyIsEnumerable,A=y.splice,k=j?j.isConcatSpreadable:void 0,x=Object.getOwnPropertySymbols,C=Math.max,P=M(s,"Map"),R=M(Object,"create");function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function N(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function I(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function L(t){var e=-1,r=t?t.length:0;for(this.__data__=new I;++e<r;)this.add(t[e])}function q(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function H(t,r){var n,o,i=t.__data__;return("string"==(o=e(n=r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof r?"string":"hash"]:i.map}function M(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!V(t)||(e=t,g&&g in e))&&(G(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}(t)?O:r).test(function(t){if(null!=t){try{return _.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}(n)?n:void 0}D.prototype.clear=function(){this.__data__=R?R(null):{}},D.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},D.prototype.get=function(t){var e=this.__data__;if(R){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return w.call(e,t)?e[t]:void 0},D.prototype.has=function(t){var e=this.__data__;return R?void 0!==e[t]:w.call(e,t)},D.prototype.set=function(t,e){return this.__data__[t]=R&&void 0===e?"__lodash_hash_undefined__":e,this},N.prototype.clear=function(){this.__data__=[]},N.prototype.delete=function(t){var e=this.__data__,r=q(e,t);return!(r<0||(r==e.length-1?e.pop():A.call(e,r,1),0))},N.prototype.get=function(t){var e=this.__data__,r=q(e,t);return r<0?void 0:e[r][1]},N.prototype.has=function(t){return q(this.__data__,t)>-1},N.prototype.set=function(t,e){var r=this.__data__,n=q(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},I.prototype.clear=function(){this.__data__={hash:new D,map:new(P||N),string:new D}},I.prototype.delete=function(t){return H(this,t).delete(t)},I.prototype.get=function(t){return H(this,t).get(t)},I.prototype.has=function(t){return H(this,t).has(t)},I.prototype.set=function(t,e){return H(this,t).set(t,e),this},L.prototype.add=L.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},L.prototype.has=function(t){return this.__data__.has(t)};var U=x?p(x,Object):et,z=x?function(t){for(var e=[];t;)c(e,U(t)),t=T(t);return e}:et;function F(t){return Q(t)||X(t)||!!(k&&t&&t[k])}function $(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t<e}function B(t){if("string"==typeof t||function(t){return"symbol"==e(t)||W(t)&&"[object Symbol]"==S.call(t)}(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function X(t){return function(t){return W(t)&&J(t)}(t)&&w.call(t,"callee")&&(!E.call(t,"callee")||"[object Arguments]"==S.call(t))}var Q=Array.isArray;function J(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!G(t)}function G(t){var e=V(t)?S.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function V(t){var r=e(t);return!!t&&("object"==r||"function"==r)}function W(t){return!!t&&"object"==e(t)}function K(t){return J(t)?function(t,e){var r=Q(t)||X(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!w.call(t,i)||o&&("length"==i||$(i,n))||r.push(i);return r}(t,!0):function(t){if(!V(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n=(r=(e=t)&&e.constructor,e===("function"==typeof r&&r.prototype||m)),o=[];for(var i in t)("constructor"!=i||!n&&w.call(t,i))&&o.push(i);return o}(t)}var Y,Z,tt=(Y=function(t,e){return null==t?{}:(e=u(function t(e,r,n,o,i){var s=-1,a=e.length;for(n||(n=F),i||(i=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,o,i):c(i,u):o||(i[i.length]=u)}return i}(e,1),B),function(t,e){return function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var s=e[n],a=t[s];r(a,s)&&(i[s]=a)}return i}(t=Object(t),e,(function(e,r){return r in t}))}(t,function(t,e,r,n){var o=-1,i=a,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;e.length>=200&&(i=f,s=!1,e=new L(e));t:for(;++o<u;){var p=t[o],h=p;if(p=0!==p?p:0,s&&h==h){for(var y=l;y--;)if(e[y]===h)continue t;c.push(p)}else i(e,h,void 0)||c.push(p)}return c}(function(t){return function(t,e,r){var n=e(t);return Q(t)?n:c(n,r(t))}(t,K,z)}(t),e)))},Z=C(void 0===Z?Y.length-1:Z,0),function(){for(var t=arguments,e=-1,r=C(t.length-Z,0),n=Array(r);++e<r;)n[e]=t[Z+e];e=-1;for(var o=Array(Z+1);++e<Z;)o[e]=t[e];return o[Z]=n,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(Y,this,o)});function et(){return[]}v=tt}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _={},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!g(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},S={};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)}S=E,E.default=E,E.stable=k,E.stableStringify=k;var j=[],T=[];function E(t,e,r){var n;for(function t(e,r,n,o){var i;if("object"==O(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]"}),j.push([o,r,e,s])):T.push([e,r]):(o[r]="[Circular]",j.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===T.length?JSON.stringify(t,e,r):JSON.stringify(t,x(e),r);0!==j.length;){var o=j.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return n}function A(t,e){return t<e?-1:t>e?1:0}function k(t,e,r){var n,o=function t(e,r,n,o){var i;if("object"==O(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]"}),j.push([o,r,e,s])):T.push([e,r]):(o[r]="[Circular]",j.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(A);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;j.push([o,r,e]),o[r]=a}n.pop()}}(t,"",[],void 0)||t;for(n=0===T.length?JSON.stringify(o,e,r):JSON.stringify(o,x(e),r);0!==j.length;){var i=j.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return n}function x(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(T.length>0)for(var n=0;n<T.length;n++){var o=T[n];if(o[1]===e&&o[0]===r){r="[Circular]",T.splice(n,1);break}}return t.call(this,e,r)}}var C={exports:{}};function P(t){if(t)return function(t){for(var e in P.prototype)t[e]=P.prototype[e];return t}(t)}C.exports=P,P.prototype.on=P.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},P.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},P.prototype.off=P.prototype.removeListener=P.prototype.removeAllListeners=P.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},P.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},P.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},P.prototype.hasListeners=function(t){return!!this.listeners(t).length},C=C.exports;var R=String.prototype.replace,D=/%20/g,N={default:"RFC3986",formatters:{RFC1738:function(t){return R.call(t,D,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"};function I(t){return(I="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 L=Object.prototype.hasOwnProperty,q=Array.isArray,H=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),M={combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],s=Object.keys(i),a=0;a<s.length;++a){var u=s[a],c=i[u];"object"==I(c)&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:i,prop:u}),r.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(q(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==I(t)?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var s="",a=0;a<i.length;++a){var u=i.charCodeAt(a);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===N.RFC1738&&(40===u||41===u)?s+=i.charAt(a):u<128?s+=H[u]:u<2048?s+=H[192|u>>6]+H[128|63&u]:u<55296||u>=57344?s+=H[224|u>>12]+H[128|u>>6&63]+H[128|63&u]:(a+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(a)),s+=H[240|u>>18]+H[128|u>>12&63]+H[128|u>>6&63]+H[128|63&u])}return s},isBuffer:function(t){return!(!t||"object"!=I(t)||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(q(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=I(r)){if(q(e))e.push(r);else{if(!e||"object"!=I(e))return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!L.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=I(e))return[e].concat(r);var o=e;return q(e)&&!q(r)&&(o=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r}(e,n)),q(e)&&q(r)?(r.forEach((function(r,o){if(L.call(e,o)){var i=e[o];i&&"object"==I(i)&&r&&"object"==I(r)?e[o]=t(i,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var i=r[o];return L.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e}),o)}};function U(t){return(U="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 z=Object.prototype.hasOwnProperty,F={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},$=Array.isArray,B=Array.prototype.push,X=function(t,e){B.apply(t,$(e)?e:[e])},Q=Date.prototype.toISOString,J=N.default,G={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:M.encode,encodeValuesOnly:!1,format:J,formatter:N.formatters[J],indices:!1,serializeDate:function(t){return Q.call(t)},skipNulls:!1,strictNullHandling:!1},V=function t(e,r,n,o,i,s,a,u,c,l,f,p,h,y){var d,m=e;if("function"==typeof a?m=a(r,m):m instanceof Date?m=l(m):"comma"===n&&$(m)&&(m=M.maybeMap(m,(function(t){return t instanceof Date?l(t):t}))),null===m){if(o)return s&&!h?s(r,G.encoder,y,"key",f):r;m=""}if("string"==typeof(d=m)||"number"==typeof d||"boolean"==typeof d||"symbol"==U(d)||"bigint"==typeof d||M.isBuffer(m))return s?[p(h?r:s(r,G.encoder,y,"key",f))+"="+p(s(m,G.encoder,y,"value",f))]:[p(r)+"="+p(String(m))];var b,g=[];if(void 0===m)return g;if("comma"===n&&$(m))b=[{value:m.length>0?m.join(",")||null:void 0}];else if($(a))b=a;else{var v=Object.keys(m);b=u?v.sort(u):v}for(var _=0;_<b.length;++_){var w=b[_],S="object"==U(w)&&void 0!==w.value?w.value:m[w];if(!i||null!==S){var O=$(m)?"function"==typeof n?n(r,w):r:r+(c?"."+w:"["+w+"]");X(g,t(S,O,n,o,i,s,a,u,c,l,f,p,h,y))}}return g},W=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,n=t,o=function(t){if(!t)return G;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||G.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=N.default;if(void 0!==t.format){if(!z.call(N.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=N.formatters[r],o=G.filter;return("function"==typeof t.filter||$(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:G.addQueryPrefix,allowDots:void 0===t.allowDots?G.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:G.charsetSentinel,delimiter:void 0===t.delimiter?G.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:G.encode,encoder:"function"==typeof t.encoder?t.encoder:G.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:G.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:G.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:G.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:G.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):$(o.filter)&&(r=o.filter);var i,s=[];if("object"!=U(n)||null===n)return"";i=e&&e.arrayFormat in F?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=F[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var u=0;u<r.length;++u){var c=r[u];o.skipNulls&&null===n[c]||X(s,V(n[c],c,a,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var l=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),l.length>0?f+l:""}});function K(t){return(K="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 Y(t){return(Y="function"==typeof Symbol&&"symbol"==K(Symbol.iterator)?function(t){return K(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":K(t)})(t)}var Z=function(t){return null!==t&&"object"===Y(t)},tt={};function et(t){return(et="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"==et(Symbol.iterator)?function(t){return et(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":et(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)}tt=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"!==rt(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 ot=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),it=new Set([408,413,429,500,502,503,504,521,522,524]);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&&it.has(e.status))return!0;if(t){if(t.code&&ot.has(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.timedoutError=null,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(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)e(r.timedoutError);else{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(Z(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(Z(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._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=Z(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&&Z(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"])&&(r=r.toLowerCase().trim()),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)||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.timedoutError=n,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 st={};function at(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ut(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}st.type=function(t){return t.split(/ *; */).shift()},st.params=function(t){var e,r={},n=at(t.split(/ *; */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *= */),i=o.shift(),s=o.shift();i&&s&&(r[i]=s)}}catch(a){n.e(a)}finally{n.f()}return r},st.parseLinks=function(t){var e,r={},n=at(t.split(/ *, */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *; */),i=o[0].slice(1,-1);r[o[1].split(/ *= */)[1].slice(1,-1)]=i}}catch(s){n.e(s)}finally{n.f()}return r};var ct={};function lt(t){if(t)return function(t){for(var e in lt.prototype)Object.prototype.hasOwnProperty.call(lt.prototype,e)&&(t[e]=lt.prototype[e]);return t}(t)}ct=lt,lt.prototype.get=function(t){return this.header[t.toLowerCase()]},lt.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=st.type(e);var r=st.params(e);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=st.parseLinks(t.link))}catch(o){}},lt.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 pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ht(){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){ht.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}})),ht.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,function(t){return function(t){if(Array.isArray(t))return pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return pt(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pt(t,void 0):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.args))}))},ft=ht;var yt,dt={};function mt(t){return(mt="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 bt(t){return(bt="function"==typeof Symbol&&"symbol"==mt(Symbol.iterator)?function(t){return mt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":mt(t)})(t)}function gt(){}"undefined"!=typeof window?yt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),yt=void 0):yt=self;var vt=dt=dt=function(t,e){return"function"==typeof e?new dt.Request("GET",t).end(e):1===arguments.length?new dt.Request("GET",t):new dt.Request(t,e)};dt.Request=Et,vt.getXHR=function(){if(yt.XMLHttpRequest&&(!yt.location||"file:"!==yt.location.protocol||!yt.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 _t="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function wt(t){if(!Z(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&St(e,r,t[r]);return e.join("&")}function St(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach((function(r){St(t,e,r)}));else if(Z(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&St(t,"".concat(e,"[").concat(n,"]"),r[n]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function Ot(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 jt(t){return/[/+]json($|[^-\w])/i.test(t)}function Tt(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=_t(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 Et(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 Tt(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||n.text||"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 At(t,e,r){var n=vt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}vt.serializeObject=wt,vt.parseString=Ot,vt.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"},vt.serialize={"application/x-www-form-urlencoded":W.stringify,"application/json":S},vt.parse={"application/x-www-form-urlencoded":Ot,"application/json":JSON.parse},ct(Tt.prototype),Tt.prototype._parseBody=function(t){var e=vt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&jt(this.type)&&(e=vt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},Tt.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},vt.Response=Tt,C(Et.prototype),tt(Et.prototype),Et.prototype.type=function(t){return this.set("Content-Type",vt.types[t]||t),this},Et.prototype.accept=function(t){return this.set("Accept",vt.types[t]||t),this},Et.prototype.auth=function(t,e,r){return 1===arguments.length&&(e=""),"object"===bt(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")}))},Et.prototype.query=function(t){return"string"!=typeof t&&(t=wt(t)),t&&this._query.push(t),this},Et.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},Et.prototype._getFormData=function(){return this._formData||(this._formData=new yt.FormData),this._formData},Et.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)},Et.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)},Et.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},Et.prototype.ca=Et.prototype.agent,Et.prototype.buffer=Et.prototype.ca,Et.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},Et.prototype.pipe=Et.prototype.write,Et.prototype._isHost=function(t){return t&&"object"===bt(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},Et.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()},Et.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},Et.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=vt.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||vt.serialize[o?o.split(";")[0]:""];!i&&jt(o)&&(i=vt.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)},vt.agent=function(){return new ft},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){ft.prototype[t.toLowerCase()]=function(e,r){var n=new vt.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}})),ft.prototype.del=ft.prototype.delete,vt.get=function(t,e,r){var n=vt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},vt.head=function(t,e,r){var n=vt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},vt.options=function(t,e,r){var n=vt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vt.del=At,vt.delete=At,vt.patch=function(t,e,r){var n=vt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vt.post=function(t,e,r){var n=vt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vt.put=function(t,e,r){var n=vt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var kt={};Object.defineProperty(kt,"__esModule",{value:!0}),kt.boolean=void 0,kt.boolean=function(t){return"string"==typeof t?["true","t","yes","y","on","1"].includes(t.trim().toLowerCase()):"number"==typeof t?1===t:"boolean"==typeof t&&t};var xt,Ct,Pt,Rt="8.0.0",Dt=xt={};function Nt(){throw new Error("setTimeout has not been defined")}function It(){throw new Error("clearTimeout has not been defined")}function Lt(t){if(Ct===setTimeout)return setTimeout(t,0);if((Ct===Nt||!Ct)&&setTimeout)return Ct=setTimeout,setTimeout(t,0);try{return Ct(t,0)}catch(e){try{return Ct.call(null,t,0)}catch(e){return Ct.call(this,t,0)}}}!function(){try{Ct="function"==typeof setTimeout?setTimeout:Nt}catch(t){Ct=Nt}try{Pt="function"==typeof clearTimeout?clearTimeout:It}catch(t){Pt=It}}();var qt,Ht=[],Mt=!1,Ut=-1;function zt(){Mt&&qt&&(Mt=!1,qt.length?Ht=qt.concat(Ht):Ut=-1,Ht.length&&Ft())}function Ft(){if(!Mt){var t=Lt(zt);Mt=!0;for(var e=Ht.length;e;){for(qt=Ht,Ht=[];++Ut<e;)qt&&qt[Ut].run();Ut=-1,e=Ht.length}qt=null,Mt=!1,function(t){if(Pt===clearTimeout)return clearTimeout(t);if((Pt===It||!Pt)&&clearTimeout)return Pt=clearTimeout,clearTimeout(t);try{Pt(t)}catch(e){try{return Pt.call(null,t)}catch(e){return Pt.call(this,t)}}}(t)}}function $t(t,e){this.fun=t,this.array=e}function Bt(){}Dt.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];Ht.push(new $t(t,e)),1!==Ht.length||Mt||Lt(Ft)},$t.prototype.run=function(){this.fun.apply(null,this.array)},Dt.title="browser",Dt.browser=!0,Dt.env={},Dt.argv=[],Dt.version="",Dt.versions={},Dt.on=Bt,Dt.addListener=Bt,Dt.once=Bt,Dt.off=Bt,Dt.removeListener=Bt,Dt.removeAllListeners=Bt,Dt.emit=Bt,Dt.prependListener=Bt,Dt.prependOnceListener=Bt,Dt.listeners=function(t){return[]},Dt.binding=function(t){throw new Error("process.binding is not supported")},Dt.cwd=function(){return"/"},Dt.chdir=function(t){throw new Error("process.chdir is not supported")},Dt.umask=function(){return 0};var Xt={};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 Jt(t){return function(t){if(Array.isArray(t))return Gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vt(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(t){(function(){"use strict";function e(t){return(e="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 r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw s}}}}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(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 a(t){return(a="function"==typeof Symbol&&"symbol"==e(Symbol.iterator)?function(t){return e(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)})(t)}var u=kt.boolean,c=new Set(["config","log"]),f=["trace","debug","info","warn","error","fatal"],p={warning:"warn",err:"error"},h="https://api.cabinjs.com",y="`level` invalid, must be: ".concat(f.join(", "));function d(t){return null==t||"object"===a(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function O(t){return void 0===t}function j(t){return"object"===a(t)&&null!==t&&!Array.isArray(t)}function T(t){return"string"==typeof t}function E(t){return"function"==typeof t}var A=function(){function e(){var o=this,i=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,e),this.config=Object.assign({key:"",endpoint:h,headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||u(t.env.SHOW_STACK),showMeta:!t.env.SHOW_META||u(t.env.SHOW_META),silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!1,callback:!1,appInfo:!t.env.APP_INFO||u(t.env.APP_INFO)},i),this.appInfo=!!this.config.appInfo&&!!E(_)&&_(),this.log=this.log.bind(this);var s,a=n(Object.keys(this.config.logger).filter((function(t){return!c.has(t)})));try{for(a.s();!(s=a.n()).done;){var l=s.value;this[l]=this.config.logger[l]}}catch(m){a.e(m)}finally{a.f()}var p,y=n(f);try{var d=function(){var t=p.value;o[t]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return o.log.apply(o,r([t].concat([].slice.call(n))))}};for(y.s();!(p=y.n()).done;)d()}catch(m){y.e(m)}finally{y.f()}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 o,i;return o=e,(i=[{key:"setCallback",value:function(t){this.config.callback=t}},{key:"setLevel",value:function(t){if(!T(t)||!f.includes(t))throw new Error(y);T(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=f.slice(f.indexOf(t))}},{key:"getNormalizedLevel",value:function(t){return T(t)?T(p[t])?p[t]:f.includes(t)?t:"info":"info"}},{key:"setName",value:function(t){if(!T(t))throw new Error("`name` must be a String");T(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}},{key:"log",value:function(e,n,o){var i=this,s=[];O(e)||s.push(e),O(n)||s.push(n),O(o)||s.push(o);for(var a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];s=s.concat([].slice.call(u));var y=this.config,_=0;T(e)&&T(p[e])?e=p[e]:g(e)?(o=n,n=e,e="error"):T(e)&&f.includes(e)||(o=n,n=e,e=this.getNormalizedLevel(e),_=-1);var A,k=!1;if((j(n)||Array.isArray(n))&&T(o)){k=!0;var x=o;o=n,n=T(x)&&s.length>=3+_?m.apply(void 0,r(s.slice(2+_))):x}O(n)&&(n=e),1!==s.slice(1+_).length||T(n)||g(n)?!k&&s.length>=4+_?(n=m.apply(void 0,r(s.slice(1+_))),o={}):!k&&s.length===3+_&&T(n)&&b.filter((function(t){return n.includes(t)})).length>0?(n=m(n,o),o={}):g(n)||(g(o)?o={err:w(o)}:j(o)||O(o)||null===o?T(n)||(n=m(n)):(n=m(n,o),o={})):(o={message:n},n=e),O(o)||j(o)?j(o)||(o={}):o={meta:o},g(n)?(A=n,j(o.err)||(o.err=w(A)),n=n.message):g(o.err)&&(A=o.err);var C=E(y.callback)&&(!function(t){return"boolean"==typeof t}(o.callback)||o.callback);(o=v(o,["callback"])).level=e,this.appInfo&&(o.app=this.appInfo);var P=S({message:n,meta:o});if(y.capture&&y.levels.includes(e)&&(!g(A)||!A._captureFailed)){if(y.endpoint===h&&!y.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");var R=dt.post(y.endpoint).set("X-Request-Id",l()).timeout(y.timeout);t.browser||R.set("User-Agent","axe/".concat(Rt)),y.key&&R.auth(y.key),d(y.headers)||R.set(y.headers),R.type("application/json").send(P).retry(y.retry).end((function(t){t&&(t._captureFailed=!0,i.config.logger.error(t))}))}if(C&&y.callback(e,n,o),y.silent)return P;if(!y.levels.includes(e))return P;var D=e;-1===_?D="log":"fatal"===e&&(D="error");var N=v(o,["level","err"]);return"error"===D&&g(A)&&y.showStack?!y.showMeta||d(N)?this.config.logger.error(A):this.config.logger.error(A,N):!y.showMeta||d(N)?this.config.logger[D](n):this.config.logger[D](n,N),P}}])&&s(o.prototype,i),e}();Xt=A}).call(this)}).call(this,xt);var Wt=function(t){return null==t||"object"==Qt(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length},Kt=function(t){return null===t},Yt=function(t){return void 0===t},Zt=function(t){return"object"==Qt(t)&&null!==t&&!Array.isArray(t)},te=function(t){return"string"==typeof t},ee=function(t){return"function"==typeof t};return function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=Object.assign({key:"",capture:null,axe:{},logger:null,meta:{},parseRequest:{},errorProps:[],message:_},e),!Wt(this.config.axe)&&this.config.key&&(this.config.axe.key=this.config.key),Wt(this.config.axe)||"boolean"!=typeof this.config.capture||(this.config.axe.capture=this.config.capture),Wt(this.config.axe)?this.config.key||this.config.capture?this.config.logger=new Xt(Object.assign(this.config.key?{key:this.config.key}:{},this.config.capture?{capture:this.config.capture}:{})):Zt(this.config.logger)||(this.config.logger=new Xt):this.config.logger=new Xt(this.config.axe),this.logger=this.config.logger,this.parseArg=this.parseArg.bind(this),Object.keys(this.logger).filter((function(t){return ee(r.logger[t])})).forEach((function(t){r[t]=function(){for(var e,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];o[1]&&(o[1]=r.parseArg(o[1])),(e=r.logger)[t].apply(e,Jt([].slice.call(o)))}})),this.err=this.error,this.warning=this.warn,this.setMeta=this.setMeta.bind(this),this.setUser=this.setUser.bind(this),ee(_)&&(this.middleware=_.bind(this))}var e,r,n;return e=t,(r=[{key:"parseArg",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Zt(t)?(Object.assign(t,this.config.meta),t):(t=Yt(t)||Kt(t)?{}:g(t)?{err:w(t,this.config.errorProps)}:Array.isArray(t)||te(t)||"number"==typeof t?{value:t}:ee(t)?{value:t.toString()}:{},Object.assign(t,this.config.meta),t)}},{key:"setMeta",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.meta=t}},{key:"setUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config.meta.user=t}}])&&Vt(e.prototype,r),n&&Vt(e,n),t}()})); |
{ | ||
"name": "cabin", | ||
"description": "Cabin is the best JavaScript and Node.js logging service and logging npm package. Cabin is a drop-in replacement and the best alternative to Sentry, Timber, Airbrake, Papertrail, Loggly, Bugsnag, or <service>", | ||
"version": "9.0.3", | ||
"version": "9.0.4", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -30,3 +30,3 @@ "ava": { | ||
"ansi-colors": "^4.1.1", | ||
"axe": "^7.0.2", | ||
"axe": "^8.0.0", | ||
"clf-date": "^0.2.0", | ||
@@ -73,3 +73,3 @@ "iserror": "^0.0.2", | ||
"signale": "^1.4.0", | ||
"supertest": "^6.0.1", | ||
"supertest": "^6.1.0", | ||
"tinyify": "^3.0.0", | ||
@@ -76,0 +76,0 @@ "xo": "^0.37.1" |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10
308469
5538
+ Addedasap@2.0.6(transitive)
+ Addedaxe@8.1.2(transitive)
+ Addeddezalgo@1.0.4(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedformidable@2.1.2(transitive)
+ Addedhexoid@1.0.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedsuperagent@7.1.6(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedaxe@7.0.2(transitive)
- Removedform-data@3.0.2(transitive)
- Removedformidable@1.2.6(transitive)
- Removedsuperagent@6.1.0(transitive)
Updatedaxe@^8.0.0