// Module ID: 986 // Function ID: 987 // Name: _isFetchSupported // Dependencies: [821, 823, 824] // Module 986 (_isFetchSupported) import _mod821 from "module_821" /* 821 */; require = arg1; const dependencyMap = arg6; function _isFetchSupported() { if ("fetch" in _mod821.GLOBAL_OBJ) { try { const _Headers = Headers; const headers = new Headers(); const _Request = Request; const request = new Request("data:,"); const _Response = Response; const response = new Response(); return true; } catch (err) { return false; } } else { return false; } } function isNativeFunction(arg0) { let isMatch = arg0; if (arg0) { isMatch = /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(arg0.toString()); const obj = /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/; } return isMatch; } Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" }); arg5.isNativeFunction = isNativeFunction; arg5.supportsDOMError = function supportsDOMError() { try { const dOMError = new globalThis.DOMError(""); return true; } catch (err) { return false; } }; arg5.supportsDOMException = function supportsDOMException() { try { const dOMException = new globalThis.DOMException(""); return true; } catch (err) { return false; } }; arg5.supportsErrorEvent = function supportsErrorEvent() { try { const errorEvent = new globalThis.ErrorEvent(""); return true; } catch (err) { return false; } }; arg5.supportsFetch = _isFetchSupported; arg5.supportsHistory = function supportsHistory() { return "history" in _mod821.GLOBAL_OBJ && _mod821.GLOBAL_OBJ.history; }; arg5.supportsNativeFetch = function supportsNativeFetch() { if (typeof globalThis.EdgeRuntime === "string") { return true; } else if (_isFetchSupported()) { if (isNativeFunction(_mod821.GLOBAL_OBJ.fetch)) { return true; } else { let flag2 = false; const _document = tmp5(821).GLOBAL_OBJ.document; if (_document) { if (typeof _document.createElement === "function") { try { const element =