Teleport visibility crawler to hosted document.
Action intercepted by the {gui.DocumentSpirit}.
770336
function() {
		if (gui.hasModule("gui-layout@wunderbyte.com")) { // TODO: - fix
			if (gui.Type.isDefined(this.life.visible)) {
				this.action.descendGlobal(
					gui.$ACTION_XFRAME_VISIBILITY,
					this.life.visible
				);
			}
		}
	}
398303
function crawLink($,result,linkTag, callback) {
      var link = $(linkTag).attr('href');
      var parentUrl = result.url;

      if (link) {

          var rel =  $(linkTag).attr('rel');

          if (result.linkTypes.indexOf(rel) > 0) {
              var linkUri = URI.linkToURI(parentUrl, link);

              pm.crawlLink(parentUrl, linkUri, null, null, function(){
                addLinkToQueue(result, parentUrl, linkUri, null, null, callback);
              });
          }
          else {
            callback();
          }
      }
      else {
        callback();
      }
}
355042
function(action, thisp) {
		var res;
		if (this.observes) {
			if (++this._suspend === 1) {
				this._connect(false);
			}
		}
		if (gui.Type.isFunction(action)) {
			res = action.call(thisp);
		}
		if (this.observes) {
			this.resume();
		}
		return res;
	}
239412
function(evt) {
        if (evt instanceof MapBrowserEvent && !evt.dragging) {
          const pixel = map.getEventPixel(evt.originalEvent);
          const queryable = function(layer) {
            const visible = layer.get('visible');
            const sourceids = layer.get('querySourceIds');
            return visible && !!sourceids;
          };
          const hit = map.forEachLayerAtPixel(pixel, () => true, undefined, queryable);
          map.getTargetElement().style.cursor = hit ? 'pointer' : '';
        }
      }
340243
function (config, EventSource) {
            var url = config.url;
            if (url) {
                realtime = new Crocodoc.Realtime(url, EventSource || window.EventSource);

                // force the viewer to think conversion is not complete
                // @TODO: ideally this wouldn't have to make an extra trip to
                // the server just to find out the doc is already done
                // converting, so we should have an indicator of the doc status
                // in the session endpoint response
                viewerConfig.conversionIsComplete = false;
                registerBoxViewPageEventHandlers();
            }
        }
989194
def push_doc(self, document):
        ''' 

        '''
        msg = self._protocol.create('PUSH-DOC', document)
        reply = self._send_message_wait_for_reply(msg)
        if reply is None:
            raise RuntimeError("Connection to server was lost")
        elif reply.header['msgtype'] == 'ERROR':
            raise RuntimeError("Failed to push document: " + reply.content['text'])
        else:
            return reply
384921
function(visible) {
        if (!this._dragging) {
            this.setGMapVisibility(visible);
        }
        OpenLayers.Layer.EventPane.prototype.display.apply(this, arguments);
    }
498047
function(start, handler, arg) {
		this.direction = gui.Crawler.DESCENDING;
		var elm = start instanceof gui.Spirit ? start.element : start;
		if (elm.nodeType === Node.DOCUMENT_NODE) {
			elm = elm.documentElement;
		}
		this._descend(elm, handler, arg, true);
	}
837627
function documentReady(callback) {
  document.readyState === "interactive" || document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);
}
293987
public void go(DocListener document, InputSource is) {
        try {
            parser.parse(is, new SAXiTextHandler(document));
        }
        catch(SAXException se) {
            throw new ExceptionConverter(se);
        }
        catch(IOException ioe) {
            throw new ExceptionConverter(ioe);
        }
    }
807480
function () {
        var self = this;

        // Unbind all events bound to window/document by editor instance
        if (self.boundEvents) {
          var i = self.boundEvents.length;

          while (i--) {
            var item = self.boundEvents[i];
            this.events.unbind(item[0], item[1], item[2]);
          }

          self.boundEvents = null;
        }

        // Restore sizzle document to window.document
        // Since the current document might be removed producing "Permission denied" on IE see #6325
        if (Sizzle.setDocument) {
          Sizzle.setDocument();
        }

        self.win = self.doc = self.root = self.events = self.frag = null;
      }
