code-server
Version:
Run VS Code on a remote server.
1 lines • 424 kB
JavaScript
(()=>{var e={9669:(e,t,r)=>{e.exports=r(1609)},7970:(e,t,r)=>{"use strict";var n=r(4867),o=r(6026),i=r(4097),s=r(5327),a=r(8605),c=r(7211),u=r(938).http,l=r(938).https,p=r(8835),d=r(8761),h=r(696),f=r(5061),m=r(481),v=/https:?/;function g(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,g(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,r){var _=function(e){t(e)},y=function(e){r(e)},E=e.data,b=e.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+h.version,E&&!n.isStream(E)){if(Buffer.isBuffer(E));else if(n.isArrayBuffer(E))E=Buffer.from(new Uint8Array(E));else{if(!n.isString(E))return y(f("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));E=Buffer.from(E,"utf-8")}b["Content-Length"]=E.length}var T=void 0;e.auth&&(T=(e.auth.username||"")+":"+(e.auth.password||""));var S=i(e.baseURL,e.url),C=p.parse(S),A=C.protocol||"http:";if(!T&&C.auth){var O=C.auth.split(":");T=(O[0]||"")+":"+(O[1]||"")}T&&delete b.Authorization;var I=v.test(A),P=I?e.httpsAgent:e.httpAgent,w={path:s(C.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:b,agent:P,agents:{http:e.httpAgent,https:e.httpsAgent},auth:T};e.socketPath?w.socketPath=e.socketPath:(w.hostname=C.hostname,w.port=C.port);var R,x=e.proxy;if(!x&&!1!==x){var N=A.slice(0,-1)+"_proxy",D=process.env[N]||process.env[N.toUpperCase()];if(D){var M=p.parse(D),k=process.env.no_proxy||process.env.NO_PROXY,j=!0;if(k&&(j=!k.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e)}))),j&&(x={host:M.hostname,port:M.port,protocol:M.protocol},M.auth)){var L=M.auth.split(":");x.auth={username:L[0],password:L[1]}}}}x&&(w.headers.host=C.hostname+(C.port?":"+C.port:""),g(w,x,A+"//"+C.hostname+(C.port?":"+C.port:"")+w.path));var B=I&&(!x||v.test(x.protocol));e.transport?R=e.transport:0===e.maxRedirects?R=B?c:a:(e.maxRedirects&&(w.maxRedirects=e.maxRedirects),R=B?l:u),e.maxBodyLength>-1&&(w.maxBodyLength=e.maxBodyLength);var U=R.request(w,(function(t){if(!U.aborted){var r=t,i=t.req||U;if(204!==t.statusCode&&"HEAD"!==i.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(d.createUnzip()),delete t.headers["content-encoding"]}var s={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:i};if("stream"===e.responseType)s.data=r,o(_,y,s);else{var a=[],c=0;r.on("data",(function(t){a.push(t),c+=t.length,e.maxContentLength>-1&&c>e.maxContentLength&&(r.destroy(),y(f("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,i)))})),r.on("error",(function(t){U.aborted||y(m(t,e,null,i))})),r.on("end",(function(){var t=Buffer.concat(a);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=n.stripBOM(t))),s.data=t,o(_,y,s)}))}}}));if(U.on("error",(function(t){U.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||y(m(t,e,null,U))})),e.timeout){var F=parseInt(e.timeout,10);if(isNaN(F))return void y(f("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",U));U.setTimeout(F,(function(){U.abort(),y(f("timeout of "+F+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",U))}))}e.cancelToken&&e.cancelToken.promise.then((function(e){U.aborted||(U.abort(),y(e))})),n.isStream(E)?E.on("error",(function(t){y(m(t,e,null,U))})).pipe(U):U.end(E)}))}},5448:(e,t,r)=>{"use strict";var n=r(4867),o=r(6026),i=r(4372),s=r(5327),a=r(4097),c=r(4109),u=r(7985),l=r(5061);e.exports=function(e){return new Promise((function(t,r){var p=e.data,d=e.headers,h=e.responseType;n.isFormData(p)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+v)}var g=a(e.baseURL,e.url);function _(){if(f){var n="getAllResponseHeaders"in f?c(f.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};o(t,r,i),f=null}}if(f.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=_:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(_)},f.onabort=function(){f&&(r(l("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){r(l("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var y=(e.withCredentials||u(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}"setRequestHeader"in f&&n.forEach(d,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),h&&"json"!==h&&(f.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),r(e),f=null)})),p||(p=null),f.send(p)}))}},1609:(e,t,r)=>{"use strict";var n=r(4867),o=r(1849),i=r(321),s=r(7185);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var c=a(r(5655));c.Axios=i,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=r(5263),c.CancelToken=r(4972),c.isCancel=r(6502),c.all=function(e){return Promise.all(e)},c.spread=r(8713),c.isAxiosError=r(6268),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,r)=>{"use strict";var n=r(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(4867),o=r(5327),i=r(782),s=r(3572),a=r(7185),c=r(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var l=[s,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var p=e;r.length;){var d=r.shift(),h=r.shift();try{p=d(p)}catch(e){h(e);break}}try{o=s(p)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=l},782:(e,t,r)=>{"use strict";var n=r(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,r)=>{"use strict";var n=r(1793),o=r(7303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},5061:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},3572:(e,t,r)=>{"use strict";var n=r(4867),o=r(8527),i=r(6502),s=r(5655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function u(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=c(void 0,t[e]))})),n.forEach(i,u),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=c(e[n],t[n]):n in e&&(r[n]=c(void 0,e[n]))}));var l=o.concat(i).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(p,u),r}},6026:(e,t,r)=>{"use strict";var n=r(5061);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var n=r(4867),o=r(5655);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},5655:(e,t,r)=>{"use strict";var n=r(4867),o=r(6016),i=r(481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?c=r(5448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=r(7970)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(s)})),e.exports=u},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},5327:(e,t,r)=>{"use strict";var n=r(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4109:(e,t,r)=>{"use strict";var n=r(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,r)=>{"use strict";var n=r(696),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=n.version.split(".");function a(e,t){for(var r=t?t.split("."):s,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);function s(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(s(n," has been removed in "+t));return o&&!i[n]&&(i[n]=!0,console.warn(s(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],c=void 0===a||s(a,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},4867:(e,t,r)=>{"use strict";var n=r(1849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:c,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function r(r,n){c(t[n])&&c(r)?t[n]=e(t[n],r):c(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},696:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},2261:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(445)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},938:(e,t,r)=>{var n=r(8835),o=n.URL,i=r(8605),s=r(7211),a=r(2413).Writable,c=r(2357),u=r(2261),l=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);l.forEach((function(e){p[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var d=b("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),h=b("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),f=b("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),m=b("ERR_STREAM_WRITE_AFTER_END","write after end");function v(e,t){a.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function g(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(i){var s=i+":",a=r[s]=e[i],l=t[i]=Object.create(a);Object.defineProperties(l,{request:{value:function(e,i,a){if("string"==typeof e){var l=e;try{e=y(new o(l))}catch(t){e=n.parse(l)}}else o&&e instanceof o?e=y(e):(a=i,i=e,e={protocol:s});return"function"==typeof i&&(a=i,i=null),(i=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,i)).nativeProtocols=r,c.equal(i.protocol,s,"protocol mismatch"),u("options",i),new v(i,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=l.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function _(){}function y(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function E(e,t){var r;for(var n in t)e.test(n)&&(r=t[n].toString().trim(),delete t[n]);return r}function b(e,t){function r(e){Error.captureStackTrace(this,this.constructor),e?(this.message=t+": "+e.message,this.cause=e):this.message=t}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r.prototype.code=e,r}function T(e){for(var t=0;t<l.length;t++)e.removeListener(l[t],p[l[t]]);e.on("error",_),e.abort()}v.prototype=Object.create(a.prototype),v.prototype.abort=function(){T(this._currentRequest),this.emit("abort")},v.prototype.write=function(e,t,r){if(this._ending)throw new m;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new f),this.abort()):r&&r()},v.prototype.end=function(e,t,r){if("function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},v.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},v.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},v.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){v.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(v.prototype,e,{get:function(){return this._currentRequest[e]}})})),v.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},v.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=n.format(this._options),o._redirectable=this;for(var i=0;i<l.length;i++)o.on(l[i],p[l[i]]);if(this._isRedirect){var s=0,a=this,c=this._requestBodyBuffers;!function e(t){if(o===a._currentRequest)if(t)a.emit("error",t);else if(s<c.length){var r=c[s++];o.finished||o.write(r.data,r.encoding,e)}else a._ended&&o.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},v.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(r&&!1!==this._options.followRedirects&&t>=300&&t<400){if(T(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new h);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],E(/^content-/i,this._options.headers));var o,i=E(/^host$/i,this._options.headers),s=n.parse(this._currentUrl),a=i||s.host,c=/^\w+:/.test(r)?this._currentUrl:n.format(Object.assign(s,{host:a}));try{o=n.resolve(c,r)}catch(e){return void this.emit("error",new d(e))}u("redirecting to",o),this._isRedirect=!0;var l=n.parse(o);if(Object.assign(this._options,l),l.host===a||function(e,t){const r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(l.host,a)||E(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var p={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,p)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new d(e))}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=g({http:i,https:s}),e.exports.wrap=g},3574:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>X,Headers:()=>w,Request:()=>V,Response:()=>L,FetchError:()=>d});var n=r(2413),o=r(8605),i=r(8835),s=r(7211),a=r(8761);const c=n.Readable,u=Symbol("buffer"),l=Symbol("type");class p{constructor(){this[l]="";const e=arguments[0],t=arguments[1],r=[];let n=0;if(e){const t=e,o=Number(t.length);for(let e=0;e<o;e++){const o=t[e];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof p?o[u]:Buffer.from("string"==typeof o?o:String(o)),n+=i.length,r.push(i)}}this[u]=Buffer.concat(r);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[l]=o)}get size(){return this[u].length}get type(){return this[l]}text(){return Promise.resolve(this[u].toString())}arrayBuffer(){const e=this[u],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new c;return e._read=function(){},e.push(this[u]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],r=arguments[1];let n,o;n=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),o=void 0===r?e:r<0?Math.max(e+r,0):Math.min(r,e);const i=Math.max(o-n,0),s=this[u].slice(n,n+i),a=new p([],{type:arguments[2]});return a[u]=s,a}}function d(e,t,r){Error.call(this,e),this.message=e,this.type=t,r&&(this.code=this.errno=r.code),Error.captureStackTrace(this,this.constructor)}let h;Object.defineProperties(p.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.name="FetchError";try{h=require("encoding").convert}catch(e){}const f=Symbol("Body internals"),m=n.PassThrough;function v(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size;let i=void 0===o?0:o;var s=r.timeout;let a=void 0===s?0:s;null==e?e=null:_(e)?e=Buffer.from(e.toString()):y(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof n||(e=Buffer.from(String(e)))),this[f]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=a,e instanceof n&&e.on("error",(function(e){const r="AbortError"===e.name?e:new d(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[f].error=r}))}function g(){var e=this;if(this[f].disturbed)return v.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[f].disturbed=!0,this[f].error)return v.Promise.reject(this[f].error);let t=this.body;if(null===t)return v.Promise.resolve(Buffer.alloc(0));if(y(t)&&(t=t.stream()),Buffer.isBuffer(t))return v.Promise.resolve(t);if(!(t instanceof n))return v.Promise.resolve(Buffer.alloc(0));let r=[],o=0,i=!1;return new v.Promise((function(n,s){let a;e.timeout&&(a=setTimeout((function(){i=!0,s(new d(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,s(t)):s(new d(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&o+t.length>e.size)return i=!0,void s(new d(`content size at ${e.url} over limit: ${e.size}`,"max-size"));o+=t.length,r.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(a);try{n(Buffer.concat(r,o))}catch(t){s(new d(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function _(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function y(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function E(e){let t,r,o=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof n&&"function"!=typeof o.getBoundary&&(t=new m,r=new m,o.pipe(t),o.pipe(r),e[f].body=t,o=r),o}function b(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":_(e)?"application/x-www-form-urlencoded;charset=UTF-8":y(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof n?null:"text/plain;charset=UTF-8"}function T(e){const t=e.body;return null===t?0:y(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}v.prototype={get body(){return this[f].body},get bodyUsed(){return this[f].disturbed},arrayBuffer(){return g.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return g.call(this).then((function(t){return Object.assign(new p([],{type:e.toLowerCase()}),{[u]:t})}))},json(){var e=this;return g.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return v.Promise.reject(new d(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return g.call(this).then((function(e){return e.toString()}))},buffer(){return g.call(this)},textConverted(){var e=this;return g.call(this).then((function(t){return function(e,t){if("function"!=typeof h)throw new Error("The package `encoding` must be installed to use the textConverted() function");const r=t.get("content-type");let n,o,i="utf-8";return r&&(n=/charset=([^;]*)/i.exec(r)),o=e.slice(0,1024).toString(),!n&&o&&(n=/<meta.+?charset=(['"])(.+?)\1/i.exec(o)),!n&&o&&(n=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),n||(n=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),n&&n.pop()),n&&(n=/charset=(.*)/i.exec(n.pop()))),!n&&o&&(n=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o)),n&&(i=n.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030")),h(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(v.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),v.mixIn=function(e){for(const t of Object.getOwnPropertyNames(v.prototype))if(!(t in e)){const r=Object.getOwnPropertyDescriptor(v.prototype,t);Object.defineProperty(e,t,r)}},v.Promise=global.Promise;const S=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,C=/[^\t\x20-\x7e\x80-\xff]/;function A(e){if(e=`${e}`,S.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function O(e){if(e=`${e}`,C.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function I(e,t){t=t.toLowerCase();for(const r in e)if(r.toLowerCase()===t)return r}const P=Symbol("map");class w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[P]=Object.create(null),e instanceof w){const t=e.raw(),r=Object.keys(t);for(const e of r)for(const r of t[e])this.append(e,r)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const r=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");r.push(Array.from(t))}for(const e of r){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const r=e[t];this.append(t,r)}}}}get(e){A(e=`${e}`);const t=I(this[P],e);return void 0===t?null:this[P][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=R(this),n=0;for(;n<r.length;){var o=r[n];const i=o[0],s=o[1];e.call(t,s,i,this),r=R(this),n++}}set(e,t){t=`${t}`,A(e=`${e}`),O(t);const r=I(this[P],e);this[P][void 0!==r?r:e]=[t]}append(e,t){t=`${t}`,A(e=`${e}`),O(t);const r=I(this[P],e);void 0!==r?this[P][r].push(t):this[P][e]=[t]}has(e){return A(e=`${e}`),void 0!==I(this[P],e)}delete(e){A(e=`${e}`);const t=I(this[P],e);void 0!==t&&delete this[P][t]}raw(){return this[P]}keys(){return N(this,"key")}values(){return N(this,"value")}[Symbol.iterator](){return N(this,"key+value")}}function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const r=Object.keys(e[P]).sort();return r.map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[P][t].join(", ")}:function(t){return[t.toLowerCase(),e[P][t].join(", ")]})}w.prototype.entries=w.prototype[Symbol.iterator],Object.defineProperty(w.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(w.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const x=Symbol("internal");function N(e,t){const r=Object.create(D);return r[x]={target:e,kind:t,index:0},r}const D=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==D)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[x];const t=e.target,r=e.kind,n=e.index,o=R(t,r);return n>=o.length?{value:void 0,done:!0}:(this[x].index=n+1,{value:o[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function M(e){const t=Object.assign({__proto__:null},e[P]),r=I(e[P],"Host");return void 0!==r&&(t[r]=t[r][0]),t}Object.defineProperty(D,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const k=Symbol("Response internals"),j=o.STATUS_CODES;class L{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v.call(this,e,t);const r=t.status||200,n=new w(t.headers);if(null!=e&&!n.has("Content-Type")){const t=b(e);t&&n.append("Content-Type",t)}this[k]={url:t.url,status:r,statusText:t.statusText||j[r],headers:n,counter:t.counter}}get url(){return this[k].url||""}get status(){return this[k].status}get ok(){return this[k].status>=200&&this[k].status<300}get redirected(){return this[k].counter>0}get statusText(){return this[k].statusText}get headers(){return this[k].headers}clone(){return new L(E(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}v.mixIn(L.prototype),Object.defineProperties(L.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(L.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const B=Symbol("Request internals"),U=i.parse,F=i.format,H="destroy"in n.Readable.prototype;function q(e){return"object"==typeof e&&"object"==typeof e[B]}class V{constructor(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};q(e)?t=U(e.url):(t=e&&e.href?U(e.href):U(`${e}`),e={});let n=r.method||e.method||"GET";if(n=n.toUpperCase(),(null!=r.body||q(e)&&null!==e.body)&&("GET"===n||"HEAD"===n))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=r.body?r.body:q(e)&&null!==e.body?E(e):null;v.call(this,o,{timeout:r.timeout||e.timeout||0,size:r.size||e.size||0});const i=new w(r.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=b(o);e&&i.append("Content-Type",e)}let s=q(e)?e.signal:null;if("signal"in r&&(s=r.signal),null!=s&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[B]={method:n,redirect:r.redirect||e.redirect||"follow",headers:i,parsedURL:t,signal:s},this.follow=void 0!==r.follow?r.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==r.compress?r.compress:void 0===e.compress||e.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent}get method(){return this[B].method}get url(){return F(this[B].parsedURL)}get headers(){return this[B].headers}get redirect(){return this[B].redirect}get signal(){return this[B].signal}clone(){return new V(this)}}function G(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}v.mixIn(V.prototype),Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(V.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),G.prototype=Object.create(Error.prototype),G.prototype.constructor=G,G.prototype.name="AbortError";const $=n.PassThrough,z=i.resolve;function K(e,t){if(!K.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return v.Promise=K.Promise,new K.Promise((function(r,i){const c=new V(e,t),u=function(e){const t=e[B].parsedURL,r=new w(e[B].headers);if(r.has("Accept")||r.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof n.Readable&&!H)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let o=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(o="0"),null!=e.body){const t=T(e);"number"==typeof t&&(o=String(t))}o&&r.set("Content-Length",o),r.has("User-Agent")||r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),r.has("Connection")||i||r.set("Connection","close"),Object.assign({},t,{method:e.method,headers:M(r),agent:i})}(c),l=("https:"===u.protocol?s:o).request,p=c.signal;let h=null;const f=function(){let e=new G("The user aborted a request.");i(e),c.body&&c.body instanceof n.Readable&&c.body.destroy(e),h&&h.body&&h.body.emit("error",e)};if(p&&p.aborted)return void f();const m=function(){f(),_()},v=l(u);let g;function _(){v.abort(),p&&p.removeEventListener("abort",m),clearTimeout(g)}p&&p.addEventListener("abort",m),c.timeout&&v.once("socket",(function(e){g=setTimeout((function(){i(new d(`network timeout at: ${c.url}`,"request-timeout")),_()}),c.timeout)})),v.on("error",(function(e){i(new d(`request to ${c.url} failed, reason: ${e.message}`,"system",e)),_()})),v.on("response",(function(e){clearTimeout(g);const t=function(e){const t=new w;for(const r of Object.keys(e))if(!S.test(r))if(Array.isArray(e[r]))for(const n of e[r])C.test(n)||(void 0===t[P][r]?t[P][r]=[n]:t[P][r].push(n));else C.test(e[r])||(t[P][r]=[e[r]]);return t}(e.headers);if(K.isRedirect(e.statusCode)){const n=t.get("Location"),o=null===n?null:z(c.url,n);switch(c.redirect){case"error":return i(new d(`uri requested responds with a redirect, redirect mode is set to error: ${c.url}`,"no-redirect")),void _();case"manual":if(null!==o)try{t.set("Location",o)}catch(e){i(e)}break;case"follow":if(null===o)break;if(c.counter>=c.follow)return i(new d(`maximum redirect reached at: ${c.url}`,"max-redirect")),void _();const n={headers:new w(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,timeout:c.timeout,size:c.size};return 303!==e.statusCode&&c.body&&null===T(c)?(i(new d("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void _()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==c.method)||(n.method="GET",n.body=void 0,n.headers.delete("content-length")),r(K(new V(o,n))),void _())}}e.once("end",(function(){p&&p.removeEventListener("abort",m)}));let n=e.pipe(new $);const o={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:c.size,timeout:c.timeout,counter:c.counter},s=t.get("Content-Encoding");if(!c.compress||"HEAD"===c.method||null===s||204===e.statusCode||304===e.statusCode)return h=new L(n,o),void r(h);const u={flush:a.Z_SYNC_FLUSH,finishFlush:a.Z_SYNC_FLUSH};if("gzip"==s||"x-gzip"==s)return n=n.pipe(a.createGunzip(u)),h=new L(n,o),void r(h);if("deflate"!=s&&"x-deflate"!=s){if("br"==s&&"function"==typeof a.createBrotliDecompress)return n=n.pipe(a.createBrotliDecompress()),h=new L(n,o),void r(h);h=new L(n,o),r(h)}else e.pipe(new $).once("data",(function(e){n=8==(15&e[0])?n.pipe(a.createInflate()):n.pipe(a.createInflateRaw()),h=new L(n,o),r(h)}))})),function(e,t){const r=t.body;null===r?e.end():y(r)?r.stream().pipe(e):Buffer.isBuffer(r)?(e.write(r),e.end()):r.pipe(e)}(v,c)}))}K.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},K.Promise=global.Promise;const X=K},4802:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6363);t.ExperimentationService=n.ExperimentationService},6363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4067),o=r(4234),i=r(5975);class s extends i.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],null!=e.refetchInterval?e.refetchInterval:0,e.featuresTelemetryPropertyName,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new n.TasApiFeatureProvider(new o.AxiosHttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}}t.ExperimentationService=s,s.REFRESH_RATE_IN_MINUTES=30},5975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3663),o=r(3334);class i extends n.ExperimentationServiceBase{constructor(e,t,r,n,i,s,a,c){if(super(e,n,i,s,a,c),this.telemetry=e,this.filterProviders=t,this.refreshRateMs=r,this.featuresTelemetryPropertyName=n,this.assignmentContextTelemetryPropertyName=i,this.telemetryEventName=s,this.storageKey=a,this.storage=c,r<1e3&&0!==r)throw new Error("The minimum refresh rate for polling is 1000 ms (1 second). If you wish to deactivate this auto-polling use value of 0.");r>0&&(this.pollingService=new o.PollingService(r),this.pollingService.OnPollTick((async()=>{await super.getFeaturesAsync()})))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(e=!1){if(this.pollingService){this.pollingService.StopPolling();let t=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),t}return await super.getFeaturesAsync(e)}}t.ExperimentationServiceAutoPolling=i},3663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7002);t.ExperimentationServiceBase=class{constructor(e,t,r,o,i,s){this.telemetry=e,this.featuresTelemetryPropertyName=t,this.assignmentContextTelemetryPropertyName=r,this.telemetryEventName=o,this.storageKey=i,this.storage=s,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(s=new n.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise(((e,t)=>{this.resolveInitialFetchPromise=e}))}get features(){return this._features}set features(e){this._features=e,this.telemetry&&(this.telemetry.setSharedProperty(this.featuresTelemetryPropertyName,this.features.features.join(";")),this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext))}async getFeaturesAsync(e=!1){if(null!=this.fetchPromise){try{await this.fetchPromise}catch(e){}return this.features}if(!this.featureProviders||0===this.featureProviders.length)return Promise.resolve({features:[],assignmentContext:"",configs:[]});this.fetchPromise=Promise.all(this.featureProviders.map((async e=>await e.getFeatures())));try{const t=await this.fetchPromise;this.updateFeatures(t,e)}catch(e){}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,t=!1){let r={features:[],assignmentContext:"",configs:[]};for(let t of e){for(let e of t.features)r.features.includes(e)||r.features.push(e);for(let e of t.configs){const t=r.configs.find((t=>t.Id===e.Id));t?t.Parameters=Object.assign(Object.assign({},t.Parameters),e.Parameters):r.configs.push(e)}r.assignmentContext+=t.assignmentContext}!t&&this.featuresConsumed||(this.features=r),this.storage&&this.storage.setValue(this.storageKey,r)}async loadCache