- USD · {valueScaleLabel}
+ USD · {valueScaleLabel} · Latest {historyWindow} years
{isTreeStatementMode && hasUnmappedResidualRows ? (
@@ -1096,7 +1199,7 @@ function FinancialsPageContent() {
) : null}
{isTreeStatementMode && treeModel ? (
50}
/>
) : (
-
-
+
+
-
- Metric
-
- {periods.map((period) => (
+ Metric
+ {visiblePeriods.map((period) => (
@@ -1136,7 +1236,7 @@ function FinancialsPageContent() {
{group.label ? (
{group.label}
@@ -1146,14 +1246,9 @@ function FinancialsPageContent() {
{group.rows.map((row) => (
setSelectedFlatRowKey(row.key)}
>
-
+
- {periods.map((period, index) => (
+ {visiblePeriods.map((period, index) => (
{buildDisplayValue({
row,
periodId: period.id,
previousPeriodId:
index > 0
- ? (periods[index - 1]?.id ?? null)
+ ? (visiblePeriods[index - 1]?.id ?? null)
: null,
commonSizeRow,
displayMode,
@@ -1210,207 +1305,235 @@ function FinancialsPageContent() {
)}
- {isTreeStatementMode && isStatementSurfaceKind(surfaceKind) ? (
-
- ) : (
-
- {!selectedRow ? (
-
- Select a row to inspect details.
-
- ) : (
-
-
-
-
Label
-
- {selectedRow.label}
-
-
-
-
Key
-
- {selectedRow.key}
-
-
-
-
- {isTaxonomyRow(selectedRow) ? (
-
-
- Taxonomy Concept
-
-
- {selectedRow.qname}
-
-
+ {financials ? (
+
+
+
+ {isTreeStatementMode && isStatementSurfaceKind(surfaceKind) ? (
+
) : (
-
-
-
- Category
+
+ {!selectedRow ? (
+
+ Select a row to inspect details.
-
- {selectedRow.category}
-
-
-
-
Unit
-
- {selectedRow.unit}
-
-
-
+ ) : (
+
+
+
+
+ Label
+
+
+ {selectedRow.label}
+
+
+
+
+ Key
+
+
+ {selectedRow.key}
+
+
+
+
+ {isTaxonomyRow(selectedRow) ? (
+
+
+ Taxonomy Concept
+
+
+ {selectedRow.qname}
+
+
+ ) : (
+
+
+
+ Category
+
+
+ {selectedRow.category}
+
+
+
+
+ Unit
+
+
+ {selectedRow.unit}
+
+
+
+ )}
+
+ {isDerivedRow(selectedRow) ? (
+
+
+ Source Row Keys
+
+
+ {(selectedRow.sourceRowKeys ?? []).join(", ") ||
+ "n/a"}
+
+
+ Source Concepts
+
+
+ {(selectedRow.sourceConcepts ?? []).join(", ") ||
+ "n/a"}
+
+
+ Source Fact IDs
+
+
+ {(selectedRow.sourceFactIds ?? []).join(", ") ||
+ "n/a"}
+
+
+ ) : null}
+
+ {!selectedRow ||
+ !("hasDimensions" in selectedRow) ||
+ !selectedRow.hasDimensions ? (
+
+ No dimensional drill-down is available for this row.
+
+ ) : dimensionRows.length === 0 ? (
+
+ No dimensional facts were returned for the selected
+ row.
+
+ ) : (
+
+
+
+
+ Period
+ Axis
+ Member
+ Value
+
+
+
+ {dimensionRows.map((row, index) => (
+
+
+ {visiblePeriods.find(
+ (period) => period.id === row.periodId,
+ )?.periodLabel ?? row.periodId}
+
+ {row.axis}
+ {row.member}
+
+ {formatMetricValue({
+ value: row.value,
+ unit: isTaxonomyRow(selectedRow)
+ ? "currency"
+ : selectedRow.unit,
+ scale: valueScale,
+ rowKey: selectedRow.key,
+ surfaceKind,
+ })}
+
+
+ ))}
+
+
+
+ )}
+
+ )}
+
)}
+
- {isDerivedRow(selectedRow) ? (
-
-
- Source Row Keys
-
-
- {(selectedRow.sourceRowKeys ?? []).join(", ") || "n/a"}
-
-
- Source Concepts
-
-
- {(selectedRow.sourceConcepts ?? []).join(", ") || "n/a"}
-
-
- Source Fact IDs
-
-
- {(selectedRow.sourceFactIds ?? []).join(", ") || "n/a"}
-
+ {(surfaceKind === "income_statement" ||
+ surfaceKind === "balance_sheet" ||
+ surfaceKind === "cash_flow_statement") && (
+
+
+
+
+ Overall status:{" "}
+ {financials.metrics.validation?.status ?? "not_run"}
+
- ) : null}
-
- {!selectedRow ||
- !("hasDimensions" in selectedRow) ||
- !selectedRow.hasDimensions ? (
-
- No dimensional drill-down is available for this row.
-
- ) : dimensionRows.length === 0 ? (
-
- No dimensional facts were returned for the selected row.
-
- ) : (
-
-
-
-
- Period
- Axis
- Member
- Value
-
-
-
- {dimensionRows.map((row, index) => (
-
-
- {periods.find(
- (period) => period.id === row.periodId,
- )?.periodLabel ?? row.periodId}
-
- {row.axis}
- {row.member}
-
- {formatMetricValue({
- value: row.value,
- unit: isTaxonomyRow(selectedRow)
- ? "currency"
- : selectedRow.unit,
- scale: valueScale,
- rowKey: selectedRow.key,
- surfaceKind,
- })}
-
+ {(financials.metrics.validation?.checks.length ?? 0) === 0 ? (
+
+ No validation checks available yet.
+
+ ) : (
+
+
+
+
+ Metric
+ Taxonomy
+ LLM (PDF)
+ Status
+ Pages
- ))}
-
-
-
- )}
-
- )}
-
- )}
+
+
+ {financials.metrics.validation?.checks.map((check) => (
+
+ {check.metricKey}
+
+ {formatMetricValue({
+ value: check.taxonomyValue,
+ unit: "currency",
+ scale: valueScale,
+ rowKey: check.metricKey,
+ surfaceKind,
+ })}
+
+
+ {formatMetricValue({
+ value: check.llmValue,
+ unit: "currency",
+ scale: valueScale,
+ rowKey: check.metricKey,
+ surfaceKind,
+ })}
+
+ {check.status}
+
+ {(check.evidencePages ?? []).join(", ") || "n/a"}
+
+
+ ))}
+
+
+
+ )}
+
+ )}
- {(surfaceKind === "income_statement" ||
- surfaceKind === "balance_sheet" ||
- surfaceKind === "cash_flow_statement") &&
- financials ? (
-
-
-
-
- Overall status:{" "}
- {financials.metrics.validation?.status ?? "not_run"}
-
+ {isTreeStatementMode ? (
+
+
+
+ ) : null}
- {(financials.metrics.validation?.checks.length ?? 0) === 0 ? (
-
- No validation checks available yet.
-
- ) : (
-
-
-
-
- Metric
- Taxonomy
- LLM (PDF)
- Status
- Pages
-
-
-
- {financials.metrics.validation?.checks.map((check) => (
-
- {check.metricKey}
-
- {formatMetricValue({
- value: check.taxonomyValue,
- unit: "currency",
- scale: valueScale,
- rowKey: check.metricKey,
- surfaceKind,
- })}
-
-
- {formatMetricValue({
- value: check.llmValue,
- unit: "currency",
- scale: valueScale,
- rowKey: check.metricKey,
- surfaceKind,
- })}
-
- {check.status}
- {(check.evidencePages ?? []).join(", ") || "n/a"}
-
- ))}
-
-
-
- )}
-
- ) : null}
-
- {financials && isTreeStatementMode ? (
-
+
) : null}
);
diff --git a/app/globals.css b/app/globals.css
index 7ba5479..96c00e1 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -1,25 +1,23 @@
@import "tailwindcss";
:root {
- --font-display:
- "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
- --font-mono:
- "Menlo", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
- --bg-0: #121417;
- --bg-1: #181b20;
- --bg-2: #21252b;
- --panel: rgba(28, 31, 36, 0.84);
- --panel-soft: rgba(36, 39, 45, 0.72);
- --panel-bright: rgba(49, 53, 60, 0.94);
- --line-weak: rgba(196, 202, 211, 0.18);
- --line-strong: rgba(220, 226, 234, 0.34);
- --accent: #d9dee5;
- --accent-strong: #f4f7fb;
- --danger: #ff8e8e;
- --danger-soft: rgba(111, 46, 46, 0.42);
- --terminal-bright: #f3f5f7;
- --terminal-muted: #a1a9b3;
- --focus-ring: rgba(229, 231, 235, 0.14);
+ --font-display: system-ui, -apple-system, sans-serif;
+ --font-mono: "SF Mono", "Fira Code", monospace;
+ --bg-0: #0f0f0f;
+ --bg-1: #161616;
+ --bg-2: #1c1c1c;
+ --panel: #1a1a1a;
+ --panel-soft: #222222;
+ --panel-bright: #2a2a2a;
+ --line-weak: rgba(255, 255, 255, 0.08);
+ --line-strong: rgba(255, 255, 255, 0.16);
+ --accent: #e0e0e0;
+ --accent-strong: #ffffff;
+ --danger: #ff6b6b;
+ --danger-soft: rgba(255, 107, 107, 0.15);
+ --terminal-bright: #f0f0f0;
+ --terminal-muted: #888888;
+ --focus-ring: rgba(255, 255, 255, 0.1);
}
* {
@@ -58,18 +56,7 @@ body {
overflow-x: hidden;
font-family: var(--font-display), sans-serif;
color: var(--terminal-bright);
- background:
- radial-gradient(
- circle at 18% -10%,
- rgba(170, 178, 188, 0.16),
- transparent 35%
- ),
- radial-gradient(
- circle at 84% 0%,
- rgba(121, 128, 138, 0.14),
- transparent 30%
- ),
- linear-gradient(140deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
+ background: var(--bg-0);
}
.app-surface,
@@ -79,36 +66,12 @@ body {
overflow: hidden;
}
-.ambient-grid {
- position: absolute;
- inset: 0;
- background-image:
- linear-gradient(rgba(204, 210, 218, 0.06) 1px, transparent 1px),
- linear-gradient(90deg, rgba(204, 210, 218, 0.05) 1px, transparent 1px);
- background-size: 34px 34px;
- mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
- pointer-events: none;
-}
-
-.noise-layer {
- position: absolute;
- inset: 0;
- pointer-events: none;
- opacity: 0.24;
- background-image: radial-gradient(
- rgba(220, 226, 234, 0.1) 0.7px,
- transparent 0.7px
- );
- background-size: 4px 4px;
-}
-
.terminal-caption {
font-family: var(--font-mono), monospace;
}
.panel-heading {
font-family: var(--font-mono), monospace;
- letter-spacing: 0.08em;
}
a,
@@ -126,23 +89,15 @@ textarea {
.data-surface {
border: 1px solid var(--line-weak);
- border-radius: 1rem;
- background: linear-gradient(
- 180deg,
- rgba(40, 43, 49, 0.92),
- rgba(24, 27, 32, 0.78)
- );
+ border-radius: 0.5rem;
+ background: var(--panel);
}
.data-table-wrap {
overflow-x: auto;
border: 1px solid var(--line-weak);
- border-radius: 1rem;
- background: linear-gradient(
- 180deg,
- rgba(34, 37, 42, 0.9),
- rgba(20, 23, 27, 0.76)
- );
+ border-radius: 0.5rem;
+ background: var(--panel);
}
.data-table th,
@@ -163,54 +118,31 @@ textarea {
}
.data-table tbody tr:hover {
- background-color: rgba(63, 68, 76, 0.32);
-}
-
-@media (prefers-reduced-motion: no-preference) {
- .ambient-grid {
- animation: subtle-grid-shift 18s linear infinite;
- }
-
- @keyframes subtle-grid-shift {
- 0% {
- transform: translateY(0px);
- }
- 50% {
- transform: translateY(-8px);
- }
- 100% {
- transform: translateY(0px);
- }
- }
-}
-
-@media (max-width: 1024px) {
- .ambient-grid {
- background-size: 26px 26px;
- }
+ background-color: rgba(255, 255, 255, 0.04);
}
@media (max-width: 640px) {
- body {
- background:
- radial-gradient(
- circle at 24% -4%,
- rgba(170, 178, 188, 0.14),
- transparent 36%
- ),
- radial-gradient(
- circle at 82% 2%,
- rgba(121, 128, 138, 0.12),
- transparent 30%
- ),
- linear-gradient(155deg, var(--bg-0), var(--bg-1) 54%, var(--bg-2));
- }
-
.data-table th,
.data-table td {
padding: 0.65rem 0.55rem;
font-size: 0.8125rem;
}
+
+ .financial-matrix-metric-col {
+ width: 18rem;
+ }
+
+ .financial-matrix-period-col {
+ width: 8rem;
+ }
+
+ .financial-matrix-header,
+ .financial-matrix-section-cell,
+ .financial-matrix-sticky-cell,
+ .financial-matrix-value-cell {
+ padding-left: 0.65rem;
+ padding-right: 0.65rem;
+ }
}
.panel-compact {
@@ -244,7 +176,87 @@ textarea {
}
.data-table-dense tbody tr:hover {
- background-color: rgba(63, 68, 76, 0.32);
+ background-color: rgba(255, 255, 255, 0.04);
+}
+
+.financials-table tbody tr:hover {
+ background-color: transparent;
+}
+
+.financial-matrix-wrap {
+ overflow: auto;
+ border: 1px solid var(--line-weak);
+ border-radius: 0.75rem;
+ background: var(--panel);
+}
+
+.financial-matrix {
+ width: max-content;
+ min-width: 100%;
+ border-collapse: separate;
+ border-spacing: 0;
+ table-layout: fixed;
+}
+
+.financial-matrix-metric-col {
+ width: 24rem;
+}
+
+.financial-matrix-period-col {
+ width: 9rem;
+}
+
+.financial-matrix-header {
+ position: sticky;
+ top: 0;
+ z-index: 10;
+ padding: 0.85rem 0.9rem;
+ border-bottom: 1px solid var(--line-strong);
+ background: color-mix(in srgb, var(--panel) 92%, black 8%);
+ text-align: right;
+ white-space: nowrap;
+ font-family: var(--font-mono), monospace;
+}
+
+.financial-matrix-section-row td {
+ border-bottom: 1px solid var(--line-strong);
+}
+
+.financial-matrix-section-cell {
+ padding: 0.7rem 0.9rem;
+ background: rgba(255, 255, 255, 0.04);
+ font-size: 0.75rem;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--terminal-muted);
+}
+
+.financial-matrix-row-detail td {
+ background: rgba(255, 255, 255, 0.015);
+}
+
+.financial-matrix-sticky-cell,
+.financial-matrix-value-cell {
+ padding: 0.45rem 0.9rem;
+ border-bottom: 1px solid var(--line-weak);
+ white-space: nowrap;
+ vertical-align: top;
+}
+
+.financial-matrix-sticky-cell {
+ border-right: 1px solid var(--line-weak);
+ background: var(--panel);
+}
+
+.financial-matrix-sticky-cell-detail {
+ background: color-mix(in srgb, var(--panel) 92%, white 8%);
+}
+
+.financial-matrix-value-cell {
+ text-align: right;
+ font-variant-numeric: tabular-nums;
+ color: var(--terminal-bright);
}
.metric-compact {
@@ -382,12 +394,8 @@ textarea {
.screener-table-wrap {
overflow-x: auto;
border: 1px solid var(--line-weak);
- border-radius: 0.75rem;
- background: linear-gradient(
- 180deg,
- rgba(34, 37, 42, 0.9),
- rgba(20, 23, 27, 0.76)
- );
+ border-radius: 0.5rem;
+ background: var(--panel);
}
.screener-table-wrap thead {
diff --git a/components/dashboard/metric-card.tsx b/components/dashboard/metric-card.tsx
index 220a475..afa1eec 100644
--- a/components/dashboard/metric-card.tsx
+++ b/components/dashboard/metric-card.tsx
@@ -41,7 +41,7 @@ export function MetricCard({
className,
)}
>
-
+
{label}
@@ -68,10 +68,8 @@ export function MetricCard({
className,
)}
>
-
- {label}
-
-
+
{label}
+
{value}
{delta ? (
diff --git a/components/financials/control-bar.tsx b/components/financials/control-bar.tsx
index b5cbbd0..f6a309d 100644
--- a/components/financials/control-bar.tsx
+++ b/components/financials/control-bar.tsx
@@ -1,7 +1,7 @@
-import { Button } from '@/components/ui/button';
-import { cn } from '@/lib/utils';
+import { Button } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
-type ControlButtonVariant = 'primary' | 'ghost' | 'secondary' | 'danger';
+type ControlButtonVariant = "primary" | "ghost" | "secondary" | "danger";
export type FinancialControlOption = {
value: string;
@@ -34,19 +34,25 @@ type FinancialControlBarProps = {
};
export function FinancialControlBar({
- title = 'Control Bar',
+ title = "Control Bar",
subtitle,
sections,
actions,
- className
+ className,
}: FinancialControlBarProps) {
return (
-
+
-
{title}
+
+ {title}
+
{subtitle ? (
-
{subtitle}
+
+ {subtitle}
+
) : null}
@@ -56,7 +62,7 @@ export function FinancialControlBar({
{sections.map((section) => (
-
-
{section.label}
+
+
+ {section.label}
+
{section.options.map((option) => (
section.onChange(option.value)}
diff --git a/components/financials/financials-toolbar.tsx b/components/financials/financials-toolbar.tsx
index 1429291..3cb6a6a 100644
--- a/components/financials/financials-toolbar.tsx
+++ b/components/financials/financials-toolbar.tsx
@@ -91,12 +91,14 @@ function FinancialsToolbarComponent({
const groupedSections = useMemo(() => {
const statementKeys = ["surface"];
const periodKeys = ["cadence"];
+ const historyKeys = ["history"];
const modeKeys = ["display"];
const scaleKeys = ["scale"];
return {
statement: sections.filter((s) => statementKeys.includes(s.key)),
period: sections.filter((s) => periodKeys.includes(s.key)),
+ history: sections.filter((s) => historyKeys.includes(s.key)),
mode: sections.filter((s) => modeKeys.includes(s.key)),
scale: sections.filter((s) => scaleKeys.includes(s.key)),
};
@@ -147,6 +149,29 @@ function FinancialsToolbarComponent({
))}
+ {groupedSections.history.length > 0 && (
+
+ {groupedSections.history.map((section) => (
+
+ {section.options.map((option) => {
+ const isActive = section.value === option.value;
+ return (
+ section.onChange(option.value)}
+ className="text-xs"
+ >
+ {option.label}
+
+ );
+ })}
+
+ ))}
+
+ )}
+
{groupedSections.mode.length > 0 && (
{groupedSections.mode.map((section) => (
diff --git a/components/financials/normalization-summary.tsx b/components/financials/normalization-summary.tsx
index f7af55e..377d732 100644
--- a/components/financials/normalization-summary.tsx
+++ b/components/financials/normalization-summary.tsx
@@ -6,6 +6,8 @@ import { cn } from "@/lib/utils";
type NormalizationSummaryProps = {
normalization: NormalizationMetadata;
+ showHeader?: boolean;
+ className?: string;
};
function SummaryField(props: {
@@ -20,7 +22,7 @@ function SummaryField(props: {
props.tone === "warning" && "border-l-2 border-[#7f6250] pl-3",
)}
>
-
+
{props.label}
0;
const hasWarnings = normalization.warnings.length > 0;
return (
-
-
+
+ {showHeader ? (
+
+ ) : null}
-
+
Parser Warnings
diff --git a/components/financials/statement-matrix.tsx b/components/financials/statement-matrix.tsx
index 0620899..83ff40f 100644
--- a/components/financials/statement-matrix.tsx
+++ b/components/financials/statement-matrix.tsx
@@ -1,15 +1,18 @@
-'use client';
+"use client";
-import { Fragment, memo, useMemo, useRef } from 'react';
-import { useVirtualizer } from '@tanstack/react-virtual';
-import { ChevronDown, ChevronRight } from 'lucide-react';
-import type { FinancialStatementPeriod, SurfaceFinancialRow, DetailFinancialRow } from '@/lib/types';
-import { cn } from '@/lib/utils';
+import { Fragment } from "react";
+import { ChevronDown, ChevronRight } from "lucide-react";
+import type {
+ DetailFinancialRow,
+ FinancialStatementPeriod,
+ SurfaceFinancialRow,
+} from "@/lib/types";
+import { cn } from "@/lib/utils";
import type {
StatementInspectorSelection,
StatementTreeNode,
- StatementTreeSection
-} from '@/lib/financials/statement-view-model';
+ StatementTreeSection,
+} from "@/lib/financials/statement-view-model";
type MatrixRow = SurfaceFinancialRow | DetailFinancialRow;
@@ -19,172 +22,183 @@ type StatementMatrixProps = {
selectedRowRef: StatementInspectorSelection | null;
onToggleRow: (key: string) => void;
onSelectRow: (selection: StatementInspectorSelection) => void;
- renderCellValue: (row: MatrixRow, periodId: string, previousPeriodId: string | null) => string;
+ renderCellValue: (
+ row: MatrixRow,
+ periodId: string,
+ previousPeriodId: string | null,
+ ) => string;
periodLabelFormatter: (value: string) => string;
dense?: boolean;
- virtualized?: boolean;
};
-function isSurfaceNode(node: StatementTreeNode): node is Extract
{
- return node.kind === 'surface';
-}
-
-function rowSelected(
+function isSurfaceNode(
node: StatementTreeNode,
- selectedRowRef: StatementInspectorSelection | null
-) {
- if (!selectedRowRef) {
- return false;
- }
-
- if (node.kind === 'surface') {
- return selectedRowRef.kind === 'surface' && selectedRowRef.key === node.row.key;
- }
-
- return selectedRowRef.kind === 'detail'
- && selectedRowRef.key === node.row.key
- && selectedRowRef.parentKey === node.parentSurfaceKey;
+): node is Extract {
+ return node.kind === "surface";
}
-function surfaceBadges(node: Extract) {
- const badges: Array<{ label: string; tone: 'default' | 'warning' | 'muted' }> = [];
+function surfaceBadges(node: Extract) {
+ const badges: Array<{
+ label: string;
+ tone: "default" | "warning" | "muted";
+ }> = [];
- if (node.row.resolutionMethod === 'formula_derived') {
- badges.push({ label: 'Formula', tone: node.row.confidence === 'low' ? 'warning' : 'default' });
+ if (node.row.resolutionMethod === "formula_derived") {
+ badges.push({
+ label: "Formula",
+ tone: node.row.confidence === "low" ? "warning" : "default",
+ });
}
- if (node.row.resolutionMethod === 'not_meaningful') {
- badges.push({ label: 'N/M', tone: 'muted' });
+ if (node.row.resolutionMethod === "not_meaningful") {
+ badges.push({ label: "N/M", tone: "muted" });
}
- if (node.row.confidence === 'low') {
- badges.push({ label: 'Low confidence', tone: 'warning' });
+ if (node.row.confidence === "low") {
+ badges.push({ label: "Low confidence", tone: "warning" });
}
const detailCount = node.row.detailCount ?? node.directDetailCount;
if (detailCount > 0) {
- badges.push({ label: `${detailCount} details`, tone: 'default' });
+ badges.push({ label: `${detailCount} details`, tone: "default" });
}
return badges;
}
-function badgeClass(tone: 'default' | 'warning' | 'muted', dense?: boolean) {
+function badgeClass(tone: "default" | "warning" | "muted", dense?: boolean) {
const baseClasses = dense
- ? 'rounded border px-1 py-0.5 text-[9px] uppercase tracking-[0.12em]'
- : 'rounded-full border px-2 py-0.5 text-[10px] uppercase tracking-[0.14em]';
+ ? "rounded border px-1 py-0.5 text-[9px]"
+ : "rounded border px-2 py-0.5 text-[10px]";
- if (tone === 'warning') {
- return cn(baseClasses, 'border-[#84614f] bg-[rgba(112,76,54,0.22)] text-[#ffd7bf]');
+ if (tone === "warning") {
+ return cn(
+ baseClasses,
+ "border-[#84614f] bg-[rgba(112,76,54,0.22)] text-[#ffd7bf]",
+ );
}
- if (tone === 'muted') {
- return cn(baseClasses, 'border-[color:var(--line-weak)] bg-[rgba(80,85,92,0.16)] text-[color:var(--terminal-muted)]');
+ if (tone === "muted") {
+ return cn(
+ baseClasses,
+ "border-[color:var(--line-weak)] bg-[rgba(80,85,92,0.16)] text-[color:var(--terminal-muted)]",
+ );
}
- return cn(baseClasses, 'border-[color:var(--line-weak)] bg-[rgba(88,102,122,0.16)] text-[color:var(--terminal-bright)]');
+ return cn(
+ baseClasses,
+ "border-[color:var(--line-weak)] bg-[rgba(88,102,122,0.16)] text-[color:var(--terminal-bright)]",
+ );
}
-// Flatten tree nodes for virtualization
-type FlattenedNode = {
- node: StatementTreeNode;
- sectionKey: string;
- sectionLabel?: string;
- isSectionHeader?: boolean;
-};
-
-function flattenSections(sections: StatementTreeSection[]): FlattenedNode[] {
- const result: FlattenedNode[] = [];
-
- function flattenNodes(nodes: StatementTreeNode[], sectionKey: string): void {
- for (const node of nodes) {
- result.push({ node, sectionKey });
-
- if (node.kind === 'surface' && node.expanded && node.children.length > 0) {
- flattenNodes(node.children, sectionKey);
- }
- }
- }
-
- for (const section of sections) {
- if (section.label) {
- result.push({
- node: {} as StatementTreeNode,
- sectionKey: section.key,
- sectionLabel: section.label,
- isSectionHeader: true
- });
- }
- flattenNodes(section.nodes, section.key);
- }
-
- return result;
-}
-
-function renderNodes(props: StatementMatrixProps & { nodes: StatementTreeNode[]; dense?: boolean }) {
+function renderNodes(
+ props: StatementMatrixProps & { nodes: StatementTreeNode[]; dense?: boolean },
+) {
const { dense = false } = props;
- const buttonSize = dense ? 'size-7' : 'size-11';
- const buttonClass = dense ? 'rounded' : 'rounded-lg';
- const labelSize = dense ? 'text-[13px]' : 'text-sm';
- const detailLabelSize = dense ? 'text-xs' : 'text-[13px]';
- const paddingY = dense ? 'py-1.5' : 'py-2';
- const gapClass = dense ? 'gap-1' : 'gap-2';
+ const buttonSize = dense ? "size-6" : "size-8";
+ const buttonClass = dense ? "rounded" : "rounded-lg";
+ const labelSize = dense ? "text-[13px]" : "text-sm";
+ const detailLabelSize = dense ? "text-[11px]" : "text-xs";
+ const paddingY = dense ? "py-1.5" : "py-2";
+ const gapClass = dense ? "gap-1.5" : "gap-2";
return props.nodes.map((node) => {
- const isSelected = rowSelected(node, props.selectedRowRef);
- const labelIndent = node.kind === 'detail' ? node.level * 16 + 16 : node.level * 16;
+ const labelIndent =
+ node.kind === "detail" ? node.level * 16 + 16 : node.level * 16;
const canToggle = isSurfaceNode(node) && node.expandable;
- const nextSelection: StatementInspectorSelection = node.kind === 'surface'
- ? { kind: 'surface', key: node.row.key }
- : { kind: 'detail', key: node.row.key, parentKey: node.parentSurfaceKey };
+ const nextSelection: StatementInspectorSelection =
+ node.kind === "surface"
+ ? { kind: "surface", key: node.row.key }
+ : {
+ kind: "detail",
+ key: node.row.key,
+ parentKey: node.parentSurfaceKey,
+ };
+ const rowClass = cn(
+ "financial-matrix-row",
+ node.kind === "detail" && "financial-matrix-row-detail",
+ );
+ const stickyCellClass = cn(
+ "financial-matrix-sticky-cell",
+ node.kind === "detail" && "financial-matrix-sticky-cell-detail",
+ );
return (
-
-
-
+
+
+
{canToggle ? (
{
event.stopPropagation();
props.onToggleRow(node.row.key);
}}
>
- {node.expanded ? : }
+ {node.expanded ? (
+
+ ) : (
+
+ )}
) : (
-
- {node.kind === 'detail' ? '·' : ''}
+
+ {node.kind === "detail" ? "·" : ""}
)}
props.onSelectRow(nextSelection)}
>
- 0 && 'text-[color:var(--terminal-soft)]'
- )}>
+ 0 &&
+ "text-[color:var(--accent)]",
+ )}
+ title={node.row.label}
+ >
{node.row.label}
- {node.kind === 'detail' ? (
-
+ {node.kind === "detail" ? (
+
{node.row.localName}
- {node.row.residualFlag ? ' · residual' : ''}
+ {node.row.residualFlag ? " · residual" : ""}
- ) : (
+ ) : surfaceBadges(node).length > 0 ? (
{surfaceBadges(node).map((badge) => (
))}
- )}
+ ) : null}
{props.periods.map((period, index) => (
-
- {props.renderCellValue(node.row, period.id, index > 0 ? props.periods[index - 1]?.id ?? null : null)}
+
+ {props.renderCellValue(
+ node.row,
+ period.id,
+ index > 0 ? (props.periods[index - 1]?.id ?? null) : null,
+ )}
))}
{isSurfaceNode(node) && node.expanded ? (
<>
- Expanded children for {node.row.label}
+
+ Expanded children for {node.row.label}
+
{renderNodes({
...props,
nodes: node.children,
- dense
+ dense,
})}
>
) : null}
@@ -222,193 +248,73 @@ function renderNodes(props: StatementMatrixProps & { nodes: StatementTreeNode[];
});
}
-export function StatementMatrix(props: StatementMatrixProps) {
- const { dense = false, virtualized = false } = props;
- const tableClass = dense ? 'data-table-dense min-w-[960px]' : 'data-table min-w-[1040px]';
-
- // Hooks must be called unconditionally
- const parentRef = useRef
(null);
- const flatRows = useMemo(() => flattenSections(props.sections), [props.sections]);
-
- const virtualizer = useVirtualizer({
- count: flatRows.length,
- getScrollElement: () => parentRef.current,
- estimateSize: (index) => {
- const item = flatRows[index];
- if (item.isSectionHeader) return dense ? 32 : 40;
- if (item.node.kind === 'surface' && surfaceBadges(item.node as any).length > 0) return dense ? 44 : 56;
- return dense ? 36 : 48;
- },
- overscan: 10,
- });
-
- // Non-virtualized version (original implementation with dense support)
- if (!virtualized) {
- return (
-
-
-
-
- Metric
- {props.periods.map((period) => (
-
-
- {props.periodLabelFormatter(period.periodEnd ?? period.filingDate)}
- {period.filingType} · {period.periodLabel}
-
-
- ))}
-
-
-
- {props.sections.map((section) => (
-
- {section.label ? (
-
-
- {section.label}
-
-
- ) : null}
- {renderNodes({
- ...props,
- nodes: section.nodes,
- dense
- })}
-
- ))}
-
-
-
- );
- }
-
- // Virtualized version for large datasets
-
+export function StatementMatrix({
+ periods,
+ sections,
+ selectedRowRef,
+ onToggleRow,
+ onSelectRow,
+ renderCellValue,
+ periodLabelFormatter,
+ dense = false,
+}: StatementMatrixProps) {
return (
-
-
-
+
+
+
+
+ {periods.map((period) => (
+
+ ))}
+
+
- Metric
- {props.periods.map((period) => (
-
+ Metric
+ {periods.map((period) => (
+
- {props.periodLabelFormatter(period.periodEnd ?? period.filingDate)}
- {period.filingType} · {period.periodLabel}
+
+ {periodLabelFormatter(
+ period.periodEnd ?? period.filingDate,
+ )}
+
+
+ {period.filingType} · {period.periodLabel}
+
))}
-
- {virtualizer.getVirtualItems().map((virtualRow) => {
- const item = flatRows[virtualRow.index];
-
- if (item.isSectionHeader) {
- return (
-
-
- {item.sectionLabel}
+
+ {sections.map((section) => (
+
+ {section.label ? (
+
+
+ {section.label}
- );
- }
-
- const node = item.node;
- const isSelected = rowSelected(node, props.selectedRowRef);
- const labelIndent = node.kind === 'detail' ? node.level * 16 + 16 : node.level * 16;
- const canToggle = isSurfaceNode(node) && node.expandable;
- const nextSelection: StatementInspectorSelection = node.kind === 'surface'
- ? { kind: 'surface', key: node.row.key }
- : { kind: 'detail', key: node.row.key, parentKey: node.parentSurfaceKey };
-
- const buttonSize = dense ? 'size-7' : 'size-11';
- const buttonClass = dense ? 'rounded' : 'rounded-lg';
- const labelSize = dense ? 'text-[13px]' : 'text-sm';
- const detailLabelSize = dense ? 'text-xs' : 'text-[13px]';
- const paddingY = dense ? 'py-1.5' : 'py-2';
- const gapClass = dense ? 'gap-1' : 'gap-2';
-
- return (
-
-
-
- {canToggle ? (
-
{
- event.stopPropagation();
- props.onToggleRow(node.row.key);
- }}
- >
- {node.expanded ? : }
-
- ) : (
-
- {node.kind === 'detail' ? '·' : ''}
-
- )}
-
props.onSelectRow(nextSelection)}
- >
- 0 && 'text-[color:var(--terminal-soft)]'
- )}>
- {node.row.label}
-
- {node.kind === 'detail' ? (
-
- {node.row.localName}
- {node.row.residualFlag ? ' · residual' : ''}
-
- ) : (
-
- {surfaceBadges(node as any).map((badge) => (
-
- {badge.label}
-
- ))}
-
- )}
-
-
-
- {props.periods.map((period, index) => (
-
- {props.renderCellValue(node.row, period.id, index > 0 ? props.periods[index - 1]?.id ?? null : null)}
-
- ))}
-
- );
- })}
+ ) : null}
+ {renderNodes({
+ periods,
+ sections,
+ selectedRowRef,
+ onToggleRow,
+ onSelectRow,
+ renderCellValue,
+ periodLabelFormatter,
+ dense,
+ nodes: section.nodes,
+ })}
+
+ ))}
diff --git a/components/financials/statement-row-inspector.tsx b/components/financials/statement-row-inspector.tsx
index db8075a..05c00cf 100644
--- a/components/financials/statement-row-inspector.tsx
+++ b/components/financials/statement-row-inspector.tsx
@@ -1,5 +1,6 @@
"use client";
+import { cn } from "@/lib/utils";
import type {
DetailFinancialRow,
DimensionBreakdownRow,
@@ -27,12 +28,14 @@ type StatementRowInspectorProps = {
rowKey: string,
unit: SurfaceFinancialRow["unit"],
) => string;
+ showHeader?: boolean;
+ className?: string;
};
function InspectorField(props: { label: string; value: string }) {
return (
-
+
{props.label}
@@ -57,16 +60,25 @@ export function StatementRowInspector(props: StatementRowInspectorProps) {
: null;
return (
-
-
+
+ {props.showHeader === false ? null : (
+
+ )}
{!selection ? (
@@ -132,7 +144,7 @@ export function StatementRowInspector(props: StatementRowInspectorProps) {
{selection.detailRows.length > 0 ? (
-
+
Raw Detail Labels
diff --git a/components/shell/app-shell.tsx b/components/shell/app-shell.tsx
index 1608380..29f9520 100644
--- a/components/shell/app-shell.tsx
+++ b/components/shell/app-shell.tsx
@@ -518,8 +518,6 @@ export function AppShell({
return (
-
-
{!isSidebarCollapsed ? (
-
- Fiscal Clone
-
-
+
Neon Desk
-
- Financial intelligence cockpit with durable AI workflows.
-
) : null}
@@ -586,7 +578,7 @@ export function AppShell({
aria-hidden="true"
/>
) : (
-
+
{GROUP_LABELS[group]}
)}
@@ -603,12 +595,12 @@ export function AppShell({
onFocus={() => prefetchForHref(item.href)}
title={item.label}
className={cn(
- "flex items-center rounded-xl border border-transparent text-sm transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--line-strong)] focus-visible:ring-offset-2 focus-visible:ring-offset-transparent",
+ "flex items-center rounded-lg border border-transparent text-sm transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--line-strong)] focus-visible:ring-offset-2 focus-visible:ring-offset-transparent",
isSidebarCollapsed
? "justify-center px-0 py-2.5"
: "gap-3 px-2.5 py-1.5",
item.active
- ? "border-[color:var(--line-strong)] bg-[color:var(--panel-bright)] text-[color:var(--terminal-bright)] shadow-[inset_2px_0_0_var(--accent)]"
+ ? "border-[color:var(--line-strong)] bg-[color:var(--panel-bright)] text-[color:var(--terminal-bright)]"
: "text-[color:var(--terminal-muted)] hover:border-[color:var(--line-weak)] hover:bg-[color:var(--panel-soft)] hover:text-[color:var(--terminal-bright)]",
)}
>
@@ -633,22 +625,15 @@ export function AppShell({
{isSigningOut ? "Signing out..." : "Sign out"}
-
-
- Runtime
-
-
+
+
{displayName}
{role ? (
-
- Role: {role}
+
+ {role}
) : null}
-
- AI and market data are driven by environment configuration and
- live API tasks.
-
>
) : null}
@@ -675,10 +660,7 @@ export function AppShell({
-
- Live System
-
-
+
{title}
{subtitle ? (
@@ -748,7 +730,7 @@ export function AppShell({
event.stopPropagation()}
>
-
+
More destinations
diff --git a/components/ui/button.tsx b/components/ui/button.tsx
index 31c6d55..4e68adb 100644
--- a/components/ui/button.tsx
+++ b/components/ui/button.tsx
@@ -33,7 +33,7 @@ export function Button({
return (
= {
- queued: 'border-[#525861] bg-[#262a30] text-[#c0c7d0]',
- running: 'border-[#686e77] bg-[#2d3137] text-[#d8dde4]',
- completed: 'border-[#7b828c] bg-[#353a42] text-[#eef2f6]',
- failed: 'border-[#8f3d3d] bg-[#431616] text-[#ff9c9c]'
+ queued: "border-[#525861] bg-[#262a30] text-[#c0c7d0]",
+ running: "border-[#686e77] bg-[#2d3137] text-[#d8dde4]",
+ completed: "border-[#7b828c] bg-[#353a42] text-[#eef2f6]",
+ failed: "border-[#8f3d3d] bg-[#431616] text-[#ff9c9c]",
};
export function StatusPill({ status }: StatusPillProps) {
return (
-
+
{status}
);
diff --git a/doc/sqlite-vec-local-setup.md b/doc/sqlite-vec-local-setup.md
new file mode 100644
index 0000000..060e7e3
--- /dev/null
+++ b/doc/sqlite-vec-local-setup.md
@@ -0,0 +1,48 @@
+# Local `sqlite-vec` Setup
+
+Local Bun runtimes on macOS use Apple’s system SQLite by default, and that build does not support loading SQLite extensions. This repo now auto-detects Homebrew SQLite for local development and e2e boot paths so native `sqlite-vec` can load when a compatible library is available.
+
+## Automatic local setup
+
+The following entrypoints auto-detect Homebrew SQLite on macOS:
+
+- `bun run dev`
+- `bun run e2e:webserver`
+- `bun run e2e:prepare`
+
+If either of these files exists, local runtimes configure Bun to use it before any database connection is created:
+
+- `/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib`
+- `/usr/local/opt/sqlite/lib/libsqlite3.dylib`
+
+The vector extension path is resolved from the installed `sqlite-vec` package rather than a hardcoded repository path.
+
+## Install Homebrew SQLite
+
+```bash
+brew install sqlite
+```
+
+## Explicit overrides
+
+You can still override the auto-detected values explicitly:
+
+```bash
+export SQLITE_CUSTOM_LIB_PATH=/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib
+export SQLITE_VEC_EXTENSION_PATH=/absolute/path/to/vec0.dylib
+```
+
+- `SQLITE_CUSTOM_LIB_PATH` must point to the SQLite dynamic library, not the `sqlite3` executable.
+- `SQLITE_VEC_EXTENSION_PATH` must point to the loadable `sqlite-vec` extension file.
+
+Explicit env values take precedence over auto-detection.
+
+## Fallback behavior
+
+If a compatible SQLite library is not available, the app still starts and search still works:
+
+- FTS text search remains enabled
+- vector storage falls back to the table-backed implementation
+- native `sqlite-vec` acceleration is simply unavailable
+
+If explicit native paths are configured and loading still fails, startup logs keep that failure noisy so broken native configuration is visible immediately.
diff --git a/doc/taxonomy-pack-authoring.md b/doc/taxonomy-pack-authoring.md
new file mode 100644
index 0000000..858fd85
--- /dev/null
+++ b/doc/taxonomy-pack-authoring.md
@@ -0,0 +1,73 @@
+# Taxonomy Pack Authoring
+
+## Pack Catalog
+
+Active non-core fiscal packs:
+
+- `bank_lender`
+- `insurance`
+- `reit_real_estate`
+- `broker_asset_manager`
+- `agriculture`
+- `contractors_construction`
+- `contractors_federal_government`
+- `development_stage`
+- `entertainment_broadcasters`
+- `entertainment_cable_television`
+- `entertainment_casinos`
+- `entertainment_films`
+- `entertainment_music`
+- `extractive_mining`
+- `mortgage_banking`
+- `title_plant`
+- `franchisors`
+- `not_for_profit`
+- `plan_defined_benefit`
+- `plan_defined_contribution`
+- `plan_health_welfare`
+- `real_estate_general`
+- `real_estate_common_interest`
+- `real_estate_retail_land`
+- `real_estate_time_sharing`
+- `software`
+- `steamship`
+
+## Required Files
+
+Every non-core pack needs three files:
+
+- `rust/taxonomy/fiscal/v1/.surface.json`
+- `rust/taxonomy/fiscal/v1/.income-bridge.json`
+- `rust/taxonomy/fiscal/v1/kpis/.kpis.json`
+
+Pack-specific `*.computed.json` files are optional. If a pack does not define one, the runtime falls back to `core.computed.json`.
+
+## Surface Rules
+
+- Use snake_case `surface_key` values.
+- Normalize categories to the existing runtime vocabulary such as `current_assets`, `noncurrent_assets`, `current_liabilities`, `noncurrent_liabilities`, `equity`, `surface`, and `derived`.
+- Prefer canonical `us-gaap:` concept names in both `allowed_source_concepts` and `allowed_authoritative_concepts`.
+- Use `aggregate_children` plus `group_all_children` for rows expected to absorb child detail.
+- Use `direct_only` for balance-sheet totals such as `total_assets`, `total_liabilities`, and `total_equity`.
+- Keep labels in repo house style and American spelling.
+
+## Bridge Rules
+
+- Start from `core.income-bridge.json` and override only rows whose economics differ for the pack.
+- Override `revenue` for every non-core pack.
+- Only derive `gross_profit` for packs with a real cost-of-revenue pair.
+- Mark `gross_profit` as `not_meaningful` when the pack does not present a stable gross-profit concept.
+- Override `operating_expenses` only with pack-specific expense buckets.
+- Use warning codes that match the existing pattern, for example `gross_profit_not_meaningful_` or `revenue_formula_derived`.
+
+## Classifier Precedence
+
+The runtime classifier is conservative and requires a pack-unique primary concept plus secondary support. Specific overlaps are resolved in this order:
+
+- `contractors_federal_government` over `contractors_construction`
+- `mortgage_banking` over `bank_lender`
+- `title_plant` over `insurance`
+- `real_estate_time_sharing` over `real_estate_retail_land` over `real_estate_common_interest` over `real_estate_general`
+- `reit_real_estate` remains separate and should win only on lease / investment-property signatures
+
+If a filing is ambiguous after scoring, it stays on `core`.
diff --git a/docs/architecture/taxonomy.md b/docs/architecture/taxonomy.md
index c5a90d8..3a30f65 100644
--- a/docs/architecture/taxonomy.md
+++ b/docs/architecture/taxonomy.md
@@ -15,10 +15,9 @@ The taxonomy system defines all financial surfaces, computed ratios, and KPIs us
│ core.kpis.json - Sector-specific KPIs │
│ core.income-bridge.json - Income statement mapping rules │
│ │
-│ bank_lender.surface.json - Bank-specific surfaces │
-│ insurance.surface.json - Insurance-specific surfaces │
-│ reit_real_estate.surface.json - REIT-specific surfaces │
-│ broker_asset_manager.surface.json - Asset manager surfaces │
+│ *.surface.json - Core plus industry-specific packs │
+│ *.income-bridge.json - Pack-specific universal income maps │
+│ kpis/*.kpis.json - Pack KPI bundles │
└──────────────────────────┬──────────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
@@ -67,21 +66,24 @@ rust/taxonomy/fiscal/v1/
├── universal_income.surface.json
│
├── bank_lender.surface.json
-├── bank_lender.income-bridge.json
-├── bank_lender.kpis.json
-│
├── insurance.surface.json
-├── insurance.income-bridge.json
-├── insurance.kpis.json
-│
├── reit_real_estate.surface.json
-├── reit_real_estate.income-bridge.json
-├── reit_real_estate.kpis.json
-│
├── broker_asset_manager.surface.json
-├── broker_asset_manager.income-bridge.json
-├── broker_asset_manager.kpis.json
-│
+├── agriculture.surface.json
+├── contractors_construction.surface.json
+├── contractors_federal_government.surface.json
+├── development_stage.surface.json
+├── entertainment_*.surface.json
+├── extractive_mining.surface.json
+├── mortgage_banking.surface.json
+├── title_plant.surface.json
+├── franchisors.surface.json
+├── not_for_profit.surface.json
+├── plan_defined_*.surface.json
+├── plan_health_welfare.surface.json
+├── real_estate_*.surface.json
+├── software.surface.json
+├── steamship.surface.json
└── kpis/
└── *.kpis.json
@@ -104,6 +106,7 @@ lib/generated/ # Auto-generated, gitignored
## Surface Definitions
Surfaces represent canonical financial line items. Each surface maps XBRL concepts to a standardized key.
+Generated TypeScript statement catalogs are built from the deduped union of core plus unique non-core surfaces, with core definitions winning for shared universal keys.
```json
{
@@ -124,17 +127,17 @@ Surfaces represent canonical financial line items. Each surface maps XBRL concep
### Surface Fields
-| Field | Type | Description |
-|-------|------|-------------|
-| `surface_key` | string | Unique identifier (snake_case) |
-| `statement` | enum | `income`, `balance`, `cash_flow`, `equity`, `comprehensive_income` |
-| `label` | string | Human-readable label |
-| `category` | string | Grouping category |
-| `order` | number | Display order |
-| `unit` | enum | `currency`, `percent`, `ratio`, `shares`, `count` |
-| `rollup_policy` | string | How to aggregate: `direct_only`, `direct_or_formula`, `aggregate_children`, `formula_only` |
-| `allowed_source_concepts` | string[] | XBRL concepts that map to this surface |
-| `formula_fallback` | object | Optional formula when no direct mapping |
+| Field | Type | Description |
+| ------------------------- | -------- | ------------------------------------------------------------------------------------------ |
+| `surface_key` | string | Unique identifier (snake_case) |
+| `statement` | enum | `income`, `balance`, `cash_flow`, `equity`, `comprehensive_income` |
+| `label` | string | Human-readable label |
+| `category` | string | Grouping category |
+| `order` | number | Display order |
+| `unit` | enum | `currency`, `percent`, `ratio`, `shares`, `count` |
+| `rollup_policy` | string | How to aggregate: `direct_only`, `direct_or_formula`, `aggregate_children`, `formula_only` |
+| `allowed_source_concepts` | string[] | XBRL concepts that map to this surface |
+| `formula_fallback` | object | Optional formula when no direct mapping |
## Computed Definitions
@@ -143,16 +146,18 @@ Computed definitions describe ratios and derived metrics. They are split into tw
### Phase 1: Filing-Derived (Rust computes)
Ratios computable from filing data alone:
+
- **Margins**: gross_margin, operating_margin, ebitda_margin, net_margin, fcf_margin
- **Returns**: roa, roe, roic, roce
- **Financial Health**: debt_to_equity, net_debt_to_ebitda, cash_to_debt, current_ratio
- **Per-Share**: revenue_per_share, fcf_per_share, book_value_per_share
-- **Growth**: revenue_yoy, net_income_yoy, eps_yoy, fcf_yoy, *_cagr
+- **Growth**: revenue_yoy, net_income_yoy, eps_yoy, fcf_yoy, \*\_cagr
### Phase 2: Market-Derived (TypeScript computes)
Ratios requiring external price data:
-- **Valuation**: market_cap, enterprise_value, price_to_earnings, price_to_fcf, price_to_book, ev_to_*
+
+- **Valuation**: market*cap, enterprise_value, price_to_earnings, price_to_fcf, price_to_book, ev_to*\*
```json
{
@@ -186,13 +191,13 @@ Ratios requiring external price data:
### Computation Types
-| Type | Fields | Description |
-|------|--------|-------------|
-| `ratio` | numerator, denominator | Simple division |
-| `yoy_growth` | source | Year-over-year percentage change |
-| `cagr` | source, years | Compound annual growth rate |
-| `per_share` | source, shares_key | Divide by share count |
-| `simple` | formula | Custom formula expression |
+| Type | Fields | Description |
+| ------------ | ---------------------- | -------------------------------- |
+| `ratio` | numerator, denominator | Simple division |
+| `yoy_growth` | source | Year-over-year percentage change |
+| `cagr` | source, years | Compound annual growth rate |
+| `per_share` | source, shares_key | Divide by share count |
+| `simple` | formula | Custom formula expression |
## Pack Inheritance
@@ -208,6 +213,8 @@ if !matches!(pack, FiscalPack::Core) {
This ensures consistency across packs while allowing sector-specific income statements.
+Auto-classification remains conservative. Pack selection uses concept and role scoring, then falls back to `core` when the top match is weak or ambiguous.
+
## Build Pipeline
```bash
@@ -223,22 +230,24 @@ bun run build
### package.json Scripts
-| Script | Description |
-|--------|-------------|
-| `generate` | Run taxonomy generator |
-| `build:sidecar` | Build Rust binary |
-| `build` | Generate + Next.js build |
-| `lint` | Generate + TypeScript check |
+| Script | Description |
+| --------------- | --------------------------- |
+| `generate` | Run taxonomy generator |
+| `build:sidecar` | Build Rust binary |
+| `build` | Generate + Next.js build |
+| `lint` | Generate + TypeScript check |
## Validation
The generator validates:
+
1. No duplicate surface keys within the same statement
2. All ratio numerators/denominators reference existing surfaces
3. Required fields present on all definitions
4. Valid statement/unit/category values
Run validation:
+
```bash
bun run generate # Validates during generation
```
diff --git a/lib/financials/history-window.test.ts b/lib/financials/history-window.test.ts
new file mode 100644
index 0000000..7ef3b50
--- /dev/null
+++ b/lib/financials/history-window.test.ts
@@ -0,0 +1,120 @@
+import { describe, expect, it } from "vitest";
+import {
+ filterPeriodsByHistoryWindow,
+ financialHistoryLimit,
+} from "@/lib/financials/history-window";
+import type { FinancialStatementPeriod } from "@/lib/types";
+
+function createPeriod(year: number, month = 12, day = 31) {
+ const suffix = `${year}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
+
+ return {
+ id: suffix,
+ filingId: year,
+ accessionNumber: `0000-${year}`,
+ filingDate: `${year + 1}-02-01`,
+ periodStart: `${year}-01-01`,
+ periodEnd: suffix,
+ filingType: "10-K",
+ periodLabel: `FY ${year}`,
+ } satisfies FinancialStatementPeriod;
+}
+
+describe("financialHistoryLimit", () => {
+ it("scales fetch size for annual and ltm cadences", () => {
+ expect(financialHistoryLimit("annual", 3)).toBe(5);
+ expect(financialHistoryLimit("ltm", 10)).toBe(12);
+ });
+
+ it("fetches a buffered number of quarterly periods", () => {
+ expect(financialHistoryLimit("quarterly", 3)).toBe(16);
+ expect(financialHistoryLimit("quarterly", 5)).toBe(24);
+ expect(financialHistoryLimit("quarterly", 10)).toBe(44);
+ });
+});
+
+describe("filterPeriodsByHistoryWindow", () => {
+ it("keeps the latest three annual periods", () => {
+ const periods = [
+ createPeriod(2018),
+ createPeriod(2019),
+ createPeriod(2020),
+ createPeriod(2021),
+ createPeriod(2022),
+ createPeriod(2023),
+ createPeriod(2024),
+ ];
+
+ expect(
+ filterPeriodsByHistoryWindow(periods, "annual", 3).map(
+ (period) => period.id,
+ ),
+ ).toEqual(["2022-12-31", "2023-12-31", "2024-12-31"]);
+ });
+
+ it("keeps the exact trailing annual count for longer windows", () => {
+ const periods = Array.from({ length: 12 }, (_, index) =>
+ createPeriod(2013 + index),
+ );
+
+ expect(
+ filterPeriodsByHistoryWindow(periods, "annual", 10).map(
+ (period) => period.id,
+ ),
+ ).toEqual([
+ "2015-12-31",
+ "2016-12-31",
+ "2017-12-31",
+ "2018-12-31",
+ "2019-12-31",
+ "2020-12-31",
+ "2021-12-31",
+ "2022-12-31",
+ "2023-12-31",
+ "2024-12-31",
+ ]);
+ });
+
+ it("keeps the exact trailing quarterly count", () => {
+ const periods = [
+ createPeriod(2022, 3, 31),
+ createPeriod(2022, 6, 30),
+ createPeriod(2022, 9, 30),
+ createPeriod(2022, 12, 31),
+ createPeriod(2023, 3, 31),
+ createPeriod(2023, 6, 30),
+ createPeriod(2023, 9, 30),
+ createPeriod(2023, 12, 31),
+ createPeriod(2024, 3, 31),
+ createPeriod(2024, 6, 30),
+ createPeriod(2024, 9, 30),
+ createPeriod(2024, 12, 31),
+ createPeriod(2025, 3, 31),
+ ];
+
+ expect(
+ filterPeriodsByHistoryWindow(periods, "quarterly", 3).map(
+ (period) => period.id,
+ ),
+ ).toEqual([
+ "2022-06-30",
+ "2022-09-30",
+ "2022-12-31",
+ "2023-03-31",
+ "2023-06-30",
+ "2023-09-30",
+ "2023-12-31",
+ "2024-03-31",
+ "2024-06-30",
+ "2024-09-30",
+ "2024-12-31",
+ "2025-03-31",
+ ]);
+ });
+
+ it("returns all periods when the list is shorter than the requested window", () => {
+ const periods = [createPeriod(2024)];
+
+ expect(filterPeriodsByHistoryWindow(periods, "annual", 5)).toEqual(periods);
+ });
+});
diff --git a/lib/financials/history-window.ts b/lib/financials/history-window.ts
new file mode 100644
index 0000000..6a44ad3
--- /dev/null
+++ b/lib/financials/history-window.ts
@@ -0,0 +1,42 @@
+import type { FinancialCadence, FinancialStatementPeriod } from "@/lib/types";
+
+export type FinancialHistoryWindow = 3 | 5 | 10;
+
+export function financialHistoryLimit(
+ cadence: FinancialCadence,
+ window: FinancialHistoryWindow,
+) {
+ if (cadence === "quarterly") {
+ return window * 4 + 4;
+ }
+
+ return window + 2;
+}
+
+function visiblePeriodCount(
+ cadence: FinancialCadence,
+ window: FinancialHistoryWindow,
+) {
+ if (cadence === "quarterly") {
+ return window * 4;
+ }
+
+ return window;
+}
+
+export function filterPeriodsByHistoryWindow(
+ periods: FinancialStatementPeriod[],
+ cadence: FinancialCadence,
+ window: FinancialHistoryWindow,
+) {
+ if (periods.length === 0) {
+ return periods;
+ }
+
+ const count = visiblePeriodCount(cadence, window);
+ if (periods.length <= count) {
+ return periods;
+ }
+
+ return periods.slice(-count);
+}
diff --git a/lib/financials/statement-view-model.ts b/lib/financials/statement-view-model.ts
index fa882df..ce7239c 100644
--- a/lib/financials/statement-view-model.ts
+++ b/lib/financials/statement-view-model.ts
@@ -3,27 +3,123 @@ import type {
FinancialCategory,
FinancialSurfaceKind,
SurfaceDetailMap,
- SurfaceFinancialRow
-} from '@/lib/types';
+ SurfaceFinancialRow,
+} from "@/lib/types";
-const SURFACE_CHILDREN: Partial, Record>> = {
+const SURFACE_CHILDREN: Partial<
+ Record<
+ Extract<
+ FinancialSurfaceKind,
+ "income_statement" | "balance_sheet" | "cash_flow_statement"
+ >,
+ Record
+ >
+> = {
income_statement: {
operating_expenses: [
- 'selling_general_and_administrative',
- 'research_and_development',
- 'other_operating_expense'
- ]
- }
+ "selling_general_and_administrative",
+ "research_and_development",
+ "other_operating_expense",
+ ],
+ },
+ balance_sheet: {
+ total_assets: [
+ "current_assets",
+ "non_current_assets",
+ "assets_held_for_sale",
+ ],
+ current_assets: [
+ "cash_and_equivalents",
+ "short_term_investments",
+ "accounts_receivable",
+ "inventory",
+ "prepaid_expenses",
+ "other_current_assets",
+ ],
+ non_current_assets: [
+ "property_plant_equipment_net",
+ "goodwill",
+ "intangible_assets_net",
+ "long_term_investments",
+ "deferred_tax_assets",
+ "other_non_current_assets",
+ ],
+ total_liabilities: [
+ "current_liabilities",
+ "non_current_liabilities",
+ "liabilities_held_for_sale",
+ ],
+ current_liabilities: [
+ "accounts_payable",
+ "short_term_debt",
+ "current_portion_of_long_term_debt",
+ "accrued_liabilities",
+ "deferred_revenue",
+ "other_current_liabilities",
+ ],
+ non_current_liabilities: [
+ "long_term_debt",
+ "deferred_tax_liabilities",
+ "deferred_revenue_non_current",
+ "other_non_current_liabilities",
+ ],
+ total_equity: [
+ "stockholders_equity",
+ "minority_interest",
+ "total_liabilities_and_equity",
+ ],
+ stockholders_equity: [
+ "common_stock",
+ "retained_earnings",
+ "additional_paid_in_capital",
+ "treasury_stock",
+ "accumulated_other_comprehensive_income",
+ "other_stockholders_equity",
+ ],
+ },
+ cash_flow_statement: {
+ net_cash_from_operating: [
+ "operating_cash_flow_adjustments",
+ "changes_in_working_capital",
+ ],
+ operating_cash_flow_adjustments: [
+ "depreciation_and_amortization",
+ "stock_based_compensation",
+ "deferred_taxes",
+ "other_non_cash_items",
+ ],
+ changes_in_working_capital: [
+ "change_in_accounts_receivable",
+ "change_in_inventory",
+ "change_in_accounts_payable",
+ "change_in_other_working_capital",
+ ],
+ net_cash_from_investing: [
+ "capital_expenditures",
+ "acquisitions",
+ "purchases_of_investments",
+ "sales_of_investments",
+ "other_investing_activities",
+ ],
+ net_cash_from_financing: [
+ "debt_issuance",
+ "debt_repayment",
+ "stock_issuance",
+ "stock_repurchase",
+ "dividends_paid",
+ "other_financing_activities",
+ ],
+ },
};
export type StatementInspectorSelection = {
- kind: 'surface' | 'detail';
+ kind: "surface" | "detail";
key: string;
parentKey?: string;
};
export type StatementTreeDetailNode = {
- kind: 'detail';
+ kind: "detail";
id: string;
level: number;
row: DetailFinancialRow;
@@ -32,7 +128,7 @@ export type StatementTreeDetailNode = {
};
export type StatementTreeSurfaceNode = {
- kind: 'surface';
+ kind: "surface";
id: string;
level: number;
row: SurfaceFinancialRow;
@@ -45,7 +141,9 @@ export type StatementTreeSurfaceNode = {
matchesSearch: boolean;
};
-export type StatementTreeNode = StatementTreeSurfaceNode | StatementTreeDetailNode;
+export type StatementTreeNode =
+ | StatementTreeSurfaceNode
+ | StatementTreeDetailNode;
export type StatementTreeSection = {
key: string;
@@ -62,13 +160,13 @@ export type StatementTreeModel = {
export type ResolvedStatementSelection =
| {
- kind: 'surface';
+ kind: "surface";
row: SurfaceFinancialRow;
childSurfaceRows: SurfaceFinancialRow[];
detailRows: DetailFinancialRow[];
}
| {
- kind: 'detail';
+ kind: "detail";
row: DetailFinancialRow;
parentSurfaceRow: SurfaceFinancialRow | null;
};
@@ -79,11 +177,16 @@ type Categories = Array<{
count: number;
}>;
-const UNMAPPED_DETAIL_GROUP_KEY = 'unmapped';
-const UNMAPPED_SECTION_KEY = 'unmapped_residual';
-const UNMAPPED_SECTION_LABEL = 'Unmapped / Residual';
+const UNMAPPED_DETAIL_GROUP_KEY = "unmapped";
+const UNMAPPED_SECTION_KEY = "unmapped_residual";
+const UNMAPPED_SECTION_LABEL = "Unmapped / Residual";
-function surfaceConfigForKind(surfaceKind: Extract) {
+function surfaceConfigForKind(
+ surfaceKind: Extract<
+ FinancialSurfaceKind,
+ "income_statement" | "balance_sheet" | "cash_flow_statement"
+ >,
+) {
return SURFACE_CHILDREN[surfaceKind] ?? {};
}
@@ -101,9 +204,9 @@ function searchTextForSurface(row: SurfaceFinancialRow) {
row.key,
...(row.sourceConcepts ?? []),
...(row.sourceRowKeys ?? []),
- ...(row.warningCodes ?? [])
+ ...(row.warningCodes ?? []),
]
- .join(' ')
+ .join(" ")
.toLowerCase();
}
@@ -115,13 +218,16 @@ function searchTextForDetail(row: DetailFinancialRow) {
row.conceptKey,
row.qname,
row.localName,
- ...(row.dimensionsSummary ?? [])
+ ...(row.dimensionsSummary ?? []),
]
- .join(' ')
+ .join(" ")
.toLowerCase();
}
-function sortSurfaceRows(left: SurfaceFinancialRow, right: SurfaceFinancialRow) {
+function sortSurfaceRows(
+ left: SurfaceFinancialRow,
+ right: SurfaceFinancialRow,
+) {
if (left.order !== right.order) {
return left.order - right.order;
}
@@ -141,15 +247,24 @@ function buildUnmappedDetailNodes(input: {
return [...(input.statementDetails?.[UNMAPPED_DETAIL_GROUP_KEY] ?? [])]
.sort(sortDetailRows)
- .filter((detail) => normalizedSearch.length === 0 || searchTextForDetail(detail).includes(normalizedSearch))
- .map((detail) => ({
- kind: 'detail',
- id: detailNodeId(UNMAPPED_DETAIL_GROUP_KEY, detail),
- level: 0,
- row: detail,
- parentSurfaceKey: UNMAPPED_DETAIL_GROUP_KEY,
- matchesSearch: normalizedSearch.length > 0 && searchTextForDetail(detail).includes(normalizedSearch)
- }) satisfies StatementTreeDetailNode);
+ .filter(
+ (detail) =>
+ normalizedSearch.length === 0 ||
+ searchTextForDetail(detail).includes(normalizedSearch),
+ )
+ .map(
+ (detail) =>
+ ({
+ kind: "detail",
+ id: detailNodeId(UNMAPPED_DETAIL_GROUP_KEY, detail),
+ level: 0,
+ row: detail,
+ parentSurfaceKey: UNMAPPED_DETAIL_GROUP_KEY,
+ matchesSearch:
+ normalizedSearch.length > 0 &&
+ searchTextForDetail(detail).includes(normalizedSearch),
+ }) satisfies StatementTreeDetailNode,
+ );
}
function countNodes(nodes: StatementTreeNode[]) {
@@ -157,7 +272,7 @@ function countNodes(nodes: StatementTreeNode[]) {
for (const node of nodes) {
count += 1;
- if (node.kind === 'surface') {
+ if (node.kind === "surface") {
count += countNodes(node.children);
}
}
@@ -166,7 +281,10 @@ function countNodes(nodes: StatementTreeNode[]) {
}
export function buildStatementTree(input: {
- surfaceKind: Extract;
+ surfaceKind: Extract<
+ FinancialSurfaceKind,
+ "income_statement" | "balance_sheet" | "cash_flow_statement"
+ >;
rows: SurfaceFinancialRow[];
statementDetails: SurfaceDetailMap | null;
categories: Categories;
@@ -188,44 +306,70 @@ export function buildStatementTree(input: {
const normalizedSearch = normalize(input.searchQuery);
const autoExpandedKeys = new Set();
- const buildSurfaceNode = (row: SurfaceFinancialRow, level: number): StatementTreeSurfaceNode | null => {
+ const buildSurfaceNode = (
+ row: SurfaceFinancialRow,
+ level: number,
+ ): StatementTreeSurfaceNode | null => {
const childSurfaceRows = (config[row.key] ?? [])
.map((key) => rowByKey.get(key))
- .filter((candidate): candidate is SurfaceFinancialRow => Boolean(candidate))
+ .filter((candidate): candidate is SurfaceFinancialRow =>
+ Boolean(candidate),
+ )
.sort(sortSurfaceRows);
- const detailRows = [...(input.statementDetails?.[row.key] ?? [])].sort(sortDetailRows);
+ const detailRows = [...(input.statementDetails?.[row.key] ?? [])].sort(
+ sortDetailRows,
+ );
const childSurfaceNodes = childSurfaceRows
.map((childRow) => buildSurfaceNode(childRow, level + 1))
.filter((node): node is StatementTreeSurfaceNode => Boolean(node));
const detailNodes = detailRows
- .filter((detail) => normalizedSearch.length === 0 || searchTextForDetail(detail).includes(normalizedSearch))
- .map((detail) => ({
- kind: 'detail',
- id: detailNodeId(row.key, detail),
- level: level + 1,
- row: detail,
- parentSurfaceKey: row.key,
- matchesSearch: normalizedSearch.length > 0 && searchTextForDetail(detail).includes(normalizedSearch)
- }) satisfies StatementTreeDetailNode);
+ .filter(
+ (detail) =>
+ normalizedSearch.length === 0 ||
+ searchTextForDetail(detail).includes(normalizedSearch),
+ )
+ .map(
+ (detail) =>
+ ({
+ kind: "detail",
+ id: detailNodeId(row.key, detail),
+ level: level + 1,
+ row: detail,
+ parentSurfaceKey: row.key,
+ matchesSearch:
+ normalizedSearch.length > 0 &&
+ searchTextForDetail(detail).includes(normalizedSearch),
+ }) satisfies StatementTreeDetailNode,
+ );
const children = [...childSurfaceNodes, ...detailNodes];
- const matchesSearch = normalizedSearch.length > 0 && searchTextForSurface(row).includes(normalizedSearch);
- const hasMatchingDescendant = normalizedSearch.length > 0 && children.length > 0;
+ const matchesSearch =
+ normalizedSearch.length > 0 &&
+ searchTextForSurface(row).includes(normalizedSearch);
+ const hasMatchingDescendant =
+ normalizedSearch.length > 0 && children.length > 0;
- if (normalizedSearch.length > 0 && !matchesSearch && !hasMatchingDescendant) {
+ if (
+ normalizedSearch.length > 0 &&
+ !matchesSearch &&
+ !hasMatchingDescendant
+ ) {
return null;
}
const childSurfaceKeys = childSurfaceRows.map((candidate) => candidate.key);
const directDetailCount = detailRows.length;
- const autoExpanded = normalizedSearch.length > 0 && !matchesSearch && children.length > 0;
- const expanded = children.length > 0 && (input.expandedRowKeys.has(row.key) || autoExpanded);
+ const autoExpanded =
+ normalizedSearch.length > 0 && !matchesSearch && children.length > 0;
+ const expanded =
+ children.length > 0 &&
+ (input.expandedRowKeys.has(row.key) || autoExpanded);
if (autoExpanded) {
autoExpandedKeys.add(row.key);
}
return {
- kind: 'surface',
+ kind: "surface",
id: row.key,
level,
row,
@@ -235,7 +379,7 @@ export function buildStatementTree(input: {
expandable: children.length > 0,
expanded,
autoExpanded,
- matchesSearch
+ matchesSearch,
};
};
@@ -246,75 +390,101 @@ export function buildStatementTree(input: {
.filter((node): node is StatementTreeSurfaceNode => Boolean(node));
if (input.categories.length === 0) {
- const sections: StatementTreeSection[] = rootNodes.length > 0
- ? [{ key: 'ungrouped', label: null, nodes: rootNodes }]
- : [];
+ const sections: StatementTreeSection[] =
+ rootNodes.length > 0
+ ? [{ key: "ungrouped", label: null, nodes: rootNodes }]
+ : [];
const unmappedNodes = buildUnmappedDetailNodes({
statementDetails: input.statementDetails,
- searchQuery: input.searchQuery
+ searchQuery: input.searchQuery,
});
if (unmappedNodes.length > 0) {
sections.push({
key: UNMAPPED_SECTION_KEY,
label: UNMAPPED_SECTION_LABEL,
- nodes: unmappedNodes
+ nodes: unmappedNodes,
});
}
return {
sections,
autoExpandedKeys,
- visibleNodeCount: sections.reduce((sum, section) => sum + countNodes(section.nodes), 0),
- totalNodeCount: input.rows.length + Object.values(input.statementDetails ?? {}).reduce((sum, rows) => sum + rows.length, 0)
+ visibleNodeCount: sections.reduce(
+ (sum, section) => sum + countNodes(section.nodes),
+ 0,
+ ),
+ totalNodeCount:
+ input.rows.length +
+ Object.values(input.statementDetails ?? {}).reduce(
+ (sum, rows) => sum + rows.length,
+ 0,
+ ),
};
}
const sections: StatementTreeSection[] = [];
- const categoriesByKey = new Map(input.categories.map((category) => [category.key, category.label]));
+ const categoriesByKey = new Map(
+ input.categories.map((category) => [category.key, category.label]),
+ );
for (const category of input.categories) {
- const nodes = rootNodes.filter((node) => node.row.category === category.key);
+ const nodes = rootNodes.filter(
+ (node) => node.row.category === category.key,
+ );
if (nodes.length > 0) {
sections.push({
key: category.key,
label: category.label,
- nodes
+ nodes,
});
}
}
- const uncategorized = rootNodes.filter((node) => !categoriesByKey.has(node.row.category));
+ const uncategorized = rootNodes.filter(
+ (node) => !categoriesByKey.has(node.row.category),
+ );
if (uncategorized.length > 0) {
sections.push({
- key: 'uncategorized',
+ key: "uncategorized",
label: null,
- nodes: uncategorized
+ nodes: uncategorized,
});
}
const unmappedNodes = buildUnmappedDetailNodes({
statementDetails: input.statementDetails,
- searchQuery: input.searchQuery
+ searchQuery: input.searchQuery,
});
if (unmappedNodes.length > 0) {
sections.push({
key: UNMAPPED_SECTION_KEY,
label: UNMAPPED_SECTION_LABEL,
- nodes: unmappedNodes
+ nodes: unmappedNodes,
});
}
return {
sections,
autoExpandedKeys,
- visibleNodeCount: sections.reduce((sum, section) => sum + countNodes(section.nodes), 0),
- totalNodeCount: input.rows.length + Object.values(input.statementDetails ?? {}).reduce((sum, rows) => sum + rows.length, 0)
+ visibleNodeCount: sections.reduce(
+ (sum, section) => sum + countNodes(section.nodes),
+ 0,
+ ),
+ totalNodeCount:
+ input.rows.length +
+ Object.values(input.statementDetails ?? {}).reduce(
+ (sum, rows) => sum + rows.length,
+ 0,
+ ),
};
}
export function resolveStatementSelection(input: {
- surfaceKind: Extract;
+ surfaceKind: Extract<
+ FinancialSurfaceKind,
+ "income_statement" | "balance_sheet" | "cash_flow_statement"
+ >;
rows: SurfaceFinancialRow[];
statementDetails: SurfaceDetailMap | null;
selection: StatementInspectorSelection | null;
@@ -328,7 +498,7 @@ export function resolveStatementSelection(input: {
const rowByKey = new Map(input.rows.map((row) => [row.key, row]));
const config = surfaceConfigForKind(input.surfaceKind);
- if (selection.kind === 'surface') {
+ if (selection.kind === "surface") {
const row = rowByKey.get(selection.key);
if (!row) {
return null;
@@ -336,32 +506,38 @@ export function resolveStatementSelection(input: {
const childSurfaceRows = (config[row.key] ?? [])
.map((key) => rowByKey.get(key))
- .filter((candidate): candidate is SurfaceFinancialRow => Boolean(candidate))
+ .filter((candidate): candidate is SurfaceFinancialRow =>
+ Boolean(candidate),
+ )
.sort(sortSurfaceRows);
return {
- kind: 'surface',
+ kind: "surface",
row,
childSurfaceRows,
- detailRows: [...(input.statementDetails?.[row.key] ?? [])].sort(sortDetailRows)
+ detailRows: [...(input.statementDetails?.[row.key] ?? [])].sort(
+ sortDetailRows,
+ ),
};
}
const parentSurfaceKey = selection.parentKey ?? null;
- const detailRows = parentSurfaceKey === UNMAPPED_DETAIL_GROUP_KEY
- ? input.statementDetails?.[UNMAPPED_DETAIL_GROUP_KEY] ?? []
- : parentSurfaceKey
- ? input.statementDetails?.[parentSurfaceKey] ?? []
- : Object.values(input.statementDetails ?? {}).flat();
- const row = detailRows.find((candidate) => candidate.key === selection.key) ?? null;
+ const detailRows =
+ parentSurfaceKey === UNMAPPED_DETAIL_GROUP_KEY
+ ? (input.statementDetails?.[UNMAPPED_DETAIL_GROUP_KEY] ?? [])
+ : parentSurfaceKey
+ ? (input.statementDetails?.[parentSurfaceKey] ?? [])
+ : Object.values(input.statementDetails ?? {}).flat();
+ const row =
+ detailRows.find((candidate) => candidate.key === selection.key) ?? null;
if (!row) {
return null;
}
return {
- kind: 'detail',
+ kind: "detail",
row,
- parentSurfaceRow: rowByKey.get(row.parentSurfaceKey) ?? null
+ parentSurfaceRow: rowByKey.get(row.parentSurfaceKey) ?? null,
};
}
diff --git a/lib/server/db/index.ts b/lib/server/db/index.ts
index 6459da5..3a5105e 100644
--- a/lib/server/db/index.ts
+++ b/lib/server/db/index.ts
@@ -1,19 +1,19 @@
-import { mkdirSync } from 'node:fs';
-import { dirname } from 'node:path';
-import { Database } from 'bun:sqlite';
-import { drizzle } from 'drizzle-orm/bun-sqlite';
-import { load as loadSqliteVec } from 'sqlite-vec';
+import { mkdirSync } from "node:fs";
+import { dirname } from "node:path";
+import { Database } from "bun:sqlite";
+import { drizzle } from "drizzle-orm/bun-sqlite";
+import { load as loadSqliteVec } from "sqlite-vec";
import {
ensureFinancialIngestionSchemaHealthy,
- resolveFinancialSchemaRepairMode
-} from './financial-ingestion-schema';
-import { schema } from './schema';
+ resolveFinancialSchemaRepairMode,
+} from "./financial-ingestion-schema";
+import { schema } from "./schema";
import {
ensureLocalSqliteSchema,
hasColumn,
hasTable,
- TAXONOMY_SNAPSHOT_REQUIRED_COLUMNS
-} from './sqlite-schema-compat';
+ TAXONOMY_SNAPSHOT_REQUIRED_COLUMNS,
+} from "./sqlite-schema-compat";
type AppDrizzleDb = ReturnType;
@@ -25,15 +25,15 @@ declare global {
}
function getDatabasePath() {
- const raw = process.env.DATABASE_URL?.trim() || 'file:data/fiscal.sqlite';
- let databasePath = raw.startsWith('file:') ? raw.slice(5) : raw;
+ const raw = process.env.DATABASE_URL?.trim() || "file:data/fiscal.sqlite";
+ let databasePath = raw.startsWith("file:") ? raw.slice(5) : raw;
- if (databasePath.startsWith('///')) {
+ if (databasePath.startsWith("///")) {
databasePath = databasePath.slice(2);
}
if (!databasePath) {
- throw new Error('DATABASE_URL must point to a SQLite file path.');
+ throw new Error("DATABASE_URL must point to a SQLite file path.");
}
return databasePath;
@@ -48,7 +48,7 @@ function configureCustomSqliteRuntime() {
}
const customSqlitePath = process.env.SQLITE_CUSTOM_LIB_PATH?.trim();
- if (process.platform === 'darwin' && customSqlitePath) {
+ if (process.platform === "darwin" && customSqlitePath) {
Database.setCustomSQLite(customSqlitePath);
}
@@ -56,9 +56,11 @@ function configureCustomSqliteRuntime() {
}
function loadSqliteExtensions(client: Database) {
- try {
- const customVectorExtensionPath = process.env.SQLITE_VEC_EXTENSION_PATH?.trim();
+ const customVectorExtensionPath =
+ process.env.SQLITE_VEC_EXTENSION_PATH?.trim();
+ const customSqlitePath = process.env.SQLITE_CUSTOM_LIB_PATH?.trim();
+ try {
if (customVectorExtensionPath) {
client.loadExtension(customVectorExtensionPath);
} else {
@@ -69,8 +71,18 @@ function loadSqliteExtensions(client: Database) {
} catch (error) {
vectorExtensionStatus.set(client, false);
- const reason = error instanceof Error ? error.message : 'Unknown sqlite extension error';
- console.warn(`[sqlite] sqlite-vec unavailable, falling back to table-backed vector storage: ${reason}`);
+ const reason =
+ error instanceof Error ? error.message : "Unknown sqlite extension error";
+ if (customSqlitePath || customVectorExtensionPath) {
+ console.warn(
+ `[sqlite] sqlite-vec native extension load failed (SQLITE_CUSTOM_LIB_PATH=${customSqlitePath ?? "unset"}, SQLITE_VEC_EXTENSION_PATH=${customVectorExtensionPath ?? "package default"}). Falling back to table-backed vector storage: ${reason}`,
+ );
+ return;
+ }
+
+ console.warn(
+ `[sqlite] sqlite-vec unavailable, falling back to table-backed vector storage: ${reason}`,
+ );
}
}
@@ -98,18 +110,18 @@ function ensureSearchVirtualTables(client: Database) {
if (isVectorExtensionLoaded(client)) {
client.exec(`
- CREATE VIRTUAL TABLE IF NOT EXISTS \`search_chunk_vec\` USING vec0(
- \`chunk_id\` integer PRIMARY KEY,
- \`embedding\` float[256],
- \`scope\` text,
- \`user_id\` text,
- \`source_kind\` text,
- \`ticker\` text,
- \`accession_number\` text,
- \`filing_date\` text,
- +\`document_id\` integer,
- +\`chunk_index\` integer,
- +\`citation_label\` text
+ CREATE VIRTUAL TABLE IF NOT EXISTS search_chunk_vec USING vec0(
+ chunk_id integer PRIMARY KEY,
+ embedding float[256],
+ scope text,
+ user_id text,
+ source_kind text,
+ ticker text,
+ accession_number text,
+ filing_date text,
+ +document_id integer,
+ +chunk_index integer,
+ +citation_label text
);
`);
return;
@@ -130,17 +142,19 @@ function ensureSearchVirtualTables(client: Database) {
\`citation_label\` text NOT NULL
);
`);
- client.exec('CREATE INDEX IF NOT EXISTS `search_chunk_vec_lookup_idx` ON `search_chunk_vec` (`scope`, `user_id`, `source_kind`, `ticker`);');
+ client.exec(
+ "CREATE INDEX IF NOT EXISTS `search_chunk_vec_lookup_idx` ON `search_chunk_vec` (`scope`, `user_id`, `source_kind`, `ticker`);",
+ );
}
function verifyCriticalSchema(client: Database) {
- if (!hasTable(client, 'filing_taxonomy_snapshot')) {
+ if (!hasTable(client, "filing_taxonomy_snapshot")) {
return;
}
const missingColumns: string[] = [];
for (const columnName of TAXONOMY_SNAPSHOT_REQUIRED_COLUMNS) {
- if (!hasColumn(client, 'filing_taxonomy_snapshot', columnName)) {
+ if (!hasColumn(client, "filing_taxonomy_snapshot", columnName)) {
missingColumns.push(columnName);
}
}
@@ -148,8 +162,8 @@ function verifyCriticalSchema(client: Database) {
if (missingColumns.length > 0) {
throw new Error(
`[db] CRITICAL: Database schema is incompatible. ` +
- `filing_taxonomy_snapshot is missing columns: ${missingColumns.join(', ')}. ` +
- `Delete the database file and restart to rebuild schema.`
+ `filing_taxonomy_snapshot is missing columns: ${missingColumns.join(", ")}. ` +
+ `Delete the database file and restart to rebuild schema.`,
);
}
}
@@ -159,19 +173,21 @@ export function getSqliteClient() {
configureCustomSqliteRuntime();
const databasePath = getDatabasePath();
- if (databasePath !== ':memory:') {
+ if (databasePath !== ":memory:") {
mkdirSync(dirname(databasePath), { recursive: true });
}
const client = new Database(databasePath, { create: true });
- client.exec('PRAGMA foreign_keys = ON;');
- client.exec('PRAGMA journal_mode = WAL;');
- client.exec('PRAGMA busy_timeout = 5000;');
+ client.exec("PRAGMA foreign_keys = ON;");
+ client.exec("PRAGMA journal_mode = WAL;");
+ client.exec("PRAGMA busy_timeout = 5000;");
loadSqliteExtensions(client);
ensureLocalSqliteSchema(client);
verifyCriticalSchema(client);
ensureFinancialIngestionSchemaHealthy(client, {
- mode: resolveFinancialSchemaRepairMode(process.env.FINANCIAL_SCHEMA_REPAIR_MODE)
+ mode: resolveFinancialSchemaRepairMode(
+ process.env.FINANCIAL_SCHEMA_REPAIR_MODE,
+ ),
});
ensureSearchVirtualTables(client);
@@ -200,5 +216,5 @@ export const __dbInternals = {
hasTable,
isVectorExtensionLoaded,
loadSqliteExtensions,
- verifyCriticalSchema
+ verifyCriticalSchema,
};
diff --git a/rust/fiscal-xbrl-core/src/pack_selector.rs b/rust/fiscal-xbrl-core/src/pack_selector.rs
index e15011e..9931bc9 100644
--- a/rust/fiscal-xbrl-core/src/pack_selector.rs
+++ b/rust/fiscal-xbrl-core/src/pack_selector.rs
@@ -2,6 +2,12 @@ use std::collections::HashSet;
use crate::{FactOutput, StatementRowMap};
+const STRONG_WEIGHT: i64 = 8;
+const SUPPORTING_WEIGHT: i64 = 6;
+const ROLE_WEIGHT: i64 = 2;
+const MIN_SELECTION_SCORE: i64 = 10;
+const MIN_SELECTION_MARGIN: i64 = 4;
+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum FiscalPack {
Core,
@@ -9,6 +15,29 @@ pub enum FiscalPack {
Insurance,
ReitRealEstate,
BrokerAssetManager,
+ Agriculture,
+ ContractorsConstruction,
+ ContractorsFederalGovernment,
+ DevelopmentStage,
+ EntertainmentBroadcasters,
+ EntertainmentCableTelevision,
+ EntertainmentCasinos,
+ EntertainmentFilms,
+ EntertainmentMusic,
+ ExtractiveMining,
+ MortgageBanking,
+ TitlePlant,
+ Franchisors,
+ NotForProfit,
+ PlanDefinedBenefit,
+ PlanDefinedContribution,
+ PlanHealthWelfare,
+ RealEstateGeneral,
+ RealEstateCommonInterest,
+ RealEstateRetailLand,
+ RealEstateTimeSharing,
+ Software,
+ Steamship,
}
impl FiscalPack {
@@ -19,6 +48,29 @@ impl FiscalPack {
FiscalPack::Insurance => "insurance",
FiscalPack::ReitRealEstate => "reit_real_estate",
FiscalPack::BrokerAssetManager => "broker_asset_manager",
+ FiscalPack::Agriculture => "agriculture",
+ FiscalPack::ContractorsConstruction => "contractors_construction",
+ FiscalPack::ContractorsFederalGovernment => "contractors_federal_government",
+ FiscalPack::DevelopmentStage => "development_stage",
+ FiscalPack::EntertainmentBroadcasters => "entertainment_broadcasters",
+ FiscalPack::EntertainmentCableTelevision => "entertainment_cable_television",
+ FiscalPack::EntertainmentCasinos => "entertainment_casinos",
+ FiscalPack::EntertainmentFilms => "entertainment_films",
+ FiscalPack::EntertainmentMusic => "entertainment_music",
+ FiscalPack::ExtractiveMining => "extractive_mining",
+ FiscalPack::MortgageBanking => "mortgage_banking",
+ FiscalPack::TitlePlant => "title_plant",
+ FiscalPack::Franchisors => "franchisors",
+ FiscalPack::NotForProfit => "not_for_profit",
+ FiscalPack::PlanDefinedBenefit => "plan_defined_benefit",
+ FiscalPack::PlanDefinedContribution => "plan_defined_contribution",
+ FiscalPack::PlanHealthWelfare => "plan_health_welfare",
+ FiscalPack::RealEstateGeneral => "real_estate_general",
+ FiscalPack::RealEstateCommonInterest => "real_estate_common_interest",
+ FiscalPack::RealEstateRetailLand => "real_estate_retail_land",
+ FiscalPack::RealEstateTimeSharing => "real_estate_time_sharing",
+ FiscalPack::Software => "software",
+ FiscalPack::Steamship => "steamship",
}
}
}
@@ -29,45 +81,574 @@ pub struct PackSelection {
pub warnings: Vec,
}
+#[derive(Debug, Clone, Copy)]
+struct PackRule {
+ pack: FiscalPack,
+ precedence: i64,
+ strong_concepts: &'static [&'static str],
+ supporting_concepts: &'static [&'static str],
+ role_tokens: &'static [&'static str],
+}
+
+#[derive(Debug, Clone, Copy)]
+struct ScoredPack {
+ pack: FiscalPack,
+ raw_score: i64,
+ precedence: i64,
+ has_primary_signal: bool,
+}
+
+const PACK_RULES: &[PackRule] = &[
+ PackRule {
+ pack: FiscalPack::BankLender,
+ precedence: 100,
+ strong_concepts: &[
+ "depositsliabilities",
+ "deposits",
+ "financingreceivablerecordedinvestment",
+ "loansreceivablenetreportedamount",
+ ],
+ supporting_concepts: &[
+ "allowanceforcreditlosses",
+ "allowanceforloanlosses",
+ "provisionforcreditlosses",
+ "netinterestincome",
+ "interestexpense",
+ "interestanddividendincomeoperating",
+ ],
+ role_tokens: &["deposit", "loan", "credit", "netinterest"],
+ },
+ PackRule {
+ pack: FiscalPack::Insurance,
+ precedence: 100,
+ strong_concepts: &[
+ "premiums",
+ "premiumswritten",
+ "premiumsearned",
+ "futurepolicybenefits",
+ "liabilityforfuturepolicybenefits",
+ "liabilityforunpaidclaimsandclaimsadjustmentexpense",
+ ],
+ supporting_concepts: &[
+ "policyholderbenefitsandclaimsincurrednet",
+ "deferredpolicyacquisitioncosts",
+ "netinvestmentincome",
+ "underwritingincomeloss",
+ "unearnedpremiumsnet",
+ ],
+ role_tokens: &["insurance", "premium", "policy", "claims"],
+ },
+ PackRule {
+ pack: FiscalPack::ReitRealEstate,
+ precedence: 150,
+ strong_concepts: &[
+ "leaseincome",
+ "rentalrevenue",
+ "realestateinvestmentpropertynet",
+ "realestateinvestmentpropertyatcost",
+ "realestategrossatcarryingvalue",
+ ],
+ supporting_concepts: &[
+ "numberofrealestateproperties",
+ "directcostsofleasedandrentedpropertyorequipment",
+ "paymentstoacquirecommercialrealestate",
+ ],
+ role_tokens: &["realestate", "property", "lease", "rental"],
+ },
+ PackRule {
+ pack: FiscalPack::BrokerAssetManager,
+ precedence: 100,
+ strong_concepts: &[
+ "assetsundermanagementcarryingamount",
+ "feepayingassetundermanagement",
+ "performancefeerevenuerecognized",
+ ],
+ supporting_concepts: &[
+ "subadvisoryandother",
+ "sponsorfees",
+ "estimatedannualfixedminimumfeesforcurrentlyoutstandingcontracts",
+ ],
+ role_tokens: &["advis", "management", "asset", "distribution"],
+ },
+ PackRule {
+ pack: FiscalPack::Agriculture,
+ precedence: 100,
+ strong_concepts: &[
+ "revenuefromagriculturalcrops",
+ "cropsalesrevenue",
+ "livestocksalesrevenue",
+ "revenuefromlivestock",
+ "biologicalassetscurrent",
+ "biologicalassets",
+ ],
+ supporting_concepts: &[
+ "costofagriculturalinputs",
+ "feedandfeedadditivesexpense",
+ "increasedecreaseinagriculturalinventory",
+ "changeinbiologicalassets",
+ ],
+ role_tokens: &["agric", "crop", "livestock", "farm"],
+ },
+ PackRule {
+ pack: FiscalPack::ContractorsConstruction,
+ precedence: 100,
+ strong_concepts: &[
+ "revenuefromconstructioncontracts",
+ "contractrevenue",
+ "constructioninprogress",
+ "contractassets",
+ "contractliabilities",
+ ],
+ supporting_concepts: &[
+ "costofcontractrevenue",
+ "costsincurredoncontracts",
+ "billingsinexcessofcostsandestimatedearnings",
+ ],
+ role_tokens: &["construct", "contractor", "jobcost", "project"],
+ },
+ PackRule {
+ pack: FiscalPack::ContractorsFederalGovernment,
+ precedence: 200,
+ strong_concepts: &[
+ "revenuefromgovernmentcontracts",
+ "federalcontractrevenue",
+ "costofgovernmentcontracts",
+ "costoffederalcontracts",
+ ],
+ supporting_concepts: &["contractassets", "contractliabilities"],
+ role_tokens: &["federal", "government", "defense", "contract"],
+ },
+ PackRule {
+ pack: FiscalPack::DevelopmentStage,
+ precedence: 100,
+ strong_concepts: &[
+ "revenuefromdevelopmentstageoperations",
+ "capitalizeddevelopmentcosts",
+ "capitalizedsoftwaredevelopmentcosts",
+ ],
+ supporting_concepts: &[
+ "researchanddevelopmentexpense",
+ "accumulateddeficit",
+ "generalandadministrativeexpense",
+ ],
+ role_tokens: &["developmentstage", "earlystage", "startup", "development"],
+ },
+ PackRule {
+ pack: FiscalPack::EntertainmentBroadcasters,
+ precedence: 100,
+ strong_concepts: &[
+ "broadcastingrevenue",
+ "advertisingrevenuebroadcasting",
+ "networkrevenue",
+ "programminglibrary",
+ "filmandbroadcastrights",
+ ],
+ supporting_concepts: &[
+ "licensefeerevenue",
+ "syndicationrevenue",
+ "programmingrightscosts",
+ "amortizationofprogrammingrights",
+ ],
+ role_tokens: &["broadcast", "syndicat", "programming", "network"],
+ },
+ PackRule {
+ pack: FiscalPack::EntertainmentCableTelevision,
+ precedence: 100,
+ strong_concepts: &[
+ "cablesubscriptionrevenue",
+ "subscriberrevenue",
+ "cablesubscriptionrevenue",
+ "cablenetworks",
+ "subscriberequipment",
+ "networkinfrastructure",
+ ],
+ supporting_concepts: &[
+ "programmingcosts",
+ "programmingexpense",
+ "networkoperationsexpense",
+ "depreciationofcableequipment",
+ ],
+ role_tokens: &["cable", "subscriber", "network", "headend"],
+ },
+ PackRule {
+ pack: FiscalPack::EntertainmentCasinos,
+ precedence: 100,
+ strong_concepts: &[
+ "gamingrevenue",
+ "casinogamingrevenue",
+ "casinoproperties",
+ "hotelandcasinopropertyandequipment",
+ "gamingtaxliability",
+ ],
+ supporting_concepts: &[
+ "gamingtaxes",
+ "gaminglicensefees",
+ "hotelrevenue",
+ "foodandbeveragerevenue",
+ ],
+ role_tokens: &["casino", "gaming", "resort", "lodging"],
+ },
+ PackRule {
+ pack: FiscalPack::EntertainmentFilms,
+ precedence: 100,
+ strong_concepts: &[
+ "filmrevenue",
+ "filmdistributionrevenue",
+ "theatricalrevenue",
+ "filmcosts",
+ "capitalizedfilmcosts",
+ ],
+ supporting_concepts: &[
+ "filmproductioncosts",
+ "amortizationoffilmcosts",
+ "distributionexpense",
+ "marketingexpense",
+ ],
+ role_tokens: &["film", "theatrical", "distribution", "studio"],
+ },
+ PackRule {
+ pack: FiscalPack::EntertainmentMusic,
+ precedence: 100,
+ strong_concepts: &[
+ "musicroyaltiesrevenue",
+ "licensingrevenuemusic",
+ "musiccatalog",
+ "recordcatalognet",
+ ],
+ supporting_concepts: &[
+ "artistadvances",
+ "advancestoartists",
+ "amortizationofmusiccatalog",
+ "amortizationofrecordcatalog",
+ ],
+ role_tokens: &["music", "royalt", "catalog", "artist"],
+ },
+ PackRule {
+ pack: FiscalPack::ExtractiveMining,
+ precedence: 100,
+ strong_concepts: &[
+ "miningrevenue",
+ "metalsandmineralssales",
+ "miningproperties",
+ "mineralproperties",
+ "rehabilitationprovision",
+ "mineclosurereserve",
+ ],
+ supporting_concepts: &[
+ "productioncostofmining",
+ "miningoperatingcosts",
+ "explorationcostsmining",
+ "depletionofnaturalresources",
+ ],
+ role_tokens: &["mining", "mineral", "metals", "extractive"],
+ },
+ PackRule {
+ pack: FiscalPack::MortgageBanking,
+ precedence: 200,
+ strong_concepts: &[
+ "mortgagebankingincome",
+ "originationfeesandgainsonloans",
+ "gainonsaleofmortgageloans",
+ "loansheldforsalenet",
+ "mortgageloansheldforsale",
+ "mortgageservicingrights",
+ "servicingassets",
+ ],
+ supporting_concepts: &[
+ "servicingfees",
+ "mortgageservicingincome",
+ "interestincomeonmortgageloansheldforsale",
+ "interestexpenseonwarehouselines",
+ ],
+ role_tokens: &["mortgage", "servicing", "origination", "warehouse"],
+ },
+ PackRule {
+ pack: FiscalPack::TitlePlant,
+ precedence: 200,
+ strong_concepts: &[
+ "titleinsurancerevenue",
+ "titlesearchandexamrevenue",
+ "titleplant",
+ "titleplantassets",
+ "reservefortitleclaims",
+ ],
+ supporting_concepts: &[
+ "escrowfees",
+ "closingfees",
+ "policylossesandlossadjustmentexpenses",
+ "policylossreserves",
+ ],
+ role_tokens: &["title", "escrow", "closing", "settlement"],
+ },
+ PackRule {
+ pack: FiscalPack::Franchisors,
+ precedence: 100,
+ strong_concepts: &[
+ "franchisefeesrevenue",
+ "initialfranchisefees",
+ "franchiseroyaltiesrevenue",
+ "franchiseagreementsintangibleassets",
+ "franchiserights",
+ "deferredfranchisefees",
+ ],
+ supporting_concepts: &[
+ "continuingfranchisefees",
+ "advertisingfundrevenue",
+ "advertisingfundexpense",
+ "franchisesupportservicesexpense",
+ ],
+ role_tokens: &["franchise", "franchisor", "royalt", "franchisee"],
+ },
+ PackRule {
+ pack: FiscalPack::NotForProfit,
+ precedence: 100,
+ strong_concepts: &[
+ "contributionsreceived",
+ "donationsrevenue",
+ "netassetswithoutdonorrestrictions",
+ "netassetswithdonorrestrictions",
+ ],
+ supporting_concepts: &[
+ "grantrevenue",
+ "programserviceexpense",
+ "fundraisingexpense",
+ "changeinnetassets",
+ ],
+ role_tokens: &["donor", "grant", "foundation", "nonprofit"],
+ },
+ PackRule {
+ pack: FiscalPack::PlanDefinedBenefit,
+ precedence: 300,
+ strong_concepts: &[
+ "employercontributions",
+ "projectedbenefitobligation",
+ "benefitobligations",
+ "fundedstatusofdefinedbenefitplan",
+ "fairvalueofplanassets",
+ ],
+ supporting_concepts: &[
+ "benefitpayments",
+ "returnonplanassets",
+ "benefitspaidtoparticipants",
+ ],
+ role_tokens: &["definedbenefit", "pension", "plan", "pbo"],
+ },
+ PackRule {
+ pack: FiscalPack::PlanDefinedContribution,
+ precedence: 200,
+ strong_concepts: &[
+ "contributionsreceivedfromemployersandparticipants",
+ "employerandemployeecontributions",
+ "netassetsavailableforbenefits",
+ "planinvestmentsatfairvalue",
+ "fairvalueofplaninvestments",
+ ],
+ supporting_concepts: &[
+ "benefitpayments",
+ "administrativeexpenseofplan",
+ "administrativeexpenses",
+ ],
+ role_tokens: &["definedcontribution", "401k", "retirementplan", "plan"],
+ },
+ PackRule {
+ pack: FiscalPack::PlanHealthWelfare,
+ precedence: 100,
+ strong_concepts: &[
+ "contributionsreceivedfromemployersandparticipants",
+ "fairvalueofplanassets",
+ "benefitobligations",
+ "accumulatedpostretirementbenefitobligation",
+ ],
+ supporting_concepts: &[
+ "benefitpayments",
+ "administrativeexpenses",
+ "planadministrativeexpense",
+ ],
+ role_tokens: &["health", "welfare", "benefitplan", "postretirement"],
+ },
+ PackRule {
+ pack: FiscalPack::RealEstateGeneral,
+ precedence: 100,
+ strong_concepts: &[
+ "realestatesalesrevenue",
+ "propertysalesrevenue",
+ "realestateinventory",
+ "realestateheldforsale",
+ "realestatedevelopmentproperty",
+ "propertiesunderdevelopment",
+ ],
+ supporting_concepts: &[
+ "propertymanagementfees",
+ "managementfeerevenue",
+ "costofrealestatesold",
+ "deferredrevenuerealestate",
+ ],
+ role_tokens: &["realestate", "property", "development", "sale"],
+ },
+ PackRule {
+ pack: FiscalPack::RealEstateCommonInterest,
+ precedence: 200,
+ strong_concepts: &[
+ "associationassessmentrevenue",
+ "commoninterestrevenue",
+ "commonpropertyassets",
+ "commonareaproperty",
+ "reservefundassets",
+ "reservefund",
+ ],
+ supporting_concepts: &[
+ "maintenancefees",
+ "assessmentsformaintenance",
+ "repairandreplacementexpense",
+ "reservefundexpenditures",
+ ],
+ role_tokens: &["association", "commoninterest", "homeowner", "reserve"],
+ },
+ PackRule {
+ pack: FiscalPack::RealEstateRetailLand,
+ precedence: 300,
+ strong_concepts: &[
+ "landsalesrevenue",
+ "retaillandsales",
+ "landinventory",
+ "costoflandsold",
+ ],
+ supporting_concepts: &[
+ "costofpropertysold",
+ "marketingexpense",
+ "sellingexpense",
+ "deferredrevenuerealestate",
+ ],
+ role_tokens: &["land", "lot", "parcel", "retail"],
+ },
+ PackRule {
+ pack: FiscalPack::RealEstateTimeSharing,
+ precedence: 400,
+ strong_concepts: &[
+ "timesharesalesrevenue",
+ "timesharepropertysales",
+ "timeshareintervals",
+ "timeshareinventory",
+ "timeshareloansreceivable",
+ "consumerfinancereceivables",
+ "deferredrevenuetimeshare",
+ ],
+ supporting_concepts: &[
+ "timesharefinancingincome",
+ "interestincomeontimeshareloans",
+ "timesharemaintenancefeerevenue",
+ "timesharemarketingexpense",
+ ],
+ role_tokens: &["timeshare", "vacationownership", "interval", "resort"],
+ },
+ PackRule {
+ pack: FiscalPack::Software,
+ precedence: 100,
+ strong_concepts: &[
+ "softwarelicenserevenue",
+ "licenserevenuesoftware",
+ "softwaremaintenancerevenue",
+ "softwaresupportrevenue",
+ "capitalizedsoftwarecosts",
+ "softwaredevelopmentcosts",
+ "deferredrevenuesoftware",
+ ],
+ supporting_concepts: &[
+ "costofsoftwarerevenue",
+ "costoflicenserevenue",
+ "researchanddevelopmentexpense",
+ "amortizationofcapitalizedsoftware",
+ ],
+ role_tokens: &["software", "license", "maintenance", "support"],
+ },
+ PackRule {
+ pack: FiscalPack::Steamship,
+ precedence: 100,
+ strong_concepts: &[
+ "freightrevenue",
+ "cargorevenue",
+ "passengerrevenue",
+ "ticketrevenue",
+ "vessels",
+ "shipsandboats",
+ "marineequipment",
+ "unearnedpassengerrevenue",
+ "deferredticketrevenue",
+ ],
+ supporting_concepts: &[
+ "fuelexpense",
+ "bunkerfuelexpense",
+ "crewcosts",
+ "drydockcostsdeferred",
+ ],
+ role_tokens: &["steamship", "marine", "cargo", "vessel"],
+ },
+];
+
pub fn select_fiscal_pack(statement_rows: &StatementRowMap, facts: &[FactOutput]) -> PackSelection {
let concept_names = collect_concept_names(statement_rows, facts);
let role_tokens = collect_role_tokens(statement_rows, facts);
- let bank_score = score_bank_lender(&concept_names, &role_tokens);
- let insurance_score = score_insurance(&concept_names, &role_tokens);
- let reit_score = score_reit_real_estate(&concept_names, &role_tokens);
- let broker_score = score_broker_asset_manager(&concept_names, &role_tokens);
- let mut scored_packs = vec![
- (FiscalPack::BankLender, bank_score),
- (FiscalPack::Insurance, insurance_score),
- (FiscalPack::ReitRealEstate, reit_score),
- (FiscalPack::BrokerAssetManager, broker_score),
- ];
- scored_packs.sort_by(|left, right| right.1.cmp(&left.1));
+ let mut scored_packs = PACK_RULES
+ .iter()
+ .map(|rule| score_pack(rule, &concept_names, &role_tokens))
+ .collect::>();
+ scored_packs.sort_by(|left, right| {
+ right
+ .raw_score
+ .cmp(&left.raw_score)
+ .then_with(|| right.precedence.cmp(&left.precedence))
+ .then_with(|| left.pack.as_str().cmp(right.pack.as_str()))
+ });
- let (top_pack, top_score) = scored_packs[0];
- let second_score = scored_packs
- .get(1)
- .map(|(_, score)| *score)
- .unwrap_or_default();
- let margin = top_score - second_score;
- let selected_pack = if top_score >= 10 && margin >= 4 {
- top_pack
+ let top_pack = scored_packs.first().copied();
+ let mut warnings = Vec::new();
+
+ let selected_pack = if let Some(top_pack) = top_pack {
+ let second_pack = scored_packs.get(1).copied();
+ let second_score = second_pack.map(|pack| pack.raw_score).unwrap_or_default();
+ let score_margin = top_pack.raw_score - second_score;
+ let precedence_breaks_tie = second_pack
+ .map(|pack| {
+ top_pack.raw_score == pack.raw_score && top_pack.precedence > pack.precedence
+ })
+ .unwrap_or(false);
+
+ if top_pack.has_primary_signal
+ && top_pack.raw_score >= MIN_SELECTION_SCORE
+ && (score_margin >= MIN_SELECTION_MARGIN || precedence_breaks_tie)
+ {
+ top_pack.pack
+ } else {
+ if top_pack.raw_score > 0 {
+ warnings.push("fiscal_pack_defaulted_to_core".to_string());
+ }
+ FiscalPack::Core
+ }
} else {
FiscalPack::Core
};
- let mut warnings = Vec::new();
- if selected_pack == FiscalPack::Core && top_score > 0 {
- warnings.push("fiscal_pack_defaulted_to_core".to_string());
- }
-
PackSelection {
pack: selected_pack,
warnings,
}
}
+fn score_pack(rule: &PackRule, concepts: &HashSet, roles: &HashSet) -> ScoredPack {
+ let has_primary_signal = matches_any_concept(concepts, rule.strong_concepts);
+ let raw_score = weighted_concept_match(concepts, rule.strong_concepts, STRONG_WEIGHT)
+ + weighted_concept_match(concepts, rule.supporting_concepts, SUPPORTING_WEIGHT)
+ + weighted_role_match(roles, rule.role_tokens, ROLE_WEIGHT);
+
+ ScoredPack {
+ pack: rule.pack,
+ raw_score,
+ precedence: rule.precedence,
+ has_primary_signal,
+ }
+}
+
fn collect_concept_names(
statement_rows: &StatementRowMap,
facts: &[FactOutput],
@@ -109,151 +690,14 @@ fn collect_role_tokens(statement_rows: &StatementRowMap, facts: &[FactOutput]) -
roles
}
-fn score_bank_lender(concepts: &HashSet, roles: &HashSet) -> i64 {
- let mut score = 0;
-
- score += weighted_match(
- concepts,
- &[
- "depositsliabilities",
- "us-gaap:depositsliabilities",
- "deposits",
- ],
- 8,
- );
- score += weighted_match(
- concepts,
- &[
- "financingreceivablerecordedinvestment",
- "us-gaap:financingreceivablerecordedinvestment",
- "loansreceivablenetreportedamount",
- "us-gaap:loansreceivablenetreportedamount",
- ],
- 8,
- );
- score += weighted_match(
- concepts,
- &[
- "allowanceforcreditlosses",
- "allowanceforloanlosses",
- "provisionforcreditlosses",
- "loanlossprovision",
- "netinterestincome",
- "interestexpense",
- "interestanddividendincomeoperating",
- ],
- 4,
- );
- score += weighted_role_match(roles, &["deposit", "loan", "credit", "netinterest"], 2);
-
- score
-}
-
-fn score_insurance(concepts: &HashSet, roles: &HashSet) -> i64 {
- let mut score = 0;
-
- score += weighted_match(
- concepts,
- &[
- "premiums",
- "premiumswritten",
- "premiumsearned",
- "premiumswrittennet",
- "premiumsearnednet",
- "us-gaap:premiums",
- ],
- 8,
- );
- score += weighted_match(
- concepts,
- &[
- "policyholderbenefitsandclaimsincurrednet",
- "futurepolicybenefits",
- "liabilityforfuturepolicybenefits",
- "liabilityforunpaidlossesandlossadjustmentexpenses",
- "liabilityforunpaidclaimsandclaimsadjustmentexpense",
- "liabilityforfuturepolicybenefits",
- "deferredpolicyacquisitioncosts",
- "deferredpolicyacquisitioncostsamortizationexpense",
- "netinvestmentincome",
- "underwritingincomeloss",
- "unearnedpremiumsnet",
- ],
- 6,
- );
- score += weighted_role_match(roles, &["insurance", "premium", "policy", "claims"], 2);
-
- score
-}
-
-fn score_reit_real_estate(concepts: &HashSet, roles: &HashSet) -> i64 {
- let mut score = 0;
-
- score += weighted_match(
- concepts,
- &[
- "leaseincome",
- "realestateinvestmentpropertynet",
- "realestategrossatcarryingvalue",
- "realestateinvestmentpropertyatcost",
- ],
- 8,
- );
- score += weighted_match(
- concepts,
- &[
- "numberofrealestateproperties",
- "directcostsofleasedandrentedpropertyorequipment",
- "depreciationdepletionandamortization",
- "realestateaccumulateddepreciation",
- "paymentstoacquirecommercialrealestate",
- ],
- 6,
- );
- score += weighted_role_match(roles, &["realestate", "property", "lease", "rental"], 2);
-
- score
-}
-
-fn score_broker_asset_manager(concepts: &HashSet, roles: &HashSet) -> i64 {
- let mut score = 0;
-
- score += weighted_match(
- concepts,
- &[
- "assetsundermanagementcarryingamount",
- "feepayingassetundermanagement",
- ],
- 8,
- );
- score += weighted_match(
- concepts,
- &[
- "performancefeerevenuerecognized",
- "subadvisoryandother",
- "sponsorfees",
- ],
- 6,
- );
- score += weighted_match(
- concepts,
- &[
- "totalsalesassetandaccountexpense",
- "estimatedannualfixedminimumfeesforcurrentlyoutstandingcontracts",
- "reductioninthevalueofmanagementcontract",
- ],
- 6,
- );
- score += weighted_role_match(roles, &["advis", "management", "asset", "distribution"], 2);
-
- score
-}
-
-fn weighted_match(concepts: &HashSet, candidates: &[&str], weight: i64) -> i64 {
- if candidates
+fn matches_any_concept(concepts: &HashSet, candidates: &[&str]) -> bool {
+ candidates
.iter()
.any(|candidate| concepts.contains(&candidate.to_ascii_lowercase()))
- {
+}
+
+fn weighted_concept_match(concepts: &HashSet, candidates: &[&str], weight: i64) -> i64 {
+ if matches_any_concept(concepts, candidates) {
weight
} else {
0
@@ -278,6 +722,10 @@ mod tests {
use std::collections::BTreeMap;
fn row(local_name: &str, statement: &str) -> StatementRowOutput {
+ row_with_role(local_name, statement, statement)
+ }
+
+ fn row_with_role(local_name: &str, statement: &str, role_uri: &str) -> StatementRowOutput {
StatementRowOutput {
key: local_name.to_string(),
label: local_name.to_string(),
@@ -287,7 +735,7 @@ mod tests {
local_name: local_name.to_string(),
is_extension: false,
statement: statement.to_string(),
- role_uri: Some(statement.to_string()),
+ role_uri: Some(role_uri.to_string()),
order: 1,
depth: 0,
parent_key: None,
@@ -308,79 +756,362 @@ mod tests {
])
}
+ fn selection_for(rows_to_add: &[(&str, &str)]) -> PackSelection {
+ let mut rows = empty_map();
+ for (statement, local_name) in rows_to_add {
+ rows.get_mut(*statement)
+ .unwrap()
+ .push(row(local_name, statement));
+ }
+ select_fiscal_pack(&rows, &[])
+ }
+
#[test]
fn chooses_bank_lender_from_loan_and_deposit_signatures() {
- let mut rows = empty_map();
- rows.get_mut("balance").unwrap().extend([
- row("DepositsLiabilities", "balance"),
- row("FinancingReceivableRecordedInvestment", "balance"),
- row("AllowanceForCreditLosses", "balance"),
+ let selection = selection_for(&[
+ ("balance", "DepositsLiabilities"),
+ ("balance", "FinancingReceivableRecordedInvestment"),
+ ("income", "NetInterestIncome"),
]);
-
- let selection = select_fiscal_pack(&rows, &[]);
assert_eq!(selection.pack, FiscalPack::BankLender);
- assert!(selection.warnings.is_empty());
}
#[test]
fn chooses_insurance_from_premium_and_claim_signatures() {
- let mut rows = empty_map();
- rows.get_mut("income").unwrap().extend([
- row("Premiums", "income"),
- row("PolicyholderBenefitsAndClaimsIncurredNet", "income"),
+ let selection = selection_for(&[
+ ("income", "Premiums"),
+ ("income", "PolicyholderBenefitsAndClaimsIncurredNet"),
+ ("balance", "FuturePolicyBenefits"),
]);
- rows.get_mut("balance")
- .unwrap()
- .push(row("FuturePolicyBenefits", "balance"));
-
- let selection = select_fiscal_pack(&rows, &[]);
assert_eq!(selection.pack, FiscalPack::Insurance);
- assert!(selection.warnings.is_empty());
- }
-
- #[test]
- fn defaults_to_core_on_low_confidence() {
- let mut rows = empty_map();
- rows.get_mut("income")
- .unwrap()
- .push(row("InterestExpense", "income"));
-
- let selection = select_fiscal_pack(&rows, &[]);
- assert_eq!(selection.pack, FiscalPack::Core);
- assert_eq!(selection.warnings, vec!["fiscal_pack_defaulted_to_core"]);
}
#[test]
fn chooses_reit_from_property_and_lease_signatures() {
- let mut rows = empty_map();
- rows.get_mut("income")
- .unwrap()
- .push(row("LeaseIncome", "income"));
- rows.get_mut("balance")
- .unwrap()
- .push(row("RealEstateInvestmentPropertyNet", "balance"));
- rows.get_mut("balance")
- .unwrap()
- .push(row("NumberOfRealEstateProperties", "balance"));
-
- let selection = select_fiscal_pack(&rows, &[]);
+ let selection = selection_for(&[
+ ("income", "LeaseIncome"),
+ ("balance", "RealEstateInvestmentPropertyNet"),
+ ("balance", "NumberOfRealEstateProperties"),
+ ]);
assert_eq!(selection.pack, FiscalPack::ReitRealEstate);
}
#[test]
fn chooses_broker_asset_manager_from_aum_and_fee_signatures() {
- let mut rows = empty_map();
- rows.get_mut("income")
- .unwrap()
- .push(row("PerformanceFeeRevenueRecognized", "income"));
- rows.get_mut("balance")
- .unwrap()
- .push(row("AssetsUnderManagementCarryingAmount", "balance"));
- rows.get_mut("balance")
- .unwrap()
- .push(row("FeePayingAssetUnderManagement", "balance"));
-
- let selection = select_fiscal_pack(&rows, &[]);
+ let selection = selection_for(&[
+ ("income", "PerformanceFeeRevenueRecognized"),
+ ("income", "SponsorFees"),
+ ("balance", "AssetsUnderManagementCarryingAmount"),
+ ("balance", "FeePayingAssetUnderManagement"),
+ ]);
assert_eq!(selection.pack, FiscalPack::BrokerAssetManager);
}
+
+ #[test]
+ fn chooses_agriculture_pack() {
+ let selection = selection_for(&[
+ ("income", "CropSalesRevenue"),
+ ("income", "ChangeInBiologicalAssets"),
+ ("balance", "BiologicalAssets"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::Agriculture);
+ }
+
+ #[test]
+ fn chooses_contractors_construction_pack() {
+ let selection = selection_for(&[
+ ("income", "ContractRevenue"),
+ ("income", "CostOfContractRevenue"),
+ ("balance", "ConstructionInProgress"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::ContractorsConstruction);
+ }
+
+ #[test]
+ fn chooses_contractors_federal_government_pack() {
+ let mut rows = empty_map();
+ rows.get_mut("income").unwrap().extend([
+ row_with_role(
+ "FederalContractRevenue",
+ "income",
+ "http://example.com/roles/federal-government-contracts",
+ ),
+ row("CostOfGovernmentContracts", "income"),
+ ]);
+ rows.get_mut("balance")
+ .unwrap()
+ .push(row("ContractAssets", "balance"));
+
+ let selection = select_fiscal_pack(&rows, &[]);
+ assert_eq!(selection.pack, FiscalPack::ContractorsFederalGovernment);
+ }
+
+ #[test]
+ fn chooses_development_stage_pack() {
+ let selection = selection_for(&[
+ ("income", "RevenueFromDevelopmentStageOperations"),
+ ("income", "ResearchAndDevelopmentExpense"),
+ ("balance", "CapitalizedDevelopmentCosts"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::DevelopmentStage);
+ }
+
+ #[test]
+ fn chooses_entertainment_broadcasters_pack() {
+ let selection = selection_for(&[
+ ("income", "BroadcastingRevenue"),
+ ("income", "ProgrammingRightsCosts"),
+ ("balance", "ProgrammingLibrary"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::EntertainmentBroadcasters);
+ }
+
+ #[test]
+ fn chooses_entertainment_cable_television_pack() {
+ let selection = selection_for(&[
+ ("income", "CableSubscriptionRevenue"),
+ ("income", "NetworkOperationsExpense"),
+ ("balance", "CableNetworks"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::EntertainmentCableTelevision);
+ }
+
+ #[test]
+ fn chooses_entertainment_casinos_pack() {
+ let selection = selection_for(&[
+ ("income", "GamingRevenue"),
+ ("income", "GamingTaxes"),
+ ("balance", "CasinoProperties"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::EntertainmentCasinos);
+ }
+
+ #[test]
+ fn chooses_entertainment_films_pack() {
+ let selection = selection_for(&[
+ ("income", "FilmDistributionRevenue"),
+ ("income", "AmortizationOfFilmCosts"),
+ ("balance", "CapitalizedFilmCosts"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::EntertainmentFilms);
+ }
+
+ #[test]
+ fn chooses_entertainment_music_pack() {
+ let selection = selection_for(&[
+ ("income", "MusicRoyaltiesRevenue"),
+ ("income", "ArtistAdvances"),
+ ("balance", "MusicCatalog"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::EntertainmentMusic);
+ }
+
+ #[test]
+ fn chooses_extractive_mining_pack() {
+ let selection = selection_for(&[
+ ("income", "MiningRevenue"),
+ ("income", "ExplorationCostsMining"),
+ ("balance", "MiningProperties"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::ExtractiveMining);
+ }
+
+ #[test]
+ fn chooses_mortgage_banking_pack() {
+ let selection = selection_for(&[
+ ("income", "MortgageBankingIncome"),
+ ("income", "ServicingFees"),
+ ("balance", "MortgageServicingRights"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::MortgageBanking);
+ }
+
+ #[test]
+ fn chooses_title_plant_pack() {
+ let selection = selection_for(&[
+ ("income", "TitleInsuranceRevenue"),
+ ("income", "EscrowFees"),
+ ("balance", "TitlePlantAssets"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::TitlePlant);
+ }
+
+ #[test]
+ fn chooses_franchisors_pack() {
+ let selection = selection_for(&[
+ ("income", "FranchiseFeesRevenue"),
+ ("income", "AdvertisingFundRevenue"),
+ ("balance", "DeferredFranchiseFees"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::Franchisors);
+ }
+
+ #[test]
+ fn chooses_not_for_profit_pack() {
+ let selection = selection_for(&[
+ ("income", "ContributionsReceived"),
+ ("income", "GrantRevenue"),
+ ("balance", "NetAssetsWithDonorRestrictions"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::NotForProfit);
+ }
+
+ #[test]
+ fn chooses_plan_defined_benefit_pack() {
+ let selection = selection_for(&[
+ ("income", "EmployerContributions"),
+ ("income", "BenefitPayments"),
+ ("balance", "ProjectedBenefitObligation"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::PlanDefinedBenefit);
+ }
+
+ #[test]
+ fn chooses_plan_defined_contribution_pack() {
+ let selection = selection_for(&[
+ (
+ "income",
+ "ContributionsReceivedFromEmployersAndParticipants",
+ ),
+ ("income", "AdministrativeExpenseOfPlan"),
+ ("balance", "PlanInvestmentsAtFairValue"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::PlanDefinedContribution);
+ }
+
+ #[test]
+ fn chooses_plan_health_welfare_pack() {
+ let selection = selection_for(&[
+ (
+ "income",
+ "ContributionsReceivedFromEmployersAndParticipants",
+ ),
+ ("income", "PlanAdministrativeExpense"),
+ ("balance", "AccumulatedPostretirementBenefitObligation"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::PlanHealthWelfare);
+ }
+
+ #[test]
+ fn chooses_real_estate_general_pack() {
+ let selection = selection_for(&[
+ ("income", "RealEstateSalesRevenue"),
+ ("income", "PropertyManagementFees"),
+ ("balance", "RealEstateDevelopmentProperty"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::RealEstateGeneral);
+ }
+
+ #[test]
+ fn chooses_real_estate_common_interest_pack() {
+ let selection = selection_for(&[
+ ("income", "AssociationAssessmentRevenue"),
+ ("income", "MaintenanceFees"),
+ ("balance", "ReserveFundAssets"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::RealEstateCommonInterest);
+ }
+
+ #[test]
+ fn chooses_real_estate_retail_land_pack() {
+ let selection = selection_for(&[
+ ("income", "LandSalesRevenue"),
+ ("income", "CostOfLandSold"),
+ ("income", "MarketingExpense"),
+ ("balance", "LandInventory"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::RealEstateRetailLand);
+ }
+
+ #[test]
+ fn chooses_real_estate_time_sharing_pack() {
+ let selection = selection_for(&[
+ ("income", "TimeshareSalesRevenue"),
+ ("income", "TimeshareFinancingIncome"),
+ ("balance", "TimeshareIntervals"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::RealEstateTimeSharing);
+ }
+
+ #[test]
+ fn chooses_software_pack() {
+ let selection = selection_for(&[
+ ("income", "SoftwareLicenseRevenue"),
+ ("income", "SoftwareMaintenanceRevenue"),
+ ("income", "ResearchAndDevelopmentExpense"),
+ ("balance", "DeferredRevenueSoftware"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::Software);
+ }
+
+ #[test]
+ fn chooses_steamship_pack() {
+ let selection = selection_for(&[
+ ("income", "FreightRevenue"),
+ ("income", "BunkerFuelExpense"),
+ ("balance", "Vessels"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::Steamship);
+ }
+
+ #[test]
+ fn prefers_federal_contractors_over_general_construction_when_scores_tie() {
+ let mut rows = empty_map();
+ rows.get_mut("income").unwrap().extend([
+ row_with_role(
+ "FederalContractRevenue",
+ "income",
+ "http://example.com/roles/federal-government-contracts",
+ ),
+ row("ContractRevenue", "income"),
+ row("CostOfGovernmentContracts", "income"),
+ ]);
+ rows.get_mut("balance")
+ .unwrap()
+ .push(row("ContractAssets", "balance"));
+
+ let selection = select_fiscal_pack(&rows, &[]);
+ assert_eq!(selection.pack, FiscalPack::ContractorsFederalGovernment);
+ }
+
+ #[test]
+ fn prefers_mortgage_banking_over_bank_lender_when_both_match() {
+ let selection = selection_for(&[
+ ("income", "MortgageBankingIncome"),
+ ("income", "ServicingFees"),
+ ("balance", "MortgageServicingRights"),
+ ("balance", "DepositsLiabilities"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::MortgageBanking);
+ }
+
+ #[test]
+ fn prefers_title_plant_over_insurance_when_both_match() {
+ let selection = selection_for(&[
+ ("income", "TitleInsuranceRevenue"),
+ ("income", "EscrowFees"),
+ ("balance", "TitlePlantAssets"),
+ ("income", "Premiums"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::TitlePlant);
+ }
+
+ #[test]
+ fn prefers_time_sharing_over_other_real_estate_variants() {
+ let selection = selection_for(&[
+ ("income", "TimeshareSalesRevenue"),
+ ("income", "TimeShareMarketingExpense"),
+ ("balance", "TimeshareIntervals"),
+ ("income", "LandSalesRevenue"),
+ ("income", "AssociationAssessmentRevenue"),
+ ]);
+ assert_eq!(selection.pack, FiscalPack::RealEstateTimeSharing);
+ }
+
+ #[test]
+ fn defaults_to_core_on_low_confidence() {
+ let selection = selection_for(&[("income", "InterestExpense")]);
+ assert_eq!(selection.pack, FiscalPack::Core);
+ assert_eq!(selection.warnings, vec!["fiscal_pack_defaulted_to_core"]);
+ }
}
diff --git a/rust/fiscal-xbrl-core/src/surface_mapper.rs b/rust/fiscal-xbrl-core/src/surface_mapper.rs
index 6001201..e1dbda5 100644
--- a/rust/fiscal-xbrl-core/src/surface_mapper.rs
+++ b/rust/fiscal-xbrl-core/src/surface_mapper.rs
@@ -1762,4 +1762,130 @@ mod tests {
Some(-15.0)
);
}
+
+ #[test]
+ fn maps_software_balance_overrides() {
+ let mut rows = empty_map();
+ rows.get_mut("balance").unwrap().extend([
+ row(
+ "software-costs",
+ "us-gaap:CapitalizedSoftwareCosts",
+ "balance",
+ 55.0,
+ ),
+ row(
+ "software-defrev",
+ "us-gaap:DeferredRevenueSoftware",
+ "balance",
+ 21.0,
+ ),
+ ]);
+
+ let model = build_compact_surface_model(
+ &[period("p1")],
+ &rows,
+ "us-gaap",
+ FiscalPack::Software,
+ vec![],
+ )
+ .expect("compact model should build");
+
+ let balance_rows = model.surface_rows.get("balance").unwrap();
+ let software_costs = balance_rows
+ .iter()
+ .find(|row| row.key == "capitalized_software_costs")
+ .unwrap();
+ let deferred_revenue = balance_rows
+ .iter()
+ .find(|row| row.key == "deferred_revenue")
+ .unwrap();
+
+ assert_eq!(
+ software_costs.values.get("p1").copied().flatten(),
+ Some(55.0)
+ );
+ assert_eq!(
+ deferred_revenue.values.get("p1").copied().flatten(),
+ Some(21.0)
+ );
+ }
+
+ #[test]
+ fn maps_broadcaster_programming_library_balance_row() {
+ let mut rows = empty_map();
+ rows.get_mut("balance").unwrap().push(row(
+ "broadcast-library",
+ "us-gaap:ProgrammingLibrary",
+ "balance",
+ 88.0,
+ ));
+
+ let model = build_compact_surface_model(
+ &[period("p1")],
+ &rows,
+ "us-gaap",
+ FiscalPack::EntertainmentBroadcasters,
+ vec![],
+ )
+ .expect("compact model should build");
+
+ let programming_library = model
+ .surface_rows
+ .get("balance")
+ .unwrap()
+ .iter()
+ .find(|row| row.key == "programming_library")
+ .unwrap();
+
+ assert_eq!(
+ programming_library.values.get("p1").copied().flatten(),
+ Some(88.0)
+ );
+ }
+
+ #[test]
+ fn maps_defined_benefit_plan_balance_rows() {
+ let mut rows = empty_map();
+ rows.get_mut("balance").unwrap().extend([
+ row(
+ "plan-assets",
+ "us-gaap:FairValueOfPlanAssets",
+ "balance",
+ 140.0,
+ ),
+ row(
+ "pbo",
+ "us-gaap:ProjectedBenefitObligation",
+ "balance",
+ 125.0,
+ ),
+ ]);
+
+ let model = build_compact_surface_model(
+ &[period("p1")],
+ &rows,
+ "us-gaap",
+ FiscalPack::PlanDefinedBenefit,
+ vec![],
+ )
+ .expect("compact model should build");
+
+ let plan_assets = model
+ .surface_rows
+ .get("balance")
+ .unwrap()
+ .iter()
+ .find(|row| row.key == "plan_assets")
+ .unwrap();
+ let obligations = model
+ .surface_rows
+ .get("balance")
+ .unwrap()
+ .iter()
+ .find(|row| row.key == "benefit_obligations")
+ .unwrap();
+
+ assert_eq!(plan_assets.values.get("p1").copied().flatten(), Some(140.0));
+ assert_eq!(obligations.values.get("p1").copied().flatten(), Some(125.0));
+ }
}
diff --git a/rust/fiscal-xbrl-core/src/taxonomy_loader.rs b/rust/fiscal-xbrl-core/src/taxonomy_loader.rs
index d747ff6..bf4839b 100644
--- a/rust/fiscal-xbrl-core/src/taxonomy_loader.rs
+++ b/rust/fiscal-xbrl-core/src/taxonomy_loader.rs
@@ -440,4 +440,58 @@ mod tests {
let core_bridge = load_income_bridge(FiscalPack::Core).expect("core bridge should load");
assert_eq!(core_bridge.pack, "core");
}
+
+ #[test]
+ fn loads_all_non_core_pack_assets() {
+ let packs = [
+ FiscalPack::BankLender,
+ FiscalPack::Insurance,
+ FiscalPack::ReitRealEstate,
+ FiscalPack::BrokerAssetManager,
+ FiscalPack::Agriculture,
+ FiscalPack::ContractorsConstruction,
+ FiscalPack::ContractorsFederalGovernment,
+ FiscalPack::DevelopmentStage,
+ FiscalPack::EntertainmentBroadcasters,
+ FiscalPack::EntertainmentCableTelevision,
+ FiscalPack::EntertainmentCasinos,
+ FiscalPack::EntertainmentFilms,
+ FiscalPack::EntertainmentMusic,
+ FiscalPack::ExtractiveMining,
+ FiscalPack::MortgageBanking,
+ FiscalPack::TitlePlant,
+ FiscalPack::Franchisors,
+ FiscalPack::NotForProfit,
+ FiscalPack::PlanDefinedBenefit,
+ FiscalPack::PlanDefinedContribution,
+ FiscalPack::PlanHealthWelfare,
+ FiscalPack::RealEstateGeneral,
+ FiscalPack::RealEstateCommonInterest,
+ FiscalPack::RealEstateRetailLand,
+ FiscalPack::RealEstateTimeSharing,
+ FiscalPack::Software,
+ FiscalPack::Steamship,
+ ];
+
+ for pack in packs {
+ let surface_pack = load_surface_pack(pack)
+ .unwrap_or_else(|error| panic!("surface pack {} failed: {error}", pack.as_str()));
+ assert_eq!(surface_pack.pack, pack.as_str());
+ assert!(
+ !surface_pack.surfaces.is_empty(),
+ "{} should define surfaces",
+ pack.as_str()
+ );
+
+ let bridge = load_income_bridge(pack)
+ .unwrap_or_else(|error| panic!("income bridge {} failed: {error}", pack.as_str()));
+ assert_eq!(bridge.pack, pack.as_str());
+ assert!(bridge.rows.contains_key("revenue"));
+ assert!(bridge.rows.contains_key("net_income"));
+
+ let kpi_pack = load_kpi_pack(pack)
+ .unwrap_or_else(|error| panic!("kpi pack {} failed: {error}", pack.as_str()));
+ assert_eq!(kpi_pack.pack, pack.as_str());
+ }
+ }
}
diff --git a/rust/fiscal-xbrl-core/src/universal_income.rs b/rust/fiscal-xbrl-core/src/universal_income.rs
index 58d6652..f857476 100644
--- a/rust/fiscal-xbrl-core/src/universal_income.rs
+++ b/rust/fiscal-xbrl-core/src/universal_income.rs
@@ -1800,6 +1800,113 @@ mod tests {
assert_eq!(revenue.resolution_method.as_deref(), Some("direct"));
}
+ #[test]
+ fn derives_software_gross_profit_from_revenue_minus_cost_of_software_revenue() {
+ let rows = empty_rows();
+ let mut model = empty_model();
+ model.surface_rows.get_mut("income").unwrap().extend([
+ surface_row("revenue", 150.0),
+ surface_row("cost_of_software_revenue", 45.0),
+ ]);
+
+ apply_universal_income_rows(
+ &[period("p1")],
+ &rows,
+ &[],
+ "us-gaap",
+ FiscalPack::Software,
+ &mut model,
+ )
+ .expect("software universal income rows should build");
+
+ let gross_profit = model
+ .surface_rows
+ .get("income")
+ .unwrap()
+ .iter()
+ .find(|row| row.key == "gross_profit")
+ .unwrap();
+
+ assert_eq!(
+ gross_profit.values.get("p1").copied().flatten(),
+ Some(105.0)
+ );
+ assert_eq!(
+ gross_profit.resolution_method.as_deref(),
+ Some("formula_derived")
+ );
+ }
+
+ #[test]
+ fn derives_development_stage_sga_from_general_and_administrative() {
+ let rows = empty_rows();
+ let mut model = empty_model();
+ model
+ .surface_rows
+ .get_mut("income")
+ .unwrap()
+ .push(surface_row("general_and_administrative", 22.0));
+
+ apply_universal_income_rows(
+ &[period("p1")],
+ &rows,
+ &[],
+ "us-gaap",
+ FiscalPack::DevelopmentStage,
+ &mut model,
+ )
+ .expect("development stage universal income rows should build");
+
+ let sga = model
+ .surface_rows
+ .get("income")
+ .unwrap()
+ .iter()
+ .find(|row| row.key == "selling_general_and_administrative")
+ .unwrap();
+
+ assert_eq!(sga.values.get("p1").copied().flatten(), Some(22.0));
+ assert_eq!(sga.resolution_method.as_deref(), Some("formula_derived"));
+ }
+
+ #[test]
+ fn emits_not_meaningful_not_for_profit_net_income_row() {
+ let rows = empty_rows();
+ let mut model = empty_model();
+ model.surface_rows.get_mut("income").unwrap().extend([
+ surface_row("contribution_revenue", 120.0),
+ surface_row("administrative_expense", 40.0),
+ surface_row("change_in_net_assets", 80.0),
+ ]);
+
+ apply_universal_income_rows(
+ &[period("p1")],
+ &rows,
+ &[],
+ "us-gaap",
+ FiscalPack::NotForProfit,
+ &mut model,
+ )
+ .expect("not-for-profit universal income rows should build");
+
+ let net_income = model
+ .surface_rows
+ .get("income")
+ .unwrap()
+ .iter()
+ .find(|row| row.key == "net_income")
+ .unwrap();
+
+ assert_eq!(net_income.values.get("p1").copied().flatten(), None);
+ assert_eq!(
+ net_income.resolution_method.as_deref(),
+ Some("not_meaningful")
+ );
+ assert!(net_income
+ .warning_codes
+ .contains(&"net_income_not_meaningful_not_for_profit".to_string()));
+ }
+
#[test]
fn derives_income_tax_expense_from_pretax_income_minus_net_income() {
let mut rows = empty_rows();
diff --git a/rust/taxonomy/fiscal/v1/agriculture.income-bridge.json b/rust/taxonomy/fiscal/v1/agriculture.income-bridge.json
new file mode 100644
index 0000000..ebb3a29
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/agriculture.income-bridge.json
@@ -0,0 +1,295 @@
+{
+ "version": "fiscal-v1",
+ "pack": "agriculture",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:RevenueFromAgriculturalCrops",
+ "us-gaap:CropSalesRevenue",
+ "us-gaap:LivestockSalesRevenue",
+ "us-gaap:RevenueFromLivestock"
+ ],
+ "direct_source_concepts": [
+ "RevenueFromAgriculturalCrops",
+ "CropSalesRevenue",
+ "LivestockSalesRevenue",
+ "RevenueFromLivestock"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "crop_revenue",
+ "livestock_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_agriculture"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfAgriculturalInputs",
+ "us-gaap:FeedAndFeedAdditivesExpense",
+ "us-gaap:DepreciationDepletionAndAmortization"
+ ],
+ "direct_source_concepts": [
+ "CostOfAgriculturalInputs",
+ "FeedAndFeedAdditivesExpense",
+ "DepreciationDepletionAndAmortization"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "production_inputs_expense",
+ "depreciation_amortization"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/agriculture.surface.json b/rust/taxonomy/fiscal/v1/agriculture.surface.json
new file mode 100644
index 0000000..e59cb24
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/agriculture.surface.json
@@ -0,0 +1,232 @@
+{
+ "version": "fiscal-v1",
+ "pack": "agriculture",
+ "surfaces": [
+ {
+ "surface_key": "crop_revenue",
+ "statement": "income",
+ "label": "Crop Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RevenueFromAgriculturalCrops",
+ "us-gaap:CropSalesRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RevenueFromAgriculturalCrops",
+ "us-gaap:CropSalesRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "livestock_revenue",
+ "statement": "income",
+ "label": "Livestock Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:LivestockSalesRevenue",
+ "us-gaap:RevenueFromLivestock"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:LivestockSalesRevenue",
+ "us-gaap:RevenueFromLivestock"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "production_inputs_expense",
+ "statement": "income",
+ "label": "Production Inputs",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CostOfAgriculturalInputs",
+ "us-gaap:FeedAndFeedAdditivesExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CostOfAgriculturalInputs",
+ "us-gaap:FeedAndFeedAdditivesExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "agricultural_inventory_change",
+ "statement": "income",
+ "label": "Change in Agricultural Inventory",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:IncreaseDecreaseInAgriculturalInventory",
+ "us-gaap:ChangeInBiologicalAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:IncreaseDecreaseInAgriculturalInventory",
+ "us-gaap:ChangeInBiologicalAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "depreciation_amortization",
+ "statement": "income",
+ "label": "Depreciation & Amortization",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "biological_assets",
+ "statement": "balance",
+ "label": "Biological Assets",
+ "category": "current_assets",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:BiologicalAssetsCurrent",
+ "us-gaap:BiologicalAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:BiologicalAssetsCurrent",
+ "us-gaap:BiologicalAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "property_plant_equipment",
+ "statement": "balance",
+ "label": "Property, Plant & Equipment",
+ "category": "noncurrent_assets",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PropertyPlantAndEquipmentNet"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PropertyPlantAndEquipmentNet"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/contractors_construction.income-bridge.json b/rust/taxonomy/fiscal/v1/contractors_construction.income-bridge.json
new file mode 100644
index 0000000..7ba1bc1
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/contractors_construction.income-bridge.json
@@ -0,0 +1,293 @@
+{
+ "version": "fiscal-v1",
+ "pack": "contractors_construction",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:RevenueFromConstructionContracts",
+ "us-gaap:ContractRevenue"
+ ],
+ "direct_source_concepts": [
+ "RevenueFromConstructionContracts",
+ "ContractRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "contract_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "direct_source_concepts": [
+ "GrossProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "revenue"
+ ],
+ "negative": [
+ "cost_of_contract_revenue"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "gross_profit_formula_derived"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "direct_source_concepts": [
+ "OperatingExpenses"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/contractors_construction.surface.json b/rust/taxonomy/fiscal/v1/contractors_construction.surface.json
new file mode 100644
index 0000000..059e764
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/contractors_construction.surface.json
@@ -0,0 +1,237 @@
+{
+ "version": "fiscal-v1",
+ "pack": "contractors_construction",
+ "surfaces": [
+ {
+ "surface_key": "contract_revenue",
+ "statement": "income",
+ "label": "Construction Contract Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RevenueFromConstructionContracts",
+ "us-gaap:ContractRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RevenueFromConstructionContracts",
+ "us-gaap:ContractRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "cost_of_contract_revenue",
+ "statement": "income",
+ "label": "Cost of Contract Revenue",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CostOfContractRevenue",
+ "us-gaap:CostsIncurredOnContracts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CostOfContractRevenue",
+ "us-gaap:CostsIncurredOnContracts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "gross_profit",
+ "statement": "income",
+ "label": "Gross Profit",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "formula_fallback": {
+ "op": "subtract",
+ "sources": [
+ "contract_revenue",
+ "cost_of_contract_revenue"
+ ],
+ "treat_null_as_zero": false
+ },
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_expenses",
+ "statement": "income",
+ "label": "Operating Expenses",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 50,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "construction_in_progress",
+ "statement": "balance",
+ "label": "Construction in Progress",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ConstructionInProgress",
+ "us-gaap:ContractAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ConstructionInProgress",
+ "us-gaap:ContractAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "contract_assets",
+ "statement": "balance",
+ "label": "Contract Assets",
+ "category": "current_assets",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContractAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContractAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "contract_liabilities",
+ "statement": "balance",
+ "label": "Contract Liabilities",
+ "category": "current_liabilities",
+ "order": 75,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContractLiabilities",
+ "us-gaap:BillingsInExcessOfCostsAndEstimatedEarnings"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContractLiabilities",
+ "us-gaap:BillingsInExcessOfCostsAndEstimatedEarnings"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/contractors_federal_government.income-bridge.json b/rust/taxonomy/fiscal/v1/contractors_federal_government.income-bridge.json
new file mode 100644
index 0000000..8cb5a9e
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/contractors_federal_government.income-bridge.json
@@ -0,0 +1,295 @@
+{
+ "version": "fiscal-v1",
+ "pack": "contractors_federal_government",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:RevenueFromGovernmentContracts",
+ "us-gaap:FederalContractRevenue"
+ ],
+ "direct_source_concepts": [
+ "RevenueFromGovernmentContracts",
+ "FederalContractRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "federal_contract_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "direct_source_concepts": [
+ "GrossProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "revenue"
+ ],
+ "negative": [
+ "cost_of_federal_contracts"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "gross_profit_formula_derived"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfGovernmentContracts",
+ "us-gaap:CostOfFederalContracts"
+ ],
+ "direct_source_concepts": [
+ "CostOfGovernmentContracts",
+ "CostOfFederalContracts"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "cost_of_federal_contracts"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/contractors_federal_government.surface.json b/rust/taxonomy/fiscal/v1/contractors_federal_government.surface.json
new file mode 100644
index 0000000..68f0bb0
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/contractors_federal_government.surface.json
@@ -0,0 +1,197 @@
+{
+ "version": "fiscal-v1",
+ "pack": "contractors_federal_government",
+ "surfaces": [
+ {
+ "surface_key": "federal_contract_revenue",
+ "statement": "income",
+ "label": "Federal Contract Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RevenueFromGovernmentContracts",
+ "us-gaap:FederalContractRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RevenueFromGovernmentContracts",
+ "us-gaap:FederalContractRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "cost_of_federal_contracts",
+ "statement": "income",
+ "label": "Cost of Federal Contracts",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CostOfGovernmentContracts",
+ "us-gaap:CostOfFederalContracts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CostOfGovernmentContracts",
+ "us-gaap:CostOfFederalContracts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "gross_profit",
+ "statement": "income",
+ "label": "Gross Profit",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "formula_fallback": {
+ "op": "subtract",
+ "sources": [
+ "federal_contract_revenue",
+ "cost_of_federal_contracts"
+ ],
+ "treat_null_as_zero": false
+ },
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 50,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "contract_assets",
+ "statement": "balance",
+ "label": "Contract Assets",
+ "category": "current_assets",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContractAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContractAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "contract_liabilities",
+ "statement": "balance",
+ "label": "Contract Liabilities",
+ "category": "current_liabilities",
+ "order": 75,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContractLiabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContractLiabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/development_stage.income-bridge.json b/rust/taxonomy/fiscal/v1/development_stage.income-bridge.json
new file mode 100644
index 0000000..b72086a
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/development_stage.income-bridge.json
@@ -0,0 +1,274 @@
+{
+ "version": "fiscal-v1",
+ "pack": "development_stage",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:RevenueFromDevelopmentStageOperations",
+ "us-gaap:OtherIncome"
+ ],
+ "direct_source_concepts": [
+ "RevenueFromDevelopmentStageOperations",
+ "OtherIncome"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "development_stage_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_development_stage"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense",
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense",
+ "GeneralAndAdministrativeExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "research_and_development",
+ "general_and_administrative"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ],
+ "direct_source_concepts": [
+ "GeneralAndAdministrativeExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "general_and_administrative"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "research_and_development_formula_derived"
+ ]
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/development_stage.surface.json b/rust/taxonomy/fiscal/v1/development_stage.surface.json
new file mode 100644
index 0000000..cd9e69e
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/development_stage.surface.json
@@ -0,0 +1,118 @@
+{
+ "version": "fiscal-v1",
+ "pack": "development_stage",
+ "surfaces": [
+ {
+ "surface_key": "development_stage_revenue",
+ "statement": "income",
+ "label": "Development Stage Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RevenueFromDevelopmentStageOperations",
+ "us-gaap:OtherIncome"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RevenueFromDevelopmentStageOperations",
+ "us-gaap:OtherIncome"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "research_and_development",
+ "statement": "income",
+ "label": "Research & Development Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "general_and_administrative",
+ "statement": "income",
+ "label": "General & Administrative Expense",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_loss",
+ "statement": "income",
+ "label": "Net Loss",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "accumulated_deficit",
+ "statement": "balance",
+ "label": "Accumulated Deficit",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:AccumulatedDeficit"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AccumulatedDeficit"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "capitalized_development_costs",
+ "statement": "balance",
+ "label": "Capitalized Development Costs",
+ "category": "noncurrent_assets",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CapitalizedDevelopmentCosts",
+ "us-gaap:CapitalizedSoftwareDevelopmentCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CapitalizedDevelopmentCosts",
+ "us-gaap:CapitalizedSoftwareDevelopmentCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_broadcasters.income-bridge.json b/rust/taxonomy/fiscal/v1/entertainment_broadcasters.income-bridge.json
new file mode 100644
index 0000000..94664d3
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_broadcasters.income-bridge.json
@@ -0,0 +1,302 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_broadcasters",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:BroadcastingRevenue",
+ "us-gaap:AdvertisingRevenueBroadcasting",
+ "us-gaap:NetworkRevenue",
+ "us-gaap:LicenseFeeRevenue",
+ "us-gaap:SyndicationRevenue"
+ ],
+ "direct_source_concepts": [
+ "BroadcastingRevenue",
+ "AdvertisingRevenueBroadcasting",
+ "NetworkRevenue",
+ "LicenseFeeRevenue",
+ "SyndicationRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "broadcasting_revenue",
+ "license_fee_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_entertainment_broadcasters"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ProductionExpense",
+ "us-gaap:ContentProductionCosts",
+ "us-gaap:ProgrammingRightsCosts",
+ "us-gaap:AmortizationOfProgrammingRights",
+ "us-gaap:DepreciationDepletionAndAmortization"
+ ],
+ "direct_source_concepts": [
+ "ProductionExpense",
+ "ContentProductionCosts",
+ "ProgrammingRightsCosts",
+ "AmortizationOfProgrammingRights",
+ "DepreciationDepletionAndAmortization"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "production_costs",
+ "programming_costs",
+ "depreciation_amortization"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_broadcasters.surface.json b/rust/taxonomy/fiscal/v1/entertainment_broadcasters.surface.json
new file mode 100644
index 0000000..942679f
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_broadcasters.surface.json
@@ -0,0 +1,216 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_broadcasters",
+ "surfaces": [
+ {
+ "surface_key": "broadcasting_revenue",
+ "statement": "income",
+ "label": "Broadcasting & Advertising Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:BroadcastingRevenue",
+ "us-gaap:AdvertisingRevenueBroadcasting",
+ "us-gaap:NetworkRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:BroadcastingRevenue",
+ "us-gaap:AdvertisingRevenueBroadcasting",
+ "us-gaap:NetworkRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "license_fee_revenue",
+ "statement": "income",
+ "label": "License & Syndication Fee Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:LicenseFeeRevenue",
+ "us-gaap:SyndicationRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:LicenseFeeRevenue",
+ "us-gaap:SyndicationRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "production_costs",
+ "statement": "income",
+ "label": "Production Costs",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProductionExpense",
+ "us-gaap:ContentProductionCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProductionExpense",
+ "us-gaap:ContentProductionCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "programming_costs",
+ "statement": "income",
+ "label": "Programming & Rights Costs",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProgrammingRightsCosts",
+ "us-gaap:AmortizationOfProgrammingRights"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProgrammingRightsCosts",
+ "us-gaap:AmortizationOfProgrammingRights"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "depreciation_amortization",
+ "statement": "income",
+ "label": "Depreciation & Amortization",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "programming_library",
+ "statement": "balance",
+ "label": "Programming & Content Library",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProgrammingLibrary",
+ "us-gaap:FilmAndBroadcastRights"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProgrammingLibrary",
+ "us-gaap:FilmAndBroadcastRights"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_cable_television.income-bridge.json b/rust/taxonomy/fiscal/v1/entertainment_cable_television.income-bridge.json
new file mode 100644
index 0000000..e5d3e88
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_cable_television.income-bridge.json
@@ -0,0 +1,302 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_cable_television",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SubscriptionRevenue",
+ "us-gaap:CableSubscriptionRevenue",
+ "us-gaap:SubscriberRevenue",
+ "us-gaap:AdvertisingRevenue",
+ "us-gaap:SponsorshipRevenue"
+ ],
+ "direct_source_concepts": [
+ "SubscriptionRevenue",
+ "CableSubscriptionRevenue",
+ "SubscriberRevenue",
+ "AdvertisingRevenue",
+ "SponsorshipRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "subscription_revenue",
+ "advertising_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_entertainment_cable_television"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ProgrammingCosts",
+ "us-gaap:ProgrammingExpense",
+ "us-gaap:NetworkOperationsExpense",
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepreciationOfCableEquipment"
+ ],
+ "direct_source_concepts": [
+ "ProgrammingCosts",
+ "ProgrammingExpense",
+ "NetworkOperationsExpense",
+ "DepreciationDepletionAndAmortization",
+ "DepreciationOfCableEquipment"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "programming_expense",
+ "network_operations_expense",
+ "depreciation_amortization"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_cable_television.surface.json b/rust/taxonomy/fiscal/v1/entertainment_cable_television.surface.json
new file mode 100644
index 0000000..2c47ad3
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_cable_television.surface.json
@@ -0,0 +1,218 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_cable_television",
+ "surfaces": [
+ {
+ "surface_key": "subscription_revenue",
+ "statement": "income",
+ "label": "Subscription Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:SubscriptionRevenue",
+ "us-gaap:CableSubscriptionRevenue",
+ "us-gaap:SubscriberRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:SubscriptionRevenue",
+ "us-gaap:CableSubscriptionRevenue",
+ "us-gaap:SubscriberRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "advertising_revenue",
+ "statement": "income",
+ "label": "Advertising & Sponsorship Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AdvertisingRevenue",
+ "us-gaap:SponsorshipRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AdvertisingRevenue",
+ "us-gaap:SponsorshipRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "programming_expense",
+ "statement": "income",
+ "label": "Programming Expense",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProgrammingCosts",
+ "us-gaap:ProgrammingExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProgrammingCosts",
+ "us-gaap:ProgrammingExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "network_operations_expense",
+ "statement": "income",
+ "label": "Network Operations Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:NetworkOperationsExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetworkOperationsExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "depreciation_amortization",
+ "statement": "income",
+ "label": "Depreciation & Amortization",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepreciationOfCableEquipment"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepreciationOfCableEquipment"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "cable_networks_and_equipment",
+ "statement": "balance",
+ "label": "Cable Networks & Equipment",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CableNetworks",
+ "us-gaap:SubscriberEquipment",
+ "us-gaap:NetworkInfrastructure"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CableNetworks",
+ "us-gaap:SubscriberEquipment",
+ "us-gaap:NetworkInfrastructure"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_casinos.income-bridge.json b/rust/taxonomy/fiscal/v1/entertainment_casinos.income-bridge.json
new file mode 100644
index 0000000..e085c03
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_casinos.income-bridge.json
@@ -0,0 +1,304 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_casinos",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GamingRevenue",
+ "us-gaap:CasinoGamingRevenue",
+ "us-gaap:HotelRevenue",
+ "us-gaap:ResortRevenue",
+ "us-gaap:LodgingRevenue",
+ "us-gaap:FoodAndBeverageRevenue"
+ ],
+ "direct_source_concepts": [
+ "GamingRevenue",
+ "CasinoGamingRevenue",
+ "HotelRevenue",
+ "ResortRevenue",
+ "LodgingRevenue",
+ "FoodAndBeverageRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gaming_revenue",
+ "hotel_and_resort_revenue",
+ "food_and_beverage_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_entertainment_casinos"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GamingTaxes",
+ "us-gaap:GamingLicenseFees",
+ "us-gaap:GamingLicenseExpense",
+ "us-gaap:OperatingExpenses",
+ "us-gaap:CasinoOperatingExpenses"
+ ],
+ "direct_source_concepts": [
+ "GamingTaxes",
+ "GamingLicenseFees",
+ "GamingLicenseExpense",
+ "OperatingExpenses",
+ "CasinoOperatingExpenses"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gaming_taxes_and_licenses_expense",
+ "operating_expenses"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_casinos.surface.json b/rust/taxonomy/fiscal/v1/entertainment_casinos.surface.json
new file mode 100644
index 0000000..1c03629
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_casinos.surface.json
@@ -0,0 +1,238 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_casinos",
+ "surfaces": [
+ {
+ "surface_key": "gaming_revenue",
+ "statement": "income",
+ "label": "Gaming Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:GamingRevenue",
+ "us-gaap:CasinoGamingRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GamingRevenue",
+ "us-gaap:CasinoGamingRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "hotel_and_resort_revenue",
+ "statement": "income",
+ "label": "Hotel & Resort Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:HotelRevenue",
+ "us-gaap:ResortRevenue",
+ "us-gaap:LodgingRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:HotelRevenue",
+ "us-gaap:ResortRevenue",
+ "us-gaap:LodgingRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "food_and_beverage_revenue",
+ "statement": "income",
+ "label": "Food & Beverage Revenue",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FoodAndBeverageRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FoodAndBeverageRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "gaming_taxes_and_licenses_expense",
+ "statement": "income",
+ "label": "Gaming Taxes & Licenses",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:GamingTaxes",
+ "us-gaap:GamingLicenseFees",
+ "us-gaap:GamingLicenseExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GamingTaxes",
+ "us-gaap:GamingLicenseFees",
+ "us-gaap:GamingLicenseExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_expenses",
+ "statement": "income",
+ "label": "Operating Expenses",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingExpenses",
+ "us-gaap:CasinoOperatingExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingExpenses",
+ "us-gaap:CasinoOperatingExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "casino_properties",
+ "statement": "balance",
+ "label": "Casino & Resort Properties",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CasinoProperties",
+ "us-gaap:HotelAndCasinoPropertyAndEquipment"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CasinoProperties",
+ "us-gaap:HotelAndCasinoPropertyAndEquipment"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "gaming_tax_liability",
+ "statement": "balance",
+ "label": "Gaming Tax Liability",
+ "category": "current_liabilities",
+ "order": 75,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:GamingTaxLiability",
+ "us-gaap:AccruedGamingTaxes"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GamingTaxLiability",
+ "us-gaap:AccruedGamingTaxes"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_films.income-bridge.json b/rust/taxonomy/fiscal/v1/entertainment_films.income-bridge.json
new file mode 100644
index 0000000..c5d8c68
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_films.income-bridge.json
@@ -0,0 +1,299 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_films",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:FilmRevenue",
+ "us-gaap:FilmDistributionRevenue",
+ "us-gaap:TheatricalRevenue"
+ ],
+ "direct_source_concepts": [
+ "FilmRevenue",
+ "FilmDistributionRevenue",
+ "TheatricalRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "film_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_entertainment_films"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:FilmProductionCosts",
+ "us-gaap:ProductionExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:DistributionExpense",
+ "us-gaap:AmortizationOfFilmCosts",
+ "us-gaap:AmortizationOfProductionCosts"
+ ],
+ "direct_source_concepts": [
+ "FilmProductionCosts",
+ "ProductionExpense",
+ "MarketingExpense",
+ "DistributionExpense",
+ "AmortizationOfFilmCosts",
+ "AmortizationOfProductionCosts"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "production_expense",
+ "marketing_and_distribution_expense",
+ "amortization_of_film_costs"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_films.surface.json b/rust/taxonomy/fiscal/v1/entertainment_films.surface.json
new file mode 100644
index 0000000..034889e
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_films.surface.json
@@ -0,0 +1,198 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_films",
+ "surfaces": [
+ {
+ "surface_key": "film_revenue",
+ "statement": "income",
+ "label": "Film Distribution Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FilmRevenue",
+ "us-gaap:FilmDistributionRevenue",
+ "us-gaap:TheatricalRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FilmRevenue",
+ "us-gaap:FilmDistributionRevenue",
+ "us-gaap:TheatricalRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "production_expense",
+ "statement": "income",
+ "label": "Production Expense",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FilmProductionCosts",
+ "us-gaap:ProductionExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FilmProductionCosts",
+ "us-gaap:ProductionExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "marketing_and_distribution_expense",
+ "statement": "income",
+ "label": "Marketing & Distribution Expense",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MarketingExpense",
+ "us-gaap:DistributionExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MarketingExpense",
+ "us-gaap:DistributionExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "amortization_of_film_costs",
+ "statement": "income",
+ "label": "Amortization of Film Costs",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AmortizationOfFilmCosts",
+ "us-gaap:AmortizationOfProductionCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AmortizationOfFilmCosts",
+ "us-gaap:AmortizationOfProductionCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "film_costs_capitalized",
+ "statement": "balance",
+ "label": "Film Costs Capitalized",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FilmCosts",
+ "us-gaap:CapitalizedFilmCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FilmCosts",
+ "us-gaap:CapitalizedFilmCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_music.income-bridge.json b/rust/taxonomy/fiscal/v1/entertainment_music.income-bridge.json
new file mode 100644
index 0000000..647d760
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_music.income-bridge.json
@@ -0,0 +1,292 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_music",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:MusicRoyaltiesRevenue",
+ "us-gaap:LicensingRevenueMusic"
+ ],
+ "direct_source_concepts": [
+ "MusicRoyaltiesRevenue",
+ "LicensingRevenueMusic"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "music_royalties_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_entertainment_music"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ArtistAdvances",
+ "us-gaap:AdvancesToArtists",
+ "us-gaap:AmortizationOfMusicCatalog",
+ "us-gaap:AmortizationOfRecordCatalog"
+ ],
+ "direct_source_concepts": [
+ "ArtistAdvances",
+ "AdvancesToArtists",
+ "AmortizationOfMusicCatalog",
+ "AmortizationOfRecordCatalog"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "artist_advance_expense",
+ "amortization_of_music_catalog"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/entertainment_music.surface.json b/rust/taxonomy/fiscal/v1/entertainment_music.surface.json
new file mode 100644
index 0000000..1b4df69
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/entertainment_music.surface.json
@@ -0,0 +1,176 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_music",
+ "surfaces": [
+ {
+ "surface_key": "music_royalties_revenue",
+ "statement": "income",
+ "label": "Music Royalties & Licensing Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MusicRoyaltiesRevenue",
+ "us-gaap:LicensingRevenueMusic"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MusicRoyaltiesRevenue",
+ "us-gaap:LicensingRevenueMusic"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "artist_advance_expense",
+ "statement": "income",
+ "label": "Artist Advances & Contract Costs",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ArtistAdvances",
+ "us-gaap:AdvancesToArtists"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ArtistAdvances",
+ "us-gaap:AdvancesToArtists"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "amortization_of_music_catalog",
+ "statement": "income",
+ "label": "Amortization of Music Catalog",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AmortizationOfMusicCatalog",
+ "us-gaap:AmortizationOfRecordCatalog"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AmortizationOfMusicCatalog",
+ "us-gaap:AmortizationOfRecordCatalog"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "music_catalog",
+ "statement": "balance",
+ "label": "Music Catalog (Net)",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MusicCatalog",
+ "us-gaap:RecordCatalogNet"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MusicCatalog",
+ "us-gaap:RecordCatalogNet"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/extractive_mining.income-bridge.json b/rust/taxonomy/fiscal/v1/extractive_mining.income-bridge.json
new file mode 100644
index 0000000..fafb4b6
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/extractive_mining.income-bridge.json
@@ -0,0 +1,300 @@
+{
+ "version": "fiscal-v1",
+ "pack": "extractive_mining",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:MiningRevenue",
+ "us-gaap:MetalsAndMineralsSales"
+ ],
+ "direct_source_concepts": [
+ "MiningRevenue",
+ "MetalsAndMineralsSales"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "mining_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "direct_source_concepts": [
+ "GrossProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "revenue"
+ ],
+ "negative": [
+ "production_costs"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "gross_profit_formula_derived"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ExplorationCostsMining",
+ "us-gaap:ExplorationExpense",
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepletionOfNaturalResources"
+ ],
+ "direct_source_concepts": [
+ "ExplorationCostsMining",
+ "ExplorationExpense",
+ "DepreciationDepletionAndAmortization",
+ "DepletionOfNaturalResources"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "exploration_expense",
+ "depreciation_depletion_amortization"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/extractive_mining.surface.json b/rust/taxonomy/fiscal/v1/extractive_mining.surface.json
new file mode 100644
index 0000000..dd10aae
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/extractive_mining.surface.json
@@ -0,0 +1,216 @@
+{
+ "version": "fiscal-v1",
+ "pack": "extractive_mining",
+ "surfaces": [
+ {
+ "surface_key": "mining_revenue",
+ "statement": "income",
+ "label": "Mining Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MiningRevenue",
+ "us-gaap:MetalsAndMineralsSales"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MiningRevenue",
+ "us-gaap:MetalsAndMineralsSales"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "production_costs",
+ "statement": "income",
+ "label": "Production Costs",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProductionCostOfMining",
+ "us-gaap:MiningOperatingCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProductionCostOfMining",
+ "us-gaap:MiningOperatingCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "exploration_expense",
+ "statement": "income",
+ "label": "Exploration Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ExplorationCostsMining",
+ "us-gaap:ExplorationExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ExplorationCostsMining",
+ "us-gaap:ExplorationExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "depreciation_depletion_amortization",
+ "statement": "income",
+ "label": "Depreciation, Depletion & Amortization",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepletionOfNaturalResources"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepletionOfNaturalResources"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "mining_properties",
+ "statement": "balance",
+ "label": "Mining Properties (Net)",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MiningProperties",
+ "us-gaap:MineralProperties"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MiningProperties",
+ "us-gaap:MineralProperties"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "rehabilitation_liabilities",
+ "statement": "balance",
+ "label": "Rehabilitation & Closure Liabilities",
+ "category": "noncurrent_liabilities",
+ "order": 80,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RehabilitationProvision",
+ "us-gaap:MineClosureReserve"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RehabilitationProvision",
+ "us-gaap:MineClosureReserve"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/franchisors.income-bridge.json b/rust/taxonomy/fiscal/v1/franchisors.income-bridge.json
new file mode 100644
index 0000000..ccb7334
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/franchisors.income-bridge.json
@@ -0,0 +1,302 @@
+{
+ "version": "fiscal-v1",
+ "pack": "franchisors",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:FranchiseFeesRevenue",
+ "us-gaap:InitialFranchiseFees",
+ "us-gaap:FranchiseRoyaltiesRevenue",
+ "us-gaap:ContinuingFranchiseFees",
+ "us-gaap:AdvertisingFundRevenue",
+ "us-gaap:MarketingFundRevenue"
+ ],
+ "direct_source_concepts": [
+ "FranchiseFeesRevenue",
+ "InitialFranchiseFees",
+ "FranchiseRoyaltiesRevenue",
+ "ContinuingFranchiseFees",
+ "AdvertisingFundRevenue",
+ "MarketingFundRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "franchise_fees_revenue",
+ "royalty_revenue",
+ "advertising_fund_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_franchisors"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:AdvertisingFundExpense",
+ "us-gaap:MarketingFundExpense",
+ "us-gaap:FranchiseSupportServicesExpense",
+ "us-gaap:TrainingAndSupportExpense"
+ ],
+ "direct_source_concepts": [
+ "AdvertisingFundExpense",
+ "MarketingFundExpense",
+ "FranchiseSupportServicesExpense",
+ "TrainingAndSupportExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "advertising_expense",
+ "support_services_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/franchisors.surface.json b/rust/taxonomy/fiscal/v1/franchisors.surface.json
new file mode 100644
index 0000000..925db88
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/franchisors.surface.json
@@ -0,0 +1,236 @@
+{
+ "version": "fiscal-v1",
+ "pack": "franchisors",
+ "surfaces": [
+ {
+ "surface_key": "franchise_fees_revenue",
+ "statement": "income",
+ "label": "Franchise Fees Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FranchiseFeesRevenue",
+ "us-gaap:InitialFranchiseFees"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FranchiseFeesRevenue",
+ "us-gaap:InitialFranchiseFees"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "royalty_revenue",
+ "statement": "income",
+ "label": "Royalty Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FranchiseRoyaltiesRevenue",
+ "us-gaap:ContinuingFranchiseFees"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FranchiseRoyaltiesRevenue",
+ "us-gaap:ContinuingFranchiseFees"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "advertising_fund_revenue",
+ "statement": "income",
+ "label": "Advertising Fund Revenue",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AdvertisingFundRevenue",
+ "us-gaap:MarketingFundRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AdvertisingFundRevenue",
+ "us-gaap:MarketingFundRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "advertising_expense",
+ "statement": "income",
+ "label": "Advertising Fund Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AdvertisingFundExpense",
+ "us-gaap:MarketingFundExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AdvertisingFundExpense",
+ "us-gaap:MarketingFundExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "support_services_expense",
+ "statement": "income",
+ "label": "Support Services Expense",
+ "category": "surface",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FranchiseSupportServicesExpense",
+ "us-gaap:TrainingAndSupportExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FranchiseSupportServicesExpense",
+ "us-gaap:TrainingAndSupportExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "franchise_intangibles",
+ "statement": "balance",
+ "label": "Franchise Agreements & Intangible Assets",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FranchiseAgreementsIntangibleAssets",
+ "us-gaap:FranchiseRights"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FranchiseAgreementsIntangibleAssets",
+ "us-gaap:FranchiseRights"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "deferred_franchise_fees",
+ "statement": "balance",
+ "label": "Deferred Franchise Fees",
+ "category": "current_liabilities",
+ "order": 75,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DeferredFranchiseFees",
+ "us-gaap:DeferredRevenueFranchiseFees"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DeferredFranchiseFees",
+ "us-gaap:DeferredRevenueFranchiseFees"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/agriculture.kpis.json b/rust/taxonomy/fiscal/v1/kpis/agriculture.kpis.json
new file mode 100644
index 0000000..f8a4523
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/agriculture.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "agriculture",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/contractors_construction.kpis.json b/rust/taxonomy/fiscal/v1/kpis/contractors_construction.kpis.json
new file mode 100644
index 0000000..5fe2fcc
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/contractors_construction.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "contractors_construction",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/contractors_federal_government.kpis.json b/rust/taxonomy/fiscal/v1/kpis/contractors_federal_government.kpis.json
new file mode 100644
index 0000000..916e241
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/contractors_federal_government.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "contractors_federal_government",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/development_stage.kpis.json b/rust/taxonomy/fiscal/v1/kpis/development_stage.kpis.json
new file mode 100644
index 0000000..0e0d026
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/development_stage.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "development_stage",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/entertainment_broadcasters.kpis.json b/rust/taxonomy/fiscal/v1/kpis/entertainment_broadcasters.kpis.json
new file mode 100644
index 0000000..e27dd26
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/entertainment_broadcasters.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_broadcasters",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/entertainment_cable_television.kpis.json b/rust/taxonomy/fiscal/v1/kpis/entertainment_cable_television.kpis.json
new file mode 100644
index 0000000..ea0a3d2
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/entertainment_cable_television.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_cable_television",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/entertainment_casinos.kpis.json b/rust/taxonomy/fiscal/v1/kpis/entertainment_casinos.kpis.json
new file mode 100644
index 0000000..0575f59
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/entertainment_casinos.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_casinos",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/entertainment_films.kpis.json b/rust/taxonomy/fiscal/v1/kpis/entertainment_films.kpis.json
new file mode 100644
index 0000000..cbc7581
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/entertainment_films.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_films",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/entertainment_music.kpis.json b/rust/taxonomy/fiscal/v1/kpis/entertainment_music.kpis.json
new file mode 100644
index 0000000..add49aa
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/entertainment_music.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "entertainment_music",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/extractive_mining.kpis.json b/rust/taxonomy/fiscal/v1/kpis/extractive_mining.kpis.json
new file mode 100644
index 0000000..4dbd350
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/extractive_mining.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "extractive_mining",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/franchisors.kpis.json b/rust/taxonomy/fiscal/v1/kpis/franchisors.kpis.json
new file mode 100644
index 0000000..2a8490f
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/franchisors.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "franchisors",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/mortgage_banking.kpis.json b/rust/taxonomy/fiscal/v1/kpis/mortgage_banking.kpis.json
new file mode 100644
index 0000000..322a3a9
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/mortgage_banking.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "mortgage_banking",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/not_for_profit.kpis.json b/rust/taxonomy/fiscal/v1/kpis/not_for_profit.kpis.json
new file mode 100644
index 0000000..6df7272
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/not_for_profit.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "not_for_profit",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/plan_defined_benefit.kpis.json b/rust/taxonomy/fiscal/v1/kpis/plan_defined_benefit.kpis.json
new file mode 100644
index 0000000..d001fde
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/plan_defined_benefit.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_defined_benefit",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/plan_defined_contribution.kpis.json b/rust/taxonomy/fiscal/v1/kpis/plan_defined_contribution.kpis.json
new file mode 100644
index 0000000..4ee11e9
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/plan_defined_contribution.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_defined_contribution",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/plan_health_welfare.kpis.json b/rust/taxonomy/fiscal/v1/kpis/plan_health_welfare.kpis.json
new file mode 100644
index 0000000..7e8ca9a
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/plan_health_welfare.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_health_welfare",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/real_estate_common_interest.kpis.json b/rust/taxonomy/fiscal/v1/kpis/real_estate_common_interest.kpis.json
new file mode 100644
index 0000000..6cb7039
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/real_estate_common_interest.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_common_interest",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/real_estate_general.kpis.json b/rust/taxonomy/fiscal/v1/kpis/real_estate_general.kpis.json
new file mode 100644
index 0000000..c0c5379
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/real_estate_general.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_general",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/real_estate_retail_land.kpis.json b/rust/taxonomy/fiscal/v1/kpis/real_estate_retail_land.kpis.json
new file mode 100644
index 0000000..5388e13
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/real_estate_retail_land.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_retail_land",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/real_estate_time_sharing.kpis.json b/rust/taxonomy/fiscal/v1/kpis/real_estate_time_sharing.kpis.json
new file mode 100644
index 0000000..25792b9
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/real_estate_time_sharing.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_time_sharing",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/software.kpis.json b/rust/taxonomy/fiscal/v1/kpis/software.kpis.json
new file mode 100644
index 0000000..494f235
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/software.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "software",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/steamship.kpis.json b/rust/taxonomy/fiscal/v1/kpis/steamship.kpis.json
new file mode 100644
index 0000000..98d65f0
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/steamship.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "steamship",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/kpis/title_plant.kpis.json b/rust/taxonomy/fiscal/v1/kpis/title_plant.kpis.json
new file mode 100644
index 0000000..df75f65
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/kpis/title_plant.kpis.json
@@ -0,0 +1,5 @@
+{
+ "version": "fiscal-v1",
+ "pack": "title_plant",
+ "kpis": []
+}
diff --git a/rust/taxonomy/fiscal/v1/mortgage_banking.income-bridge.json b/rust/taxonomy/fiscal/v1/mortgage_banking.income-bridge.json
new file mode 100644
index 0000000..d62edb3
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/mortgage_banking.income-bridge.json
@@ -0,0 +1,300 @@
+{
+ "version": "fiscal-v1",
+ "pack": "mortgage_banking",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:MortgageBankingIncome",
+ "us-gaap:OriginationFeesAndGainsOnLoans",
+ "us-gaap:GainOnSaleOfMortgageLoans",
+ "us-gaap:ServicingFees",
+ "us-gaap:MortgageServicingIncome",
+ "us-gaap:InterestIncomeOnMortgageLoansHeldForSale"
+ ],
+ "direct_source_concepts": [
+ "MortgageBankingIncome",
+ "OriginationFeesAndGainsOnLoans",
+ "GainOnSaleOfMortgageLoans",
+ "ServicingFees",
+ "MortgageServicingIncome",
+ "InterestIncomeOnMortgageLoansHeldForSale"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "mortgage_banking_revenue",
+ "servicing_fees",
+ "interest_income"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_mortgage_banking"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingExpenses",
+ "us-gaap:InterestExpenseOnWarehouseLines",
+ "us-gaap:InterestExpenseOnLoans"
+ ],
+ "direct_source_concepts": [
+ "OperatingExpenses",
+ "InterestExpenseOnWarehouseLines",
+ "InterestExpenseOnLoans"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses",
+ "interest_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/mortgage_banking.surface.json b/rust/taxonomy/fiscal/v1/mortgage_banking.surface.json
new file mode 100644
index 0000000..b1327d3
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/mortgage_banking.surface.json
@@ -0,0 +1,235 @@
+{
+ "version": "fiscal-v1",
+ "pack": "mortgage_banking",
+ "surfaces": [
+ {
+ "surface_key": "mortgage_banking_revenue",
+ "statement": "income",
+ "label": "Mortgage Banking Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MortgageBankingIncome",
+ "us-gaap:OriginationFeesAndGainsOnLoans",
+ "us-gaap:GainOnSaleOfMortgageLoans"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MortgageBankingIncome",
+ "us-gaap:OriginationFeesAndGainsOnLoans",
+ "us-gaap:GainOnSaleOfMortgageLoans"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "servicing_fees",
+ "statement": "income",
+ "label": "Mortgage Servicing Fees",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ServicingFees",
+ "us-gaap:MortgageServicingIncome"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ServicingFees",
+ "us-gaap:MortgageServicingIncome"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_servicing_income",
+ "statement": "income",
+ "label": "Net Servicing Income",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:NetServicingIncome"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetServicingIncome"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "interest_income",
+ "statement": "income",
+ "label": "Interest Income",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:InterestIncomeOnMortgageLoansHeldForSale"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:InterestIncomeOnMortgageLoansHeldForSale"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "interest_expense",
+ "statement": "income",
+ "label": "Interest Expense",
+ "category": "surface",
+ "order": 28,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:InterestExpenseOnWarehouseLines",
+ "us-gaap:InterestExpenseOnLoans"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:InterestExpenseOnWarehouseLines",
+ "us-gaap:InterestExpenseOnLoans"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default",
+ "sign_transform": "absolute"
+ },
+ {
+ "surface_key": "operating_expenses",
+ "statement": "income",
+ "label": "Operating Expenses",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "loans_held_for_sale",
+ "statement": "balance",
+ "label": "Loans Held for Sale",
+ "category": "current_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:LoansHeldForSaleNet",
+ "us-gaap:MortgageLoansHeldForSale"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:LoansHeldForSaleNet",
+ "us-gaap:MortgageLoansHeldForSale"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "mortgage_servicing_rights",
+ "statement": "balance",
+ "label": "Mortgage Servicing Rights",
+ "category": "noncurrent_assets",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MortgageServicingRights",
+ "us-gaap:ServicingAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MortgageServicingRights",
+ "us-gaap:ServicingAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/not_for_profit.income-bridge.json b/rust/taxonomy/fiscal/v1/not_for_profit.income-bridge.json
new file mode 100644
index 0000000..b66e405
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/not_for_profit.income-bridge.json
@@ -0,0 +1,274 @@
+{
+ "version": "fiscal-v1",
+ "pack": "not_for_profit",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ContributionsReceived",
+ "us-gaap:DonationsRevenue",
+ "us-gaap:GrantRevenue",
+ "us-gaap:GovernmentGrantsRevenue",
+ "us-gaap:ProgramServiceFees",
+ "us-gaap:ServiceRevenueNotForProfit"
+ ],
+ "direct_source_concepts": [
+ "ContributionsReceived",
+ "DonationsRevenue",
+ "GrantRevenue",
+ "GovernmentGrantsRevenue",
+ "ProgramServiceFees",
+ "ServiceRevenueNotForProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "contribution_revenue",
+ "grant_revenue",
+ "program_service_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_not_for_profit"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:FundraisingExpense",
+ "us-gaap:DevelopmentExpense",
+ "us-gaap:ProgramServiceExpense",
+ "us-gaap:ProgramExpense",
+ "us-gaap:GeneralAndAdministrativeExpense",
+ "us-gaap:ManagementAndGeneralExpense"
+ ],
+ "direct_source_concepts": [
+ "FundraisingExpense",
+ "DevelopmentExpense",
+ "ProgramServiceExpense",
+ "ProgramExpense",
+ "GeneralAndAdministrativeExpense",
+ "ManagementAndGeneralExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "fundraising_expense",
+ "program_service_expense",
+ "administrative_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense",
+ "us-gaap:ManagementAndGeneralExpense"
+ ],
+ "direct_source_concepts": [
+ "GeneralAndAdministrativeExpense",
+ "ManagementAndGeneralExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "administrative_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "net_income_not_meaningful_not_for_profit"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/not_for_profit.surface.json b/rust/taxonomy/fiscal/v1/not_for_profit.surface.json
new file mode 100644
index 0000000..ba85bfd
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/not_for_profit.surface.json
@@ -0,0 +1,220 @@
+{
+ "version": "fiscal-v1",
+ "pack": "not_for_profit",
+ "surfaces": [
+ {
+ "surface_key": "contribution_revenue",
+ "statement": "income",
+ "label": "Contributions & Donations",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContributionsReceived",
+ "us-gaap:DonationsRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContributionsReceived",
+ "us-gaap:DonationsRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "grant_revenue",
+ "statement": "income",
+ "label": "Grants & Contracts Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:GrantRevenue",
+ "us-gaap:GovernmentGrantsRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GrantRevenue",
+ "us-gaap:GovernmentGrantsRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "program_service_revenue",
+ "statement": "income",
+ "label": "Program Service Revenue",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProgramServiceFees",
+ "us-gaap:ServiceRevenueNotForProfit"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProgramServiceFees",
+ "us-gaap:ServiceRevenueNotForProfit"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "fundraising_expense",
+ "statement": "income",
+ "label": "Fundraising Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FundraisingExpense",
+ "us-gaap:DevelopmentExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FundraisingExpense",
+ "us-gaap:DevelopmentExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "program_service_expense",
+ "statement": "income",
+ "label": "Program Service Expense",
+ "category": "surface",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProgramServiceExpense",
+ "us-gaap:ProgramExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProgramServiceExpense",
+ "us-gaap:ProgramExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "administrative_expense",
+ "statement": "income",
+ "label": "Administrative & General Expense",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense",
+ "us-gaap:ManagementAndGeneralExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense",
+ "us-gaap:ManagementAndGeneralExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "change_in_net_assets",
+ "statement": "income",
+ "label": "Change in Net Assets",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:ChangeInNetAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ChangeInNetAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_assets_without_donor_restrictions",
+ "statement": "balance",
+ "label": "Net Assets Without Donor Restrictions",
+ "category": "equity",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetAssetsWithoutDonorRestrictions",
+ "us-gaap:UnrestrictedNetAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetAssetsWithoutDonorRestrictions",
+ "us-gaap:UnrestrictedNetAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "net_assets_with_donor_restrictions",
+ "statement": "balance",
+ "label": "Net Assets With Donor Restrictions",
+ "category": "equity",
+ "order": 105,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetAssetsWithDonorRestrictions",
+ "us-gaap:TemporarilyRestrictedNetAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetAssetsWithDonorRestrictions",
+ "us-gaap:TemporarilyRestrictedNetAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/plan_defined_benefit.income-bridge.json b/rust/taxonomy/fiscal/v1/plan_defined_benefit.income-bridge.json
new file mode 100644
index 0000000..30591be
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/plan_defined_benefit.income-bridge.json
@@ -0,0 +1,273 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_defined_benefit",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:EmployerContributions",
+ "us-gaap:ContributionsReceivedFromEmployers",
+ "us-gaap:InvestmentIncome",
+ "us-gaap:ReturnOnPlanAssets"
+ ],
+ "direct_source_concepts": [
+ "EmployerContributions",
+ "ContributionsReceivedFromEmployers",
+ "InvestmentIncome",
+ "ReturnOnPlanAssets"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "employer_contributions",
+ "investment_income"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_plan_defined_benefit"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "direct_source_concepts": [
+ "BenefitPayments",
+ "BenefitsPaidToParticipants"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "benefits_paid"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "net_income_not_meaningful_plan_defined_benefit"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/plan_defined_benefit.surface.json b/rust/taxonomy/fiscal/v1/plan_defined_benefit.surface.json
new file mode 100644
index 0000000..369debd
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/plan_defined_benefit.surface.json
@@ -0,0 +1,142 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_defined_benefit",
+ "surfaces": [
+ {
+ "surface_key": "employer_contributions",
+ "statement": "income",
+ "label": "Employer Contributions",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:EmployerContributions",
+ "us-gaap:ContributionsReceivedFromEmployers"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:EmployerContributions",
+ "us-gaap:ContributionsReceivedFromEmployers"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "benefits_paid",
+ "statement": "income",
+ "label": "Benefits Paid",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "investment_income",
+ "statement": "income",
+ "label": "Investment Income",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:InvestmentIncome",
+ "us-gaap:ReturnOnPlanAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:InvestmentIncome",
+ "us-gaap:ReturnOnPlanAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_increase_in_fund",
+ "statement": "income",
+ "label": "Net Increase in Fund",
+ "category": "surface",
+ "order": 50,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncreaseInFund"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncreaseInFund"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "plan_assets",
+ "statement": "balance",
+ "label": "Plan Assets",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PlanAssets",
+ "us-gaap:FairValueOfPlanAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PlanAssets",
+ "us-gaap:FairValueOfPlanAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "benefit_obligations",
+ "statement": "balance",
+ "label": "Benefit Obligations (PBO)",
+ "category": "noncurrent_liabilities",
+ "order": 80,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ProjectedBenefitObligation",
+ "us-gaap:BenefitObligations"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ProjectedBenefitObligation",
+ "us-gaap:BenefitObligations"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "funded_status",
+ "statement": "balance",
+ "label": "Funded Status",
+ "category": "equity",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:FundedStatusOfDefinedBenefitPlan"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FundedStatusOfDefinedBenefitPlan"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/plan_defined_contribution.income-bridge.json b/rust/taxonomy/fiscal/v1/plan_defined_contribution.income-bridge.json
new file mode 100644
index 0000000..553a985
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/plan_defined_contribution.income-bridge.json
@@ -0,0 +1,273 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_defined_contribution",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ContributionsReceivedFromEmployersAndParticipants",
+ "us-gaap:EmployerAndEmployeeContributions"
+ ],
+ "direct_source_concepts": [
+ "ContributionsReceivedFromEmployersAndParticipants",
+ "EmployerAndEmployeeContributions"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "contributions_received"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_plan_defined_contribution"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants",
+ "us-gaap:AdministrativeExpenseOfPlan",
+ "us-gaap:AdministrativeExpenses"
+ ],
+ "direct_source_concepts": [
+ "BenefitPayments",
+ "BenefitsPaidToParticipants",
+ "AdministrativeExpenseOfPlan",
+ "AdministrativeExpenses"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "benefits_paid",
+ "administrative_expenses"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "net_income_not_meaningful_plan_defined_contribution"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/plan_defined_contribution.surface.json b/rust/taxonomy/fiscal/v1/plan_defined_contribution.surface.json
new file mode 100644
index 0000000..b432b39
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/plan_defined_contribution.surface.json
@@ -0,0 +1,104 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_defined_contribution",
+ "surfaces": [
+ {
+ "surface_key": "contributions_received",
+ "statement": "income",
+ "label": "Contributions Received",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContributionsReceivedFromEmployersAndParticipants",
+ "us-gaap:EmployerAndEmployeeContributions"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContributionsReceivedFromEmployersAndParticipants",
+ "us-gaap:EmployerAndEmployeeContributions"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "benefits_paid",
+ "statement": "income",
+ "label": "Benefits Paid",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "administrative_expenses",
+ "statement": "income",
+ "label": "Administrative Expenses",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AdministrativeExpenseOfPlan",
+ "us-gaap:AdministrativeExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AdministrativeExpenseOfPlan",
+ "us-gaap:AdministrativeExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_assets_available_for_benefits",
+ "statement": "balance",
+ "label": "Net Assets Available for Benefits",
+ "category": "equity",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetAssetsAvailableForBenefits"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetAssetsAvailableForBenefits"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "plan_investments",
+ "statement": "balance",
+ "label": "Plan Investments at Fair Value",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PlanInvestmentsAtFairValue",
+ "us-gaap:FairValueOfPlanInvestments"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PlanInvestmentsAtFairValue",
+ "us-gaap:FairValueOfPlanInvestments"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/plan_health_welfare.income-bridge.json b/rust/taxonomy/fiscal/v1/plan_health_welfare.income-bridge.json
new file mode 100644
index 0000000..8a3e8f5
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/plan_health_welfare.income-bridge.json
@@ -0,0 +1,271 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_health_welfare",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ContributionsReceivedFromEmployersAndParticipants"
+ ],
+ "direct_source_concepts": [
+ "ContributionsReceivedFromEmployersAndParticipants"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "contributions_received"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_plan_health_welfare"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants",
+ "us-gaap:AdministrativeExpenses",
+ "us-gaap:PlanAdministrativeExpense"
+ ],
+ "direct_source_concepts": [
+ "BenefitPayments",
+ "BenefitsPaidToParticipants",
+ "AdministrativeExpenses",
+ "PlanAdministrativeExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "benefits_paid",
+ "administrative_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "net_income_not_meaningful_plan_health_welfare"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/plan_health_welfare.surface.json b/rust/taxonomy/fiscal/v1/plan_health_welfare.surface.json
new file mode 100644
index 0000000..d10abdd
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/plan_health_welfare.surface.json
@@ -0,0 +1,122 @@
+{
+ "version": "fiscal-v1",
+ "pack": "plan_health_welfare",
+ "surfaces": [
+ {
+ "surface_key": "contributions_received",
+ "statement": "income",
+ "label": "Contributions Received",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ContributionsReceivedFromEmployersAndParticipants"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ContributionsReceivedFromEmployersAndParticipants"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "benefits_paid",
+ "statement": "income",
+ "label": "Benefits Paid",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:BenefitPayments",
+ "us-gaap:BenefitsPaidToParticipants"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "administrative_expense",
+ "statement": "income",
+ "label": "Administrative Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AdministrativeExpenses",
+ "us-gaap:PlanAdministrativeExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AdministrativeExpenses",
+ "us-gaap:PlanAdministrativeExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_assets_available_for_benefits",
+ "statement": "balance",
+ "label": "Net Assets Available for Benefits",
+ "category": "equity",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetAssetsAvailableForBenefits"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetAssetsAvailableForBenefits"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "plan_assets",
+ "statement": "balance",
+ "label": "Plan Assets",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PlanAssets",
+ "us-gaap:FairValueOfPlanAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PlanAssets",
+ "us-gaap:FairValueOfPlanAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "benefit_obligations",
+ "statement": "balance",
+ "label": "Benefit Obligations",
+ "category": "noncurrent_liabilities",
+ "order": 80,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:BenefitObligations",
+ "us-gaap:AccumulatedPostretirementBenefitObligation"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:BenefitObligations",
+ "us-gaap:AccumulatedPostretirementBenefitObligation"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_common_interest.income-bridge.json b/rust/taxonomy/fiscal/v1/real_estate_common_interest.income-bridge.json
new file mode 100644
index 0000000..d4bde59
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_common_interest.income-bridge.json
@@ -0,0 +1,292 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_common_interest",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:AssociationAssessmentRevenue",
+ "us-gaap:CommonInterestRevenue",
+ "us-gaap:MaintenanceFees",
+ "us-gaap:AssessmentsForMaintenance"
+ ],
+ "direct_source_concepts": [
+ "AssociationAssessmentRevenue",
+ "CommonInterestRevenue",
+ "MaintenanceFees",
+ "AssessmentsForMaintenance"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "association_assessment_revenue",
+ "maintenance_fees"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_real_estate_common_interest"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:RepairAndReplacementExpense",
+ "us-gaap:ReserveFundExpenditures"
+ ],
+ "direct_source_concepts": [
+ "RepairAndReplacementExpense",
+ "ReserveFundExpenditures"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "repair_and_replacement_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_common_interest.surface.json b/rust/taxonomy/fiscal/v1/real_estate_common_interest.surface.json
new file mode 100644
index 0000000..c66dcd7
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_common_interest.surface.json
@@ -0,0 +1,196 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_common_interest",
+ "surfaces": [
+ {
+ "surface_key": "association_assessment_revenue",
+ "statement": "income",
+ "label": "Association Assessment Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AssociationAssessmentRevenue",
+ "us-gaap:CommonInterestRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AssociationAssessmentRevenue",
+ "us-gaap:CommonInterestRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "maintenance_fees",
+ "statement": "income",
+ "label": "Maintenance Fees & Dues",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MaintenanceFees",
+ "us-gaap:AssessmentsForMaintenance"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MaintenanceFees",
+ "us-gaap:AssessmentsForMaintenance"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "repair_and_replacement_expense",
+ "statement": "income",
+ "label": "Repair & Replacement Expense",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RepairAndReplacementExpense",
+ "us-gaap:ReserveFundExpenditures"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RepairAndReplacementExpense",
+ "us-gaap:ReserveFundExpenditures"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "common_property_assets",
+ "statement": "balance",
+ "label": "Common Property & Equipment",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CommonPropertyAssets",
+ "us-gaap:CommonAreaProperty"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CommonPropertyAssets",
+ "us-gaap:CommonAreaProperty"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "reserve_fund",
+ "statement": "balance",
+ "label": "Reserve Fund",
+ "category": "noncurrent_assets",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ReserveFundAssets",
+ "us-gaap:ReserveFund"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ReserveFundAssets",
+ "us-gaap:ReserveFund"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:NetAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_general.income-bridge.json b/rust/taxonomy/fiscal/v1/real_estate_general.income-bridge.json
new file mode 100644
index 0000000..4b8ca9a
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_general.income-bridge.json
@@ -0,0 +1,300 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_general",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:RealEstateSalesRevenue",
+ "us-gaap:PropertySalesRevenue",
+ "us-gaap:PropertyManagementFees",
+ "us-gaap:ManagementFeeRevenue"
+ ],
+ "direct_source_concepts": [
+ "RealEstateSalesRevenue",
+ "PropertySalesRevenue",
+ "PropertyManagementFees",
+ "ManagementFeeRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "property_sales_revenue",
+ "property_management_fees"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "direct_source_concepts": [
+ "GrossProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "revenue"
+ ],
+ "negative": [
+ "cost_of_property_sold"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "gross_profit_formula_derived"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingExpenses",
+ "us-gaap:RealEstateOperatingExpenses"
+ ],
+ "direct_source_concepts": [
+ "OperatingExpenses",
+ "RealEstateOperatingExpenses"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_general.surface.json b/rust/taxonomy/fiscal/v1/real_estate_general.surface.json
new file mode 100644
index 0000000..22943c0
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_general.surface.json
@@ -0,0 +1,236 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_general",
+ "surfaces": [
+ {
+ "surface_key": "property_sales_revenue",
+ "statement": "income",
+ "label": "Property Sales Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RealEstateSalesRevenue",
+ "us-gaap:PropertySalesRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RealEstateSalesRevenue",
+ "us-gaap:PropertySalesRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "property_management_fees",
+ "statement": "income",
+ "label": "Property Management & Service Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PropertyManagementFees",
+ "us-gaap:ManagementFeeRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PropertyManagementFees",
+ "us-gaap:ManagementFeeRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "cost_of_property_sold",
+ "statement": "income",
+ "label": "Cost of Property Sold",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CostOfRealEstateSold",
+ "us-gaap:CostOfPropertySold"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CostOfRealEstateSold",
+ "us-gaap:CostOfPropertySold"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_expenses",
+ "statement": "income",
+ "label": "Operating Expenses",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingExpenses",
+ "us-gaap:RealEstateOperatingExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingExpenses",
+ "us-gaap:RealEstateOperatingExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "real_estate_inventory",
+ "statement": "balance",
+ "label": "Real Estate Inventory",
+ "category": "current_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RealEstateInventory",
+ "us-gaap:RealEstateHeldForSale"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RealEstateInventory",
+ "us-gaap:RealEstateHeldForSale"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "property_under_development",
+ "statement": "balance",
+ "label": "Property Under Development",
+ "category": "noncurrent_assets",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:RealEstateDevelopmentProperty",
+ "us-gaap:PropertiesUnderDevelopment"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:RealEstateDevelopmentProperty",
+ "us-gaap:PropertiesUnderDevelopment"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "deferred_revenue",
+ "statement": "balance",
+ "label": "Deferred Revenue",
+ "category": "current_liabilities",
+ "order": 70,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DeferredRevenueRealEstate",
+ "us-gaap:DeferredRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DeferredRevenueRealEstate",
+ "us-gaap:DeferredRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_retail_land.income-bridge.json b/rust/taxonomy/fiscal/v1/real_estate_retail_land.income-bridge.json
new file mode 100644
index 0000000..d20985e
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_retail_land.income-bridge.json
@@ -0,0 +1,295 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_retail_land",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:LandSalesRevenue",
+ "us-gaap:RetailLandSales"
+ ],
+ "direct_source_concepts": [
+ "LandSalesRevenue",
+ "RetailLandSales"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "retail_land_sales_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "direct_source_concepts": [
+ "GrossProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "revenue"
+ ],
+ "negative": [
+ "cost_of_land_sold"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "gross_profit_formula_derived"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:MarketingExpense",
+ "us-gaap:SellingExpense"
+ ],
+ "direct_source_concepts": [
+ "MarketingExpense",
+ "SellingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "marketing_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_retail_land.surface.json b/rust/taxonomy/fiscal/v1/real_estate_retail_land.surface.json
new file mode 100644
index 0000000..22b6cf3
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_retail_land.surface.json
@@ -0,0 +1,196 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_retail_land",
+ "surfaces": [
+ {
+ "surface_key": "retail_land_sales_revenue",
+ "statement": "income",
+ "label": "Retail Land Sales Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:LandSalesRevenue",
+ "us-gaap:RetailLandSales"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:LandSalesRevenue",
+ "us-gaap:RetailLandSales"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "cost_of_land_sold",
+ "statement": "income",
+ "label": "Cost of Land Sold",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CostOfLandSold",
+ "us-gaap:CostOfPropertySold"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CostOfLandSold",
+ "us-gaap:CostOfPropertySold"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "marketing_expense",
+ "statement": "income",
+ "label": "Marketing & Selling Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MarketingExpense",
+ "us-gaap:SellingExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MarketingExpense",
+ "us-gaap:SellingExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "land_inventory",
+ "statement": "balance",
+ "label": "Land Inventory",
+ "category": "current_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:LandInventory",
+ "us-gaap:RealEstateInventory"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:LandInventory",
+ "us-gaap:RealEstateInventory"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "deferred_revenue",
+ "statement": "balance",
+ "label": "Deferred Revenue",
+ "category": "current_liabilities",
+ "order": 70,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DeferredRevenue",
+ "us-gaap:DeferredRevenueRealEstate"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DeferredRevenue",
+ "us-gaap:DeferredRevenueRealEstate"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_time_sharing.income-bridge.json b/rust/taxonomy/fiscal/v1/real_estate_time_sharing.income-bridge.json
new file mode 100644
index 0000000..8d70c81
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_time_sharing.income-bridge.json
@@ -0,0 +1,302 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_time_sharing",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:TimeshareSalesRevenue",
+ "us-gaap:TimeSharePropertySales",
+ "us-gaap:TimeShareFinancingIncome",
+ "us-gaap:InterestIncomeOnTimeShareLoans",
+ "us-gaap:TimeShareMaintenanceFeeRevenue",
+ "us-gaap:MaintenanceFeesRevenue"
+ ],
+ "direct_source_concepts": [
+ "TimeshareSalesRevenue",
+ "TimeSharePropertySales",
+ "TimeShareFinancingIncome",
+ "InterestIncomeOnTimeShareLoans",
+ "TimeShareMaintenanceFeeRevenue",
+ "MaintenanceFeesRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "time_share_sales_revenue",
+ "financing_income",
+ "maintenance_fees_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_real_estate_time_sharing"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:TimeShareMarketingExpense",
+ "us-gaap:MaintenanceExpense",
+ "us-gaap:PropertyMaintenanceExpense"
+ ],
+ "direct_source_concepts": [
+ "SalesAndMarketingExpense",
+ "TimeShareMarketingExpense",
+ "MaintenanceExpense",
+ "PropertyMaintenanceExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "sales_and_marketing_expense",
+ "maintenance_expense"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/real_estate_time_sharing.surface.json b/rust/taxonomy/fiscal/v1/real_estate_time_sharing.surface.json
new file mode 100644
index 0000000..2c55fef
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/real_estate_time_sharing.surface.json
@@ -0,0 +1,256 @@
+{
+ "version": "fiscal-v1",
+ "pack": "real_estate_time_sharing",
+ "surfaces": [
+ {
+ "surface_key": "time_share_sales_revenue",
+ "statement": "income",
+ "label": "Time-share Sales Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TimeshareSalesRevenue",
+ "us-gaap:TimeSharePropertySales"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TimeshareSalesRevenue",
+ "us-gaap:TimeSharePropertySales"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "financing_income",
+ "statement": "income",
+ "label": "Financing Income on Time-share Contracts",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TimeShareFinancingIncome",
+ "us-gaap:InterestIncomeOnTimeShareLoans"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TimeShareFinancingIncome",
+ "us-gaap:InterestIncomeOnTimeShareLoans"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "maintenance_fees_revenue",
+ "statement": "income",
+ "label": "Maintenance Fees & Association Revenue",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TimeShareMaintenanceFeeRevenue",
+ "us-gaap:MaintenanceFeesRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TimeShareMaintenanceFeeRevenue",
+ "us-gaap:MaintenanceFeesRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "sales_and_marketing_expense",
+ "statement": "income",
+ "label": "Sales & Marketing Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:TimeShareMarketingExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:TimeShareMarketingExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "maintenance_expense",
+ "statement": "income",
+ "label": "Maintenance Expense",
+ "category": "surface",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:MaintenanceExpense",
+ "us-gaap:PropertyMaintenanceExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:MaintenanceExpense",
+ "us-gaap:PropertyMaintenanceExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "time_share_intervals",
+ "statement": "balance",
+ "label": "Time-share Intervals (Inventory)",
+ "category": "current_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TimeShareIntervals",
+ "us-gaap:TimeShareInventory"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TimeShareIntervals",
+ "us-gaap:TimeShareInventory"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "consumer_financing_receivables",
+ "statement": "balance",
+ "label": "Consumer Financing Receivables",
+ "category": "current_assets",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TimeShareLoansReceivable",
+ "us-gaap:ConsumerFinanceReceivables"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TimeShareLoansReceivable",
+ "us-gaap:ConsumerFinanceReceivables"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "deferred_revenue",
+ "statement": "balance",
+ "label": "Deferred Revenue",
+ "category": "current_liabilities",
+ "order": 70,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DeferredRevenue",
+ "us-gaap:DeferredRevenueTimeShare"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DeferredRevenue",
+ "us-gaap:DeferredRevenueTimeShare"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/software.income-bridge.json b/rust/taxonomy/fiscal/v1/software.income-bridge.json
new file mode 100644
index 0000000..3a79fa9
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/software.income-bridge.json
@@ -0,0 +1,305 @@
+{
+ "version": "fiscal-v1",
+ "pack": "software",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SoftwareLicenseRevenue",
+ "us-gaap:LicenseRevenueSoftware",
+ "us-gaap:SoftwareMaintenanceRevenue",
+ "us-gaap:SoftwareSupportRevenue"
+ ],
+ "direct_source_concepts": [
+ "SoftwareLicenseRevenue",
+ "LicenseRevenueSoftware",
+ "SoftwareMaintenanceRevenue",
+ "SoftwareSupportRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "software_license_revenue",
+ "maintenance_and_support_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [
+ "us-gaap:GrossProfit"
+ ],
+ "direct_source_concepts": [
+ "GrossProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "revenue"
+ ],
+ "negative": [
+ "cost_of_software_revenue"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "gross_profit_formula_derived"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense",
+ "us-gaap:AmortizationOfCapitalizedSoftware",
+ "us-gaap:AmortizationOfSoftwareCosts"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense",
+ "AmortizationOfCapitalizedSoftware",
+ "AmortizationOfSoftwareCosts"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "research_and_development_expense",
+ "amortization_of_capitalized_software"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "research_and_development_formula_derived"
+ ]
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/software.surface.json b/rust/taxonomy/fiscal/v1/software.surface.json
new file mode 100644
index 0000000..37385d5
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/software.surface.json
@@ -0,0 +1,234 @@
+{
+ "version": "fiscal-v1",
+ "pack": "software",
+ "surfaces": [
+ {
+ "surface_key": "software_license_revenue",
+ "statement": "income",
+ "label": "Software License Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:SoftwareLicenseRevenue",
+ "us-gaap:LicenseRevenueSoftware"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:SoftwareLicenseRevenue",
+ "us-gaap:LicenseRevenueSoftware"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "maintenance_and_support_revenue",
+ "statement": "income",
+ "label": "Maintenance & Support Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:SoftwareMaintenanceRevenue",
+ "us-gaap:SoftwareSupportRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:SoftwareMaintenanceRevenue",
+ "us-gaap:SoftwareSupportRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "cost_of_software_revenue",
+ "statement": "income",
+ "label": "Cost of Software Revenue",
+ "category": "surface",
+ "order": 20,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CostOfSoftwareRevenue",
+ "us-gaap:CostOfLicenseRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CostOfSoftwareRevenue",
+ "us-gaap:CostOfLicenseRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "research_and_development_expense",
+ "statement": "income",
+ "label": "Research & Development Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "amortization_of_capitalized_software",
+ "statement": "income",
+ "label": "Amortization of Capitalized Software",
+ "category": "surface",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:AmortizationOfCapitalizedSoftware",
+ "us-gaap:AmortizationOfSoftwareCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:AmortizationOfCapitalizedSoftware",
+ "us-gaap:AmortizationOfSoftwareCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "capitalized_software_costs",
+ "statement": "balance",
+ "label": "Capitalized Software Costs",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CapitalizedSoftwareCosts",
+ "us-gaap:SoftwareDevelopmentCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CapitalizedSoftwareCosts",
+ "us-gaap:SoftwareDevelopmentCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "deferred_revenue",
+ "statement": "balance",
+ "label": "Deferred Software Revenue",
+ "category": "current_liabilities",
+ "order": 70,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DeferredRevenueSoftware",
+ "us-gaap:UnearnedRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DeferredRevenueSoftware",
+ "us-gaap:UnearnedRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/steamship.income-bridge.json b/rust/taxonomy/fiscal/v1/steamship.income-bridge.json
new file mode 100644
index 0000000..9743804
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/steamship.income-bridge.json
@@ -0,0 +1,302 @@
+{
+ "version": "fiscal-v1",
+ "pack": "steamship",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:FreightRevenue",
+ "us-gaap:CargoRevenue",
+ "us-gaap:PassengerRevenue",
+ "us-gaap:TicketRevenue"
+ ],
+ "direct_source_concepts": [
+ "FreightRevenue",
+ "CargoRevenue",
+ "PassengerRevenue",
+ "TicketRevenue"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "freight_revenue",
+ "passenger_revenue"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_steamship"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:FuelExpense",
+ "us-gaap:BunkerFuelExpense",
+ "us-gaap:CrewCosts",
+ "us-gaap:OperatingExpenses",
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepreciationOfVessels"
+ ],
+ "direct_source_concepts": [
+ "FuelExpense",
+ "BunkerFuelExpense",
+ "CrewCosts",
+ "OperatingExpenses",
+ "DepreciationDepletionAndAmortization",
+ "DepreciationOfVessels"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "fuel_expense",
+ "crew_and_operating_expense",
+ "depreciation_and_amortization"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/steamship.surface.json b/rust/taxonomy/fiscal/v1/steamship.surface.json
new file mode 100644
index 0000000..ed8f073
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/steamship.surface.json
@@ -0,0 +1,258 @@
+{
+ "version": "fiscal-v1",
+ "pack": "steamship",
+ "surfaces": [
+ {
+ "surface_key": "freight_revenue",
+ "statement": "income",
+ "label": "Freight Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FreightRevenue",
+ "us-gaap:CargoRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FreightRevenue",
+ "us-gaap:CargoRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "passenger_revenue",
+ "statement": "income",
+ "label": "Passenger Revenue",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PassengerRevenue",
+ "us-gaap:TicketRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PassengerRevenue",
+ "us-gaap:TicketRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "fuel_expense",
+ "statement": "income",
+ "label": "Fuel Expense",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:FuelExpense",
+ "us-gaap:BunkerFuelExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:FuelExpense",
+ "us-gaap:BunkerFuelExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "crew_and_operating_expense",
+ "statement": "income",
+ "label": "Crew & Operating Expense",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:CrewCosts",
+ "us-gaap:OperatingExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:CrewCosts",
+ "us-gaap:OperatingExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "depreciation_and_amortization",
+ "statement": "income",
+ "label": "Depreciation & Amortization",
+ "category": "surface",
+ "order": 40,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepreciationOfVessels"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DepreciationDepletionAndAmortization",
+ "us-gaap:DepreciationOfVessels"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_income",
+ "statement": "income",
+ "label": "Operating Income",
+ "category": "surface",
+ "order": 60,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "vessels_and_equipment",
+ "statement": "balance",
+ "label": "Vessels & Equipment",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:Vessels",
+ "us-gaap:ShipsAndBoats",
+ "us-gaap:MarineEquipment"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Vessels",
+ "us-gaap:ShipsAndBoats",
+ "us-gaap:MarineEquipment"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "dry_dock_and_other_deferrals",
+ "statement": "balance",
+ "label": "Dry-dock & Other Deferred Costs",
+ "category": "noncurrent_assets",
+ "order": 35,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:DryDockCostsDeferred",
+ "us-gaap:DeferredMaintenanceCosts"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:DryDockCostsDeferred",
+ "us-gaap:DeferredMaintenanceCosts"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "air_traffic_or_passenger_liability",
+ "statement": "balance",
+ "label": "Ticket Liability / Unearned Revenue",
+ "category": "current_liabilities",
+ "order": 70,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:UnearnedPassengerRevenue",
+ "us-gaap:DeferredTicketRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:UnearnedPassengerRevenue",
+ "us-gaap:DeferredTicketRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/rust/taxonomy/fiscal/v1/title_plant.income-bridge.json b/rust/taxonomy/fiscal/v1/title_plant.income-bridge.json
new file mode 100644
index 0000000..d1ec504
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/title_plant.income-bridge.json
@@ -0,0 +1,295 @@
+{
+ "version": "fiscal-v1",
+ "pack": "title_plant",
+ "rows": {
+ "revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:TitleInsuranceRevenue",
+ "us-gaap:TitleSearchAndExamRevenue",
+ "us-gaap:EscrowFees",
+ "us-gaap:ClosingFees"
+ ],
+ "direct_source_concepts": [
+ "TitleInsuranceRevenue",
+ "TitleSearchAndExamRevenue",
+ "EscrowFees",
+ "ClosingFees"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "title_revenue",
+ "escrow_and_closing_fees"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "revenue_formula_derived"
+ ]
+ },
+ "cost_of_revenue": {
+ "direct_authoritative_concepts": [
+ "us-gaap:CostOfRevenue"
+ ],
+ "direct_source_concepts": [
+ "CostOfRevenue",
+ "CostOfGoodsSold",
+ "CostOfSales",
+ "CostOfGoodsAndServicesSold",
+ "CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization",
+ "CostOfProductsSold",
+ "CostOfServices"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "gross_profit": {
+ "direct_authoritative_concepts": [],
+ "direct_source_concepts": [],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "not_meaningful",
+ "not_meaningful_for_pack": true,
+ "warning_codes_when_used": [
+ "gross_profit_not_meaningful_title_plant"
+ ]
+ },
+ "operating_expenses": {
+ "direct_authoritative_concepts": [
+ "us-gaap:PolicyLossesAndLossAdjustmentExpenses",
+ "us-gaap:ClaimsExpense",
+ "us-gaap:OperatingExpenses"
+ ],
+ "direct_source_concepts": [
+ "PolicyLossesAndLossAdjustmentExpenses",
+ "ClaimsExpense",
+ "OperatingExpenses"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "policy_losses_and_claims_expense",
+ "operating_expenses"
+ ],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "pack_bridge_sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_expenses_formula_derived"
+ ]
+ },
+ "selling_general_and_administrative": {
+ "direct_authoritative_concepts": [
+ "us-gaap:SellingGeneralAndAdministrativeExpense",
+ "us-gaap:SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "direct_source_concepts": [
+ "SellingGeneralAndAdministrativeExpense",
+ "SellingGeneralAndAdministrativeExpenseExcludingEmployeeStockOptionPlanSpecialDividendCompensation"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "sales_and_marketing",
+ "concepts": [
+ "us-gaap:SalesAndMarketingExpense",
+ "us-gaap:SellingAndMarketingExpense",
+ "us-gaap:MarketingExpense",
+ "us-gaap:AdvertisingExpense"
+ ]
+ },
+ {
+ "name": "general_and_administrative",
+ "concepts": [
+ "us-gaap:GeneralAndAdministrativeExpense"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "sum",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "selling_general_and_administrative_formula_derived"
+ ]
+ },
+ "research_and_development": {
+ "direct_authoritative_concepts": [
+ "us-gaap:ResearchAndDevelopmentExpense"
+ ],
+ "direct_source_concepts": [
+ "ResearchAndDevelopmentExpense"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": []
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "direct",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": []
+ },
+ "other_operating_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OtherThanInterestExpense",
+ "us-gaap:OtherOperatingExpenses",
+ "us-gaap:OtherCostAndExpenseOperating",
+ "us-gaap:OtherOperatingExpense"
+ ],
+ "direct_source_concepts": [
+ "OtherThanInterestExpense",
+ "OtherOperatingExpenses",
+ "OtherCostAndExpenseOperating",
+ "OtherOperatingExpense"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "operating_expenses"
+ ],
+ "negative": [
+ "selling_general_and_administrative",
+ "research_and_development"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "sum_then_subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "other_operating_expense_formula_derived"
+ ]
+ },
+ "operating_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:OperatingIncomeLoss",
+ "us-gaap:IncomeFromOperations",
+ "us-gaap:OperatingProfit"
+ ],
+ "direct_source_concepts": [
+ "OperatingIncomeLoss",
+ "IncomeFromOperations",
+ "OperatingProfit"
+ ],
+ "component_surfaces": {
+ "positive": [
+ "gross_profit"
+ ],
+ "negative": [
+ "operating_expenses"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "operating_income_formula_derived"
+ ]
+ },
+ "income_tax_expense": {
+ "direct_authoritative_concepts": [
+ "us-gaap:IncomeTaxExpenseBenefit"
+ ],
+ "direct_source_concepts": [
+ "IncomeTaxExpenseBenefit"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "net_income"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "income_tax_expense_formula_derived"
+ ]
+ },
+ "net_income": {
+ "direct_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss",
+ "us-gaap:ProfitLoss"
+ ],
+ "direct_source_concepts": [
+ "NetIncomeLoss",
+ "ProfitLoss"
+ ],
+ "component_surfaces": {
+ "positive": [],
+ "negative": [
+ "income_tax_expense"
+ ]
+ },
+ "component_concept_groups": {
+ "positive": [
+ {
+ "name": "pretax_income",
+ "concepts": [
+ "us-gaap:IncomeBeforeTaxExpenseBenefit",
+ "us-gaap:PretaxIncome",
+ "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeBeforeEquityMethodInvestmentsIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "us-gaap:IncomeFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"
+ ]
+ }
+ ],
+ "negative": []
+ },
+ "formula": "subtract",
+ "not_meaningful_for_pack": false,
+ "warning_codes_when_used": [
+ "net_income_formula_derived"
+ ]
+ }
+ }
+}
diff --git a/rust/taxonomy/fiscal/v1/title_plant.surface.json b/rust/taxonomy/fiscal/v1/title_plant.surface.json
new file mode 100644
index 0000000..9b8066f
--- /dev/null
+++ b/rust/taxonomy/fiscal/v1/title_plant.surface.json
@@ -0,0 +1,196 @@
+{
+ "version": "fiscal-v1",
+ "pack": "title_plant",
+ "surfaces": [
+ {
+ "surface_key": "title_revenue",
+ "statement": "income",
+ "label": "Title Insurance & Service Revenue",
+ "category": "surface",
+ "order": 10,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TitleInsuranceRevenue",
+ "us-gaap:TitleSearchAndExamRevenue"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TitleInsuranceRevenue",
+ "us-gaap:TitleSearchAndExamRevenue"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "escrow_and_closing_fees",
+ "statement": "income",
+ "label": "Escrow & Closing Fees",
+ "category": "surface",
+ "order": 15,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:EscrowFees",
+ "us-gaap:ClosingFees"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:EscrowFees",
+ "us-gaap:ClosingFees"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "policy_losses_and_claims_expense",
+ "statement": "income",
+ "label": "Policy Losses & Claims Expense",
+ "category": "surface",
+ "order": 25,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:PolicyLossesAndLossAdjustmentExpenses",
+ "us-gaap:ClaimsExpense"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:PolicyLossesAndLossAdjustmentExpenses",
+ "us-gaap:ClaimsExpense"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "operating_expenses",
+ "statement": "income",
+ "label": "Operating Expenses",
+ "category": "surface",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:OperatingExpenses"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "net_income",
+ "statement": "income",
+ "label": "Net Income",
+ "category": "surface",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_or_formula",
+ "allowed_source_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:NetIncomeLoss"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "income_default"
+ },
+ {
+ "surface_key": "title_plant_assets",
+ "statement": "balance",
+ "label": "Title Plant Assets",
+ "category": "noncurrent_assets",
+ "order": 30,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:TitlePlant",
+ "us-gaap:TitlePlantAssets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:TitlePlant",
+ "us-gaap:TitlePlantAssets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "reserve_for_claims",
+ "statement": "balance",
+ "label": "Reserve for Title Claims",
+ "category": "noncurrent_liabilities",
+ "order": 80,
+ "unit": "currency",
+ "rollup_policy": "aggregate_children",
+ "allowed_source_concepts": [
+ "us-gaap:ReserveForTitleClaims",
+ "us-gaap:PolicyLossReserves"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:ReserveForTitleClaims",
+ "us-gaap:PolicyLossReserves"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "group_all_children",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_assets",
+ "statement": "balance",
+ "label": "Total Assets",
+ "category": "derived",
+ "order": 90,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Assets"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Assets"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_liabilities",
+ "statement": "balance",
+ "label": "Total Liabilities",
+ "category": "derived",
+ "order": 100,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:Liabilities"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ },
+ {
+ "surface_key": "total_equity",
+ "statement": "balance",
+ "label": "Total Equity",
+ "category": "equity",
+ "order": 110,
+ "unit": "currency",
+ "rollup_policy": "direct_only",
+ "allowed_source_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "allowed_authoritative_concepts": [
+ "us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"
+ ],
+ "formula_fallback": null,
+ "detail_grouping_policy": "top_level_only",
+ "materiality_policy": "balance_default"
+ }
+ ]
+}
diff --git a/scripts/dev.ts b/scripts/dev.ts
index 0a817a0..b99e341 100644
--- a/scripts/dev.ts
+++ b/scripts/dev.ts
@@ -1,14 +1,15 @@
-import { spawn } from 'node:child_process';
-import { mkdirSync, readFileSync } from 'node:fs';
-import { Database } from 'bun:sqlite';
-import { createServer } from 'node:net';
-import { dirname, join } from 'node:path';
+import { spawn } from "node:child_process";
+import { mkdirSync, readFileSync } from "node:fs";
+import { Database } from "bun:sqlite";
+import { createServer } from "node:net";
+import { dirname, join } from "node:path";
import {
ensureFinancialIngestionSchemaHealthy,
- resolveFinancialSchemaRepairMode
-} from '../lib/server/db/financial-ingestion-schema';
-import { ensureLocalSqliteSchema } from '../lib/server/db/sqlite-schema-compat';
-import { buildLocalDevConfig, resolveSqlitePath } from './dev-env';
+ resolveFinancialSchemaRepairMode,
+} from "../lib/server/db/financial-ingestion-schema";
+import { ensureLocalSqliteSchema } from "../lib/server/db/sqlite-schema-compat";
+import { buildLocalDevConfig, resolveSqlitePath } from "./dev-env";
+import { applyLocalSqliteVectorEnv } from "./sqlite-vector-env";
type DrizzleJournal = {
entries: Array<{ tag: string }>;
@@ -28,7 +29,7 @@ async function isPortAvailable(port: number, host: string) {
return await new Promise((resolve) => {
const server = createServer();
- server.once('error', () => resolve(false));
+ server.once("error", () => resolve(false));
server.listen(port, host, () => {
server.close(() => resolve(true));
});
@@ -44,28 +45,39 @@ async function pickLocalPort(host: string) {
}
}
- throw new Error(`Unable to find an open local dev port from: ${candidatePorts.join(', ')}`);
+ throw new Error(
+ `Unable to find an open local dev port from: ${candidatePorts.join(", ")}`,
+ );
}
function hasTable(database: Database, tableName: string) {
- const row = database
- .query('SELECT name FROM sqlite_master WHERE type = ? AND name = ? LIMIT 1')
- .get('table', tableName) as { name: string } | null;
+ try {
+ const row = database
+ .query("SELECT name FROM sqlite_master WHERE type='table' AND name = ?")
+ .get(tableName) as { name: string } | null;
- return row !== null;
+ return row !== null;
+ } catch (e) {
+ return false;
+ }
}
function readMigrationFiles() {
const journal = JSON.parse(
- readFileSync(join(process.cwd(), 'drizzle', 'meta', '_journal.json'), 'utf8')
+ readFileSync(
+ join(process.cwd(), "drizzle", "meta", "_journal.json"),
+ "utf8",
+ ),
) as DrizzleJournal;
- return journal.entries.map((entry) => join(process.cwd(), 'drizzle', `${entry.tag}.sql`));
+ return journal.entries.map((entry) =>
+ join(process.cwd(), "drizzle", `${entry.tag}.sql`),
+ );
}
function bootstrapFreshDatabase(databaseUrl: string) {
const databasePath = resolveSqlitePath(databaseUrl);
- if (!databasePath || databasePath === ':memory:') {
+ if (!databasePath || databasePath === ":memory:") {
return false;
}
@@ -74,16 +86,16 @@ function bootstrapFreshDatabase(databaseUrl: string) {
const database = new Database(databasePath, { create: true });
try {
- database.exec('PRAGMA foreign_keys = ON;');
+ database.exec("PRAGMA foreign_keys = ON;");
const existingCoreTables = [
- 'user',
- 'filing',
- 'watchlist_item',
- 'filing_statement_snapshot',
- 'filing_taxonomy_snapshot',
- 'task_run',
- 'company_financial_bundle'
+ "user",
+ "filing",
+ "watchlist_item",
+ "filing_statement_snapshot",
+ "filing_taxonomy_snapshot",
+ "task_run",
+ "company_financial_bundle",
];
if (existingCoreTables.some((tableName) => hasTable(database, tableName))) {
@@ -91,7 +103,7 @@ function bootstrapFreshDatabase(databaseUrl: string) {
}
for (const migrationFile of readMigrationFiles()) {
- database.exec(readFileSync(migrationFile, 'utf8'));
+ database.exec(readFileSync(migrationFile, "utf8"));
}
return true;
@@ -102,7 +114,9 @@ function bootstrapFreshDatabase(databaseUrl: string) {
function exitFromResult(result: ExitResult) {
if (result.signal) {
- process.exit(result.signal === 'SIGINT' || result.signal === 'SIGTERM' ? 0 : 1);
+ process.exit(
+ result.signal === "SIGINT" || result.signal === "SIGTERM" ? 0 : 1,
+ );
return;
}
@@ -110,49 +124,52 @@ function exitFromResult(result: ExitResult) {
}
const explicitPort = trim(process.env.PORT) || trim(process.env.APP_PORT);
-const bindHost = trim(process.env.HOSTNAME) || trim(process.env.HOST) || '127.0.0.1';
-const resolvedPort = explicitPort || await pickLocalPort(bindHost);
+const bindHost =
+ trim(process.env.HOSTNAME) || trim(process.env.HOST) || "127.0.0.1";
+const resolvedPort = explicitPort || (await pickLocalPort(bindHost));
const config = buildLocalDevConfig({
...process.env,
HOSTNAME: bindHost,
- PORT: resolvedPort
+ PORT: resolvedPort,
});
-const env = {
- ...config.env
+const initialEnv = {
+ ...config.env,
} as NodeJS.ProcessEnv;
+const { config: sqliteVectorConfig, env } =
+ applyLocalSqliteVectorEnv(initialEnv);
delete env.NO_COLOR;
-const databasePath = resolveSqlitePath(env.DATABASE_URL ?? '');
-if (databasePath && databasePath !== ':memory:') {
+const databasePath = resolveSqlitePath(env.DATABASE_URL ?? "");
+if (databasePath && databasePath !== ":memory:") {
mkdirSync(dirname(databasePath), { recursive: true });
}
-mkdirSync(env.WORKFLOW_LOCAL_DATA_DIR ?? '.workflow-data', { recursive: true });
+mkdirSync(env.WORKFLOW_LOCAL_DATA_DIR ?? ".workflow-data", { recursive: true });
-const initializedDatabase = bootstrapFreshDatabase(env.DATABASE_URL ?? '');
+const initializedDatabase = bootstrapFreshDatabase(env.DATABASE_URL ?? "");
-if (!initializedDatabase && databasePath && databasePath !== ':memory:') {
+if (!initializedDatabase && databasePath && databasePath !== ":memory:") {
const client = new Database(databasePath, { create: true });
try {
- client.exec('PRAGMA foreign_keys = ON;');
+ client.exec("PRAGMA foreign_keys = ON;");
ensureLocalSqliteSchema(client);
const repairResult = ensureFinancialIngestionSchemaHealthy(client, {
- mode: resolveFinancialSchemaRepairMode(env.FINANCIAL_SCHEMA_REPAIR_MODE)
+ mode: resolveFinancialSchemaRepairMode(env.FINANCIAL_SCHEMA_REPAIR_MODE),
});
- if (repairResult.mode === 'repaired') {
+ if (repairResult.mode === "repaired") {
console.info(
- `[dev] repaired financial ingestion schema (missing indexes: ${repairResult.repair?.missingIndexesBefore.join(', ') || 'none'}; duplicate groups resolved: ${repairResult.repair?.duplicateGroupsResolved ?? 0}; bundle cache cleared: ${repairResult.repair?.bundleCacheCleared ? 'yes' : 'no'})`
+ `[dev] repaired financial ingestion schema (missing indexes: ${repairResult.repair?.missingIndexesBefore.join(", ") || "none"}; duplicate groups resolved: ${repairResult.repair?.duplicateGroupsResolved ?? 0}; bundle cache cleared: ${repairResult.repair?.bundleCacheCleared ? "yes" : "no"})`,
);
- } else if (repairResult.mode === 'drifted') {
+ } else if (repairResult.mode === "drifted") {
console.warn(
- `[dev] financial ingestion schema drift detected (missing indexes: ${repairResult.missingIndexes.join(', ') || 'none'}; duplicate groups: ${repairResult.duplicateGroups})`
+ `[dev] financial ingestion schema drift detected (missing indexes: ${repairResult.missingIndexes.join(", ") || "none"}; duplicate groups: ${repairResult.duplicateGroups})`,
);
- } else if (repairResult.mode === 'failed') {
+ } else if (repairResult.mode === "failed") {
console.warn(
- `[dev] financial ingestion schema repair failed: ${repairResult.error ?? 'unknown error'}`
+ `[dev] financial ingestion schema repair failed: ${repairResult.error ?? "unknown error"}`,
);
}
} finally {
@@ -162,41 +179,69 @@ if (!initializedDatabase && databasePath && databasePath !== ':memory:') {
console.info(`[dev] local origin ${config.publicOrigin}`);
console.info(`[dev] sqlite ${env.DATABASE_URL}`);
-console.info(`[dev] workflow ${env.WORKFLOW_TARGET_WORLD} (${env.WORKFLOW_LOCAL_DATA_DIR})`);
-if (!explicitPort && resolvedPort !== '3000') {
- console.info(`[dev] port 3000 is busy, using http://localhost:${resolvedPort} instead`);
+console.info(
+ `[dev] workflow ${env.WORKFLOW_TARGET_WORLD} (${env.WORKFLOW_LOCAL_DATA_DIR})`,
+);
+if (sqliteVectorConfig.mode === "native") {
+ console.info(
+ `[dev] sqlite-vec native extension enabled (${sqliteVectorConfig.sqliteLibPath})`,
+ );
+}
+if (!explicitPort && resolvedPort !== "3000") {
+ console.info(
+ `[dev] port 3000 is busy, using http://localhost:${resolvedPort} instead`,
+ );
}
if (initializedDatabase) {
- console.info('[dev] initialized the local SQLite schema from drizzle SQL files');
+ console.info(
+ "[dev] initialized the local SQLite schema from drizzle SQL files",
+ );
}
if (config.overrides.authOriginChanged) {
- console.info('[dev] forcing Better Auth origin/trusted origins to the local origin');
+ console.info(
+ "[dev] forcing Better Auth origin/trusted origins to the local origin",
+ );
}
if (config.overrides.apiBaseChanged) {
- console.info('[dev] forcing NEXT_PUBLIC_API_URL to same-origin for local dev');
+ console.info(
+ "[dev] forcing NEXT_PUBLIC_API_URL to same-origin for local dev",
+ );
}
if (config.overrides.databaseChanged) {
- console.info('[dev] using a local SQLite database instead of the deployment path');
+ console.info(
+ "[dev] using a local SQLite database instead of the deployment path",
+ );
}
if (config.overrides.workflowChanged) {
- console.info('[dev] forcing Workflow to the local runtime for local dev');
+ console.info("[dev] forcing Workflow to the local runtime for local dev");
}
if (config.overrides.secretFallbackUsed) {
- console.info('[dev] using the built-in local Better Auth secret because BETTER_AUTH_SECRET is unset or still a placeholder');
+ console.info(
+ "[dev] using the built-in local Better Auth secret because BETTER_AUTH_SECRET is unset or still a placeholder",
+ );
}
const child = spawn(
- 'bun',
- ['--bun', 'next', 'dev', '--turbopack', '--hostname', config.bindHost, '--port', config.port],
+ "bun",
+ [
+ "--bun",
+ "next",
+ "dev",
+ "--turbopack",
+ "--hostname",
+ config.bindHost,
+ "--port",
+ config.port,
+ ],
{
env,
- stdio: 'inherit'
- }
+ stdio: "inherit",
+ },
);
function forwardSignal(signal: NodeJS.Signals) {
@@ -205,9 +250,9 @@ function forwardSignal(signal: NodeJS.Signals) {
}
}
-process.on('SIGINT', () => forwardSignal('SIGINT'));
-process.on('SIGTERM', () => forwardSignal('SIGTERM'));
+process.on("SIGINT", () => forwardSignal("SIGINT"));
+process.on("SIGTERM", () => forwardSignal("SIGTERM"));
-child.on('exit', (code, signal) => {
+child.on("exit", (code, signal) => {
exitFromResult({ code, signal });
});
diff --git a/scripts/e2e-prepare.ts b/scripts/e2e-prepare.ts
index d6ae231..aab5820 100644
--- a/scripts/e2e-prepare.ts
+++ b/scripts/e2e-prepare.ts
@@ -1,11 +1,16 @@
-import { mkdirSync, rmSync } from 'node:fs';
-import { dirname, join } from 'node:path';
-import { Database } from 'bun:sqlite';
-import { ensureFinancialIngestionSchemaHealthy } from '../lib/server/db/financial-ingestion-schema';
-import { ensureLocalSqliteSchema } from '../lib/server/db/sqlite-schema-compat';
+import { mkdirSync, rmSync } from "node:fs";
+import { dirname, join } from "node:path";
+import { Database } from "bun:sqlite";
+import { ensureFinancialIngestionSchemaHealthy } from "../lib/server/db/financial-ingestion-schema";
+import { ensureLocalSqliteSchema } from "../lib/server/db/sqlite-schema-compat";
+import { applyLocalSqliteVectorEnv } from "./sqlite-vector-env";
-export const E2E_DATABASE_PATH = join(process.cwd(), 'data', 'e2e.sqlite');
-export const E2E_WORKFLOW_DATA_DIR = join(process.cwd(), '.workflow-data', 'e2e');
+export const E2E_DATABASE_PATH = join(process.cwd(), "data", "e2e.sqlite");
+export const E2E_WORKFLOW_DATA_DIR = join(
+ process.cwd(),
+ ".workflow-data",
+ "e2e",
+);
type PrepareE2eDatabaseOptions = {
databasePath?: string;
@@ -16,6 +21,11 @@ function removeFileIfPresent(path: string) {
rmSync(path, { force: true });
}
+const appliedVectorEnv = applyLocalSqliteVectorEnv(process.env);
+if (appliedVectorEnv.env !== process.env) {
+ Object.assign(process.env, appliedVectorEnv.env);
+}
+
export function prepareE2eDatabase(options: PrepareE2eDatabaseOptions = {}) {
const databasePath = options.databasePath ?? E2E_DATABASE_PATH;
const workflowDataDir = options.workflowDataDir ?? E2E_WORKFLOW_DATA_DIR;
@@ -30,9 +40,9 @@ export function prepareE2eDatabase(options: PrepareE2eDatabaseOptions = {}) {
const database = new Database(databasePath, { create: true });
try {
- database.exec('PRAGMA foreign_keys = ON;');
+ database.exec("PRAGMA foreign_keys = ON;");
ensureLocalSqliteSchema(database);
- ensureFinancialIngestionSchemaHealthy(database, { mode: 'auto' });
+ ensureFinancialIngestionSchemaHealthy(database, { mode: "auto" });
} finally {
database.close();
}
diff --git a/scripts/e2e-webserver.ts b/scripts/e2e-webserver.ts
index a175685..b619b57 100644
--- a/scripts/e2e-webserver.ts
+++ b/scripts/e2e-webserver.ts
@@ -1,37 +1,49 @@
-import { spawn } from 'node:child_process';
-import { mkdirSync } from 'node:fs';
-import { prepareE2eDatabase, E2E_DATABASE_PATH, E2E_WORKFLOW_DATA_DIR } from './e2e-prepare';
+import { spawn } from "node:child_process";
+import { mkdirSync } from "node:fs";
+import {
+ prepareE2eDatabase,
+ E2E_DATABASE_PATH,
+ E2E_WORKFLOW_DATA_DIR,
+} from "./e2e-prepare";
+import { applyLocalSqliteVectorEnv } from "./sqlite-vector-env";
-const host = process.env.PLAYWRIGHT_HOST ?? '127.0.0.1';
-const port = process.env.PLAYWRIGHT_PORT ?? '3400';
+const host = process.env.PLAYWRIGHT_HOST ?? "127.0.0.1";
+const port = process.env.PLAYWRIGHT_PORT ?? "3400";
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? `http://${host}:${port}`;
-const env: NodeJS.ProcessEnv = {
+const initialEnv: NodeJS.ProcessEnv = {
...process.env,
BETTER_AUTH_BASE_URL: baseURL,
- BETTER_AUTH_SECRET: 'playwright-e2e-secret-playwright-e2e-secret',
+ BETTER_AUTH_SECRET: "playwright-e2e-secret-playwright-e2e-secret",
BETTER_AUTH_TRUSTED_ORIGINS: baseURL,
DATABASE_URL: `file:${E2E_DATABASE_PATH}`,
HOSTNAME: host,
- NEXT_PUBLIC_API_URL: '',
+ NEXT_PUBLIC_API_URL: "",
PORT: port,
- SEC_USER_AGENT: 'Fiscal Clone Playwright ',
+ SEC_USER_AGENT: "Fiscal Clone Playwright ",
WORKFLOW_LOCAL_DATA_DIR: E2E_WORKFLOW_DATA_DIR,
- WORKFLOW_LOCAL_QUEUE_CONCURRENCY: '1',
- WORKFLOW_TARGET_WORLD: 'local'
+ WORKFLOW_LOCAL_QUEUE_CONCURRENCY: "1",
+ WORKFLOW_TARGET_WORLD: "local",
};
+const { config: sqliteVectorConfig, env } =
+ applyLocalSqliteVectorEnv(initialEnv);
delete env.NO_COLOR;
prepareE2eDatabase();
mkdirSync(E2E_WORKFLOW_DATA_DIR, { recursive: true });
+if (sqliteVectorConfig.mode === "native") {
+ console.info(
+ `[e2e] sqlite-vec native extension enabled (${sqliteVectorConfig.sqliteLibPath})`,
+ );
+}
const child = spawn(
- 'bun',
- ['--bun', 'next', 'dev', '--turbopack', '--hostname', host, '--port', port],
+ "bun",
+ ["--bun", "next", "dev", "--turbopack", "--hostname", host, "--port", port],
{
- stdio: 'inherit',
- env
- }
+ stdio: "inherit",
+ env,
+ },
);
function forwardSignal(signal: NodeJS.Signals) {
@@ -40,12 +52,12 @@ function forwardSignal(signal: NodeJS.Signals) {
}
}
-process.on('SIGINT', () => forwardSignal('SIGINT'));
-process.on('SIGTERM', () => forwardSignal('SIGTERM'));
+process.on("SIGINT", () => forwardSignal("SIGINT"));
+process.on("SIGTERM", () => forwardSignal("SIGTERM"));
-child.on('exit', (code, signal) => {
+child.on("exit", (code, signal) => {
if (signal) {
- process.exit(signal === 'SIGINT' || signal === 'SIGTERM' ? 0 : 1);
+ process.exit(signal === "SIGINT" || signal === "SIGTERM" ? 0 : 1);
return;
}
diff --git a/scripts/generate-taxonomy.ts b/scripts/generate-taxonomy.ts
index 98acf40..0ca2f52 100644
--- a/scripts/generate-taxonomy.ts
+++ b/scripts/generate-taxonomy.ts
@@ -93,6 +93,29 @@ const PACK_ORDER = [
"insurance",
"reit_real_estate",
"broker_asset_manager",
+ "agriculture",
+ "contractors_construction",
+ "contractors_federal_government",
+ "development_stage",
+ "entertainment_broadcasters",
+ "entertainment_cable_television",
+ "entertainment_casinos",
+ "entertainment_films",
+ "entertainment_music",
+ "extractive_mining",
+ "mortgage_banking",
+ "title_plant",
+ "franchisors",
+ "not_for_profit",
+ "plan_defined_benefit",
+ "plan_defined_contribution",
+ "plan_health_welfare",
+ "real_estate_general",
+ "real_estate_common_interest",
+ "real_estate_retail_land",
+ "real_estate_time_sharing",
+ "software",
+ "steamship",
] as const;
type PackName = (typeof PACK_ORDER)[number];
@@ -452,6 +475,34 @@ export { ${packs.map((p) => `${p.pack.toUpperCase().replace(/-/g, "_")}_KPIS`).j
`;
}
+function buildUnionSurfaceDefinitions(
+ surfacePacks: Map,
+): Map {
+ const surfacesByStatement = new Map();
+ const seen = new Set();
+
+ for (const pack of PACK_ORDER) {
+ const file = surfacePacks.get(pack);
+ if (!file) {
+ continue;
+ }
+
+ for (const surface of file.surfaces) {
+ const dedupeKey = `${surface.statement}:${surface.surface_key}`;
+ if (seen.has(dedupeKey)) {
+ continue;
+ }
+
+ seen.add(dedupeKey);
+ const existing = surfacesByStatement.get(surface.statement) || [];
+ existing.push(surface);
+ surfacesByStatement.set(surface.statement, existing);
+ }
+ }
+
+ return surfacesByStatement;
+}
+
function generateMainIndex(): string {
return `// Auto-generated by scripts/generate-taxonomy.ts
// DO NOT EDIT MANUALLY - changes will be overwritten
@@ -533,17 +584,9 @@ async function main() {
writeFileSync(join(OUTPUT_DIR, "types.ts"), generateTypesFile());
log("Generating surfaces...");
- const coreSurfaces = surfacePacks.get("core");
- if (coreSurfaces) {
- const surfacesByStatement = new Map();
-
- for (const surface of coreSurfaces.surfaces) {
- const existing = surfacesByStatement.get(surface.statement) || [];
- existing.push(surface);
- surfacesByStatement.set(surface.statement, existing);
- }
-
- for (const [statement, surfaces] of surfacesByStatement) {
+ const unionSurfaceDefinitions = buildUnionSurfaceDefinitions(surfacePacks);
+ if (unionSurfaceDefinitions.size > 0) {
+ for (const [statement, surfaces] of unionSurfaceDefinitions) {
writeFileSync(
join(OUTPUT_DIR, "surfaces", `${statement}.ts`),
generateSurfaceFile(statement, surfaces),
@@ -552,7 +595,7 @@ async function main() {
writeFileSync(
join(OUTPUT_DIR, "surfaces", "index.ts"),
- generateSurfacesIndex(surfacesByStatement),
+ generateSurfacesIndex(unionSurfaceDefinitions),
);
}
@@ -592,7 +635,10 @@ async function main() {
log("Generating main index...");
writeFileSync(join(OUTPUT_DIR, "index.ts"), generateMainIndex());
- const surfaceCount = coreSurfaces?.surfaces.length || 0;
+ const surfaceCount = [...unionSurfaceDefinitions.values()].reduce(
+ (sum, surfaces) => sum + surfaces.length,
+ 0,
+ );
const computedCount = computedFiles.reduce(
(sum, f) => sum + f.definitions.length,
0,
diff --git a/scripts/sqlite-vector-env.test.ts b/scripts/sqlite-vector-env.test.ts
new file mode 100644
index 0000000..34cf637
--- /dev/null
+++ b/scripts/sqlite-vector-env.test.ts
@@ -0,0 +1,146 @@
+import { describe, expect, it } from "vitest";
+import {
+ applyLocalSqliteVectorEnv,
+ resolveLocalSqliteVectorConfig,
+} from "./sqlite-vector-env";
+
+function createFileExists(paths: string[]) {
+ const existingPaths = new Set(paths);
+ return (path: string) => existingPaths.has(path);
+}
+
+describe("resolveLocalSqliteVectorConfig", () => {
+ it("prefers explicit env paths when both are configured", () => {
+ const config = resolveLocalSqliteVectorConfig({
+ env: {
+ SQLITE_CUSTOM_LIB_PATH: "/custom/libsqlite3.dylib",
+ SQLITE_VEC_EXTENSION_PATH: "/custom/vec0.dylib",
+ },
+ fileExists: createFileExists([
+ "/custom/libsqlite3.dylib",
+ "/custom/vec0.dylib",
+ ]),
+ platform: "darwin",
+ resolveVectorExtensionPath: () => "/package/vec0.dylib",
+ });
+
+ expect(config).toEqual({
+ mode: "native",
+ source: "explicit-env",
+ sqliteLibPath: "/custom/libsqlite3.dylib",
+ vectorExtensionPath: "/custom/vec0.dylib",
+ });
+ });
+
+ it("auto-detects the Apple Silicon Homebrew SQLite path", () => {
+ const config = resolveLocalSqliteVectorConfig({
+ env: {},
+ fileExists: createFileExists([
+ "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib",
+ "/package/vec0.dylib",
+ ]),
+ platform: "darwin",
+ resolveVectorExtensionPath: () => "/package/vec0.dylib",
+ });
+
+ expect(config).toEqual({
+ mode: "native",
+ source: "autodetect-homebrew",
+ sqliteLibPath: "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib",
+ vectorExtensionPath: "/package/vec0.dylib",
+ });
+ });
+
+ it("auto-detects the Intel Homebrew SQLite path", () => {
+ const config = resolveLocalSqliteVectorConfig({
+ env: {},
+ fileExists: createFileExists([
+ "/usr/local/opt/sqlite/lib/libsqlite3.dylib",
+ "/package/vec0.dylib",
+ ]),
+ platform: "darwin",
+ resolveVectorExtensionPath: () => "/package/vec0.dylib",
+ });
+
+ expect(config).toEqual({
+ mode: "native",
+ source: "autodetect-homebrew",
+ sqliteLibPath: "/usr/local/opt/sqlite/lib/libsqlite3.dylib",
+ vectorExtensionPath: "/package/vec0.dylib",
+ });
+ });
+
+ it("falls back when no SQLite library is available", () => {
+ const config = resolveLocalSqliteVectorConfig({
+ env: {},
+ fileExists: createFileExists(["/package/vec0.dylib"]),
+ platform: "darwin",
+ resolveVectorExtensionPath: () => "/package/vec0.dylib",
+ });
+
+ expect(config).toEqual({
+ mode: "fallback",
+ reason: "sqlite-lib-missing",
+ });
+ });
+
+ it("falls back when the vector extension path cannot be resolved", () => {
+ const config = resolveLocalSqliteVectorConfig({
+ env: {},
+ fileExists: createFileExists([
+ "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib",
+ ]),
+ platform: "darwin",
+ resolveVectorExtensionPath: () => {
+ throw new Error("missing extension");
+ },
+ });
+
+ expect(config).toEqual({
+ mode: "fallback",
+ reason: "vector-extension-missing",
+ });
+ });
+
+ it("falls back outside macOS", () => {
+ const config = resolveLocalSqliteVectorConfig({
+ env: {},
+ fileExists: createFileExists([
+ "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib",
+ "/package/vec0.dylib",
+ ]),
+ platform: "linux",
+ resolveVectorExtensionPath: () => "/package/vec0.dylib",
+ });
+
+ expect(config).toEqual({
+ mode: "fallback",
+ reason: "non-macos",
+ });
+ });
+});
+
+describe("applyLocalSqliteVectorEnv", () => {
+ it("injects resolved native paths without overwriting explicit values", () => {
+ const initialEnv = {
+ DATABASE_URL: "file:data/fiscal.sqlite",
+ SQLITE_CUSTOM_LIB_PATH: "/custom/libsqlite3.dylib",
+ SQLITE_VEC_EXTENSION_PATH: "/custom/vec0.dylib",
+ };
+
+ const result = applyLocalSqliteVectorEnv(initialEnv, {
+ fileExists: createFileExists([
+ "/custom/libsqlite3.dylib",
+ "/custom/vec0.dylib",
+ ]),
+ platform: "darwin",
+ resolveVectorExtensionPath: () => "/package/vec0.dylib",
+ });
+
+ expect(result.env).toEqual({
+ ...initialEnv,
+ SQLITE_CUSTOM_LIB_PATH: "/custom/libsqlite3.dylib",
+ SQLITE_VEC_EXTENSION_PATH: "/custom/vec0.dylib",
+ });
+ });
+});
diff --git a/scripts/sqlite-vector-env.ts b/scripts/sqlite-vector-env.ts
new file mode 100644
index 0000000..c864692
--- /dev/null
+++ b/scripts/sqlite-vector-env.ts
@@ -0,0 +1,144 @@
+import { existsSync } from "node:fs";
+import { getLoadablePath } from "sqlite-vec";
+
+const HOMEBREW_SQLITE_LIBRARY_PATHS = [
+ "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib",
+ "/usr/local/opt/sqlite/lib/libsqlite3.dylib",
+] as const;
+
+export type LocalSqliteVectorConfig =
+ | {
+ mode: "native";
+ source: "explicit-env" | "autodetect-homebrew";
+ sqliteLibPath: string;
+ vectorExtensionPath: string;
+ }
+ | {
+ mode: "fallback";
+ reason: "non-macos" | "sqlite-lib-missing" | "vector-extension-missing";
+ };
+
+type ResolveLocalSqliteVectorConfigOptions = {
+ env?: Record;
+ fileExists?: (path: string) => boolean;
+ platform?: NodeJS.Platform;
+ resolveVectorExtensionPath?: () => string;
+};
+
+function trim(value: string | undefined) {
+ const candidate = value?.trim();
+ return candidate ? candidate : undefined;
+}
+
+function defaultResolveVectorExtensionPath() {
+ return getLoadablePath();
+}
+
+function resolveVectorExtensionPath(
+ env: Record,
+ resolvePath: () => string,
+ fileExists: (path: string) => boolean,
+) {
+ const explicitPath = trim(env.SQLITE_VEC_EXTENSION_PATH);
+ if (explicitPath) {
+ return fileExists(explicitPath) ? explicitPath : null;
+ }
+
+ try {
+ const packagePath = resolvePath();
+ return fileExists(packagePath) ? packagePath : null;
+ } catch {
+ return null;
+ }
+}
+
+export function resolveLocalSqliteVectorConfig(
+ options: ResolveLocalSqliteVectorConfigOptions = {},
+): LocalSqliteVectorConfig {
+ const env = options.env ?? process.env;
+ const platform = options.platform ?? process.platform;
+ const fileExists = options.fileExists ?? existsSync;
+ const resolvePath =
+ options.resolveVectorExtensionPath ?? defaultResolveVectorExtensionPath;
+
+ if (platform !== "darwin") {
+ return {
+ mode: "fallback",
+ reason: "non-macos",
+ };
+ }
+
+ const vectorExtensionPath = resolveVectorExtensionPath(
+ env,
+ resolvePath,
+ fileExists,
+ );
+ if (!vectorExtensionPath) {
+ return {
+ mode: "fallback",
+ reason: "vector-extension-missing",
+ };
+ }
+
+ const explicitSqliteLibPath = trim(env.SQLITE_CUSTOM_LIB_PATH);
+ if (explicitSqliteLibPath) {
+ if (!fileExists(explicitSqliteLibPath)) {
+ return {
+ mode: "fallback",
+ reason: "sqlite-lib-missing",
+ };
+ }
+
+ return {
+ mode: "native",
+ source: "explicit-env",
+ sqliteLibPath: explicitSqliteLibPath,
+ vectorExtensionPath,
+ };
+ }
+
+ for (const sqliteLibPath of HOMEBREW_SQLITE_LIBRARY_PATHS) {
+ if (!fileExists(sqliteLibPath)) {
+ continue;
+ }
+
+ return {
+ mode: "native",
+ source: "autodetect-homebrew",
+ sqliteLibPath,
+ vectorExtensionPath,
+ };
+ }
+
+ return {
+ mode: "fallback",
+ reason: "sqlite-lib-missing",
+ };
+}
+
+export function applyLocalSqliteVectorEnv<
+ T extends Record,
+>(env: T, options: ResolveLocalSqliteVectorConfigOptions = {}) {
+ const config = resolveLocalSqliteVectorConfig({ ...options, env });
+
+ if (config.mode !== "native") {
+ return {
+ config,
+ env,
+ };
+ }
+
+ return {
+ config,
+ env: {
+ ...env,
+ SQLITE_CUSTOM_LIB_PATH:
+ env.SQLITE_CUSTOM_LIB_PATH?.trim() || config.sqliteLibPath,
+ SQLITE_VEC_EXTENSION_PATH:
+ env.SQLITE_VEC_EXTENSION_PATH?.trim() || config.vectorExtensionPath,
+ } as T & {
+ SQLITE_CUSTOM_LIB_PATH: string;
+ SQLITE_VEC_EXTENSION_PATH: string;
+ },
+ };
+}
diff --git a/scripts/validate-taxonomy-packs.ts b/scripts/validate-taxonomy-packs.ts
index 970cd8d..f329dbd 100644
--- a/scripts/validate-taxonomy-packs.ts
+++ b/scripts/validate-taxonomy-packs.ts
@@ -1,6 +1,6 @@
-import type { FinancialStatementKind } from '@/lib/types';
-import { hydrateFilingTaxonomySnapshot } from '@/lib/server/taxonomy/engine';
-import type { TaxonomyHydrationInput } from '@/lib/server/taxonomy/types';
+import type { FinancialStatementKind } from "@/lib/types";
+import { hydrateFilingTaxonomySnapshot } from "@/lib/server/taxonomy/engine";
+import type { TaxonomyHydrationInput } from "@/lib/server/taxonomy/types";
type ValidationCase = {
name: string;
@@ -16,135 +16,262 @@ type ValidationFailure = {
};
const UNIVERSAL_INCOME_KEYS = [
- 'revenue',
- 'gross_profit',
- 'operating_expenses',
- 'operating_income',
- 'income_tax_expense',
- 'net_income'
+ "revenue",
+ "gross_profit",
+ "operating_expenses",
+ "operating_income",
+ "income_tax_expense",
+ "net_income",
] as const;
const EXPENSE_BREAKDOWN_KEYS = [
- 'selling_general_and_administrative',
- 'research_and_development',
- 'other_operating_expense'
+ "selling_general_and_administrative",
+ "research_and_development",
+ "other_operating_expense",
] as const;
const CORPUS: ValidationCase[] = [
{
- name: 'core-msft-2026-01-28',
- expectedPack: 'core',
+ name: "core-msft-2026-01-28",
+ expectedPack: "core",
input: {
filingId: 1,
- ticker: 'MSFT',
- cik: '0000789019',
- accessionNumber: '0001193125-26-027207',
- filingDate: '2026-01-28',
- filingType: '10-Q',
- filingUrl: 'https://www.sec.gov/Archives/edgar/data/789019/000119312526027207/',
- primaryDocument: 'msft-20251231.htm'
+ ticker: "MSFT",
+ cik: "0000789019",
+ accessionNumber: "0001193125-26-027207",
+ filingDate: "2026-01-28",
+ filingType: "10-Q",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/789019/000119312526027207/",
+ primaryDocument: "msft-20251231.htm",
},
requiredSurfaceKeys: {
income: [...UNIVERSAL_INCOME_KEYS, ...EXPENSE_BREAKDOWN_KEYS],
- balance: ['total_assets']
- }
+ balance: ["total_assets"],
+ },
},
{
- name: 'bank-jpm-2026-02-13',
- expectedPack: 'bank_lender',
+ name: "bank-jpm-2026-02-13",
+ expectedPack: "bank_lender",
input: {
filingId: 2,
- ticker: 'JPM',
- cik: '0000019617',
- accessionNumber: '0001628280-26-008131',
- filingDate: '2026-02-13',
- filingType: '10-K',
- filingUrl: 'https://www.sec.gov/Archives/edgar/data/19617/000162828026008131/',
- primaryDocument: 'jpm-20251231.htm'
+ ticker: "JPM",
+ cik: "0000019617",
+ accessionNumber: "0001628280-26-008131",
+ filingDate: "2026-02-13",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/19617/000162828026008131/",
+ primaryDocument: "jpm-20251231.htm",
},
requiredSurfaceKeys: {
- income: [...UNIVERSAL_INCOME_KEYS, ...EXPENSE_BREAKDOWN_KEYS, 'net_interest_income', 'noninterest_income'],
- balance: ['loans', 'deposits']
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "net_interest_income",
+ "noninterest_income",
+ ],
+ balance: ["loans", "deposits"],
},
- requiredKpiKeys: ['net_interest_margin']
+ requiredKpiKeys: ["net_interest_margin"],
},
{
- name: 'insurance-aig-2026-02-12',
- expectedPack: 'insurance',
+ name: "insurance-aig-2026-02-12",
+ expectedPack: "insurance",
input: {
filingId: 3,
- ticker: 'AIG',
- cik: '0000005272',
- accessionNumber: '0000005272-26-000023',
- filingDate: '2026-02-12',
- filingType: '10-K',
- filingUrl: 'https://www.sec.gov/Archives/edgar/data/5272/000000527226000023/',
- primaryDocument: 'aig-20251231.htm'
+ ticker: "AIG",
+ cik: "0000005272",
+ accessionNumber: "0000005272-26-000023",
+ filingDate: "2026-02-12",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/5272/000000527226000023/",
+ primaryDocument: "aig-20251231.htm",
},
requiredSurfaceKeys: {
- income: [...UNIVERSAL_INCOME_KEYS, ...EXPENSE_BREAKDOWN_KEYS, 'premiums', 'claims_and_benefits'],
- balance: ['policy_liabilities']
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "premiums",
+ "claims_and_benefits",
+ ],
+ balance: ["policy_liabilities"],
},
- requiredKpiKeys: ['combined_ratio']
+ requiredKpiKeys: ["combined_ratio"],
},
{
- name: 'reit-o-2026-02-25',
- expectedPack: 'reit_real_estate',
+ name: "reit-o-2026-02-25",
+ expectedPack: "reit_real_estate",
input: {
filingId: 4,
- ticker: 'O',
- cik: '0000726728',
- accessionNumber: '0000726728-26-000011',
- filingDate: '2026-02-25',
- filingType: '10-K',
- filingUrl: 'https://www.sec.gov/Archives/edgar/data/726728/000072672826000011/',
- primaryDocument: 'o-20251231.htm'
+ ticker: "O",
+ cik: "0000726728",
+ accessionNumber: "0000726728-26-000011",
+ filingDate: "2026-02-25",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/726728/000072672826000011/",
+ primaryDocument: "o-20251231.htm",
},
requiredSurfaceKeys: {
- income: [...UNIVERSAL_INCOME_KEYS, ...EXPENSE_BREAKDOWN_KEYS, 'rental_revenue'],
- balance: ['investment_property', 'total_assets']
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "rental_revenue",
+ ],
+ balance: ["investment_property", "total_assets"],
},
- requiredKpiKeys: ['property_count']
+ requiredKpiKeys: ["property_count"],
},
{
- name: 'broker-blk-2026-02-25',
- expectedPack: 'broker_asset_manager',
+ name: "broker-blk-2026-02-25",
+ expectedPack: "broker_asset_manager",
input: {
filingId: 5,
- ticker: 'BLK',
- cik: '0002012383',
- accessionNumber: '0001193125-26-071966',
- filingDate: '2026-02-25',
- filingType: '10-K',
- filingUrl: 'https://www.sec.gov/Archives/edgar/data/2012383/000119312526071966/',
- primaryDocument: 'blk-20251231.htm'
+ ticker: "BLK",
+ cik: "0002012383",
+ accessionNumber: "0001193125-26-071966",
+ filingDate: "2026-02-25",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/2012383/000119312526071966/",
+ primaryDocument: "blk-20251231.htm",
},
requiredSurfaceKeys: {
- income: [...UNIVERSAL_INCOME_KEYS, ...EXPENSE_BREAKDOWN_KEYS, 'fee_revenue'],
- balance: ['total_assets', 'total_liabilities']
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "fee_revenue",
+ ],
+ balance: ["total_assets", "total_liabilities"],
},
- requiredKpiKeys: ['aum', 'fee_paying_aum']
- }
+ requiredKpiKeys: ["aum", "fee_paying_aum"],
+ },
+ {
+ name: "software-orcl-2025-06-18",
+ expectedPack: "software",
+ input: {
+ filingId: 6,
+ ticker: "ORCL",
+ cik: "0001341439",
+ accessionNumber: "0000950170-25-087926",
+ filingDate: "2025-06-18",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/1341439/000095017025087926/",
+ primaryDocument: "orcl-20250531.htm",
+ },
+ requiredSurfaceKeys: {
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "software_license_revenue",
+ "maintenance_and_support_revenue",
+ "cost_of_software_revenue",
+ ],
+ balance: ["capitalized_software_costs", "deferred_revenue"],
+ },
+ },
+ {
+ name: "mining-fcx-2025-02-14",
+ expectedPack: "extractive_mining",
+ input: {
+ filingId: 7,
+ ticker: "FCX",
+ cik: "0000831259",
+ accessionNumber: "0000831259-25-000006",
+ filingDate: "2025-02-14",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/831259/000083125925000006/",
+ primaryDocument: "fcx-20241231.htm",
+ },
+ requiredSurfaceKeys: {
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "mining_revenue",
+ "production_costs",
+ "exploration_expense",
+ ],
+ balance: ["mining_properties", "rehabilitation_liabilities"],
+ },
+ },
+ {
+ name: "mortgage-rkt-2026-02-27",
+ expectedPack: "mortgage_banking",
+ input: {
+ filingId: 8,
+ ticker: "RKT",
+ cik: "0001805284",
+ accessionNumber: "0001628280-26-013283",
+ filingDate: "2026-02-27",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/1805284/000162828026013283/",
+ primaryDocument: "rkt-20251231.htm",
+ },
+ requiredSurfaceKeys: {
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "mortgage_banking_revenue",
+ "servicing_fees",
+ "interest_income",
+ ],
+ balance: ["loans_held_for_sale", "mortgage_servicing_rights"],
+ },
+ },
+ {
+ name: "casino-mgm-2026-02-11",
+ expectedPack: "entertainment_casinos",
+ input: {
+ filingId: 9,
+ ticker: "MGM",
+ cik: "0000789570",
+ accessionNumber: "0000789570-26-000018",
+ filingDate: "2026-02-11",
+ filingType: "10-K",
+ filingUrl:
+ "https://www.sec.gov/Archives/edgar/data/789570/000078957026000018/",
+ primaryDocument: "mgm-20251231.htm",
+ },
+ requiredSurfaceKeys: {
+ income: [
+ ...UNIVERSAL_INCOME_KEYS,
+ ...EXPENSE_BREAKDOWN_KEYS,
+ "gaming_revenue",
+ "hotel_and_resort_revenue",
+ "food_and_beverage_revenue",
+ ],
+ balance: ["casino_properties", "gaming_tax_liability"],
+ },
+ },
];
const FALLBACK_WARNINGS = new Set([
- 'surface_rows_deferred_to_typescript',
- 'ts_compact_surface_fallback_used'
+ "surface_rows_deferred_to_typescript",
+ "ts_compact_surface_fallback_used",
]);
function parseCaseFilter(argv: string[]) {
for (const arg of argv) {
- if (arg === '--help' || arg === '-h') {
- console.log('Validate live SEC representative filings for each active taxonomy pack.');
- console.log('');
- console.log('Usage:');
- console.log(' bun run scripts/validate-taxonomy-packs.ts');
- console.log(' bun run scripts/validate-taxonomy-packs.ts --case=bank-jpm-2026-02-13');
+ if (arg === "--help" || arg === "-h") {
+ console.log(
+ "Validate live SEC representative filings for each active taxonomy pack.",
+ );
+ console.log("");
+ console.log("Usage:");
+ console.log(" bun run scripts/validate-taxonomy-packs.ts");
+ console.log(
+ " bun run scripts/validate-taxonomy-packs.ts --case=bank-jpm-2026-02-13",
+ );
process.exit(0);
}
- if (arg.startsWith('--case=')) {
- const value = arg.slice('--case='.length).trim();
+ if (arg.startsWith("--case=")) {
+ const value = arg.slice("--case=".length).trim();
return value.length > 0 ? value : null;
}
}
@@ -154,38 +281,50 @@ function parseCaseFilter(argv: string[]) {
function keysForStatement(
result: Awaited>,
- statement: FinancialStatementKind
+ statement: FinancialStatementKind,
) {
return (result.surface_rows[statement] ?? []).map((row) => row.key);
}
-async function validateCase(testCase: ValidationCase): Promise {
+async function validateCase(
+ testCase: ValidationCase,
+): Promise {
const startedAt = Date.now();
const result = await hydrateFilingTaxonomySnapshot(testCase.input);
const issues: string[] = [];
const warnings = result.normalization_summary.warnings ?? [];
const kpiKeys = result.kpi_rows.map((row) => row.key);
- if (result.parse_status !== 'ready') {
- issues.push(`parse_status=${result.parse_status}${result.parse_error ? ` parse_error=${result.parse_error}` : ''}`);
+ if (result.parse_status !== "ready") {
+ issues.push(
+ `parse_status=${result.parse_status}${result.parse_error ? ` parse_error=${result.parse_error}` : ""}`,
+ );
}
if (result.fiscal_pack !== testCase.expectedPack) {
- issues.push(`fiscal_pack=${result.fiscal_pack ?? 'null'} expected=${testCase.expectedPack}`);
+ issues.push(
+ `fiscal_pack=${result.fiscal_pack ?? "null"} expected=${testCase.expectedPack}`,
+ );
}
- if ((Object.values(result.surface_rows) as Array>).every((rows) => rows.length === 0)) {
- issues.push('surface_rows are empty');
+ if (
+ (Object.values(result.surface_rows) as Array>).every(
+ (rows) => rows.length === 0,
+ )
+ ) {
+ issues.push("surface_rows are empty");
}
- const fallbackWarning = warnings.find((warning) => FALLBACK_WARNINGS.has(warning));
+ const fallbackWarning = warnings.find((warning) =>
+ FALLBACK_WARNINGS.has(warning),
+ );
if (fallbackWarning) {
issues.push(`unexpected fallback warning=${fallbackWarning}`);
}
- for (const [statement, requiredKeys] of Object.entries(testCase.requiredSurfaceKeys) as Array<
- [FinancialStatementKind, string[]]
- >) {
+ for (const [statement, requiredKeys] of Object.entries(
+ testCase.requiredSurfaceKeys,
+ ) as Array<[FinancialStatementKind, string[]]>) {
const actualKeys = new Set(keysForStatement(result, statement));
for (const requiredKey of requiredKeys) {
if (!actualKeys.has(requiredKey)) {
@@ -201,20 +340,20 @@ async function validateCase(testCase: ValidationCase): Promise