Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist/vendor
File: wp-polyfill-fetch.js
(function (global, factory) {
[0] Fix | Delete
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
[1] Fix | Delete
typeof define === 'function' && define.amd ? define(['exports'], factory) :
[2] Fix | Delete
(factory((global.WHATWGFetch = {})));
[3] Fix | Delete
}(this, (function (exports) { 'use strict';
[4] Fix | Delete
[5] Fix | Delete
/* eslint-disable no-prototype-builtins */
[6] Fix | Delete
var g =
[7] Fix | Delete
(typeof globalThis !== 'undefined' && globalThis) ||
[8] Fix | Delete
(typeof self !== 'undefined' && self) ||
[9] Fix | Delete
// eslint-disable-next-line no-undef
[10] Fix | Delete
(typeof global !== 'undefined' && global) ||
[11] Fix | Delete
{};
[12] Fix | Delete
[13] Fix | Delete
var support = {
[14] Fix | Delete
searchParams: 'URLSearchParams' in g,
[15] Fix | Delete
iterable: 'Symbol' in g && 'iterator' in Symbol,
[16] Fix | Delete
blob:
[17] Fix | Delete
'FileReader' in g &&
[18] Fix | Delete
'Blob' in g &&
[19] Fix | Delete
(function() {
[20] Fix | Delete
try {
[21] Fix | Delete
new Blob();
[22] Fix | Delete
return true
[23] Fix | Delete
} catch (e) {
[24] Fix | Delete
return false
[25] Fix | Delete
}
[26] Fix | Delete
})(),
[27] Fix | Delete
formData: 'FormData' in g,
[28] Fix | Delete
arrayBuffer: 'ArrayBuffer' in g
[29] Fix | Delete
};
[30] Fix | Delete
[31] Fix | Delete
function isDataView(obj) {
[32] Fix | Delete
return obj && DataView.prototype.isPrototypeOf(obj)
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
if (support.arrayBuffer) {
[36] Fix | Delete
var viewClasses = [
[37] Fix | Delete
'[object Int8Array]',
[38] Fix | Delete
'[object Uint8Array]',
[39] Fix | Delete
'[object Uint8ClampedArray]',
[40] Fix | Delete
'[object Int16Array]',
[41] Fix | Delete
'[object Uint16Array]',
[42] Fix | Delete
'[object Int32Array]',
[43] Fix | Delete
'[object Uint32Array]',
[44] Fix | Delete
'[object Float32Array]',
[45] Fix | Delete
'[object Float64Array]'
[46] Fix | Delete
];
[47] Fix | Delete
[48] Fix | Delete
var isArrayBufferView =
[49] Fix | Delete
ArrayBuffer.isView ||
[50] Fix | Delete
function(obj) {
[51] Fix | Delete
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
[52] Fix | Delete
};
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
function normalizeName(name) {
[56] Fix | Delete
if (typeof name !== 'string') {
[57] Fix | Delete
name = String(name);
[58] Fix | Delete
}
[59] Fix | Delete
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
[60] Fix | Delete
throw new TypeError('Invalid character in header field name: "' + name + '"')
[61] Fix | Delete
}
[62] Fix | Delete
return name.toLowerCase()
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
function normalizeValue(value) {
[66] Fix | Delete
if (typeof value !== 'string') {
[67] Fix | Delete
value = String(value);
[68] Fix | Delete
}
[69] Fix | Delete
return value
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
// Build a destructive iterator for the value list
[73] Fix | Delete
function iteratorFor(items) {
[74] Fix | Delete
var iterator = {
[75] Fix | Delete
next: function() {
[76] Fix | Delete
var value = items.shift();
[77] Fix | Delete
return {done: value === undefined, value: value}
[78] Fix | Delete
}
[79] Fix | Delete
};
[80] Fix | Delete
[81] Fix | Delete
if (support.iterable) {
[82] Fix | Delete
iterator[Symbol.iterator] = function() {
[83] Fix | Delete
return iterator
[84] Fix | Delete
};
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
return iterator
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
function Headers(headers) {
[91] Fix | Delete
this.map = {};
[92] Fix | Delete
[93] Fix | Delete
if (headers instanceof Headers) {
[94] Fix | Delete
headers.forEach(function(value, name) {
[95] Fix | Delete
this.append(name, value);
[96] Fix | Delete
}, this);
[97] Fix | Delete
} else if (Array.isArray(headers)) {
[98] Fix | Delete
headers.forEach(function(header) {
[99] Fix | Delete
if (header.length != 2) {
[100] Fix | Delete
throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
[101] Fix | Delete
}
[102] Fix | Delete
this.append(header[0], header[1]);
[103] Fix | Delete
}, this);
[104] Fix | Delete
} else if (headers) {
[105] Fix | Delete
Object.getOwnPropertyNames(headers).forEach(function(name) {
[106] Fix | Delete
this.append(name, headers[name]);
[107] Fix | Delete
}, this);
[108] Fix | Delete
}
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
Headers.prototype.append = function(name, value) {
[112] Fix | Delete
name = normalizeName(name);
[113] Fix | Delete
value = normalizeValue(value);
[114] Fix | Delete
var oldValue = this.map[name];
[115] Fix | Delete
this.map[name] = oldValue ? oldValue + ', ' + value : value;
[116] Fix | Delete
};
[117] Fix | Delete
[118] Fix | Delete
Headers.prototype['delete'] = function(name) {
[119] Fix | Delete
delete this.map[normalizeName(name)];
[120] Fix | Delete
};
[121] Fix | Delete
[122] Fix | Delete
Headers.prototype.get = function(name) {
[123] Fix | Delete
name = normalizeName(name);
[124] Fix | Delete
return this.has(name) ? this.map[name] : null
[125] Fix | Delete
};
[126] Fix | Delete
[127] Fix | Delete
Headers.prototype.has = function(name) {
[128] Fix | Delete
return this.map.hasOwnProperty(normalizeName(name))
[129] Fix | Delete
};
[130] Fix | Delete
[131] Fix | Delete
Headers.prototype.set = function(name, value) {
[132] Fix | Delete
this.map[normalizeName(name)] = normalizeValue(value);
[133] Fix | Delete
};
[134] Fix | Delete
[135] Fix | Delete
Headers.prototype.forEach = function(callback, thisArg) {
[136] Fix | Delete
for (var name in this.map) {
[137] Fix | Delete
if (this.map.hasOwnProperty(name)) {
[138] Fix | Delete
callback.call(thisArg, this.map[name], name, this);
[139] Fix | Delete
}
[140] Fix | Delete
}
[141] Fix | Delete
};
[142] Fix | Delete
[143] Fix | Delete
Headers.prototype.keys = function() {
[144] Fix | Delete
var items = [];
[145] Fix | Delete
this.forEach(function(value, name) {
[146] Fix | Delete
items.push(name);
[147] Fix | Delete
});
[148] Fix | Delete
return iteratorFor(items)
[149] Fix | Delete
};
[150] Fix | Delete
[151] Fix | Delete
Headers.prototype.values = function() {
[152] Fix | Delete
var items = [];
[153] Fix | Delete
this.forEach(function(value) {
[154] Fix | Delete
items.push(value);
[155] Fix | Delete
});
[156] Fix | Delete
return iteratorFor(items)
[157] Fix | Delete
};
[158] Fix | Delete
[159] Fix | Delete
Headers.prototype.entries = function() {
[160] Fix | Delete
var items = [];
[161] Fix | Delete
this.forEach(function(value, name) {
[162] Fix | Delete
items.push([name, value]);
[163] Fix | Delete
});
[164] Fix | Delete
return iteratorFor(items)
[165] Fix | Delete
};
[166] Fix | Delete
[167] Fix | Delete
if (support.iterable) {
[168] Fix | Delete
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
[169] Fix | Delete
}
[170] Fix | Delete
[171] Fix | Delete
function consumed(body) {
[172] Fix | Delete
if (body._noBody) return
[173] Fix | Delete
if (body.bodyUsed) {
[174] Fix | Delete
return Promise.reject(new TypeError('Already read'))
[175] Fix | Delete
}
[176] Fix | Delete
body.bodyUsed = true;
[177] Fix | Delete
}
[178] Fix | Delete
[179] Fix | Delete
function fileReaderReady(reader) {
[180] Fix | Delete
return new Promise(function(resolve, reject) {
[181] Fix | Delete
reader.onload = function() {
[182] Fix | Delete
resolve(reader.result);
[183] Fix | Delete
};
[184] Fix | Delete
reader.onerror = function() {
[185] Fix | Delete
reject(reader.error);
[186] Fix | Delete
};
[187] Fix | Delete
})
[188] Fix | Delete
}
[189] Fix | Delete
[190] Fix | Delete
function readBlobAsArrayBuffer(blob) {
[191] Fix | Delete
var reader = new FileReader();
[192] Fix | Delete
var promise = fileReaderReady(reader);
[193] Fix | Delete
reader.readAsArrayBuffer(blob);
[194] Fix | Delete
return promise
[195] Fix | Delete
}
[196] Fix | Delete
[197] Fix | Delete
function readBlobAsText(blob) {
[198] Fix | Delete
var reader = new FileReader();
[199] Fix | Delete
var promise = fileReaderReady(reader);
[200] Fix | Delete
var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
[201] Fix | Delete
var encoding = match ? match[1] : 'utf-8';
[202] Fix | Delete
reader.readAsText(blob, encoding);
[203] Fix | Delete
return promise
[204] Fix | Delete
}
[205] Fix | Delete
[206] Fix | Delete
function readArrayBufferAsText(buf) {
[207] Fix | Delete
var view = new Uint8Array(buf);
[208] Fix | Delete
var chars = new Array(view.length);
[209] Fix | Delete
[210] Fix | Delete
for (var i = 0; i < view.length; i++) {
[211] Fix | Delete
chars[i] = String.fromCharCode(view[i]);
[212] Fix | Delete
}
[213] Fix | Delete
return chars.join('')
[214] Fix | Delete
}
[215] Fix | Delete
[216] Fix | Delete
function bufferClone(buf) {
[217] Fix | Delete
if (buf.slice) {
[218] Fix | Delete
return buf.slice(0)
[219] Fix | Delete
} else {
[220] Fix | Delete
var view = new Uint8Array(buf.byteLength);
[221] Fix | Delete
view.set(new Uint8Array(buf));
[222] Fix | Delete
return view.buffer
[223] Fix | Delete
}
[224] Fix | Delete
}
[225] Fix | Delete
[226] Fix | Delete
function Body() {
[227] Fix | Delete
this.bodyUsed = false;
[228] Fix | Delete
[229] Fix | Delete
this._initBody = function(body) {
[230] Fix | Delete
/*
[231] Fix | Delete
fetch-mock wraps the Response object in an ES6 Proxy to
[232] Fix | Delete
provide useful test harness features such as flush. However, on
[233] Fix | Delete
ES5 browsers without fetch or Proxy support pollyfills must be used;
[234] Fix | Delete
the proxy-pollyfill is unable to proxy an attribute unless it exists
[235] Fix | Delete
on the object before the Proxy is created. This change ensures
[236] Fix | Delete
Response.bodyUsed exists on the instance, while maintaining the
[237] Fix | Delete
semantic of setting Request.bodyUsed in the constructor before
[238] Fix | Delete
_initBody is called.
[239] Fix | Delete
*/
[240] Fix | Delete
// eslint-disable-next-line no-self-assign
[241] Fix | Delete
this.bodyUsed = this.bodyUsed;
[242] Fix | Delete
this._bodyInit = body;
[243] Fix | Delete
if (!body) {
[244] Fix | Delete
this._noBody = true;
[245] Fix | Delete
this._bodyText = '';
[246] Fix | Delete
} else if (typeof body === 'string') {
[247] Fix | Delete
this._bodyText = body;
[248] Fix | Delete
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
[249] Fix | Delete
this._bodyBlob = body;
[250] Fix | Delete
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
[251] Fix | Delete
this._bodyFormData = body;
[252] Fix | Delete
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
[253] Fix | Delete
this._bodyText = body.toString();
[254] Fix | Delete
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
[255] Fix | Delete
this._bodyArrayBuffer = bufferClone(body.buffer);
[256] Fix | Delete
// IE 10-11 can't handle a DataView body.
[257] Fix | Delete
this._bodyInit = new Blob([this._bodyArrayBuffer]);
[258] Fix | Delete
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
[259] Fix | Delete
this._bodyArrayBuffer = bufferClone(body);
[260] Fix | Delete
} else {
[261] Fix | Delete
this._bodyText = body = Object.prototype.toString.call(body);
[262] Fix | Delete
}
[263] Fix | Delete
[264] Fix | Delete
if (!this.headers.get('content-type')) {
[265] Fix | Delete
if (typeof body === 'string') {
[266] Fix | Delete
this.headers.set('content-type', 'text/plain;charset=UTF-8');
[267] Fix | Delete
} else if (this._bodyBlob && this._bodyBlob.type) {
[268] Fix | Delete
this.headers.set('content-type', this._bodyBlob.type);
[269] Fix | Delete
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
[270] Fix | Delete
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
[271] Fix | Delete
}
[272] Fix | Delete
}
[273] Fix | Delete
};
[274] Fix | Delete
[275] Fix | Delete
if (support.blob) {
[276] Fix | Delete
this.blob = function() {
[277] Fix | Delete
var rejected = consumed(this);
[278] Fix | Delete
if (rejected) {
[279] Fix | Delete
return rejected
[280] Fix | Delete
}
[281] Fix | Delete
[282] Fix | Delete
if (this._bodyBlob) {
[283] Fix | Delete
return Promise.resolve(this._bodyBlob)
[284] Fix | Delete
} else if (this._bodyArrayBuffer) {
[285] Fix | Delete
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
[286] Fix | Delete
} else if (this._bodyFormData) {
[287] Fix | Delete
throw new Error('could not read FormData body as blob')
[288] Fix | Delete
} else {
[289] Fix | Delete
return Promise.resolve(new Blob([this._bodyText]))
[290] Fix | Delete
}
[291] Fix | Delete
};
[292] Fix | Delete
}
[293] Fix | Delete
[294] Fix | Delete
this.arrayBuffer = function() {
[295] Fix | Delete
if (this._bodyArrayBuffer) {
[296] Fix | Delete
var isConsumed = consumed(this);
[297] Fix | Delete
if (isConsumed) {
[298] Fix | Delete
return isConsumed
[299] Fix | Delete
} else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
[300] Fix | Delete
return Promise.resolve(
[301] Fix | Delete
this._bodyArrayBuffer.buffer.slice(
[302] Fix | Delete
this._bodyArrayBuffer.byteOffset,
[303] Fix | Delete
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
[304] Fix | Delete
)
[305] Fix | Delete
)
[306] Fix | Delete
} else {
[307] Fix | Delete
return Promise.resolve(this._bodyArrayBuffer)
[308] Fix | Delete
}
[309] Fix | Delete
} else if (support.blob) {
[310] Fix | Delete
return this.blob().then(readBlobAsArrayBuffer)
[311] Fix | Delete
} else {
[312] Fix | Delete
throw new Error('could not read as ArrayBuffer')
[313] Fix | Delete
}
[314] Fix | Delete
};
[315] Fix | Delete
[316] Fix | Delete
this.text = function() {
[317] Fix | Delete
var rejected = consumed(this);
[318] Fix | Delete
if (rejected) {
[319] Fix | Delete
return rejected
[320] Fix | Delete
}
[321] Fix | Delete
[322] Fix | Delete
if (this._bodyBlob) {
[323] Fix | Delete
return readBlobAsText(this._bodyBlob)
[324] Fix | Delete
} else if (this._bodyArrayBuffer) {
[325] Fix | Delete
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
[326] Fix | Delete
} else if (this._bodyFormData) {
[327] Fix | Delete
throw new Error('could not read FormData body as text')
[328] Fix | Delete
} else {
[329] Fix | Delete
return Promise.resolve(this._bodyText)
[330] Fix | Delete
}
[331] Fix | Delete
};
[332] Fix | Delete
[333] Fix | Delete
if (support.formData) {
[334] Fix | Delete
this.formData = function() {
[335] Fix | Delete
return this.text().then(decode)
[336] Fix | Delete
};
[337] Fix | Delete
}
[338] Fix | Delete
[339] Fix | Delete
this.json = function() {
[340] Fix | Delete
return this.text().then(JSON.parse)
[341] Fix | Delete
};
[342] Fix | Delete
[343] Fix | Delete
return this
[344] Fix | Delete
}
[345] Fix | Delete
[346] Fix | Delete
// HTTP methods whose capitalization should be normalized
[347] Fix | Delete
var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
[348] Fix | Delete
[349] Fix | Delete
function normalizeMethod(method) {
[350] Fix | Delete
var upcased = method.toUpperCase();
[351] Fix | Delete
return methods.indexOf(upcased) > -1 ? upcased : method
[352] Fix | Delete
}
[353] Fix | Delete
[354] Fix | Delete
function Request(input, options) {
[355] Fix | Delete
if (!(this instanceof Request)) {
[356] Fix | Delete
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
[357] Fix | Delete
}
[358] Fix | Delete
[359] Fix | Delete
options = options || {};
[360] Fix | Delete
var body = options.body;
[361] Fix | Delete
[362] Fix | Delete
if (input instanceof Request) {
[363] Fix | Delete
if (input.bodyUsed) {
[364] Fix | Delete
throw new TypeError('Already read')
[365] Fix | Delete
}
[366] Fix | Delete
this.url = input.url;
[367] Fix | Delete
this.credentials = input.credentials;
[368] Fix | Delete
if (!options.headers) {
[369] Fix | Delete
this.headers = new Headers(input.headers);
[370] Fix | Delete
}
[371] Fix | Delete
this.method = input.method;
[372] Fix | Delete
this.mode = input.mode;
[373] Fix | Delete
this.signal = input.signal;
[374] Fix | Delete
if (!body && input._bodyInit != null) {
[375] Fix | Delete
body = input._bodyInit;
[376] Fix | Delete
input.bodyUsed = true;
[377] Fix | Delete
}
[378] Fix | Delete
} else {
[379] Fix | Delete
this.url = String(input);
[380] Fix | Delete
}
[381] Fix | Delete
[382] Fix | Delete
this.credentials = options.credentials || this.credentials || 'same-origin';
[383] Fix | Delete
if (options.headers || !this.headers) {
[384] Fix | Delete
this.headers = new Headers(options.headers);
[385] Fix | Delete
}
[386] Fix | Delete
this.method = normalizeMethod(options.method || this.method || 'GET');
[387] Fix | Delete
this.mode = options.mode || this.mode || null;
[388] Fix | Delete
this.signal = options.signal || this.signal || (function () {
[389] Fix | Delete
if ('AbortController' in g) {
[390] Fix | Delete
var ctrl = new AbortController();
[391] Fix | Delete
return ctrl.signal;
[392] Fix | Delete
}
[393] Fix | Delete
}());
[394] Fix | Delete
this.referrer = null;
[395] Fix | Delete
[396] Fix | Delete
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
[397] Fix | Delete
throw new TypeError('Body not allowed for GET or HEAD requests')
[398] Fix | Delete
}
[399] Fix | Delete
this._initBody(body);
[400] Fix | Delete
[401] Fix | Delete
if (this.method === 'GET' || this.method === 'HEAD') {
[402] Fix | Delete
if (options.cache === 'no-store' || options.cache === 'no-cache') {
[403] Fix | Delete
// Search for a '_' parameter in the query string
[404] Fix | Delete
var reParamSearch = /([?&])_=[^&]*/;
[405] Fix | Delete
if (reParamSearch.test(this.url)) {
[406] Fix | Delete
// If it already exists then set the value with the current time
[407] Fix | Delete
this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
[408] Fix | Delete
} else {
[409] Fix | Delete
// Otherwise add a new '_' parameter to the end with the current time
[410] Fix | Delete
var reQueryString = /\?/;
[411] Fix | Delete
this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
[412] Fix | Delete
}
[413] Fix | Delete
}
[414] Fix | Delete
}
[415] Fix | Delete
}
[416] Fix | Delete
[417] Fix | Delete
Request.prototype.clone = function() {
[418] Fix | Delete
return new Request(this, {body: this._bodyInit})
[419] Fix | Delete
};
[420] Fix | Delete
[421] Fix | Delete
function decode(body) {
[422] Fix | Delete
var form = new FormData();
[423] Fix | Delete
body
[424] Fix | Delete
.trim()
[425] Fix | Delete
.split('&')
[426] Fix | Delete
.forEach(function(bytes) {
[427] Fix | Delete
if (bytes) {
[428] Fix | Delete
var split = bytes.split('=');
[429] Fix | Delete
var name = split.shift().replace(/\+/g, ' ');
[430] Fix | Delete
var value = split.join('=').replace(/\+/g, ' ');
[431] Fix | Delete
form.append(decodeURIComponent(name), decodeURIComponent(value));
[432] Fix | Delete
}
[433] Fix | Delete
});
[434] Fix | Delete
return form
[435] Fix | Delete
}
[436] Fix | Delete
[437] Fix | Delete
function parseHeaders(rawHeaders) {
[438] Fix | Delete
var headers = new Headers();
[439] Fix | Delete
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
[440] Fix | Delete
// https://tools.ietf.org/html/rfc7230#section-3.2
[441] Fix | Delete
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
[442] Fix | Delete
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
[443] Fix | Delete
// https://github.com/github/fetch/issues/748
[444] Fix | Delete
// https://github.com/zloirock/core-js/issues/751
[445] Fix | Delete
preProcessedHeaders
[446] Fix | Delete
.split('\r')
[447] Fix | Delete
.map(function(header) {
[448] Fix | Delete
return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
[449] Fix | Delete
})
[450] Fix | Delete
.forEach(function(line) {
[451] Fix | Delete
var parts = line.split(':');
[452] Fix | Delete
var key = parts.shift().trim();
[453] Fix | Delete
if (key) {
[454] Fix | Delete
var value = parts.join(':').trim();
[455] Fix | Delete
try {
[456] Fix | Delete
headers.append(key, value);
[457] Fix | Delete
} catch (error) {
[458] Fix | Delete
console.warn('Response ' + error.message);
[459] Fix | Delete
}
[460] Fix | Delete
}
[461] Fix | Delete
});
[462] Fix | Delete
return headers
[463] Fix | Delete
}
[464] Fix | Delete
[465] Fix | Delete
Body.call(Request.prototype);
[466] Fix | Delete
[467] Fix | Delete
function Response(bodyInit, options) {
[468] Fix | Delete
if (!(this instanceof Response)) {
[469] Fix | Delete
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
[470] Fix | Delete
}
[471] Fix | Delete
if (!options) {
[472] Fix | Delete
options = {};
[473] Fix | Delete
}
[474] Fix | Delete
[475] Fix | Delete
this.type = 'default';
[476] Fix | Delete
this.status = options.status === undefined ? 200 : options.status;
[477] Fix | Delete
if (this.status < 200 || this.status > 599) {
[478] Fix | Delete
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
[479] Fix | Delete
}
[480] Fix | Delete
this.ok = this.status >= 200 && this.status < 300;
[481] Fix | Delete
this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
[482] Fix | Delete
this.headers = new Headers(options.headers);
[483] Fix | Delete
this.url = options.url || '';
[484] Fix | Delete
this._initBody(bodyInit);
[485] Fix | Delete
}
[486] Fix | Delete
[487] Fix | Delete
Body.call(Response.prototype);
[488] Fix | Delete
[489] Fix | Delete
Response.prototype.clone = function() {
[490] Fix | Delete
return new Response(this._bodyInit, {
[491] Fix | Delete
status: this.status,
[492] Fix | Delete
statusText: this.statusText,
[493] Fix | Delete
headers: new Headers(this.headers),
[494] Fix | Delete
url: this.url
[495] Fix | Delete
})
[496] Fix | Delete
};
[497] Fix | Delete
[498] Fix | Delete
Response.error = function() {
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function