715639
function publishRobotsTxt () {
    var path = 'robots.txt';
    return fs
        .statAsync(path)
        .then(function (pStat) {
            if (!pStat.isFile()) {
                // go to our default course of action, that is create robots.txt file
                throw new Error ();
            }
        })
        .catch(Error, function () {
            return fs
                .openAsync(path, 'w')
                .then(function () {
                    return fs.writeFileAsync(path, 'User-agent: *\nSitemap: ' + config.siteUrl + '/sitemap.xml');
                })
                .catch(function (pErr) {
                    log.error(pErr);
                });
        });
}
230785
function scrapeHtml(document, robots)
{
	var link,links,preliminaries,rootNode;
	
	rootNode = findRootNode(document);
	
	if (rootNode != null)
	{
		preliminaries = findPreliminaries(rootNode, robots);
		links = [];
		
		findLinks(rootNode, function(node, attrName, url)
		{
			link = linkObj(url);

			link.html.attrs = node.attrMap;
			link.html.attrName = attrName;
			link.html.base = preliminaries.base;
			link.html.index = links.length;
			link.html.selector = getSelector(node);
			link.html.tag = stringifyNode(node);
			link.html.tagName = node.nodeName;
			link.html.text = getText(node);

			// If not a "fake" (duplicated) element, as a result of adoption
			if (node.__location !== undefined)
			{
				link.html.location = node.__location.attrs[attrName];
			}
			
			links.push(link);
		});
	}
	
	return links;
}
951928
function(spirits) {
		spirits.forEach(function(spirit) {
			gui.Spirit.$async(spirit);
		});

		/*
		 * Temp hack: DocumentSpirit inside *iframe* must
		 * wait for visibility status to relay elsehow...
		 * (this stuff must all move to the plugin)
		 * @see {gui.IframeSpirit}
		 */
		if (gui.hosted) {
			var docspirit = gui.get('html');
			if (docspirit.life.visible === undefined) {
				return;
			}
		}
		this._visibility(spirits);
	}
1227766
function(element, handler, arg) {
		var hasspirit = gui.hasModule('gui-spirits@wunderbyte.com');
		var directive = gui.Crawler.CONTINUE;
		var spirit = hasspirit ? element.spirit : null;
		if (spirit) {
			directive = spirit.oncrawler(this);
		}
		if (!directive) {
			if (handler) {
				if (gui.Type.isFunction(handler.handleElement)) {
					directive = handler.handleElement(element, arg);
				}
				if (directive !== gui.Crawler.STOP) {
					if (spirit && gui.Type.isFunction(handler.handleSpirit)) {
						directive = this._handleSpirit(spirit, handler);
					}
				}
			}
		}
		if (!directive) {
			directive = gui.Crawler.CONTINUE;
		}
		return directive;
	}
756831
def open_hover(self, locator, params=None, use_js=False):
        
        element = locator
        if not isinstance(element, WebElement):
            element = self.get_visible_element(locator, params)

        if use_js:
            self._js_hover('mouseover', element)
            return element
        actions = ActionChains(self.driver)
        actions.move_to_element(element).perform()
        actions.reset_actions()
        return element
97865
function getHighlightingProxy(item, match, document) {
  var proxy = {};
  Object.defineProperties(proxy, {
    highlight: {
      get: function() {
        if (!match) {
          return item.name;
        }

        var value = item.name;
        var startMatch = value.indexOf(match);
        if (startMatch === -1) {
          return value;
        }

        var before = value.substr(0, startMatch);
        var after = value.substr(startMatch + match.length);
        var parent = util.createElement(document, 'span');
        parent.appendChild(document.createTextNode(before));
        var highlight = util.createElement(document, 'span');
        highlight.classList.add('gcli-menu-typed');
        highlight.appendChild(document.createTextNode(match));
        parent.appendChild(highlight);
        parent.appendChild(document.createTextNode(after));
        return parent;
      },
      enumerable: true
    },

    name: {
      value: item.name,
      enumerable: true
    },

    manual: {
      value: item.manual,
      enumerable: true
    },

    description: {
      value: item.description,
      enumerable: true
    }
  });
  return proxy;
}