event-source-polyfill.js.map 55.2 KB
{
  "version": 3,
  "sources": ["../../event-source-polyfill/src/eventsource.js"],
  "sourcesContent": ["/** @license\r\n * eventsource.js\r\n * Available under MIT License (MIT)\r\n * https://github.com/Yaffle/EventSource/\r\n */\r\n\r\n/*jslint indent: 2, vars: true, plusplus: true */\r\n/*global setTimeout, clearTimeout */\r\n\r\n(function (global) {\r\n  \"use strict\";\r\n\r\n  var setTimeout = global.setTimeout;\r\n  var clearTimeout = global.clearTimeout;\r\n  var XMLHttpRequest = global.XMLHttpRequest;\r\n  var XDomainRequest = global.XDomainRequest;\r\n  var ActiveXObject = global.ActiveXObject;\r\n  var NativeEventSource = global.EventSource;\r\n\r\n  var document = global.document;\r\n  var Promise = global.Promise;\r\n  var fetch = global.fetch;\r\n  var Response = global.Response;\r\n  var TextDecoder = global.TextDecoder;\r\n  var TextEncoder = global.TextEncoder;\r\n  var AbortController = global.AbortController;\r\n\r\n  if (typeof window !== \"undefined\" && typeof document !== \"undefined\" && !(\"readyState\" in document) && document.body == null) { // Firefox 2\r\n    document.readyState = \"loading\";\r\n    window.addEventListener(\"load\", function (event) {\r\n      document.readyState = \"complete\";\r\n    }, false);\r\n  }\r\n\r\n  if (XMLHttpRequest == null && ActiveXObject != null) { // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest_in_IE6\r\n    XMLHttpRequest = function () {\r\n      return new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n    };\r\n  }\r\n\r\n  if (Object.create == undefined) {\r\n    Object.create = function (C) {\r\n      function F(){}\r\n      F.prototype = C;\r\n      return new F();\r\n    };\r\n  }\r\n\r\n  if (!Date.now) {\r\n    Date.now = function now() {\r\n      return new Date().getTime();\r\n    };\r\n  }\r\n\r\n  // see #118 (Promise#finally with polyfilled Promise)\r\n  // see #123 (data URLs crash Edge)\r\n  // see #125 (CSP violations)\r\n  // see pull/#138\r\n  // => No way to polyfill Promise#finally\r\n\r\n  if (AbortController == undefined) {\r\n    var originalFetch2 = fetch;\r\n    fetch = function (url, options) {\r\n      var signal = options.signal;\r\n      return originalFetch2(url, {headers: options.headers, credentials: options.credentials, cache: options.cache}).then(function (response) {\r\n        var reader = response.body.getReader();\r\n        signal._reader = reader;\r\n        if (signal._aborted) {\r\n          signal._reader.cancel();\r\n        }\r\n        return {\r\n          status: response.status,\r\n          statusText: response.statusText,\r\n          headers: response.headers,\r\n          body: {\r\n            getReader: function () {\r\n              return reader;\r\n            }\r\n          }\r\n        };\r\n      });\r\n    };\r\n    AbortController = function () {\r\n      this.signal = {\r\n        _reader: null,\r\n        _aborted: false\r\n      };\r\n      this.abort = function () {\r\n        if (this.signal._reader != null) {\r\n          this.signal._reader.cancel();\r\n        }\r\n        this.signal._aborted = true;\r\n      };\r\n    };\r\n  }\r\n\r\n  function TextDecoderPolyfill() {\r\n    this.bitsNeeded = 0;\r\n    this.codePoint = 0;\r\n  }\r\n\r\n  TextDecoderPolyfill.prototype.decode = function (octets) {\r\n    function valid(codePoint, shift, octetsCount) {\r\n      if (octetsCount === 1) {\r\n        return codePoint >= 0x0080 >> shift && codePoint << shift <= 0x07FF;\r\n      }\r\n      if (octetsCount === 2) {\r\n        return codePoint >= 0x0800 >> shift && codePoint << shift <= 0xD7FF || codePoint >= 0xE000 >> shift && codePoint << shift <= 0xFFFF;\r\n      }\r\n      if (octetsCount === 3) {\r\n        return codePoint >= 0x010000 >> shift && codePoint << shift <= 0x10FFFF;\r\n      }\r\n      throw new Error();\r\n    }\r\n    function octetsCount(bitsNeeded, codePoint) {\r\n      if (bitsNeeded === 6 * 1) {\r\n        return codePoint >> 6 > 15 ? 3 : codePoint > 31 ? 2 : 1;\r\n      }\r\n      if (bitsNeeded === 6 * 2) {\r\n        return codePoint > 15 ? 3 : 2;\r\n      }\r\n      if (bitsNeeded === 6 * 3) {\r\n        return 3;\r\n      }\r\n      throw new Error();\r\n    }\r\n    var REPLACER = 0xFFFD;\r\n    var string = \"\";\r\n    var bitsNeeded = this.bitsNeeded;\r\n    var codePoint = this.codePoint;\r\n    for (var i = 0; i < octets.length; i += 1) {\r\n      var octet = octets[i];\r\n      if (bitsNeeded !== 0) {\r\n        if (octet < 128 || octet > 191 || !valid(codePoint << 6 | octet & 63, bitsNeeded - 6, octetsCount(bitsNeeded, codePoint))) {\r\n          bitsNeeded = 0;\r\n          codePoint = REPLACER;\r\n          string += String.fromCharCode(codePoint);\r\n        }\r\n      }\r\n      if (bitsNeeded === 0) {\r\n        if (octet >= 0 && octet <= 127) {\r\n          bitsNeeded = 0;\r\n          codePoint = octet;\r\n        } else if (octet >= 192 && octet <= 223) {\r\n          bitsNeeded = 6 * 1;\r\n          codePoint = octet & 31;\r\n        } else if (octet >= 224 && octet <= 239) {\r\n          bitsNeeded = 6 * 2;\r\n          codePoint = octet & 15;\r\n        } else if (octet >= 240 && octet <= 247) {\r\n          bitsNeeded = 6 * 3;\r\n          codePoint = octet & 7;\r\n        } else {\r\n          bitsNeeded = 0;\r\n          codePoint = REPLACER;\r\n        }\r\n        if (bitsNeeded !== 0 && !valid(codePoint, bitsNeeded, octetsCount(bitsNeeded, codePoint))) {\r\n          bitsNeeded = 0;\r\n          codePoint = REPLACER;\r\n        }\r\n      } else {\r\n        bitsNeeded -= 6;\r\n        codePoint = codePoint << 6 | octet & 63;\r\n      }\r\n      if (bitsNeeded === 0) {\r\n        if (codePoint <= 0xFFFF) {\r\n          string += String.fromCharCode(codePoint);\r\n        } else {\r\n          string += String.fromCharCode(0xD800 + (codePoint - 0xFFFF - 1 >> 10));\r\n          string += String.fromCharCode(0xDC00 + (codePoint - 0xFFFF - 1 & 0x3FF));\r\n        }\r\n      }\r\n    }\r\n    this.bitsNeeded = bitsNeeded;\r\n    this.codePoint = codePoint;\r\n    return string;\r\n  };\r\n\r\n  // Firefox < 38 throws an error with stream option\r\n  var supportsStreamOption = function () {\r\n    try {\r\n      return new TextDecoder().decode(new TextEncoder().encode(\"test\"), {stream: true}) === \"test\";\r\n    } catch (error) {\r\n      console.debug(\"TextDecoder does not support streaming option. Using polyfill instead: \" + error);\r\n    }\r\n    return false;\r\n  };\r\n\r\n  // IE, Edge\r\n  if (TextDecoder == undefined || TextEncoder == undefined || !supportsStreamOption()) {\r\n    TextDecoder = TextDecoderPolyfill;\r\n  }\r\n\r\n  var k = function () {\r\n  };\r\n\r\n  function XHRWrapper(xhr) {\r\n    this.withCredentials = false;\r\n    this.readyState = 0;\r\n    this.status = 0;\r\n    this.statusText = \"\";\r\n    this.responseText = \"\";\r\n    this.onprogress = k;\r\n    this.onload = k;\r\n    this.onerror = k;\r\n    this.onreadystatechange = k;\r\n    this._contentType = \"\";\r\n    this._xhr = xhr;\r\n    this._sendTimeout = 0;\r\n    this._abort = k;\r\n  }\r\n\r\n  XHRWrapper.prototype.open = function (method, url) {\r\n    this._abort(true);\r\n\r\n    var that = this;\r\n    var xhr = this._xhr;\r\n    var state = 1;\r\n    var timeout = 0;\r\n\r\n    this._abort = function (silent) {\r\n      if (that._sendTimeout !== 0) {\r\n        clearTimeout(that._sendTimeout);\r\n        that._sendTimeout = 0;\r\n      }\r\n      if (state === 1 || state === 2 || state === 3) {\r\n        state = 4;\r\n        xhr.onload = k;\r\n        xhr.onerror = k;\r\n        xhr.onabort = k;\r\n        xhr.onprogress = k;\r\n        xhr.onreadystatechange = k;\r\n        // IE 8 - 9: XDomainRequest#abort() does not fire any event\r\n        // Opera < 10: XMLHttpRequest#abort() does not fire any event\r\n        xhr.abort();\r\n        if (timeout !== 0) {\r\n          clearTimeout(timeout);\r\n          timeout = 0;\r\n        }\r\n        if (!silent) {\r\n          that.readyState = 4;\r\n          that.onabort(null);\r\n          that.onreadystatechange();\r\n        }\r\n      }\r\n      state = 0;\r\n    };\r\n\r\n    var onStart = function () {\r\n      if (state === 1) {\r\n        //state = 2;\r\n        var status = 0;\r\n        var statusText = \"\";\r\n        var contentType = undefined;\r\n        if (!(\"contentType\" in xhr)) {\r\n          try {\r\n            status = xhr.status;\r\n            statusText = xhr.statusText;\r\n            contentType = xhr.getResponseHeader(\"Content-Type\");\r\n          } catch (error) {\r\n            // IE < 10 throws exception for `xhr.status` when xhr.readyState === 2 || xhr.readyState === 3\r\n            // Opera < 11 throws exception for `xhr.status` when xhr.readyState === 2\r\n            // https://bugs.webkit.org/show_bug.cgi?id=29121\r\n            status = 0;\r\n            statusText = \"\";\r\n            contentType = undefined;\r\n            // Firefox < 14, Chrome ?, Safari ?\r\n            // https://bugs.webkit.org/show_bug.cgi?id=29658\r\n            // https://bugs.webkit.org/show_bug.cgi?id=77854\r\n          }\r\n        } else {\r\n          status = 200;\r\n          statusText = \"OK\";\r\n          contentType = xhr.contentType;\r\n        }\r\n        if (status !== 0) {\r\n          state = 2;\r\n          that.readyState = 2;\r\n          that.status = status;\r\n          that.statusText = statusText;\r\n          that._contentType = contentType;\r\n          that.onreadystatechange();\r\n        }\r\n      }\r\n    };\r\n    var onProgress = function () {\r\n      onStart();\r\n      if (state === 2 || state === 3) {\r\n        state = 3;\r\n        var responseText = \"\";\r\n        try {\r\n          responseText = xhr.responseText;\r\n        } catch (error) {\r\n          // IE 8 - 9 with XMLHttpRequest\r\n        }\r\n        that.readyState = 3;\r\n        that.responseText = responseText;\r\n        that.onprogress();\r\n      }\r\n    };\r\n    var onFinish = function (type, event) {\r\n      if (event == null || event.preventDefault == null) {\r\n        event = {\r\n          preventDefault: k\r\n        };\r\n      }\r\n      // Firefox 52 fires \"readystatechange\" (xhr.readyState === 4) without final \"readystatechange\" (xhr.readyState === 3)\r\n      // IE 8 fires \"onload\" without \"onprogress\"\r\n      onProgress();\r\n      if (state === 1 || state === 2 || state === 3) {\r\n        state = 4;\r\n        if (timeout !== 0) {\r\n          clearTimeout(timeout);\r\n          timeout = 0;\r\n        }\r\n        that.readyState = 4;\r\n        if (type === \"load\") {\r\n          that.onload(event);\r\n        } else if (type === \"error\") {\r\n          that.onerror(event);\r\n        } else if (type === \"abort\") {\r\n          that.onabort(event);\r\n        } else {\r\n          throw new TypeError();\r\n        }\r\n        that.onreadystatechange();\r\n      }\r\n    };\r\n    var onReadyStateChange = function (event) {\r\n      if (xhr != undefined) { // Opera 12\r\n        if (xhr.readyState === 4) {\r\n          if (!(\"onload\" in xhr) || !(\"onerror\" in xhr) || !(\"onabort\" in xhr)) {\r\n            onFinish(xhr.responseText === \"\" ? \"error\" : \"load\", event);\r\n          }\r\n        } else if (xhr.readyState === 3) {\r\n          if (!(\"onprogress\" in xhr)) { // testing XMLHttpRequest#responseText too many times is too slow in IE 11\r\n            // and in Firefox 3.6\r\n            onProgress();\r\n          }\r\n        } else if (xhr.readyState === 2) {\r\n          onStart();\r\n        }\r\n      }\r\n    };\r\n    var onTimeout = function () {\r\n      timeout = setTimeout(function () {\r\n        onTimeout();\r\n      }, 500);\r\n      if (xhr.readyState === 3) {\r\n        onProgress();\r\n      }\r\n    };\r\n\r\n    // XDomainRequest#abort removes onprogress, onerror, onload\r\n    if (\"onload\" in xhr) {\r\n      xhr.onload = function (event) {\r\n        onFinish(\"load\", event);\r\n      };\r\n    }\r\n    if (\"onerror\" in xhr) {\r\n      xhr.onerror = function (event) {\r\n        onFinish(\"error\", event);\r\n      };\r\n    }\r\n    // improper fix to match Firefox behaviour, but it is better than just ignore abort\r\n    // see https://bugzilla.mozilla.org/show_bug.cgi?id=768596\r\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=880200\r\n    // https://code.google.com/p/chromium/issues/detail?id=153570\r\n    // IE 8 fires \"onload\" without \"onprogress\r\n    if (\"onabort\" in xhr) {\r\n      xhr.onabort = function (event) {\r\n        onFinish(\"abort\", event);\r\n      };\r\n    }\r\n\r\n    if (\"onprogress\" in xhr) {\r\n      xhr.onprogress = onProgress;\r\n    }\r\n\r\n    // IE 8 - 9 (XMLHTTPRequest)\r\n    // Opera < 12\r\n    // Firefox < 3.5\r\n    // Firefox 3.5 - 3.6 - ? < 9.0\r\n    // onprogress is not fired sometimes or delayed\r\n    // see also #64 (significant lag in IE 11)\r\n    if (\"onreadystatechange\" in xhr) {\r\n      xhr.onreadystatechange = function (event) {\r\n        onReadyStateChange(event);\r\n      };\r\n    }\r\n\r\n    if (\"contentType\" in xhr || !(\"ontimeout\" in XMLHttpRequest.prototype)) {\r\n      url += (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + \"padding=true\";\r\n    }\r\n    xhr.open(method, url, true);\r\n\r\n    if (\"readyState\" in xhr) {\r\n      // workaround for Opera 12 issue with \"progress\" events\r\n      // #91 (XMLHttpRequest onprogress not fired for streaming response in Edge 14-15-?)\r\n      timeout = setTimeout(function () {\r\n        onTimeout();\r\n      }, 0);\r\n    }\r\n  };\r\n  XHRWrapper.prototype.abort = function () {\r\n    this._abort(false);\r\n  };\r\n  XHRWrapper.prototype.getResponseHeader = function (name) {\r\n    return this._contentType;\r\n  };\r\n  XHRWrapper.prototype.setRequestHeader = function (name, value) {\r\n    var xhr = this._xhr;\r\n    if (\"setRequestHeader\" in xhr) {\r\n      xhr.setRequestHeader(name, value);\r\n    }\r\n  };\r\n  XHRWrapper.prototype.getAllResponseHeaders = function () {\r\n    // XMLHttpRequest#getAllResponseHeaders returns null for CORS requests in Firefox 3.6.28\r\n    return this._xhr.getAllResponseHeaders != undefined ? this._xhr.getAllResponseHeaders() || \"\" : \"\";\r\n  };\r\n  XHRWrapper.prototype.send = function () {\r\n    // loading indicator in Safari < ? (6), Chrome < 14, Firefox\r\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=736723\r\n    if ((!(\"ontimeout\" in XMLHttpRequest.prototype) || (!(\"sendAsBinary\" in XMLHttpRequest.prototype) && !(\"mozAnon\" in XMLHttpRequest.prototype))) &&\r\n        document != undefined &&\r\n        document.readyState != undefined &&\r\n        document.readyState !== \"complete\") {\r\n      var that = this;\r\n      that._sendTimeout = setTimeout(function () {\r\n        that._sendTimeout = 0;\r\n        that.send();\r\n      }, 4);\r\n      return;\r\n    }\r\n\r\n    var xhr = this._xhr;\r\n    // withCredentials should be set after \"open\" for Safari and Chrome (< 19 ?)\r\n    if (\"withCredentials\" in xhr) {\r\n      xhr.withCredentials = this.withCredentials;\r\n    }\r\n    try {\r\n      // xhr.send(); throws \"Not enough arguments\" in Firefox 3.0\r\n      xhr.send(undefined);\r\n    } catch (error1) {\r\n      // Safari 5.1.7, Opera 12\r\n      throw error1;\r\n    }\r\n  };\r\n\r\n  function toLowerCase(name) {\r\n    return name.replace(/[A-Z]/g, function (c) {\r\n      return String.fromCharCode(c.charCodeAt(0) + 0x20);\r\n    });\r\n  }\r\n\r\n  function HeadersPolyfill(all) {\r\n    // Get headers: implemented according to mozilla's example code: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders#Example\r\n    var map = Object.create(null);\r\n    var array = all.split(\"\\r\\n\");\r\n    for (var i = 0; i < array.length; i += 1) {\r\n      var line = array[i];\r\n      var parts = line.split(\": \");\r\n      var name = parts.shift();\r\n      var value = parts.join(\": \");\r\n      map[toLowerCase(name)] = value;\r\n    }\r\n    this._map = map;\r\n  }\r\n  HeadersPolyfill.prototype.get = function (name) {\r\n    return this._map[toLowerCase(name)];\r\n  };\r\n\r\n  if (XMLHttpRequest != null && XMLHttpRequest.HEADERS_RECEIVED == null) { // IE < 9, Firefox 3.6\r\n    XMLHttpRequest.HEADERS_RECEIVED = 2;\r\n  }\r\n\r\n  function XHRTransport() {\r\n  }\r\n\r\n  XHRTransport.prototype.open = function (xhr, onStartCallback, onProgressCallback, onFinishCallback, url, withCredentials, headers) {\r\n    xhr.open(\"GET\", url);\r\n    var offset = 0;\r\n    xhr.onprogress = function () {\r\n      var responseText = xhr.responseText;\r\n      var chunk = responseText.slice(offset);\r\n      offset += chunk.length;\r\n      onProgressCallback(chunk);\r\n    };\r\n    xhr.onerror = function (event) {\r\n      event.preventDefault();\r\n      onFinishCallback(new Error(\"NetworkError\"));\r\n    };\r\n    xhr.onload = function () {\r\n      onFinishCallback(null);\r\n    };\r\n    xhr.onabort = function () {\r\n      onFinishCallback(null);\r\n    };\r\n    xhr.onreadystatechange = function () {\r\n      if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {\r\n        var status = xhr.status;\r\n        var statusText = xhr.statusText;\r\n        var contentType = xhr.getResponseHeader(\"Content-Type\");\r\n        var headers = xhr.getAllResponseHeaders();\r\n        onStartCallback(status, statusText, contentType, new HeadersPolyfill(headers));\r\n      }\r\n    };\r\n    xhr.withCredentials = withCredentials;\r\n    for (var name in headers) {\r\n      if (Object.prototype.hasOwnProperty.call(headers, name)) {\r\n        xhr.setRequestHeader(name, headers[name]);\r\n      }\r\n    }\r\n    xhr.send();\r\n    return xhr;\r\n  };\r\n\r\n  function HeadersWrapper(headers) {\r\n    this._headers = headers;\r\n  }\r\n  HeadersWrapper.prototype.get = function (name) {\r\n    return this._headers.get(name);\r\n  };\r\n\r\n  function FetchTransport() {\r\n  }\r\n\r\n  FetchTransport.prototype.open = function (xhr, onStartCallback, onProgressCallback, onFinishCallback, url, withCredentials, headers) {\r\n    var reader = null;\r\n    var controller = new AbortController();\r\n    var signal = controller.signal;\r\n    var textDecoder = new TextDecoder();\r\n    fetch(url, {\r\n      headers: headers,\r\n      credentials: withCredentials ? \"include\" : \"same-origin\",\r\n      signal: signal,\r\n      cache: \"no-store\"\r\n    }).then(function (response) {\r\n      reader = response.body.getReader();\r\n      onStartCallback(response.status, response.statusText, response.headers.get(\"Content-Type\"), new HeadersWrapper(response.headers));\r\n      // see https://github.com/promises-aplus/promises-spec/issues/179\r\n      return new Promise(function (resolve, reject) {\r\n        var readNextChunk = function () {\r\n          reader.read().then(function (result) {\r\n            if (result.done) {\r\n              //Note: bytes in textDecoder are ignored\r\n              resolve(undefined);\r\n            } else {\r\n              var chunk = textDecoder.decode(result.value, {stream: true});\r\n              onProgressCallback(chunk);\r\n              readNextChunk();\r\n            }\r\n          })[\"catch\"](function (error) {\r\n            reject(error);\r\n          });\r\n        };\r\n        readNextChunk();\r\n      });\r\n    })[\"catch\"](function (error) {\r\n      if (error.name === \"AbortError\") {\r\n        return undefined;\r\n      } else {\r\n        return error;\r\n      }\r\n    }).then(function (error) {\r\n      onFinishCallback(error);\r\n    });\r\n    return {\r\n      abort: function () {\r\n        if (reader != null) {\r\n          reader.cancel(); // https://bugzilla.mozilla.org/show_bug.cgi?id=1583815\r\n        }\r\n        controller.abort();\r\n      }\r\n    };\r\n  };\r\n\r\n  function EventTarget() {\r\n    this._listeners = Object.create(null);\r\n  }\r\n\r\n  function throwError(e) {\r\n    setTimeout(function () {\r\n      throw e;\r\n    }, 0);\r\n  }\r\n\r\n  EventTarget.prototype.dispatchEvent = function (event) {\r\n    event.target = this;\r\n    var typeListeners = this._listeners[event.type];\r\n    if (typeListeners != undefined) {\r\n      var length = typeListeners.length;\r\n      for (var i = 0; i < length; i += 1) {\r\n        var listener = typeListeners[i];\r\n        try {\r\n          if (typeof listener.handleEvent === \"function\") {\r\n            listener.handleEvent(event);\r\n          } else {\r\n            listener.call(this, event);\r\n          }\r\n        } catch (e) {\r\n          throwError(e);\r\n        }\r\n      }\r\n    }\r\n  };\r\n  EventTarget.prototype.addEventListener = function (type, listener) {\r\n    type = String(type);\r\n    var listeners = this._listeners;\r\n    var typeListeners = listeners[type];\r\n    if (typeListeners == undefined) {\r\n      typeListeners = [];\r\n      listeners[type] = typeListeners;\r\n    }\r\n    var found = false;\r\n    for (var i = 0; i < typeListeners.length; i += 1) {\r\n      if (typeListeners[i] === listener) {\r\n        found = true;\r\n      }\r\n    }\r\n    if (!found) {\r\n      typeListeners.push(listener);\r\n    }\r\n  };\r\n  EventTarget.prototype.removeEventListener = function (type, listener) {\r\n    type = String(type);\r\n    var listeners = this._listeners;\r\n    var typeListeners = listeners[type];\r\n    if (typeListeners != undefined) {\r\n      var filtered = [];\r\n      for (var i = 0; i < typeListeners.length; i += 1) {\r\n        if (typeListeners[i] !== listener) {\r\n          filtered.push(typeListeners[i]);\r\n        }\r\n      }\r\n      if (filtered.length === 0) {\r\n        delete listeners[type];\r\n      } else {\r\n        listeners[type] = filtered;\r\n      }\r\n    }\r\n  };\r\n\r\n  function Event(type) {\r\n    this.type = type;\r\n    this.target = undefined;\r\n  }\r\n\r\n  function MessageEvent(type, options) {\r\n    Event.call(this, type);\r\n    this.data = options.data;\r\n    this.lastEventId = options.lastEventId;\r\n  }\r\n\r\n  MessageEvent.prototype = Object.create(Event.prototype);\r\n\r\n  function ConnectionEvent(type, options) {\r\n    Event.call(this, type);\r\n    this.status = options.status;\r\n    this.statusText = options.statusText;\r\n    this.headers = options.headers;\r\n  }\r\n\r\n  ConnectionEvent.prototype = Object.create(Event.prototype);\r\n\r\n  function ErrorEvent(type, options) {\r\n    Event.call(this, type);\r\n    this.error = options.error;\r\n  }\r\n\r\n  ErrorEvent.prototype = Object.create(Event.prototype);\r\n\r\n  var WAITING = -1;\r\n  var CONNECTING = 0;\r\n  var OPEN = 1;\r\n  var CLOSED = 2;\r\n\r\n  var AFTER_CR = -1;\r\n  var FIELD_START = 0;\r\n  var FIELD = 1;\r\n  var VALUE_START = 2;\r\n  var VALUE = 3;\r\n\r\n  var contentTypeRegExp = /^text\\/event\\-stream(;.*)?$/i;\r\n\r\n  var MINIMUM_DURATION = 1000;\r\n  var MAXIMUM_DURATION = 18000000;\r\n\r\n  var parseDuration = function (value, def) {\r\n    var n = value == null ? def : parseInt(value, 10);\r\n    if (n !== n) {\r\n      n = def;\r\n    }\r\n    return clampDuration(n);\r\n  };\r\n  var clampDuration = function (n) {\r\n    return Math.min(Math.max(n, MINIMUM_DURATION), MAXIMUM_DURATION);\r\n  };\r\n\r\n  var fire = function (that, f, event) {\r\n    try {\r\n      if (typeof f === \"function\") {\r\n        f.call(that, event);\r\n      }\r\n    } catch (e) {\r\n      throwError(e);\r\n    }\r\n  };\r\n\r\n  function EventSourcePolyfill(url, options) {\r\n    EventTarget.call(this);\r\n    options = options || {};\r\n\r\n    this.onopen = undefined;\r\n    this.onmessage = undefined;\r\n    this.onerror = undefined;\r\n\r\n    this.url = undefined;\r\n    this.readyState = undefined;\r\n    this.withCredentials = undefined;\r\n    this.headers = undefined;\r\n\r\n    this._close = undefined;\r\n\r\n    start(this, url, options);\r\n  }\r\n\r\n  function getBestXHRTransport() {\r\n    return (XMLHttpRequest != undefined && (\"withCredentials\" in XMLHttpRequest.prototype)) || XDomainRequest == undefined\r\n        ? new XMLHttpRequest()\r\n        : new XDomainRequest();\r\n  }\r\n\r\n  var isFetchSupported = fetch != undefined && Response != undefined && \"body\" in Response.prototype;\r\n\r\n  function start(es, url, options) {\r\n    url = String(url);\r\n    var withCredentials = Boolean(options.withCredentials);\r\n    var lastEventIdQueryParameterName = options.lastEventIdQueryParameterName || \"lastEventId\";\r\n\r\n    var initialRetry = clampDuration(1000);\r\n    var heartbeatTimeout = parseDuration(options.heartbeatTimeout, 45000);\r\n\r\n    var lastEventId = \"\";\r\n    var retry = initialRetry;\r\n    var wasActivity = false;\r\n    var textLength = 0;\r\n    var headers = options.headers || {};\r\n    var TransportOption = options.Transport;\r\n    var xhr = isFetchSupported && TransportOption == undefined ? undefined : new XHRWrapper(TransportOption != undefined ? new TransportOption() : getBestXHRTransport());\r\n    var transport = TransportOption != null && typeof TransportOption !== \"string\" ? new TransportOption() : (xhr == undefined ? new FetchTransport() : new XHRTransport());\r\n    var abortController = undefined;\r\n    var timeout = 0;\r\n    var currentState = WAITING;\r\n    var dataBuffer = \"\";\r\n    var lastEventIdBuffer = \"\";\r\n    var eventTypeBuffer = \"\";\r\n\r\n    var textBuffer = \"\";\r\n    var state = FIELD_START;\r\n    var fieldStart = 0;\r\n    var valueStart = 0;\r\n\r\n    var onStart = function (status, statusText, contentType, headers) {\r\n      if (currentState === CONNECTING) {\r\n        if (status === 200 && contentType != undefined && contentTypeRegExp.test(contentType)) {\r\n          currentState = OPEN;\r\n          wasActivity = Date.now();\r\n          retry = initialRetry;\r\n          es.readyState = OPEN;\r\n          var event = new ConnectionEvent(\"open\", {\r\n            status: status,\r\n            statusText: statusText,\r\n            headers: headers\r\n          });\r\n          es.dispatchEvent(event);\r\n          fire(es, es.onopen, event);\r\n        } else {\r\n          var message = \"\";\r\n          if (status !== 200) {\r\n            if (statusText) {\r\n              statusText = statusText.replace(/\\s+/g, \" \");\r\n            }\r\n            message = \"EventSource's response has a status \" + status + \" \" + statusText + \" that is not 200. Aborting the connection.\";\r\n          } else {\r\n            message = \"EventSource's response has a Content-Type specifying an unsupported type: \" + (contentType == undefined ? \"-\" : contentType.replace(/\\s+/g, \" \")) + \". Aborting the connection.\";\r\n          }\r\n          close();\r\n          var event = new ConnectionEvent(\"error\", {\r\n            status: status,\r\n            statusText: statusText,\r\n            headers: headers\r\n          });\r\n          es.dispatchEvent(event);\r\n          fire(es, es.onerror, event);\r\n          console.error(message);\r\n        }\r\n      }\r\n    };\r\n\r\n    var onProgress = function (textChunk) {\r\n      if (currentState === OPEN) {\r\n        var n = -1;\r\n        for (var i = 0; i < textChunk.length; i += 1) {\r\n          var c = textChunk.charCodeAt(i);\r\n          if (c === \"\\n\".charCodeAt(0) || c === \"\\r\".charCodeAt(0)) {\r\n            n = i;\r\n          }\r\n        }\r\n        var chunk = (n !== -1 ? textBuffer : \"\") + textChunk.slice(0, n + 1);\r\n        textBuffer = (n === -1 ? textBuffer : \"\") + textChunk.slice(n + 1);\r\n        if (textChunk !== \"\") {\r\n          wasActivity = Date.now();\r\n          textLength += textChunk.length;\r\n        }\r\n        for (var position = 0; position < chunk.length; position += 1) {\r\n          var c = chunk.charCodeAt(position);\r\n          if (state === AFTER_CR && c === \"\\n\".charCodeAt(0)) {\r\n            state = FIELD_START;\r\n          } else {\r\n            if (state === AFTER_CR) {\r\n              state = FIELD_START;\r\n            }\r\n            if (c === \"\\r\".charCodeAt(0) || c === \"\\n\".charCodeAt(0)) {\r\n              if (state !== FIELD_START) {\r\n                if (state === FIELD) {\r\n                  valueStart = position + 1;\r\n                }\r\n                var field = chunk.slice(fieldStart, valueStart - 1);\r\n                var value = chunk.slice(valueStart + (valueStart < position && chunk.charCodeAt(valueStart) === \" \".charCodeAt(0) ? 1 : 0), position);\r\n                if (field === \"data\") {\r\n                  dataBuffer += \"\\n\";\r\n                  dataBuffer += value;\r\n                } else if (field === \"id\") {\r\n                  lastEventIdBuffer = value;\r\n                } else if (field === \"event\") {\r\n                  eventTypeBuffer = value;\r\n                } else if (field === \"retry\") {\r\n                  initialRetry = parseDuration(value, initialRetry);\r\n                  retry = initialRetry;\r\n                } else if (field === \"heartbeatTimeout\") {\r\n                  heartbeatTimeout = parseDuration(value, heartbeatTimeout);\r\n                  if (timeout !== 0) {\r\n                    clearTimeout(timeout);\r\n                    timeout = setTimeout(function () {\r\n                      onTimeout();\r\n                    }, heartbeatTimeout);\r\n                  }\r\n                }\r\n              }\r\n              if (state === FIELD_START) {\r\n                if (dataBuffer !== \"\") {\r\n                  lastEventId = lastEventIdBuffer;\r\n                  if (eventTypeBuffer === \"\") {\r\n                    eventTypeBuffer = \"message\";\r\n                  }\r\n                  var event = new MessageEvent(eventTypeBuffer, {\r\n                    data: dataBuffer.slice(1),\r\n                    lastEventId: lastEventIdBuffer\r\n                  });\r\n                  es.dispatchEvent(event);\r\n                  if (eventTypeBuffer === \"open\") {\r\n                    fire(es, es.onopen, event);\r\n                  } else if (eventTypeBuffer === \"message\") {\r\n                    fire(es, es.onmessage, event);\r\n                  } else if (eventTypeBuffer === \"error\") {\r\n                    fire(es, es.onerror, event);\r\n                  }\r\n                  if (currentState === CLOSED) {\r\n                    return;\r\n                  }\r\n                }\r\n                dataBuffer = \"\";\r\n                eventTypeBuffer = \"\";\r\n              }\r\n              state = c === \"\\r\".charCodeAt(0) ? AFTER_CR : FIELD_START;\r\n            } else {\r\n              if (state === FIELD_START) {\r\n                fieldStart = position;\r\n                state = FIELD;\r\n              }\r\n              if (state === FIELD) {\r\n                if (c === \":\".charCodeAt(0)) {\r\n                  valueStart = position + 1;\r\n                  state = VALUE_START;\r\n                }\r\n              } else if (state === VALUE_START) {\r\n                state = VALUE;\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    };\r\n\r\n    var onFinish = function (error) {\r\n      if (currentState === OPEN || currentState === CONNECTING) {\r\n        currentState = WAITING;\r\n        if (timeout !== 0) {\r\n          clearTimeout(timeout);\r\n          timeout = 0;\r\n        }\r\n        timeout = setTimeout(function () {\r\n          onTimeout();\r\n        }, retry);\r\n        retry = clampDuration(Math.min(initialRetry * 16, retry * 2));\r\n\r\n        es.readyState = CONNECTING;\r\n        var event = new ErrorEvent(\"error\", {error: error});\r\n        es.dispatchEvent(event);\r\n        fire(es, es.onerror, event);\r\n        if (error != undefined) {\r\n          console.error(error);\r\n        }\r\n      }\r\n    };\r\n\r\n    var close = function () {\r\n      currentState = CLOSED;\r\n      if (abortController != undefined) {\r\n        abortController.abort();\r\n        abortController = undefined;\r\n      }\r\n      if (timeout !== 0) {\r\n        clearTimeout(timeout);\r\n        timeout = 0;\r\n      }\r\n      es.readyState = CLOSED;\r\n    };\r\n\r\n    var onTimeout = function () {\r\n      timeout = 0;\r\n\r\n      if (currentState !== WAITING) {\r\n        if (!wasActivity && abortController != undefined) {\r\n          onFinish(new Error(\"No activity within \" + heartbeatTimeout + \" milliseconds.\" + \" \" + (currentState === CONNECTING ? \"No response received.\" : textLength + \" chars received.\") + \" \" + \"Reconnecting.\"));\r\n          if (abortController != undefined) {\r\n            abortController.abort();\r\n            abortController = undefined;\r\n          }\r\n        } else {\r\n          var nextHeartbeat = Math.max((wasActivity || Date.now()) + heartbeatTimeout - Date.now(), 1);\r\n          wasActivity = false;\r\n          timeout = setTimeout(function () {\r\n            onTimeout();\r\n          }, nextHeartbeat);\r\n        }\r\n        return;\r\n      }\r\n\r\n      wasActivity = false;\r\n      textLength = 0;\r\n      timeout = setTimeout(function () {\r\n        onTimeout();\r\n      }, heartbeatTimeout);\r\n\r\n      currentState = CONNECTING;\r\n      dataBuffer = \"\";\r\n      eventTypeBuffer = \"\";\r\n      lastEventIdBuffer = lastEventId;\r\n      textBuffer = \"\";\r\n      fieldStart = 0;\r\n      valueStart = 0;\r\n      state = FIELD_START;\r\n\r\n      // https://bugzilla.mozilla.org/show_bug.cgi?id=428916\r\n      // Request header field Last-Event-ID is not allowed by Access-Control-Allow-Headers.\r\n      var requestURL = url;\r\n      if (url.slice(0, 5) !== \"data:\" && url.slice(0, 5) !== \"blob:\") {\r\n        if (lastEventId !== \"\") {\r\n          // Remove the lastEventId parameter if it's already part of the request URL.\r\n          var i = url.indexOf(\"?\");\r\n          requestURL = i === -1 ? url : url.slice(0, i + 1) + url.slice(i + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function (p, paramName) {\r\n            return paramName === lastEventIdQueryParameterName ? '' : p;\r\n          });\r\n          // Append the current lastEventId to the request URL.\r\n          requestURL += (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + lastEventIdQueryParameterName +\"=\" + encodeURIComponent(lastEventId);\r\n        }\r\n      }\r\n      var withCredentials = es.withCredentials;\r\n      var requestHeaders = {};\r\n      requestHeaders[\"Accept\"] = \"text/event-stream\";\r\n      var headers = es.headers;\r\n      if (headers != undefined) {\r\n        for (var name in headers) {\r\n          if (Object.prototype.hasOwnProperty.call(headers, name)) {\r\n            requestHeaders[name] = headers[name];\r\n          }\r\n        }\r\n      }\r\n      try {\r\n        abortController = transport.open(xhr, onStart, onProgress, onFinish, requestURL, withCredentials, requestHeaders);\r\n      } catch (error) {\r\n        close();\r\n        throw error;\r\n      }\r\n    };\r\n\r\n    es.url = url;\r\n    es.readyState = CONNECTING;\r\n    es.withCredentials = withCredentials;\r\n    es.headers = headers;\r\n    es._close = close;\r\n\r\n    onTimeout();\r\n  }\r\n\r\n  EventSourcePolyfill.prototype = Object.create(EventTarget.prototype);\r\n  EventSourcePolyfill.prototype.CONNECTING = CONNECTING;\r\n  EventSourcePolyfill.prototype.OPEN = OPEN;\r\n  EventSourcePolyfill.prototype.CLOSED = CLOSED;\r\n  EventSourcePolyfill.prototype.close = function () {\r\n    this._close();\r\n  };\r\n\r\n  EventSourcePolyfill.CONNECTING = CONNECTING;\r\n  EventSourcePolyfill.OPEN = OPEN;\r\n  EventSourcePolyfill.CLOSED = CLOSED;\r\n  EventSourcePolyfill.prototype.withCredentials = undefined;\r\n\r\n  var R = NativeEventSource\r\n  if (XMLHttpRequest != undefined && (NativeEventSource == undefined || !(\"withCredentials\" in NativeEventSource.prototype))) {\r\n    // Why replace a native EventSource ?\r\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=444328\r\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=831392\r\n    // https://code.google.com/p/chromium/issues/detail?id=260144\r\n    // https://code.google.com/p/chromium/issues/detail?id=225654\r\n    // ...\r\n    R = EventSourcePolyfill;\r\n  }\r\n\r\n  (function (factory) {\r\n    if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n      var v = factory(exports);\r\n      if (v !== undefined) module.exports = v;\r\n    }\r\n    else if (typeof define === \"function\" && define.amd) {\r\n      define([\"exports\"], factory);\r\n    }\r\n    else {\r\n      factory(global);\r\n    }\r\n  })(function (exports) {\r\n    exports.EventSourcePolyfill = EventSourcePolyfill;\r\n    exports.NativeEventSource = NativeEventSource;\r\n    exports.EventSource = R;\r\n  });\r\n}(typeof globalThis === 'undefined' ? (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : this) : globalThis));\r\n"],
  "mappings": ";;;;;AAAA;AAAA;AASA,KAAC,SAAU,QAAQ;AACjB;AAEA,UAAI,aAAa,OAAO;AACxB,UAAI,eAAe,OAAO;AAC1B,UAAI,iBAAiB,OAAO;AAC5B,UAAI,iBAAiB,OAAO;AAC5B,UAAI,gBAAgB,OAAO;AAC3B,UAAI,oBAAoB,OAAO;AAE/B,UAAI,WAAW,OAAO;AACtB,UAAIA,WAAU,OAAO;AACrB,UAAI,QAAQ,OAAO;AACnB,UAAI,WAAW,OAAO;AACtB,UAAI,cAAc,OAAO;AACzB,UAAI,cAAc,OAAO;AACzB,UAAI,kBAAkB,OAAO;AAE7B,UAAI,OAAO,WAAW,eAAe,OAAO,aAAa,eAAe,EAAE,gBAAgB,aAAa,SAAS,QAAQ,MAAM;AAC5H,i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