{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/probes/viewport.probe.ts",
          "name": "scrollThrough",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-probes-viewport-probe-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/probes/viewport.probe.ts",
            "label": "core/probes/viewport.probe.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/probes/viewport.probe.ts.md",
            "ref": "anatomy:file-scripts-core-probes-viewport-probe-ts"
          }
        },
        {
          "file": "core/probes/viewport.probe.ts",
          "name": "visit",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-probes-viewport-probe-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/probes/viewport.probe.ts",
            "label": "core/probes/viewport.probe.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/probes/viewport.probe.ts.md",
            "ref": "anatomy:file-scripts-core-probes-viewport-probe-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 175,
      "name": "pause",
      "signature": "const pause = async (): Promise<void> =>"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/probes/viewport.probe.ts",
          "name": "pause",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-probes-viewport-probe-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/probes/viewport.probe.ts",
            "label": "core/probes/viewport.probe.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/probes/viewport.probe.ts.md",
            "ref": "anatomy:file-scripts-core-probes-viewport-probe-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 172,
      "name": "scrollThrough",
      "signature": "export const scrollThrough = async function scrollThrough(page: ProbePage, rules: ViewportRules): Promise<number> {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/probes/viewport.probe.ts",
          "name": "pause",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-probes-viewport-probe-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/probes/viewport.probe.ts",
            "label": "core/probes/viewport.probe.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/probes/viewport.probe.ts.md",
            "ref": "anatomy:file-scripts-core-probes-viewport-probe-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 179,
      "name": "visit",
      "signature": "const visit = async (top: number, stops: number): Promise<number> => {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "pixelsOf",
      "signature": "export const pixelsOf = function pixelsOf(value: string): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 11,
      "name": "unit",
      "signature": "const unit = \"px\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 15,
      "name": "describeElement",
      "signature": "export const describeElement = function describeElement(element: Element): string {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "classes",
      "signature": "const classes = [...element.classList]"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "id",
      "signature": "const id = element.id.length > 0 ? `#${element.id}` : \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "countedEntries",
      "signature": "export const countedEntries = function countedEntries(keys: readonly string[]): readonly string[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "tally",
      "signature": "const tally = new Map<string, number>();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 32,
      "name": "isAuditable",
      "signature": "export const isAuditable = function isAuditable(page: ProbePage, rules: ViewportRules, element: Element): boolean {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 38,
      "name": "escapesScreen",
      "signature": "export const escapesScreen = function escapesScreen(page: ProbePage, rules: ViewportRules, element: Element): boolean {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 39,
      "name": "right",
      "signature": "const right = page.innerWidth + rules.tolerancePx;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "parent",
      "signature": "for (let parent = element.parentElement; parent !== null; parent = parent.parentElement) {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 48,
      "name": "frame",
      "signature": "const frame = parent.getBoundingClientRect();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "scrolls",
      "signature": "const scrolls = page.getComputedStyle(parent).overflowX !== \"visible\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 57,
      "name": "widestDescendant",
      "signature": "export const widestDescendant = function widestDescendant(element: Element): Element | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "widestRight",
      "signature": "let widestRight = element.getBoundingClientRect().right;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "{ right }",
      "signature": "const { right } = inner.getBoundingClientRect();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 70,
      "name": "clippedEntry",
      "signature": "export const clippedEntry = function clippedEntry("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 76,
      "name": "style",
      "signature": "const style = page.getComputedStyle(element);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 77,
      "name": "hidesExtra",
      "signature": "const hidesExtra = rules.cuttingOverflow.includes(style.overflowX) && style.textOverflow !== \"ellipsis\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 81,
      "name": "widest",
      "signature": "const widest = probe.widestDescendant(element);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 82,
      "name": "cause",
      "signature": "const cause = widest === null ? \"\" : ` by ${probe.describeElement(widest)}`;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "smallTextEntry",
      "signature": "export const smallTextEntry = function smallTextEntry("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 92,
      "name": "size",
      "signature": "const size = probe.pixelsOf(page.getComputedStyle(element).fontSize);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 93,
      "name": "ownText",
      "signature": "const ownText = [...element.childNodes].some("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 96,
      "name": "drawn",
      "signature": "const drawn = element.closest(rules.drawingSelector) !== null;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 100,
      "name": "layoutFindings",
      "signature": "export const layoutFindings = function layoutFindings("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 105,
      "name": "escaping",
      "signature": "const escaping: Element[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 106,
      "name": "clipped",
      "signature": "const clipped: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 107,
      "name": "text",
      "signature": "const text: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 108,
      "name": "shown",
      "signature": "const shown = [...page.document.querySelectorAll(\"body *\")].filter((element) =>"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 115,
      "name": "cut",
      "signature": "const cut = probe.clippedEntry(page, rules, probe, element);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 120,
      "name": "overflow",
      "signature": "const overflow = escaping.map((element) => {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 127,
      "name": "controlFindings",
      "signature": "export const controlFindings = function controlFindings("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 132,
      "name": "inputs",
      "signature": "const inputs = [...page.document.querySelectorAll(rules.fieldSelector)]"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 140,
      "name": "targets",
      "signature": "const targets: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 142,
      "name": "inline",
      "signature": "const inline ="
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 144,
      "name": "box",
      "signature": "const box = element.getBoundingClientRect();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 145,
      "name": "small",
      "signature": "const small = box.width < rules.targetMinPx || box.height < rules.targetMinPx;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 155,
      "name": "auditPage",
      "signature": "export const auditPage = function auditPage("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 161,
      "name": "rootScrolls",
      "signature": "const rootScrolls = root !== null && root.scrollWidth > root.clientWidth + rules.tolerancePx;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 162,
      "name": "layout",
      "signature": "const layout = probe.layoutFindings(page, rules, probe);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 163,
      "name": "controls",
      "signature": "const controls = probe.controlFindings(page, rules, probe);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 173,
      "name": "root",
      "signature": "const root = page.document.getElementById(rules.scrollRootId) ?? page.document.documentElement;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 174,
      "name": "step",
      "signature": "const step = Math.max(root.clientHeight, 1);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 188,
      "name": "stops",
      "signature": "const stops = await visit(0, 0);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 193,
      "name": "VIEWPORT_PROBE",
      "signature": "export const VIEWPORT_PROBE: ViewportProbe = {"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-probes-viewport-probe-ts",
  "language": "typescript",
  "layer": "operations",
  "name": "viewport.probe.ts",
  "path": "core/probes/viewport.probe.ts",
  "ref": "anatomy:file-scripts-core-probes-viewport-probe-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/scripts#folder-scripts-core-probes",
          "json": "https://banes-lab.com/json/anatomy/scripts/folder-scripts-core-probes",
          "label": "core/probes",
          "markdown": "https://banes-lab.com/anatomy/scripts/folder-scripts-core-probes.md",
          "ref": "chapter:/anatomy/scripts#folder-scripts-core-probes"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/scripts#folder-scripts-core-probes",
          "json": "https://banes-lab.com/json/anatomy/scripts/folder-scripts-core-probes",
          "label": "core/probes",
          "markdown": "https://banes-lab.com/anatomy/scripts/folder-scripts-core-probes.md",
          "ref": "chapter:/anatomy/scripts#folder-scripts-core-probes"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "probe",
    "subject": "viewport",
    "variant": null
  },
  "stats": {
    "bytes": 7985,
    "callable": 14,
    "definitions": 49,
    "edges": 2,
    "exported": 49,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "entry": 2,
      "isolated": 46
    },
    "lines": {
      "blank": 13,
      "code": 191,
      "total": 204
    }
  },
  "summary": "191 lines of code and 49 definitions.",
  "text": "https://banes-lab.com/source/scripts/core/probes/viewport.probe.ts.txt",
  "tree": "scripts",
  "siblings": {
    "next": null,
    "previous": null
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/scripts/core/probes",
    "label": "core/probes",
    "markdown": "https://banes-lab.com/api/source/scripts/core/probes.md",
    "ref": "api:source/scripts/core/probes"
  }
}
