text: (function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.EventEmitter=e()}})(function(){var e,t,n;return function i(e,t,n){function r(f,o){if(!t[f]){if(!e[f]){var l=typeof require=="function"&&require;if(!o&&l)return l(f,!0);if(s)return s(f,!0);var a=new Error("Cannot find module '"+f+"'");throw a.code="MODULE_NOT_FOUND",a}var u=t[f]={exports:{}};e[f][0].call(u.exports,function(t){var n=e[f][1][t];return r(n?n:t)},u,u.exports,i,e,t,n)}return t[f].exports}var s=typeof require=="function"&&require;for(var f=0;f<n.length;f++)r(n[f]);return r}({1:[function(e,t,n){"use strict";var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(t,n,i){if(n)e(t.prototype,n);if(i)e(t,i);return t}}();function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var s={emitDelay:10,strictMode:false};var f=function(){function e(){var t=arguments.length<=0||arguments[0]===undefined?s:arguments[0];r(this,e);var n=void 0,i=void 0;if(t.hasOwnProperty("emitDelay")){n=t.emitDelay}else{n=s.emitDelay}this._emitDelay=n;if(t.hasOwnProperty("strictMode")){i=t.strictMode}else{i=s.strictMode}this._strictMode=i;this._listeners={};this.events=[]}i(e,[{key:"_addListenner",value:function t(e,n,i){if(typeof n!=="function"){throw TypeError("listener must be a function")}if(this.events.indexOf(e)===-1){this._listeners[e]=[{once:i,fn:n}];this.events.push(e)}else{this._listeners[e].push({once:i,fn:n})}}},{key:"on",value:function n(e,t){this._addListenner(e,t,false)}},{key:"once",value:function f(e,t){this._addListenner(e,t,true)}},{key:"off",value:function o(e,t){var n=this;var i=this.events.indexOf(e);var r=e&&i!==-1;if(r){if(!t){delete this._listeners[e];this.events.splice(i,1)}else{(function(){var r=[];var s=n._listeners[e];s.forEach(function(e,n){if(e.fn===t){r.unshift(n)}});r.forEach(function(e){s.splice(e,1)});if(!s.length){n.events.splice(i,1);delete n._listeners[e]}})()}}}},{key:"_applyEvents",value:function l(e,t){var n=this._listeners[e];if(!n||!n.length){if(this._strictMode){throw"No listeners specified for event: "+e}else{return}}var i=[];n.forEach(function(e,n){e.fn.apply(null,t);if(e.once){i.unshift(n)}});i.forEach(function(e){n.splice(e,1)})}},{key:"emit",value:function a(e){var t=this;for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++){i[r-1]=arguments[r]}if(this._emitDelay){setTimeout(function(){t._applyEvents.call(t,e,i)},this._emitDelay)}else{this._applyEvents(e,i)}}},{key:"emitSync",value:function u(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++){n[i-1]=arguments[i]}this._applyEvents(e,n)}},{key:"destroy",value:function c(){this._listeners={};this.events=[]}}]);return e}();t.exports=f},{}]},{},[1])(1)});