/*  helper function for dispatching event to single component
198909
function (ev, comp, params, state) {
                for (var id in comp.__subscription) {
                    if (!_cs.isown(comp.__subscription, id))
                        continue;
                    var s = comp.__subscription[id];
                    if (   (   (state === "capturing" && s.capturing)
                            || (state === "targeting"               )
                            || (state === "spreading" && s.spreading)
                            || (state === "bubbling"  && s.bubbling ))
                        && ev.matches(s.name, s.spec)                 ) {

                        /*  verbosity  */
                        if (!params.silent)
                            $cs.debug(1, "event: " + comp.path("/") + ": dispatch " + ev.name() + " to subscriber on " + state);

                        /*  further annotate event object  */
                        ev.state(state);
                        ev.decline(false);

                        /*  call subscription method  */
                        var args = _cs.concat(
                            s.noevent ? [] : [ ev ],
                            s.args,
                            params.args
                        );
                        var result = s.func.apply(s.ctx, args);

                        /*  process return value  */
                        if (s.noevent && _cs.isdefined(result))
                            ev.result(params.resultstep(ev.result(), result));

                        /*  control the further dispatching  */
                        if (!ev.decline()) {
                            ev.dispatched(true);
                            if (params.firstonly)
                                ev.propagation(false);
                        }
                    }
                }
            }
394067
function getComponentsInEventRegistry(eventRegistry, namespace) {
    var selector = Object.keys(eventRegistry)
        .map(function (componentName) { return "[data-" + namespace + "-name=\"" + componentName + "\"]"; })
        .join(",");
    if (!selector) {
        return [];
    }
    var componentElements = document.documentElement.querySelectorAll(selector);
    var components = [];
    for (var i = 0; i < componentElements.length; i++) {
        var component = getComponentByDomNode(componentElements[i], namespace);
        if (component) {
            components.push(component);
        }
    }
    return components;
}
1207993
function( event, type, dd, x, elem ){
                // not configured
                if ( !dd )
                    return;
                // remember the original event and type
                var orig = { event:event.originalEvent, type:event.type },
                    // is the event drag related or drog related?
                    mode = type.indexOf("drop") ? "drag" : "drop",
                    // iteration vars
                    result, i = x || 0, ia, $elems, callback,
                    len = !isNaN( x ) ? x : dd.interactions.length;
                // modify the event type
                event.type = type;
                // protects originalEvent from side-effects
                var noop = function(){};
                event.originalEvent = new jQuery.Event(orig.event, {
                    preventDefault: noop,
                    stopPropagation: noop,
                    stopImmediatePropagation: noop
                });
                // initialize the results
                dd.results = [];
                // handle each interacted element
                do if ( ia = dd.interactions[ i ] ){
                    // validate the interaction
                    if ( type !== "dragend" && ia.cancelled )
                        continue;
                    // set the dragdrop properties on the event object
                    callback = drag.properties( event, dd, ia );
                    // prepare for more results
                    ia.results = [];
                    // handle each element
                    $( elem || ia[ mode ] || dd.droppable ).each(function( p, subject ){
                        // identify drag or drop targets individually
                        callback.target = subject;
                        // force propagtion of the custom event
                        event.isPropagationStopped = function(){ return false; };
                        // handle the event
                        result = subject ? $event.dispatch.call( subject, event, callback ) : null;
                        // stop the drag interaction for this element
                        if ( result === false ){
                            if ( mode == "drag" ){
                                ia.cancelled = true;
                                dd.propagates -= 1;
                            }
                            if ( type == "drop" ){
                                ia[ mode ][p] = null;
                            }
                        }
                        // assign any dropinit elements
                        else if ( type == "dropinit" )
                            ia.droppable.push( drag.element( result ) || subject );
                        // accept a returned proxy element
                        if ( type == "dragstart" )
                            ia.proxy = $( drag.element( result ) || ia.drag )[0];
                        // remember this result
                        ia.results.push( result );
                        // forget the event result, for recycling
                        delete event.result;
                        // break on cancelled handler
                        if ( type !== "dropinit" )
                            return result;
                    });
                    // flatten the results
                    dd.results[ i ] = drag.flatten( ia.results );
                    // accept a set of valid drop targets
                    if ( type == "dropinit" )
                        ia.droppable = drag.flatten( ia.droppable );
                    // locate drop targets
                    if ( type == "dragstart" && !ia.cancelled )
                        callback.update();
                }
                while ( ++i < len )
                    // restore the original event & type
                    event.type = orig.type;
                    event.originalEvent = orig.event;
                    // return all handler results
                    return drag.flatten( dd.results );
            }
