You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
604 KiB

{"ast":null,"code":"/* sockjs-client v1.5.2 | http://sockjs.org | MIT license */\n(function (f) {\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n module.exports = f();\n } else if (typeof define === \"function\" && define.amd) {\n define([], f);\n } else {\n var g;\n\n if (typeof window !== \"undefined\") {\n g = window;\n } else if (typeof global !== \"undefined\") {\n g = global;\n } else if (typeof self !== \"undefined\") {\n g = self;\n } else {\n g = this;\n }\n\n g.SockJS = f();\n }\n})(function () {\n var define, module, exports;\n return function () {\n function r(e, n, t) {\n function o(i, f) {\n if (!n[i]) {\n if (!e[i]) {\n var c = \"function\" == typeof require && require;\n if (!f && c) return c(i, !0);\n if (u) return u(i, !0);\n var a = new Error(\"Cannot find module '\" + i + \"'\");\n throw a.code = \"MODULE_NOT_FOUND\", a;\n }\n\n var p = n[i] = {\n exports: {}\n };\n e[i][0].call(p.exports, function (r) {\n var n = e[i][1][r];\n return o(n || r);\n }, p, p.exports, r, e, n, t);\n }\n\n return n[i].exports;\n }\n\n for (var u = \"function\" == typeof require && require, i = 0; i < t.length; i++) o(t[i]);\n\n return o;\n }\n\n return r;\n }()({\n 1: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var transportList = require('./transport-list');\n\n module.exports = require('./main')(transportList); // TODO can't get rid of this until all servers do\n\n if ('_sockjs_onload' in global) {\n setTimeout(global._sockjs_onload, 1);\n }\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"./main\": 14,\n \"./transport-list\": 16\n }],\n 2: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n Event = require('./event');\n\n function CloseEvent() {\n Event.call(this);\n this.initEvent('close', false, false);\n this.wasClean = false;\n this.code = 0;\n this.reason = '';\n }\n\n inherits(CloseEvent, Event);\n module.exports = CloseEvent;\n }, {\n \"./event\": 4,\n \"inherits\": 57\n }],\n 3: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n EventTarget = require('./eventtarget');\n\n function EventEmitter() {\n EventTarget.call(this);\n }\n\n inherits(EventEmitter, EventTarget);\n\n EventEmitter.prototype.removeAllListeners = function (type) {\n if (type) {\n delete this._listeners[type];\n } else {\n this._listeners = {};\n }\n };\n\n EventEmitter.prototype.once = function (type, listener) {\n var self = this,\n fired = false;\n\n function g() {\n self.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n this.on(type, g);\n };\n\n EventEmitter.prototype.emit = function () {\n var type = arguments[0];\n var listeners = this._listeners[type];\n\n if (!listeners) {\n return;\n } // equivalent of Array.prototype.slice.call(arguments, 1);\n\n\n var l = arguments.length;\n var args = new Array(l - 1);\n\n for (var ai = 1; ai < l; ai++) {\n args[ai - 1] = arguments[ai];\n }\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n };\n\n EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;\n EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;\n module.exports.EventEmitter = EventEmitter;\n }, {\n \"./eventtarget\": 5,\n \"inherits\": 57\n }],\n 4: [function (require, module, exports) {\n 'use strict';\n\n function Event(eventType) {\n this.type = eventType;\n }\n\n Event.prototype.initEvent = function (eventType, canBubble, cancelable) {\n this.type = eventType;\n this.bubbles = canBubble;\n this.cancelable = cancelable;\n this.timeStamp = +new Date();\n return this;\n };\n\n Event.prototype.stopPropagation = function () {};\n\n Event.prototype.preventDefault = function () {};\n\n Event.CAPTURING_PHASE = 1;\n Event.AT_TARGET = 2;\n Event.BUBBLING_PHASE = 3;\n module.exports = Event;\n }, {}],\n 5: [function (require, module, exports) {\n 'use strict';\n /* Simplified implementation of DOM2 EventTarget.\n * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget\n */\n\n function EventTarget() {\n this._listeners = {};\n }\n\n EventTarget.prototype.addEventListener = function (eventType, listener) {\n if (!(eventType in this._listeners)) {\n this._listeners[eventType] = [];\n }\n\n var arr = this._listeners[eventType]; // #4\n\n if (arr.indexOf(listener) === -1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n arr = arr.concat([listener]);\n }\n\n this._listeners[eventType] = arr;\n };\n\n EventTarget.prototype.removeEventListener = function (eventType, listener) {\n var arr = this._listeners[eventType];\n\n if (!arr) {\n return;\n }\n\n var idx = arr.indexOf(listener);\n\n if (idx !== -1) {\n if (arr.length > 1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));\n } else {\n delete this._listeners[eventType];\n }\n\n return;\n }\n };\n\n EventTarget.prototype.dispatchEvent = function () {\n var event = arguments[0];\n var t = event.type; // equivalent of Array.prototype.slice.call(arguments, 0);\n\n var args = arguments.length === 1 ? [event] : Array.apply(null, arguments); // TODO: This doesn't match the real behavior; per spec, onfoo get\n // their place in line from the /first/ time they're set from\n // non-null. Although WebKit bumps it to the end every time it's\n // set.\n\n if (this['on' + t]) {\n this['on' + t].apply(this, args);\n }\n\n if (t in this._listeners) {\n // Grab a reference to the listeners list. removeEventListener may alter the list.\n var listeners = this._listeners[t];\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n }\n };\n\n module.exports = EventTarget;\n }, {}],\n 6: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n Event = require('./event');\n\n function TransportMessageEvent(data) {\n Event.call(this);\n this.initEvent('message', false, false);\n this.data = data;\n }\n\n inherits(TransportMessageEvent, Event);\n module.exports = TransportMessageEvent;\n }, {\n \"./event\": 4,\n \"inherits\": 57\n }],\n 7: [function (require, module, exports) {\n 'use strict';\n\n var JSON3 = require('json3'),\n iframeUtils = require('./utils/iframe');\n\n function FacadeJS(transport) {\n this._transport = transport;\n transport.on('message', this._transportMessage.bind(this));\n transport.on('close', this._transportClose.bind(this));\n }\n\n FacadeJS.prototype._transportClose = function (code, reason) {\n iframeUtils.postMessage('c', JSON3.stringify([code, reason]));\n };\n\n FacadeJS.prototype._transportMessage = function (frame) {\n iframeUtils.postMessage('t', frame);\n };\n\n FacadeJS.prototype._send = function (data) {\n this._transport.send(data);\n };\n\n FacadeJS.prototype._close = function () {\n this._transport.close();\n\n this._transport.removeAllListeners();\n };\n\n module.exports = FacadeJS;\n }, {\n \"./utils/iframe\": 47,\n \"json3\": 58\n }],\n 8: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var urlUtils = require('./utils/url'),\n eventUtils = require('./utils/event'),\n JSON3 = require('json3'),\n FacadeJS = require('./facade'),\n InfoIframeReceiver = require('./info-iframe-receiver'),\n iframeUtils = require('./utils/iframe'),\n loc = require('./location');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:iframe-bootstrap');\n }\n\n module.exports = function (SockJS, availableTransports) {\n var transportMap = {};\n availableTransports.forEach(function (at) {\n if (at.facadeTransport) {\n transportMap[at.facadeTransport.transportName] = at.facadeTransport;\n }\n }); // hard-coded for the info iframe\n // TODO see if we can make this more dynamic\n\n transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;\n var parentOrigin;\n /* eslint-disable camelcase */\n\n SockJS.bootstrap_iframe = function () {\n /* eslint-enable camelcase */\n var facade;\n iframeUtils.currentWindowId = loc.hash.slice(1);\n\n var onMessage = function (e) {\n if (e.source !== parent) {\n return;\n }\n\n if (typeof parentOrigin === 'undefined') {\n parentOrigin = e.origin;\n }\n\n if (e.origin !== parentOrigin) {\n return;\n }\n\n var iframeMessage;\n\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== iframeUtils.currentWindowId) {\n return;\n }\n\n switch (iframeMessage.type) {\n case 's':\n var p;\n\n try {\n p = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n break;\n }\n\n var version = p[0];\n var transport = p[1];\n var transUrl = p[2];\n var baseUrl = p[3];\n debug(version, transport, transUrl, baseUrl); // change this to semver logic\n\n if (version !== SockJS.version) {\n throw new Error('Incompatible SockJS! Main site uses:' + ' \"' + version + '\", the iframe:' + ' \"' + SockJS.version + '\".');\n }\n\n if (!urlUtils.isOriginEqual(transUrl, loc.href) || !urlUtils.isOriginEqual(baseUrl, loc.href)) {\n throw new Error('Can\\'t connect to different domain from within an ' + 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');\n }\n\n facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));\n break;\n\n case 'm':\n facade._send(iframeMessage.data);\n\n break;\n\n case 'c':\n if (facade) {\n facade._close();\n }\n\n facade = null;\n break;\n }\n };\n\n eventUtils.attachEvent('message', onMessage); // Start\n\n iframeUtils.postMessage('s');\n };\n };\n }).call(this, {\n env: {}\n });\n }, {\n \"./facade\": 7,\n \"./info-iframe-receiver\": 10,\n \"./location\": 13,\n \"./utils/event\": 46,\n \"./utils/iframe\": 47,\n \"./utils/url\": 52,\n \"debug\": 55,\n \"json3\": 58\n }],\n 9: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n JSON3 = require('json3'),\n objectUtils = require('./utils/object');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-ajax');\n }\n\n function InfoAjax(url, AjaxObject) {\n EventEmitter.call(this);\n var self = this;\n var t0 = +new Date();\n this.xo = new AjaxObject('GET', url);\n this.xo.once('finish', function (status, text) {\n var info, rtt;\n\n if (status === 200) {\n rtt = +new Date() - t0;\n\n if (text) {\n try {\n info = JSON3.parse(text);\n } catch (e) {\n debug('bad json', text);\n }\n }\n\n if (!objectUtils.isObject(info)) {\n info = {};\n }\n }\n\n self.emit('finish', info, rtt);\n self.removeAllListeners();\n });\n }\n\n inherits(InfoAjax, EventEmitter);\n\n InfoAjax.prototype.close = function () {\n this.removeAllListeners();\n this.xo.close();\n };\n\n module.exports = InfoAjax;\n }).call(this, {\n env: {}\n });\n }, {\n \"./utils/object\": 49,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57,\n \"json3\": 58\n }],\n 10: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter,\n JSON3 = require('json3'),\n XHRLocalObject = require('./transport/sender/xhr-local'),\n InfoAjax = require('./info-ajax');\n\n function InfoReceiverIframe(transUrl) {\n var self = this;\n EventEmitter.call(this);\n this.ir = new InfoAjax(transUrl, XHRLocalObject);\n this.ir.once('finish', function (info, rtt) {\n self.ir = null;\n self.emit('message', JSON3.stringify([info, rtt]));\n });\n }\n\n inherits(InfoReceiverIframe, EventEmitter);\n InfoReceiverIframe.transportName = 'iframe-info-receiver';\n\n InfoReceiverIframe.prototype.close = function () {\n if (this.ir) {\n this.ir.close();\n this.ir = null;\n }\n\n this.removeAllListeners();\n };\n\n module.exports = InfoReceiverIframe;\n }, {\n \"./info-ajax\": 9,\n \"./transport/sender/xhr-local\": 37,\n \"events\": 3,\n \"inherits\": 57,\n \"json3\": 58\n }],\n 11: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n JSON3 = require('json3'),\n utils = require('./utils/event'),\n IframeTransport = require('./transport/iframe'),\n InfoReceiverIframe = require('./info-iframe-receiver');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-iframe');\n }\n\n function InfoIframe(baseUrl, url) {\n var self = this;\n EventEmitter.call(this);\n\n var go = function () {\n var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);\n ifr.once('message', function (msg) {\n if (msg) {\n var d;\n\n try {\n d = JSON3.parse(msg);\n } catch (e) {\n debug('bad json', msg);\n self.emit('finish');\n self.close();\n return;\n }\n\n var info = d[0],\n rtt = d[1];\n self.emit('finish', info, rtt);\n }\n\n self.close();\n });\n ifr.once('close', function () {\n self.emit('finish');\n self.close();\n });\n }; // TODO this seems the same as the 'needBody' from transports\n\n\n if (!global.document.body) {\n utils.attachEvent('load', go);\n } else {\n go();\n }\n }\n\n inherits(InfoIframe, EventEmitter);\n\n InfoIframe.enabled = function () {\n return IframeTransport.enabled();\n };\n\n InfoIframe.prototype.close = function () {\n if (this.ifr) {\n this.ifr.close();\n }\n\n this.removeAllListeners();\n this.ifr = null;\n };\n\n module.exports = InfoIframe;\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"./info-iframe-receiver\": 10,\n \"./transport/iframe\": 22,\n \"./utils/event\": 46,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57,\n \"json3\": 58\n }],\n 12: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n urlUtils = require('./utils/url'),\n XDR = require('./transport/sender/xdr'),\n XHRCors = require('./transport/sender/xhr-cors'),\n XHRLocal = require('./transport/sender/xhr-local'),\n XHRFake = require('./transport/sender/xhr-fake'),\n InfoIframe = require('./info-iframe'),\n InfoAjax = require('./info-ajax');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-receiver');\n }\n\n function InfoReceiver(baseUrl, urlInfo) {\n debug(baseUrl);\n var self = this;\n EventEmitter.call(this);\n setTimeout(function () {\n self.doXhr(baseUrl, urlInfo);\n }, 0);\n }\n\n inherits(InfoReceiver, EventEmitter); // TODO this is currently ignoring the list of available transports and the whitelist\n\n InfoReceiver._getReceiver = function (baseUrl, url, urlInfo) {\n // determine method of CORS support (if needed)\n if (urlInfo.sameOrigin) {\n return new InfoAjax(url, XHRLocal);\n }\n\n if (XHRCors.enabled) {\n return new InfoAjax(url, XHRCors);\n }\n\n if (XDR.enabled && urlInfo.sameScheme) {\n return new InfoAjax(url, XDR);\n }\n\n if (InfoIframe.enabled()) {\n return new InfoIframe(baseUrl, url);\n }\n\n return new InfoAjax(url, XHRFake);\n };\n\n InfoReceiver.prototype.doXhr = function (baseUrl, urlInfo) {\n var self = this,\n url = urlUtils.addPath(baseUrl, '/info');\n debug('doXhr', url);\n this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);\n this.timeoutRef = setTimeout(function () {\n debug('timeout');\n\n self._cleanup(false);\n\n self.emit('finish');\n }, InfoReceiver.timeout);\n this.xo.once('finish', function (info, rtt) {\n debug('finish', info, rtt);\n\n self._cleanup(true);\n\n self.emit('finish', info, rtt);\n });\n };\n\n InfoReceiver.prototype._cleanup = function (wasClean) {\n debug('_cleanup');\n clearTimeout(this.timeoutRef);\n this.timeoutRef = null;\n\n if (!wasClean && this.xo) {\n this.xo.close();\n }\n\n this.xo = null;\n };\n\n InfoReceiver.prototype.close = function () {\n debug('close');\n this.removeAllListeners();\n\n this._cleanup(false);\n };\n\n InfoReceiver.timeout = 8000;\n module.exports = InfoReceiver;\n }).call(this, {\n env: {}\n });\n }, {\n \"./info-ajax\": 9,\n \"./info-iframe\": 11,\n \"./transport/sender/xdr\": 34,\n \"./transport/sender/xhr-cors\": 35,\n \"./transport/sender/xhr-fake\": 36,\n \"./transport/sender/xhr-local\": 37,\n \"./utils/url\": 52,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 13: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n module.exports = global.location || {\n origin: 'http://localhost:80',\n protocol: 'http:',\n host: 'localhost',\n port: 80,\n href: 'http://localhost/',\n hash: ''\n };\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 14: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n require('./shims');\n\n var URL = require('url-parse'),\n inherits = require('inherits'),\n JSON3 = require('json3'),\n random = require('./utils/random'),\n escape = require('./utils/escape'),\n urlUtils = require('./utils/url'),\n eventUtils = require('./utils/event'),\n transport = require('./utils/transport'),\n objectUtils = require('./utils/object'),\n browser = require('./utils/browser'),\n log = require('./utils/log'),\n Event = require('./event/event'),\n EventTarget = require('./event/eventtarget'),\n loc = require('./location'),\n CloseEvent = require('./event/close'),\n TransportMessageEvent = require('./event/trans-message'),\n InfoReceiver = require('./info-receiver');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:main');\n }\n\n var transports; // follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface\n\n function SockJS(url, protocols, options) {\n if (!(this instanceof SockJS)) {\n return new SockJS(url, protocols, options);\n }\n\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'SockJS: 1 argument required, but only 0 present\");\n }\n\n EventTarget.call(this);\n this.readyState = SockJS.CONNECTING;\n this.extensions = '';\n this.protocol = ''; // non-standard extension\n\n options = options || {};\n\n if (options.protocols_whitelist) {\n log.warn(\"'protocols_whitelist' is DEPRECATED. Use 'transports' instead.\");\n }\n\n this._transportsWhitelist = options.transports;\n this._transportOptions = options.transportOptions || {};\n this._timeout = options.timeout || 0;\n var sessionId = options.sessionId || 8;\n\n if (typeof sessionId === 'function') {\n this._generateSessionId = sessionId;\n } else if (typeof sessionId === 'number') {\n this._generateSessionId = function () {\n return random.string(sessionId);\n };\n } else {\n throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');\n }\n\n this._server = options.server || random.numberString(1000); // Step 1 of WS spec - parse and validate the url. Issue #8\n\n var parsedUrl = new URL(url);\n\n if (!parsedUrl.host || !parsedUrl.protocol) {\n throw new SyntaxError(\"The URL '\" + url + \"' is invalid\");\n } else if (parsedUrl.hash) {\n throw new SyntaxError('The URL must not contain a fragment');\n } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {\n throw new SyntaxError(\"The URL's scheme must be either 'http:' or 'https:'. '\" + parsedUrl.protocol + \"' is not allowed.\");\n }\n\n var secure = parsedUrl.protocol === 'https:'; // Step 2 - don't allow secure origin with an insecure protocol\n\n if (loc.protocol === 'https:' && !secure) {\n // exception is 127.0.0.0/8 and ::1 urls\n if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) {\n throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');\n }\n } // Step 3 - check port access - no need here\n // Step 4 - parse protocols argument\n\n\n if (!protocols) {\n protocols = [];\n } else if (!Array.isArray(protocols)) {\n protocols = [protocols];\n } // Step 5 - check protocols argument\n\n\n var sortedProtocols = protocols.sort();\n sortedProtocols.forEach(function (proto, i) {\n if (!proto) {\n throw new SyntaxError(\"The protocols entry '\" + proto + \"' is invalid.\");\n }\n\n if (i < sortedProtocols.length - 1 && proto === sortedProtocols[i + 1]) {\n throw new SyntaxError(\"The protocols entry '\" + proto + \"' is duplicated.\");\n }\n }); // Step 6 - convert origin\n\n var o = urlUtils.getOrigin(loc.href);\n this._origin = o ? o.toLowerCase() : null; // remove the trailing slash\n\n parsedUrl.set('pathname', parsedUrl.pathname.replace(/\\/+$/, '')); // store the sanitized url\n\n this.url = parsedUrl.href;\n debug('using url', this.url); // Step 7 - start connection in background\n // obtain server info\n // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26\n\n this._urlInfo = {\n nullOrigin: !browser.hasDomain(),\n sameOrigin: urlUtils.isOriginEqual(this.url, loc.href),\n sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)\n };\n this._ir = new InfoReceiver(this.url, this._urlInfo);\n\n this._ir.once('finish', this._receiveInfo.bind(this));\n }\n\n inherits(SockJS, EventTarget);\n\n function userSetCode(code) {\n return code === 1000 || code >= 3000 && code <= 4999;\n }\n\n SockJS.prototype.close = function (code, reason) {\n // Step 1\n if (code && !userSetCode(code)) {\n throw new Error('InvalidAccessError: Invalid code');\n } // Step 2.4 states the max is 123 bytes, but we are just checking length\n\n\n if (reason && reason.length > 123) {\n throw new SyntaxError('reason argument has an invalid length');\n } // Step 3.1\n\n\n if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {\n return;\n } // TODO look at docs to determine how to set this\n\n\n var wasClean = true;\n\n this._close(code || 1000, reason || 'Normal closure', wasClean);\n };\n\n SockJS.prototype.send = function (data) {\n // #13 - convert anything non-string to string\n // TODO this currently turns objects into [object Object]\n if (typeof data !== 'string') {\n data = '' + data;\n }\n\n if (this.readyState === SockJS.CONNECTING) {\n throw new Error('InvalidStateError: The connection has not been established yet');\n }\n\n if (this.readyState !== SockJS.OPEN) {\n return;\n }\n\n this._transport.send(escape.quote(data));\n };\n\n SockJS.version = require('./version');\n SockJS.CONNECTING = 0;\n SockJS.OPEN = 1;\n SockJS.CLOSING = 2;\n SockJS.CLOSED = 3;\n\n SockJS.prototype._receiveInfo = function (info, rtt) {\n debug('_receiveInfo', rtt);\n this._ir = null;\n\n if (!info) {\n this._close(1002, 'Cannot connect to server');\n\n return;\n } // establish a round-trip timeout (RTO) based on the\n // round-trip time (RTT)\n\n\n this._rto = this.countRTO(rtt); // allow server to override url used for the actual transport\n\n this._transUrl = info.base_url ? info.base_url : this.url;\n info = objectUtils.extend(info, this._urlInfo);\n debug('info', info); // determine list of desired and supported transports\n\n var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);\n this._transports = enabledTransports.main;\n debug(this._transports.length + ' enabled transports');\n\n this._connect();\n };\n\n SockJS.prototype._connect = function () {\n for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {\n debug('attempt', Transport.transportName);\n\n if (Transport.needBody) {\n if (!global.document.body || typeof global.document.readyState !== 'undefined' && global.document.readyState !== 'complete' && global.document.readyState !== 'interactive') {\n debug('waiting for body');\n\n this._transports.unshift(Transport);\n\n eventUtils.attachEvent('load', this._connect.bind(this));\n return;\n }\n } // calculate timeout based on RTO and round trips. Default to 5s\n\n\n var timeoutMs = Math.max(this._timeout, this._rto * Transport.roundTrips || 5000);\n this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);\n debug('using timeout', timeoutMs);\n var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());\n var options = this._transportOptions[Transport.transportName];\n debug('transport url', transportUrl);\n var transportObj = new Transport(transportUrl, this._transUrl, options);\n transportObj.on('message', this._transportMessage.bind(this));\n transportObj.once('close', this._transportClose.bind(this));\n transportObj.transportName = Transport.transportName;\n this._transport = transportObj;\n return;\n }\n\n this._close(2000, 'All transports failed', false);\n };\n\n SockJS.prototype._transportTimeout = function () {\n debug('_transportTimeout');\n\n if (this.readyState === SockJS.CONNECTING) {\n if (this._transport) {\n this._transport.close();\n }\n\n this._transportClose(2007, 'Transport timed out');\n }\n };\n\n SockJS.prototype._transportMessage = function (msg) {\n debug('_transportMessage', msg);\n var self = this,\n type = msg.slice(0, 1),\n content = msg.slice(1),\n payload; // first check for messages that don't need a payload\n\n switch (type) {\n case 'o':\n this._open();\n\n return;\n\n case 'h':\n this.dispatchEvent(new Event('heartbeat'));\n debug('heartbeat', this.transport);\n return;\n }\n\n if (content) {\n try {\n payload = JSON3.parse(content);\n } catch (e) {\n debug('bad json', content);\n }\n }\n\n if (typeof payload === 'undefined') {\n debug('empty payload', content);\n return;\n }\n\n switch (type) {\n case 'a':\n if (Array.isArray(payload)) {\n payload.forEach(function (p) {\n debug('message', self.transport, p);\n self.dispatchEvent(new TransportMessageEvent(p));\n });\n }\n\n break;\n\n case 'm':\n debug('message', this.transport, payload);\n this.dispatchEvent(new TransportMessageEvent(payload));\n break;\n\n case 'c':\n if (Array.isArray(payload) && payload.length === 2) {\n this._close(payload[0], payload[1], true);\n }\n\n break;\n }\n };\n\n SockJS.prototype._transportClose = function (code, reason) {\n debug('_transportClose', this.transport, code, reason);\n\n if (this._transport) {\n this._transport.removeAllListeners();\n\n this._transport = null;\n this.transport = null;\n }\n\n if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {\n this._connect();\n\n return;\n }\n\n this._close(code, reason);\n };\n\n SockJS.prototype._open = function () {\n debug('_open', this._transport && this._transport.transportName, this.readyState);\n\n if (this.readyState === SockJS.CONNECTING) {\n if (this._transportTimeoutId) {\n clearTimeout(this._transportTimeoutId);\n this._transportTimeoutId = null;\n }\n\n this.readyState = SockJS.OPEN;\n this.transport = this._transport.transportName;\n this.dispatchEvent(new Event('open'));\n debug('connected', this.transport);\n } else {\n // The server might have been restarted, and lost track of our\n // connection.\n this._close(1006, 'Server lost session');\n }\n };\n\n SockJS.prototype._close = function (code, reason, wasClean) {\n debug('_close', this.transport, code, reason, wasClean, this.readyState);\n var forceFail = false;\n\n if (this._ir) {\n forceFail = true;\n\n this._ir.close();\n\n this._ir = null;\n }\n\n if (this._transport) {\n this._transport.close();\n\n this._transport = null;\n this.transport = null;\n }\n\n if (this.readyState === SockJS.CLOSED) {\n throw new Error('InvalidStateError: SockJS has already been closed');\n }\n\n this.readyState = SockJS.CLOSING;\n setTimeout(function () {\n this.readyState = SockJS.CLOSED;\n\n if (forceFail) {\n this.dispatchEvent(new Event('error'));\n }\n\n var e = new CloseEvent('close');\n e.wasClean = wasClean || false;\n e.code = code || 1000;\n e.reason = reason;\n this.dispatchEvent(e);\n this.onmessage = this.onclose = this.onerror = null;\n debug('disconnected');\n }.bind(this), 0);\n }; // See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/\n // and RFC 2988.\n\n\n SockJS.prototype.countRTO = function (rtt) {\n // In a local environment, when using IE8/9 and the `jsonp-polling`\n // transport the time needed to establish a connection (the time that pass\n // from the opening of the transport to the call of `_dispatchOpen`) is\n // around 200msec (the lower bound used in the article above) and this\n // causes spurious timeouts. For this reason we calculate a value slightly\n // larger than that used in the article.\n if (rtt > 100) {\n return 4 * rtt; // rto > 400msec\n }\n\n return 300 + rtt; // 300msec < rto <= 400msec\n };\n\n module.exports = function (availableTransports) {\n transports = transport(availableTransports);\n\n require('./iframe-bootstrap')(SockJS, availableTransports);\n\n return SockJS;\n };\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"./event/close\": 2,\n \"./event/event\": 4,\n \"./event/eventtarget\": 5,\n \"./event/trans-message\": 6,\n \"./iframe-bootstrap\": 8,\n \"./info-receiver\": 12,\n \"./location\": 13,\n \"./shims\": 15,\n \"./utils/browser\": 44,\n \"./utils/escape\": 45,\n \"./utils/event\": 46,\n \"./utils/log\": 48,\n \"./utils/object\": 49,\n \"./utils/random\": 50,\n \"./utils/transport\": 51,\n \"./utils/url\": 52,\n \"./version\": 53,\n \"debug\": 55,\n \"inherits\": 57,\n \"json3\": 58,\n \"url-parse\": 61\n }],\n 15: [function (require, module, exports) {\n /* eslint-disable */\n\n /* jscs: disable */\n 'use strict'; // pulled specific shims from https://github.com/es-shims/es5-shim\n\n var ArrayPrototype = Array.prototype;\n var ObjectPrototype = Object.prototype;\n var FunctionPrototype = Function.prototype;\n var StringPrototype = String.prototype;\n var array_slice = ArrayPrototype.slice;\n var _toString = ObjectPrototype.toString;\n\n var isFunction = function (val) {\n return ObjectPrototype.toString.call(val) === '[object Function]';\n };\n\n var isArray = function isArray(obj) {\n return _toString.call(obj) === '[object Array]';\n };\n\n var isString = function isString(obj) {\n return _toString.call(obj) === '[object String]';\n };\n\n var supportsDescriptors = Object.defineProperty && function () {\n try {\n Object.defineProperty({}, 'x', {});\n return true;\n } catch (e) {\n /* this is ES3 */\n return false;\n }\n }(); // Define configurable, writable and non-enumerable props\n // if they don't exist.\n\n\n var defineProperty;\n\n if (supportsDescriptors) {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && name in object) {\n return;\n }\n\n Object.defineProperty(object, name, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: method\n });\n };\n } else {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && name in object) {\n return;\n }\n\n object[name] = method;\n };\n }\n\n var defineProperties = function (object, map, forceAssign) {\n for (var name in map) {\n if (ObjectPrototype.hasOwnProperty.call(map, name)) {\n defineProperty(object, name, map[name], forceAssign);\n }\n }\n };\n\n var toObject = function (o) {\n if (o == null) {\n // this matches both null and undefined\n throw new TypeError(\"can't convert \" + o + ' to object');\n }\n\n return Object(o);\n }; //\n // Util\n // ======\n //\n // ES5 9.4\n // http://es5.github.com/#x9.4\n // http://jsperf.com/to-integer\n\n\n function toInteger(num) {\n var n = +num;\n\n if (n !== n) {\n // isNaN\n n = 0;\n } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n\n return n;\n }\n\n function ToUint32(x) {\n return x >>> 0;\n } //\n // Function\n // ========\n //\n // ES-5 15.3.4.5\n // http://es5.github.com/#x15.3.4.5\n\n\n function Empty() {}\n\n defineProperties(FunctionPrototype, {\n bind: function bind(that) {\n // .length is 1\n // 1. Let Target be the this value.\n var target = this; // 2. If IsCallable(Target) is false, throw a TypeError exception.\n\n if (!isFunction(target)) {\n throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n } // 3. Let A be a new (possibly empty) internal list of all of the\n // argument values provided after thisArg (arg1, arg2 etc), in order.\n // XXX slicedArgs will stand in for \"A\" if used\n\n\n var args = array_slice.call(arguments, 1); // for normal call\n // 4. Let F be a new native ECMAScript object.\n // 11. Set the [[Prototype]] internal property of F to the standard\n // built-in Function prototype object as specified in 15.3.3.1.\n // 12. Set the [[Call]] internal property of F as described in\n // 15.3.4.5.1.\n // 13. Set the [[Construct]] internal property of F as described in\n // 15.3.4.5.2.\n // 14. Set the [[HasInstance]] internal property of F as described in\n // 15.3.4.5.3.\n\n var binder = function () {\n if (this instanceof bound) {\n // 15.3.4.5.2 [[Construct]]\n // When the [[Construct]] internal method of a function object,\n // F that was created using the bind function is called with a\n // list of arguments ExtraArgs, the following steps are taken:\n // 1. Let target be the value of F's [[TargetFunction]]\n // internal property.\n // 2. If target has no [[Construct]] internal method, a\n // TypeError exception is thrown.\n // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Construct]] internal\n // method of target providing args as the arguments.\n var result = target.apply(this, args.concat(array_slice.call(arguments)));\n\n if (Object(result) === result) {\n return result;\n }\n\n return this;\n } else {\n // 15.3.4.5.1 [[Call]]\n // When the [[Call]] internal method of a function object, F,\n // which was created using the bind function is called with a\n // this value and a list of arguments ExtraArgs, the following\n // steps are taken:\n // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 2. Let boundThis be the value of F's [[BoundThis]] internal\n // property.\n // 3. Let target be the value of F's [[TargetFunction]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Call]] internal method\n // of target providing boundThis as the this value and\n // providing args as the arguments.\n // equiv: target.call(this, ...boundArgs, ...args)\n return target.apply(that, args.concat(array_slice.call(arguments)));\n }\n }; // 15. If the [[Class]] internal property of Target is \"Function\", then\n // a. Let L be the length property of Target minus the length of A.\n // b. Set the length own property of F to either 0 or L, whichever is\n // larger.\n // 16. Else set the length own property of F to 0.\n\n\n var boundLength = Math.max(0, target.length - args.length); // 17. Set the attributes of the length own property of F to the values\n // specified in 15.3.5.1.\n\n var boundArgs = [];\n\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n } // XXX Build a dynamic function with desired amount of arguments is the only\n // way to set the length property of a function.\n // In environments where Content Security Policies enabled (Chrome extensions,\n // for ex.) all use of eval or Function costructor throws an exception.\n // However in all of these environments Function.prototype.bind exists\n // and so this code will never be executed.\n\n\n var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty(); // Clean up dangling references.\n\n Empty.prototype = null;\n } // TODO\n // 18. Set the [[Extensible]] internal property of F to true.\n // TODO\n // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n // 20. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n // false.\n // 21. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n // and false.\n // TODO\n // NOTE Function objects created using Function.prototype.bind do not\n // have a prototype property or the [[Code]], [[FormalParameters]], and\n // [[Scope]] internal properties.\n // XXX can't delete prototype in pure-js.\n // 22. Return F.\n\n\n return bound;\n }\n }); //\n // Array\n // =====\n //\n // ES5 15.4.3.2\n // http://es5.github.com/#x15.4.3.2\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray\n\n defineProperties(Array, {\n isArray: isArray\n });\n var boxedString = Object('a');\n var splitString = boxedString[0] !== 'a' || !(0 in boxedString);\n\n var properlyBoxesContext = function properlyBoxed(method) {\n // Check node 0.6.21 bug where third parameter is not boxed\n var properlyBoxesNonStrict = true;\n var properlyBoxesStrict = true;\n\n if (method) {\n method.call('foo', function (_, __, context) {\n if (typeof context !== 'object') {\n properlyBoxesNonStrict = false;\n }\n });\n method.call([1], function () {\n 'use strict';\n\n properlyBoxesStrict = typeof this === 'string';\n }, 'x');\n }\n\n return !!method && properlyBoxesNonStrict && properlyBoxesStrict;\n };\n\n defineProperties(ArrayPrototype, {\n forEach: function forEach(fun\n /*, thisp*/\n ) {\n var object = toObject(this),\n self = splitString && isString(this) ? this.split('') : object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0; // If no callback function or if callback is not a callable function\n\n if (!isFunction(fun)) {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n // Invoke the callback function with call, passing arguments:\n // context, property value, property key, thisArg object\n // context\n fun.call(thisp, self[i], i, object);\n }\n }\n }\n }, !properlyBoxesContext(ArrayPrototype.forEach)); // ES5 15.4.4.14\n // http://es5.github.com/#x15.4.4.14\n // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf\n\n var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;\n defineProperties(ArrayPrototype, {\n indexOf: function indexOf(sought\n /*, fromIndex */\n ) {\n var self = splitString && isString(this) ? this.split('') : toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n } // handle negative indices\n\n\n i = i >= 0 ? i : Math.max(0, length + i);\n\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n\n return -1;\n }\n }, hasFirefox2IndexOfBug); //\n // String\n // ======\n //\n // ES5 15.5.4.14\n // http://es5.github.com/#x15.5.4.14\n // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]\n // Many browsers do not split properly with regular expressions or they\n // do not perform the split correctly under obscure conditions.\n // See http://blog.stevenlevithan.com/archives/cross-browser-split\n // I've tested in many browsers and this seems to cover the deviant ones:\n // 'ab'.split(/(?:ab)*/) should be [\"\", \"\"], not [\"\"]\n // '.'.split(/(.?)(.?)/) should be [\"\", \".\", \"\", \"\"], not [\"\", \"\"]\n // 'tesst'.split(/(s)*/) should be [\"t\", undefined, \"e\", \"s\", \"t\"], not\n // [undefined, \"t\", undefined, \"e\", ...]\n // ''.split(/.?/) should be [], not [\"\"]\n // '.'.split(/()()/) should be [\".\"], not [\"\", \"\", \".\"]\n\n var string_split = StringPrototype.split;\n\n if ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || 'tesst'.split(/(s)*/)[1] === 't' || 'test'.split(/(?:)/, -1).length !== 4 || ''.split(/.?/).length || '.'.split(/()()/).length > 1) {\n (function () {\n var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group\n\n StringPrototype.split = function (separator, limit) {\n var string = this;\n\n if (separator === void 0 && limit === 0) {\n return [];\n } // If `separator` is not a regex, use native split\n\n\n if (_toString.call(separator) !== '[object RegExp]') {\n return string_split.call(this, separator, limit);\n }\n\n var output = [],\n flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.extended ? 'x' : '') + ( // Proposed for ES6\n separator.sticky ? 'y' : ''),\n // Firefox 3+\n lastLastIndex = 0,\n // Make `global` and avoid `lastIndex` issues by working with a copy\n separator2,\n match,\n lastIndex,\n lastLength;\n separator = new RegExp(separator.source, flags + 'g');\n string += ''; // Type-convert\n\n if (!compliantExecNpcg) {\n // Doesn't need flags gy, but they don't hurt\n separator2 = new RegExp('^' + separator.source + '$(?!\\\\s)', flags);\n }\n /* Values for `limit`, per the spec:\n * If undefined: 4294967295 // Math.pow(2, 32) - 1\n * If 0, Infinity, or NaN: 0\n * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n * If other: Type-convert, then use the above rules\n */\n\n\n limit = limit === void 0 ? -1 >>> 0 : // Math.pow(2, 32) - 1\n ToUint32(limit);\n\n while (match = separator.exec(string)) {\n // `separator.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0].length;\n\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for\n // nonparticipating capturing groups\n\n if (!compliantExecNpcg && match.length > 1) {\n match[0].replace(separator2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === void 0) {\n match[i] = void 0;\n }\n }\n });\n }\n\n if (match.length > 1 && match.index < string.length) {\n ArrayPrototype.push.apply(output, match.slice(1));\n }\n\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n\n if (output.length >= limit) {\n break;\n }\n }\n\n if (separator.lastIndex === match.index) {\n separator.lastIndex++; // Avoid an infinite loop\n }\n }\n\n if (lastLastIndex === string.length) {\n if (lastLength || !separator.test('')) {\n output.push('');\n }\n } else {\n output.push(string.slice(lastLastIndex));\n }\n\n return output.length > limit ? output.slice(0, limit) : output;\n };\n })(); // [bugfix, chrome]\n // If separator is undefined, then the result array contains just one String,\n // which is the this value (converted to a String). If limit is not undefined,\n // then the output array is truncated so that it contains no more than limit\n // elements.\n // \"0\".split(undefined, 0) -> []\n\n } else if ('0'.split(void 0, 0).length) {\n StringPrototype.split = function split(separator, limit) {\n if (separator === void 0 && limit === 0) {\n return [];\n }\n\n return string_split.call(this, separator, limit);\n };\n } // ECMA-262, 3rd B.2.3\n // Not an ECMAScript standard, although ECMAScript 3rd Edition has a\n // non-normative section suggesting uniform semantics and it should be\n // normalized across all browsers\n // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE\n\n\n var string_substr = StringPrototype.substr;\n var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';\n defineProperties(StringPrototype, {\n substr: function substr(start, length) {\n return string_substr.call(this, start < 0 ? (start = this.length + start) < 0 ? 0 : start : start, length);\n }\n }, hasNegativeSubstrBug);\n }, {}],\n 16: [function (require, module, exports) {\n 'use strict';\n\n module.exports = [// streaming transports\n require('./transport/websocket'), require('./transport/xhr-streaming'), require('./transport/xdr-streaming'), require('./transport/eventsource'), require('./transport/lib/iframe-wrap')(require('./transport/eventsource')) // polling transports\n , require('./transport/htmlfile'), require('./transport/lib/iframe-wrap')(require('./transport/htmlfile')), require('./transport/xhr-polling'), require('./transport/xdr-polling'), require('./transport/lib/iframe-wrap')(require('./transport/xhr-polling')), require('./transport/jsonp-polling')];\n }, {\n \"./transport/eventsource\": 20,\n \"./transport/htmlfile\": 21,\n \"./transport/jsonp-polling\": 23,\n \"./transport/lib/iframe-wrap\": 26,\n \"./transport/websocket\": 38,\n \"./transport/xdr-polling\": 39,\n \"./transport/xdr-streaming\": 40,\n \"./transport/xhr-polling\": 41,\n \"./transport/xhr-streaming\": 42\n }],\n 17: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n utils = require('../../utils/event'),\n urlUtils = require('../../utils/url'),\n XHR = global.XMLHttpRequest;\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:browser:xhr');\n }\n\n function AbstractXHRObject(method, url, payload, opts) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n setTimeout(function () {\n self._start(method, url, payload, opts);\n }, 0);\n }\n\n inherits(AbstractXHRObject, EventEmitter);\n\n AbstractXHRObject.prototype._start = function (method, url, payload, opts) {\n var self = this;\n\n try {\n this.xhr = new XHR();\n } catch (x) {// intentionally empty\n }\n\n if (!this.xhr) {\n debug('no xhr');\n this.emit('finish', 0, 'no xhr support');\n\n this._cleanup();\n\n return;\n } // several browsers cache POSTs\n\n\n url = urlUtils.addQuery(url, 't=' + +new Date()); // Explorer tends to keep connection open, even after the\n // tab gets closed: http://bugs.jquery.com/ticket/5280\n\n this.unloadRef = utils.unloadAdd(function () {\n debug('unload cleanup');\n\n self._cleanup(true);\n });\n\n try {\n this.xhr.open(method, url, true);\n\n if (this.timeout && 'timeout' in this.xhr) {\n this.xhr.timeout = this.timeout;\n\n this.xhr.ontimeout = function () {\n debug('xhr timeout');\n self.emit('finish', 0, '');\n\n self._cleanup(false);\n };\n }\n } catch (e) {\n debug('exception', e); // IE raises an exception on wrong port.\n\n this.emit('finish', 0, '');\n\n this._cleanup(false);\n\n return;\n }\n\n if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {\n debug('withCredentials'); // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :\n // \"This never affects same-site requests.\"\n\n this.xhr.withCredentials = true;\n }\n\n if (opts && opts.headers) {\n for (var key in opts.headers) {\n this.xhr.setRequestHeader(key, opts.headers[key]);\n }\n }\n\n this.xhr.onreadystatechange = function () {\n if (self.xhr) {\n var x = self.xhr;\n var text, status;\n debug('readyState', x.readyState);\n\n switch (x.readyState) {\n case 3:\n // IE doesn't like peeking into responseText or status\n // on Microsoft.XMLHTTP and readystate=3\n try {\n status = x.status;\n text = x.responseText;\n } catch (e) {// intentionally empty\n }\n\n debug('status', status); // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450\n\n if (status === 1223) {\n status = 204;\n } // IE does return readystate == 3 for 404 answers.\n\n\n if (status === 200 && text && text.length > 0) {\n debug('chunk');\n self.emit('chunk', status, text);\n }\n\n break;\n\n case 4:\n status = x.status;\n debug('status', status); // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450\n\n if (status === 1223) {\n status = 204;\n } // IE returns this for a bad port\n // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx\n\n\n if (status === 12005 || status === 12029) {\n status = 0;\n }\n\n debug('finish', status, x.responseText);\n self.emit('finish', status, x.responseText);\n\n self._cleanup(false);\n\n break;\n }\n }\n };\n\n try {\n self.xhr.send(payload);\n } catch (e) {\n self.emit('finish', 0, '');\n\n self._cleanup(false);\n }\n };\n\n AbstractXHRObject.prototype._cleanup = function (abort) {\n debug('cleanup');\n\n if (!this.xhr) {\n return;\n }\n\n this.removeAllListeners();\n utils.unloadDel(this.unloadRef); // IE needs this field to be a function\n\n this.xhr.onreadystatechange = function () {};\n\n if (this.xhr.ontimeout) {\n this.xhr.ontimeout = null;\n }\n\n if (abort) {\n try {\n this.xhr.abort();\n } catch (x) {// intentionally empty\n }\n }\n\n this.unloadRef = this.xhr = null;\n };\n\n AbstractXHRObject.prototype.close = function () {\n debug('close');\n\n this._cleanup(true);\n };\n\n AbstractXHRObject.enabled = !!XHR; // override XMLHttpRequest for IE6/7\n // obfuscate to avoid firewalls\n\n var axo = ['Active'].concat('Object').join('X');\n\n if (!AbstractXHRObject.enabled && axo in global) {\n debug('overriding xmlhttprequest');\n\n XHR = function () {\n try {\n return new global[axo]('Microsoft.XMLHTTP');\n } catch (e) {\n return null;\n }\n };\n\n AbstractXHRObject.enabled = !!new XHR();\n }\n\n var cors = false;\n\n try {\n cors = 'withCredentials' in new XHR();\n } catch (ignored) {// intentionally empty\n }\n\n AbstractXHRObject.supportsCORS = cors;\n module.exports = AbstractXHRObject;\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../../utils/event\": 46,\n \"../../utils/url\": 52,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 18: [function (require, module, exports) {\n (function (global) {\n module.exports = global.EventSource;\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 19: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var Driver = global.WebSocket || global.MozWebSocket;\n\n if (Driver) {\n module.exports = function WebSocketBrowserDriver(url) {\n return new Driver(url);\n };\n } else {\n module.exports = undefined;\n }\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 20: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n EventSourceReceiver = require('./receiver/eventsource'),\n XHRCorsObject = require('./sender/xhr-cors'),\n EventSourceDriver = require('eventsource');\n\n function EventSourceTransport(transUrl) {\n if (!EventSourceTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);\n }\n\n inherits(EventSourceTransport, AjaxBasedTransport);\n\n EventSourceTransport.enabled = function () {\n return !!EventSourceDriver;\n };\n\n EventSourceTransport.transportName = 'eventsource';\n EventSourceTransport.roundTrips = 2;\n module.exports = EventSourceTransport;\n }, {\n \"./lib/ajax-based\": 24,\n \"./receiver/eventsource\": 29,\n \"./sender/xhr-cors\": 35,\n \"eventsource\": 18,\n \"inherits\": 57\n }],\n 21: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n HtmlfileReceiver = require('./receiver/htmlfile'),\n XHRLocalObject = require('./sender/xhr-local'),\n AjaxBasedTransport = require('./lib/ajax-based');\n\n function HtmlFileTransport(transUrl) {\n if (!HtmlfileReceiver.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);\n }\n\n inherits(HtmlFileTransport, AjaxBasedTransport);\n\n HtmlFileTransport.enabled = function (info) {\n return HtmlfileReceiver.enabled && info.sameOrigin;\n };\n\n HtmlFileTransport.transportName = 'htmlfile';\n HtmlFileTransport.roundTrips = 2;\n module.exports = HtmlFileTransport;\n }, {\n \"./lib/ajax-based\": 24,\n \"./receiver/htmlfile\": 30,\n \"./sender/xhr-local\": 37,\n \"inherits\": 57\n }],\n 22: [function (require, module, exports) {\n (function (process) {\n 'use strict'; // Few cool transports do work only for same-origin. In order to make\n // them work cross-domain we shall use iframe, served from the\n // remote domain. New browsers have capabilities to communicate with\n // cross domain iframe using postMessage(). In IE it was implemented\n // from IE 8+, but of course, IE got some details wrong:\n // http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx\n // http://stevesouders.com/misc/test-postmessage.php\n\n var inherits = require('inherits'),\n JSON3 = require('json3'),\n EventEmitter = require('events').EventEmitter,\n version = require('../version'),\n urlUtils = require('../utils/url'),\n iframeUtils = require('../utils/iframe'),\n eventUtils = require('../utils/event'),\n random = require('../utils/random');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:transport:iframe');\n }\n\n function IframeTransport(transport, transUrl, baseUrl) {\n if (!IframeTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n EventEmitter.call(this);\n var self = this;\n this.origin = urlUtils.getOrigin(baseUrl);\n this.baseUrl = baseUrl;\n this.transUrl = transUrl;\n this.transport = transport;\n this.windowId = random.string(8);\n var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;\n debug(transport, transUrl, iframeUrl);\n this.iframeObj = iframeUtils.createIframe(iframeUrl, function (r) {\n debug('err callback');\n self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');\n self.close();\n });\n this.onmessageCallback = this._message.bind(this);\n eventUtils.attachEvent('message', this.onmessageCallback);\n }\n\n inherits(IframeTransport, EventEmitter);\n\n IframeTransport.prototype.close = function () {\n debug('close');\n this.removeAllListeners();\n\n if (this.iframeObj) {\n eventUtils.detachEvent('message', this.onmessageCallback);\n\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n this.postMessage('c');\n } catch (x) {// intentionally empty\n }\n\n this.iframeObj.cleanup();\n this.iframeObj = null;\n this.onmessageCallback = this.iframeObj = null;\n }\n };\n\n IframeTransport.prototype._message = function (e) {\n debug('message', e.data);\n\n if (!urlUtils.isOriginEqual(e.origin, this.origin)) {\n debug('not same origin', e.origin, this.origin);\n return;\n }\n\n var iframeMessage;\n\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== this.windowId) {\n debug('mismatched window id', iframeMessage.windowId, this.windowId);\n return;\n }\n\n switch (iframeMessage.type) {\n case 's':\n this.iframeObj.loaded(); // window global dependency\n\n this.postMessage('s', JSON3.stringify([version, this.transport, this.transUrl, this.baseUrl]));\n break;\n\n case 't':\n this.emit('message', iframeMessage.data);\n break;\n\n case 'c':\n var cdata;\n\n try {\n cdata = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n return;\n }\n\n this.emit('close', cdata[0], cdata[1]);\n this.close();\n break;\n }\n };\n\n IframeTransport.prototype.postMessage = function (type, data) {\n debug('postMessage', type, data);\n this.iframeObj.post(JSON3.stringify({\n windowId: this.windowId,\n type: type,\n data: data || ''\n }), this.origin);\n };\n\n IframeTransport.prototype.send = function (message) {\n debug('send', message);\n this.postMessage('m', message);\n };\n\n IframeTransport.enabled = function () {\n return iframeUtils.iframeEnabled;\n };\n\n IframeTransport.transportName = 'iframe';\n IframeTransport.roundTrips = 2;\n module.exports = IframeTransport;\n }).call(this, {\n env: {}\n });\n }, {\n \"../utils/event\": 46,\n \"../utils/iframe\": 47,\n \"../utils/random\": 50,\n \"../utils/url\": 52,\n \"../version\": 53,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57,\n \"json3\": 58\n }],\n 23: [function (require, module, exports) {\n (function (global) {\n 'use strict'; // The simplest and most robust transport, using the well-know cross\n // domain hack - JSONP. This transport is quite inefficient - one\n // message could use up to one http request. But at least it works almost\n // everywhere.\n // Known limitations:\n // o you will get a spinning cursor\n // o for Konqueror a dumb timer is needed to detect errors\n\n var inherits = require('inherits'),\n SenderReceiver = require('./lib/sender-receiver'),\n JsonpReceiver = require('./receiver/jsonp'),\n jsonpSender = require('./sender/jsonp');\n\n function JsonPTransport(transUrl) {\n if (!JsonPTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);\n }\n\n inherits(JsonPTransport, SenderReceiver);\n\n JsonPTransport.enabled = function () {\n return !!global.document;\n };\n\n JsonPTransport.transportName = 'jsonp-polling';\n JsonPTransport.roundTrips = 1;\n JsonPTransport.needBody = true;\n module.exports = JsonPTransport;\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"./lib/sender-receiver\": 28,\n \"./receiver/jsonp\": 31,\n \"./sender/jsonp\": 33,\n \"inherits\": 57\n }],\n 24: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var inherits = require('inherits'),\n urlUtils = require('../../utils/url'),\n SenderReceiver = require('./sender-receiver');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:ajax-based');\n }\n\n function createAjaxSender(AjaxObject) {\n return function (url, payload, callback) {\n debug('create ajax sender', url, payload);\n var opt = {};\n\n if (typeof payload === 'string') {\n opt.headers = {\n 'Content-type': 'text/plain'\n };\n }\n\n var ajaxUrl = urlUtils.addPath(url, '/xhr_send');\n var xo = new AjaxObject('POST', ajaxUrl, payload, opt);\n xo.once('finish', function (status) {\n debug('finish', status);\n xo = null;\n\n if (status !== 200 && status !== 204) {\n return callback(new Error('http status ' + status));\n }\n\n callback();\n });\n return function () {\n debug('abort');\n xo.close();\n xo = null;\n var err = new Error('Aborted');\n err.code = 1000;\n callback(err);\n };\n };\n }\n\n function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {\n SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);\n }\n\n inherits(AjaxBasedTransport, SenderReceiver);\n module.exports = AjaxBasedTransport;\n }).call(this, {\n env: {}\n });\n }, {\n \"../../utils/url\": 52,\n \"./sender-receiver\": 28,\n \"debug\": 55,\n \"inherits\": 57\n }],\n 25: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:buffered-sender');\n }\n\n function BufferedSender(url, sender) {\n debug(url);\n EventEmitter.call(this);\n this.sendBuffer = [];\n this.sender = sender;\n this.url = url;\n }\n\n inherits(BufferedSender, EventEmitter);\n\n BufferedSender.prototype.send = function (message) {\n debug('send', message);\n this.sendBuffer.push(message);\n\n if (!this.sendStop) {\n this.sendSchedule();\n }\n }; // For polling transports in a situation when in the message callback,\n // new message is being send. If the sending connection was started\n // before receiving one, it is possible to saturate the network and\n // timeout due to the lack of receiving socket. To avoid that we delay\n // sending messages by some small time, in order to let receiving\n // connection be started beforehand. This is only a halfmeasure and\n // does not fix the big problem, but it does make the tests go more\n // stable on slow networks.\n\n\n BufferedSender.prototype.sendScheduleWait = function () {\n debug('sendScheduleWait');\n var self = this;\n var tref;\n\n this.sendStop = function () {\n debug('sendStop');\n self.sendStop = null;\n clearTimeout(tref);\n };\n\n tref = setTimeout(function () {\n debug('timeout');\n self.sendStop = null;\n self.sendSchedule();\n }, 25);\n };\n\n BufferedSender.prototype.sendSchedule = function () {\n debug('sendSchedule', this.sendBuffer.length);\n var self = this;\n\n if (this.sendBuffer.length > 0) {\n var payload = '[' + this.sendBuffer.join(',') + ']';\n this.sendStop = this.sender(this.url, payload, function (err) {\n self.sendStop = null;\n\n if (err) {\n debug('error', err);\n self.emit('close', err.code || 1006, 'Sending error: ' + err);\n self.close();\n } else {\n self.sendScheduleWait();\n }\n });\n this.sendBuffer = [];\n }\n };\n\n BufferedSender.prototype._cleanup = function () {\n debug('_cleanup');\n this.removeAllListeners();\n };\n\n BufferedSender.prototype.close = function () {\n debug('close');\n\n this._cleanup();\n\n if (this.sendStop) {\n this.sendStop();\n this.sendStop = null;\n }\n };\n\n module.exports = BufferedSender;\n }).call(this, {\n env: {}\n });\n }, {\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 26: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var inherits = require('inherits'),\n IframeTransport = require('../iframe'),\n objectUtils = require('../../utils/object');\n\n module.exports = function (transport) {\n function IframeWrapTransport(transUrl, baseUrl) {\n IframeTransport.call(this, transport.transportName, transUrl, baseUrl);\n }\n\n inherits(IframeWrapTransport, IframeTransport);\n\n IframeWrapTransport.enabled = function (url, info) {\n if (!global.document) {\n return false;\n }\n\n var iframeInfo = objectUtils.extend({}, info);\n iframeInfo.sameOrigin = true;\n return transport.enabled(iframeInfo) && IframeTransport.enabled();\n };\n\n IframeWrapTransport.transportName = 'iframe-' + transport.transportName;\n IframeWrapTransport.needBody = true;\n IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)\n\n IframeWrapTransport.facadeTransport = transport;\n return IframeWrapTransport;\n };\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../../utils/object\": 49,\n \"../iframe\": 22,\n \"inherits\": 57\n }],\n 27: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:polling');\n }\n\n function Polling(Receiver, receiveUrl, AjaxObject) {\n debug(receiveUrl);\n EventEmitter.call(this);\n this.Receiver = Receiver;\n this.receiveUrl = receiveUrl;\n this.AjaxObject = AjaxObject;\n\n this._scheduleReceiver();\n }\n\n inherits(Polling, EventEmitter);\n\n Polling.prototype._scheduleReceiver = function () {\n debug('_scheduleReceiver');\n var self = this;\n var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);\n poll.on('message', function (msg) {\n debug('message', msg);\n self.emit('message', msg);\n });\n poll.once('close', function (code, reason) {\n debug('close', code, reason, self.pollIsClosing);\n self.poll = poll = null;\n\n if (!self.pollIsClosing) {\n if (reason === 'network') {\n self._scheduleReceiver();\n } else {\n self.emit('close', code || 1006, reason);\n self.removeAllListeners();\n }\n }\n });\n };\n\n Polling.prototype.abort = function () {\n debug('abort');\n this.removeAllListeners();\n this.pollIsClosing = true;\n\n if (this.poll) {\n this.poll.abort();\n }\n };\n\n module.exports = Polling;\n }).call(this, {\n env: {}\n });\n }, {\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 28: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var inherits = require('inherits'),\n urlUtils = require('../../utils/url'),\n BufferedSender = require('./buffered-sender'),\n Polling = require('./polling');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender-receiver');\n }\n\n function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {\n var pollUrl = urlUtils.addPath(transUrl, urlSuffix);\n debug(pollUrl);\n var self = this;\n BufferedSender.call(this, transUrl, senderFunc);\n this.poll = new Polling(Receiver, pollUrl, AjaxObject);\n this.poll.on('message', function (msg) {\n debug('poll message', msg);\n self.emit('message', msg);\n });\n this.poll.once('close', function (code, reason) {\n debug('poll close', code, reason);\n self.poll = null;\n self.emit('close', code, reason);\n self.close();\n });\n }\n\n inherits(SenderReceiver, BufferedSender);\n\n SenderReceiver.prototype.close = function () {\n BufferedSender.prototype.close.call(this);\n debug('close');\n this.removeAllListeners();\n\n if (this.poll) {\n this.poll.abort();\n this.poll = null;\n }\n };\n\n module.exports = SenderReceiver;\n }).call(this, {\n env: {}\n });\n }, {\n \"../../utils/url\": 52,\n \"./buffered-sender\": 25,\n \"./polling\": 27,\n \"debug\": 55,\n \"inherits\": 57\n }],\n 29: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter,\n EventSourceDriver = require('eventsource');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:eventsource');\n }\n\n function EventSourceReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n var es = this.es = new EventSourceDriver(url);\n\n es.onmessage = function (e) {\n debug('message', e.data);\n self.emit('message', decodeURI(e.data));\n };\n\n es.onerror = function (e) {\n debug('error', es.readyState, e); // ES on reconnection has readyState = 0 or 1.\n // on network error it's CLOSED = 2\n\n var reason = es.readyState !== 2 ? 'network' : 'permanent';\n\n self._cleanup();\n\n self._close(reason);\n };\n }\n\n inherits(EventSourceReceiver, EventEmitter);\n\n EventSourceReceiver.prototype.abort = function () {\n debug('abort');\n\n this._cleanup();\n\n this._close('user');\n };\n\n EventSourceReceiver.prototype._cleanup = function () {\n debug('cleanup');\n var es = this.es;\n\n if (es) {\n es.onmessage = es.onerror = null;\n es.close();\n this.es = null;\n }\n };\n\n EventSourceReceiver.prototype._close = function (reason) {\n debug('close', reason);\n var self = this; // Safari and chrome < 15 crash if we close window before\n // waiting for ES cleanup. See:\n // https://code.google.com/p/chromium/issues/detail?id=89155\n\n setTimeout(function () {\n self.emit('close', null, reason);\n self.removeAllListeners();\n }, 200);\n };\n\n module.exports = EventSourceReceiver;\n }).call(this, {\n env: {}\n });\n }, {\n \"debug\": 55,\n \"events\": 3,\n \"eventsource\": 18,\n \"inherits\": 57\n }],\n 30: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var inherits = require('inherits'),\n iframeUtils = require('../../utils/iframe'),\n urlUtils = require('../../utils/url'),\n EventEmitter = require('events').EventEmitter,\n random = require('../../utils/random');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:htmlfile');\n }\n\n function HtmlfileReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n iframeUtils.polluteGlobalNamespace();\n this.id = 'a' + random.string(6);\n url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));\n debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);\n var constructFunc = HtmlfileReceiver.htmlfileEnabled ? iframeUtils.createHtmlfile : iframeUtils.createIframe;\n global[iframeUtils.WPrefix][this.id] = {\n start: function () {\n debug('start');\n self.iframeObj.loaded();\n },\n message: function (data) {\n debug('message', data);\n self.emit('message', data);\n },\n stop: function () {\n debug('stop');\n\n self._cleanup();\n\n self._close('network');\n }\n };\n this.iframeObj = constructFunc(url, function () {\n debug('callback');\n\n self._cleanup();\n\n self._close('permanent');\n });\n }\n\n inherits(HtmlfileReceiver, EventEmitter);\n\n HtmlfileReceiver.prototype.abort = function () {\n debug('abort');\n\n this._cleanup();\n\n this._close('user');\n };\n\n HtmlfileReceiver.prototype._cleanup = function () {\n debug('_cleanup');\n\n if (this.iframeObj) {\n this.iframeObj.cleanup();\n this.iframeObj = null;\n }\n\n delete global[iframeUtils.WPrefix][this.id];\n };\n\n HtmlfileReceiver.prototype._close = function (reason) {\n debug('_close', reason);\n this.emit('close', null, reason);\n this.removeAllListeners();\n };\n\n HtmlfileReceiver.htmlfileEnabled = false; // obfuscate to avoid firewalls\n\n var axo = ['Active'].concat('Object').join('X');\n\n if (axo in global) {\n try {\n HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile');\n } catch (x) {// intentionally empty\n }\n }\n\n HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;\n module.exports = HtmlfileReceiver;\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../../utils/iframe\": 47,\n \"../../utils/random\": 50,\n \"../../utils/url\": 52,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 31: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var utils = require('../../utils/iframe'),\n random = require('../../utils/random'),\n browser = require('../../utils/browser'),\n urlUtils = require('../../utils/url'),\n inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:jsonp');\n }\n\n function JsonpReceiver(url) {\n debug(url);\n var self = this;\n EventEmitter.call(this);\n utils.polluteGlobalNamespace();\n this.id = 'a' + random.string(6);\n var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));\n global[utils.WPrefix][this.id] = this._callback.bind(this);\n\n this._createScript(urlWithId); // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.\n\n\n this.timeoutId = setTimeout(function () {\n debug('timeout');\n\n self._abort(new Error('JSONP script loaded abnormally (timeout)'));\n }, JsonpReceiver.timeout);\n }\n\n inherits(JsonpReceiver, EventEmitter);\n\n JsonpReceiver.prototype.abort = function () {\n debug('abort');\n\n if (global[utils.WPrefix][this.id]) {\n var err = new Error('JSONP user aborted read');\n err.code = 1000;\n\n this._abort(err);\n }\n };\n\n JsonpReceiver.timeout = 35000;\n JsonpReceiver.scriptErrorTimeout = 1000;\n\n JsonpReceiver.prototype._callback = function (data) {\n debug('_callback', data);\n\n this._cleanup();\n\n if (this.aborting) {\n return;\n }\n\n if (data) {\n debug('message', data);\n this.emit('message', data);\n }\n\n this.emit('close', null, 'network');\n this.removeAllListeners();\n };\n\n JsonpReceiver.prototype._abort = function (err) {\n debug('_abort', err);\n\n this._cleanup();\n\n this.aborting = true;\n this.emit('close', err.code, err.message);\n this.removeAllListeners();\n };\n\n JsonpReceiver.prototype._cleanup = function () {\n debug('_cleanup');\n clearTimeout(this.timeoutId);\n\n if (this.script2) {\n this.script2.parentNode.removeChild(this.script2);\n this.script2 = null;\n }\n\n if (this.script) {\n var script = this.script; // Unfortunately, you can't really abort script loading of\n // the script.\n\n script.parentNode.removeChild(script);\n script.onreadystatechange = script.onerror = script.onload = script.onclick = null;\n this.script = null;\n }\n\n delete global[utils.WPrefix][this.id];\n };\n\n JsonpReceiver.prototype._scriptError = function () {\n debug('_scriptError');\n var self = this;\n\n if (this.errorTimer) {\n return;\n }\n\n this.errorTimer = setTimeout(function () {\n if (!self.loadedOkay) {\n self._abort(new Error('JSONP script loaded abnormally (onerror)'));\n }\n }, JsonpReceiver.scriptErrorTimeout);\n };\n\n JsonpReceiver.prototype._createScript = function (url) {\n debug('_createScript', url);\n var self = this;\n var script = this.script = global.document.createElement('script');\n var script2; // Opera synchronous load trick.\n\n script.id = 'a' + random.string(8);\n script.src = url;\n script.type = 'text/javascript';\n script.charset = 'UTF-8';\n script.onerror = this._scriptError.bind(this);\n\n script.onload = function () {\n debug('onload');\n\n self._abort(new Error('JSONP script loaded abnormally (onload)'));\n }; // IE9 fires 'error' event after onreadystatechange or before, in random order.\n // Use loadedOkay to determine if actually errored\n\n\n script.onreadystatechange = function () {\n debug('onreadystatechange', script.readyState);\n\n if (/loaded|closed/.test(script.readyState)) {\n if (script && script.htmlFor && script.onclick) {\n self.loadedOkay = true;\n\n try {\n // In IE, actually execute the script.\n script.onclick();\n } catch (x) {// intentionally empty\n }\n }\n\n if (script) {\n self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));\n }\n }\n }; // IE: event/htmlFor/onclick trick.\n // One can't rely on proper order for onreadystatechange. In order to\n // make sure, set a 'htmlFor' and 'event' properties, so that\n // script code will be installed as 'onclick' handler for the\n // script object. Later, onreadystatechange, manually execute this\n // code. FF and Chrome doesn't work with 'event' and 'htmlFor'\n // set. For reference see:\n // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html\n // Also, read on that about script ordering:\n // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order\n\n\n if (typeof script.async === 'undefined' && global.document.attachEvent) {\n // According to mozilla docs, in recent browsers script.async defaults\n // to 'true', so we may use it to detect a good browser:\n // https://developer.mozilla.org/en/HTML/Element/script\n if (!browser.isOpera()) {\n // Naively assume we're in IE\n try {\n script.htmlFor = script.id;\n script.event = 'onclick';\n } catch (x) {// intentionally empty\n }\n\n script.async = true;\n } else {\n // Opera, second sync script hack\n script2 = this.script2 = global.document.createElement('script');\n script2.text = \"try{var a = document.getElementById('\" + script.id + \"'); if(a)a.onerror();}catch(x){};\";\n script.async = script2.async = false;\n }\n }\n\n if (typeof script.async !== 'undefined') {\n script.async = true;\n }\n\n var head = global.document.getElementsByTagName('head')[0];\n head.insertBefore(script, head.firstChild);\n\n if (script2) {\n head.insertBefore(script2, head.firstChild);\n }\n };\n\n module.exports = JsonpReceiver;\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../../utils/browser\": 44,\n \"../../utils/iframe\": 47,\n \"../../utils/random\": 50,\n \"../../utils/url\": 52,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 32: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter;\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:xhr');\n }\n\n function XhrReceiver(url, AjaxObject) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n this.bufferPosition = 0;\n this.xo = new AjaxObject('POST', url, null);\n this.xo.on('chunk', this._chunkHandler.bind(this));\n this.xo.once('finish', function (status, text) {\n debug('finish', status, text);\n\n self._chunkHandler(status, text);\n\n self.xo = null;\n var reason = status === 200 ? 'network' : 'permanent';\n debug('close', reason);\n self.emit('close', null, reason);\n\n self._cleanup();\n });\n }\n\n inherits(XhrReceiver, EventEmitter);\n\n XhrReceiver.prototype._chunkHandler = function (status, text) {\n debug('_chunkHandler', status);\n\n if (status !== 200 || !text) {\n return;\n }\n\n for (var idx = -1;; this.bufferPosition += idx + 1) {\n var buf = text.slice(this.bufferPosition);\n idx = buf.indexOf('\\n');\n\n if (idx === -1) {\n break;\n }\n\n var msg = buf.slice(0, idx);\n\n if (msg) {\n debug('message', msg);\n this.emit('message', msg);\n }\n }\n };\n\n XhrReceiver.prototype._cleanup = function () {\n debug('_cleanup');\n this.removeAllListeners();\n };\n\n XhrReceiver.prototype.abort = function () {\n debug('abort');\n\n if (this.xo) {\n this.xo.close();\n debug('close');\n this.emit('close', null, 'user');\n this.xo = null;\n }\n\n this._cleanup();\n };\n\n module.exports = XhrReceiver;\n }).call(this, {\n env: {}\n });\n }, {\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 33: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var random = require('../../utils/random'),\n urlUtils = require('../../utils/url');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:jsonp');\n }\n\n var form, area;\n\n function createIframe(id) {\n debug('createIframe', id);\n\n try {\n // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n return global.document.createElement('<iframe name=\"' + id + '\">');\n } catch (x) {\n var iframe = global.document.createElement('iframe');\n iframe.name = id;\n return iframe;\n }\n }\n\n function createForm() {\n debug('createForm');\n form = global.document.createElement('form');\n form.style.display = 'none';\n form.style.position = 'absolute';\n form.method = 'POST';\n form.enctype = 'application/x-www-form-urlencoded';\n form.acceptCharset = 'UTF-8';\n area = global.document.createElement('textarea');\n area.name = 'd';\n form.appendChild(area);\n global.document.body.appendChild(form);\n }\n\n module.exports = function (url, payload, callback) {\n debug(url, payload);\n\n if (!form) {\n createForm();\n }\n\n var id = 'a' + random.string(8);\n form.target = id;\n form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);\n var iframe = createIframe(id);\n iframe.id = id;\n iframe.style.display = 'none';\n form.appendChild(iframe);\n\n try {\n area.value = payload;\n } catch (e) {// seriously broken browsers get here\n }\n\n form.submit();\n\n var completed = function (err) {\n debug('completed', id, err);\n\n if (!iframe.onerror) {\n return;\n }\n\n iframe.onreadystatechange = iframe.onerror = iframe.onload = null; // Opera mini doesn't like if we GC iframe\n // immediately, thus this timeout.\n\n setTimeout(function () {\n debug('cleaning up', id);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }, 500);\n area.value = ''; // It is not possible to detect if the iframe succeeded or\n // failed to submit our form.\n\n callback(err);\n };\n\n iframe.onerror = function () {\n debug('onerror', id);\n completed();\n };\n\n iframe.onload = function () {\n debug('onload', id);\n completed();\n };\n\n iframe.onreadystatechange = function (e) {\n debug('onreadystatechange', id, iframe.readyState, e);\n\n if (iframe.readyState === 'complete') {\n completed();\n }\n };\n\n return function () {\n debug('aborted', id);\n completed(new Error('Aborted'));\n };\n };\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../../utils/random\": 50,\n \"../../utils/url\": 52,\n \"debug\": 55\n }],\n 34: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var EventEmitter = require('events').EventEmitter,\n inherits = require('inherits'),\n eventUtils = require('../../utils/event'),\n browser = require('../../utils/browser'),\n urlUtils = require('../../utils/url');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:xdr');\n } // References:\n // http://ajaxian.com/archives/100-line-ajax-wrapper\n // http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx\n\n\n function XDRObject(method, url, payload) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n setTimeout(function () {\n self._start(method, url, payload);\n }, 0);\n }\n\n inherits(XDRObject, EventEmitter);\n\n XDRObject.prototype._start = function (method, url, payload) {\n debug('_start');\n var self = this;\n var xdr = new global.XDomainRequest(); // IE caches even POSTs\n\n url = urlUtils.addQuery(url, 't=' + +new Date());\n\n xdr.onerror = function () {\n debug('onerror');\n\n self._error();\n };\n\n xdr.ontimeout = function () {\n debug('ontimeout');\n\n self._error();\n };\n\n xdr.onprogress = function () {\n debug('progress', xdr.responseText);\n self.emit('chunk', 200, xdr.responseText);\n };\n\n xdr.onload = function () {\n debug('load');\n self.emit('finish', 200, xdr.responseText);\n\n self._cleanup(false);\n };\n\n this.xdr = xdr;\n this.unloadRef = eventUtils.unloadAdd(function () {\n self._cleanup(true);\n });\n\n try {\n // Fails with AccessDenied if port number is bogus\n this.xdr.open(method, url);\n\n if (this.timeout) {\n this.xdr.timeout = this.timeout;\n }\n\n this.xdr.send(payload);\n } catch (x) {\n this._error();\n }\n };\n\n XDRObject.prototype._error = function () {\n this.emit('finish', 0, '');\n\n this._cleanup(false);\n };\n\n XDRObject.prototype._cleanup = function (abort) {\n debug('cleanup', abort);\n\n if (!this.xdr) {\n return;\n }\n\n this.removeAllListeners();\n eventUtils.unloadDel(this.unloadRef);\n this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;\n\n if (abort) {\n try {\n this.xdr.abort();\n } catch (x) {// intentionally empty\n }\n }\n\n this.unloadRef = this.xdr = null;\n };\n\n XDRObject.prototype.close = function () {\n debug('close');\n\n this._cleanup(true);\n }; // IE 8/9 if the request target uses the same scheme - #79\n\n\n XDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain());\n module.exports = XDRObject;\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../../utils/browser\": 44,\n \"../../utils/event\": 46,\n \"../../utils/url\": 52,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 35: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n XhrDriver = require('../driver/xhr');\n\n function XHRCorsObject(method, url, payload, opts) {\n XhrDriver.call(this, method, url, payload, opts);\n }\n\n inherits(XHRCorsObject, XhrDriver);\n XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;\n module.exports = XHRCorsObject;\n }, {\n \"../driver/xhr\": 17,\n \"inherits\": 57\n }],\n 36: [function (require, module, exports) {\n 'use strict';\n\n var EventEmitter = require('events').EventEmitter,\n inherits = require('inherits');\n\n function XHRFake() {\n var self = this;\n EventEmitter.call(this);\n this.to = setTimeout(function () {\n self.emit('finish', 200, '{}');\n }, XHRFake.timeout);\n }\n\n inherits(XHRFake, EventEmitter);\n\n XHRFake.prototype.close = function () {\n clearTimeout(this.to);\n };\n\n XHRFake.timeout = 2000;\n module.exports = XHRFake;\n }, {\n \"events\": 3,\n \"inherits\": 57\n }],\n 37: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n XhrDriver = require('../driver/xhr');\n\n function XHRLocalObject(method, url, payload\n /*, opts */\n ) {\n XhrDriver.call(this, method, url, payload, {\n noCredentials: true\n });\n }\n\n inherits(XHRLocalObject, XhrDriver);\n XHRLocalObject.enabled = XhrDriver.enabled;\n module.exports = XHRLocalObject;\n }, {\n \"../driver/xhr\": 17,\n \"inherits\": 57\n }],\n 38: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var utils = require('../utils/event'),\n urlUtils = require('../utils/url'),\n inherits = require('inherits'),\n EventEmitter = require('events').EventEmitter,\n WebsocketDriver = require('./driver/websocket');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:websocket');\n }\n\n function WebSocketTransport(transUrl, ignore, options) {\n if (!WebSocketTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n EventEmitter.call(this);\n debug('constructor', transUrl);\n var self = this;\n var url = urlUtils.addPath(transUrl, '/websocket');\n\n if (url.slice(0, 5) === 'https') {\n url = 'wss' + url.slice(5);\n } else {\n url = 'ws' + url.slice(4);\n }\n\n this.url = url;\n this.ws = new WebsocketDriver(this.url, [], options);\n\n this.ws.onmessage = function (e) {\n debug('message event', e.data);\n self.emit('message', e.data);\n }; // Firefox has an interesting bug. If a websocket connection is\n // created after onunload, it stays alive even when user\n // navigates away from the page. In such situation let's lie -\n // let's not open the ws connection at all. See:\n // https://github.com/sockjs/sockjs-client/issues/28\n // https://bugzilla.mozilla.org/show_bug.cgi?id=696085\n\n\n this.unloadRef = utils.unloadAdd(function () {\n debug('unload');\n self.ws.close();\n });\n\n this.ws.onclose = function (e) {\n debug('close event', e.code, e.reason);\n self.emit('close', e.code, e.reason);\n\n self._cleanup();\n };\n\n this.ws.onerror = function (e) {\n debug('error event', e);\n self.emit('close', 1006, 'WebSocket connection broken');\n\n self._cleanup();\n };\n }\n\n inherits(WebSocketTransport, EventEmitter);\n\n WebSocketTransport.prototype.send = function (data) {\n var msg = '[' + data + ']';\n debug('send', msg);\n this.ws.send(msg);\n };\n\n WebSocketTransport.prototype.close = function () {\n debug('close');\n var ws = this.ws;\n\n this._cleanup();\n\n if (ws) {\n ws.close();\n }\n };\n\n WebSocketTransport.prototype._cleanup = function () {\n debug('_cleanup');\n var ws = this.ws;\n\n if (ws) {\n ws.onmessage = ws.onclose = ws.onerror = null;\n }\n\n utils.unloadDel(this.unloadRef);\n this.unloadRef = this.ws = null;\n this.removeAllListeners();\n };\n\n WebSocketTransport.enabled = function () {\n debug('enabled');\n return !!WebsocketDriver;\n };\n\n WebSocketTransport.transportName = 'websocket'; // In theory, ws should require 1 round trip. But in chrome, this is\n // not very stable over SSL. Most likely a ws connection requires a\n // separate SSL connection, in which case 2 round trips are an\n // absolute minumum.\n\n WebSocketTransport.roundTrips = 2;\n module.exports = WebSocketTransport;\n }).call(this, {\n env: {}\n });\n }, {\n \"../utils/event\": 46,\n \"../utils/url\": 52,\n \"./driver/websocket\": 19,\n \"debug\": 55,\n \"events\": 3,\n \"inherits\": 57\n }],\n 39: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XdrStreamingTransport = require('./xdr-streaming'),\n XhrReceiver = require('./receiver/xhr'),\n XDRObject = require('./sender/xdr');\n\n function XdrPollingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);\n }\n\n inherits(XdrPollingTransport, AjaxBasedTransport);\n XdrPollingTransport.enabled = XdrStreamingTransport.enabled;\n XdrPollingTransport.transportName = 'xdr-polling';\n XdrPollingTransport.roundTrips = 2; // preflight, ajax\n\n module.exports = XdrPollingTransport;\n }, {\n \"./lib/ajax-based\": 24,\n \"./receiver/xhr\": 32,\n \"./sender/xdr\": 34,\n \"./xdr-streaming\": 40,\n \"inherits\": 57\n }],\n 40: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XhrReceiver = require('./receiver/xhr'),\n XDRObject = require('./sender/xdr'); // According to:\n // http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests\n // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/\n\n\n function XdrStreamingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);\n }\n\n inherits(XdrStreamingTransport, AjaxBasedTransport);\n\n XdrStreamingTransport.enabled = function (info) {\n if (info.cookie_needed || info.nullOrigin) {\n return false;\n }\n\n return XDRObject.enabled && info.sameScheme;\n };\n\n XdrStreamingTransport.transportName = 'xdr-streaming';\n XdrStreamingTransport.roundTrips = 2; // preflight, ajax\n\n module.exports = XdrStreamingTransport;\n }, {\n \"./lib/ajax-based\": 24,\n \"./receiver/xhr\": 32,\n \"./sender/xdr\": 34,\n \"inherits\": 57\n }],\n 41: [function (require, module, exports) {\n 'use strict';\n\n var inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XhrReceiver = require('./receiver/xhr'),\n XHRCorsObject = require('./sender/xhr-cors'),\n XHRLocalObject = require('./sender/xhr-local');\n\n function XhrPollingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);\n }\n\n inherits(XhrPollingTransport, AjaxBasedTransport);\n\n XhrPollingTransport.enabled = function (info) {\n if (info.nullOrigin) {\n return false;\n }\n\n if (XHRLocalObject.enabled && info.sameOrigin) {\n return true;\n }\n\n return XHRCorsObject.enabled;\n };\n\n XhrPollingTransport.transportName = 'xhr-polling';\n XhrPollingTransport.roundTrips = 2; // preflight, ajax\n\n module.exports = XhrPollingTransport;\n }, {\n \"./lib/ajax-based\": 24,\n \"./receiver/xhr\": 32,\n \"./sender/xhr-cors\": 35,\n \"./sender/xhr-local\": 37,\n \"inherits\": 57\n }],\n 42: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var inherits = require('inherits'),\n AjaxBasedTransport = require('./lib/ajax-based'),\n XhrReceiver = require('./receiver/xhr'),\n XHRCorsObject = require('./sender/xhr-cors'),\n XHRLocalObject = require('./sender/xhr-local'),\n browser = require('../utils/browser');\n\n function XhrStreamingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);\n }\n\n inherits(XhrStreamingTransport, AjaxBasedTransport);\n\n XhrStreamingTransport.enabled = function (info) {\n if (info.nullOrigin) {\n return false;\n } // Opera doesn't support xhr-streaming #60\n // But it might be able to #92\n\n\n if (browser.isOpera()) {\n return false;\n }\n\n return XHRCorsObject.enabled;\n };\n\n XhrStreamingTransport.transportName = 'xhr-streaming';\n XhrStreamingTransport.roundTrips = 2; // preflight, ajax\n // Safari gets confused when a streaming ajax request is started\n // before onload. This causes the load indicator to spin indefinetely.\n // Only require body when used in a browser\n\n XhrStreamingTransport.needBody = !!global.document;\n module.exports = XhrStreamingTransport;\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"../utils/browser\": 44,\n \"./lib/ajax-based\": 24,\n \"./receiver/xhr\": 32,\n \"./sender/xhr-cors\": 35,\n \"./sender/xhr-local\": 37,\n \"inherits\": 57\n }],\n 43: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n if (global.crypto && global.crypto.getRandomValues) {\n module.exports.randomBytes = function (length) {\n var bytes = new Uint8Array(length);\n global.crypto.getRandomValues(bytes);\n return bytes;\n };\n } else {\n module.exports.randomBytes = function (length) {\n var bytes = new Array(length);\n\n for (var i = 0; i < length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n\n return bytes;\n };\n }\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 44: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n module.exports = {\n isOpera: function () {\n return global.navigator && /opera/i.test(global.navigator.userAgent);\n },\n isKonqueror: function () {\n return global.navigator && /konqueror/i.test(global.navigator.userAgent);\n } // #187 wrap document.domain in try/catch because of WP8 from file:///\n ,\n hasDomain: function () {\n // non-browser client always has a domain\n if (!global.document) {\n return true;\n }\n\n try {\n return !!global.document.domain;\n } catch (e) {\n return false;\n }\n }\n };\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 45: [function (require, module, exports) {\n 'use strict';\n\n var JSON3 = require('json3'); // Some extra characters that Chrome gets wrong, and substitutes with\n // something else on the wire.\n // eslint-disable-next-line no-control-regex, no-misleading-character-class\n\n\n var extraEscapable = /[\\x00-\\x1f\\ud800-\\udfff\\ufffe\\uffff\\u0300-\\u0333\\u033d-\\u0346\\u034a-\\u034c\\u0350-\\u0352\\u0357-\\u0358\\u035c-\\u0362\\u0374\\u037e\\u0387\\u0591-\\u05af\\u05c4\\u0610-\\u0617\\u0653-\\u0654\\u0657-\\u065b\\u065d-\\u065e\\u06df-\\u06e2\\u06eb-\\u06ec\\u0730\\u0732-\\u0733\\u0735-\\u0736\\u073a\\u073d\\u073f-\\u0741\\u0743\\u0745\\u0747\\u07eb-\\u07f1\\u0951\\u0958-\\u095f\\u09dc-\\u09dd\\u09df\\u0a33\\u0a36\\u0a59-\\u0a5b\\u0a5e\\u0b5c-\\u0b5d\\u0e38-\\u0e39\\u0f43\\u0f4d\\u0f52\\u0f57\\u0f5c\\u0f69\\u0f72-\\u0f76\\u0f78\\u0f80-\\u0f83\\u0f93\\u0f9d\\u0fa2\\u0fa7\\u0fac\\u0fb9\\u1939-\\u193a\\u1a17\\u1b6b\\u1cda-\\u1cdb\\u1dc0-\\u1dcf\\u1dfc\\u1dfe\\u1f71\\u1f73\\u1f75\\u1f77\\u1f79\\u1f7b\\u1f7d\\u1fbb\\u1fbe\\u1fc9\\u1fcb\\u1fd3\\u1fdb\\u1fe3\\u1feb\\u1fee-\\u1fef\\u1ff9\\u1ffb\\u1ffd\\u2000-\\u2001\\u20d0-\\u20d1\\u20d4-\\u20d7\\u20e7-\\u20e9\\u2126\\u212a-\\u212b\\u2329-\\u232a\\u2adc\\u302b-\\u302c\\uaab2-\\uaab3\\uf900-\\ufa0d\\ufa10\\ufa12\\ufa15-\\ufa1e\\ufa20\\ufa22\\ufa25-\\ufa26\\ufa2a-\\ufa2d\\ufa30-\\ufa6d\\ufa70-\\ufad9\\ufb1d\\ufb1f\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufb4e\\ufff0-\\uffff]/g,\n extraLookup; // This may be quite slow, so let's delay until user actually uses bad\n // characters.\n\n var unrollLookup = function (escapable) {\n var i;\n var unrolled = {};\n var c = [];\n\n for (i = 0; i < 65536; i++) {\n c.push(String.fromCharCode(i));\n }\n\n escapable.lastIndex = 0;\n c.join('').replace(escapable, function (a) {\n unrolled[a] = '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n return '';\n });\n escapable.lastIndex = 0;\n return unrolled;\n }; // Quote string, also taking care of unicode characters that browsers\n // often break. Especially, take care of unicode surrogates:\n // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates\n\n\n module.exports = {\n quote: function (string) {\n var quoted = JSON3.stringify(string); // In most cases this should be very fast and good enough.\n\n extraEscapable.lastIndex = 0;\n\n if (!extraEscapable.test(quoted)) {\n return quoted;\n }\n\n if (!extraLookup) {\n extraLookup = unrollLookup(extraEscapable);\n }\n\n return quoted.replace(extraEscapable, function (a) {\n return extraLookup[a];\n });\n }\n };\n }, {\n \"json3\": 58\n }],\n 46: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var random = require('./random');\n\n var onUnload = {},\n afterUnload = false // detect google chrome packaged apps because they don't allow the 'unload' event\n ,\n isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime;\n module.exports = {\n attachEvent: function (event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.addEventListener(event, listener, false);\n } else if (global.document && global.attachEvent) {\n // IE quirks.\n // According to: http://stevesouders.com/misc/test-postmessage.php\n // the message gets delivered only to 'document', not 'window'.\n global.document.attachEvent('on' + event, listener); // I get 'window' for ie8.\n\n global.attachEvent('on' + event, listener);\n }\n },\n detachEvent: function (event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.removeEventListener(event, listener, false);\n } else if (global.document && global.detachEvent) {\n global.document.detachEvent('on' + event, listener);\n global.detachEvent('on' + event, listener);\n }\n },\n unloadAdd: function (listener) {\n if (isChromePackagedApp) {\n return null;\n }\n\n var ref = random.string(8);\n onUnload[ref] = listener;\n\n if (afterUnload) {\n setTimeout(this.triggerUnloadCallbacks, 0);\n }\n\n return ref;\n },\n unloadDel: function (ref) {\n if (ref in onUnload) {\n delete onUnload[ref];\n }\n },\n triggerUnloadCallbacks: function () {\n for (var ref in onUnload) {\n onUnload[ref]();\n delete onUnload[ref];\n }\n }\n };\n\n var unloadTriggered = function () {\n if (afterUnload) {\n return;\n }\n\n afterUnload = true;\n module.exports.triggerUnloadCallbacks();\n }; // 'unload' alone is not reliable in opera within an iframe, but we\n // can't use `beforeunload` as IE fires it on javascript: links.\n\n\n if (!isChromePackagedApp) {\n module.exports.attachEvent('unload', unloadTriggered);\n }\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"./random\": 50\n }],\n 47: [function (require, module, exports) {\n (function (process, global) {\n 'use strict';\n\n var eventUtils = require('./event'),\n JSON3 = require('json3'),\n browser = require('./browser');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:iframe');\n }\n\n module.exports = {\n WPrefix: '_jp',\n currentWindowId: null,\n polluteGlobalNamespace: function () {\n if (!(module.exports.WPrefix in global)) {\n global[module.exports.WPrefix] = {};\n }\n },\n postMessage: function (type, data) {\n if (global.parent !== global) {\n global.parent.postMessage(JSON3.stringify({\n windowId: module.exports.currentWindowId,\n type: type,\n data: data || ''\n }), '*');\n } else {\n debug('Cannot postMessage, no parent window.', type, data);\n }\n },\n createIframe: function (iframeUrl, errorCallback) {\n var iframe = global.document.createElement('iframe');\n var tref, unloadRef;\n\n var unattach = function () {\n debug('unattach');\n clearTimeout(tref); // Explorer had problems with that.\n\n try {\n iframe.onload = null;\n } catch (x) {// intentionally empty\n }\n\n iframe.onerror = null;\n };\n\n var cleanup = function () {\n debug('cleanup');\n\n if (iframe) {\n unattach(); // This timeout makes chrome fire onbeforeunload event\n // within iframe. Without the timeout it goes straight to\n // onunload.\n\n setTimeout(function () {\n if (iframe) {\n iframe.parentNode.removeChild(iframe);\n }\n\n iframe = null;\n }, 0);\n eventUtils.unloadDel(unloadRef);\n }\n };\n\n var onerror = function (err) {\n debug('onerror', err);\n\n if (iframe) {\n cleanup();\n errorCallback(err);\n }\n };\n\n var post = function (msg, origin) {\n debug('post', msg, origin);\n setTimeout(function () {\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n if (iframe && iframe.contentWindow) {\n iframe.contentWindow.postMessage(msg, origin);\n }\n } catch (x) {// intentionally empty\n }\n }, 0);\n };\n\n iframe.src = iframeUrl;\n iframe.style.display = 'none';\n iframe.style.position = 'absolute';\n\n iframe.onerror = function () {\n onerror('onerror');\n };\n\n iframe.onload = function () {\n debug('onload'); // `onload` is triggered before scripts on the iframe are\n // executed. Give it few seconds to actually load stuff.\n\n clearTimeout(tref);\n tref = setTimeout(function () {\n onerror('onload timeout');\n }, 2000);\n };\n\n global.document.body.appendChild(iframe);\n tref = setTimeout(function () {\n onerror('timeout');\n }, 15000);\n unloadRef = eventUtils.unloadAdd(cleanup);\n return {\n post: post,\n cleanup: cleanup,\n loaded: unattach\n };\n }\n /* eslint no-undef: \"off\", new-cap: \"off\" */\n ,\n createHtmlfile: function (iframeUrl, errorCallback) {\n var axo = ['Active'].concat('Object').join('X');\n var doc = new global[axo]('htmlfile');\n var tref, unloadRef;\n var iframe;\n\n var unattach = function () {\n clearTimeout(tref);\n iframe.onerror = null;\n };\n\n var cleanup = function () {\n if (doc) {\n unattach();\n eventUtils.unloadDel(unloadRef);\n iframe.parentNode.removeChild(iframe);\n iframe = doc = null;\n CollectGarbage();\n }\n };\n\n var onerror = function (r) {\n debug('onerror', r);\n\n if (doc) {\n cleanup();\n errorCallback(r);\n }\n };\n\n var post = function (msg, origin) {\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n setTimeout(function () {\n if (iframe && iframe.contentWindow) {\n iframe.contentWindow.postMessage(msg, origin);\n }\n }, 0);\n } catch (x) {// intentionally empty\n }\n };\n\n doc.open();\n doc.write('<html><s' + 'cript>' + 'document.domain=\"' + global.document.domain + '\";' + '</s' + 'cript></html>');\n doc.close();\n doc.parentWindow[module.exports.WPrefix] = global[module.exports.WPrefix];\n var c = doc.createElement('div');\n doc.body.appendChild(c);\n iframe = doc.createElement('iframe');\n c.appendChild(iframe);\n iframe.src = iframeUrl;\n\n iframe.onerror = function () {\n onerror('onerror');\n };\n\n tref = setTimeout(function () {\n onerror('timeout');\n }, 15000);\n unloadRef = eventUtils.unloadAdd(cleanup);\n return {\n post: post,\n cleanup: cleanup,\n loaded: unattach\n };\n }\n };\n module.exports.iframeEnabled = false;\n\n if (global.document) {\n // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with\n // huge delay, or not at all.\n module.exports.iframeEnabled = (typeof global.postMessage === 'function' || typeof global.postMessage === 'object') && !browser.isKonqueror();\n }\n }).call(this, {\n env: {}\n }, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"./browser\": 44,\n \"./event\": 46,\n \"debug\": 55,\n \"json3\": 58\n }],\n 48: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var logObject = {};\n ['log', 'debug', 'warn'].forEach(function (level) {\n var levelExists;\n\n try {\n levelExists = global.console && global.console[level] && global.console[level].apply;\n } catch (e) {// do nothing\n }\n\n logObject[level] = levelExists ? function () {\n return global.console[level].apply(global.console, arguments);\n } : level === 'log' ? function () {} : logObject.log;\n });\n module.exports = logObject;\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 49: [function (require, module, exports) {\n 'use strict';\n\n module.exports = {\n isObject: function (obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n },\n extend: function (obj) {\n if (!this.isObject(obj)) {\n return obj;\n }\n\n var source, prop;\n\n for (var i = 1, length = arguments.length; i < length; i++) {\n source = arguments[i];\n\n for (prop in source) {\n if (Object.prototype.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n }\n\n return obj;\n }\n };\n }, {}],\n 50: [function (require, module, exports) {\n 'use strict';\n\n var crypto = require('crypto'); // This string has length 32, a power of 2, so the modulus doesn't introduce a\n // bias.\n\n\n var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';\n module.exports = {\n string: function (length) {\n var max = _randomStringChars.length;\n var bytes = crypto.randomBytes(length);\n var ret = [];\n\n for (var i = 0; i < length; i++) {\n ret.push(_randomStringChars.substr(bytes[i] % max, 1));\n }\n\n return ret.join('');\n },\n number: function (max) {\n return Math.floor(Math.random() * max);\n },\n numberString: function (max) {\n var t = ('' + (max - 1)).length;\n var p = new Array(t + 1).join('0');\n return (p + this.number(max)).slice(-t);\n }\n };\n }, {\n \"crypto\": 43\n }],\n 51: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:transport');\n }\n\n module.exports = function (availableTransports) {\n return {\n filterToEnabled: function (transportsWhitelist, info) {\n var transports = {\n main: [],\n facade: []\n };\n\n if (!transportsWhitelist) {\n transportsWhitelist = [];\n } else if (typeof transportsWhitelist === 'string') {\n transportsWhitelist = [transportsWhitelist];\n }\n\n availableTransports.forEach(function (trans) {\n if (!trans) {\n return;\n }\n\n if (trans.transportName === 'websocket' && info.websocket === false) {\n debug('disabled from server', 'websocket');\n return;\n }\n\n if (transportsWhitelist.length && transportsWhitelist.indexOf(trans.transportName) === -1) {\n debug('not in whitelist', trans.transportName);\n return;\n }\n\n if (trans.enabled(info)) {\n debug('enabled', trans.transportName);\n transports.main.push(trans);\n\n if (trans.facadeTransport) {\n transports.facade.push(trans.facadeTransport);\n }\n } else {\n debug('disabled', trans.transportName);\n }\n });\n return transports;\n }\n };\n };\n }).call(this, {\n env: {}\n });\n }, {\n \"debug\": 55\n }],\n 52: [function (require, module, exports) {\n (function (process) {\n 'use strict';\n\n var URL = require('url-parse');\n\n var debug = function () {};\n\n if (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:url');\n }\n\n module.exports = {\n getOrigin: function (url) {\n if (!url) {\n return null;\n }\n\n var p = new URL(url);\n\n if (p.protocol === 'file:') {\n return null;\n }\n\n var port = p.port;\n\n if (!port) {\n port = p.protocol === 'https:' ? '443' : '80';\n }\n\n return p.protocol + '//' + p.hostname + ':' + port;\n },\n isOriginEqual: function (a, b) {\n var res = this.getOrigin(a) === this.getOrigin(b);\n debug('same', a, b, res);\n return res;\n },\n isSchemeEqual: function (a, b) {\n return a.split(':')[0] === b.split(':')[0];\n },\n addPath: function (url, path) {\n var qs = url.split('?');\n return qs[0] + path + (qs[1] ? '?' + qs[1] : '');\n },\n addQuery: function (url, q) {\n return url + (url.indexOf('?') === -1 ? '?' + q : '&' + q);\n },\n isLoopbackAddr: function (addr) {\n return /^127\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/i.test(addr) || /^\\[::1\\]$/.test(addr);\n }\n };\n }).call(this, {\n env: {}\n });\n }, {\n \"debug\": 55,\n \"url-parse\": 61\n }],\n 53: [function (require, module, exports) {\n module.exports = '1.5.2';\n }, {}],\n 54: [function (require, module, exports) {\n /**\n * Helpers.\n */\n var s = 1000;\n var m = s * 60;\n var h = m * 60;\n var d = h * 24;\n var w = d * 7;\n var y = d * 365.25;\n /**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\n module.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n\n throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));\n };\n /**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\n\n function parse(str) {\n str = String(str);\n\n if (str.length > 100) {\n return;\n }\n\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n\n if (!match) {\n return;\n }\n\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n\n default:\n return undefined;\n }\n }\n /**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\n\n function fmtShort(ms) {\n var msAbs = Math.abs(ms);\n\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n\n return ms + 'ms';\n }\n /**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\n\n function fmtLong(ms) {\n var msAbs = Math.abs(ms);\n\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n\n return ms + ' ms';\n }\n /**\n * Pluralization helper.\n */\n\n\n function plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n }\n }, {}],\n 55: [function (require, module, exports) {\n (function (process) {\n \"use strict\";\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n /* eslint-env browser */\n\n /**\n * This is the web browser implementation of `debug()`.\n */\n\n\n exports.log = log;\n exports.formatArgs = formatArgs;\n exports.save = save;\n exports.load = load;\n exports.useColors = useColors;\n exports.storage = localstorage();\n /**\n * Colors.\n */\n\n exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];\n /**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n // eslint-disable-next-line complexity\n\n function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true;\n } // Internet Explorer and Edge do not support colors.\n\n\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n } // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }\n /**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\n\n function formatArgs(args) {\n args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);\n\n if (!this.useColors) {\n return;\n }\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit'); // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function (match) {\n if (match === '%%') {\n return;\n }\n\n index++;\n\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n args.splice(lastC, 0, c);\n }\n /**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\n\n function log() {\n var _console; // This hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n\n\n return (typeof console === \"undefined\" ? \"undefined\" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);\n }\n /**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\n\n function save(namespaces) {\n try {\n if (namespaces) {\n exports.storage.setItem('debug', namespaces);\n } else {\n exports.storage.removeItem('debug');\n }\n } catch (error) {// Swallow\n // XXX (@Qix-) should we be logging these?\n }\n }\n /**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\n\n function load() {\n var r;\n\n try {\n r = exports.storage.getItem('debug');\n } catch (error) {} // Swallow\n // XXX (@Qix-) should we be logging these?\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\n\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n }\n /**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\n\n function localstorage() {\n try {\n // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n // The Browser also has localStorage in the global context.\n return localStorage;\n } catch (error) {// Swallow\n // XXX (@Qix-) should we be logging these?\n }\n }\n\n module.exports = require('./common')(exports);\n var formatters = module.exports.formatters;\n /**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\n formatters.j = function (v) {\n try {\n return JSON.stringify(v);\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + error.message;\n }\n };\n }).call(this, {\n env: {}\n });\n }, {\n \"./common\": 56\n }],\n 56: [function (require, module, exports) {\n \"use strict\";\n /**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\n function setup(env) {\n createDebug.debug = createDebug;\n createDebug.default = createDebug;\n createDebug.coerce = coerce;\n createDebug.disable = disable;\n createDebug.enable = enable;\n createDebug.enabled = enabled;\n createDebug.humanize = require('ms');\n Object.keys(env).forEach(function (key) {\n createDebug[key] = env[key];\n });\n /**\n * Active `debug` instances.\n */\n\n createDebug.instances = [];\n /**\n * The currently active debug mode names, and names to skip.\n */\n\n createDebug.names = [];\n createDebug.skips = [];\n /**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\n createDebug.formatters = {};\n /**\n * Selects a color for a debug namespace\n * @param {String} namespace The namespace string for the for the debug instance to be colored\n * @return {Number|String} An ANSI color code for the given namespace\n * @api private\n */\n\n function selectColor(namespace) {\n var hash = 0;\n\n for (var i = 0; i < namespace.length; i++) {\n hash = (hash << 5) - hash + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n }\n\n createDebug.selectColor = selectColor;\n /**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\n function createDebug(namespace) {\n var prevTime;\n\n function debug() {\n // Disabled?\n if (!debug.enabled) {\n return;\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var self = debug; // Set `diff` timestamp\n\n var curr = Number(new Date());\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n args[0] = createDebug.coerce(args[0]);\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O');\n } // Apply any `formatters` transformations\n\n\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {\n // If we encounter an escaped % then don't increase the array index\n if (match === '%%') {\n return match;\n }\n\n index++;\n var formatter = createDebug.formatters[format];\n\n if (typeof formatter === 'function') {\n var val = args[index];\n match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`\n\n args.splice(index, 1);\n index--;\n }\n\n return match;\n }); // Apply env-specific formatting (colors, etc.)\n\n createDebug.formatArgs.call(self, args);\n var logFn = self.log || createDebug.log;\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = createDebug.enabled(namespace);\n debug.useColors = createDebug.useColors();\n debug.color = selectColor(namespace);\n debug.destroy = destroy;\n debug.extend = extend; // Debug.formatArgs = formatArgs;\n // debug.rawLog = rawLog;\n // env-specific initialization logic for debug instances\n\n if (typeof createDebug.init === 'function') {\n createDebug.init(debug);\n }\n\n createDebug.instances.push(debug);\n return debug;\n }\n\n function destroy() {\n var index = createDebug.instances.indexOf(this);\n\n if (index !== -1) {\n createDebug.instances.splice(index, 1);\n return true;\n }\n\n return false;\n }\n\n function extend(namespace, delimiter) {\n return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n }\n /**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\n\n function enable(namespaces) {\n createDebug.save(namespaces);\n createDebug.names = [];\n createDebug.skips = [];\n var i;\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (i = 0; i < len; i++) {\n if (!split[i]) {\n // ignore empty strings\n continue;\n }\n\n namespaces = split[i].replace(/\\*/g, '.*?');\n\n if (namespaces[0] === '-') {\n createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n createDebug.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n\n for (i = 0; i < createDebug.instances.length; i++) {\n var instance = createDebug.instances[i];\n instance.enabled = createDebug.enabled(instance.namespace);\n }\n }\n /**\n * Disable debug output.\n *\n * @api public\n */\n\n\n function disable() {\n createDebug.enable('');\n }\n /**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\n\n function enabled(name) {\n if (name[name.length - 1] === '*') {\n return true;\n }\n\n var i;\n var len;\n\n for (i = 0, len = createDebug.skips.length; i < len; i++) {\n if (createDebug.skips[i].test(name)) {\n return false;\n }\n }\n\n for (i = 0, len = createDebug.names.length; i < len; i++) {\n if (createDebug.names[i].test(name)) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\n\n function coerce(val) {\n if (val instanceof Error) {\n return val.stack || val.message;\n }\n\n return val;\n }\n\n createDebug.enable(createDebug.load());\n return createDebug;\n }\n\n module.exports = setup;\n }, {\n \"ms\": 54\n }],\n 57: [function (require, module, exports) {\n if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n } else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n\n var TempCtor = function () {};\n\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n }\n }, {}],\n 58: [function (require, module, exports) {\n (function (global) {\n /*! JSON v3.3.2 | https://bestiejs.github.io/json3 | Copyright 2012-2015, Kit Cambridge, Benjamin Tan | http://kit.mit-license.org */\n ;\n (function () {\n // Detect the `define` function exposed by asynchronous module loaders. The\n // strict `define` check is necessary for compatibility with `r.js`.\n var isLoader = typeof define === \"function\" && define.amd; // A set of types used to distinguish objects from primitives.\n\n var objectTypes = {\n \"function\": true,\n \"object\": true\n }; // Detect the `exports` object exposed by CommonJS implementations.\n\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; // Use the `global` object exposed by Node (including Browserify via\n // `insert-module-globals`), Narwhal, and Ringo as the default context,\n // and the `window` object in browsers. Rhino exports a `global` function\n // instead.\n\n var root = objectTypes[typeof window] && window || this,\n freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == \"object\" && global;\n\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n } // Public: Initializes JSON 3 using the given `context` object, attaching the\n // `stringify` and `parse` functions to the specified `exports` object.\n\n\n function runInContext(context, exports) {\n context || (context = root.Object());\n exports || (exports = root.Object()); // Native constructor aliases.\n\n var Number = context.Number || root.Number,\n String = context.String || root.String,\n Object = context.Object || root.Object,\n Date = context.Date || root.Date,\n SyntaxError = context.SyntaxError || root.SyntaxError,\n TypeError = context.TypeError || root.TypeError,\n Math = context.Math || root.Math,\n nativeJSON = context.JSON || root.JSON; // Delegate to the native `stringify` and `parse` implementations.\n\n if (typeof nativeJSON == \"object\" && nativeJSON) {\n exports.stringify = nativeJSON.stringify;\n exports.parse = nativeJSON.parse;\n } // Convenience aliases.\n\n\n var objectProto = Object.prototype,\n getClass = objectProto.toString,\n isProperty = objectProto.hasOwnProperty,\n undefined; // Internal: Contains `try...catch` logic used by other functions.\n // This prevents other functions from being deoptimized.\n\n function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n } // Test the `Date#getUTC*` methods. Based on work by @Yaffle.\n\n\n var isExtended = new Date(-3509827334573292);\n attempt(function () {\n // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical\n // results for certain dates in Opera >= 10.53.\n isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 && isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;\n }); // Internal: Determines whether the native `JSON.stringify` and `parse`\n // implementations are spec-compliant. Based on work by Ken Snyder.\n\n function has(name) {\n if (has[name] != null) {\n // Return cached feature test result.\n return has[name];\n }\n\n var isSupported;\n\n if (name == \"bug-string-char-index\") {\n // IE <= 7 doesn't support accessing string characters using square\n // bracket notation. IE 8 only supports this for primitives.\n isSupported = \"a\"[0] != \"a\";\n } else if (name == \"json\") {\n // Indicates whether both `JSON.stringify` and `JSON.parse` are\n // supported.\n isSupported = has(\"json-stringify\") && has(\"date-serialization\") && has(\"json-parse\");\n } else if (name == \"date-serialization\") {\n // Indicates whether `Date`s can be serialized accurately by `JSON.stringify`.\n isSupported = has(\"json-stringify\") && isExtended;\n\n if (isSupported) {\n var stringify = exports.stringify;\n attempt(function () {\n isSupported = // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\n // serialize extended years.\n stringify(new Date(-8.64e15)) == '\"-271821-04-20T00:00:00.000Z\"' && // The milliseconds are optional in ES 5, but required in 5.1.\n stringify(new Date(8.64e15)) == '\"+275760-09-13T00:00:00.000Z\"' && // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\n // four-digit years instead of six-digit years. Credits: @Yaffle.\n stringify(new Date(-621987552e5)) == '\"-000001-01-01T00:00:00.000Z\"' && // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\n // values less than 1000. Credits: @Yaffle.\n stringify(new Date(-1)) == '\"1969-12-31T23:59:59.999Z\"';\n });\n }\n } else {\n var value,\n serialized = '{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}'; // Test `JSON.stringify`.\n\n if (name == \"json-stringify\") {\n var stringify = exports.stringify,\n stringifySupported = typeof stringify == \"function\";\n\n if (stringifySupported) {\n // A test function object with a custom `toJSON` method.\n (value = function () {\n return 1;\n }).toJSON = value;\n attempt(function () {\n stringifySupported = // Firefox 3.1b1 and b2 serialize string, number, and boolean\n // primitives as object literals.\n stringify(0) === \"0\" && // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\n // literals.\n stringify(new Number()) === \"0\" && stringify(new String()) == '\"\"' && // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\n // does not define a canonical JSON representation (this applies to\n // objects with `toJSON` properties as well, *unless* they are nested\n // within an object or array).\n stringify(getClass) === undefined && // IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\n // FF 3.1b3 pass this test.\n stringify(undefined) === undefined && // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\n // respectively, if the value is omitted entirely.\n stringify() === undefined && // FF 3.1b1, 2 throw an error if the given value is not a number,\n // string, array, object, Boolean, or `null` literal. This applies to\n // objects with custom `toJSON` methods as well, unless they are nested\n // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\n // methods entirely.\n stringify(value) === \"1\" && stringify([value]) == \"[1]\" && // Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\n // `\"[null]\"`.\n stringify([undefined]) == \"[null]\" && // YUI 3.0.0b1 fails to serialize `null` literals.\n stringify(null) == \"null\" && // FF 3.1b1, 2 halts serialization if an array contains a function:\n // `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\n // elides non-JSON values from objects and arrays, unless they\n // define custom `toJSON` methods.\n stringify([undefined, getClass, null]) == \"[null,null,null]\" && // Simple serialization test. FF 3.1b1 uses Unicode escape sequences\n // where character escape codes are expected (e.g., `\\b` => `\\u0008`).\n stringify({\n \"a\": [value, true, false, null, \"\\x00\\b\\n\\f\\r\\t\"]\n }) == serialized && // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\n stringify(null, value) === \"1\" && stringify([1, 2], null, 1) == \"[\\n 1,\\n 2\\n]\";\n }, function () {\n stringifySupported = false;\n });\n }\n\n isSupported = stringifySupported;\n } // Test `JSON.parse`.\n\n\n if (name == \"json-parse\") {\n var parse = exports.parse,\n parseSupported;\n\n if (typeof parse == \"function\") {\n attempt(function () {\n // FF 3.1b1, b2 will throw an exception if a bare literal is provided.\n // Conforming implementations should also coerce the initial argument to\n // a string prior to parsing.\n if (parse(\"0\") === 0 && !parse(false)) {\n // Simple parsing test.\n value = parse(serialized);\n parseSupported = value[\"a\"].length == 5 && value[\"a\"][0] === 1;\n\n if (parseSupported) {\n attempt(function () {\n // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\n parseSupported = !parse('\"\\t\"');\n });\n\n if (parseSupported) {\n attempt(function () {\n // FF 4.0 and 4.0.1 allow leading `+` signs and leading\n // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\n // certain octal literals.\n parseSupported = parse(\"01\") !== 1;\n });\n }\n\n if (parseSupported) {\n attempt(function () {\n // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\n // points. These environments, along with FF 3.1b1 and 2,\n // also allow trailing commas in JSON objects and arrays.\n parseSupported = parse(\"1.\") !== 1;\n });\n }\n }\n }\n }, function () {\n parseSupported = false;\n });\n }\n\n isSupported = parseSupported;\n }\n }\n\n return has[name] = !!isSupported;\n }\n\n has[\"bug-string-char-index\"] = has[\"date-serialization\"] = has[\"json\"] = has[\"json-stringify\"] = has[\"json-parse\"] = null;\n\n if (!has(\"json\")) {\n // Common `[[Class]]` name aliases.\n var functionClass = \"[object Function]\",\n dateClass = \"[object Date]\",\n numberClass = \"[object Number]\",\n stringClass = \"[object String]\",\n arrayClass = \"[object Array]\",\n booleanClass = \"[object Boolean]\"; // Detect incomplete support for accessing string characters by index.\n\n var charIndexBuggy = has(\"bug-string-char-index\"); // Internal: Normalizes the `for...in` iteration algorithm across\n // environments. Each enumerated key is yielded to a `callback` function.\n\n var forOwn = function (object, callback) {\n var size = 0,\n Properties,\n dontEnums,\n property; // Tests for bugs in the current environment's `for...in` algorithm. The\n // `valueOf` property inherits the non-enumerable flag from\n // `Object.prototype` in older versions of IE, Netscape, and Mozilla.\n\n (Properties = function () {\n this.valueOf = 0;\n }).prototype.valueOf = 0; // Iterate over a new instance of the `Properties` class.\n\n dontEnums = new Properties();\n\n for (property in dontEnums) {\n // Ignore all properties inherited from `Object.prototype`.\n if (isProperty.call(dontEnums, property)) {\n size++;\n }\n }\n\n Properties = dontEnums = null; // Normalize the iteration algorithm.\n\n if (!size) {\n // A list of non-enumerable properties inherited from `Object.prototype`.\n dontEnums = [\"valueOf\", \"toString\", \"toLocaleString\", \"propertyIsEnumerable\", \"isPrototypeOf\", \"hasOwnProperty\", \"constructor\"]; // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable\n // properties.\n\n forOwn = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass,\n property,\n length;\n var hasProperty = !isFunction && typeof object.constructor != \"function\" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;\n\n for (property in object) {\n // Gecko <= 1.0 enumerates the `prototype` property of functions under\n // certain conditions; IE does not.\n if (!(isFunction && property == \"prototype\") && hasProperty.call(object, property)) {\n callback(property);\n }\n } // Manually invoke the callback for each non-enumerable property.\n\n\n for (length = dontEnums.length; property = dontEnums[--length];) {\n if (hasProperty.call(object, property)) {\n callback(property);\n }\n }\n };\n } else {\n // No bugs detected; use the standard `for...in` algorithm.\n forOwn = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass,\n property,\n isConstructor;\n\n for (property in object) {\n if (!(isFunction && property == \"prototype\") && isProperty.call(object, property) && !(isConstructor = property === \"constructor\")) {\n callback(property);\n }\n } // Manually invoke the callback for the `constructor` property due to\n // cross-environment inconsistencies.\n\n\n if (isConstructor || isProperty.call(object, property = \"constructor\")) {\n callback(property);\n }\n };\n }\n\n return forOwn(object, callback);\n }; // Public: Serializes a JavaScript `value` as a JSON string. The optional\n // `filter` argument may specify either a function that alters how object and\n // array members are serialized, or an array of strings and numbers that\n // indicates which properties should be serialized. The optional `width`\n // argument may be either a string or number that specifies the indentation\n // level of the output.\n\n\n if (!has(\"json-stringify\") && !has(\"date-serialization\")) {\n // Internal: A map of control characters and their escaped equivalents.\n var Escapes = {\n 92: \"\\\\\\\\\",\n 34: '\\\\\"',\n 8: \"\\\\b\",\n 12: \"\\\\f\",\n 10: \"\\\\n\",\n 13: \"\\\\r\",\n 9: \"\\\\t\"\n }; // Internal: Converts `value` into a zero-padded string such that its\n // length is at least equal to `width`. The `width` must be <= 6.\n\n var leadingZeroes = \"000000\";\n\n var toPaddedString = function (width, value) {\n // The `|| 0` expression is necessary to work around a bug in\n // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== \"0\"`.\n return (leadingZeroes + (value || 0)).slice(-width);\n }; // Internal: Serializes a date object.\n\n\n var serializeDate = function (value) {\n var getData, year, month, date, time, hours, minutes, seconds, milliseconds; // Define additional utility methods if the `Date` methods are buggy.\n\n if (!isExtended) {\n var floor = Math.floor; // A mapping between the months of the year and the number of days between\n // January 1st and the first of the respective month.\n\n var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; // Internal: Calculates the number of days between the Unix epoch and the\n // first day of the given month.\n\n var getDay = function (year, month) {\n return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);\n };\n\n getData = function (value) {\n // Manually compute the year, month, date, hours, minutes,\n // seconds, and milliseconds if the `getUTC*` methods are\n // buggy. Adapted from @Yaffle's `date-shim` project.\n date = floor(value / 864e5);\n\n for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);\n\n for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);\n\n date = 1 + date - getDay(year, month); // The `time` value specifies the time within the day (see ES\n // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used\n // to compute `A modulo B`, as the `%` operator does not\n // correspond to the `modulo` operation for negative numbers.\n\n time = (value % 864e5 + 864e5) % 864e5; // The hours, minutes, seconds, and milliseconds are obtained by\n // decomposing the time within the day. See section 15.9.1.10.\n\n hours = floor(time / 36e5) % 24;\n minutes = floor(time / 6e4) % 60;\n seconds = floor(time / 1e3) % 60;\n milliseconds = time % 1e3;\n };\n } else {\n getData = function (value) {\n year = value.getUTCFullYear();\n month = value.getUTCMonth();\n date = value.getUTCDate();\n hours = value.getUTCHours();\n minutes = value.getUTCMinutes();\n seconds = value.getUTCSeconds();\n milliseconds = value.getUTCMilliseconds();\n };\n }\n\n serializeDate = function (value) {\n if (value > -1 / 0 && value < 1 / 0) {\n // Dates are serialized according to the `Date#toJSON` method\n // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15\n // for the ISO 8601 date time string format.\n getData(value); // Serialize extended years correctly.\n\n value = (year <= 0 || year >= 1e4 ? (year < 0 ? \"-\" : \"+\") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) + \"-\" + toPaddedString(2, month + 1) + \"-\" + toPaddedString(2, date) + // Months, dates, hours, minutes, and seconds should have two\n // digits; milliseconds should have three.\n \"T\" + toPaddedString(2, hours) + \":\" + toPaddedString(2, minutes) + \":\" + toPaddedString(2, seconds) + // Milliseconds are optional in ES 5.0, but required in 5.1.\n \".\" + toPaddedString(3, milliseconds) + \"Z\";\n year = month = date = hours = minutes = seconds = milliseconds = null;\n } else {\n value = null;\n }\n\n return value;\n };\n\n return serializeDate(value);\n }; // For environments with `JSON.stringify` but buggy date serialization,\n // we override the native `Date#toJSON` implementation with a\n // spec-compliant one.\n\n\n if (has(\"json-stringify\") && !has(\"date-serialization\")) {\n // Internal: the `Date#toJSON` implementation used to override the native one.\n function dateToJSON(key) {\n return serializeDate(this);\n } // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n\n\n var nativeStringify = exports.stringify;\n\n exports.stringify = function (source, filter, width) {\n var nativeToJSON = Date.prototype.toJSON;\n Date.prototype.toJSON = dateToJSON;\n var result = nativeStringify(source, filter, width);\n Date.prototype.toJSON = nativeToJSON;\n return result;\n };\n } else {\n // Internal: Double-quotes a string `value`, replacing all ASCII control\n // characters (characters with code unit values between 0 and 31) with\n // their escaped equivalents. This is an implementation of the\n // `Quote(value)` operation defined in ES 5.1 section 15.12.3.\n var unicodePrefix = \"\\\\u00\";\n\n var escapeChar = function (character) {\n var charCode = character.charCodeAt(0),\n escaped = Escapes[charCode];\n\n if (escaped) {\n return escaped;\n }\n\n return unicodePrefix + toPaddedString(2, charCode.toString(16));\n };\n\n var reEscape = /[\\x00-\\x1f\\x22\\x5c]/g;\n\n var quote = function (value) {\n reEscape.lastIndex = 0;\n return '\"' + (reEscape.test(value) ? value.replace(reEscape, escapeChar) : value) + '\"';\n }; // Internal: Recursively serializes an object. Implements the\n // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.\n\n\n var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {\n var value, type, className, results, element, index, length, prefix, result;\n attempt(function () {\n // Necessary for host object support.\n value = object[property];\n });\n\n if (typeof value == \"object\" && value) {\n if (value.getUTCFullYear && getClass.call(value) == dateClass && value.toJSON === Date.prototype.toJSON) {\n value = serializeDate(value);\n } else if (typeof value.toJSON == \"function\") {\n value = value.toJSON(property);\n }\n }\n\n if (callback) {\n // If a replacement function was provided, call it to obtain the value\n // for serialization.\n value = callback.call(object, property, value);\n } // Exit early if value is `undefined` or `null`.\n\n\n if (value == undefined) {\n return value === undefined ? value : \"null\";\n }\n\n type = typeof value; // Only call `getClass` if the value is an object.\n\n if (type == \"object\") {\n className = getClass.call(value);\n }\n\n switch (className || type) {\n case \"boolean\":\n case booleanClass:\n // Booleans are represented literally.\n return \"\" + value;\n\n case \"number\":\n case numberClass:\n // JSON numbers must be finite. `Infinity` and `NaN` are serialized as\n // `\"null\"`.\n return value > -1 / 0 && value < 1 / 0 ? \"\" + value : \"null\";\n\n case \"string\":\n case stringClass:\n // Strings are double-quoted and escaped.\n return quote(\"\" + value);\n } // Recursively serialize objects and arrays.\n\n\n if (typeof value == \"object\") {\n // Check for cyclic structures. This is a linear search; performance\n // is inversely proportional to the number of unique nested objects.\n for (length = stack.length; length--;) {\n if (stack[length] === value) {\n // Cyclic structures cannot be serialized by `JSON.stringify`.\n throw TypeError();\n }\n } // Add the object to the stack of traversed objects.\n\n\n stack.push(value);\n results = []; // Save the current indentation level and indent one additional level.\n\n prefix = indentation;\n indentation += whitespace;\n\n if (className == arrayClass) {\n // Recursively serialize array elements.\n for (index = 0, length = value.length; index < length; index++) {\n element = serialize(index, value, callback, properties, whitespace, indentation, stack);\n results.push(element === undefined ? \"null\" : element);\n }\n\n result = results.length ? whitespace ? \"[\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"]\" : \"[\" + results.join(\",\") + \"]\" : \"[]\";\n } else {\n // Recursively serialize object members. Members are selected from\n // either a user-specified list of property names, or the object\n // itself.\n forOwn(properties || value, function (property) {\n var element = serialize(property, value, callback, properties, whitespace, indentation, stack);\n\n if (element !== undefined) {\n // According to ES 5.1 section 15.12.3: \"If `gap` {whitespace}\n // is not the empty string, let `member` {quote(property) + \":\"}\n // be the concatenation of `member` and the `space` character.\"\n // The \"`space` character\" refers to the literal space\n // character, not the `space` {width} argument provided to\n // `JSON.stringify`.\n results.push(quote(property) + \":\" + (whitespace ? \" \" : \"\") + element);\n }\n });\n result = results.length ? whitespace ? \"{\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"}\" : \"{\" + results.join(\",\") + \"}\" : \"{}\";\n } // Remove the object from the traversed object stack.\n\n\n stack.pop();\n return result;\n }\n }; // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n\n\n exports.stringify = function (source, filter, width) {\n var whitespace, callback, properties, className;\n\n if (objectTypes[typeof filter] && filter) {\n className = getClass.call(filter);\n\n if (className == functionClass) {\n callback = filter;\n } else if (className == arrayClass) {\n // Convert the property names array into a makeshift set.\n properties = {};\n\n for (var index = 0, length = filter.length, value; index < length;) {\n value = filter[index++];\n className = getClass.call(value);\n\n if (className == \"[object String]\" || className == \"[object Number]\") {\n properties[value] = 1;\n }\n }\n }\n }\n\n if (width) {\n className = getClass.call(width);\n\n if (className == numberClass) {\n // Convert the `width` to an integer and create a string containing\n // `width` number of space characters.\n if ((width -= width % 1) > 0) {\n if (width > 10) {\n width = 10;\n }\n\n for (whitespace = \"\"; whitespace.length < width;) {\n whitespace += \" \";\n }\n }\n } else if (className == stringClass) {\n whitespace = width.length <= 10 ? width : width.slice(0, 10);\n }\n } // Opera <= 7.54u2 discards the values associated with empty string keys\n // (`\"\"`) only if they are used directly within an object member list\n // (e.g., `!(\"\" in { \"\": 1})`).\n\n\n return serialize(\"\", (value = {}, value[\"\"] = source, value), callback, properties, whitespace, \"\", []);\n };\n }\n } // Public: Parses a JSON source string.\n\n\n if (!has(\"json-parse\")) {\n var fromCharCode = String.fromCharCode; // Internal: A map of escaped control characters and their unescaped\n // equivalents.\n\n var Unescapes = {\n 92: \"\\\\\",\n 34: '\"',\n 47: \"/\",\n 98: \"\\b\",\n 116: \"\\t\",\n 110: \"\\n\",\n 102: \"\\f\",\n 114: \"\\r\"\n }; // Internal: Stores the parser state.\n\n var Index, Source; // Internal: Resets the parser state and throws a `SyntaxError`.\n\n var abort = function () {\n Index = Source = null;\n throw SyntaxError();\n }; // Internal: Returns the next token, or `\"$\"` if the parser has reached\n // the end of the source string. A token may be a string, number, `null`\n // literal, or Boolean literal.\n\n\n var lex = function () {\n var source = Source,\n length = source.length,\n value,\n begin,\n position,\n isSigned,\n charCode;\n\n while (Index < length) {\n charCode = source.charCodeAt(Index);\n\n switch (charCode) {\n case 9:\n case 10:\n case 13:\n case 32:\n // Skip whitespace tokens, including tabs, carriage returns, line\n // feeds, and space characters.\n Index++;\n break;\n\n case 123:\n case 125:\n case 91:\n case 93:\n case 58:\n case 44:\n // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at\n // the current position.\n value = charIndexBuggy ? source.charAt(Index) : source[Index];\n Index++;\n return value;\n\n case 34:\n // `\"` delimits a JSON string; advance to the next character and\n // begin parsing the string. String tokens are prefixed with the\n // sentinel `@` character to distinguish them from punctuators and\n // end-of-string tokens.\n for (value = \"@\", Index++; Index < length;) {\n charCode = source.charCodeAt(Index);\n\n if (charCode < 32) {\n // Unescaped ASCII control characters (those with a code unit\n // less than the space character) are not permitted.\n abort();\n } else if (charCode == 92) {\n // A reverse solidus (`\\`) marks the beginning of an escaped\n // control character (including `\"`, `\\`, and `/`) or Unicode\n // escape sequence.\n charCode = source.charCodeAt(++Index);\n\n switch (charCode) {\n case 92:\n case 34:\n case 47:\n case 98:\n case 116:\n case 110:\n case 102:\n case 114:\n // Revive escaped control characters.\n value += Unescapes[charCode];\n Index++;\n break;\n\n case 117:\n // `\\u` marks the beginning of a Unicode escape sequence.\n // Advance to the first character and validate the\n // four-digit code point.\n begin = ++Index;\n\n for (position = Index + 4; Index < position; Index++) {\n charCode = source.charCodeAt(Index); // A valid sequence comprises four hexdigits (case-\n // insensitive) that form a single hexadecimal value.\n\n if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {\n // Invalid Unicode escape sequence.\n abort();\n }\n } // Revive the escaped character.\n\n\n value += fromCharCode(\"0x\" + source.slice(begin, Index));\n break;\n\n default:\n // Invalid escape sequence.\n abort();\n }\n } else {\n if (charCode == 34) {\n // An unescaped double-quote character marks the end of the\n // string.\n break;\n }\n\n charCode = source.charCodeAt(Index);\n begin = Index; // Optimize for the common case where a string is valid.\n\n while (charCode >= 32 && charCode != 92 && charCode != 34) {\n charCode = source.charCodeAt(++Index);\n } // Append the string as-is.\n\n\n value += source.slice(begin, Index);\n }\n }\n\n if (source.charCodeAt(Index) == 34) {\n // Advance to the next character and return the revived string.\n Index++;\n return value;\n } // Unterminated string.\n\n\n abort();\n\n default:\n // Parse numbers and literals.\n begin = Index; // Advance past the negative sign, if one is specified.\n\n if (charCode == 45) {\n isSigned = true;\n charCode = source.charCodeAt(++Index);\n } // Parse an integer or floating-point value.\n\n\n if (charCode >= 48 && charCode <= 57) {\n // Leading zeroes are interpreted as octal literals.\n if (charCode == 48 && (charCode = source.charCodeAt(Index + 1), charCode >= 48 && charCode <= 57)) {\n // Illegal octal literal.\n abort();\n }\n\n isSigned = false; // Parse the integer component.\n\n for (; Index < length && (charCode = source.charCodeAt(Index), charCode >= 48 && charCode <= 57); Index++); // Floats cannot contain a leading decimal point; however, this\n // case is already accounted for by the parser.\n\n\n if (source.charCodeAt(Index) == 46) {\n position = ++Index; // Parse the decimal component.\n\n for (; position < length; position++) {\n charCode = source.charCodeAt(position);\n\n if (charCode < 48 || charCode > 57) {\n break;\n }\n }\n\n if (position == Index) {\n // Illegal trailing decimal.\n abort();\n }\n\n Index = position;\n } // Parse exponents. The `e` denoting the exponent is\n // case-insensitive.\n\n\n charCode = source.charCodeAt(Index);\n\n if (charCode == 101 || charCode == 69) {\n charCode = source.charCodeAt(++Index); // Skip past the sign following the exponent, if one is\n // specified.\n\n if (charCode == 43 || charCode == 45) {\n Index++;\n } // Parse the exponential component.\n\n\n for (position = Index; position < length; position++) {\n charCode = source.charCodeAt(position);\n\n if (charCode < 48 || charCode > 57) {\n break;\n }\n }\n\n if (position == Index) {\n // Illegal empty exponent.\n abort();\n }\n\n Index = position;\n } // Coerce the parsed value to a JavaScript number.\n\n\n return +source.slice(begin, Index);\n } // A negative sign may only precede numbers.\n\n\n if (isSigned) {\n abort();\n } // `true`, `false`, and `null` literals.\n\n\n var temp = source.slice(Index, Index + 4);\n\n if (temp == \"true\") {\n Index += 4;\n return true;\n } else if (temp == \"fals\" && source.charCodeAt(Index + 4) == 101) {\n Index += 5;\n return false;\n } else if (temp == \"null\") {\n Index += 4;\n return null;\n } // Unrecognized token.\n\n\n abort();\n }\n } // Return the sentinel `$` character if the parser has reached the end\n // of the source string.\n\n\n return \"$\";\n }; // Internal: Parses a JSON `value` token.\n\n\n var get = function (value) {\n var results, hasMembers;\n\n if (value == \"$\") {\n // Unexpected end of input.\n abort();\n }\n\n if (typeof value == \"string\") {\n if ((charIndexBuggy ? value.charAt(0) : value[0]) == \"@\") {\n // Remove the sentinel `@` character.\n return value.slice(1);\n } // Parse object and array literals.\n\n\n if (value == \"[\") {\n // Parses a JSON array, returning a new JavaScript array.\n results = [];\n\n for (;;) {\n value = lex(); // A closing square bracket marks the end of the array literal.\n\n if (value == \"]\") {\n break;\n } // If the array literal contains elements, the current token\n // should be a comma separating the previous element from the\n // next.\n\n\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n\n if (value == \"]\") {\n // Unexpected trailing `,` in array literal.\n abort();\n }\n } else {\n // A `,` must separate each array element.\n abort();\n }\n } else {\n hasMembers = true;\n } // Elisions and leading commas are not permitted.\n\n\n if (value == \",\") {\n abort();\n }\n\n results.push(get(value));\n }\n\n return results;\n } else if (value == \"{\") {\n // Parses a JSON object, returning a new JavaScript object.\n results = {};\n\n for (;;) {\n value = lex(); // A closing curly brace marks the end of the object literal.\n\n if (value == \"}\") {\n break;\n } // If the object literal contains members, the current token\n // should be a comma separator.\n\n\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n\n if (value == \"}\") {\n // Unexpected trailing `,` in object literal.\n abort();\n }\n } else {\n // A `,` must separate each object member.\n abort();\n }\n } else {\n hasMembers = true;\n } // Leading commas are not permitted, object property names must be\n // double-quoted strings, and a `:` must separate each property\n // name and value.\n\n\n if (value == \",\" || typeof value != \"string\" || (charIndexBuggy ? value.charAt(0) : value[0]) != \"@\" || lex() != \":\") {\n abort();\n }\n\n results[value.slice(1)] = get(lex());\n }\n\n return results;\n } // Unexpected token encountered.\n\n\n abort();\n }\n\n return value;\n }; // Internal: Updates a traversed object member.\n\n\n var update = function (source, property, callback) {\n var element = walk(source, property, callback);\n\n if (element === undefined) {\n delete source[property];\n } else {\n source[property] = element;\n }\n }; // Internal: Recursively traverses a parsed JSON object, invoking the\n // `callback` function for each value. This is an implementation of the\n // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.\n\n\n var walk = function (source, property, callback) {\n var value = source[property],\n length;\n\n if (typeof value == \"object\" && value) {\n // `forOwn` can't be used to traverse an array in Opera <= 8.54\n // because its `Object#hasOwnProperty` implementation returns `false`\n // for array indices (e.g., `![1, 2, 3].hasOwnProperty(\"0\")`).\n if (getClass.call(value) == arrayClass) {\n for (length = value.length; length--;) {\n update(getClass, forOwn, value, length, callback);\n }\n } else {\n forOwn(value, function (property) {\n update(value, property, callback);\n });\n }\n }\n\n return callback.call(source, property, value);\n }; // Public: `JSON.parse`. See ES 5.1 section 15.12.2.\n\n\n exports.parse = function (source, callback) {\n var result, value;\n Index = 0;\n Source = \"\" + source;\n result = get(lex()); // If a JSON string contains multiple tokens, it is invalid.\n\n if (lex() != \"$\") {\n abort();\n } // Reset the parser state.\n\n\n Index = Source = null;\n return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[\"\"] = result, value), \"\", callback) : result;\n };\n }\n }\n\n exports.runInContext = runInContext;\n return exports;\n }\n\n if (freeExports && !isLoader) {\n // Export for CommonJS environments.\n runInContext(root, freeExports);\n } else {\n // Export for web browsers and JavaScript engines.\n var nativeJSON = root.JSON,\n previousJSON = root.JSON3,\n isRestored = false;\n var JSON3 = runInContext(root, root.JSON3 = {\n // Public: Restores the original value of the global `JSON` object and\n // returns a reference to the `JSON3` object.\n \"noConflict\": function () {\n if (!isRestored) {\n isRestored = true;\n root.JSON = nativeJSON;\n root.JSON3 = previousJSON;\n nativeJSON = previousJSON = null;\n }\n\n return JSON3;\n }\n });\n root.JSON = {\n \"parse\": JSON3.parse,\n \"stringify\": JSON3.stringify\n };\n } // Export for asynchronous module loaders.\n\n\n if (isLoader) {\n define(function () {\n return JSON3;\n });\n }\n }).call(this);\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {}],\n 59: [function (require, module, exports) {\n 'use strict';\n\n var has = Object.prototype.hasOwnProperty,\n undef;\n /**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\n\n function decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n }\n /**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\n\n\n function encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n }\n /**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\n\n\n function querystring(query) {\n var parser = /([^=?&]+)=?([^&]*)/g,\n result = {},\n part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1]),\n value = decode(part[2]); //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n\n return result;\n }\n /**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\n\n\n function querystringify(obj, prefix) {\n prefix = prefix || '';\n var pairs = [],\n value,\n key; //\n // Optionally prefix with a '?' if needed\n //\n\n if ('string' !== typeof prefix) prefix = '?';\n\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key]; //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value); //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n\n if (key === null || value === null) continue;\n pairs.push(key + '=' + value);\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n } //\n // Expose the module.\n //\n\n\n exports.stringify = querystringify;\n exports.parse = querystring;\n }, {}],\n 60: [function (require, module, exports) {\n 'use strict';\n /**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\n\n module.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n };\n }, {}],\n 61: [function (require, module, exports) {\n (function (global) {\n 'use strict';\n\n var required = require('requires-port'),\n qs = require('querystringify'),\n slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,\n protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,\n windowsDriveLetter = /^[a-zA-Z]:/,\n whitespace = '[\\\\x09\\\\x0A\\\\x0B\\\\x0C\\\\x0D\\\\x20\\\\xA0\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\\\\u2028\\\\u2029\\\\uFEFF]',\n left = new RegExp('^' + whitespace + '+');\n /**\n * Trim a given string.\n *\n * @param {String} str String to trim.\n * @public\n */\n\n\n function trimLeft(str) {\n return (str ? str : '').toString().replace(left, '');\n }\n /**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\n\n\n var rules = [['#', 'hash'], // Extract from the back.\n ['?', 'query'], // Extract from the back.\n function sanitize(address, url) {\n // Sanitize what is left of the address\n return isSpecial(url.protocol) ? address.replace(/\\\\/g, '/') : address;\n }, ['/', 'pathname'], // Extract from the back.\n ['@', 'auth', 1], // Extract from the front.\n [NaN, 'host', undefined, 1, 1], // Set left over value.\n [/:(\\d+)$/, 'port', undefined, 1], // RegExp the back.\n [NaN, 'hostname', undefined, 1, 1] // Set left over.\n ];\n /**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\n\n var ignore = {\n hash: 1,\n query: 1\n };\n /**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @public\n */\n\n function lolcation(loc) {\n var globalVar;\n if (typeof window !== 'undefined') globalVar = window;else if (typeof global !== 'undefined') globalVar = global;else if (typeof self !== 'undefined') globalVar = self;else globalVar = {};\n var location = globalVar.location || {};\n loc = loc || location;\n var finaldestination = {},\n type = typeof loc,\n key;\n\n if ('blob:' === loc.protocol) {\n finaldestination = new Url(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new Url(loc, {});\n\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n\n return finaldestination;\n }\n /**\n * Check whether a protocol scheme is special.\n *\n * @param {String} The protocol scheme of the URL\n * @return {Boolean} `true` if the protocol scheme is special, else `false`\n * @private\n */\n\n\n function isSpecial(scheme) {\n return scheme === 'file:' || scheme === 'ftp:' || scheme === 'http:' || scheme === 'https:' || scheme === 'ws:' || scheme === 'wss:';\n }\n /**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n /**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @param {Object} location\n * @return {ProtocolExtract} Extracted information.\n * @private\n */\n\n\n function extractProtocol(address, location) {\n address = trimLeft(address);\n location = location || {};\n var match = protocolre.exec(address);\n var protocol = match[1] ? match[1].toLowerCase() : '';\n var forwardSlashes = !!match[2];\n var otherSlashes = !!match[3];\n var slashesCount = 0;\n var rest;\n\n if (forwardSlashes) {\n if (otherSlashes) {\n rest = match[2] + match[3] + match[4];\n slashesCount = match[2].length + match[3].length;\n } else {\n rest = match[2] + match[4];\n slashesCount = match[2].length;\n }\n } else {\n if (otherSlashes) {\n rest = match[3] + match[4];\n slashesCount = match[3].length;\n } else {\n rest = match[4];\n }\n }\n\n if (protocol === 'file:') {\n if (slashesCount >= 2) {\n rest = rest.slice(2);\n }\n } else if (isSpecial(protocol)) {\n rest = match[4];\n } else if (protocol) {\n if (forwardSlashes) {\n rest = rest.slice(2);\n }\n } else if (slashesCount >= 2 && isSpecial(location.protocol)) {\n rest = match[4];\n }\n\n return {\n protocol: protocol,\n slashes: forwardSlashes || isSpecial(protocol),\n slashesCount: slashesCount,\n rest: rest\n };\n }\n /**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @private\n */\n\n\n function resolve(relative, base) {\n if (relative === '') return base;\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')),\n i = path.length,\n last = path[i - 1],\n unshift = false,\n up = 0;\n\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n return path.join('/');\n }\n /**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * It is worth noting that we should not use `URL` as class name to prevent\n * clashes with the global URL instance that got introduced in browsers.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} [location] Location defaults for relative paths.\n * @param {Boolean|Function} [parser] Parser for the query string.\n * @private\n */\n\n\n function Url(address, location, parser) {\n address = trimLeft(address);\n\n if (!(this instanceof Url)) {\n return new Url(address, location, parser);\n }\n\n var relative,\n extracted,\n parse,\n instruction,\n index,\n key,\n instructions = rules.slice(),\n type = typeof location,\n url = this,\n i = 0; //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n location = lolcation(location); //\n // Extract protocol information before running the instructions.\n //\n\n extracted = extractProtocol(address || '', location);\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest; //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n\n if (extracted.protocol === 'file:' && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) {\n instructions[3] = [/(.*)/, 'pathname'];\n }\n\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n\n if (typeof instruction === 'function') {\n address = instruction(address, url);\n continue;\n }\n\n parse = instruction[0];\n key = instruction[1];\n\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n if (~(index = address.indexOf(parse))) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if (index = parse.exec(address)) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n\n url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : ''); //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n\n if (instruction[4]) url[key] = url[key].toLowerCase();\n } //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n\n\n if (parser) url.query = parser(url.query); //\n // If the URL is relative, resolve the pathname against the base URL.\n //\n\n if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) {\n url.pathname = resolve(url.pathname, location.pathname);\n } //\n // Default to a / for pathname if none exists. This normalizes the URL\n // to always have a /\n //\n\n\n if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {\n url.pathname = '/' + url.pathname;\n } //\n // We should not add port numbers if they are already the default port number\n // for a given protocol. As the host also contains the port number we're going\n // override it with the hostname which contains no port number.\n //\n\n\n if (!required(url.port, url.protocol)) {\n url.host = url.hostname;\n url.port = '';\n } //\n // Parse down the `auth` for the username and password.\n //\n\n\n url.username = url.password = '';\n\n if (url.auth) {\n instruction = url.auth.split(':');\n url.username = instruction[0] || '';\n url.password = instruction[1] || '';\n }\n\n url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null'; //\n // The href is just the compiled result.\n //\n\n url.href = url.toString();\n }\n /**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part Property we need to adjust.\n * @param {Mixed} value The newly assigned value.\n * @param {Boolean|Function} fn When setting the query, it will be the function\n * used to parse the query.\n * When setting the protocol, double slash will be\n * removed from the final url if it is true.\n * @returns {URL} URL instance for chaining.\n * @public\n */\n\n\n function set(part, value, fn) {\n var url = this;\n\n switch (part) {\n case 'query':\n if ('string' === typeof value && value.length) {\n value = (fn || qs.parse)(value);\n }\n\n url[part] = value;\n break;\n\n case 'port':\n url[part] = value;\n\n if (!required(value, url.protocol)) {\n url.host = url.hostname;\n url[part] = '';\n } else if (value) {\n url.host = url.hostname + ':' + value;\n }\n\n break;\n\n case 'hostname':\n url[part] = value;\n if (url.port) value += ':' + url.port;\n url.host = value;\n break;\n\n case 'host':\n url[part] = value;\n\n if (/:\\d+$/.test(value)) {\n value = value.split(':');\n url.port = value.pop();\n url.hostname = value.join(':');\n } else {\n url.hostname = value;\n url.port = '';\n }\n\n break;\n\n case 'protocol':\n url.protocol = value.toLowerCase();\n url.slashes = !fn;\n break;\n\n case 'pathname':\n case 'hash':\n if (value) {\n var char = part === 'pathname' ? '/' : '#';\n url[part] = value.charAt(0) !== char ? char + value : value;\n } else {\n url[part] = value;\n }\n\n break;\n\n default:\n url[part] = value;\n }\n\n for (var i = 0; i < rules.length; i++) {\n var ins = rules[i];\n if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n }\n\n url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';\n url.href = url.toString();\n return url;\n }\n /**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String} Compiled version of the URL.\n * @public\n */\n\n\n function toString(stringify) {\n if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n var query,\n url = this,\n protocol = url.protocol;\n if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n var result = protocol + (url.slashes || isSpecial(url.protocol) ? '//' : '');\n\n if (url.username) {\n result += url.username;\n if (url.password) result += ':' + url.password;\n result += '@';\n }\n\n result += url.host + url.pathname;\n query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n if (query) result += '?' !== query.charAt(0) ? '?' + query : query;\n if (url.hash) result += url.hash;\n return result;\n }\n\n Url.prototype = {\n set: set,\n toString: toString\n }; //\n // Expose the URL parser and some additional properties that might be useful for\n // others or testing.\n //\n\n Url.extractProtocol = extractProtocol;\n Url.location = lolcation;\n Url.trimLeft = trimLeft;\n Url.qs = qs;\n module.exports = Url;\n }).call(this, typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {});\n }, {\n \"querystringify\": 59,\n \"requires-port\": 60\n }]\n }, {}, [1])(1);\n});","map":{"version":3,"sources":["/Users/satish.ganga/Desktop/EKAM/ekamv3/skgangaEkam/node_modules/sockjs-client/dist/sockjs.js"],"names":["f","exports","module","define","amd","g","window","global","self","SockJS","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","transportList","setTimeout","_sockjs_onload","inherits","Event","CloseEvent","initEvent","wasClean","reason","EventTarget","EventEmitter","prototype","removeAllListeners","type","_listeners","once","listener","fired","removeListener","apply","arguments","on","emit","listeners","l","args","Array","ai","addListener","addEventListener","removeEventListener","eventType","canBubble","cancelable","bubbles","timeStamp","Date","stopPropagation","preventDefault","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","arr","indexOf","concat","idx","slice","dispatchEvent","event","TransportMessageEvent","data","JSON3","iframeUtils","FacadeJS","transport","_transport","_transportMessage","bind","_transportClose","postMessage","stringify","frame","_send","send","_close","close","process","urlUtils","eventUtils","InfoIframeReceiver","loc","debug","env","NODE_ENV","availableTransports","transportMap","forEach","at","facadeTransport","transportName","parentOrigin","bootstrap_iframe","facade","currentWindowId","hash","onMessage","source","parent","origin","iframeMessage","parse","ignored","windowId","version","transUrl","baseUrl","isOriginEqual","href","attachEvent","objectUtils","InfoAjax","url","AjaxObject","t0","xo","status","text","info","rtt","isObject","XHRLocalObject","InfoReceiverIframe","ir","utils","IframeTransport","InfoIframe","go","ifr","msg","d","document","body","enabled","XDR","XHRCors","XHRLocal","XHRFake","InfoReceiver","urlInfo","doXhr","_getReceiver","sameOrigin","sameScheme","addPath","timeoutRef","_cleanup","timeout","clearTimeout","location","protocol","host","port","URL","random","escape","browser","log","transports","protocols","options","TypeError","readyState","CONNECTING","extensions","protocols_whitelist","warn","_transportsWhitelist","_transportOptions","transportOptions","_timeout","sessionId","_generateSessionId","string","_server","server","numberString","parsedUrl","SyntaxError","secure","isLoopbackAddr","hostname","isArray","sortedProtocols","sort","proto","getOrigin","_origin","toLowerCase","set","pathname","replace","_urlInfo","nullOrigin","hasDomain","isSchemeEqual","_ir","_receiveInfo","userSetCode","CLOSING","CLOSED","OPEN","quote","_rto","countRTO","_transUrl","base_url","extend","enabledTransports","filterToEnabled","_transports","main","_connect","Transport","shift","needBody","unshift","timeoutMs","Math","max","roundTrips","_transportTimeoutId","_transportTimeout","transportUrl","transportObj","content","payload","_open","forceFail","onmessage","onclose","onerror","ArrayPrototype","ObjectPrototype","Object","FunctionPrototype","Function","StringPrototype","String","array_slice","_toString","toString","isFunction","val","obj","isString","supportsDescriptors","defineProperty","object","name","method","forceAssign","configurable","enumerable","writable","value","defineProperties","map","hasOwnProperty","toObject","toInteger","num","floor","abs","ToUint32","x","Empty","that","target","binder","bound","result","boundLength","boundArgs","push","join","boxedString","splitString","properlyBoxesContext","properlyBoxed","properlyBoxesNonStrict","properlyBoxesStrict","_","__","context","fun","split","thisp","hasFirefox2IndexOfBug","sought","string_split","compliantExecNpcg","exec","separator","limit","output","flags","ignoreCase","multiline","extended","sticky","lastLastIndex","separator2","match","lastIndex","lastLength","RegExp","index","test","string_substr","substr","hasNegativeSubstrBug","start","XHR","XMLHttpRequest","AbstractXHRObject","opts","_start","xhr","addQuery","unloadRef","unloadAdd","open","ontimeout","noCredentials","supportsCORS","withCredentials","headers","key","setRequestHeader","onreadystatechange","responseText","abort","unloadDel","axo","cors","EventSource","Driver","WebSocket","MozWebSocket","WebSocketBrowserDriver","undefined","AjaxBasedTransport","EventSourceReceiver","XHRCorsObject","EventSourceDriver","EventSourceTransport","HtmlfileReceiver","HtmlFileTransport","iframeUrl","iframeObj","createIframe","onmessageCallback","_message","detachEvent","cleanup","loaded","cdata","post","message","iframeEnabled","SenderReceiver","JsonpReceiver","jsonpSender","JsonPTransport","createAjaxSender","callback","opt","ajaxUrl","err","urlSuffix","Receiver","BufferedSender","sender","sendBuffer","sendStop","sendSchedule","sendScheduleWait","tref","IframeWrapTransport","iframeInfo","Polling","receiveUrl","_scheduleReceiver","poll","pollIsClosing","senderFunc","pollUrl","es","decodeURI","polluteGlobalNamespace","id","decodeURIComponent","WPrefix","htmlfileEnabled","constructFunc","createHtmlfile","stop","urlWithId","encodeURIComponent","_callback","_createScript","timeoutId","_abort","scriptErrorTimeout","aborting","script2","parentNode","removeChild","script","onload","onclick","_scriptError","errorTimer","loadedOkay","createElement","src","charset","htmlFor","async","isOpera","head","getElementsByTagName","insertBefore","firstChild","XhrReceiver","bufferPosition","_chunkHandler","buf","form","area","iframe","createForm","style","display","position","enctype","acceptCharset","appendChild","action","submit","completed","XDRObject","xdr","XDomainRequest","_error","onprogress","XhrDriver","to","WebsocketDriver","WebSocketTransport","ignore","ws","XdrStreamingTransport","XdrPollingTransport","cookie_needed","XhrPollingTransport","XhrStreamingTransport","crypto","getRandomValues","randomBytes","bytes","Uint8Array","navigator","userAgent","isKonqueror","domain","extraEscapable","extraLookup","unrollLookup","escapable","unrolled","fromCharCode","charCodeAt","quoted","onUnload","afterUnload","isChromePackagedApp","chrome","app","runtime","ref","triggerUnloadCallbacks","unloadTriggered","errorCallback","unattach","contentWindow","doc","CollectGarbage","write","parentWindow","logObject","level","levelExists","console","prop","_randomStringChars","ret","number","transportsWhitelist","trans","websocket","b","res","path","qs","q","addr","s","m","h","w","y","isFinite","long","fmtLong","fmtShort","JSON","str","parseFloat","ms","msAbs","round","plural","isPlural","_typeof","Symbol","iterator","constructor","formatArgs","save","load","useColors","storage","localstorage","colors","__nwjs","documentElement","WebkitAppearance","firebug","exception","table","parseInt","$1","namespace","humanize","diff","color","splice","lastC","_console","namespaces","setItem","removeItem","error","getItem","DEBUG","localStorage","formatters","j","v","setup","createDebug","default","coerce","disable","enable","keys","instances","names","skips","selectColor","prevTime","_len","_key","curr","Number","prev","format","formatter","logFn","destroy","init","delimiter","len","instance","stack","create","ctor","superCtor","super_","TempCtor","isLoader","objectTypes","freeExports","nodeType","root","freeGlobal","runInContext","nativeJSON","objectProto","getClass","isProperty","attempt","func","errorFunc","isExtended","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","has","isSupported","serialized","stringifySupported","toJSON","parseSupported","functionClass","dateClass","numberClass","stringClass","arrayClass","booleanClass","charIndexBuggy","forOwn","size","Properties","dontEnums","property","valueOf","hasProperty","isConstructor","Escapes","leadingZeroes","toPaddedString","width","serializeDate","getData","year","month","date","time","hours","minutes","seconds","milliseconds","Months","getDay","dateToJSON","nativeStringify","filter","nativeToJSON","unicodePrefix","escapeChar","character","charCode","escaped","reEscape","serialize","properties","whitespace","indentation","className","results","element","prefix","pop","Unescapes","Index","Source","lex","begin","isSigned","charAt","temp","get","hasMembers","update","walk","previousJSON","isRestored","undef","decode","input","encode","querystring","query","parser","part","querystringify","pairs","isNaN","required","slashes","protocolre","windowsDriveLetter","left","trimLeft","rules","sanitize","address","isSpecial","NaN","lolcation","globalVar","finaldestination","Url","unescape","scheme","extractProtocol","forwardSlashes","otherSlashes","slashesCount","rest","resolve","relative","base","last","up","extracted","instruction","instructions","username","password","auth","fn","char","ins"],"mappings":"AAAA;AACA,CAAC,UAASA,CAAT,EA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AAkhBC,KAnhBQ,EAmhBP;AAAC,wBAAiB,EAAlB;AAAqB,uBAAgB;AAArC,KAnhBO;AA/1KizB,GAA5c,EAk3LjU,EAl3LiU,EAk3L9T,CAAC,CAAD,CAl3L8T,EAk3LzT,CAl3LyT,CAAP;AAm3LtW,CAn3LD","sourcesContent":["/* sockjs-client v1.5.2 | http://sockjs.org | MIT license */\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.SockJS = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar transportList = require('./transport-list');\n\nmodule.exports = require('./main')(transportList);\n\n// TODO can't get rid of this until all servers do\nif ('_sockjs_onload' in global) {\n setTimeout(global._sockjs_onload, 1);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./main\":14,\"./transport-list\":16}],2:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , Event = require('./event')\n ;\n\nfunction CloseEvent() {\n Event.call(this);\n this.initEvent('close', false, false);\n this.wasClean = false;\n this.code = 0;\n this.reason = '';\n}\n\ninherits(CloseEvent, Event);\n\nmodule.exports = CloseEvent;\n\n},{\"./event\":4,\"inherits\":57}],3:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , EventTarget = require('./eventtarget')\n ;\n\nfunction EventEmitter() {\n EventTarget.call(this);\n}\n\ninherits(EventEmitter, EventTarget);\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n if (type) {\n delete this._listeners[type];\n } else {\n this._listeners = {};\n }\n};\n\nEventEmitter.prototype.once = function(type, listener) {\n var self = this\n , fired = false;\n\n function g() {\n self.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n this.on(type, g);\n};\n\nEventEmitter.prototype.emit = function() {\n var type = arguments[0];\n var listeners = this._listeners[type];\n if (!listeners) {\n return;\n }\n // equivalent of Array.prototype.slice.call(arguments, 1);\n var l = arguments.length;\n var args = new Array(l - 1);\n for (var ai = 1; ai < l; ai++) {\n args[ai - 1] = arguments[ai];\n }\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;\nEventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;\n\nmodule.exports.EventEmitter = EventEmitter;\n\n},{\"./eventtarget\":5,\"inherits\":57}],4:[function(require,module,exports){\n'use strict';\n\nfunction Event(eventType) {\n this.type = eventType;\n}\n\nEvent.prototype.initEvent = function(eventType, canBubble, cancelable) {\n this.type = eventType;\n this.bubbles = canBubble;\n this.cancelable = cancelable;\n this.timeStamp = +new Date();\n return this;\n};\n\nEvent.prototype.stopPropagation = function() {};\nEvent.prototype.preventDefault = function() {};\n\nEvent.CAPTURING_PHASE = 1;\nEvent.AT_TARGET = 2;\nEvent.BUBBLING_PHASE = 3;\n\nmodule.exports = Event;\n\n},{}],5:[function(require,module,exports){\n'use strict';\n\n/* Simplified implementation of DOM2 EventTarget.\n * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget\n */\n\nfunction EventTarget() {\n this._listeners = {};\n}\n\nEventTarget.prototype.addEventListener = function(eventType, listener) {\n if (!(eventType in this._listeners)) {\n this._listeners[eventType] = [];\n }\n var arr = this._listeners[eventType];\n // #4\n if (arr.indexOf(listener) === -1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n arr = arr.concat([listener]);\n }\n this._listeners[eventType] = arr;\n};\n\nEventTarget.prototype.removeEventListener = function(eventType, listener) {\n var arr = this._listeners[eventType];\n if (!arr) {\n return;\n }\n var idx = arr.indexOf(listener);\n if (idx !== -1) {\n if (arr.length > 1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));\n } else {\n delete this._listeners[eventType];\n }\n return;\n }\n};\n\nEventTarget.prototype.dispatchEvent = function() {\n var event = arguments[0];\n var t = event.type;\n // equivalent of Array.prototype.slice.call(arguments, 0);\n var args = arguments.length === 1 ? [event] : Array.apply(null, arguments);\n // TODO: This doesn't match the real behavior; per spec, onfoo get\n // their place in line from the /first/ time they're set from\n // non-null. Although WebKit bumps it to the end every time it's\n // set.\n if (this['on' + t]) {\n this['on' + t].apply(this, args);\n }\n if (t in this._listeners) {\n // Grab a reference to the listeners list. removeEventListener may alter the list.\n var listeners = this._listeners[t];\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n }\n};\n\nmodule.exports = EventTarget;\n\n},{}],6:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , Event = require('./event')\n ;\n\nfunction TransportMessageEvent(data) {\n Event.call(this);\n this.initEvent('message', false, false);\n this.data = data;\n}\n\ninherits(TransportMessageEvent, Event);\n\nmodule.exports = TransportMessageEvent;\n\n},{\"./event\":4,\"inherits\":57}],7:[function(require,module,exports){\n'use strict';\n\nvar JSON3 = require('json3')\n , iframeUtils = require('./utils/iframe')\n ;\n\nfunction FacadeJS(transport) {\n this._transport = transport;\n transport.on('message', this._transportMessage.bind(this));\n transport.on('close', this._transportClose.bind(this));\n}\n\nFacadeJS.prototype._transportClose = function(code, reason) {\n iframeUtils.postMessage('c', JSON3.stringify([code, reason]));\n};\nFacadeJS.prototype._transportMessage = function(frame) {\n iframeUtils.postMessage('t', frame);\n};\nFacadeJS.prototype._send = function(data) {\n this._transport.send(data);\n};\nFacadeJS.prototype._close = function() {\n this._transport.close();\n this._transport.removeAllListeners();\n};\n\nmodule.exports = FacadeJS;\n\n},{\"./utils/iframe\":47,\"json3\":58}],8:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar urlUtils = require('./utils/url')\n , eventUtils = require('./utils/event')\n , JSON3 = require('json3')\n , FacadeJS = require('./facade')\n , InfoIframeReceiver = require('./info-iframe-receiver')\n , iframeUtils = require('./utils/iframe')\n , loc = require('./location')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:iframe-bootstrap');\n}\n\nmodule.exports = function(SockJS, availableTransports) {\n var transportMap = {};\n availableTransports.forEach(function(at) {\n if (at.facadeTransport) {\n transportMap[at.facadeTransport.transportName] = at.facadeTransport;\n }\n });\n\n // hard-coded for the info iframe\n // TODO see if we can make this more dynamic\n transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;\n var parentOrigin;\n\n /* eslint-disable camelcase */\n SockJS.bootstrap_iframe = function() {\n /* eslint-enable camelcase */\n var facade;\n iframeUtils.currentWindowId = loc.hash.slice(1);\n var onMessage = function(e) {\n if (e.source !== parent) {\n return;\n }\n if (typeof parentOrigin === 'undefined') {\n parentOrigin = e.origin;\n }\n if (e.origin !== parentOrigin) {\n return;\n }\n\n var iframeMessage;\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== iframeUtils.currentWindowId) {\n return;\n }\n switch (iframeMessage.type) {\n case 's':\n var p;\n try {\n p = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n break;\n }\n var version = p[0];\n var transport = p[1];\n var transUrl = p[2];\n var baseUrl = p[3];\n debug(version, transport, transUrl, baseUrl);\n // change this to semver logic\n if (version !== SockJS.version) {\n throw new Error('Incompatible SockJS! Main site uses:' +\n ' \"' + version + '\", the iframe:' +\n ' \"' + SockJS.version + '\".');\n }\n\n if (!urlUtils.isOriginEqual(transUrl, loc.href) ||\n !urlUtils.isOriginEqual(baseUrl, loc.href)) {\n throw new Error('Can\\'t connect to different domain from within an ' +\n 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');\n }\n facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));\n break;\n case 'm':\n facade._send(iframeMessage.data);\n break;\n case 'c':\n if (facade) {\n facade._close();\n }\n facade = null;\n break;\n }\n };\n\n eventUtils.attachEvent('message', onMessage);\n\n // Start\n iframeUtils.postMessage('s');\n };\n};\n\n}).call(this,{ env: {} })\n\n},{\"./facade\":7,\"./info-iframe-receiver\":10,\"./location\":13,\"./utils/event\":46,\"./utils/iframe\":47,\"./utils/url\":52,\"debug\":55,\"json3\":58}],9:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , JSON3 = require('json3')\n , objectUtils = require('./utils/object')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-ajax');\n}\n\nfunction InfoAjax(url, AjaxObject) {\n EventEmitter.call(this);\n\n var self = this;\n var t0 = +new Date();\n this.xo = new AjaxObject('GET', url);\n\n this.xo.once('finish', function(status, text) {\n var info, rtt;\n if (status === 200) {\n rtt = (+new Date()) - t0;\n if (text) {\n try {\n info = JSON3.parse(text);\n } catch (e) {\n debug('bad json', text);\n }\n }\n\n if (!objectUtils.isObject(info)) {\n info = {};\n }\n }\n self.emit('finish', info, rtt);\n self.removeAllListeners();\n });\n}\n\ninherits(InfoAjax, EventEmitter);\n\nInfoAjax.prototype.close = function() {\n this.removeAllListeners();\n this.xo.close();\n};\n\nmodule.exports = InfoAjax;\n\n}).call(this,{ env: {} })\n\n},{\"./utils/object\":49,\"debug\":55,\"events\":3,\"inherits\":57,\"json3\":58}],10:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n , JSON3 = require('json3')\n , XHRLocalObject = require('./transport/sender/xhr-local')\n , InfoAjax = require('./info-ajax')\n ;\n\nfunction InfoReceiverIframe(transUrl) {\n var self = this;\n EventEmitter.call(this);\n\n this.ir = new InfoAjax(transUrl, XHRLocalObject);\n this.ir.once('finish', function(info, rtt) {\n self.ir = null;\n self.emit('message', JSON3.stringify([info, rtt]));\n });\n}\n\ninherits(InfoReceiverIframe, EventEmitter);\n\nInfoReceiverIframe.transportName = 'iframe-info-receiver';\n\nInfoReceiverIframe.prototype.close = function() {\n if (this.ir) {\n this.ir.close();\n this.ir = null;\n }\n this.removeAllListeners();\n};\n\nmodule.exports = InfoReceiverIframe;\n\n},{\"./info-ajax\":9,\"./transport/sender/xhr-local\":37,\"events\":3,\"inherits\":57,\"json3\":58}],11:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , JSON3 = require('json3')\n , utils = require('./utils/event')\n , IframeTransport = require('./transport/iframe')\n , InfoReceiverIframe = require('./info-iframe-receiver')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-iframe');\n}\n\nfunction InfoIframe(baseUrl, url) {\n var self = this;\n EventEmitter.call(this);\n\n var go = function() {\n var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);\n\n ifr.once('message', function(msg) {\n if (msg) {\n var d;\n try {\n d = JSON3.parse(msg);\n } catch (e) {\n debug('bad json', msg);\n self.emit('finish');\n self.close();\n return;\n }\n\n var info = d[0], rtt = d[1];\n self.emit('finish', info, rtt);\n }\n self.close();\n });\n\n ifr.once('close', function() {\n self.emit('finish');\n self.close();\n });\n };\n\n // TODO this seems the same as the 'needBody' from transports\n if (!global.document.body) {\n utils.attachEvent('load', go);\n } else {\n go();\n }\n}\n\ninherits(InfoIframe, EventEmitter);\n\nInfoIframe.enabled = function() {\n return IframeTransport.enabled();\n};\n\nInfoIframe.prototype.close = function() {\n if (this.ifr) {\n this.ifr.close();\n }\n this.removeAllListeners();\n this.ifr = null;\n};\n\nmodule.exports = InfoIframe;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./info-iframe-receiver\":10,\"./transport/iframe\":22,\"./utils/event\":46,\"debug\":55,\"events\":3,\"inherits\":57,\"json3\":58}],12:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , urlUtils = require('./utils/url')\n , XDR = require('./transport/sender/xdr')\n , XHRCors = require('./transport/sender/xhr-cors')\n , XHRLocal = require('./transport/sender/xhr-local')\n , XHRFake = require('./transport/sender/xhr-fake')\n , InfoIframe = require('./info-iframe')\n , InfoAjax = require('./info-ajax')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-receiver');\n}\n\nfunction InfoReceiver(baseUrl, urlInfo) {\n debug(baseUrl);\n var self = this;\n EventEmitter.call(this);\n\n setTimeout(function() {\n self.doXhr(baseUrl, urlInfo);\n }, 0);\n}\n\ninherits(InfoReceiver, EventEmitter);\n\n// TODO this is currently ignoring the list of available transports and the whitelist\n\nInfoReceiver._getReceiver = function(baseUrl, url, urlInfo) {\n // determine method of CORS support (if needed)\n if (urlInfo.sameOrigin) {\n return new InfoAjax(url, XHRLocal);\n }\n if (XHRCors.enabled) {\n return new InfoAjax(url, XHRCors);\n }\n if (XDR.enabled && urlInfo.sameScheme) {\n return new InfoAjax(url, XDR);\n }\n if (InfoIframe.enabled()) {\n return new InfoIframe(baseUrl, url);\n }\n return new InfoAjax(url, XHRFake);\n};\n\nInfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) {\n var self = this\n , url = urlUtils.addPath(baseUrl, '/info')\n ;\n debug('doXhr', url);\n\n this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);\n\n this.timeoutRef = setTimeout(function() {\n debug('timeout');\n self._cleanup(false);\n self.emit('finish');\n }, InfoReceiver.timeout);\n\n this.xo.once('finish', function(info, rtt) {\n debug('finish', info, rtt);\n self._cleanup(true);\n self.emit('finish', info, rtt);\n });\n};\n\nInfoReceiver.prototype._cleanup = function(wasClean) {\n debug('_cleanup');\n clearTimeout(this.timeoutRef);\n this.timeoutRef = null;\n if (!wasClean && this.xo) {\n this.xo.close();\n }\n this.xo = null;\n};\n\nInfoReceiver.prototype.close = function() {\n debug('close');\n this.removeAllListeners();\n this._cleanup(false);\n};\n\nInfoReceiver.timeout = 8000;\n\nmodule.exports = InfoReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"./info-ajax\":9,\"./info-iframe\":11,\"./transport/sender/xdr\":34,\"./transport/sender/xhr-cors\":35,\"./transport/sender/xhr-fake\":36,\"./transport/sender/xhr-local\":37,\"./utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],13:[function(require,module,exports){\n(function (global){\n'use strict';\n\nmodule.exports = global.location || {\n origin: 'http://localhost:80'\n, protocol: 'http:'\n, host: 'localhost'\n, port: 80\n, href: 'http://localhost/'\n, hash: ''\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],14:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nrequire('./shims');\n\nvar URL = require('url-parse')\n , inherits = require('inherits')\n , JSON3 = require('json3')\n , random = require('./utils/random')\n , escape = require('./utils/escape')\n , urlUtils = require('./utils/url')\n , eventUtils = require('./utils/event')\n , transport = require('./utils/transport')\n , objectUtils = require('./utils/object')\n , browser = require('./utils/browser')\n , log = require('./utils/log')\n , Event = require('./event/event')\n , EventTarget = require('./event/eventtarget')\n , loc = require('./location')\n , CloseEvent = require('./event/close')\n , TransportMessageEvent = require('./event/trans-message')\n , InfoReceiver = require('./info-receiver')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:main');\n}\n\nvar transports;\n\n// follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface\nfunction SockJS(url, protocols, options) {\n if (!(this instanceof SockJS)) {\n return new SockJS(url, protocols, options);\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'SockJS: 1 argument required, but only 0 present\");\n }\n EventTarget.call(this);\n\n this.readyState = SockJS.CONNECTING;\n this.extensions = '';\n this.protocol = '';\n\n // non-standard extension\n options = options || {};\n if (options.protocols_whitelist) {\n log.warn(\"'protocols_whitelist' is DEPRECATED. Use 'transports' instead.\");\n }\n this._transportsWhitelist = options.transports;\n this._transportOptions = options.transportOptions || {};\n this._timeout = options.timeout || 0;\n\n var sessionId = options.sessionId || 8;\n if (typeof sessionId === 'function') {\n this._generateSessionId = sessionId;\n } else if (typeof sessionId === 'number') {\n this._generateSessionId = function() {\n return random.string(sessionId);\n };\n } else {\n throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');\n }\n\n this._server = options.server || random.numberString(1000);\n\n // Step 1 of WS spec - parse and validate the url. Issue #8\n var parsedUrl = new URL(url);\n if (!parsedUrl.host || !parsedUrl.protocol) {\n throw new SyntaxError(\"The URL '\" + url + \"' is invalid\");\n } else if (parsedUrl.hash) {\n throw new SyntaxError('The URL must not contain a fragment');\n } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {\n throw new SyntaxError(\"The URL's scheme must be either 'http:' or 'https:'. '\" + parsedUrl.protocol + \"' is not allowed.\");\n }\n\n var secure = parsedUrl.protocol === 'https:';\n // Step 2 - don't allow secure origin with an insecure protocol\n if (loc.protocol === 'https:' && !secure) {\n // exception is 127.0.0.0/8 and ::1 urls\n if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) {\n throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');\n }\n }\n\n // Step 3 - check port access - no need here\n // Step 4 - parse protocols argument\n if (!protocols) {\n protocols = [];\n } else if (!Array.isArray(protocols)) {\n protocols = [protocols];\n }\n\n // Step 5 - check protocols argument\n var sortedProtocols = protocols.sort();\n sortedProtocols.forEach(function(proto, i) {\n if (!proto) {\n throw new SyntaxError(\"The protocols entry '\" + proto + \"' is invalid.\");\n }\n if (i < (sortedProtocols.length - 1) && proto === sortedProtocols[i + 1]) {\n throw new SyntaxError(\"The protocols entry '\" + proto + \"' is duplicated.\");\n }\n });\n\n // Step 6 - convert origin\n var o = urlUtils.getOrigin(loc.href);\n this._origin = o ? o.toLowerCase() : null;\n\n // remove the trailing slash\n parsedUrl.set('pathname', parsedUrl.pathname.replace(/\\/+$/, ''));\n\n // store the sanitized url\n this.url = parsedUrl.href;\n debug('using url', this.url);\n\n // Step 7 - start connection in background\n // obtain server info\n // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26\n this._urlInfo = {\n nullOrigin: !browser.hasDomain()\n , sameOrigin: urlUtils.isOriginEqual(this.url, loc.href)\n , sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)\n };\n\n this._ir = new InfoReceiver(this.url, this._urlInfo);\n this._ir.once('finish', this._receiveInfo.bind(this));\n}\n\ninherits(SockJS, EventTarget);\n\nfunction userSetCode(code) {\n return code === 1000 || (code >= 3000 && code <= 4999);\n}\n\nSockJS.prototype.close = function(code, reason) {\n // Step 1\n if (code && !userSetCode(code)) {\n throw new Error('InvalidAccessError: Invalid code');\n }\n // Step 2.4 states the max is 123 bytes, but we are just checking length\n if (reason && reason.length > 123) {\n throw new SyntaxError('reason argument has an invalid length');\n }\n\n // Step 3.1\n if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {\n return;\n }\n\n // TODO look at docs to determine how to set this\n var wasClean = true;\n this._close(code || 1000, reason || 'Normal closure', wasClean);\n};\n\nSockJS.prototype.send = function(data) {\n // #13 - convert anything non-string to string\n // TODO this currently turns objects into [object Object]\n if (typeof data !== 'string') {\n data = '' + data;\n }\n if (this.readyState === SockJS.CONNECTING) {\n throw new Error('InvalidStateError: The connection has not been established yet');\n }\n if (this.readyState !== SockJS.OPEN) {\n return;\n }\n this._transport.send(escape.quote(data));\n};\n\nSockJS.version = require('./version');\n\nSockJS.CONNECTING = 0;\nSockJS.OPEN = 1;\nSockJS.CLOSING = 2;\nSockJS.CLOSED = 3;\n\nSockJS.prototype._receiveInfo = function(info, rtt) {\n debug('_receiveInfo', rtt);\n this._ir = null;\n if (!info) {\n this._close(1002, 'Cannot connect to server');\n return;\n }\n\n // establish a round-trip timeout (RTO) based on the\n // round-trip time (RTT)\n this._rto = this.countRTO(rtt);\n // allow server to override url used for the actual transport\n this._transUrl = info.base_url ? info.base_url : this.url;\n info = objectUtils.extend(info, this._urlInfo);\n debug('info', info);\n // determine list of desired and supported transports\n var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);\n this._transports = enabledTransports.main;\n debug(this._transports.length + ' enabled transports');\n\n this._connect();\n};\n\nSockJS.prototype._connect = function() {\n for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {\n debug('attempt', Transport.transportName);\n if (Transport.needBody) {\n if (!global.document.body ||\n (typeof global.document.readyState !== 'undefined' &&\n global.document.readyState !== 'complete' &&\n global.document.readyState !== 'interactive')) {\n debug('waiting for body');\n this._transports.unshift(Transport);\n eventUtils.attachEvent('load', this._connect.bind(this));\n return;\n }\n }\n\n // calculate timeout based on RTO and round trips. Default to 5s\n var timeoutMs = Math.max(this._timeout, (this._rto * Transport.roundTrips) || 5000);\n this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);\n debug('using timeout', timeoutMs);\n\n var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());\n var options = this._transportOptions[Transport.transportName];\n debug('transport url', transportUrl);\n var transportObj = new Transport(transportUrl, this._transUrl, options);\n transportObj.on('message', this._transportMessage.bind(this));\n transportObj.once('close', this._transportClose.bind(this));\n transportObj.transportName = Transport.transportName;\n this._transport = transportObj;\n\n return;\n }\n this._close(2000, 'All transports failed', false);\n};\n\nSockJS.prototype._transportTimeout = function() {\n debug('_transportTimeout');\n if (this.readyState === SockJS.CONNECTING) {\n if (this._transport) {\n this._transport.close();\n }\n\n this._transportClose(2007, 'Transport timed out');\n }\n};\n\nSockJS.prototype._transportMessage = function(msg) {\n debug('_transportMessage', msg);\n var self = this\n , type = msg.slice(0, 1)\n , content = msg.slice(1)\n , payload\n ;\n\n // first check for messages that don't need a payload\n switch (type) {\n case 'o':\n this._open();\n return;\n case 'h':\n this.dispatchEvent(new Event('heartbeat'));\n debug('heartbeat', this.transport);\n return;\n }\n\n if (content) {\n try {\n payload = JSON3.parse(content);\n } catch (e) {\n debug('bad json', content);\n }\n }\n\n if (typeof payload === 'undefined') {\n debug('empty payload', content);\n return;\n }\n\n switch (type) {\n case 'a':\n if (Array.isArray(payload)) {\n payload.forEach(function(p) {\n debug('message', self.transport, p);\n self.dispatchEvent(new TransportMessageEvent(p));\n });\n }\n break;\n case 'm':\n debug('message', this.transport, payload);\n this.dispatchEvent(new TransportMessageEvent(payload));\n break;\n case 'c':\n if (Array.isArray(payload) && payload.length === 2) {\n this._close(payload[0], payload[1], true);\n }\n break;\n }\n};\n\nSockJS.prototype._transportClose = function(code, reason) {\n debug('_transportClose', this.transport, code, reason);\n if (this._transport) {\n this._transport.removeAllListeners();\n this._transport = null;\n this.transport = null;\n }\n\n if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {\n this._connect();\n return;\n }\n\n this._close(code, reason);\n};\n\nSockJS.prototype._open = function() {\n debug('_open', this._transport && this._transport.transportName, this.readyState);\n if (this.readyState === SockJS.CONNECTING) {\n if (this._transportTimeoutId) {\n clearTimeout(this._transportTimeoutId);\n this._transportTimeoutId = null;\n }\n this.readyState = SockJS.OPEN;\n this.transport = this._transport.transportName;\n this.dispatchEvent(new Event('open'));\n debug('connected', this.transport);\n } else {\n // The server might have been restarted, and lost track of our\n // connection.\n this._close(1006, 'Server lost session');\n }\n};\n\nSockJS.prototype._close = function(code, reason, wasClean) {\n debug('_close', this.transport, code, reason, wasClean, this.readyState);\n var forceFail = false;\n\n if (this._ir) {\n forceFail = true;\n this._ir.close();\n this._ir = null;\n }\n if (this._transport) {\n this._transport.close();\n this._transport = null;\n this.transport = null;\n }\n\n if (this.readyState === SockJS.CLOSED) {\n throw new Error('InvalidStateError: SockJS has already been closed');\n }\n\n this.readyState = SockJS.CLOSING;\n setTimeout(function() {\n this.readyState = SockJS.CLOSED;\n\n if (forceFail) {\n this.dispatchEvent(new Event('error'));\n }\n\n var e = new CloseEvent('close');\n e.wasClean = wasClean || false;\n e.code = code || 1000;\n e.reason = reason;\n\n this.dispatchEvent(e);\n this.onmessage = this.onclose = this.onerror = null;\n debug('disconnected');\n }.bind(this), 0);\n};\n\n// See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/\n// and RFC 2988.\nSockJS.prototype.countRTO = function(rtt) {\n // In a local environment, when using IE8/9 and the `jsonp-polling`\n // transport the time needed to establish a connection (the time that pass\n // from the opening of the transport to the call of `_dispatchOpen`) is\n // around 200msec (the lower bound used in the article above) and this\n // causes spurious timeouts. For this reason we calculate a value slightly\n // larger than that used in the article.\n if (rtt > 100) {\n return 4 * rtt; // rto > 400msec\n }\n return 300 + rtt; // 300msec < rto <= 400msec\n};\n\nmodule.exports = function(availableTransports) {\n transports = transport(availableTransports);\n require('./iframe-bootstrap')(SockJS, availableTransports);\n return SockJS;\n};\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./event/close\":2,\"./event/event\":4,\"./event/eventtarget\":5,\"./event/trans-message\":6,\"./iframe-bootstrap\":8,\"./info-receiver\":12,\"./location\":13,\"./shims\":15,\"./utils/browser\":44,\"./utils/escape\":45,\"./utils/event\":46,\"./utils/log\":48,\"./utils/object\":49,\"./utils/random\":50,\"./utils/transport\":51,\"./utils/url\":52,\"./version\":53,\"debug\":55,\"inherits\":57,\"json3\":58,\"url-parse\":61}],15:[function(require,module,exports){\n/* eslint-disable */\n/* jscs: disable */\n'use strict';\n\n// pulled specific shims from https://github.com/es-shims/es5-shim\n\nvar ArrayPrototype = Array.prototype;\nvar ObjectPrototype = Object.prototype;\nvar FunctionPrototype = Function.prototype;\nvar StringPrototype = String.prototype;\nvar array_slice = ArrayPrototype.slice;\n\nvar _toString = ObjectPrototype.toString;\nvar isFunction = function (val) {\n return ObjectPrototype.toString.call(val) === '[object Function]';\n};\nvar isArray = function isArray(obj) {\n return _toString.call(obj) === '[object Array]';\n};\nvar isString = function isString(obj) {\n return _toString.call(obj) === '[object String]';\n};\n\nvar supportsDescriptors = Object.defineProperty && (function () {\n try {\n Object.defineProperty({}, 'x', {});\n return true;\n } catch (e) { /* this is ES3 */\n return false;\n }\n}());\n\n// Define configurable, writable and non-enumerable props\n// if they don't exist.\nvar defineProperty;\nif (supportsDescriptors) {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && (name in object)) { return; }\n Object.defineProperty(object, name, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: method\n });\n };\n} else {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && (name in object)) { return; }\n object[name] = method;\n };\n}\nvar defineProperties = function (object, map, forceAssign) {\n for (var name in map) {\n if (ObjectPrototype.hasOwnProperty.call(map, name)) {\n defineProperty(object, name, map[name], forceAssign);\n }\n }\n};\n\nvar toObject = function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \" + o + ' to object');\n }\n return Object(o);\n};\n\n//\n// Util\n// ======\n//\n\n// ES5 9.4\n// http://es5.github.com/#x9.4\n// http://jsperf.com/to-integer\n\nfunction toInteger(num) {\n var n = +num;\n if (n !== n) { // isNaN\n n = 0;\n } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n}\n\nfunction ToUint32(x) {\n return x >>> 0;\n}\n\n//\n// Function\n// ========\n//\n\n// ES-5 15.3.4.5\n// http://es5.github.com/#x15.3.4.5\n\nfunction Empty() {}\n\ndefineProperties(FunctionPrototype, {\n bind: function bind(that) { // .length is 1\n // 1. Let Target be the this value.\n var target = this;\n // 2. If IsCallable(Target) is false, throw a TypeError exception.\n if (!isFunction(target)) {\n throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n }\n // 3. Let A be a new (possibly empty) internal list of all of the\n // argument values provided after thisArg (arg1, arg2 etc), in order.\n // XXX slicedArgs will stand in for \"A\" if used\n var args = array_slice.call(arguments, 1); // for normal call\n // 4. Let F be a new native ECMAScript object.\n // 11. Set the [[Prototype]] internal property of F to the standard\n // built-in Function prototype object as specified in 15.3.3.1.\n // 12. Set the [[Call]] internal property of F as described in\n // 15.3.4.5.1.\n // 13. Set the [[Construct]] internal property of F as described in\n // 15.3.4.5.2.\n // 14. Set the [[HasInstance]] internal property of F as described in\n // 15.3.4.5.3.\n var binder = function () {\n\n if (this instanceof bound) {\n // 15.3.4.5.2 [[Construct]]\n // When the [[Construct]] internal method of a function object,\n // F that was created using the bind function is called with a\n // list of arguments ExtraArgs, the following steps are taken:\n // 1. Let target be the value of F's [[TargetFunction]]\n // internal property.\n // 2. If target has no [[Construct]] internal method, a\n // TypeError exception is thrown.\n // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Construct]] internal\n // method of target providing args as the arguments.\n\n var result = target.apply(\n this,\n args.concat(array_slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n // 15.3.4.5.1 [[Call]]\n // When the [[Call]] internal method of a function object, F,\n // which was created using the bind function is called with a\n // this value and a list of arguments ExtraArgs, the following\n // steps are taken:\n // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 2. Let boundThis be the value of F's [[BoundThis]] internal\n // property.\n // 3. Let target be the value of F's [[TargetFunction]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Call]] internal method\n // of target providing boundThis as the this value and\n // providing args as the arguments.\n\n // equiv: target.call(this, ...boundArgs, ...args)\n return target.apply(\n that,\n args.concat(array_slice.call(arguments))\n );\n\n }\n\n };\n\n // 15. If the [[Class]] internal property of Target is \"Function\", then\n // a. Let L be the length property of Target minus the length of A.\n // b. Set the length own property of F to either 0 or L, whichever is\n // larger.\n // 16. Else set the length own property of F to 0.\n\n var boundLength = Math.max(0, target.length - args.length);\n\n // 17. Set the attributes of the length own property of F to the values\n // specified in 15.3.5.1.\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n // XXX Build a dynamic function with desired amount of arguments is the only\n // way to set the length property of a function.\n // In environments where Content Security Policies enabled (Chrome extensions,\n // for ex.) all use of eval or Function costructor throws an exception.\n // However in all of these environments Function.prototype.bind exists\n // and so this code will never be executed.\n var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n // Clean up dangling references.\n Empty.prototype = null;\n }\n\n // TODO\n // 18. Set the [[Extensible]] internal property of F to true.\n\n // TODO\n // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n // 20. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n // false.\n // 21. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n // and false.\n\n // TODO\n // NOTE Function objects created using Function.prototype.bind do not\n // have a prototype property or the [[Code]], [[FormalParameters]], and\n // [[Scope]] internal properties.\n // XXX can't delete prototype in pure-js.\n\n // 22. Return F.\n return bound;\n }\n});\n\n//\n// Array\n// =====\n//\n\n// ES5 15.4.3.2\n// http://es5.github.com/#x15.4.3.2\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray\ndefineProperties(Array, { isArray: isArray });\n\n\nvar boxedString = Object('a');\nvar splitString = boxedString[0] !== 'a' || !(0 in boxedString);\n\nvar properlyBoxesContext = function properlyBoxed(method) {\n // Check node 0.6.21 bug where third parameter is not boxed\n var properlyBoxesNonStrict = true;\n var properlyBoxesStrict = true;\n if (method) {\n method.call('foo', function (_, __, context) {\n if (typeof context !== 'object') { properlyBoxesNonStrict = false; }\n });\n\n method.call([1], function () {\n 'use strict';\n properlyBoxesStrict = typeof this === 'string';\n }, 'x');\n }\n return !!method && properlyBoxesNonStrict && properlyBoxesStrict;\n};\n\ndefineProperties(ArrayPrototype, {\n forEach: function forEach(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && isString(this) ? this.split('') : object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n\n // If no callback function or if callback is not a callable function\n if (!isFunction(fun)) {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n // Invoke the callback function with call, passing arguments:\n // context, property value, property key, thisArg object\n // context\n fun.call(thisp, self[i], i, object);\n }\n }\n }\n}, !properlyBoxesContext(ArrayPrototype.forEach));\n\n// ES5 15.4.4.14\n// http://es5.github.com/#x15.4.4.14\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf\nvar hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;\ndefineProperties(ArrayPrototype, {\n indexOf: function indexOf(sought /*, fromIndex */ ) {\n var self = splitString && isString(this) ? this.split('') : toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n\n // handle negative indices\n i = i >= 0 ? i : Math.max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n return -1;\n }\n}, hasFirefox2IndexOfBug);\n\n//\n// String\n// ======\n//\n\n// ES5 15.5.4.14\n// http://es5.github.com/#x15.5.4.14\n\n// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]\n// Many browsers do not split properly with regular expressions or they\n// do not perform the split correctly under obscure conditions.\n// See http://blog.stevenlevithan.com/archives/cross-browser-split\n// I've tested in many browsers and this seems to cover the deviant ones:\n// 'ab'.split(/(?:ab)*/) should be [\"\", \"\"], not [\"\"]\n// '.'.split(/(.?)(.?)/) should be [\"\", \".\", \"\", \"\"], not [\"\", \"\"]\n// 'tesst'.split(/(s)*/) should be [\"t\", undefined, \"e\", \"s\", \"t\"], not\n// [undefined, \"t\", undefined, \"e\", ...]\n// ''.split(/.?/) should be [], not [\"\"]\n// '.'.split(/()()/) should be [\".\"], not [\"\", \"\", \".\"]\n\nvar string_split = StringPrototype.split;\nif (\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n 'tesst'.split(/(s)*/)[1] === 't' ||\n 'test'.split(/(?:)/, -1).length !== 4 ||\n ''.split(/.?/).length ||\n '.'.split(/()()/).length > 1\n) {\n (function () {\n var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group\n\n StringPrototype.split = function (separator, limit) {\n var string = this;\n if (separator === void 0 && limit === 0) {\n return [];\n }\n\n // If `separator` is not a regex, use native split\n if (_toString.call(separator) !== '[object RegExp]') {\n return string_split.call(this, separator, limit);\n }\n\n var output = [],\n flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.extended ? 'x' : '') + // Proposed for ES6\n (separator.sticky ? 'y' : ''), // Firefox 3+\n lastLastIndex = 0,\n // Make `global` and avoid `lastIndex` issues by working with a copy\n separator2, match, lastIndex, lastLength;\n separator = new RegExp(separator.source, flags + 'g');\n string += ''; // Type-convert\n if (!compliantExecNpcg) {\n // Doesn't need flags gy, but they don't hurt\n separator2 = new RegExp('^' + separator.source + '$(?!\\\\s)', flags);\n }\n /* Values for `limit`, per the spec:\n * If undefined: 4294967295 // Math.pow(2, 32) - 1\n * If 0, Infinity, or NaN: 0\n * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n * If other: Type-convert, then use the above rules\n */\n limit = limit === void 0 ?\n -1 >>> 0 : // Math.pow(2, 32) - 1\n ToUint32(limit);\n while (match = separator.exec(string)) {\n // `separator.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0].length;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for\n // nonparticipating capturing groups\n if (!compliantExecNpcg && match.length > 1) {\n match[0].replace(separator2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === void 0) {\n match[i] = void 0;\n }\n }\n });\n }\n if (match.length > 1 && match.index < string.length) {\n ArrayPrototype.push.apply(output, match.slice(1));\n }\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= limit) {\n break;\n }\n }\n if (separator.lastIndex === match.index) {\n separator.lastIndex++; // Avoid an infinite loop\n }\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separator.test('')) {\n output.push('');\n }\n } else {\n output.push(string.slice(lastLastIndex));\n }\n return output.length > limit ? output.slice(0, limit) : output;\n };\n }());\n\n// [bugfix, chrome]\n// If separator is undefined, then the result array contains just one String,\n// which is the this value (converted to a String). If limit is not undefined,\n// then the output array is truncated so that it contains no more than limit\n// elements.\n// \"0\".split(undefined, 0) -> []\n} else if ('0'.split(void 0, 0).length) {\n StringPrototype.split = function split(separator, limit) {\n if (separator === void 0 && limit === 0) { return []; }\n return string_split.call(this, separator, limit);\n };\n}\n\n// ECMA-262, 3rd B.2.3\n// Not an ECMAScript standard, although ECMAScript 3rd Edition has a\n// non-normative section suggesting uniform semantics and it should be\n// normalized across all browsers\n// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE\nvar string_substr = StringPrototype.substr;\nvar hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';\ndefineProperties(StringPrototype, {\n substr: function substr(start, length) {\n return string_substr.call(\n this,\n start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start,\n length\n );\n }\n}, hasNegativeSubstrBug);\n\n},{}],16:[function(require,module,exports){\n'use strict';\n\nmodule.exports = [\n // streaming transports\n require('./transport/websocket')\n, require('./transport/xhr-streaming')\n, require('./transport/xdr-streaming')\n, require('./transport/eventsource')\n, require('./transport/lib/iframe-wrap')(require('./transport/eventsource'))\n\n // polling transports\n, require('./transport/htmlfile')\n, require('./transport/lib/iframe-wrap')(require('./transport/htmlfile'))\n, require('./transport/xhr-polling')\n, require('./transport/xdr-polling')\n, require('./transport/lib/iframe-wrap')(require('./transport/xhr-polling'))\n, require('./transport/jsonp-polling')\n];\n\n},{\"./transport/eventsource\":20,\"./transport/htmlfile\":21,\"./transport/jsonp-polling\":23,\"./transport/lib/iframe-wrap\":26,\"./transport/websocket\":38,\"./transport/xdr-polling\":39,\"./transport/xdr-streaming\":40,\"./transport/xhr-polling\":41,\"./transport/xhr-streaming\":42}],17:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , utils = require('../../utils/event')\n , urlUtils = require('../../utils/url')\n , XHR = global.XMLHttpRequest\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:browser:xhr');\n}\n\nfunction AbstractXHRObject(method, url, payload, opts) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n\n setTimeout(function () {\n self._start(method, url, payload, opts);\n }, 0);\n}\n\ninherits(AbstractXHRObject, EventEmitter);\n\nAbstractXHRObject.prototype._start = function(method, url, payload, opts) {\n var self = this;\n\n try {\n this.xhr = new XHR();\n } catch (x) {\n // intentionally empty\n }\n\n if (!this.xhr) {\n debug('no xhr');\n this.emit('finish', 0, 'no xhr support');\n this._cleanup();\n return;\n }\n\n // several browsers cache POSTs\n url = urlUtils.addQuery(url, 't=' + (+new Date()));\n\n // Explorer tends to keep connection open, even after the\n // tab gets closed: http://bugs.jquery.com/ticket/5280\n this.unloadRef = utils.unloadAdd(function() {\n debug('unload cleanup');\n self._cleanup(true);\n });\n try {\n this.xhr.open(method, url, true);\n if (this.timeout && 'timeout' in this.xhr) {\n this.xhr.timeout = this.timeout;\n this.xhr.ontimeout = function() {\n debug('xhr timeout');\n self.emit('finish', 0, '');\n self._cleanup(false);\n };\n }\n } catch (e) {\n debug('exception', e);\n // IE raises an exception on wrong port.\n this.emit('finish', 0, '');\n this._cleanup(false);\n return;\n }\n\n if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {\n debug('withCredentials');\n // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :\n // \"This never affects same-site requests.\"\n\n this.xhr.withCredentials = true;\n }\n if (opts && opts.headers) {\n for (var key in opts.headers) {\n this.xhr.setRequestHeader(key, opts.headers[key]);\n }\n }\n\n this.xhr.onreadystatechange = function() {\n if (self.xhr) {\n var x = self.xhr;\n var text, status;\n debug('readyState', x.readyState);\n switch (x.readyState) {\n case 3:\n // IE doesn't like peeking into responseText or status\n // on Microsoft.XMLHTTP and readystate=3\n try {\n status = x.status;\n text = x.responseText;\n } catch (e) {\n // intentionally empty\n }\n debug('status', status);\n // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450\n if (status === 1223) {\n status = 204;\n }\n\n // IE does return readystate == 3 for 404 answers.\n if (status === 200 && text && text.length > 0) {\n debug('chunk');\n self.emit('chunk', status, text);\n }\n break;\n case 4:\n status = x.status;\n debug('status', status);\n // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450\n if (status === 1223) {\n status = 204;\n }\n // IE returns this for a bad port\n // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx\n if (status === 12005 || status === 12029) {\n status = 0;\n }\n\n debug('finish', status, x.responseText);\n self.emit('finish', status, x.responseText);\n self._cleanup(false);\n break;\n }\n }\n };\n\n try {\n self.xhr.send(payload);\n } catch (e) {\n self.emit('finish', 0, '');\n self._cleanup(false);\n }\n};\n\nAbstractXHRObject.prototype._cleanup = function(abort) {\n debug('cleanup');\n if (!this.xhr) {\n return;\n }\n this.removeAllListeners();\n utils.unloadDel(this.unloadRef);\n\n // IE needs this field to be a function\n this.xhr.onreadystatechange = function() {};\n if (this.xhr.ontimeout) {\n this.xhr.ontimeout = null;\n }\n\n if (abort) {\n try {\n this.xhr.abort();\n } catch (x) {\n // intentionally empty\n }\n }\n this.unloadRef = this.xhr = null;\n};\n\nAbstractXHRObject.prototype.close = function() {\n debug('close');\n this._cleanup(true);\n};\n\nAbstractXHRObject.enabled = !!XHR;\n// override XMLHttpRequest for IE6/7\n// obfuscate to avoid firewalls\nvar axo = ['Active'].concat('Object').join('X');\nif (!AbstractXHRObject.enabled && (axo in global)) {\n debug('overriding xmlhttprequest');\n XHR = function() {\n try {\n return new global[axo]('Microsoft.XMLHTTP');\n } catch (e) {\n return null;\n }\n };\n AbstractXHRObject.enabled = !!new XHR();\n}\n\nvar cors = false;\ntry {\n cors = 'withCredentials' in new XHR();\n} catch (ignored) {\n // intentionally empty\n}\n\nAbstractXHRObject.supportsCORS = cors;\n\nmodule.exports = AbstractXHRObject;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/event\":46,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],18:[function(require,module,exports){\n(function (global){\nmodule.exports = global.EventSource;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],19:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar Driver = global.WebSocket || global.MozWebSocket;\nif (Driver) {\n\tmodule.exports = function WebSocketBrowserDriver(url) {\n\t\treturn new Driver(url);\n\t};\n} else {\n\tmodule.exports = undefined;\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],20:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , EventSourceReceiver = require('./receiver/eventsource')\n , XHRCorsObject = require('./sender/xhr-cors')\n , EventSourceDriver = require('eventsource')\n ;\n\nfunction EventSourceTransport(transUrl) {\n if (!EventSourceTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);\n}\n\ninherits(EventSourceTransport, AjaxBasedTransport);\n\nEventSourceTransport.enabled = function() {\n return !!EventSourceDriver;\n};\n\nEventSourceTransport.transportName = 'eventsource';\nEventSourceTransport.roundTrips = 2;\n\nmodule.exports = EventSourceTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/eventsource\":29,\"./sender/xhr-cors\":35,\"eventsource\":18,\"inherits\":57}],21:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , HtmlfileReceiver = require('./receiver/htmlfile')\n , XHRLocalObject = require('./sender/xhr-local')\n , AjaxBasedTransport = require('./lib/ajax-based')\n ;\n\nfunction HtmlFileTransport(transUrl) {\n if (!HtmlfileReceiver.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);\n}\n\ninherits(HtmlFileTransport, AjaxBasedTransport);\n\nHtmlFileTransport.enabled = function(info) {\n return HtmlfileReceiver.enabled && info.sameOrigin;\n};\n\nHtmlFileTransport.transportName = 'htmlfile';\nHtmlFileTransport.roundTrips = 2;\n\nmodule.exports = HtmlFileTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/htmlfile\":30,\"./sender/xhr-local\":37,\"inherits\":57}],22:[function(require,module,exports){\n(function (process){\n'use strict';\n\n// Few cool transports do work only for same-origin. In order to make\n// them work cross-domain we shall use iframe, served from the\n// remote domain. New browsers have capabilities to communicate with\n// cross domain iframe using postMessage(). In IE it was implemented\n// from IE 8+, but of course, IE got some details wrong:\n// http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx\n// http://stevesouders.com/misc/test-postmessage.php\n\nvar inherits = require('inherits')\n , JSON3 = require('json3')\n , EventEmitter = require('events').EventEmitter\n , version = require('../version')\n , urlUtils = require('../utils/url')\n , iframeUtils = require('../utils/iframe')\n , eventUtils = require('../utils/event')\n , random = require('../utils/random')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:transport:iframe');\n}\n\nfunction IframeTransport(transport, transUrl, baseUrl) {\n if (!IframeTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n EventEmitter.call(this);\n\n var self = this;\n this.origin = urlUtils.getOrigin(baseUrl);\n this.baseUrl = baseUrl;\n this.transUrl = transUrl;\n this.transport = transport;\n this.windowId = random.string(8);\n\n var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;\n debug(transport, transUrl, iframeUrl);\n\n this.iframeObj = iframeUtils.createIframe(iframeUrl, function(r) {\n debug('err callback');\n self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');\n self.close();\n });\n\n this.onmessageCallback = this._message.bind(this);\n eventUtils.attachEvent('message', this.onmessageCallback);\n}\n\ninherits(IframeTransport, EventEmitter);\n\nIframeTransport.prototype.close = function() {\n debug('close');\n this.removeAllListeners();\n if (this.iframeObj) {\n eventUtils.detachEvent('message', this.onmessageCallback);\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n this.postMessage('c');\n } catch (x) {\n // intentionally empty\n }\n this.iframeObj.cleanup();\n this.iframeObj = null;\n this.onmessageCallback = this.iframeObj = null;\n }\n};\n\nIframeTransport.prototype._message = function(e) {\n debug('message', e.data);\n if (!urlUtils.isOriginEqual(e.origin, this.origin)) {\n debug('not same origin', e.origin, this.origin);\n return;\n }\n\n var iframeMessage;\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== this.windowId) {\n debug('mismatched window id', iframeMessage.windowId, this.windowId);\n return;\n }\n\n switch (iframeMessage.type) {\n case 's':\n this.iframeObj.loaded();\n // window global dependency\n this.postMessage('s', JSON3.stringify([\n version\n , this.transport\n , this.transUrl\n , this.baseUrl\n ]));\n break;\n case 't':\n this.emit('message', iframeMessage.data);\n break;\n case 'c':\n var cdata;\n try {\n cdata = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n return;\n }\n this.emit('close', cdata[0], cdata[1]);\n this.close();\n break;\n }\n};\n\nIframeTransport.prototype.postMessage = function(type, data) {\n debug('postMessage', type, data);\n this.iframeObj.post(JSON3.stringify({\n windowId: this.windowId\n , type: type\n , data: data || ''\n }), this.origin);\n};\n\nIframeTransport.prototype.send = function(message) {\n debug('send', message);\n this.postMessage('m', message);\n};\n\nIframeTransport.enabled = function() {\n return iframeUtils.iframeEnabled;\n};\n\nIframeTransport.transportName = 'iframe';\nIframeTransport.roundTrips = 2;\n\nmodule.exports = IframeTransport;\n\n}).call(this,{ env: {} })\n\n},{\"../utils/event\":46,\"../utils/iframe\":47,\"../utils/random\":50,\"../utils/url\":52,\"../version\":53,\"debug\":55,\"events\":3,\"inherits\":57,\"json3\":58}],23:[function(require,module,exports){\n(function (global){\n'use strict';\n\n// The simplest and most robust transport, using the well-know cross\n// domain hack - JSONP. This transport is quite inefficient - one\n// message could use up to one http request. But at least it works almost\n// everywhere.\n// Known limitations:\n// o you will get a spinning cursor\n// o for Konqueror a dumb timer is needed to detect errors\n\nvar inherits = require('inherits')\n , SenderReceiver = require('./lib/sender-receiver')\n , JsonpReceiver = require('./receiver/jsonp')\n , jsonpSender = require('./sender/jsonp')\n ;\n\nfunction JsonPTransport(transUrl) {\n if (!JsonPTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);\n}\n\ninherits(JsonPTransport, SenderReceiver);\n\nJsonPTransport.enabled = function() {\n return !!global.document;\n};\n\nJsonPTransport.transportName = 'jsonp-polling';\nJsonPTransport.roundTrips = 1;\nJsonPTransport.needBody = true;\n\nmodule.exports = JsonPTransport;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./lib/sender-receiver\":28,\"./receiver/jsonp\":31,\"./sender/jsonp\":33,\"inherits\":57}],24:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , urlUtils = require('../../utils/url')\n , SenderReceiver = require('./sender-receiver')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:ajax-based');\n}\n\nfunction createAjaxSender(AjaxObject) {\n return function(url, payload, callback) {\n debug('create ajax sender', url, payload);\n var opt = {};\n if (typeof payload === 'string') {\n opt.headers = {'Content-type': 'text/plain'};\n }\n var ajaxUrl = urlUtils.addPath(url, '/xhr_send');\n var xo = new AjaxObject('POST', ajaxUrl, payload, opt);\n xo.once('finish', function(status) {\n debug('finish', status);\n xo = null;\n\n if (status !== 200 && status !== 204) {\n return callback(new Error('http status ' + status));\n }\n callback();\n });\n return function() {\n debug('abort');\n xo.close();\n xo = null;\n\n var err = new Error('Aborted');\n err.code = 1000;\n callback(err);\n };\n };\n}\n\nfunction AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {\n SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);\n}\n\ninherits(AjaxBasedTransport, SenderReceiver);\n\nmodule.exports = AjaxBasedTransport;\n\n}).call(this,{ env: {} })\n\n},{\"../../utils/url\":52,\"./sender-receiver\":28,\"debug\":55,\"inherits\":57}],25:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:buffered-sender');\n}\n\nfunction BufferedSender(url, sender) {\n debug(url);\n EventEmitter.call(this);\n this.sendBuffer = [];\n this.sender = sender;\n this.url = url;\n}\n\ninherits(BufferedSender, EventEmitter);\n\nBufferedSender.prototype.send = function(message) {\n debug('send', message);\n this.sendBuffer.push(message);\n if (!this.sendStop) {\n this.sendSchedule();\n }\n};\n\n// For polling transports in a situation when in the message callback,\n// new message is being send. If the sending connection was started\n// before receiving one, it is possible to saturate the network and\n// timeout due to the lack of receiving socket. To avoid that we delay\n// sending messages by some small time, in order to let receiving\n// connection be started beforehand. This is only a halfmeasure and\n// does not fix the big problem, but it does make the tests go more\n// stable on slow networks.\nBufferedSender.prototype.sendScheduleWait = function() {\n debug('sendScheduleWait');\n var self = this;\n var tref;\n this.sendStop = function() {\n debug('sendStop');\n self.sendStop = null;\n clearTimeout(tref);\n };\n tref = setTimeout(function() {\n debug('timeout');\n self.sendStop = null;\n self.sendSchedule();\n }, 25);\n};\n\nBufferedSender.prototype.sendSchedule = function() {\n debug('sendSchedule', this.sendBuffer.length);\n var self = this;\n if (this.sendBuffer.length > 0) {\n var payload = '[' + this.sendBuffer.join(',') + ']';\n this.sendStop = this.sender(this.url, payload, function(err) {\n self.sendStop = null;\n if (err) {\n debug('error', err);\n self.emit('close', err.code || 1006, 'Sending error: ' + err);\n self.close();\n } else {\n self.sendScheduleWait();\n }\n });\n this.sendBuffer = [];\n }\n};\n\nBufferedSender.prototype._cleanup = function() {\n debug('_cleanup');\n this.removeAllListeners();\n};\n\nBufferedSender.prototype.close = function() {\n debug('close');\n this._cleanup();\n if (this.sendStop) {\n this.sendStop();\n this.sendStop = null;\n }\n};\n\nmodule.exports = BufferedSender;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"inherits\":57}],26:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar inherits = require('inherits')\n , IframeTransport = require('../iframe')\n , objectUtils = require('../../utils/object')\n ;\n\nmodule.exports = function(transport) {\n\n function IframeWrapTransport(transUrl, baseUrl) {\n IframeTransport.call(this, transport.transportName, transUrl, baseUrl);\n }\n\n inherits(IframeWrapTransport, IframeTransport);\n\n IframeWrapTransport.enabled = function(url, info) {\n if (!global.document) {\n return false;\n }\n\n var iframeInfo = objectUtils.extend({}, info);\n iframeInfo.sameOrigin = true;\n return transport.enabled(iframeInfo) && IframeTransport.enabled();\n };\n\n IframeWrapTransport.transportName = 'iframe-' + transport.transportName;\n IframeWrapTransport.needBody = true;\n IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)\n\n IframeWrapTransport.facadeTransport = transport;\n\n return IframeWrapTransport;\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/object\":49,\"../iframe\":22,\"inherits\":57}],27:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:polling');\n}\n\nfunction Polling(Receiver, receiveUrl, AjaxObject) {\n debug(receiveUrl);\n EventEmitter.call(this);\n this.Receiver = Receiver;\n this.receiveUrl = receiveUrl;\n this.AjaxObject = AjaxObject;\n this._scheduleReceiver();\n}\n\ninherits(Polling, EventEmitter);\n\nPolling.prototype._scheduleReceiver = function() {\n debug('_scheduleReceiver');\n var self = this;\n var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);\n\n poll.on('message', function(msg) {\n debug('message', msg);\n self.emit('message', msg);\n });\n\n poll.once('close', function(code, reason) {\n debug('close', code, reason, self.pollIsClosing);\n self.poll = poll = null;\n\n if (!self.pollIsClosing) {\n if (reason === 'network') {\n self._scheduleReceiver();\n } else {\n self.emit('close', code || 1006, reason);\n self.removeAllListeners();\n }\n }\n });\n};\n\nPolling.prototype.abort = function() {\n debug('abort');\n this.removeAllListeners();\n this.pollIsClosing = true;\n if (this.poll) {\n this.poll.abort();\n }\n};\n\nmodule.exports = Polling;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"inherits\":57}],28:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , urlUtils = require('../../utils/url')\n , BufferedSender = require('./buffered-sender')\n , Polling = require('./polling')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender-receiver');\n}\n\nfunction SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {\n var pollUrl = urlUtils.addPath(transUrl, urlSuffix);\n debug(pollUrl);\n var self = this;\n BufferedSender.call(this, transUrl, senderFunc);\n\n this.poll = new Polling(Receiver, pollUrl, AjaxObject);\n this.poll.on('message', function(msg) {\n debug('poll message', msg);\n self.emit('message', msg);\n });\n this.poll.once('close', function(code, reason) {\n debug('poll close', code, reason);\n self.poll = null;\n self.emit('close', code, reason);\n self.close();\n });\n}\n\ninherits(SenderReceiver, BufferedSender);\n\nSenderReceiver.prototype.close = function() {\n BufferedSender.prototype.close.call(this);\n debug('close');\n this.removeAllListeners();\n if (this.poll) {\n this.poll.abort();\n this.poll = null;\n }\n};\n\nmodule.exports = SenderReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"../../utils/url\":52,\"./buffered-sender\":25,\"./polling\":27,\"debug\":55,\"inherits\":57}],29:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n , EventSourceDriver = require('eventsource')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:eventsource');\n}\n\nfunction EventSourceReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n\n var self = this;\n var es = this.es = new EventSourceDriver(url);\n es.onmessage = function(e) {\n debug('message', e.data);\n self.emit('message', decodeURI(e.data));\n };\n es.onerror = function(e) {\n debug('error', es.readyState, e);\n // ES on reconnection has readyState = 0 or 1.\n // on network error it's CLOSED = 2\n var reason = (es.readyState !== 2 ? 'network' : 'permanent');\n self._cleanup();\n self._close(reason);\n };\n}\n\ninherits(EventSourceReceiver, EventEmitter);\n\nEventSourceReceiver.prototype.abort = function() {\n debug('abort');\n this._cleanup();\n this._close('user');\n};\n\nEventSourceReceiver.prototype._cleanup = function() {\n debug('cleanup');\n var es = this.es;\n if (es) {\n es.onmessage = es.onerror = null;\n es.close();\n this.es = null;\n }\n};\n\nEventSourceReceiver.prototype._close = function(reason) {\n debug('close', reason);\n var self = this;\n // Safari and chrome < 15 crash if we close window before\n // waiting for ES cleanup. See:\n // https://code.google.com/p/chromium/issues/detail?id=89155\n setTimeout(function() {\n self.emit('close', null, reason);\n self.removeAllListeners();\n }, 200);\n};\n\nmodule.exports = EventSourceReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"eventsource\":18,\"inherits\":57}],30:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar inherits = require('inherits')\n , iframeUtils = require('../../utils/iframe')\n , urlUtils = require('../../utils/url')\n , EventEmitter = require('events').EventEmitter\n , random = require('../../utils/random')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:htmlfile');\n}\n\nfunction HtmlfileReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n iframeUtils.polluteGlobalNamespace();\n\n this.id = 'a' + random.string(6);\n url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));\n\n debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);\n var constructFunc = HtmlfileReceiver.htmlfileEnabled ?\n iframeUtils.createHtmlfile : iframeUtils.createIframe;\n\n global[iframeUtils.WPrefix][this.id] = {\n start: function() {\n debug('start');\n self.iframeObj.loaded();\n }\n , message: function(data) {\n debug('message', data);\n self.emit('message', data);\n }\n , stop: function() {\n debug('stop');\n self._cleanup();\n self._close('network');\n }\n };\n this.iframeObj = constructFunc(url, function() {\n debug('callback');\n self._cleanup();\n self._close('permanent');\n });\n}\n\ninherits(HtmlfileReceiver, EventEmitter);\n\nHtmlfileReceiver.prototype.abort = function() {\n debug('abort');\n this._cleanup();\n this._close('user');\n};\n\nHtmlfileReceiver.prototype._cleanup = function() {\n debug('_cleanup');\n if (this.iframeObj) {\n this.iframeObj.cleanup();\n this.iframeObj = null;\n }\n delete global[iframeUtils.WPrefix][this.id];\n};\n\nHtmlfileReceiver.prototype._close = function(reason) {\n debug('_close', reason);\n this.emit('close', null, reason);\n this.removeAllListeners();\n};\n\nHtmlfileReceiver.htmlfileEnabled = false;\n\n// obfuscate to avoid firewalls\nvar axo = ['Active'].concat('Object').join('X');\nif (axo in global) {\n try {\n HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile');\n } catch (x) {\n // intentionally empty\n }\n}\n\nHtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;\n\nmodule.exports = HtmlfileReceiver;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/iframe\":47,\"../../utils/random\":50,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],31:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar utils = require('../../utils/iframe')\n , random = require('../../utils/random')\n , browser = require('../../utils/browser')\n , urlUtils = require('../../utils/url')\n , inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:jsonp');\n}\n\nfunction JsonpReceiver(url) {\n debug(url);\n var self = this;\n EventEmitter.call(this);\n\n utils.polluteGlobalNamespace();\n\n this.id = 'a' + random.string(6);\n var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));\n\n global[utils.WPrefix][this.id] = this._callback.bind(this);\n this._createScript(urlWithId);\n\n // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.\n this.timeoutId = setTimeout(function() {\n debug('timeout');\n self._abort(new Error('JSONP script loaded abnormally (timeout)'));\n }, JsonpReceiver.timeout);\n}\n\ninherits(JsonpReceiver, EventEmitter);\n\nJsonpReceiver.prototype.abort = function() {\n debug('abort');\n if (global[utils.WPrefix][this.id]) {\n var err = new Error('JSONP user aborted read');\n err.code = 1000;\n this._abort(err);\n }\n};\n\nJsonpReceiver.timeout = 35000;\nJsonpReceiver.scriptErrorTimeout = 1000;\n\nJsonpReceiver.prototype._callback = function(data) {\n debug('_callback', data);\n this._cleanup();\n\n if (this.aborting) {\n return;\n }\n\n if (data) {\n debug('message', data);\n this.emit('message', data);\n }\n this.emit('close', null, 'network');\n this.removeAllListeners();\n};\n\nJsonpReceiver.prototype._abort = function(err) {\n debug('_abort', err);\n this._cleanup();\n this.aborting = true;\n this.emit('close', err.code, err.message);\n this.removeAllListeners();\n};\n\nJsonpReceiver.prototype._cleanup = function() {\n debug('_cleanup');\n clearTimeout(this.timeoutId);\n if (this.script2) {\n this.script2.parentNode.removeChild(this.script2);\n this.script2 = null;\n }\n if (this.script) {\n var script = this.script;\n // Unfortunately, you can't really abort script loading of\n // the script.\n script.parentNode.removeChild(script);\n script.onreadystatechange = script.onerror =\n script.onload = script.onclick = null;\n this.script = null;\n }\n delete global[utils.WPrefix][this.id];\n};\n\nJsonpReceiver.prototype._scriptError = function() {\n debug('_scriptError');\n var self = this;\n if (this.errorTimer) {\n return;\n }\n\n this.errorTimer = setTimeout(function() {\n if (!self.loadedOkay) {\n self._abort(new Error('JSONP script loaded abnormally (onerror)'));\n }\n }, JsonpReceiver.scriptErrorTimeout);\n};\n\nJsonpReceiver.prototype._createScript = function(url) {\n debug('_createScript', url);\n var self = this;\n var script = this.script = global.document.createElement('script');\n var script2; // Opera synchronous load trick.\n\n script.id = 'a' + random.string(8);\n script.src = url;\n script.type = 'text/javascript';\n script.charset = 'UTF-8';\n script.onerror = this._scriptError.bind(this);\n script.onload = function() {\n debug('onload');\n self._abort(new Error('JSONP script loaded abnormally (onload)'));\n };\n\n // IE9 fires 'error' event after onreadystatechange or before, in random order.\n // Use loadedOkay to determine if actually errored\n script.onreadystatechange = function() {\n debug('onreadystatechange', script.readyState);\n if (/loaded|closed/.test(script.readyState)) {\n if (script && script.htmlFor && script.onclick) {\n self.loadedOkay = true;\n try {\n // In IE, actually execute the script.\n script.onclick();\n } catch (x) {\n // intentionally empty\n }\n }\n if (script) {\n self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));\n }\n }\n };\n // IE: event/htmlFor/onclick trick.\n // One can't rely on proper order for onreadystatechange. In order to\n // make sure, set a 'htmlFor' and 'event' properties, so that\n // script code will be installed as 'onclick' handler for the\n // script object. Later, onreadystatechange, manually execute this\n // code. FF and Chrome doesn't work with 'event' and 'htmlFor'\n // set. For reference see:\n // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html\n // Also, read on that about script ordering:\n // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order\n if (typeof script.async === 'undefined' && global.document.attachEvent) {\n // According to mozilla docs, in recent browsers script.async defaults\n // to 'true', so we may use it to detect a good browser:\n // https://developer.mozilla.org/en/HTML/Element/script\n if (!browser.isOpera()) {\n // Naively assume we're in IE\n try {\n script.htmlFor = script.id;\n script.event = 'onclick';\n } catch (x) {\n // intentionally empty\n }\n script.async = true;\n } else {\n // Opera, second sync script hack\n script2 = this.script2 = global.document.createElement('script');\n script2.text = \"try{var a = document.getElementById('\" + script.id + \"'); if(a)a.onerror();}catch(x){};\";\n script.async = script2.async = false;\n }\n }\n if (typeof script.async !== 'undefined') {\n script.async = true;\n }\n\n var head = global.document.getElementsByTagName('head')[0];\n head.insertBefore(script, head.firstChild);\n if (script2) {\n head.insertBefore(script2, head.firstChild);\n }\n};\n\nmodule.exports = JsonpReceiver;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/browser\":44,\"../../utils/iframe\":47,\"../../utils/random\":50,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],32:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:xhr');\n}\n\nfunction XhrReceiver(url, AjaxObject) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n\n this.bufferPosition = 0;\n\n this.xo = new AjaxObject('POST', url, null);\n this.xo.on('chunk', this._chunkHandler.bind(this));\n this.xo.once('finish', function(status, text) {\n debug('finish', status, text);\n self._chunkHandler(status, text);\n self.xo = null;\n var reason = status === 200 ? 'network' : 'permanent';\n debug('close', reason);\n self.emit('close', null, reason);\n self._cleanup();\n });\n}\n\ninherits(XhrReceiver, EventEmitter);\n\nXhrReceiver.prototype._chunkHandler = function(status, text) {\n debug('_chunkHandler', status);\n if (status !== 200 || !text) {\n return;\n }\n\n for (var idx = -1; ; this.bufferPosition += idx + 1) {\n var buf = text.slice(this.bufferPosition);\n idx = buf.indexOf('\\n');\n if (idx === -1) {\n break;\n }\n var msg = buf.slice(0, idx);\n if (msg) {\n debug('message', msg);\n this.emit('message', msg);\n }\n }\n};\n\nXhrReceiver.prototype._cleanup = function() {\n debug('_cleanup');\n this.removeAllListeners();\n};\n\nXhrReceiver.prototype.abort = function() {\n debug('abort');\n if (this.xo) {\n this.xo.close();\n debug('close');\n this.emit('close', null, 'user');\n this.xo = null;\n }\n this._cleanup();\n};\n\nmodule.exports = XhrReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"inherits\":57}],33:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar random = require('../../utils/random')\n , urlUtils = require('../../utils/url')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:jsonp');\n}\n\nvar form, area;\n\nfunction createIframe(id) {\n debug('createIframe', id);\n try {\n // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n return global.document.createElement('<iframe name=\"' + id + '\">');\n } catch (x) {\n var iframe = global.document.createElement('iframe');\n iframe.name = id;\n return iframe;\n }\n}\n\nfunction createForm() {\n debug('createForm');\n form = global.document.createElement('form');\n form.style.display = 'none';\n form.style.position = 'absolute';\n form.method = 'POST';\n form.enctype = 'application/x-www-form-urlencoded';\n form.acceptCharset = 'UTF-8';\n\n area = global.document.createElement('textarea');\n area.name = 'd';\n form.appendChild(area);\n\n global.document.body.appendChild(form);\n}\n\nmodule.exports = function(url, payload, callback) {\n debug(url, payload);\n if (!form) {\n createForm();\n }\n var id = 'a' + random.string(8);\n form.target = id;\n form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);\n\n var iframe = createIframe(id);\n iframe.id = id;\n iframe.style.display = 'none';\n form.appendChild(iframe);\n\n try {\n area.value = payload;\n } catch (e) {\n // seriously broken browsers get here\n }\n form.submit();\n\n var completed = function(err) {\n debug('completed', id, err);\n if (!iframe.onerror) {\n return;\n }\n iframe.onreadystatechange = iframe.onerror = iframe.onload = null;\n // Opera mini doesn't like if we GC iframe\n // immediately, thus this timeout.\n setTimeout(function() {\n debug('cleaning up', id);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }, 500);\n area.value = '';\n // It is not possible to detect if the iframe succeeded or\n // failed to submit our form.\n callback(err);\n };\n iframe.onerror = function() {\n debug('onerror', id);\n completed();\n };\n iframe.onload = function() {\n debug('onload', id);\n completed();\n };\n iframe.onreadystatechange = function(e) {\n debug('onreadystatechange', id, iframe.readyState, e);\n if (iframe.readyState === 'complete') {\n completed();\n }\n };\n return function() {\n debug('aborted', id);\n completed(new Error('Aborted'));\n };\n};\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/random\":50,\"../../utils/url\":52,\"debug\":55}],34:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , eventUtils = require('../../utils/event')\n , browser = require('../../utils/browser')\n , urlUtils = require('../../utils/url')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:xdr');\n}\n\n// References:\n// http://ajaxian.com/archives/100-line-ajax-wrapper\n// http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx\n\nfunction XDRObject(method, url, payload) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n\n setTimeout(function() {\n self._start(method, url, payload);\n }, 0);\n}\n\ninherits(XDRObject, EventEmitter);\n\nXDRObject.prototype._start = function(method, url, payload) {\n debug('_start');\n var self = this;\n var xdr = new global.XDomainRequest();\n // IE caches even POSTs\n url = urlUtils.addQuery(url, 't=' + (+new Date()));\n\n xdr.onerror = function() {\n debug('onerror');\n self._error();\n };\n xdr.ontimeout = function() {\n debug('ontimeout');\n self._error();\n };\n xdr.onprogress = function() {\n debug('progress', xdr.responseText);\n self.emit('chunk', 200, xdr.responseText);\n };\n xdr.onload = function() {\n debug('load');\n self.emit('finish', 200, xdr.responseText);\n self._cleanup(false);\n };\n this.xdr = xdr;\n this.unloadRef = eventUtils.unloadAdd(function() {\n self._cleanup(true);\n });\n try {\n // Fails with AccessDenied if port number is bogus\n this.xdr.open(method, url);\n if (this.timeout) {\n this.xdr.timeout = this.timeout;\n }\n this.xdr.send(payload);\n } catch (x) {\n this._error();\n }\n};\n\nXDRObject.prototype._error = function() {\n this.emit('finish', 0, '');\n this._cleanup(false);\n};\n\nXDRObject.prototype._cleanup = function(abort) {\n debug('cleanup', abort);\n if (!this.xdr) {\n return;\n }\n this.removeAllListeners();\n eventUtils.unloadDel(this.unloadRef);\n\n this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;\n if (abort) {\n try {\n this.xdr.abort();\n } catch (x) {\n // intentionally empty\n }\n }\n this.unloadRef = this.xdr = null;\n};\n\nXDRObject.prototype.close = function() {\n debug('close');\n this._cleanup(true);\n};\n\n// IE 8/9 if the request target uses the same scheme - #79\nXDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain());\n\nmodule.exports = XDRObject;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/browser\":44,\"../../utils/event\":46,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],35:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , XhrDriver = require('../driver/xhr')\n ;\n\nfunction XHRCorsObject(method, url, payload, opts) {\n XhrDriver.call(this, method, url, payload, opts);\n}\n\ninherits(XHRCorsObject, XhrDriver);\n\nXHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;\n\nmodule.exports = XHRCorsObject;\n\n},{\"../driver/xhr\":17,\"inherits\":57}],36:[function(require,module,exports){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n ;\n\nfunction XHRFake(/* method, url, payload, opts */) {\n var self = this;\n EventEmitter.call(this);\n\n this.to = setTimeout(function() {\n self.emit('finish', 200, '{}');\n }, XHRFake.timeout);\n}\n\ninherits(XHRFake, EventEmitter);\n\nXHRFake.prototype.close = function() {\n clearTimeout(this.to);\n};\n\nXHRFake.timeout = 2000;\n\nmodule.exports = XHRFake;\n\n},{\"events\":3,\"inherits\":57}],37:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , XhrDriver = require('../driver/xhr')\n ;\n\nfunction XHRLocalObject(method, url, payload /*, opts */) {\n XhrDriver.call(this, method, url, payload, {\n noCredentials: true\n });\n}\n\ninherits(XHRLocalObject, XhrDriver);\n\nXHRLocalObject.enabled = XhrDriver.enabled;\n\nmodule.exports = XHRLocalObject;\n\n},{\"../driver/xhr\":17,\"inherits\":57}],38:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar utils = require('../utils/event')\n , urlUtils = require('../utils/url')\n , inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n , WebsocketDriver = require('./driver/websocket')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:websocket');\n}\n\nfunction WebSocketTransport(transUrl, ignore, options) {\n if (!WebSocketTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n EventEmitter.call(this);\n debug('constructor', transUrl);\n\n var self = this;\n var url = urlUtils.addPath(transUrl, '/websocket');\n if (url.slice(0, 5) === 'https') {\n url = 'wss' + url.slice(5);\n } else {\n url = 'ws' + url.slice(4);\n }\n this.url = url;\n\n this.ws = new WebsocketDriver(this.url, [], options);\n this.ws.onmessage = function(e) {\n debug('message event', e.data);\n self.emit('message', e.data);\n };\n // Firefox has an interesting bug. If a websocket connection is\n // created after onunload, it stays alive even when user\n // navigates away from the page. In such situation let's lie -\n // let's not open the ws connection at all. See:\n // https://github.com/sockjs/sockjs-client/issues/28\n // https://bugzilla.mozilla.org/show_bug.cgi?id=696085\n this.unloadRef = utils.unloadAdd(function() {\n debug('unload');\n self.ws.close();\n });\n this.ws.onclose = function(e) {\n debug('close event', e.code, e.reason);\n self.emit('close', e.code, e.reason);\n self._cleanup();\n };\n this.ws.onerror = function(e) {\n debug('error event', e);\n self.emit('close', 1006, 'WebSocket connection broken');\n self._cleanup();\n };\n}\n\ninherits(WebSocketTransport, EventEmitter);\n\nWebSocketTransport.prototype.send = function(data) {\n var msg = '[' + data + ']';\n debug('send', msg);\n this.ws.send(msg);\n};\n\nWebSocketTransport.prototype.close = function() {\n debug('close');\n var ws = this.ws;\n this._cleanup();\n if (ws) {\n ws.close();\n }\n};\n\nWebSocketTransport.prototype._cleanup = function() {\n debug('_cleanup');\n var ws = this.ws;\n if (ws) {\n ws.onmessage = ws.onclose = ws.onerror = null;\n }\n utils.unloadDel(this.unloadRef);\n this.unloadRef = this.ws = null;\n this.removeAllListeners();\n};\n\nWebSocketTransport.enabled = function() {\n debug('enabled');\n return !!WebsocketDriver;\n};\nWebSocketTransport.transportName = 'websocket';\n\n// In theory, ws should require 1 round trip. But in chrome, this is\n// not very stable over SSL. Most likely a ws connection requires a\n// separate SSL connection, in which case 2 round trips are an\n// absolute minumum.\nWebSocketTransport.roundTrips = 2;\n\nmodule.exports = WebSocketTransport;\n\n}).call(this,{ env: {} })\n\n},{\"../utils/event\":46,\"../utils/url\":52,\"./driver/websocket\":19,\"debug\":55,\"events\":3,\"inherits\":57}],39:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XdrStreamingTransport = require('./xdr-streaming')\n , XhrReceiver = require('./receiver/xhr')\n , XDRObject = require('./sender/xdr')\n ;\n\nfunction XdrPollingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);\n}\n\ninherits(XdrPollingTransport, AjaxBasedTransport);\n\nXdrPollingTransport.enabled = XdrStreamingTransport.enabled;\nXdrPollingTransport.transportName = 'xdr-polling';\nXdrPollingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XdrPollingTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xdr\":34,\"./xdr-streaming\":40,\"inherits\":57}],40:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XhrReceiver = require('./receiver/xhr')\n , XDRObject = require('./sender/xdr')\n ;\n\n// According to:\n// http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests\n// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/\n\nfunction XdrStreamingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);\n}\n\ninherits(XdrStreamingTransport, AjaxBasedTransport);\n\nXdrStreamingTransport.enabled = function(info) {\n if (info.cookie_needed || info.nullOrigin) {\n return false;\n }\n return XDRObject.enabled && info.sameScheme;\n};\n\nXdrStreamingTransport.transportName = 'xdr-streaming';\nXdrStreamingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XdrStreamingTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xdr\":34,\"inherits\":57}],41:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XhrReceiver = require('./receiver/xhr')\n , XHRCorsObject = require('./sender/xhr-cors')\n , XHRLocalObject = require('./sender/xhr-local')\n ;\n\nfunction XhrPollingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);\n}\n\ninherits(XhrPollingTransport, AjaxBasedTransport);\n\nXhrPollingTransport.enabled = function(info) {\n if (info.nullOrigin) {\n return false;\n }\n\n if (XHRLocalObject.enabled && info.sameOrigin) {\n return true;\n }\n return XHRCorsObject.enabled;\n};\n\nXhrPollingTransport.transportName = 'xhr-polling';\nXhrPollingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XhrPollingTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xhr-cors\":35,\"./sender/xhr-local\":37,\"inherits\":57}],42:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XhrReceiver = require('./receiver/xhr')\n , XHRCorsObject = require('./sender/xhr-cors')\n , XHRLocalObject = require('./sender/xhr-local')\n , browser = require('../utils/browser')\n ;\n\nfunction XhrStreamingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);\n}\n\ninherits(XhrStreamingTransport, AjaxBasedTransport);\n\nXhrStreamingTransport.enabled = function(info) {\n if (info.nullOrigin) {\n return false;\n }\n // Opera doesn't support xhr-streaming #60\n // But it might be able to #92\n if (browser.isOpera()) {\n return false;\n }\n\n return XHRCorsObject.enabled;\n};\n\nXhrStreamingTransport.transportName = 'xhr-streaming';\nXhrStreamingTransport.roundTrips = 2; // preflight, ajax\n\n// Safari gets confused when a streaming ajax request is started\n// before onload. This causes the load indicator to spin indefinetely.\n// Only require body when used in a browser\nXhrStreamingTransport.needBody = !!global.document;\n\nmodule.exports = XhrStreamingTransport;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../utils/browser\":44,\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xhr-cors\":35,\"./sender/xhr-local\":37,\"inherits\":57}],43:[function(require,module,exports){\n(function (global){\n'use strict';\n\nif (global.crypto && global.crypto.getRandomValues) {\n module.exports.randomBytes = function(length) {\n var bytes = new Uint8Array(length);\n global.crypto.getRandomValues(bytes);\n return bytes;\n };\n} else {\n module.exports.randomBytes = function(length) {\n var bytes = new Array(length);\n for (var i = 0; i < length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n return bytes;\n };\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],44:[function(require,module,exports){\n(function (global){\n'use strict';\n\nmodule.exports = {\n isOpera: function() {\n return global.navigator &&\n /opera/i.test(global.navigator.userAgent);\n }\n\n, isKonqueror: function() {\n return global.navigator &&\n /konqueror/i.test(global.navigator.userAgent);\n }\n\n // #187 wrap document.domain in try/catch because of WP8 from file:///\n, hasDomain: function () {\n // non-browser client always has a domain\n if (!global.document) {\n return true;\n }\n\n try {\n return !!global.document.domain;\n } catch (e) {\n return false;\n }\n }\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],45:[function(require,module,exports){\n'use strict';\n\nvar JSON3 = require('json3');\n\n// Some extra characters that Chrome gets wrong, and substitutes with\n// something else on the wire.\n// eslint-disable-next-line no-control-regex, no-misleading-character-class\nvar extraEscapable = /[\\x00-\\x1f\\ud800-\\udfff\\ufffe\\uffff\\u0300-\\u0333\\u033d-\\u0346\\u034a-\\u034c\\u0350-\\u0352\\u0357-\\u0358\\u035c-\\u0362\\u0374\\u037e\\u0387\\u0591-\\u05af\\u05c4\\u0610-\\u0617\\u0653-\\u0654\\u0657-\\u065b\\u065d-\\u065e\\u06df-\\u06e2\\u06eb-\\u06ec\\u0730\\u0732-\\u0733\\u0735-\\u0736\\u073a\\u073d\\u073f-\\u0741\\u0743\\u0745\\u0747\\u07eb-\\u07f1\\u0951\\u0958-\\u095f\\u09dc-\\u09dd\\u09df\\u0a33\\u0a36\\u0a59-\\u0a5b\\u0a5e\\u0b5c-\\u0b5d\\u0e38-\\u0e39\\u0f43\\u0f4d\\u0f52\\u0f57\\u0f5c\\u0f69\\u0f72-\\u0f76\\u0f78\\u0f80-\\u0f83\\u0f93\\u0f9d\\u0fa2\\u0fa7\\u0fac\\u0fb9\\u1939-\\u193a\\u1a17\\u1b6b\\u1cda-\\u1cdb\\u1dc0-\\u1dcf\\u1dfc\\u1dfe\\u1f71\\u1f73\\u1f75\\u1f77\\u1f79\\u1f7b\\u1f7d\\u1fbb\\u1fbe\\u1fc9\\u1fcb\\u1fd3\\u1fdb\\u1fe3\\u1feb\\u1fee-\\u1fef\\u1ff9\\u1ffb\\u1ffd\\u2000-\\u2001\\u20d0-\\u20d1\\u20d4-\\u20d7\\u20e7-\\u20e9\\u2126\\u212a-\\u212b\\u2329-\\u232a\\u2adc\\u302b-\\u302c\\uaab2-\\uaab3\\uf900-\\ufa0d\\ufa10\\ufa12\\ufa15-\\ufa1e\\ufa20\\ufa22\\ufa25-\\ufa26\\ufa2a-\\ufa2d\\ufa30-\\ufa6d\\ufa70-\\ufad9\\ufb1d\\ufb1f\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufb4e\\ufff0-\\uffff]/g\n , extraLookup;\n\n// This may be quite slow, so let's delay until user actually uses bad\n// characters.\nvar unrollLookup = function(escapable) {\n var i;\n var unrolled = {};\n var c = [];\n for (i = 0; i < 65536; i++) {\n c.push( String.fromCharCode(i) );\n }\n escapable.lastIndex = 0;\n c.join('').replace(escapable, function(a) {\n unrolled[ a ] = '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n return '';\n });\n escapable.lastIndex = 0;\n return unrolled;\n};\n\n// Quote string, also taking care of unicode characters that browsers\n// often break. Especially, take care of unicode surrogates:\n// http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates\nmodule.exports = {\n quote: function(string) {\n var quoted = JSON3.stringify(string);\n\n // In most cases this should be very fast and good enough.\n extraEscapable.lastIndex = 0;\n if (!extraEscapable.test(quoted)) {\n return quoted;\n }\n\n if (!extraLookup) {\n extraLookup = unrollLookup(extraEscapable);\n }\n\n return quoted.replace(extraEscapable, function(a) {\n return extraLookup[a];\n });\n }\n};\n\n},{\"json3\":58}],46:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar random = require('./random');\n\nvar onUnload = {}\n , afterUnload = false\n // detect google chrome packaged apps because they don't allow the 'unload' event\n , isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime\n ;\n\nmodule.exports = {\n attachEvent: function(event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.addEventListener(event, listener, false);\n } else if (global.document && global.attachEvent) {\n // IE quirks.\n // According to: http://stevesouders.com/misc/test-postmessage.php\n // the message gets delivered only to 'document', not 'window'.\n global.document.attachEvent('on' + event, listener);\n // I get 'window' for ie8.\n global.attachEvent('on' + event, listener);\n }\n }\n\n, detachEvent: function(event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.removeEventListener(event, listener, false);\n } else if (global.document && global.detachEvent) {\n global.document.detachEvent('on' + event, listener);\n global.detachEvent('on' + event, listener);\n }\n }\n\n, unloadAdd: function(listener) {\n if (isChromePackagedApp) {\n return null;\n }\n\n var ref = random.string(8);\n onUnload[ref] = listener;\n if (afterUnload) {\n setTimeout(this.triggerUnloadCallbacks, 0);\n }\n return ref;\n }\n\n, unloadDel: function(ref) {\n if (ref in onUnload) {\n delete onUnload[ref];\n }\n }\n\n, triggerUnloadCallbacks: function() {\n for (var ref in onUnload) {\n onUnload[ref]();\n delete onUnload[ref];\n }\n }\n};\n\nvar unloadTriggered = function() {\n if (afterUnload) {\n return;\n }\n afterUnload = true;\n module.exports.triggerUnloadCallbacks();\n};\n\n// 'unload' alone is not reliable in opera within an iframe, but we\n// can't use `beforeunload` as IE fires it on javascript: links.\nif (!isChromePackagedApp) {\n module.exports.attachEvent('unload', unloadTriggered);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./random\":50}],47:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar eventUtils = require('./event')\n , JSON3 = require('json3')\n , browser = require('./browser')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:iframe');\n}\n\nmodule.exports = {\n WPrefix: '_jp'\n, currentWindowId: null\n\n, polluteGlobalNamespace: function() {\n if (!(module.exports.WPrefix in global)) {\n global[module.exports.WPrefix] = {};\n }\n }\n\n, postMessage: function(type, data) {\n if (global.parent !== global) {\n global.parent.postMessage(JSON3.stringify({\n windowId: module.exports.currentWindowId\n , type: type\n , data: data || ''\n }), '*');\n } else {\n debug('Cannot postMessage, no parent window.', type, data);\n }\n }\n\n, createIframe: function(iframeUrl, errorCallback) {\n var iframe = global.document.createElement('iframe');\n var tref, unloadRef;\n var unattach = function() {\n debug('unattach');\n clearTimeout(tref);\n // Explorer had problems with that.\n try {\n iframe.onload = null;\n } catch (x) {\n // intentionally empty\n }\n iframe.onerror = null;\n };\n var cleanup = function() {\n debug('cleanup');\n if (iframe) {\n unattach();\n // This timeout makes chrome fire onbeforeunload event\n // within iframe. Without the timeout it goes straight to\n // onunload.\n setTimeout(function() {\n if (iframe) {\n iframe.parentNode.removeChild(iframe);\n }\n iframe = null;\n }, 0);\n eventUtils.unloadDel(unloadRef);\n }\n };\n var onerror = function(err) {\n debug('onerror', err);\n if (iframe) {\n cleanup();\n errorCallback(err);\n }\n };\n var post = function(msg, origin) {\n debug('post', msg, origin);\n setTimeout(function() {\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n if (iframe && iframe.contentWindow) {\n iframe.contentWindow.postMessage(msg, origin);\n }\n } catch (x) {\n // intentionally empty\n }\n }, 0);\n };\n\n iframe.src = iframeUrl;\n iframe.style.display = 'none';\n iframe.style.position = 'absolute';\n iframe.onerror = function() {\n onerror('onerror');\n };\n iframe.onload = function() {\n debug('onload');\n // `onload` is triggered before scripts on the iframe are\n // executed. Give it few seconds to actually load stuff.\n clearTimeout(tref);\n tref = setTimeout(function() {\n onerror('onload timeout');\n }, 2000);\n };\n global.document.body.appendChild(iframe);\n tref = setTimeout(function() {\n onerror('timeout');\n }, 15000);\n unloadRef = eventUtils.unloadAdd(cleanup);\n return {\n post: post\n , cleanup: cleanup\n , loaded: unattach\n };\n }\n\n/* eslint no-undef: \"off\", new-cap: \"off\" */\n, createHtmlfile: function(iframeUrl, errorCallback) {\n var axo = ['Active'].concat('Object').join('X');\n var doc = new global[axo]('htmlfile');\n var tref, unloadRef;\n var iframe;\n var unattach = function() {\n clearTimeout(tref);\n iframe.onerror = null;\n };\n var cleanup = function() {\n if (doc) {\n unattach();\n eventUtils.unloadDel(unloadRef);\n iframe.parentNode.removeChild(iframe);\n iframe = doc = null;\n CollectGarbage();\n }\n };\n var onerror = function(r) {\n debug('onerror', r);\n if (doc) {\n cleanup();\n errorCallback(r);\n }\n };\n var post = function(msg, origin) {\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n setTimeout(function() {\n if (iframe && iframe.contentWindow) {\n iframe.contentWindow.postMessage(msg, origin);\n }\n }, 0);\n } catch (x) {\n // intentionally empty\n }\n };\n\n doc.open();\n doc.write('<html><s' + 'cript>' +\n 'document.domain=\"' + global.document.domain + '\";' +\n '</s' + 'cript></html>');\n doc.close();\n doc.parentWindow[module.exports.WPrefix] = global[module.exports.WPrefix];\n var c = doc.createElement('div');\n doc.body.appendChild(c);\n iframe = doc.createElement('iframe');\n c.appendChild(iframe);\n iframe.src = iframeUrl;\n iframe.onerror = function() {\n onerror('onerror');\n };\n tref = setTimeout(function() {\n onerror('timeout');\n }, 15000);\n unloadRef = eventUtils.unloadAdd(cleanup);\n return {\n post: post\n , cleanup: cleanup\n , loaded: unattach\n };\n }\n};\n\nmodule.exports.iframeEnabled = false;\nif (global.document) {\n // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with\n // huge delay, or not at all.\n module.exports.iframeEnabled = (typeof global.postMessage === 'function' ||\n typeof global.postMessage === 'object') && (!browser.isKonqueror());\n}\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./browser\":44,\"./event\":46,\"debug\":55,\"json3\":58}],48:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar logObject = {};\n['log', 'debug', 'warn'].forEach(function (level) {\n var levelExists;\n\n try {\n levelExists = global.console && global.console[level] && global.console[level].apply;\n } catch(e) {\n // do nothing\n }\n\n logObject[level] = levelExists ? function () {\n return global.console[level].apply(global.console, arguments);\n } : (level === 'log' ? function () {} : logObject.log);\n});\n\nmodule.exports = logObject;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],49:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n isObject: function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n }\n\n, extend: function(obj) {\n if (!this.isObject(obj)) {\n return obj;\n }\n var source, prop;\n for (var i = 1, length = arguments.length; i < length; i++) {\n source = arguments[i];\n for (prop in source) {\n if (Object.prototype.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n }\n return obj;\n }\n};\n\n},{}],50:[function(require,module,exports){\n'use strict';\n\nvar crypto = require('crypto');\n\n// This string has length 32, a power of 2, so the modulus doesn't introduce a\n// bias.\nvar _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';\nmodule.exports = {\n string: function(length) {\n var max = _randomStringChars.length;\n var bytes = crypto.randomBytes(length);\n var ret = [];\n for (var i = 0; i < length; i++) {\n ret.push(_randomStringChars.substr(bytes[i] % max, 1));\n }\n return ret.join('');\n }\n\n, number: function(max) {\n return Math.floor(Math.random() * max);\n }\n\n, numberString: function(max) {\n var t = ('' + (max - 1)).length;\n var p = new Array(t + 1).join('0');\n return (p + this.number(max)).slice(-t);\n }\n};\n\n},{\"crypto\":43}],51:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:transport');\n}\n\nmodule.exports = function(availableTransports) {\n return {\n filterToEnabled: function(transportsWhitelist, info) {\n var transports = {\n main: []\n , facade: []\n };\n if (!transportsWhitelist) {\n transportsWhitelist = [];\n } else if (typeof transportsWhitelist === 'string') {\n transportsWhitelist = [transportsWhitelist];\n }\n\n availableTransports.forEach(function(trans) {\n if (!trans) {\n return;\n }\n\n if (trans.transportName === 'websocket' && info.websocket === false) {\n debug('disabled from server', 'websocket');\n return;\n }\n\n if (transportsWhitelist.length &&\n transportsWhitelist.indexOf(trans.transportName) === -1) {\n debug('not in whitelist', trans.transportName);\n return;\n }\n\n if (trans.enabled(info)) {\n debug('enabled', trans.transportName);\n transports.main.push(trans);\n if (trans.facadeTransport) {\n transports.facade.push(trans.facadeTransport);\n }\n } else {\n debug('disabled', trans.transportName);\n }\n });\n return transports;\n }\n };\n};\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55}],52:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar URL = require('url-parse');\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:url');\n}\n\nmodule.exports = {\n getOrigin: function(url) {\n if (!url) {\n return null;\n }\n\n var p = new URL(url);\n if (p.protocol === 'file:') {\n return null;\n }\n\n var port = p.port;\n if (!port) {\n port = (p.protocol === 'https:') ? '443' : '80';\n }\n\n return p.protocol + '//' + p.hostname + ':' + port;\n }\n\n, isOriginEqual: function(a, b) {\n var res = this.getOrigin(a) === this.getOrigin(b);\n debug('same', a, b, res);\n return res;\n }\n\n, isSchemeEqual: function(a, b) {\n return (a.split(':')[0] === b.split(':')[0]);\n }\n\n, addPath: function (url, path) {\n var qs = url.split('?');\n return qs[0] + path + (qs[1] ? '?' + qs[1] : '');\n }\n\n, addQuery: function (url, q) {\n return url + (url.indexOf('?') === -1 ? ('?' + q) : ('&' + q));\n }\n\n, isLoopbackAddr: function (addr) {\n return /^127\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/i.test(addr) || /^\\[::1\\]$/.test(addr);\n }\n};\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"url-parse\":61}],53:[function(require,module,exports){\nmodule.exports = '1.5.2';\n\n},{}],54:[function(require,module,exports){\n/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n\n},{}],55:[function(require,module,exports){\n(function (process){\n\"use strict\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\n/**\n * Colors.\n */\n\nexports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n// eslint-disable-next-line complexity\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n return true;\n } // Internet Explorer and Edge do not support colors.\n\n\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n } // Is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\n\nfunction formatArgs(args) {\n args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);\n\n if (!this.useColors) {\n return;\n }\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit'); // The final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function (match) {\n if (match === '%%') {\n return;\n }\n\n index++;\n\n if (match === '%c') {\n // We only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n args.splice(lastC, 0, c);\n}\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\n\nfunction log() {\n var _console;\n\n // This hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return (typeof console === \"undefined\" ? \"undefined\" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);\n}\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\n\nfunction save(namespaces) {\n try {\n if (namespaces) {\n exports.storage.setItem('debug', namespaces);\n } else {\n exports.storage.removeItem('debug');\n }\n } catch (error) {// Swallow\n // XXX (@Qix-) should we be logging these?\n }\n}\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\n\nfunction load() {\n var r;\n\n try {\n r = exports.storage.getItem('debug');\n } catch (error) {} // Swallow\n // XXX (@Qix-) should we be logging these?\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\n\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\n\nfunction localstorage() {\n try {\n // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n // The Browser also has localStorage in the global context.\n return localStorage;\n } catch (error) {// Swallow\n // XXX (@Qix-) should we be logging these?\n }\n}\n\nmodule.exports = require('./common')(exports);\nvar formatters = module.exports.formatters;\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n try {\n return JSON.stringify(v);\n } catch (error) {\n return '[UnexpectedJSONParseError]: ' + error.message;\n }\n};\n\n\n}).call(this,{ env: {} })\n\n},{\"./common\":56}],56:[function(require,module,exports){\n\"use strict\";\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\nfunction setup(env) {\n createDebug.debug = createDebug;\n createDebug.default = createDebug;\n createDebug.coerce = coerce;\n createDebug.disable = disable;\n createDebug.enable = enable;\n createDebug.enabled = enabled;\n createDebug.humanize = require('ms');\n Object.keys(env).forEach(function (key) {\n createDebug[key] = env[key];\n });\n /**\n * Active `debug` instances.\n */\n\n createDebug.instances = [];\n /**\n * The currently active debug mode names, and names to skip.\n */\n\n createDebug.names = [];\n createDebug.skips = [];\n /**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\n createDebug.formatters = {};\n /**\n * Selects a color for a debug namespace\n * @param {String} namespace The namespace string for the for the debug instance to be colored\n * @return {Number|String} An ANSI color code for the given namespace\n * @api private\n */\n\n function selectColor(namespace) {\n var hash = 0;\n\n for (var i = 0; i < namespace.length; i++) {\n hash = (hash << 5) - hash + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n }\n\n createDebug.selectColor = selectColor;\n /**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\n function createDebug(namespace) {\n var prevTime;\n\n function debug() {\n // Disabled?\n if (!debug.enabled) {\n return;\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var self = debug; // Set `diff` timestamp\n\n var curr = Number(new Date());\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n args[0] = createDebug.coerce(args[0]);\n\n if (typeof args[0] !== 'string') {\n // Anything else let's inspect with %O\n args.unshift('%O');\n } // Apply any `formatters` transformations\n\n\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {\n // If we encounter an escaped % then don't increase the array index\n if (match === '%%') {\n return match;\n }\n\n index++;\n var formatter = createDebug.formatters[format];\n\n if (typeof formatter === 'function') {\n var val = args[index];\n match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`\n\n args.splice(index, 1);\n index--;\n }\n\n return match;\n }); // Apply env-specific formatting (colors, etc.)\n\n createDebug.formatArgs.call(self, args);\n var logFn = self.log || createDebug.log;\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = createDebug.enabled(namespace);\n debug.useColors = createDebug.useColors();\n debug.color = selectColor(namespace);\n debug.destroy = destroy;\n debug.extend = extend; // Debug.formatArgs = formatArgs;\n // debug.rawLog = rawLog;\n // env-specific initialization logic for debug instances\n\n if (typeof createDebug.init === 'function') {\n createDebug.init(debug);\n }\n\n createDebug.instances.push(debug);\n return debug;\n }\n\n function destroy() {\n var index = createDebug.instances.indexOf(this);\n\n if (index !== -1) {\n createDebug.instances.splice(index, 1);\n return true;\n }\n\n return false;\n }\n\n function extend(namespace, delimiter) {\n return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n }\n /**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\n\n function enable(namespaces) {\n createDebug.save(namespaces);\n createDebug.names = [];\n createDebug.skips = [];\n var i;\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (i = 0; i < len; i++) {\n if (!split[i]) {\n // ignore empty strings\n continue;\n }\n\n namespaces = split[i].replace(/\\*/g, '.*?');\n\n if (namespaces[0] === '-') {\n createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n createDebug.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n\n for (i = 0; i < createDebug.instances.length; i++) {\n var instance = createDebug.instances[i];\n instance.enabled = createDebug.enabled(instance.namespace);\n }\n }\n /**\n * Disable debug output.\n *\n * @api public\n */\n\n\n function disable() {\n createDebug.enable('');\n }\n /**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\n\n function enabled(name) {\n if (name[name.length - 1] === '*') {\n return true;\n }\n\n var i;\n var len;\n\n for (i = 0, len = createDebug.skips.length; i < len; i++) {\n if (createDebug.skips[i].test(name)) {\n return false;\n }\n }\n\n for (i = 0, len = createDebug.names.length; i < len; i++) {\n if (createDebug.names[i].test(name)) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\n\n function coerce(val) {\n if (val instanceof Error) {\n return val.stack || val.message;\n }\n\n return val;\n }\n\n createDebug.enable(createDebug.load());\n return createDebug;\n}\n\nmodule.exports = setup;\n\n\n},{\"ms\":54}],57:[function(require,module,exports){\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n\n},{}],58:[function(require,module,exports){\n(function (global){\n/*! JSON v3.3.2 | https://bestiejs.github.io/json3 | Copyright 2012-2015, Kit Cambridge, Benjamin Tan | http://kit.mit-license.org */\n;(function () {\n // Detect the `define` function exposed by asynchronous module loaders. The\n // strict `define` check is necessary for compatibility with `r.js`.\n var isLoader = typeof define === \"function\" && define.amd;\n\n // A set of types used to distinguish objects from primitives.\n var objectTypes = {\n \"function\": true,\n \"object\": true\n };\n\n // Detect the `exports` object exposed by CommonJS implementations.\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n // Use the `global` object exposed by Node (including Browserify via\n // `insert-module-globals`), Narwhal, and Ringo as the default context,\n // and the `window` object in browsers. Rhino exports a `global` function\n // instead.\n var root = objectTypes[typeof window] && window || this,\n freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == \"object\" && global;\n\n if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n root = freeGlobal;\n }\n\n // Public: Initializes JSON 3 using the given `context` object, attaching the\n // `stringify` and `parse` functions to the specified `exports` object.\n function runInContext(context, exports) {\n context || (context = root.Object());\n exports || (exports = root.Object());\n\n // Native constructor aliases.\n var Number = context.Number || root.Number,\n String = context.String || root.String,\n Object = context.Object || root.Object,\n Date = context.Date || root.Date,\n SyntaxError = context.SyntaxError || root.SyntaxError,\n TypeError = context.TypeError || root.TypeError,\n Math = context.Math || root.Math,\n nativeJSON = context.JSON || root.JSON;\n\n // Delegate to the native `stringify` and `parse` implementations.\n if (typeof nativeJSON == \"object\" && nativeJSON) {\n exports.stringify = nativeJSON.stringify;\n exports.parse = nativeJSON.parse;\n }\n\n // Convenience aliases.\n var objectProto = Object.prototype,\n getClass = objectProto.toString,\n isProperty = objectProto.hasOwnProperty,\n undefined;\n\n // Internal: Contains `try...catch` logic used by other functions.\n // This prevents other functions from being deoptimized.\n function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }\n\n // Test the `Date#getUTC*` methods. Based on work by @Yaffle.\n var isExtended = new Date(-3509827334573292);\n attempt(function () {\n // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical\n // results for certain dates in Opera >= 10.53.\n isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&\n isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;\n });\n\n // Internal: Determines whether the native `JSON.stringify` and `parse`\n // implementations are spec-compliant. Based on work by Ken Snyder.\n function has(name) {\n if (has[name] != null) {\n // Return cached feature test result.\n return has[name];\n }\n var isSupported;\n if (name == \"bug-string-char-index\") {\n // IE <= 7 doesn't support accessing string characters using square\n // bracket notation. IE 8 only supports this for primitives.\n isSupported = \"a\"[0] != \"a\";\n } else if (name == \"json\") {\n // Indicates whether both `JSON.stringify` and `JSON.parse` are\n // supported.\n isSupported = has(\"json-stringify\") && has(\"date-serialization\") && has(\"json-parse\");\n } else if (name == \"date-serialization\") {\n // Indicates whether `Date`s can be serialized accurately by `JSON.stringify`.\n isSupported = has(\"json-stringify\") && isExtended;\n if (isSupported) {\n var stringify = exports.stringify;\n attempt(function () {\n isSupported =\n // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\n // serialize extended years.\n stringify(new Date(-8.64e15)) == '\"-271821-04-20T00:00:00.000Z\"' &&\n // The milliseconds are optional in ES 5, but required in 5.1.\n stringify(new Date(8.64e15)) == '\"+275760-09-13T00:00:00.000Z\"' &&\n // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\n // four-digit years instead of six-digit years. Credits: @Yaffle.\n stringify(new Date(-621987552e5)) == '\"-000001-01-01T00:00:00.000Z\"' &&\n // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\n // values less than 1000. Credits: @Yaffle.\n stringify(new Date(-1)) == '\"1969-12-31T23:59:59.999Z\"';\n });\n }\n } else {\n var value, serialized = '{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}';\n // Test `JSON.stringify`.\n if (name == \"json-stringify\") {\n var stringify = exports.stringify, stringifySupported = typeof stringify == \"function\";\n if (stringifySupported) {\n // A test function object with a custom `toJSON` method.\n (value = function () {\n return 1;\n }).toJSON = value;\n attempt(function () {\n stringifySupported =\n // Firefox 3.1b1 and b2 serialize string, number, and boolean\n // primitives as object literals.\n stringify(0) === \"0\" &&\n // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\n // literals.\n stringify(new Number()) === \"0\" &&\n stringify(new String()) == '\"\"' &&\n // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\n // does not define a canonical JSON representation (this applies to\n // objects with `toJSON` properties as well, *unless* they are nested\n // within an object or array).\n stringify(getClass) === undefined &&\n // IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\n // FF 3.1b3 pass this test.\n stringify(undefined) === undefined &&\n // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\n // respectively, if the value is omitted entirely.\n stringify() === undefined &&\n // FF 3.1b1, 2 throw an error if the given value is not a number,\n // string, array, object, Boolean, or `null` literal. This applies to\n // objects with custom `toJSON` methods as well, unless they are nested\n // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\n // methods entirely.\n stringify(value) === \"1\" &&\n stringify([value]) == \"[1]\" &&\n // Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\n // `\"[null]\"`.\n stringify([undefined]) == \"[null]\" &&\n // YUI 3.0.0b1 fails to serialize `null` literals.\n stringify(null) == \"null\" &&\n // FF 3.1b1, 2 halts serialization if an array contains a function:\n // `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\n // elides non-JSON values from objects and arrays, unless they\n // define custom `toJSON` methods.\n stringify([undefined, getClass, null]) == \"[null,null,null]\" &&\n // Simple serialization test. FF 3.1b1 uses Unicode escape sequences\n // where character escape codes are expected (e.g., `\\b` => `\\u0008`).\n stringify({ \"a\": [value, true, false, null, \"\\x00\\b\\n\\f\\r\\t\"] }) == serialized &&\n // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\n stringify(null, value) === \"1\" &&\n stringify([1, 2], null, 1) == \"[\\n 1,\\n 2\\n]\";\n }, function () {\n stringifySupported = false;\n });\n }\n isSupported = stringifySupported;\n }\n // Test `JSON.parse`.\n if (name == \"json-parse\") {\n var parse = exports.parse, parseSupported;\n if (typeof parse == \"function\") {\n attempt(function () {\n // FF 3.1b1, b2 will throw an exception if a bare literal is provided.\n // Conforming implementations should also coerce the initial argument to\n // a string prior to parsing.\n if (parse(\"0\") === 0 && !parse(false)) {\n // Simple parsing test.\n value = parse(serialized);\n parseSupported = value[\"a\"].length == 5 && value[\"a\"][0] === 1;\n if (parseSupported) {\n attempt(function () {\n // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\n parseSupported = !parse('\"\\t\"');\n });\n if (parseSupported) {\n attempt(function () {\n // FF 4.0 and 4.0.1 allow leading `+` signs and leading\n // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\n // certain octal literals.\n parseSupported = parse(\"01\") !== 1;\n });\n }\n if (parseSupported) {\n attempt(function () {\n // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\n // points. These environments, along with FF 3.1b1 and 2,\n // also allow trailing commas in JSON objects and arrays.\n parseSupported = parse(\"1.\") !== 1;\n });\n }\n }\n }\n }, function () {\n parseSupported = false;\n });\n }\n isSupported = parseSupported;\n }\n }\n return has[name] = !!isSupported;\n }\n has[\"bug-string-char-index\"] = has[\"date-serialization\"] = has[\"json\"] = has[\"json-stringify\"] = has[\"json-parse\"] = null;\n\n if (!has(\"json\")) {\n // Common `[[Class]]` name aliases.\n var functionClass = \"[object Function]\",\n dateClass = \"[object Date]\",\n numberClass = \"[object Number]\",\n stringClass = \"[object String]\",\n arrayClass = \"[object Array]\",\n booleanClass = \"[object Boolean]\";\n\n // Detect incomplete support for accessing string characters by index.\n var charIndexBuggy = has(\"bug-string-char-index\");\n\n // Internal: Normalizes the `for...in` iteration algorithm across\n // environments. Each enumerated key is yielded to a `callback` function.\n var forOwn = function (object, callback) {\n var size = 0, Properties, dontEnums, property;\n\n // Tests for bugs in the current environment's `for...in` algorithm. The\n // `valueOf` property inherits the non-enumerable flag from\n // `Object.prototype` in older versions of IE, Netscape, and Mozilla.\n (Properties = function () {\n this.valueOf = 0;\n }).prototype.valueOf = 0;\n\n // Iterate over a new instance of the `Properties` class.\n dontEnums = new Properties();\n for (property in dontEnums) {\n // Ignore all properties inherited from `Object.prototype`.\n if (isProperty.call(dontEnums, property)) {\n size++;\n }\n }\n Properties = dontEnums = null;\n\n // Normalize the iteration algorithm.\n if (!size) {\n // A list of non-enumerable properties inherited from `Object.prototype`.\n dontEnums = [\"valueOf\", \"toString\", \"toLocaleString\", \"propertyIsEnumerable\", \"isPrototypeOf\", \"hasOwnProperty\", \"constructor\"];\n // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable\n // properties.\n forOwn = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass, property, length;\n var hasProperty = !isFunction && typeof object.constructor != \"function\" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;\n for (property in object) {\n // Gecko <= 1.0 enumerates the `prototype` property of functions under\n // certain conditions; IE does not.\n if (!(isFunction && property == \"prototype\") && hasProperty.call(object, property)) {\n callback(property);\n }\n }\n // Manually invoke the callback for each non-enumerable property.\n for (length = dontEnums.length; property = dontEnums[--length];) {\n if (hasProperty.call(object, property)) {\n callback(property);\n }\n }\n };\n } else {\n // No bugs detected; use the standard `for...in` algorithm.\n forOwn = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass, property, isConstructor;\n for (property in object) {\n if (!(isFunction && property == \"prototype\") && isProperty.call(object, property) && !(isConstructor = property === \"constructor\")) {\n callback(property);\n }\n }\n // Manually invoke the callback for the `constructor` property due to\n // cross-environment inconsistencies.\n if (isConstructor || isProperty.call(object, (property = \"constructor\"))) {\n callback(property);\n }\n };\n }\n return forOwn(object, callback);\n };\n\n // Public: Serializes a JavaScript `value` as a JSON string. The optional\n // `filter` argument may specify either a function that alters how object and\n // array members are serialized, or an array of strings and numbers that\n // indicates which properties should be serialized. The optional `width`\n // argument may be either a string or number that specifies the indentation\n // level of the output.\n if (!has(\"json-stringify\") && !has(\"date-serialization\")) {\n // Internal: A map of control characters and their escaped equivalents.\n var Escapes = {\n 92: \"\\\\\\\\\",\n 34: '\\\\\"',\n 8: \"\\\\b\",\n 12: \"\\\\f\",\n 10: \"\\\\n\",\n 13: \"\\\\r\",\n 9: \"\\\\t\"\n };\n\n // Internal: Converts `value` into a zero-padded string such that its\n // length is at least equal to `width`. The `width` must be <= 6.\n var leadingZeroes = \"000000\";\n var toPaddedString = function (width, value) {\n // The `|| 0` expression is necessary to work around a bug in\n // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== \"0\"`.\n return (leadingZeroes + (value || 0)).slice(-width);\n };\n\n // Internal: Serializes a date object.\n var serializeDate = function (value) {\n var getData, year, month, date, time, hours, minutes, seconds, milliseconds;\n // Define additional utility methods if the `Date` methods are buggy.\n if (!isExtended) {\n var floor = Math.floor;\n // A mapping between the months of the year and the number of days between\n // January 1st and the first of the respective month.\n var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n // Internal: Calculates the number of days between the Unix epoch and the\n // first day of the given month.\n var getDay = function (year, month) {\n return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);\n };\n getData = function (value) {\n // Manually compute the year, month, date, hours, minutes,\n // seconds, and milliseconds if the `getUTC*` methods are\n // buggy. Adapted from @Yaffle's `date-shim` project.\n date = floor(value / 864e5);\n for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);\n for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);\n date = 1 + date - getDay(year, month);\n // The `time` value specifies the time within the day (see ES\n // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used\n // to compute `A modulo B`, as the `%` operator does not\n // correspond to the `modulo` operation for negative numbers.\n time = (value % 864e5 + 864e5) % 864e5;\n // The hours, minutes, seconds, and milliseconds are obtained by\n // decomposing the time within the day. See section 15.9.1.10.\n hours = floor(time / 36e5) % 24;\n minutes = floor(time / 6e4) % 60;\n seconds = floor(time / 1e3) % 60;\n milliseconds = time % 1e3;\n };\n } else {\n getData = function (value) {\n year = value.getUTCFullYear();\n month = value.getUTCMonth();\n date = value.getUTCDate();\n hours = value.getUTCHours();\n minutes = value.getUTCMinutes();\n seconds = value.getUTCSeconds();\n milliseconds = value.getUTCMilliseconds();\n };\n }\n serializeDate = function (value) {\n if (value > -1 / 0 && value < 1 / 0) {\n // Dates are serialized according to the `Date#toJSON` method\n // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15\n // for the ISO 8601 date time string format.\n getData(value);\n // Serialize extended years correctly.\n value = (year <= 0 || year >= 1e4 ? (year < 0 ? \"-\" : \"+\") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +\n \"-\" + toPaddedString(2, month + 1) + \"-\" + toPaddedString(2, date) +\n // Months, dates, hours, minutes, and seconds should have two\n // digits; milliseconds should have three.\n \"T\" + toPaddedString(2, hours) + \":\" + toPaddedString(2, minutes) + \":\" + toPaddedString(2, seconds) +\n // Milliseconds are optional in ES 5.0, but required in 5.1.\n \".\" + toPaddedString(3, milliseconds) + \"Z\";\n year = month = date = hours = minutes = seconds = milliseconds = null;\n } else {\n value = null;\n }\n return value;\n };\n return serializeDate(value);\n };\n\n // For environments with `JSON.stringify` but buggy date serialization,\n // we override the native `Date#toJSON` implementation with a\n // spec-compliant one.\n if (has(\"json-stringify\") && !has(\"date-serialization\")) {\n // Internal: the `Date#toJSON` implementation used to override the native one.\n function dateToJSON (key) {\n return serializeDate(this);\n }\n\n // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n var nativeStringify = exports.stringify;\n exports.stringify = function (source, filter, width) {\n var nativeToJSON = Date.prototype.toJSON;\n Date.prototype.toJSON = dateToJSON;\n var result = nativeStringify(source, filter, width);\n Date.prototype.toJSON = nativeToJSON;\n return result;\n }\n } else {\n // Internal: Double-quotes a string `value`, replacing all ASCII control\n // characters (characters with code unit values between 0 and 31) with\n // their escaped equivalents. This is an implementation of the\n // `Quote(value)` operation defined in ES 5.1 section 15.12.3.\n var unicodePrefix = \"\\\\u00\";\n var escapeChar = function (character) {\n var charCode = character.charCodeAt(0), escaped = Escapes[charCode];\n if (escaped) {\n return escaped;\n }\n return unicodePrefix + toPaddedString(2, charCode.toString(16));\n };\n var reEscape = /[\\x00-\\x1f\\x22\\x5c]/g;\n var quote = function (value) {\n reEscape.lastIndex = 0;\n return '\"' +\n (\n reEscape.test(value)\n ? value.replace(reEscape, escapeChar)\n : value\n ) +\n '\"';\n };\n\n // Internal: Recursively serializes an object. Implements the\n // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.\n var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {\n var value, type, className, results, element, index, length, prefix, result;\n attempt(function () {\n // Necessary for host object support.\n value = object[property];\n });\n if (typeof value == \"object\" && value) {\n if (value.getUTCFullYear && getClass.call(value) == dateClass && value.toJSON === Date.prototype.toJSON) {\n value = serializeDate(value);\n } else if (typeof value.toJSON == \"function\") {\n value = value.toJSON(property);\n }\n }\n if (callback) {\n // If a replacement function was provided, call it to obtain the value\n // for serialization.\n value = callback.call(object, property, value);\n }\n // Exit early if value is `undefined` or `null`.\n if (value == undefined) {\n return value === undefined ? value : \"null\";\n }\n type = typeof value;\n // Only call `getClass` if the value is an object.\n if (type == \"object\") {\n className = getClass.call(value);\n }\n switch (className || type) {\n case \"boolean\":\n case booleanClass:\n // Booleans are represented literally.\n return \"\" + value;\n case \"number\":\n case numberClass:\n // JSON numbers must be finite. `Infinity` and `NaN` are serialized as\n // `\"null\"`.\n return value > -1 / 0 && value < 1 / 0 ? \"\" + value : \"null\";\n case \"string\":\n case stringClass:\n // Strings are double-quoted and escaped.\n return quote(\"\" + value);\n }\n // Recursively serialize objects and arrays.\n if (typeof value == \"object\") {\n // Check for cyclic structures. This is a linear search; performance\n // is inversely proportional to the number of unique nested objects.\n for (length = stack.length; length--;) {\n if (stack[length] === value) {\n // Cyclic structures cannot be serialized by `JSON.stringify`.\n throw TypeError();\n }\n }\n // Add the object to the stack of traversed objects.\n stack.push(value);\n results = [];\n // Save the current indentation level and indent one additional level.\n prefix = indentation;\n indentation += whitespace;\n if (className == arrayClass) {\n // Recursively serialize array elements.\n for (index = 0, length = value.length; index < length; index++) {\n element = serialize(index, value, callback, properties, whitespace, indentation, stack);\n results.push(element === undefined ? \"null\" : element);\n }\n result = results.length ? (whitespace ? \"[\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"]\" : (\"[\" + results.join(\",\") + \"]\")) : \"[]\";\n } else {\n // Recursively serialize object members. Members are selected from\n // either a user-specified list of property names, or the object\n // itself.\n forOwn(properties || value, function (property) {\n var element = serialize(property, value, callback, properties, whitespace, indentation, stack);\n if (element !== undefined) {\n // According to ES 5.1 section 15.12.3: \"If `gap` {whitespace}\n // is not the empty string, let `member` {quote(property) + \":\"}\n // be the concatenation of `member` and the `space` character.\"\n // The \"`space` character\" refers to the literal space\n // character, not the `space` {width} argument provided to\n // `JSON.stringify`.\n results.push(quote(property) + \":\" + (whitespace ? \" \" : \"\") + element);\n }\n });\n result = results.length ? (whitespace ? \"{\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"}\" : (\"{\" + results.join(\",\") + \"}\")) : \"{}\";\n }\n // Remove the object from the traversed object stack.\n stack.pop();\n return result;\n }\n };\n\n // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n exports.stringify = function (source, filter, width) {\n var whitespace, callback, properties, className;\n if (objectTypes[typeof filter] && filter) {\n className = getClass.call(filter);\n if (className == functionClass) {\n callback = filter;\n } else if (className == arrayClass) {\n // Convert the property names array into a makeshift set.\n properties = {};\n for (var index = 0, length = filter.length, value; index < length;) {\n value = filter[index++];\n className = getClass.call(value);\n if (className == \"[object String]\" || className == \"[object Number]\") {\n properties[value] = 1;\n }\n }\n }\n }\n if (width) {\n className = getClass.call(width);\n if (className == numberClass) {\n // Convert the `width` to an integer and create a string containing\n // `width` number of space characters.\n if ((width -= width % 1) > 0) {\n if (width > 10) {\n width = 10;\n }\n for (whitespace = \"\"; whitespace.length < width;) {\n whitespace += \" \";\n }\n }\n } else if (className == stringClass) {\n whitespace = width.length <= 10 ? width : width.slice(0, 10);\n }\n }\n // Opera <= 7.54u2 discards the values associated with empty string keys\n // (`\"\"`) only if they are used directly within an object member list\n // (e.g., `!(\"\" in { \"\": 1})`).\n return serialize(\"\", (value = {}, value[\"\"] = source, value), callback, properties, whitespace, \"\", []);\n };\n }\n }\n\n // Public: Parses a JSON source string.\n if (!has(\"json-parse\")) {\n var fromCharCode = String.fromCharCode;\n\n // Internal: A map of escaped control characters and their unescaped\n // equivalents.\n var Unescapes = {\n 92: \"\\\\\",\n 34: '\"',\n 47: \"/\",\n 98: \"\\b\",\n 116: \"\\t\",\n 110: \"\\n\",\n 102: \"\\f\",\n 114: \"\\r\"\n };\n\n // Internal: Stores the parser state.\n var Index, Source;\n\n // Internal: Resets the parser state and throws a `SyntaxError`.\n var abort = function () {\n Index = Source = null;\n throw SyntaxError();\n };\n\n // Internal: Returns the next token, or `\"$\"` if the parser has reached\n // the end of the source string. A token may be a string, number, `null`\n // literal, or Boolean literal.\n var lex = function () {\n var source = Source, length = source.length, value, begin, position, isSigned, charCode;\n while (Index < length) {\n charCode = source.charCodeAt(Index);\n switch (charCode) {\n case 9: case 10: case 13: case 32:\n // Skip whitespace tokens, including tabs, carriage returns, line\n // feeds, and space characters.\n Index++;\n break;\n case 123: case 125: case 91: case 93: case 58: case 44:\n // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at\n // the current position.\n value = charIndexBuggy ? source.charAt(Index) : source[Index];\n Index++;\n return value;\n case 34:\n // `\"` delimits a JSON string; advance to the next character and\n // begin parsing the string. String tokens are prefixed with the\n // sentinel `@` character to distinguish them from punctuators and\n // end-of-string tokens.\n for (value = \"@\", Index++; Index < length;) {\n charCode = source.charCodeAt(Index);\n if (charCode < 32) {\n // Unescaped ASCII control characters (those with a code unit\n // less than the space character) are not permitted.\n abort();\n } else if (charCode == 92) {\n // A reverse solidus (`\\`) marks the beginning of an escaped\n // control character (including `\"`, `\\`, and `/`) or Unicode\n // escape sequence.\n charCode = source.charCodeAt(++Index);\n switch (charCode) {\n case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:\n // Revive escaped control characters.\n value += Unescapes[charCode];\n Index++;\n break;\n case 117:\n // `\\u` marks the beginning of a Unicode escape sequence.\n // Advance to the first character and validate the\n // four-digit code point.\n begin = ++Index;\n for (position = Index + 4; Index < position; Index++) {\n charCode = source.charCodeAt(Index);\n // A valid sequence comprises four hexdigits (case-\n // insensitive) that form a single hexadecimal value.\n if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {\n // Invalid Unicode escape sequence.\n abort();\n }\n }\n // Revive the escaped character.\n value += fromCharCode(\"0x\" + source.slice(begin, Index));\n break;\n default:\n // Invalid escape sequence.\n abort();\n }\n } else {\n if (charCode == 34) {\n // An unescaped double-quote character marks the end of the\n // string.\n break;\n }\n charCode = source.charCodeAt(Index);\n begin = Index;\n // Optimize for the common case where a string is valid.\n while (charCode >= 32 && charCode != 92 && charCode != 34) {\n charCode = source.charCodeAt(++Index);\n }\n // Append the string as-is.\n value += source.slice(begin, Index);\n }\n }\n if (source.charCodeAt(Index) == 34) {\n // Advance to the next character and return the revived string.\n Index++;\n return value;\n }\n // Unterminated string.\n abort();\n default:\n // Parse numbers and literals.\n begin = Index;\n // Advance past the negative sign, if one is specified.\n if (charCode == 45) {\n isSigned = true;\n charCode = source.charCodeAt(++Index);\n }\n // Parse an integer or floating-point value.\n if (charCode >= 48 && charCode <= 57) {\n // Leading zeroes are interpreted as octal literals.\n if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {\n // Illegal octal literal.\n abort();\n }\n isSigned = false;\n // Parse the integer component.\n for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);\n // Floats cannot contain a leading decimal point; however, this\n // case is already accounted for by the parser.\n if (source.charCodeAt(Index) == 46) {\n position = ++Index;\n // Parse the decimal component.\n for (; position < length; position++) {\n charCode = source.charCodeAt(position);\n if (charCode < 48 || charCode > 57) {\n break;\n }\n }\n if (position == Index) {\n // Illegal trailing decimal.\n abort();\n }\n Index = position;\n }\n // Parse exponents. The `e` denoting the exponent is\n // case-insensitive.\n charCode = source.charCodeAt(Index);\n if (charCode == 101 || charCode == 69) {\n charCode = source.charCodeAt(++Index);\n // Skip past the sign following the exponent, if one is\n // specified.\n if (charCode == 43 || charCode == 45) {\n Index++;\n }\n // Parse the exponential component.\n for (position = Index; position < length; position++) {\n charCode = source.charCodeAt(position);\n if (charCode < 48 || charCode > 57) {\n break;\n }\n }\n if (position == Index) {\n // Illegal empty exponent.\n abort();\n }\n Index = position;\n }\n // Coerce the parsed value to a JavaScript number.\n return +source.slice(begin, Index);\n }\n // A negative sign may only precede numbers.\n if (isSigned) {\n abort();\n }\n // `true`, `false`, and `null` literals.\n var temp = source.slice(Index, Index + 4);\n if (temp == \"true\") {\n Index += 4;\n return true;\n } else if (temp == \"fals\" && source.charCodeAt(Index + 4 ) == 101) {\n Index += 5;\n return false;\n } else if (temp == \"null\") {\n Index += 4;\n return null;\n }\n // Unrecognized token.\n abort();\n }\n }\n // Return the sentinel `$` character if the parser has reached the end\n // of the source string.\n return \"$\";\n };\n\n // Internal: Parses a JSON `value` token.\n var get = function (value) {\n var results, hasMembers;\n if (value == \"$\") {\n // Unexpected end of input.\n abort();\n }\n if (typeof value == \"string\") {\n if ((charIndexBuggy ? value.charAt(0) : value[0]) == \"@\") {\n // Remove the sentinel `@` character.\n return value.slice(1);\n }\n // Parse object and array literals.\n if (value == \"[\") {\n // Parses a JSON array, returning a new JavaScript array.\n results = [];\n for (;;) {\n value = lex();\n // A closing square bracket marks the end of the array literal.\n if (value == \"]\") {\n break;\n }\n // If the array literal contains elements, the current token\n // should be a comma separating the previous element from the\n // next.\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n if (value == \"]\") {\n // Unexpected trailing `,` in array literal.\n abort();\n }\n } else {\n // A `,` must separate each array element.\n abort();\n }\n } else {\n hasMembers = true;\n }\n // Elisions and leading commas are not permitted.\n if (value == \",\") {\n abort();\n }\n results.push(get(value));\n }\n return results;\n } else if (value == \"{\") {\n // Parses a JSON object, returning a new JavaScript object.\n results = {};\n for (;;) {\n value = lex();\n // A closing curly brace marks the end of the object literal.\n if (value == \"}\") {\n break;\n }\n // If the object literal contains members, the current token\n // should be a comma separator.\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n if (value == \"}\") {\n // Unexpected trailing `,` in object literal.\n abort();\n }\n } else {\n // A `,` must separate each object member.\n abort();\n }\n } else {\n hasMembers = true;\n }\n // Leading commas are not permitted, object property names must be\n // double-quoted strings, and a `:` must separate each property\n // name and value.\n if (value == \",\" || typeof value != \"string\" || (charIndexBuggy ? value.charAt(0) : value[0]) != \"@\" || lex() != \":\") {\n abort();\n }\n results[value.slice(1)] = get(lex());\n }\n return results;\n }\n // Unexpected token encountered.\n abort();\n }\n return value;\n };\n\n // Internal: Updates a traversed object member.\n var update = function (source, property, callback) {\n var element = walk(source, property, callback);\n if (element === undefined) {\n delete source[property];\n } else {\n source[property] = element;\n }\n };\n\n // Internal: Recursively traverses a parsed JSON object, invoking the\n // `callback` function for each value. This is an implementation of the\n // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.\n var walk = function (source, property, callback) {\n var value = source[property], length;\n if (typeof value == \"object\" && value) {\n // `forOwn` can't be used to traverse an array in Opera <= 8.54\n // because its `Object#hasOwnProperty` implementation returns `false`\n // for array indices (e.g., `![1, 2, 3].hasOwnProperty(\"0\")`).\n if (getClass.call(value) == arrayClass) {\n for (length = value.length; length--;) {\n update(getClass, forOwn, value, length, callback);\n }\n } else {\n forOwn(value, function (property) {\n update(value, property, callback);\n });\n }\n }\n return callback.call(source, property, value);\n };\n\n // Public: `JSON.parse`. See ES 5.1 section 15.12.2.\n exports.parse = function (source, callback) {\n var result, value;\n Index = 0;\n Source = \"\" + source;\n result = get(lex());\n // If a JSON string contains multiple tokens, it is invalid.\n if (lex() != \"$\") {\n abort();\n }\n // Reset the parser state.\n Index = Source = null;\n return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[\"\"] = result, value), \"\", callback) : result;\n };\n }\n }\n\n exports.runInContext = runInContext;\n return exports;\n }\n\n if (freeExports && !isLoader) {\n // Export for CommonJS environments.\n runInContext(root, freeExports);\n } else {\n // Export for web browsers and JavaScript engines.\n var nativeJSON = root.JSON,\n previousJSON = root.JSON3,\n isRestored = false;\n\n var JSON3 = runInContext(root, (root.JSON3 = {\n // Public: Restores the original value of the global `JSON` object and\n // returns a reference to the `JSON3` object.\n \"noConflict\": function () {\n if (!isRestored) {\n isRestored = true;\n root.JSON = nativeJSON;\n root.JSON3 = previousJSON;\n nativeJSON = previousJSON = null;\n }\n return JSON3;\n }\n }));\n\n root.JSON = {\n \"parse\": JSON3.parse,\n \"stringify\": JSON3.stringify\n };\n }\n\n // Export for asynchronous module loaders.\n if (isLoader) {\n define(function () {\n return JSON3;\n });\n }\n}).call(this);\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],59:[function(require,module,exports){\n'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , undef;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\nfunction decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\nfunction encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?&]+)=?([^&]*)/g\n , result = {}\n , part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1])\n , value = decode(part[2]);\n\n //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n\n var pairs = []\n , value\n , key;\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key];\n\n //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n\n //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n if (key === null || value === null) continue;\n pairs.push(key +'='+ value);\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n\n},{}],60:[function(require,module,exports){\n'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n\n},{}],61:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar required = require('requires-port')\n , qs = require('querystringify')\n , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//\n , protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i\n , windowsDriveLetter = /^[a-zA-Z]:/\n , whitespace = '[\\\\x09\\\\x0A\\\\x0B\\\\x0C\\\\x0D\\\\x20\\\\xA0\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\\\\u2028\\\\u2029\\\\uFEFF]'\n , left = new RegExp('^'+ whitespace +'+');\n\n/**\n * Trim a given string.\n *\n * @param {String} str String to trim.\n * @public\n */\nfunction trimLeft(str) {\n return (str ? str : '').toString().replace(left, '');\n}\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [\n ['#', 'hash'], // Extract from the back.\n ['?', 'query'], // Extract from the back.\n function sanitize(address, url) { // Sanitize what is left of the address\n return isSpecial(url.protocol) ? address.replace(/\\\\/g, '/') : address;\n },\n ['/', 'pathname'], // Extract from the back.\n ['@', 'auth', 1], // Extract from the front.\n [NaN, 'host', undefined, 1, 1], // Set left over value.\n [/:(\\d+)$/, 'port', undefined, 1], // RegExp the back.\n [NaN, 'hostname', undefined, 1, 1] // Set left over.\n];\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = { hash: 1, query: 1 };\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @public\n */\nfunction lolcation(loc) {\n var globalVar;\n\n if (typeof window !== 'undefined') globalVar = window;\n else if (typeof global !== 'undefined') globalVar = global;\n else if (typeof self !== 'undefined') globalVar = self;\n else globalVar = {};\n\n var location = globalVar.location || {};\n loc = loc || location;\n\n var finaldestination = {}\n , type = typeof loc\n , key;\n\n if ('blob:' === loc.protocol) {\n finaldestination = new Url(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new Url(loc, {});\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n\n return finaldestination;\n}\n\n/**\n * Check whether a protocol scheme is special.\n *\n * @param {String} The protocol scheme of the URL\n * @return {Boolean} `true` if the protocol scheme is special, else `false`\n * @private\n */\nfunction isSpecial(scheme) {\n return (\n scheme === 'file:' ||\n scheme === 'ftp:' ||\n scheme === 'http:' ||\n scheme === 'https:' ||\n scheme === 'ws:' ||\n scheme === 'wss:'\n );\n}\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @param {Object} location\n * @return {ProtocolExtract} Extracted information.\n * @private\n */\nfunction extractProtocol(address, location) {\n address = trimLeft(address);\n location = location || {};\n\n var match = protocolre.exec(address);\n var protocol = match[1] ? match[1].toLowerCase() : '';\n var forwardSlashes = !!match[2];\n var otherSlashes = !!match[3];\n var slashesCount = 0;\n var rest;\n\n if (forwardSlashes) {\n if (otherSlashes) {\n rest = match[2] + match[3] + match[4];\n slashesCount = match[2].length + match[3].length;\n } else {\n rest = match[2] + match[4];\n slashesCount = match[2].length;\n }\n } else {\n if (otherSlashes) {\n rest = match[3] + match[4];\n slashesCount = match[3].length;\n } else {\n rest = match[4]\n }\n }\n\n if (protocol === 'file:') {\n if (slashesCount >= 2) {\n rest = rest.slice(2);\n }\n } else if (isSpecial(protocol)) {\n rest = match[4];\n } else if (protocol) {\n if (forwardSlashes) {\n rest = rest.slice(2);\n }\n } else if (slashesCount >= 2 && isSpecial(location.protocol)) {\n rest = match[4];\n }\n\n return {\n protocol: protocol,\n slashes: forwardSlashes || isSpecial(protocol),\n slashesCount: slashesCount,\n rest: rest\n };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @private\n */\nfunction resolve(relative, base) {\n if (relative === '') return base;\n\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))\n , i = path.length\n , last = path[i - 1]\n , unshift = false\n , up = 0;\n\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n\n return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * It is worth noting that we should not use `URL` as class name to prevent\n * clashes with the global URL instance that got introduced in browsers.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} [location] Location defaults for relative paths.\n * @param {Boolean|Function} [parser] Parser for the query string.\n * @private\n */\nfunction Url(address, location, parser) {\n address = trimLeft(address);\n\n if (!(this instanceof Url)) {\n return new Url(address, location, parser);\n }\n\n var relative, extracted, parse, instruction, index, key\n , instructions = rules.slice()\n , type = typeof location\n , url = this\n , i = 0;\n\n //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n\n location = lolcation(location);\n\n //\n // Extract protocol information before running the instructions.\n //\n extracted = extractProtocol(address || '', location);\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest;\n\n //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n if (\n extracted.protocol === 'file:' && (\n extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||\n (!extracted.slashes &&\n (extracted.protocol ||\n extracted.slashesCount < 2 ||\n !isSpecial(url.protocol)))\n ) {\n instructions[3] = [/(.*)/, 'pathname'];\n }\n\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n\n if (typeof instruction === 'function') {\n address = instruction(address, url);\n continue;\n }\n\n parse = instruction[0];\n key = instruction[1];\n\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n if (~(index = address.indexOf(parse))) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if ((index = parse.exec(address))) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n\n url[key] = url[key] || (\n relative && instruction[3] ? location[key] || '' : ''\n );\n\n //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n if (instruction[4]) url[key] = url[key].toLowerCase();\n }\n\n //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n if (parser) url.query = parser(url.query);\n\n //\n // If the URL is relative, resolve the pathname against the base URL.\n //\n if (\n relative\n && location.slashes\n && url.pathname.charAt(0) !== '/'\n && (url.pathname !== '' || location.pathname !== '')\n ) {\n url.pathname = resolve(url.pathname, location.pathname);\n }\n\n //\n // Default to a / for pathname if none exists. This normalizes the URL\n // to always have a /\n //\n if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {\n url.pathname = '/' + url.pathname;\n }\n\n //\n // We should not add port numbers if they are already the default port number\n // for a given protocol. As the host also contains the port number we're going\n // override it with the hostname which contains no port number.\n //\n if (!required(url.port, url.protocol)) {\n url.host = url.hostname;\n url.port = '';\n }\n\n //\n // Parse down the `auth` for the username and password.\n //\n url.username = url.password = '';\n if (url.auth) {\n instruction = url.auth.split(':');\n url.username = instruction[0] || '';\n url.password = instruction[1] || '';\n }\n\n url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host\n ? url.protocol +'//'+ url.host\n : 'null';\n\n //\n // The href is just the compiled result.\n //\n url.href = url.toString();\n}\n\n/**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part Property we need to adjust.\n * @param {Mixed} value The newly assigned value.\n * @param {Boolean|Function} fn When setting the query, it will be the function\n * used to parse the query.\n * When setting the protocol, double slash will be\n * removed from the final url if it is true.\n * @returns {URL} URL instance for chaining.\n * @public\n */\nfunction set(part, value, fn) {\n var url = this;\n\n switch (part) {\n case 'query':\n if ('string' === typeof value && value.length) {\n value = (fn || qs.parse)(value);\n }\n\n url[part] = value;\n break;\n\n case 'port':\n url[part] = value;\n\n if (!required(value, url.protocol)) {\n url.host = url.hostname;\n url[part] = '';\n } else if (value) {\n url.host = url.hostname +':'+ value;\n }\n\n break;\n\n case 'hostname':\n url[part] = value;\n\n if (url.port) value += ':'+ url.port;\n url.host = value;\n break;\n\n case 'host':\n url[part] = value;\n\n if (/:\\d+$/.test(value)) {\n value = value.split(':');\n url.port = value.pop();\n url.hostname = value.join(':');\n } else {\n url.hostname = value;\n url.port = '';\n }\n\n break;\n\n case 'protocol':\n url.protocol = value.toLowerCase();\n url.slashes = !fn;\n break;\n\n case 'pathname':\n case 'hash':\n if (value) {\n var char = part === 'pathname' ? '/' : '#';\n url[part] = value.charAt(0) !== char ? char + value : value;\n } else {\n url[part] = value;\n }\n break;\n\n default:\n url[part] = value;\n }\n\n for (var i = 0; i < rules.length; i++) {\n var ins = rules[i];\n\n if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n }\n\n url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host\n ? url.protocol +'//'+ url.host\n : 'null';\n\n url.href = url.toString();\n\n return url;\n}\n\n/**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String} Compiled version of the URL.\n * @public\n */\nfunction toString(stringify) {\n if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n\n var query\n , url = this\n , protocol = url.protocol;\n\n if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n\n var result = protocol + (url.slashes || isSpecial(url.protocol) ? '//' : '');\n\n if (url.username) {\n result += url.username;\n if (url.password) result += ':'+ url.password;\n result += '@';\n }\n\n result += url.host + url.pathname;\n\n query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;\n\n if (url.hash) result += url.hash;\n\n return result;\n}\n\nUrl.prototype = { set: set, toString: toString };\n\n//\n// Expose the URL parser and some additional properties that might be useful for\n// others or testing.\n//\nUrl.extractProtocol = extractProtocol;\nUrl.location = lolcation;\nUrl.trimLeft = trimLeft;\nUrl.qs = qs;\n\nmodule.exports = Url;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"querystringify\":59,\"requires-port\":60}]},{},[1])(1)\n});\n\n\n"]},"metadata":{},"sourceType":"script"}