define("clientkernelEventbusApi", [],
    function() {
        "use strict";

        function $iterator(o) {
            if (o instanceof Array) return function() {
                return {
                    cur: 0,
                    arr: o,
                    hasNext: function() {
                        return this.cur < this.arr.length;
                    },
                    next: function() {
                        return this.arr[this.cur++];
                    }
                };
            };
            return typeof(o.iterator) == 'function' ? $bind(o, o.iterator) : o.iterator;
        };;
        var $fid = 0;

        function $bind(o, m) {
            if (m == null) return null;
            if (m.__id__ == null) m.__id__ = $fid++;
            var f;
            if (o.hx__closures__ == null) o.hx__closures__ = {};
            else f = o.hx__closures__[m.__id__];
            if (f == null) {
                f = function() {
                    return f.method.apply(f.scope, arguments);
                };
                f.scope = o;
                f.method = m;
                o.hx__closures__[m.__id__] = f;
            }
            return f;
        };
        var $_;
        var $estr = function() {
            return _hcmn_.js_Boot.__string_rec(this, '');
        };
        if (typeof clientkernelEventbusApi == 'undefined') {
            var clientkernelEventbusApi = {};
        };

        clientkernelEventbusApi.IEvent = function() {}
        clientkernelEventbusApi.IEvent.prototype = {

            getTopic: function() {
                return {
                    arguments: [],
                    returns: "string"
                };
            },
            getChannel: function() {
                return {
                    arguments: [],
                    returns: "string"
                };
            },
            getPayload: function() {
                return {
                    arguments: [],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.IEventBus = function() {}
        clientkernelEventbusApi.IEventBus.prototype = {

            getChannels: function() {
                return {
                    arguments: [],
                    returns: "array"
                };
            },
            getChannel: function(channel) {
                return {
                    arguments: ["string"],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.IEventBusChannel = function() {}
        clientkernelEventbusApi.IEventBusChannel.prototype = {

            publish: function(topic, payload) {
                return {
                    arguments: ["string", "*"],
                    returns: "*"
                };
            },
            subscribe: function(topic, callback, payloadType) {
                return {
                    arguments: ["string", "*", {
                        type: "*",
                        opt: true
                    }],
                    returns: "*"
                };
            },
            subscribeToRequest: function(topic, callback, payloadType) {
                return {
                    arguments: ["string", "*", {
                        type: "*",
                        opt: true
                    }],
                    returns: "*"
                };
            },
            request: function(topic, payload, timeout) {
                return {
                    arguments: ["string", "*", "number"],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.IPublishable = function() {}
        clientkernelEventbusApi.IPublishable.prototype = {

            publish: function(payload) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.IRequestEvent = function() {}
        clientkernelEventbusApi.IRequestEvent.prototype = {

            reply: function(data) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            },
            reject: function(error) {
                return {
                    arguments: ["*"],
                    returns: "void"
                };
            }
        };

        clientkernelEventbusApi.IRequestSubscribable = function() {}
        clientkernelEventbusApi.IRequestSubscribable.prototype = {

            subscribe: function(callback) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.IRequestable = function() {}
        clientkernelEventbusApi.IRequestable.prototype = {

            request: function(payload, timeout) {
                return {
                    arguments: ["*", "number"],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.ISubscribeable = function() {}
        clientkernelEventbusApi.ISubscribeable.prototype = {

            subscribe: function(callback) {
                return {
                    arguments: ["*"],
                    returns: "*"
                };
            }
        };

        clientkernelEventbusApi.ISubscription = function() {}
        clientkernelEventbusApi.ISubscription.prototype = {

            unsubscribe: function() {
                return {
                    arguments: [],
                    returns: "void"
                };
            }
        };
        clientkernelEventbusApi.Request = function(topic) {
            this.topic = topic;
        };
        clientkernelEventbusApi.Request = ck_implements(clientkernelEventbusApi.Request, clientkernelEventbusApi.IRequestSubscribable);
        clientkernelEventbusApi.Request = ck_implements(clientkernelEventbusApi.Request, clientkernelEventbusApi.IRequestable);
        clientkernelEventbusApi.Request.__interfaces__ = [clientkernelEventbusApi.IRequestSubscribable, clientkernelEventbusApi.IRequestable];
        clientkernelEventbusApi.Request.__name__ = ["clientkernelEventbusApi", "Request"];
        clientkernelEventbusApi.Request.prototype.channel = null;
        clientkernelEventbusApi.Request.prototype.topic = null;
        clientkernelEventbusApi.Request.prototype.connect = function(channel) {
            this.channel = channel;
        };
        clientkernelEventbusApi.Request.prototype.subscribe = function(callback) {
            return this.channel.subscribeToRequest(this.topic, callback);
        };
        clientkernelEventbusApi.Request.prototype.request = function(payload, timeout) {
            return this.channel.request(this.topic, payload, timeout);
        };
        clientkernelEventbusApi.Request.prototype.getId = function() {
            return this.topic;
        };
        clientkernelEventbusApi.Request.prototype.__class__ = clientkernelEventbusApi.Request;
        clientkernelEventbusApi.RequestWithoutPayload = function(topic) {
            clientkernelEventbusApi.Request.call(this, topic);
        };
        clientkernelEventbusApi.RequestWithoutPayload.__name__ = ["clientkernelEventbusApi", "RequestWithoutPayload"];
        clientkernelEventbusApi.RequestWithoutPayload.__super__ = clientkernelEventbusApi.Request;
        for (var k in clientkernelEventbusApi.Request.prototype) clientkernelEventbusApi.RequestWithoutPayload.prototype[k] = clientkernelEventbusApi.Request.prototype[k];
        clientkernelEventbusApi.RequestWithoutPayload.prototype.__class__ = clientkernelEventbusApi.RequestWithoutPayload;
        clientkernelEventbusApi.Topic = function(topic) {
            this.topic = topic;
        };
        clientkernelEventbusApi.Topic = ck_implements(clientkernelEventbusApi.Topic, clientkernelEventbusApi.ISubscribeable);
        clientkernelEventbusApi.Topic = ck_implements(clientkernelEventbusApi.Topic, clientkernelEventbusApi.IPublishable);
        clientkernelEventbusApi.Topic.__interfaces__ = [clientkernelEventbusApi.ISubscribeable, clientkernelEventbusApi.IPublishable];
        clientkernelEventbusApi.Topic.__name__ = ["clientkernelEventbusApi", "Topic"];
        clientkernelEventbusApi.Topic.prototype.channel = null;
        clientkernelEventbusApi.Topic.prototype.topic = null;
        clientkernelEventbusApi.Topic.prototype.connect = function(channel) {
            this.channel = channel;
        };
        clientkernelEventbusApi.Topic.prototype.subscribe = function(callback) {
            return this.channel.subscribe(this.topic, callback);
        };
        clientkernelEventbusApi.Topic.prototype.publish = function(payload) {
            return this.channel.publish(this.topic, payload);
        };
        clientkernelEventbusApi.Topic.prototype.getId = function() {
            return this.topic;
        };
        clientkernelEventbusApi.Topic.prototype.__class__ = clientkernelEventbusApi.Topic;
        clientkernelEventbusApi.TopicWithoutPayload = function(topic) {
            clientkernelEventbusApi.Topic.call(this, topic);
        };
        clientkernelEventbusApi.TopicWithoutPayload.__name__ = ["clientkernelEventbusApi", "TopicWithoutPayload"];
        clientkernelEventbusApi.TopicWithoutPayload.__super__ = clientkernelEventbusApi.Topic;
        for (var k in clientkernelEventbusApi.Topic.prototype) clientkernelEventbusApi.TopicWithoutPayload.prototype[k] = clientkernelEventbusApi.Topic.prototype[k];
        clientkernelEventbusApi.TopicWithoutPayload.prototype.__class__ = clientkernelEventbusApi.TopicWithoutPayload;
        return {
            exports: clientkernelEventbusApi
        };
    });