"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const element = require("../utils/element.js");
var calculateDepthForNode = function(node) {
  if (element.isHidden(node)) {
    return Infinity;
  }
  var depth = 0;
  var parent = node.parentNode;
  while (parent) {
    depth += 1;
    parent = parent.parentNode;
  }
  return depth;
};
exports.calculateDepthForNode = calculateDepthForNode;
