@pie-element/venn-classification 0.1.1-next.17 → 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.
@@ -1,4 +1,4 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as ee, u as I, v as L, w as R, x as z, y as te, z as B } from "../VennClassification-DrP-zXoc.js";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as ee, u as I, v as L, w as R, x as z, y as te, z as B } from "../VennClassification-F4mRKoc5.js";
2
2
  import { _ as ne, g as re, h as ie, i as ae, m as oe, n as se, p as V, v as H, y as ce } from "../controller-bkBJ6-j1.js";
3
3
  import { Editor as le } from "@tiptap/core";
4
4
  import ue from "@tiptap/starter-kit";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../VennClassification-DrP-zXoc.js";
1
+ import { t as e } from "../VennClassification-F4mRKoc5.js";
2
2
  import { c as t } from "../controller-bkBJ6-j1.js";
3
3
  //#region ../../lib-svelte/delivery-events/dist/index2.js
4
4
  function n(e) {
@@ -5601,24 +5601,52 @@ function M(e = {}) {
5601
5601
  }
5602
5602
  var P = "@pie-lib/math-rendering";
5603
5603
  var F = "@pie-lib/math-rendering@2";
5604
- var I = null;
5605
- function L() {
5604
+ var I = "pie-print";
5605
+ var L = 50;
5606
+ var R = 1e4;
5607
+ var z = null;
5608
+ function B() {
5606
5609
  return !!window[F]?.opts?.useSingleDollar;
5607
5610
  }
5608
- function R() {
5609
- return I || (I = M({ useSingleDollar: L() })), I;
5611
+ function V() {
5612
+ return z || (z = M({ useSingleDollar: B() })), z;
5610
5613
  }
5611
- function z() {
5614
+ function H() {
5612
5615
  if (typeof window > "u") return null;
5613
5616
  let e = window[P];
5614
5617
  return typeof e?.renderMath == "function" ? e : null;
5615
5618
  }
5616
- var B = async (e) => {
5619
+ function U(e) {
5620
+ let t = e;
5621
+ for (; t;) {
5622
+ if (t instanceof Element && t.localName === I) return t;
5623
+ t = t instanceof ShadowRoot ? t.host : t.parentNode;
5624
+ }
5625
+ return null;
5626
+ }
5627
+ function W() {
5628
+ let e = window.renderMath;
5629
+ return typeof e == "function" ? e : null;
5630
+ }
5631
+ async function G(e) {
5632
+ let t = U(e);
5633
+ if (!t) return null;
5634
+ let n = W();
5635
+ if (n || t.mathRenderingModuleUrlImported !== !0) return n;
5636
+ let r = Date.now() + R;
5637
+ for (; Date.now() < r;) {
5638
+ await new Promise((e) => setTimeout(e, L));
5639
+ let e = W();
5640
+ if (e) return e;
5641
+ }
5642
+ return null;
5643
+ }
5644
+ var K = async (e) => {
5617
5645
  if (typeof window > "u") return;
5618
5646
  let t = typeof e == "string", n;
5619
5647
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
5620
- let r = z();
5621
- return r ? await r.renderMath?.(n) : await R()(n), t ? n.innerHTML : void 0;
5648
+ let r = H(), i = r || t ? null : await G(n);
5649
+ return r ? await r.renderMath?.(n) : i ? await i(n) : await V()(n), t ? n.innerHTML : void 0;
5622
5650
  };
5623
5651
  //#endregion
5624
5652
  //#region ../../shared/translator/dist/en.js
@@ -9314,7 +9342,7 @@ function VennClassification($$anchor, $$props) {
9314
9342
  if (!containerEl) return;
9315
9343
  const warn = (err) => console.warn("venn-classification: MathJax render failed", err);
9316
9344
  try {
9317
- Promise.resolve(B(containerEl)).catch(warn);
9345
+ Promise.resolve(K(containerEl)).catch(warn);
9318
9346
  } catch (err) {
9319
9347
  warn(err);
9320
9348
  }