{"ast":null,"code":"// browser shim for xmlhttprequest module\nconst hasCORS = require(\"has-cors\");\n\nconst globalThis = require(\"./globalThis\");\n\nmodule.exports = function (opts) {\n  const xdomain = opts.xdomain; // scheme must be same when usign XDomainRequest\n  // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n  const xscheme = opts.xscheme; // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.\n  // https://github.com/Automattic/engine.io-client/pull/217\n\n  const enablesXDR = opts.enablesXDR; // XMLHttpRequest can be disabled on IE\n\n  try {\n    if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n      return new XMLHttpRequest();\n    }\n  } catch (e) {} // Use XDomainRequest for IE8 if enablesXDR is true\n  // because loading bar keeps flashing when using jsonp-polling\n  // https://github.com/yujiosaka/socke.io-ie8-loading-example\n\n\n  try {\n    if (\"undefined\" !== typeof XDomainRequest && !xscheme && enablesXDR) {\n      return new XDomainRequest();\n    }\n  } catch (e) {}\n\n  if (!xdomain) {\n    try {\n      return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n    } catch (e) {}\n  }\n};","map":{"version":3,"sources":["C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/engine.io-client/lib/xmlhttprequest.js"],"names":["hasCORS","require","globalThis","module","exports","opts","xdomain","xscheme","enablesXDR","XMLHttpRequest","e","XDomainRequest","concat","join"],"mappings":"AAAA;AAEA,MAAMA,OAAO,GAAGC,OAAO,CAAC,UAAD,CAAvB;;AACA,MAAMC,UAAU,GAAGD,OAAO,CAAC,cAAD,CAA1B;;AAEAE,MAAM,CAACC,OAAP,GAAiB,UAASC,IAAT,EAAe;AAC9B,QAAMC,OAAO,GAAGD,IAAI,CAACC,OAArB,CAD8B,CAG9B;AACA;;AACA,QAAMC,OAAO,GAAGF,IAAI,CAACE,OAArB,CAL8B,CAO9B;AACA;;AACA,QAAMC,UAAU,GAAGH,IAAI,CAACG,UAAxB,CAT8B,CAW9B;;AACA,MAAI;AACF,QAAI,gBAAgB,OAAOC,cAAvB,KAA0C,CAACH,OAAD,IAAYN,OAAtD,CAAJ,EAAoE;AAClE,aAAO,IAAIS,cAAJ,EAAP;AACD;AACF,GAJD,CAIE,OAAOC,CAAP,EAAU,CAAE,CAhBgB,CAkB9B;AACA;AACA;;;AACA,MAAI;AACF,QAAI,gBAAgB,OAAOC,cAAvB,IAAyC,CAACJ,OAA1C,IAAqDC,UAAzD,EAAqE;AACnE,aAAO,IAAIG,cAAJ,EAAP;AACD;AACF,GAJD,CAIE,OAAOD,CAAP,EAAU,CAAE;;AAEd,MAAI,CAACJ,OAAL,EAAc;AACZ,QAAI;AACF,aAAO,IAAIJ,UAAU,CAAC,CAAC,QAAD,EAAWU,MAAX,CAAkB,QAAlB,EAA4BC,IAA5B,CAAiC,GAAjC,CAAD,CAAd,CACL,mBADK,CAAP;AAGD,KAJD,CAIE,OAAOH,CAAP,EAAU,CAAE;AACf;AACF,CAlCD","sourcesContent":["// browser shim for xmlhttprequest module\n\nconst hasCORS = require(\"has-cors\");\nconst globalThis = require(\"./globalThis\");\n\nmodule.exports = function(opts) {\n  const xdomain = opts.xdomain;\n\n  // scheme must be same when usign XDomainRequest\n  // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n  const xscheme = opts.xscheme;\n\n  // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.\n  // https://github.com/Automattic/engine.io-client/pull/217\n  const enablesXDR = opts.enablesXDR;\n\n  // XMLHttpRequest can be disabled on IE\n  try {\n    if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n      return new XMLHttpRequest();\n    }\n  } catch (e) {}\n\n  // Use XDomainRequest for IE8 if enablesXDR is true\n  // because loading bar keeps flashing when using jsonp-polling\n  // https://github.com/yujiosaka/socke.io-ie8-loading-example\n  try {\n    if (\"undefined\" !== typeof XDomainRequest && !xscheme && enablesXDR) {\n      return new XDomainRequest();\n    }\n  } catch (e) {}\n\n  if (!xdomain) {\n    try {\n      return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\n        \"Microsoft.XMLHTTP\"\n      );\n    } catch (e) {}\n  }\n};\n"]},"metadata":{},"sourceType":"script"}