Accessing the function from ix-viewer.bundle.min.js

31 views
Skip to first unread message

V R

unread,
Jun 25, 2025, 8:44:46 AMJun 25
to Arelle-users
How can I access the u8 function used in the  ix-viewer.bundle.05b79d9874dc5c8498c2.min.js  to my custom js or jquery ?

--------------------------------
u8 = {
firstPage: function (t, e) {
var n = [{name: "Tag", value: t.name}, {
name: "Fact",
value: t.value,
html: t.isHTML,
isAmountsOnly: t.isAmountsOnly
}, {name: "Fact Language", value: t["xml:lang"]}, {name: "Period", value: t.period}, {
name: "Axis",
value: l8(t.segment || [], "axis"),
html: !0
}, {name: "Member", value: l8(t.segment || [], "dimension"), html: !0}, {
name: "Typed Member",
value: c8(t.segment || [], "implicit"),
html: !0
}, {name: "Explicit Member", value: c8(t.segment || [], "explicit"), html: !0}, {
name: "Measure",
value: t.measure
}, {name: "Scale", value: t.scale}, {name: "Decimals", value: t.decimals}, {
name: "Balance",
value: t.balance
}, {
name: "Sign",
value: t.isAmountsOnly ? t.isNegativeOnly ? "Negative" : "Positive" : null
}, {name: "Type", value: t.xbrltype}, {name: "Format", value: t.format}, {
name: "Footnote",
value: t.footnote
}], i = document.createElement("tbody");
n.forEach((function (e) {
if (e.value) {
var n = document.createElement("tr"), r = document.createElement("th");
r.setAttribute("class", "".concat("Fact" === e.name ? "fact-collapse" : ""));
var o = document.createTextNode(e.name);
r.appendChild(o);
var a = document.createElement("td"), s = document.createElement("div");
if (s.classList.add("Tag" === e.name ? "break-all" : "break-word"), s.setAttribute("data-cy", "".concat(e.name, "-value")), e.html) {
s.classList.add("fact-value-modal"), s.classList.add("position-relative");
var l = new DOMParser, c = l9.sanitizeHtml(e.value), u = l.parseFromString(c, "text/html");
u.body.classList.add("bg-inherit"), r8(u), s.append(u.body), a.appendChild(s)
} else {
if ("Fact" === e.name) {
var d = Number(e.value);
e.isAmountsOnly && !Number.isNaN(d) && (t.decimalsVal && t.decimalsVal >= 0 ? e.value = d.toLocaleString("en-US", {
maximumFractionDigits: 10,
minimumFractionDigits: t.decimalsVal
}) : e.value = d.toLocaleString("en-US", {maximumFractionDigits: 10}))
}
s.textContent = e.value.toString(), a.appendChild(s)
}
n.appendChild(r), n.appendChild(a), i.append(n)
}
})), u8.fillCarousel(e, i.firstElementChild ? i : u8.noDataCarousel())
}, secondPage: function (t, e) {
var n = document.createElement("tbody");
t.labels.forEach((function (t) {
for (var e in t) {
var i = document.createElement("tr"), r = document.createElement("th"),
o = document.createTextNode(e);
r.appendChild(o);
var a = document.createElement("td"), s = document.createElement("div"),
l = document.createTextNode(t[e]);
s.appendChild(l), a.appendChild(s), i.appendChild(r), i.appendChild(a), n.appendChild(i)
}
})), u8.fillCarousel(e, n.firstElementChild ? n : u8.noDataCarousel())
}, thirdPage: function (t, e) {
var n = document.createElement("tbody");
t.references && t.references.forEach((function (t, e, i) {
if (t.forEach((function (t) {
var e, i;
try {
for (var r = function (t) {
var e = "function" == typeof Symbol && Symbol.iterator, n = e && t[e], i = 0;
if (n) return n.call(t);
if (t && "number" == typeof t.length) return {
next: function () {
return t && i >= t.length && (t = void 0), {value: t && t[i++], done: !t}
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}(Object.entries(t)), o = r.next(); !o.done; o = r.next()) {
var a = a8(o.value, 2), s = a[0], l = a[1], c = document.createElement("tr"),
u = document.createElement("th"), d = document.createElement("a");
if (d.setAttribute("href", String(l)), d.setAttribute("target", "_blank"), d.setAttribute("rel", "noopener noreferrer"), "URI" === l) {
var h = document.createElement("small"),
p = document.createTextNode(" (Will Leave SEC Website)");
h.appendChild(p);
var f = document.createTextNode("".concat(s));
u.appendChild(f), u.appendChild(h)
} else f = document.createTextNode(s), u.appendChild(f);
var g = document.createElement("td"), m = document.createElement("div");
if ("URI" === l) {
var y = document.createElement("a");
y.setAttribute("href", l), y.setAttribute("target", "_blank"), y.setAttribute("rel", "noopener noreferrer");
var v = document.createTextNode(l);
y.appendChild(v), g.appendChild(y)
} else {
var _ = document.createTextNode(String(l));
m.appendChild(_), g.appendChild(m)
}
c.appendChild(u), c.appendChild(g), n.appendChild(c)
}
} catch (t) {
e = {error: t}
} finally {
try {
o && !o.done && (i = r.return) && i.call(r)
} finally {
if (e) throw e.error
}
}
})), e !== i.length) {
var r = document.createElement("tr"), o = document.createElement("td");
o.setAttribute("class", "blank-table-row"), o.setAttribute("colspan", "3"), r.appendChild(o), n.appendChild(r)
}
})), u8.fillCarousel(e, n.firstElementChild ? n : u8.noDataCarousel())
}, fourthPage: function (t, e) {
var n = function (t, e, n) {
if (n || 2 === arguments.length) for (var i, r = 0, o = e.length; r < o; r++) !i && r in e || (i || (i = Array.prototype.slice.call(e, 0, r)), i[r] = e[r]);
return t.concat(i || Array.prototype.slice.call(e))
}([], a8(t.calculations), !1);
n.unshift([{label: Df.Balance, value: t.balance ? t.balance : "N/A"}]);
var i = document.createElement("tbody");
n.forEach((function (t, e, n) {
if (t.forEach((function (t) {
var e = document.createElement("tr"), n = document.createElement("th"),
r = document.createTextNode(t.label);
n.appendChild(r);
var o = document.createElement("td"), a = document.createElement("div"),
s = document.createTextNode(t.value);
a.appendChild(s), o.appendChild(a), e.appendChild(n), e.appendChild(o), i.appendChild(e)
})), e !== n.length) {
var r = document.createElement("tr"), o = document.createElement("td");
o.setAttribute("class", "blank-table-row"), o.setAttribute("colspan", "3"), r.appendChild(o), i.appendChild(r)
}
})), u8.fillCarousel(e, i.firstElementChild ? i : u8.noDataCarousel())
}, noDataCarousel: function () {
var t = document.createElement("tr"), e = document.createElement("td"),
n = document.createTextNode("No Data.");
return e.appendChild(n), t.appendChild(e), t
}, fillCarousel: function (t, e) {
var n;
l9.emptyHTMLByID(t), null === (n = document.getElementById(t)) || void 0 === n || n.appendChild(e)
}
}


Austin Matherne

unread,
Jun 30, 2025, 11:44:48 AMJun 30
to Arelle-users
Hi,

Reusing the JS probably isn't something the SEC team that builds and maintains the ix viewer is likely to support, but if you're curious, that appears to map to FactPages in the unminified source.

Best,
Austin

Reply all
Reply to author
Forward
0 new messages