/** * PublishSubscribe * A flexible publish-subscribe pattern implementation for PHP, JavaScript, Python * * @version: 2.0.0 * https://github.com/foo123/PublishSubscribe * **/ !function(s,t,n){"use strict";"undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import?(s.$deps=s.$deps||{})&&(s.EXPORTED_SYMBOLS=[t],s[t]=s.$deps[t]=n.call(s)):"object"==typeof module&&module.exports?(module.$deps=module.$deps||{})&&(module.exports=module.$deps[t]=n.call(s)):"function"==typeof define&&define.amd&&"function"==typeof require&&"function"==typeof require.specified&&require.specified(t)?define(t,["module"],function(t){return n.moduleUri=t.uri,n.call(s)}):t in s||(s[t]=n.call(s)||1)&&"function"==typeof define&&define.amd&&define(function(){return s[t]})}("undefined"!=typeof self?self:this,"PublishSubscribe",function(o){"use strict";var t="prototype",v=Object[t].hasOwnProperty,O="/",y="#",g=Object.keys,a=Date.now||function(){return(new Date).getTime()};function l(t){if(t)for(var s in t)v.call(t,s)&&(this[s]=t[s])}function j(t,s,n,o,e){var i=this;i.target=t,i.topic=s?[].concat(s):[],i.originalTopic=n?[].concat(n):[],i.tags=o?[].concat(o):[],i.namespaces=e?[].concat(e):[],i.data=null,i.timestamp=a(),i._propagates=!0,i._stopped=!1,i._aborted=!1}function p(t){return 0=p.subscribers.list.length&&(p.t+=1,p.start_topic=!0),e&&(t.namespaces=p.hasNamespace?o[3].slice(0):[],o[4]=1,o[0](t))}else p.t+=1,p.start_topic=!0}t.state&&p.t>=p.topics.length&&(T(p.subscribers),"function"==typeof p.finish&&(a=p.finish,p.finish=null,a(t)),t)&&(t.state=null,t.dispose())}})),s(p))}function e(t,s,n,o,e,i){if(s&&"function"==typeof o){var a,p,l,r,c,t=(n=x(t,n))[1].join(y),f=t.length,u=n[2],g=u.length;if(n=n[0].join(O),e=!0===e,i=!0===i,l={},g)for(c=0;c