{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/link.converter.ts",
          "name": "linkKey",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-link-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/link.converter.ts",
            "label": "core/converters/link.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/link.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-link-converter-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/converters/section.converter.ts",
          "name": "sectionRelations",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-section-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/section.converter.ts",
            "label": "core/converters/section.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/section.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-section-converter-ts"
          }
        },
        {
          "file": "core/converters/source.converter.ts",
          "name": "relationsOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-source-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/source.converter.ts",
            "label": "core/converters/source.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/source.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-source-converter-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "relationGroups",
      "signature": "export const relationGroups = function relationGroups(groups: readonly Relation[]): readonly Relation[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/link.converter.ts",
          "name": "rewriteLine",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-link-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/link.converter.ts",
            "label": "core/converters/link.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/link.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-link-converter-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/resolvers/link.resolver.ts",
          "name": "relink",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-resolvers-link-resolver-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/resolvers/link.resolver.ts",
            "label": "core/resolvers/link.resolver.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/resolvers/link.resolver.ts.md",
            "ref": "anatomy:file-build-scripts-core-resolvers-link-resolver-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "rewriteTargets",
      "signature": "export const rewriteTargets = function rewriteTargets(markdown: string, rewrite: (target: string) => string): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/link.converter.ts",
          "name": "rewriteTargets",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-link-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/link.converter.ts",
            "label": "core/converters/link.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/link.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-link-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "rewriteLine",
      "signature": "const rewriteLine = function rewriteLine(line: string, rewrite: (target: string) => string): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/link.converter.ts",
          "name": "relationGroups",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-link-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/link.converter.ts",
            "label": "core/converters/link.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/link.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-link-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 39,
      "name": "linkKey",
      "signature": "const linkKey = function linkKey(link: Link): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/coordinators/catalog.coordinator.ts",
          "name": "evidence",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-coordinators-catalog-coordinator-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/coordinators/catalog.coordinator.ts",
            "label": "core/coordinators/catalog.coordinator.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/coordinators/catalog.coordinator.ts.md",
            "ref": "anatomy:file-build-scripts-core-coordinators-catalog-coordinator-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 55,
      "name": "nodeLinks",
      "signature": "export const nodeLinks = function nodeLinks("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 5,
      "name": "FENCE",
      "signature": "const FENCE = \"```\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "LINE_END",
      "signature": "const LINE_END = \"\\n\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 7,
      "name": "TARGET_OPEN",
      "signature": "const TARGET_OPEN = \"](\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 8,
      "name": "TARGET_CLOSE",
      "signature": "const TARGET_CLOSE = \")\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 11,
      "name": "out",
      "signature": "let out = \"\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 12,
      "name": "cursor",
      "signature": "let cursor = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 14,
      "name": "open",
      "signature": "const open = line.indexOf(TARGET_OPEN, cursor);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 15,
      "name": "close",
      "signature": "const close = open === -1 ? -1 : line.indexOf(TARGET_CLOSE, open);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "start",
      "signature": "const start = open + TARGET_OPEN.length;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "fenced",
      "signature": "let fenced = false;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "merged",
      "signature": "const merged = new Map<string, readonly Link[]>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 46,
      "name": "held",
      "signature": "const held = merged.get(group.relation) ?? [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 47,
      "name": "seen",
      "signature": "const seen = new Set(held.map(linkKey));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "href",
      "signature": "const href = edge.ref === null ? null : (nodes.get(edge.ref)?.href ?? null);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 62,
      "name": "identity",
      "signature": "const identity = href === null ? null : linker.byHref(href);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-link-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "link.converter.ts",
  "path": "core/converters/link.converter.ts",
  "ref": "anatomy:file-build-scripts-core-converters-link-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#folder-build-scripts-core-converters",
          "json": "https://banes-lab.com/json/anatomy/build-scripts/folder-build-scripts-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-converters.md",
          "ref": "chapter:/anatomy/build-scripts#folder-build-scripts-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-section-converter-ts",
          "json": "https://banes-lab.com/json/source/build-scripts/core/converters/section.converter.ts",
          "label": "core/converters/section.converter.ts",
          "markdown": "https://banes-lab.com/source/build-scripts/core/converters/section.converter.ts.md",
          "ref": "anatomy:file-build-scripts-core-converters-section-converter-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-source-converter-ts",
          "json": "https://banes-lab.com/json/source/build-scripts/core/converters/source.converter.ts",
          "label": "core/converters/source.converter.ts",
          "markdown": "https://banes-lab.com/source/build-scripts/core/converters/source.converter.ts.md",
          "ref": "anatomy:file-build-scripts-core-converters-source-converter-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-coordinators-catalog-coordinator-ts",
          "json": "https://banes-lab.com/json/source/build-scripts/core/coordinators/catalog.coordinator.ts",
          "label": "core/coordinators/catalog.coordinator.ts",
          "markdown": "https://banes-lab.com/source/build-scripts/core/coordinators/catalog.coordinator.ts.md",
          "ref": "anatomy:file-build-scripts-core-coordinators-catalog-coordinator-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-resolvers-link-resolver-ts",
          "json": "https://banes-lab.com/json/source/build-scripts/core/resolvers/link.resolver.ts",
          "label": "core/resolvers/link.resolver.ts",
          "markdown": "https://banes-lab.com/source/build-scripts/core/resolvers/link.resolver.ts.md",
          "ref": "anatomy:file-build-scripts-core-resolvers-link-resolver-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#folder-build-scripts-core-converters",
          "json": "https://banes-lab.com/json/anatomy/build-scripts/folder-build-scripts-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-converters.md",
          "ref": "chapter:/anatomy/build-scripts#folder-build-scripts-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#folder-build-scripts-core-coordinators",
          "json": "https://banes-lab.com/json/anatomy/build-scripts/folder-build-scripts-core-coordinators",
          "label": "core/coordinators",
          "markdown": "https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-coordinators.md",
          "ref": "chapter:/anatomy/build-scripts#folder-build-scripts-core-coordinators"
        },
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#folder-build-scripts-core-resolvers",
          "json": "https://banes-lab.com/json/anatomy/build-scripts/folder-build-scripts-core-resolvers",
          "label": "core/resolvers",
          "markdown": "https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-resolvers.md",
          "ref": "chapter:/anatomy/build-scripts#folder-build-scripts-core-resolvers"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "link",
    "variant": null
  },
  "stats": {
    "bytes": 2574,
    "callable": 5,
    "definitions": 20,
    "edges": 2,
    "exported": 9,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 2,
      "leaf": 3,
      "isolated": 15
    },
    "lines": {
      "blank": 6,
      "code": 64,
      "total": 70
    }
  },
  "summary": "64 lines of code and 20 definitions.",
  "text": "https://banes-lab.com/source/build-scripts/core/converters/link.converter.ts.txt",
  "tree": "build-scripts",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-location-converter-ts",
      "json": "https://banes-lab.com/json/source/build-scripts/core/converters/location.converter.ts",
      "label": "core/converters/location.converter.ts",
      "markdown": "https://banes-lab.com/source/build-scripts/core/converters/location.converter.ts.md",
      "ref": "anatomy:file-build-scripts-core-converters-location-converter-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-lexicon-converter-ts",
      "json": "https://banes-lab.com/json/source/build-scripts/core/converters/lexicon.converter.ts",
      "label": "core/converters/lexicon.converter.ts",
      "markdown": "https://banes-lab.com/source/build-scripts/core/converters/lexicon.converter.ts.md",
      "ref": "anatomy:file-build-scripts-core-converters-lexicon-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/build-scripts/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/build-scripts/core/converters.md",
    "ref": "api:source/build-scripts/core/converters"
  }
}
