!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?e(exports):"function"==typeofdefine&&define.amd?define(["exports"],e):e(t.WHATWGFetch={})}(this,(function(t){vare,r,o="undefined"!=typeofglobalThis&&globalThis||"undefined"!=typeofself&&self||"undefined"!=typeofglobal&&global||{},n="URLSearchParams"ino,i="Symbol"ino&&"iterator"inSymbol,s="FileReader"ino&&"Blob"ino&&function(){try{returnnewBlob,!0}catch(t){return!1}}(),a="FormData"ino,h="ArrayBuffer"ino;functionu(t){if("string"!=typeoft&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)thrownewTypeError('Invalid character in header field name: "'+t+'"');returnt.toLowerCase()}functionf(t){return"string"!=typeoft?String(t):t}functiond(t){vare={next:function(){vare=t.shift();return{done:void0===e,value:e}}};returni&&(e[Symbol.iterator]=function(){returne}),e}functionc(t){this.map={},tinstanceofc?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)thrownewTypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}functiony(t){if(!t._noBody)returnt.bodyUsed?Promise.reject(newTypeError("Already read")):void(t.bodyUsed=!0)}functionp(t){returnnewPromise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}functionl(t){vare=newFileReader,r=p(e);returne.readAsArrayBuffer(t),r}functionb(t){vare;returnt.slice?t.slice(0):((e=newUint8Array(t.byteLength)).set(newUint8Array(t)),e.buffer)}functionm(){returnthis.bodyUsed=!1,this._initBody=function(t){vare;this.bodyUsed=this.bodyUsed,(this._bodyInit=t)?"string"==typeoft?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():h&&s&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=newBlob([this._bodyArrayBuffer])):h&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeoft?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){vart=y(this);if(t)returnt;if(this._bodyBlob)returnPromise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)returnPromise.resolve(newBlob([this._bodyArrayBuffer]));if(this._bodyFormData)thrownewError("could not read FormData body as blob");returnPromise.resolve(newBlob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)returny(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(s)returnthis.blob().then(l);thrownewError("could not read as ArrayBuffer")},this.text=function(){vart,e,r,o=y(this);if(o)returno;if(this._bodyBlob)returno=this._bodyBlob,e=p(t=newFileReader),r=(r=/charset=([A-Za-z0-9_-]+)/.exec(o.type))?r[1]:"utf-8",t.readAsText(o,r),e;if(this._bodyArrayBuffer)returnPromise.resolve(function(t){for(vare=newUint8Array(t),r=newArray(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);returnr.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)thrownewError("could not read FormData body as text");returnPromise.resolve(this._bodyText)},a&&(this.formData=function(){returnthis.text().then(A)}),this.json=function(){returnthis.text().then(JSON.parse)},this}h&&(e=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[ob