Possess element and descendants.
TODO: Jump detached spirit if matching id (!)
@param {Element} target
338855
function(target) {
		target = target instanceof gui.Spirit ? target.element : target;
		this._maybespiritualize(target, false, false);
	}
342398
function upToSourceRow (target) {
        var current = target;
        while (current && (!current.tagName || current.tagName.toLowerCase() !== "tr")) {
            current = current.parentNode;
        }
        return current;
    }
590580
function (internalInstance, nextElement, transaction, context) {
    var prevElement = internalInstance._currentElement;

    if (nextElement === prevElement && context === internalInstance._context) {
      // Since elements are immutable after the owner is rendered,
      // we can do a cheap identity compare here to determine if this is a
      // superfluous reconcile. It's possible for state to be mutable but such
      // change should trigger an update of the owner which would recreate
      // the element. We explicitly check for the existence of an owner since
      // it's possible for an element created outside a composite to be
      // deeply mutated and reused.

      // TODO: Bailing out early is just a perf optimization right?
      // TODO: Removing the return statement should affect correctness?
      return;
    }

    if (process.env.NODE_ENV !== 'production') {
      if (internalInstance._debugID !== 0) {
        ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
      }
    }

    var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);

    if (refsChanged) {
      ReactRef.detachRefs(internalInstance, prevElement);
    }

    internalInstance.receiveComponent(nextElement, transaction, context);

    if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
      transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
    }

    if (process.env.NODE_ENV !== 'production') {
      if (internalInstance._debugID !== 0) {
        ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
      }
    }
  }
15064
function copy(target, obj) {
  if (isObject(obj)) {
    forIn(obj, function(value, key) {
      target[key] = value;
    });
  }
}
1211935
function () {
            // get value
            var val = this.getContextValue();

            var target,
                targets = this.$.root.getTargets();
            if (targets) {
                for (var i = 0; i < targets.length; i++) {
                    target = targets[i];
                    if (target.key instanceof Function) {
                        target.key.call(target.scope, val, this);
                    } else {
                        target.scope.set(target.key, val);
                    }
                }
            }

        }
980323
function(target) {
        var splitted = target.split(PATH.sep),
            lastLevelIndex = _.findLastIndex(splitted, this._isLevel.bind(this));

        if(lastLevelIndex === -1) {
            return;
        }

        var lastLevel = _.take(splitted, ++lastLevelIndex).join(PATH.sep);
        return !this.isExcludedPath(lastLevel) && lastLevel;
    }
1222018
function( target ) {
				var selector = target.nodeName.toLowerCase();
				if(target.id){
					return "#"+target.id
				}else{
					var parent = target.parentNode;
					while(parent){
						if(parent.id){
							selector = "#"+parent.id+" "+selector;
							break;
						}else{
							parent = parent.parentNode
						}
					}
				}
				if(target.className){
					selector += "."+target.className.split(" ")[0]
				}
				var others = jQuery(selector, Syn.helpers.getWindow(target).document)
				if(others.length > 1){
					return selector+":eq("+others.index(target)+")";
				}else{
					return selector;
				}
				
				
			}
1268640
function (referenceNode, newElement, position) {
        if (!(referenceNode instanceof HTMLElement) || !(referenceNode.parentElement instanceof HTMLElement)) {
            throw new Error('target and element must be a node');
        }
        referenceNode.parentElement.insertBefore(newElement, (position === 'before' ? referenceNode : referenceNode.nextElementSibling));
    }
1217953
function (target, src) {
	for (var key in src) {
		if (src.hasOwnProperty(key)) {
			target[key] = src[key];
		}
	}
}
824568
function(element) {

		var Element = Firestorm.Element,
			name;

		if (this._is_inDOM) Lava.t("Can not set duplicate id attribute on elements");
		// there must not be ID attribute
		if (Element.getProperty(element, 'id')) Lava.t("Target element already has an ID, and could be owned by another container");
		if (Element.getProperty(element, 'tag').toLowerCase() != this._tag_name) Lava.t("Captured tag name differs from the container's tag name");

		Element.setProperty(element, 'id', this._id);

		this._is_inDOM = true;
		this._element = element;

		for (name in this._static_properties) {

			// note: escaping must be handled by framework
			Element.setProperty(element, name, this._static_properties[name]);

		}

		for (name in this._property_bindings) {

			Element.setProperty(element, name, this._property_bindings[name].getValue());

		}

		this.syncClasses();
		this.syncStyles();
		this._is_element_owner = false;

	}
892181
function swap(source, target) {
  // wrap to allow string selectors, arrays etc.
  source = $(source);
  target = $(target);
  source.each(function(el, index) {
    var content = target.get(index);
    if(el.parentNode && content) {
      // deep clone template partial
      content = content.cloneNode(true);
      // replace sourc element with cloned target element
      el.parentNode.replaceChild(content, el);
    }
  })
}
830883
function (target, property) {
    return perform(target, function (target) {
        return target.get(property);
    }, function (target) {
        return target[property];
    });
}
1339989
function (ep, elementWithPrecedence) {
		var idx = 0;
		if (elementWithPrecedence != null) {
			for (var i = 0; i < ep.connections.length; i++) {
				if (ep.connections[i].sourceId == elementWithPrecedence || ep.connections[i].targetId == elementWithPrecedence) {
					idx = i;
					break;
				}
			}
		}

		return ep.connections[idx];
	}
1075195
function (target) {
            var dom = this.callBase(null);

            if (this.$externalInterface) {
                this.$externalInterface._stageRendered(dom);
            }

            if (target) {
                target.appendChild(dom);
                this.rendered = true;
                this.$bus.trigger('Stage.Rendered', target);
                this.trigger('dom:add', target);
            }
            return dom;
        }
695318
function contains(collection, target) {
	let containsTarget = false;
	collection.some((object) => {
		if (object === target) {
			containsTarget = true;
			return true;
		}
		return false;
	});
	return containsTarget;
}
1040463
public boolean containsChain(String target) {
        for (ChainData chain : getChains()) {
            if (chain.getName().equals(target)) {
                return true;
            }
        }
        return false;
    }
92421
private boolean affectsTarget(List<Integer> targetIds, int currentId) {
    return targetIds == null || targetIds.isEmpty() || targetIds.contains(currentId);
  }