@pie-element/venn-classification 0.1.1-next.16 → 0.1.1-next.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35299,28 +35299,52 @@ function M(e = {}) {
35299
35299
  }
35300
35300
  var P = "@pie-lib/math-rendering";
35301
35301
  var F = "@pie-lib/math-rendering@2";
35302
- var I = null;
35303
- function L() {
35302
+ var I = "pie-print";
35303
+ var L = 50;
35304
+ var R = 1e4;
35305
+ var z = null;
35306
+ function B() {
35304
35307
  return !!window[F]?.opts?.useSingleDollar;
35305
35308
  }
35306
- function R() {
35307
- return I || (I = M({ useSingleDollar: L() })), I;
35309
+ function V() {
35310
+ return z || (z = M({ useSingleDollar: B() })), z;
35308
35311
  }
35309
- function z() {
35312
+ function H() {
35310
35313
  if (typeof window > "u") return null;
35311
35314
  let e = window[P];
35312
35315
  return typeof e?.renderMath == "function" ? e : null;
35313
35316
  }
35314
- function B() {
35315
- let e = i();
35316
- e && r("legacy-renderer-delegation", `window['${P}'] renders this element's math with MathJax ${e}`);
35317
+ function U(e) {
35318
+ let t = e;
35319
+ for (; t;) {
35320
+ if (t instanceof Element && t.localName === I) return t;
35321
+ t = t instanceof ShadowRoot ? t.host : t.parentNode;
35322
+ }
35323
+ return null;
35324
+ }
35325
+ function W() {
35326
+ let e = window.renderMath;
35327
+ return typeof e == "function" ? e : null;
35328
+ }
35329
+ async function G(e) {
35330
+ let t = U(e);
35331
+ if (!t) return null;
35332
+ let n = W();
35333
+ if (n || t.mathRenderingModuleUrlImported !== !0) return n;
35334
+ let r = Date.now() + R;
35335
+ for (; Date.now() < r;) {
35336
+ await new Promise((e) => setTimeout(e, L));
35337
+ let e = W();
35338
+ if (e) return e;
35339
+ }
35340
+ return null;
35317
35341
  }
35318
- var V = async (e) => {
35342
+ var K = async (e) => {
35319
35343
  if (typeof window > "u") return;
35320
35344
  let t = typeof e == "string", n;
35321
35345
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
35322
- let r = z();
35323
- return r ? (B(), await r.renderMath?.(n)) : await R()(n), t ? n.innerHTML : void 0;
35346
+ let r = H(), i = r || t ? null : await G(n);
35347
+ return r ? await r.renderMath?.(n) : i ? await i(n) : await V()(n), t ? n.innerHTML : void 0;
35324
35348
  };
35325
35349
  //#endregion
35326
35350
  //#region src/delivery/tile-accessible-name.ts
@@ -36641,7 +36665,7 @@ function VennClassification($$anchor, $$props) {
36641
36665
  if (!containerEl) return;
36642
36666
  const warn = (err) => console.warn("venn-classification: MathJax render failed", err);
36643
36667
  try {
36644
- Promise.resolve(V(containerEl)).catch(warn);
36668
+ Promise.resolve(K(containerEl)).catch(warn);
36645
36669
  } catch (err) {
36646
36670
  warn(err);
36647
36671
  }