318462
function() {
        // The last component to be unmounted uninstalls the event listener.
        if (components.length == 0) {
            document.removeEventListener(EVENT_TYPE, dispatchEvent);
        }
        components.splice(components.indexOf(this), 1);
    }
1223468
function ElementsEventHandler(socket) {
  var _this = this;
  //Call EventEmmiter _contructor_
  events.EventEmitter.call(this);
  this.socket = socket;

  // On every message event received by socket we get
  // an message event object like {event:, data:} 
  // we emit  a local event through an EventEmitter interface
  // with .event as event type and .data as
  // event data;
  this.socket.on('message', function(message, callback) {
    debug("Forwarding frontend message '%s', with data %j", message.event, message.data);
    if (message.event !== undefined) {
      _this.emit(message.event, message.data);
      if (typeof callback === 'function') {
        callback();
      }
    }
    if (message.event === "userinput" && message.scope !== undefined) {
      debug("userinput received: %s", JSON.stringify(message));
      _this.emit(message.scope, message.data);
    }
  });
  this.socket.on("disconnect", function() {
    delete(this.socket);
    _this.emit("disconnect");
  });
}
661504
private void dispatchEvent(XoaEvent event) {
        LOG.entering(CLASS_NAME, "dispatchEvent", event);
        
        try {
            Integer handlerId = event.getHandlerId();
            
            XoaEventKind eventKind = event.getEvent();
            if (LOG.isLoggable(Level.FINEST)) {
                LOG.finest("XOA --> SOA: " + handlerId  + " event: " + eventKind.name());
            }
            
            BridgeDelegate handler = xoaObjectMap.get(handlerId);
            if (handler == null) {
                if (LOG.isLoggable(Level.FINEST)) {
                    LOG.finest("No handler for handler id: " + handlerId);
                }
                return;
            }
            
            /* Allow only one bridge crossing per handler at a time */
            synchronized (handler) {
                // dispatch to SOA
                Object[] args = { handlerId, eventKind.toString(), event.getParams() };
                firePropertyChange(XOP_MESSAGE, null, args);
            }

        } catch (Exception e) {
            LOG.log(Level.FINE, "While dispatching event: "+e.getMessage(), e);
            throw new IllegalStateException("Unable to dispatch an event from the cross origin proxy", e);
        }

    }
759332
function(oEvent) {
			var sEntityType,
				sEntityId,
				aSplit,
				sId = oEvent.getParameter("arguments").id;

			if (sId) {
				aSplit = sId.split("#");
				if (aSplit.length === 2) {
					sId = aSplit[0];
					sEntityType = aSplit[1];

					aSplit = sEntityType.split(":");
					if (aSplit.length === 2) {
						sEntityType = aSplit[0];
						sEntityId = aSplit[1];
					}
				}

				sId = sId.replace(/.html$/, "");

				if (sEntityType === 'event') { // legacy keyword is singular
					sEntityType = "events";
				}
			}

			this.navTo("apiId", {id: sId, entityType: sEntityType, entityId: sEntityId});
		}
970873
public static void dispatchSCMEvent(int eventID)
    {
        switch(eventID)
        {
          case SERVICE_CONTROL_STOP:
          case SERVICE_CONTROL_PAUSE:
              stopAll();
              break;
              
          case SERVICE_CONTROL_CONTINUE :
              startAll();
              break;
              
          case SERVICE_CONTROL_SHUTDOWN:
              destroyAll();
              break;
              
          case SERVICE_CONTROL_PARAMCHANGE:
              stopAll();
              destroyAll();
              createAll();
              startAll();
              break;

          default:
              break;
        }
    }
