jointjs
Version:
JavaScript diagramming library
1 lines • 153 kB
JavaScript
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromCodePoint=String.fromCodePoint||function(e){return String.fromCharCode(Math.floor((e-65536)/1024)+55296,(e-65536)%1024+56320)},t.getCodePoint=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536},t.highSurrogateFrom=55296,t.highSurrogateTo=56319},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function a(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=r(8),u=r(9);e.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(c,e);var t,r,n,a=s(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this)).sock=new l(e),t.sock.onerror=function(e){},t}return t=c,n=[{key:"getClientPath",value:function(e){return 1}}],(r=[{key:"onOpen",value:function(e){this.sock.onopen=e}},{key:"onClose",value:function(e){this.sock.onclose=e}},{key:"onMessage",value:function(e){this.sock.onmessage=function(t){e(t.data)}}}])&&o(t.prototype,r),n&&o(t,n),c}(u)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=r(16).getLogger("webpack-dev-server");n.setDefaultLevel("info"),e.exports={log:n,setLogLevel:function(e){switch(e){case"info":case"warn":case"error":case"debug":case"trace":n.setLevel(e);break;case"warning":n.setLevel("warn");break;case"none":case"silent":n.disableAll();break;default:n.error("[WDS] Unknown clientLogLevel '".concat(e,"'"))}}}},function(e,t,r){"use strict";(function(e){var t=r(5),n=r(7),o=r(10),i=r(3),s=i.log,a=i.setLogLevel,c=r(17),l=r(18),u=r(21),f={isUnloading:!1,currentHash:""},p={hot:!1,hotReload:!0,liveReload:!1,initial:!0,useWarningOverlay:!1,useErrorOverlay:!1,useProgress:!1},h=u(e);if(self.addEventListener("beforeunload",(function(){f.isUnloading=!0})),"undefined"!=typeof window){var d=window.location.search.toLowerCase();p.hotReload=-1===d.indexOf("hotreload=false")}n(h,{hot:function(){p.hot=!0,s.info("[WDS] Hot Module Replacement enabled.")},liveReload:function(){p.liveReload=!0,s.info("[WDS] Live Reloading enabled.")},invalid:function(){s.info("[WDS] App updated. Recompiling..."),(p.useWarningOverlay||p.useErrorOverlay)&&o.clear(),c("Invalid")},hash:function(e){f.currentHash=e},"still-ok":function(){s.info("[WDS] Nothing changed."),(p.useWarningOverlay||p.useErrorOverlay)&&o.clear(),c("StillOk")},"log-level":function(e){var t=r(30);-1!==t.keys().indexOf("./log")&&t("./log").setLogLevel(e),a(e)},overlay:function(e){"undefined"!=typeof document&&("boolean"==typeof e?(p.useWarningOverlay=!1,p.useErrorOverlay=e):e&&(p.useWarningOverlay=e.warnings,p.useErrorOverlay=e.errors))},progress:function(e){"undefined"!=typeof document&&(p.useProgress=e)},"progress-update":function(e){p.useProgress&&s.info("[WDS] ".concat(e.percent,"% - ").concat(e.msg,".")),c("Progress",e)},ok:function(){if(c("Ok"),(p.useWarningOverlay||p.useErrorOverlay)&&o.clear(),p.initial)return p.initial=!1;l(p,f)},"content-changed":function(){s.info("[WDS] Content base changed. Reloading..."),self.location.reload()},warnings:function(e){s.warn("[WDS] Warnings while compiling.");var r=e.map((function(e){return t(e)}));c("Warnings",r);for(var n=0;n<r.length;n++)s.warn(r[n]);if(p.useWarningOverlay&&o.showMessage(e),p.initial)return p.initial=!1;l(p,f)},errors:function(e){s.error("[WDS] Errors while compiling. Reload prevented.");var r=e.map((function(e){return t(e)}));c("Errors",r);for(var n=0;n<r.length;n++)s.error(r[n]);p.useErrorOverlay&&o.showMessage(e),p.initial=!1},error:function(e){s.error(e)},close:function(){s.error("[WDS] Disconnected!"),c("Close")}})}).call(this,"")},function(e,t,r){"use strict";var n=r(6)();e.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},function(e,t,r){"use strict";e.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},function(e,t,r){"use strict";var n="undefined"!=typeof __webpack_dev_server_client__?__webpack_dev_server_client__:r(1),o=0,i=null,s=function(e,t){(i=new n(e)).onOpen((function(){o=0})),i.onClose((function(){if(0===o&&t.close(),i=null,o<=10){var r=1e3*Math.pow(2,o)+100*Math.random();o+=1,setTimeout((function(){s(e,t)}),r)}})),i.onMessage((function(e){var r=JSON.parse(e);t[r.type]&&t[r.type](r.data)}))};e.exports=s},function(e,t,r){(function(t){e.exports=function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,r,n)}return r[s].exports}for(var i=!1,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,r,n){(function(t){"use strict";var n=e("./transport-list");r.exports=e("./main")(n),"_sockjs_onload"in t&&setTimeout(t._sockjs_onload,1)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./main":14,"./transport-list":16}],2:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./event");function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}n(i,o),t.exports=i},{"./event":4,inherits:57}],3:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./eventtarget");function i(){o.call(this)}n(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var r=this,n=!1;this.on(e,(function o(){r.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}))},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var r=arguments.length,n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];for(var i=0;i<t.length;i++)t[i].apply(this,n)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,t.exports.EventEmitter=i},{"./eventtarget":5,inherits:57}],4:[function(e,t,r){"use strict";function n(e){this.type=e}n.prototype.initEvent=function(e,t,r){return this.type=e,this.bubbles=t,this.cancelable=r,this.timeStamp=+new Date,this},n.prototype.stopPropagation=function(){},n.prototype.preventDefault=function(){},n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,t.exports=n},{}],5:[function(e,t,r){"use strict";function n(){this._listeners={}}n.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var r=this._listeners[e];-1===r.indexOf(t)&&(r=r.concat([t])),this._listeners[e]=r},n.prototype.removeEventListener=function(e,t){var r=this._listeners[e];if(r){var n=r.indexOf(t);-1===n||(r.length>1?this._listeners[e]=r.slice(0,n).concat(r.slice(n+1)):delete this._listeners[e])}},n.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,r=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,r),t in this._listeners)for(var n=this._listeners[t],o=0;o<n.length;o++)n[o].apply(this,r)},t.exports=n},{}],6:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./event");function i(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}n(i,o),t.exports=i},{"./event":4,inherits:57}],7:[function(e,t,r){"use strict";var n=e("json3"),o=e("./utils/iframe");function i(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}i.prototype._transportClose=function(e,t){o.postMessage("c",n.stringify([e,t]))},i.prototype._transportMessage=function(e){o.postMessage("t",e)},i.prototype._send=function(e){this._transport.send(e)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=i},{"./utils/iframe":47,json3:58}],8:[function(e,t,r){(function(r){"use strict";var n=e("./utils/url"),o=e("./utils/event"),i=e("json3"),s=e("./facade"),a=e("./info-iframe-receiver"),c=e("./utils/iframe"),l=e("./location"),u=function(){};"production"!==r.env.NODE_ENV&&(u=e("debug")("sockjs-client:iframe-bootstrap")),t.exports=function(e,t){var r,f={};t.forEach((function(e){e.facadeTransport&&(f[e.facadeTransport.transportName]=e.facadeTransport)})),f[a.transportName]=a,e.bootstrap_iframe=function(){var t;c.currentWindowId=l.hash.slice(1),o.attachEvent("message",(function(o){if(o.source===parent&&(void 0===r&&(r=o.origin),o.origin===r)){var a;try{a=i.parse(o.data)}catch(e){return void u("bad json",o.data)}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var p;try{p=i.parse(a.data)}catch(e){u("bad json",a.data);break}var h=p[0],d=p[1],m=p[2],g=p[3];if(u(h,d,m,g),h!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+h+'", the iframe: "'+e.version+'".');if(!n.isOriginEqual(m,l.href)||!n.isOriginEqual(g,l.href))throw new Error("Can't connect to different domain from within an iframe. ("+l.href+", "+m+", "+g+")");t=new s(new f[d](m,g));break;case"m":t._send(a.data);break;case"c":t&&t._close(),t=null}}})),c.postMessage("s")}}}).call(this,{env:{}})},{"./facade":7,"./info-iframe-receiver":10,"./location":13,"./utils/event":46,"./utils/iframe":47,"./utils/url":52,debug:55,json3:58}],9:[function(e,t,r){(function(r){"use strict";var n=e("events").EventEmitter,o=e("inherits"),i=e("json3"),s=e("./utils/object"),a=function(){};function c(e,t){n.call(this);var r=this,o=+new Date;this.xo=new t("GET",e),this.xo.once("finish",(function(e,t){var n,c;if(200===e){if(c=+new Date-o,t)try{n=i.parse(t)}catch(e){a("bad json",t)}s.isObject(n)||(n={})}r.emit("finish",n,c),r.removeAllListeners()}))}"production"!==r.env.NODE_ENV&&(a=e("debug")("sockjs-client:info-ajax")),o(c,n),c.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=c}).call(this,{env:{}})},{"./utils/object":49,debug:55,events:3,inherits:57,json3:58}],10:[function(e,t,r){"use strict";var n=e("inherits"),o=e("events").EventEmitter,i=e("json3"),s=e("./transport/sender/xhr-local"),a=e("./info-ajax");function c(e){var t=this;o.call(this),this.ir=new a(e,s),this.ir.once("finish",(function(e,r){t.ir=null,t.emit("message",i.stringify([e,r]))}))}n(c,o),c.transportName="iframe-info-receiver",c.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=c},{"./info-ajax":9,"./transport/sender/xhr-local":37,events:3,inherits:57,json3:58}],11:[function(e,r,n){(function(t,n){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("json3"),a=e("./utils/event"),c=e("./transport/iframe"),l=e("./info-iframe-receiver"),u=function(){};function f(e,t){var r=this;o.call(this);var i=function(){var n=r.ifr=new c(l.transportName,t,e);n.once("message",(function(e){if(e){var t;try{t=s.parse(e)}catch(t){return u("bad json",e),r.emit("finish"),void r.close()}var n=t[0],o=t[1];r.emit("finish",n,o)}r.close()})),n.once("close",(function(){r.emit("finish"),r.close()}))};n.document.body?i():a.attachEvent("load",i)}"production"!==t.env.NODE_ENV&&(u=e("debug")("sockjs-client:info-iframe")),i(f,o),f.enabled=function(){return c.enabled()},f.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},r.exports=f}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./info-iframe-receiver":10,"./transport/iframe":22,"./utils/event":46,debug:55,events:3,inherits:57,json3:58}],12:[function(e,t,r){(function(r){"use strict";var n=e("events").EventEmitter,o=e("inherits"),i=e("./utils/url"),s=e("./transport/sender/xdr"),a=e("./transport/sender/xhr-cors"),c=e("./transport/sender/xhr-local"),l=e("./transport/sender/xhr-fake"),u=e("./info-iframe"),f=e("./info-ajax"),p=function(){};function h(e,t){p(e);var r=this;n.call(this),setTimeout((function(){r.doXhr(e,t)}),0)}"production"!==r.env.NODE_ENV&&(p=e("debug")("sockjs-client:info-receiver")),o(h,n),h._getReceiver=function(e,t,r){return r.sameOrigin?new f(t,c):a.enabled?new f(t,a):s.enabled&&r.sameScheme?new f(t,s):u.enabled()?new u(e,t):new f(t,l)},h.prototype.doXhr=function(e,t){var r=this,n=i.addPath(e,"/info");p("doXhr",n),this.xo=h._getReceiver(e,n,t),this.timeoutRef=setTimeout((function(){p("timeout"),r._cleanup(!1),r.emit("finish")}),h.timeout),this.xo.once("finish",(function(e,t){p("finish",e,t),r._cleanup(!0),r.emit("finish",e,t)}))},h.prototype._cleanup=function(e){p("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},h.prototype.close=function(){p("close"),this.removeAllListeners(),this._cleanup(!1)},h.timeout=8e3,t.exports=h}).call(this,{env:{}})},{"./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(e,r,n){(function(e){"use strict";r.exports=e.location||{origin:"http://localhost:80",protocol:"http:",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,r,n){(function(t,n){"use strict";e("./shims");var o,i=e("url-parse"),s=e("inherits"),a=e("json3"),c=e("./utils/random"),l=e("./utils/escape"),u=e("./utils/url"),f=e("./utils/event"),p=e("./utils/transport"),h=e("./utils/object"),d=e("./utils/browser"),m=e("./utils/log"),g=e("./event/event"),v=e("./event/eventtarget"),b=e("./location"),y=e("./event/close"),w=e("./event/trans-message"),x=e("./info-receiver"),E=function(){};function C(e,t,r){if(!(this instanceof C))return new C(e,t,r);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");v.call(this),this.readyState=C.CONNECTING,this.extensions="",this.protocol="",(r=r||{}).protocols_whitelist&&m.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=r.transports,this._transportOptions=r.transportOptions||{},this._timeout=r.timeout||0;var n=r.sessionId||8;if("function"==typeof n)this._generateSessionId=n;else{if("number"!=typeof n)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return c.string(n)}}this._server=r.server||c.numberString(1e3);var o=new i(e);if(!o.host||!o.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(o.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==o.protocol&&"https:"!==o.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.");var s="https:"===o.protocol;if("https:"===b.protocol&&!s&&!u.isLoopbackAddr(o.hostname))throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var a=t.sort();a.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<a.length-1&&e===a[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")}));var l=u.getOrigin(b.href);this._origin=l?l.toLowerCase():null,o.set("pathname",o.pathname.replace(/\/+$/,"")),this.url=o.href,E("using url",this.url),this._urlInfo={nullOrigin:!d.hasDomain(),sameOrigin:u.isOriginEqual(this.url,b.href),sameScheme:u.isSchemeEqual(this.url,b.href)},this._ir=new x(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function S(e){return 1e3===e||e>=3e3&&e<=4999}"production"!==t.env.NODE_ENV&&(E=e("debug")("sockjs-client:main")),s(C,v),C.prototype.close=function(e,t){if(e&&!S(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==C.CLOSING&&this.readyState!==C.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},C.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===C.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===C.OPEN&&this._transport.send(l.quote(e))},C.version=e("./version"),C.CONNECTING=0,C.OPEN=1,C.CLOSING=2,C.CLOSED=3,C.prototype._receiveInfo=function(e,t){if(E("_receiveInfo",t),this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=h.extend(e,this._urlInfo),E("info",e);var r=o.filterToEnabled(this._transportsWhitelist,e);this._transports=r.main,E(this._transports.length+" enabled transports"),this._connect()}else this._close(1002,"Cannot connect to server")},C.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(E("attempt",e.transportName),e.needBody&&(!n.document.body||void 0!==n.document.readyState&&"complete"!==n.document.readyState&&"interactive"!==n.document.readyState))return E("waiting for body"),this._transports.unshift(e),void f.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t),E("using timeout",t);var r=u.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName];E("transport url",r);var i=new e(r,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=e.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},C.prototype._transportTimeout=function(){E("_transportTimeout"),this.readyState===C.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},C.prototype._transportMessage=function(e){E("_transportMessage",e);var t,r=this,n=e.slice(0,1),o=e.slice(1);switch(n){case"o":return void this._open();case"h":return this.dispatchEvent(new g("heartbeat")),void E("heartbeat",this.transport)}if(o)try{t=a.parse(o)}catch(e){E("bad json",o)}if(void 0!==t)switch(n){case"a":Array.isArray(t)&&t.forEach((function(e){E("message",r.transport,e),r.dispatchEvent(new w(e))}));break;case"m":E("message",this.transport,t),this.dispatchEvent(new w(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}else E("empty payload",o)},C.prototype._transportClose=function(e,t){E("_transportClose",this.transport,e,t),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),S(e)||2e3===e||this.readyState!==C.CONNECTING?this._close(e,t):this._connect()},C.prototype._open=function(){E("_open",this._transport&&this._transport.transportName,this.readyState),this.readyState===C.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=C.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new g("open")),E("connected",this.transport)):this._close(1006,"Server lost session")},C.prototype._close=function(e,t,r){E("_close",this.transport,e,t,r,this.readyState);var n=!1;if(this._ir&&(n=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===C.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=C.CLOSING,setTimeout(function(){this.readyState=C.CLOSED,n&&this.dispatchEvent(new g("error"));var o=new y("close");o.wasClean=r||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null,E("disconnected")}.bind(this),0)},C.prototype.countRTO=function(e){return e>100?4*e:300+e},r.exports=function(t){return o=p(t),e("./iframe-bootstrap")(C,t),C}}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./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(e,t,r){"use strict";var n,o=Array.prototype,i=Object.prototype,s=Function.prototype,a=String.prototype,c=o.slice,l=i.toString,u=function(e){return"[object Function]"===i.toString.call(e)},f=function(e){return"[object String]"===l.call(e)},p=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();n=p?function(e,t,r,n){!n&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(e,t,r,n){!n&&t in e||(e[t]=r)};var h=function(e,t,r){for(var o in t)i.hasOwnProperty.call(t,o)&&n(e,o,t[o],r)},d=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function m(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function g(){}h(s,{bind:function(e){var t=this;if(!u(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r=c.call(arguments,1),n=function(){if(this instanceof a){var n=t.apply(this,r.concat(c.call(arguments)));return Object(n)===n?n:this}return t.apply(e,r.concat(c.call(arguments)))},o=Math.max(0,t.length-r.length),i=[],s=0;s<o;s++)i.push("$"+s);var a=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this, arguments); }")(n);return t.prototype&&(g.prototype=t.prototype,a.prototype=new g,g.prototype=null),a}}),h(Array,{isArray:function(e){return"[object Array]"===l.call(e)}});var v,b,y,w=Object("a"),x="a"!==w[0]||!(0 in w);h(o,{forEach:function(e){var t=d(this),r=x&&f(this)?this.split(""):t,n=arguments[1],o=-1,i=r.length>>>0;if(!u(e))throw new TypeError;for(;++o<i;)o in r&&e.call(n,r[o],o,t)}},(v=o.forEach,b=!0,y=!0,v&&(v.call("foo",(function(e,t,r){"object"!=typeof r&&(b=!1)})),v.call([1],(function(){y="string"==typeof this}),"x")),!(v&&b&&y)));var E=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);h(o,{indexOf:function(e){var t=x&&f(this)?this.split(""):d(this),r=t.length>>>0;if(!r)return-1;var n=0;for(arguments.length>1&&(n=m(arguments[1])),n=n>=0?n:Math.max(0,r+n);n<r;n++)if(n in t&&t[n]===e)return n;return-1}},E);var C,S=a.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?(C=void 0===/()??/.exec("")[1],a.split=function(e,t){var r=this;if(void 0===e&&0===t)return[];if("[object RegExp]"!==l.call(e))return S.call(this,e,t);var n,i,s,a,c=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),f=0;for(e=new RegExp(e.source,u+"g"),r+="",C||(n=new RegExp("^"+e.source+"$(?!\\s)",u)),t=void 0===t?-1>>>0:t>>>0;(i=e.exec(r))&&!((s=i.index+i[0].length)>f&&(c.push(r.slice(f,i.index)),!C&&i.length>1&&i[0].replace(n,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(i[e]=void 0)})),i.length>1&&i.index<r.length&&o.push.apply(c,i.slice(1)),a=i[0].length,f=s,c.length>=t));)e.lastIndex===i.index&&e.lastIndex++;return f===r.length?!a&&e.test("")||c.push(""):c.push(r.slice(f)),c.length>t?c.slice(0,t):c}):"0".split(void 0,0).length&&(a.split=function(e,t){return void 0===e&&0===t?[]:S.call(this,e,t)});var O=a.substr,_="".substr&&"b"!=="0b".substr(-1);h(a,{substr:function(e,t){return O.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},_)},{}],16:[function(e,t,r){"use strict";t.exports=[e("./transport/websocket"),e("./transport/xhr-streaming"),e("./transport/xdr-streaming"),e("./transport/eventsource"),e("./transport/lib/iframe-wrap")(e("./transport/eventsource")),e("./transport/htmlfile"),e("./transport/lib/iframe-wrap")(e("./transport/htmlfile")),e("./transport/xhr-polling"),e("./transport/xdr-polling"),e("./transport/lib/iframe-wrap")(e("./transport/xhr-polling")),e("./transport/jsonp-polling")]},{"./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(e,r,n){(function(t,n){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("../../utils/event"),a=e("../../utils/url"),c=n.XMLHttpRequest,l=function(){};function u(e,t,r,n){l(e,t);var i=this;o.call(this),setTimeout((function(){i._start(e,t,r,n)}),0)}"production"!==t.env.NODE_ENV&&(l=e("debug")("sockjs-client:browser:xhr")),i(u,o),u.prototype._start=function(e,t,r,n){var o=this;try{this.xhr=new c}catch(e){}if(!this.xhr)return l("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=s.unloadAdd((function(){l("unload cleanup"),o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){l("xhr timeout"),o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return l("exception",e),this.emit("finish",0,""),void this._cleanup(!1)}if(n&&n.noCredentials||!u.supportsCORS||(l("withCredentials"),this.xhr.withCredentials=!0),n&&n.headers)for(var i in n.headers)this.xhr.setRequestHeader(i,n.headers[i]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,r=o.xhr;switch(l("readyState",r.readyState),r.readyState){case 3:try{t=r.status,e=r.responseText}catch(e){}l("status",t),1223===t&&(t=204),200===t&&e&&e.length>0&&(l("chunk"),o.emit("chunk",t,e));break;case 4:t=r.status,l("status",t),1223===t&&(t=204),12005!==t&&12029!==t||(t=0),l("finish",t,r.responseText),o.emit("finish",t,r.responseText),o._cleanup(!1)}}};try{o.xhr.send(r)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},u.prototype._cleanup=function(e){if(l("cleanup"),this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},u.prototype.close=function(){l("close"),this._cleanup(!0)},u.enabled=!!c;var f=["Active"].concat("Object").join("X");!u.enabled&&f in n&&(l("overriding xmlhttprequest"),c=function(){try{return new n[f]("Microsoft.XMLHTTP")}catch(e){return null}},u.enabled=!!new c);var p=!1;try{p="withCredentials"in new c}catch(e){}u.supportsCORS=p,r.exports=u}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],18:[function(e,r,n){(function(e){r.exports=e.EventSource}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,r,n){(function(e){"use strict";var t=e.WebSocket||e.MozWebSocket;r.exports=t?function(e){return new t(e)}:void 0}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/eventsource"),s=e("./sender/xhr-cors"),a=e("eventsource");function c(e){if(!c.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",i,s)}n(c,o),c.enabled=function(){return!!a},c.transportName="eventsource",c.roundTrips=2,t.exports=c},{"./lib/ajax-based":24,"./receiver/eventsource":29,"./sender/xhr-cors":35,eventsource:18,inherits:57}],21:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./receiver/htmlfile"),i=e("./sender/xhr-local"),s=e("./lib/ajax-based");function a(e){if(!o.enabled)throw new Error("Transport created when disabled");s.call(this,e,"/htmlfile",o,i)}n(a,s),a.enabled=function(e){return o.enabled&&e.sameOrigin},a.transportName="htmlfile",a.roundTrips=2,t.exports=a},{"./lib/ajax-based":24,"./receiver/htmlfile":30,"./sender/xhr-local":37,inherits:57}],22:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("json3"),i=e("events").EventEmitter,s=e("../version"),a=e("../utils/url"),c=e("../utils/iframe"),l=e("../utils/event"),u=e("../utils/random"),f=function(){};function p(e,t,r){if(!p.enabled())throw new Error("Transport created when disabled");i.call(this);var n=this;this.origin=a.getOrigin(r),this.baseUrl=r,this.transUrl=t,this.transport=e,this.windowId=u.string(8);var o=a.addPath(r,"/iframe.html")+"#"+this.windowId;f(e,t,o),this.iframeObj=c.createIframe(o,(function(e){f("err callback"),n.emit("close",1006,"Unable to load an iframe ("+e+")"),n.close()})),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}"production"!==r.env.NODE_ENV&&(f=e("debug")("sockjs-client:transport:iframe")),n(p,i),p.prototype.close=function(){if(f("close"),this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},p.prototype._message=function(e){if(f("message",e.data),a.isOriginEqual(e.origin,this.origin)){var t;try{t=o.parse(e.data)}catch(t){return void f("bad json",e.data)}if(t.windowId===this.windowId)switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",o.stringify([s,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var r;try{r=o.parse(t.data)}catch(e){return void f("bad json",t.data)}this.emit("close",r[0],r[1]),this.close()}else f("mismatched window id",t.windowId,this.windowId)}else f("not same origin",e.origin,this.origin)},p.prototype.postMessage=function(e,t){f("postMessage",e,t),this.iframeObj.post(o.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},p.prototype.send=function(e){f("send",e),this.postMessage("m",e)},p.enabled=function(){return c.iframeEnabled},p.transportName="iframe",p.roundTrips=2,t.exports=p}).call(this,{env:{}})},{"../utils/event":46,"../utils/iframe":47,"../utils/random":50,"../utils/url":52,"../version":53,debug:55,events:3,inherits:57,json3:58}],23:[function(e,r,n){(function(t){"use strict";var n=e("inherits"),o=e("./lib/sender-receiver"),i=e("./receiver/jsonp"),s=e("./sender/jsonp");function a(e){if(!a.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",s,i)}n(a,o),a.enabled=function(){return!!t.document},a.transportName="jsonp-polling",a.roundTrips=1,a.needBody=!0,r.exports=a}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/sender-receiver":28,"./receiver/jsonp":31,"./sender/jsonp":33,inherits:57}],24:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("../../utils/url"),i=e("./sender-receiver"),s=function(){};function a(e,t,r,n){i.call(this,e,t,function(e){return function(t,r,n){s("create ajax sender",t,r);var i={};"string"==typeof r&&(i.headers={"Content-type":"text/plain"});var a=o.addPath(t,"/xhr_send"),c=new e("POST",a,r,i);return c.once("finish",(function(e){if(s("finish",e),c=null,200!==e&&204!==e)return n(new Error("http status "+e));n()})),function(){s("abort"),c.close(),c=null;var e=new Error("Aborted");e.code=1e3,n(e)}}}(n),r,n)}"production"!==r.env.NODE_ENV&&(s=e("debug")("sockjs-client:ajax-based")),n(a,i),t.exports=a}).call(this,{env:{}})},{"../../utils/url":52,"./sender-receiver":28,debug:55,inherits:57}],25:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t){i(e),o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}"production"!==r.env.NODE_ENV&&(i=e("debug")("sockjs-client:buffered-sender")),n(s,o),s.prototype.send=function(e){i("send",e),this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},s.prototype.sendScheduleWait=function(){i("sendScheduleWait");var e,t=this;this.sendStop=function(){i("sendStop"),t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){i("timeout"),t.sendStop=null,t.sendSchedule()}),25)},s.prototype.sendSchedule=function(){i("sendSchedule",this.sendBuffer.length);var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(i("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},s.prototype._cleanup=function(){i("_cleanup"),this.removeAllListeners()},s.prototype.close=function(){i("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],26:[function(e,r,n){(function(t){"use strict";var n=e("inherits"),o=e("../iframe"),i=e("../../utils/object");r.exports=function(e){function r(t,r){o.call(this,e.transportName,t,r)}return n(r,o),r.enabled=function(r,n){if(!t.document)return!1;var s=i.extend({},n);return s.sameOrigin=!0,e.enabled(s)&&o.enabled()},r.transportName="iframe-"+e.transportName,r.needBody=!0,r.roundTrips=o.roundTrips+e.roundTrips-1,r.facadeTransport=e,r}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/object":49,"../iframe":22,inherits:57}],27:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t,r){i(t),o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=r,this._scheduleReceiver()}"production"!==r.env.NODE_ENV&&(i=e("debug")("sockjs-client:polling")),n(s,o),s.prototype._scheduleReceiver=function(){i("_scheduleReceiver");var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){i("message",t),e.emit("message",t)})),t.once("close",(function(r,n){i("close",r,n,e.pollIsClosing),e.poll=t=null,e.pollIsClosing||("network"===n?e._scheduleReceiver():(e.emit("close",r||1006,n),e.removeAllListeners()))}))},s.prototype.abort=function(){i("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],28:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("../../utils/url"),i=e("./buffered-sender"),s=e("./polling"),a=function(){};function c(e,t,r,n,c){var l=o.addPath(e,t);a(l);var u=this;i.call(this,e,r),this.poll=new s(n,l,c),this.poll.on("message",(function(e){a("poll message",e),u.emit("message",e)})),this.poll.once("close",(function(e,t){a("poll close",e,t),u.poll=null,u.emit("close",e,t),u.close()}))}"production"!==r.env.NODE_ENV&&(a=e("debug")("sockjs-client:sender-receiver")),n(c,i),c.prototype.close=function(){i.prototype.close.call(this),a("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},t.exports=c}).call(this,{env:{}})},{"../../utils/url":52,"./buffered-sender":25,"./polling":27,debug:55,inherits:57}],29:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("events").EventEmitter,i=e("eventsource"),s=function(){};function a(e){s(e),o.call(this);var t=this,r=this.es=new i(e);r.onmessage=function(e){s("message",e.data),t.emit("message",decodeURI(e.data))},r.onerror=function(e){s("error",r.readyState,e);var n=2!==r.readyState?"network":"permanent";t._cleanup(),t._close(n)}}"production"!==r.env.NODE_ENV&&(s=e("debug")("sockjs-client:receiver:eventsource")),n(a,o),a.prototype.abort=function(){s("abort"),this._cleanup(),this._close("user")},a.prototype._cleanup=function(){s("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){s("close",e);var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},t.exports=a}).call(this,{env:{}})},{debug:55,events:3,eventsource:18,inherits:57}],30:[function(e,r,n){(function(t,n){"use strict";var o=e("inherits"),i=e("../../utils/iframe"),s=e("../../utils/url"),a=e("events").EventEmitter,c=e("../../utils/random"),l=function(){};function u(e){l(e),a.call(this);var t=this;i.polluteGlobalNamespace(),this.id="a"+c.string(6),e=s.addQuery(e,"c="+decodeURIComponent(i.WPrefix+"."+this.id)),l("using htmlfile",u.htmlfileEnabled);var r=u.htmlfileEnabled?i.createHtmlfile:i.createIframe;n[i.WPrefix][this.id]={start:function(){l("start"),t.iframeObj.loaded()},message:function(e){l("message",e),t.emit("message",e)},stop:function(){l("stop"),t._cleanup(),t._close("network")}},this.iframeObj=r(e,(function(){l("callback"),t._cleanup(),t._close("permanent")}))}"production"!==t.env.NODE_ENV&&(l=e("debug")("sockjs-client:receiver:htmlfile")),o(u,a),u.prototype.abort=function(){l("abort"),this._cleanup(),this._close("user")},u.prototype._cleanup=function(){l("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete n[i.WPrefix][this.id]},u.prototype._close=function(e){l("_close",e),this.emit("close",null,e),this.removeAllListeners()},u.htmlfileEnabled=!1;var f=["Active"].concat("Object").join("X");if(f in n)try{u.htmlfileEnabled=!!new n[f]("htmlfile")}catch(e){}u.enabled=u.htmlfileEnabled||i.iframeEnabled,r.exports=u}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],31:[function(e,r,n){(function(t,n){"use strict";var o=e("../../utils/iframe"),i=e("../../utils/random"),s=e("../../utils/browser"),a=e("../../utils/url"),c=e("inherits"),l=e("events").EventEmitter,u=function(){};function f(e){u(e);var t=this;l.call(this),o.polluteGlobalNamespace(),this.id="a"+i.string(6);var r=a.addQuery(e,"c="+encodeURIComponent(o.WPrefix+"."+this.id));n[o.WPrefix][this.id]=this._callback.bind(this),this._createScript(r),this.timeoutId=setTimeout((function(){u("timeout"),t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),f.timeout)}"production"!==t.env.NODE_ENV&&(u=e("debug")("sockjs-client:receiver:jsonp")),c(f,l),f.prototype.abort=function(){if(u("abort"),n[o.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},f.timeout=35e3,f.scriptErrorTimeout=1e3,f.prototype._callback=function(e){u("_callback",e),this._cleanup(),this.aborting||(e&&(u("message",e),this.emit("message",e)),this.emit("close",null,"network"),this.removeAllListeners())},f.prototype._abort=function(e){u("_abort",e),this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},f.prototype._cleanup=function(){if(u("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete n[o.WPrefix][this.id]},f.prototype._scriptError=function(){u("_scriptError");var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),f.scriptErrorTimeout))},f.prototype._createScript=function(e){u("_createScript",e);var t,r=this,o=this.script=n.document.createElement("script");if(o.id="a"+i.string(8),o.src=e,o.type="text/javascript",o.charset="UTF-8",o.onerror=this._scriptError.bind(this),o.onload=function(){u("onload"),r._abort(new Error("JSONP script loaded abnormally (onload)"))},o.onreadystatechange=function(){if(u("onreadystatechange",o.readyState),/loaded|closed/.test(o.readyState)){if(o&&o.htmlFor&&o.onclick){r.loadedOkay=!0;try{o.onclick()}catch(e){}}o&&r._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===o.async&&n.document.attachEvent)if(s.isOpera())(t=this.script2=n.document.createElement("script")).text="try{var a = document.getElementById('"+o.id+"'); if(a)a.onerror();}catch(x){};",o.async=t.async=!1;else{try{o.htmlFor=o.id,o.event="onclick"}catch(e){}o.async=!0}void 0!==o.async&&(o.async=!0);var a=n.document.getElementsByTagName("head")[0];a.insertBefore(o,a.firstChild),t&&a.insertBefore(t,a.firstChild)},r.exports=f}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],32:[function(e,t,r){(function(r){"use strict";var n=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t){i(e),o.call(this);var r=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){i("finish",e,t),r._chunkHandler(e,t),r.xo=null;var n=200===e?"network":"permanent";i("close",n),r.emit("close",null,n),r._cleanup()}))}"production"!==r.env.NODE_ENV&&(i=e("debug")("sockjs-client:receiver:xhr")),n(s,o),s.prototype._chunkHandler=function(e,t){if(i("_chunkHandler",e),200===e&&t)for(var r=-1;;this.bufferPosition+=r+1){var n=t.slice(this.bufferPosition);if(-1===(r=n.indexOf("\n")))break;var o=n.slice(0,r);o&&(i("message",o),this.emit("message",o))}},s.prototype._cleanup=function(){i("_cleanup"),this.removeAllListeners()},s.prototype.abort=function(){i("abort"),this.xo&&(this.xo.close(),i("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],33:[function(e,r,n){(function(t,n){"use strict";var o,i,s=e("../../utils/random"),a=e("../../utils/url"),c=function(){};"production"!==t.env.NODE_ENV&&(c=e("debug")("sockjs-client:sender:jsonp")),r.exports=function(e,t,r){c(e,t),o||(c("createForm"),(o=n.document.createElement("form")).style.display="none",o.style.position="absolute",o.method="POST",o.enctype="application/x-www-form-urlencoded",o.acceptCharset="UTF-8",(i=n.document.createElement("textarea")).name="d",o.appendChild(i),n.document.body.appendChild(o));var l="a"+s.string(8);o.target=l,o.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+l);var u=function(e){c("createIframe",e);try{return n.document.createElement('<iframe name="'+e+'">')}catch(r){var t=n.document.createElement("iframe");return t.name=e,t}}(l);u.id=l,u.style.display="none",o.appendChild(u);try{i.value=t}catch(e){}o.submit();var f=function(e){c("completed",l,e),u.onerror&&(u.onreadystatechange=u.onerror=u.onload=null,setTimeout((function(){c("cleaning up",l),u.parentNode.removeChild(u),u=null}),500),i.value="",r(e))};return u.onerror=function(){c("onerror",l),f()},u.onload=function(){c("onload",l),f()},u.onreadystatechange=function(e){c("onreadystatechange",l,u.readyState,e),"complete"===u.readyState&&f()},function(){c("aborted",l),f(new Error("Aborted"))}}}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/random":50,"../../utils/url":52,debug:55}],34:[function(e,r,n){(function(t,n){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("../../utils/event"),a=e("../../utils/browser"),c=e("../../utils/url"),l=function(){};function u(e,t,r){l(e,t);var n=this;o.call(this),setTimeout((function(){n._start(e,t,r)}),0)}"production"!==t.env.NODE_ENV&&(l=e("debug")("sockjs-client:sender:xdr")),i(u,o),u.prototype._start=function(e,t,r){l("_start");var o=this,i=new n.XDomainRequest;t=c.addQuery(t,"t="+ +new Date),i.onerror=function(){l("onerror"),o._error()},i.ontimeout=function(){l("ontimeout"),o._error()},i.onprogress=function(){l("progress",i.responseText),o.emit("chunk",200,i.responseText)},i.onload=function(){l("load"),o.emit("finish",200,i.responseText),o._cleanup(!1)},this.xdr=i,this.unloadRef=s.unloadAdd((function(){o._cleanup(!0)}));try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(r)}catch(e){this._error()}},u.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},u.prototype._cleanup=function(e){if(l("cleanup",e),this.xdr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},u.prototype.close=function(){l("close"),this._cleanup(!0)},u.enabled=!(!n.XDomainRequest||!a.hasDomain()),r.exports=u}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],35:[function(e,t,r){"use strict";var n=e("inherits"),o=e("../driver/xhr");function i(e,t,r,n){o.call(this,e,t,r,n)}n(i,o),i.enabled=o.enabled&&o.supportsCORS,t.exports=i},{"../driver/xhr":17,inherits:57}],36:[function(e,t,r){"use strict";var n=e("events").EventEmitter;function o(){var e=this;n.call(this),this.to=setTimeout((function(){e.emit("finish",200,"{}")}),o.timeout)}e("inherits")(o,n),o.prototype.close=function(){clearTimeout(this.to)},o.timeout=2e3,t.exports=o},{events:3,inherits:57}],37:[function(e,t,r){"use strict";var n=e("inherits"),o=e("../driver/xhr");function i(e,t,r){o.call(this,e,t,r,{noCredentials:!0})}n(i,o),i.enabled=o.enabled,t.exports=i},{"../driver/xhr":17,inherits:57}],38:[function(e,t,r){(function(r){"use strict";var n=e("../utils/event"),o=e("../utils/url"),i=e("inherits"),s=e("events").EventEmitter,a=e("./driver/websocket"),c=function(){};function l(e,t,r){if(!l.enabled())throw new Error("Transport created when disabled");s.call(this),c("constructor",e);var i=this,u=o.addPath(e,"/websocket");u="https"===u.slice(0,5)?"wss"+u.slice(5):"ws"+u.slice(4),this.url=u,this.ws=new a(this.url,[],r),this.ws.onmessage=function(e){c("message event",e.data),i.emit("message",e.data)},this.unloadRef=n.unloadAdd((function(){c("unload"),i.ws.close()})),this.ws.onclose=function(e){c("close event",e.code,e.reason),i.emit("close",e.code,e.reason),i._cleanup()},this.ws.onerror=function(e){c("error event",e),i.emit("close",1006,"WebSocket connection broken"),i._cleanup()}}"production"!==r.env.NODE_ENV&&(c=e("debug")("sockjs-client:websocket")),i(l,s),l.prototype.send=function(e){var t="["+e+"]";c("send",t),this.ws.send(t)},l.prototype.close=function(){c("close");var e=this.ws;this._cleanup(),e&&e.close()},l.prototype._cleanup=function(){c("_cleanup");var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),n.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},l.enabled=function(){return c("enabled"),!!a},l.transportName="websocket",l.roundTrips=2,t.exports=l}).call(this,{env:{}})},{"../utils/event":46,"../utils/url":52,"./driver/websocket":19,debug:55,events:3,inherits:57}],39:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./lib/ajax-based"),i=e("./xdr-streaming"),s=e("./receiver/xhr"),a=e("./sender/xdr");function c(e){if(!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",s,a)}n(c,o),c.enabled=i.enabled,c.transportName="xdr-polling",c.roundTrips=2,t.exports=c},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,"./xdr-streaming":40,inherits:57}],40:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xdr");function a(e){if(!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,s)}n(a,o),a.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&s.enabled&&e.sameScheme},a.transportName="xdr-streaming",a.roundTrips=2,t.exports=a},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,inherits:57}],41:[function(e,t,r){"use strict";var n=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xhr-cors"),a=e("./sender/xhr-local");function c(e){if(!a.enabled&&!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",i,s)}n(c,o),c.enabled=function(e){return!e.nullOrigin&&(!(!a.enabled||!e.sameOrigin)||s.enabled)},c.transportName="xhr-polling",c.roundTrips=2,t.exports=c},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xhr-cors":35,"./sender/xhr-local":37,inherits:57}],42:[function(e,r,n){(function(t){"use strict";var n=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xhr-cors"),a=e("./sender/xhr-local"),c=e("../utils/br