!function(){"use strict";if(!self.fetch){i.prototype.append=function(t,e){t=n(t),e=s(e);var r=this.map[t];r||(r=[],this.map[t]=r),r.push(e)},i.prototype.delete=function(t){delete this.map[n(t)]},i.prototype.get=function(t){var e=this.map[n(t)];return e?e[0]:null},i.prototype.getAll=function(t){return this.map[n(t)]||[]},i.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},i.prototype.set=function(t,e){this.map[n(t)]=[s(e)]},i.prototype.forEach=function(t){var e=this;Object.getOwnPropertyNames(this.map).forEach((function(r){t(r,e.map[r])}))};var t="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),e="FormData"in self,r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"],o=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);u.call(d.prototype),u.call(l.prototype),self.Headers=i,self.Request=d,self.Response=l,self.fetch=function(e,r){var n;return n=d.prototype.isPrototypeOf(e)&&!r?e:new d(e,r),new fetch.Promise((function(e,r){var s=function(){return o&&!/^(get|post|head|put|delete|options)$/i.test(this.method)?(this.usingActiveXhr=!0,new ActiveXObject("Microsoft.XMLHTTP")):new XMLHttpRequest}();function i(){if(4===s.readyState){var t=1223===s.status?204:s.status;if(t<100||t>599)r(new TypeError("Network request failed"));else{var o={status:t,statusText:s.statusText,headers:c(s),url:"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0},n="response"in s?s.response:s.responseText;e(new l(n,o))}}}"cors"===n.credentials&&(s.withCredentials=!0),s.onreadystatechange=i,self.usingActiveXhr||(s.onload=i,s.onerror=function(){r(new TypeError("Network request failed"))}),s.open(n.method,n.url,!0),"responseType"in s&&t&&(s.responseType="blob"),n.headers.forEach((function(t,e){e.forEach((function(e){s.setRequestHeader(t,e)}))})),s.send(void 0===n._bodyInit?null:n._bodyInit)}))},fetch.Promise=self.Promise,self.fetch.polyfill=!0}function n(t){if("string"!=typeof t&&(t=t.toString()),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=t.toString()),t}function i(t){this.map={};var e=this;t instanceof i?t.forEach((function(t,r){r.forEach((function(r){e.append(t,r)}))})):t&&Object.getOwnPropertyNames(t).forEach((function(r){e.append(r,t[r])}))}function a(t){if(t.bodyUsed)return fetch.Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new fetch.Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function h(t){var e=new FileReader;return e.readAsArrayBuffer(t),f(e)}function u(){return this.bodyUsed=!1,this._initBody=function(r){if(this._bodyInit=r,"string"==typeof r)this._bodyText=r;else if(t&&Blob.prototype.isPrototypeOf(r))this._bodyBlob=r;else if(e&&FormData.prototype.isPrototypeOf(r))this._bodyFormData=r;else{if(r)throw new Error("unsupported BodyInit type");this._bodyText=""}},t?(this.blob=function(){var t=a(this);if(t)return t;if(this._bodyBlob)return fetch.Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return fetch.Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(h)},this.text=function(){var t,e,r=a(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,(e=new FileReader).readAsText(t),f(e);if(this._bodyFormData)throw new Error("could not read FormData body as text");return fetch.Promise.resolve(this._bodyText)}):this.text=function(){return a(this)||fetch.Promise.resolve(this._bodyText)},e&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then((function(t){return JSON.parse(t)}))},this}function d(t,e){var o,n;if(e=e||{},this.url=t,this.credentials=e.credentials||"omit",this.headers=new i(e.headers),this.method=(n=(o=e.method||"GET").toUpperCase(),r.indexOf(n)>-1?n:o),this.mode=e.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&e.body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(e.body)}function p(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function c(t){var e=new i;return t.getAllResponseHeaders().trim().split("\n").forEach((function(t){var r=t.trim().split(":"),o=r.shift().trim(),n=r.join(":").trim();e.append(o,n)})),e}function l(t,e){e||(e={}),this._initBody(t),this.type="default",this.url=null,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof i?e.headers:new i(e.headers),this.url=e.url||""}}();