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.
4 lines
61 KiB
4 lines
61 KiB
4 years ago
|
/* sockjs-client v1.4.0 | http://sockjs.org | MIT license */
|
||
|
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SockJS=t()}}(function(){return function i(s,a,l){function c(e,t){if(!a[e]){if(!s[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(t){return c(s[e][1][t]||t)},o,o.exports,i,s,a,l)}return a[e].exports}for(var u="function"==typeof require&&require,t=0;t<l.length;t++)c(l[t]);return c}({1:[function(n,r,t){(function(t){"use strict";var e=n("./transport-list");r.exports=n("./main")(e),"_sockjs_onload"in t&&setTimeout(t._sockjs_onload,1)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./main":14,"./transport-list":16}],2:[function(t,e,n){"use strict";var r=t("inherits"),o=t("./event");function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}r(i,o),e.exports=i},{"./event":4,"inherits":54}],3:[function(t,e,n){"use strict";var r=t("inherits"),o=t("./eventtarget");function i(){o.call(this)}r(i,o),i.prototype.removeAllListeners=function(t){t?delete this._listeners[t]:this._listeners={}},i.prototype.once=function(e,n){var r=this,o=!1;this.on(e,function t(){r.removeListener(e,t),o||(o=!0,n.apply(this,arguments))})},i.prototype.emit=function(){var t=arguments[0],e=this._listeners[t];if(e){for(var n=arguments.length,r=new Array(n-1),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0;i<e.length;i++)e[i].apply(this,r)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,e.exports.EventEmitter=i},{"./eventtarget":5,"inherits":54}],4:[function(t,e,n){"use strict";function r(t){this.type=t}r.prototype.initEvent=function(t,e,n){return this.type=t,this.bubbles=e,this.cancelable=n,this.timeStamp=+new Date,this},r.prototype.stopPropagation=function(){},r.prototype.preventDefault=function(){},r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,e.exports=r},{}],5:[function(t,e,n){"use strict";function r(){this._listeners={}}r.prototype.addEventListener=function(t,e){t in this._listeners||(this._listeners[t]=[]);var n=this._listeners[t];-1===n.indexOf(e)&&(n=n.concat([e])),this._listeners[t]=n},r.prototype.removeEventListener=function(t,e){var n=this._listeners[t];if(n){var r=n.indexOf(e);-1===r||(1<n.length?this._listeners[t]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[t])}},r.prototype.dispatchEvent=function(){var t=arguments[0],e=t.type,n=1===arguments.length?[t]:Array.apply(null,arguments);if(this["on"+e]&&this["on"+e].apply(this,n),e in this._listeners)for(var r=this._listeners[e],o=0;o<r.length;o++)r[o].apply(this,n)},e.exports=r},{}],6:[function(t,e,n){"use strict";var r=t("inherits"),o=t("./event");function i(t){o.call(this),this.initEvent("message",!1,!1),this.data=t}r(i,o),e.exports=i},{"./event":4,"inherits":54}],7:[function(t,e,n){"use strict";var r=t("json3"),o=t("./utils/iframe");function i(t){(this._transport=t).on("message",this._transportMessage.bind(this)),t.on("close",this._transportClose.bind(this))}i.prototype._transportClose=function(t,e){o.postMessage("c",r.stringify([t,e]))},i.prototype._transportMessage=function(t){o.postMessage("t",t)},i.prototype._send=function(t){this._transport.send(t)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},e.exports=i},{"./utils/iframe":47,"json3":55}],8:[function(t,e,n){"use strict";var f=t("./utils/url"),r=t("./utils/event"),h=t("json3"),d=t("./facade"),o=t("./info-iframe-receiver"),p=t("./utils/iframe"),m=t("./location"),v=function(){};e.exports=function(l,t){var c,u={};t.forEach(function(t){t.facadeTransport&&(u[t.facadeTransport.transportName]=t.facadeTransport)}),u[o.transportName]=o,l.bootstrap_iframe=function(){var a;p.curre
|
||
|
//# sourceMappingURL=sockjs.min.js.map
|