79983
function (eventName, data) {
      if (document.createEvent) {
        var evt = document.createEvent('HTMLEvents');
        evt.initEvent(eventName, true, false);
        evt = this.extend(evt, data);
        return this.each(function (v) {
          return v.dispatchEvent(evt);
        });
      }
    }
675969
protected void dispatchEvent (DEvent event)
    {
//         Log.info("Dispatching event: " + evt);

        // look up the object on which we're dispatching this event
        int remoteOid = event.getTargetOid();
        DObject target = _ocache.get(remoteOid);
        if (target == null) {
            if (!_dead.containsKey(remoteOid)) {
                log.warning("Unable to dispatch event on non-proxied object " + event + ".");
            }
            return;
        }

        // because we might be acting as a proxy for a remote server, we may need to fiddle with
        // this event before we dispatch it
        _client.convertFromRemote(target, event);

        // if this is a compound event, we need to process its contained events in order
        if (event instanceof CompoundEvent) {
            // notify our proxy subscribers in one fell swoop
            target.notifyProxies(event);

            // now break the event up and dispatch each event to listeners individually
            List<DEvent> events = ((CompoundEvent)event).getEvents();
            int ecount = events.size();
            for (int ii = 0; ii < ecount; ii++) {
                dispatchEvent(remoteOid, target, events.get(ii));
            }

        } else {
            // forward to any proxies (or not if we're dispatching part of a compound event)
            target.notifyProxies(event);

            // and dispatch the event to regular listeners
            dispatchEvent(remoteOid, target, event);
        }
    }
95110
function(_id,_event){
            var _type = _event.type.toLowerCase();
            _t1.requestAnimationFrame(function(){
                _v._$dispatchEvent(_id,_type);
            });
        }
431089
function EventsBus() {
    var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    classCallCheck(this, EventsBus);

    this.events = events;
    this.hop = events.hasOwnProperty;
  }
597071
function() {
        listenerKeys_.push(
          olEventsListen(map, 'singleclick', handleMapClick_)
        );
        const queryOptions = /** @type {import('ngeo/query/MapQuerent.js').QueryOptions} */ (
          $injector.has('ngeoQueryOptions') ? $injector.get('ngeoQueryOptions') : {}
        );
        if (queryOptions.cursorHover) {
          listenerKeys_.push(
            olEventsListen(map, 'pointermove', handlePointerMove_)
          );
        }
      }
296482
function process (event, nxt) {

      // Publish it now...
      debug('publish event...');
      dispatcher.publisher(event.payload, function(err) {
        if (err) {
          return debug(err);
        }
        // ...and set the published event to dispatched.
        debug('set event to dispatched...');
        dispatcher.store.setEventToDispatched(event, function(err) {
          if (err) {
            debug(err);
          } else {
            debug('event set to dispatched');
          }
        });
      });

      nxt();
    }
1106267
function forEachEventDispatch(event, cb) {
  var dispatchListeners = event._dispatchListeners;
  var dispatchIDs = event._dispatchIDs;
  if ("production" !== "development") {
    validateEventDispatches(event);
  }
  if (Array.isArray(dispatchListeners)) {
    for (var i = 0; i < dispatchListeners.length; i++) {
      if (event.isPropagationStopped()) {
        break;
      }
      // Listeners and IDs are two parallel arrays that are always in sync.
      cb(event, dispatchListeners[i], dispatchIDs[i]);
    }
  } else if (dispatchListeners) {
    cb(event, dispatchListeners, dispatchIDs);
  }
}
94722
function Once(event) {
      return Component.createDecorator(function (componentOptions, k) {
          var key = hyphenate(k);
          if (typeof componentOptions.created !== 'function') {
              componentOptions.created = function () { };
          }
          var original = componentOptions.created;
          componentOptions.created = function () {
              original();
              if (typeof componentOptions.methods !== 'undefined') {
                  this.$once(event || key, componentOptions.methods[k]);
              }
          };
      });
  }
1343022
function(view, event_name, event_object, targets) {

		this._dispatchCallback(
			view,
			targets,
			this._callHandleEvent,
			{
				event_name: event_name,
				event_object: event_object
			},
			this._global_event_targets
		);

	}