@doenet/doenetml 0.7.25-dev.509 → 0.7.25-dev.510
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.
- package/{AnswerResponseButton-WNgkWSpd.js → AnswerResponseButton-GW5gWjsu.js} +2 -2
- package/{Description-C4eqCkC_.js → Description-BfJn1SIN.js} +1 -1
- package/{DynamicMath-BvlV9Ue6.js → DynamicMath-BuP_REuT.js} +1 -1
- package/{EditorViewer-kHiJOFlf.js → EditorViewer-BxpWXPcn.js} +6 -6
- package/{GraphFrame-DzNurl7N.js → GraphFrame-9DKkyWmx.js} +2 -2
- package/{JSXGraphRenderer-BwVXGMP4.js → JSXGraphRenderer-nyjG7BH_.js} +1 -1
- package/{NonInlineMediaWrapper-DzPcV8ai.js → NonInlineMediaWrapper-DNp-N6Ny.js} +1 -1
- package/{_error-DBleNKm5.js → _error-KTVE1Cmm.js} +2 -2
- package/{alert-BjCHVwSD.js → alert-CAoV5KO7.js} +3 -3
- package/{angle-CV-lsVbv.js → angle-CIquMUbu.js} +7 -7
- package/{answer-DZk2OeqT.js → answer-D3wj_4sq.js} +6 -6
- package/{asList-8q1PsHXc.js → asList-CXN1ByVo.js} +2 -2
- package/{blockQuote-BEyDkhwo.js → blockQuote-C0h6gejJ.js} +3 -3
- package/{boolean-CKyz6eHb.js → boolean-M3pLxnBv.js} +2 -2
- package/{booleanInput-ChlFCCLV.js → booleanInput-Cym-6m6x.js} +6 -6
- package/{br-CxUYlaB8.js → br-CVJPNyXk.js} +2 -2
- package/{button-CO1lQGiq.js → button-D0ohGecs.js} +4 -4
- package/{c-Rh1O1iCy.js → c-eoIDTgNm.js} +3 -3
- package/{cell-CctFezSP.js → cell-DpbuNWtO.js} +3 -3
- package/{choiceInput-Bzro42SK.js → choiceInput-DzD83Nuu.js} +4 -4
- package/{circle-CAurgB00.js → circle-DyUPDkVz.js} +6 -6
- package/{cobwebPolyline-7D51_AwY.js → cobwebPolyline-BzUTPER1.js} +4 -4
- package/{codeEditor-t7GavnU9.js → codeEditor-CJJyunPZ.js} +2 -2
- package/{composites-DzdKI4De.js → composites-BGUbWILq.js} +1 -1
- package/{containerBlock-CV2bYYgZ.js → containerBlock-v4HOfv9P.js} +4 -4
- package/{containerInline-gzsu6C5E.js → containerInline-CiW891EU.js} +4 -4
- package/{curve-BkO0t48i.js → curve-CPxGvTZT.js} +4 -4
- package/{doenetml-CtCZHRvy.js → doenetml-BM48JGfR.js} +225 -23
- package/doenetml-external-worker.js +2 -2
- package/doenetml-inline-worker.js +3 -3
- package/doenetml-worker/index.esm.js +1 -1
- package/doenetml-worker/index.js +1 -1
- package/{ellipsis-DSO_pxoC.js → ellipsis-C_pkBl9_.js} +2 -2
- package/{em-qSk-3no9.js → em-CBO0OsRD.js} +3 -3
- package/{embed-D3P2KT10.js → embed-AQVAd6i-.js} +2 -2
- package/{feedback-DksxqVzn.js → feedback-BhalmRm0.js} +4 -4
- package/{figure-C7BWvWlG.js → figure-D4BqMqOY.js} +3 -3
- package/{fillPatterns-B48xvOpp.js → fillPatterns-fym-a0OT.js} +1 -1
- package/{footnote-DkKAjG3d.js → footnote-BsosLkGk.js} +3 -3
- package/{fractionInput-BXzLaCfV.js → fractionInput-YSC8m_TJ.js} +4 -4
- package/{graph-DEBueuLQ.js → graph-DfeIoe8w.js} +6 -6
- package/{hint-De643czZ.js → hint-CtKpI7yK.js} +4 -4
- package/{hovercard-store-BchOyYaP.js → hovercard-store-Dreg4bOm.js} +1 -1
- package/{hr-gr8I6a9Q.js → hr-DkgoddaT.js} +2 -2
- package/{image-DRsIyZ8r.js → image-B4oZku3N.js} +7 -7
- package/{index-Btr2x0__.js → index-Bc6oTLpD.js} +1 -1
- package/{index.es-D1tWNMRu.js → index.es-CL-nWvHN.js} +1 -1
- package/index.js +1 -1
- package/{label-CafWqDS1.js → label-DlLvV-jo.js} +7 -7
- package/{labelWithLatex-Di-MMnoq.js → labelWithLatex-DfyGObvZ.js} +2 -2
- package/{legend-ivrSn49-.js → legend-B2k_wmNo.js} +4 -4
- package/{line-DTe5itAC.js → line-LGJOwDC5.js} +7 -7
- package/{lineFamilyDragHandlers-QJcRU87y.js → lineFamilyDragHandlers-CerKUM5z.js} +1 -1
- package/{lineSegment-B2TuYJew.js → lineSegment-B_dttwSd.js} +5 -5
- package/{list-DHV-Xdb2.js → list-BnIeFjsO.js} +4 -4
- package/{lq-BSGme5zl.js → lq-CXesBvfn.js} +2 -2
- package/{lsq-DyHffzVv.js → lsq-DVDwLjmw.js} +2 -2
- package/{markupRenderer-DdQQWGzr.js → markupRenderer-Dtildqch.js} +1 -1
- package/{math-C09WXHRY.js → math-C-Sh2D5I.js} +7 -7
- package/{mathInput-CfkZlm_o.js → mathInput-D-6qMd9e.js} +7 -7
- package/{matrixInput-C1V3zbAl.js → matrixInput-JLSRMn4D.js} +4 -4
- package/{mdash-Zcnde8t6.js → mdash-COz2sVTB.js} +2 -2
- package/{nbsp-C7M2sheU.js → nbsp-DVC90S8v.js} +2 -2
- package/{ndash-BtVBCmWC.js → ndash-chGzIski.js} +2 -2
- package/{number-C0bTiBbK.js → number-CyQBdwGY.js} +7 -7
- package/{orbitalDiagram-j6SlFPE6.js → orbitalDiagram-DePvUk5K.js} +2 -2
- package/{orbitalDiagramInput-581co6R3.js → orbitalDiagramInput-CHWJGW-f.js} +2 -2
- package/{p-W9NoU3PE.js → p-D6OyBnEV.js} +4 -4
- package/package.json +1 -1
- package/{paginatorControls-A4EaMiiZ.js → paginatorControls-CSXH-5Nq.js} +2 -2
- package/{pegboard-U9gYlDQV.js → pegboard-DYe4eb-I.js} +4 -4
- package/{point-CO8S3_sD.js → point-BuynOHMD.js} +7 -7
- package/{polygon-D3cZALW9.js → polygon-D6xgJh8x.js} +6 -6
- package/{polyline-CB8fas39.js → polyline-DPgiQsAY.js} +5 -5
- package/{pre-Bs3bzRPo.js → pre-BZuBq5sh.js} +3 -3
- package/{prefigure-D7lHTndy.js → prefigure-CyFAdHPV.js} +1 -1
- package/{pretzel-0jerGDbv.js → pretzel-BbRfj1g7.js} +4 -4
- package/{q-BF27PS0x.js → q-B6AyBEeZ.js} +3 -3
- package/{ray-CJAi1o3F.js → ray-rZ0iZCvA.js} +5 -5
- package/{ref-By35jPEl.js → ref-C5cQ3y7w.js} +2 -2
- package/{regionBetweenCurveXAxis-BnApsxVB.js → regionBetweenCurveXAxis-CPN2zhEl.js} +5 -5
- package/{regionBetweenCurves-CN277hz_.js → regionBetweenCurves-DVgpgZwu.js} +5 -5
- package/{row-BOiTJSp_.js → row-CJBC7pO3.js} +2 -2
- package/{rq-BZ60riMC.js → rq-BDT9tRR6.js} +2 -2
- package/{rsq-BHQGtAn6.js → rsq-BbBzIjnx.js} +2 -2
- package/{section-DsXaIsRt.js → section-DgLone7p.js} +5 -5
- package/{sha256-DT5xJ2Hv-Dgc-wOwS.js → sha256-DT5xJ2Hv-Df6rPmxa.js} +1 -1
- package/{sideBySide-D5eTQVYR.js → sideBySide-HF9AfMIR.js} +2 -2
- package/{slider-D7lkkEvF.js → slider-6B-5I2da.js} +3 -3
- package/{slopeField-ClgEX7SM.js → slopeField-iVgW6SgU.js} +2 -2
- package/{solution-Ct5YAxRI.js → solution-D_YHTYTD.js} +4 -4
- package/{spreadsheet-BTNuSoXh.js → spreadsheet-BQioUoe7.js} +2 -2
- package/{sq-BZggaHTl.js → sq-BNJP_BYq.js} +3 -3
- package/{subsetOfRealsInput-0OKkXDgt.js → subsetOfRealsInput-DKiqpbnQ.js} +2 -2
- package/{summaryStatistics-C5nDH1-i.js → summaryStatistics-BzRSNPpA.js} +2 -2
- package/{table-BZGwHfSI.js → table-DYUHxR4a.js} +2 -2
- package/{tabular-Bvwse3JI.js → tabular-CF95szoG.js} +2 -2
- package/{tag-DwWr-Bpo.js → tag-BZ5TsBeZ.js} +2 -2
- package/{text-0826RAA6.js → text-CnHK_WP1.js} +6 -6
- package/{textInput-vdkejRB2.js → textInput-YUwGJoSU.js} +6 -6
- package/{tooltip-provider-N52kEN8m.js → tooltip-provider-CCsdwvov.js} +2 -2
- package/{useAnchoredGraphDragHandler-CvNTeJxo.js → useAnchoredGraphDragHandler-DtxzDgCM.js} +1 -1
- package/useDoenetRenderer-C3e9plZL.js +114 -0
- package/{useFieldCurve-CJVrhZvA.js → useFieldCurve-CP7Nysqy.js} +2 -2
- package/{useSubmitActionWithDelay-DFAowULH.js → useSubmitActionWithDelay-5BuHe7gr.js} +2 -2
- package/{vector-D9WnTbDe.js → vector-D_gPFSzR.js} +7 -7
- package/{vectorField-B5OR85Xp.js → vectorField-CGx8lfmG.js} +2 -2
- package/{video-Bh1n0w98.js → video-D6tkF8pX.js} +4 -4
- package/useDoenetRenderer-CAPq02D1.js +0 -114
|
@@ -31332,7 +31332,8 @@ function waitForExistingMathJax$1(timeoutMs) {
|
|
|
31332
31332
|
}
|
|
31333
31333
|
function injectMathJax$1(src, config2, { force = false } = {}) {
|
|
31334
31334
|
return new Promise((resolve, reject2) => {
|
|
31335
|
-
|
|
31335
|
+
const bootsOnOurConfig = !config2 || force || window.MathJax == null;
|
|
31336
|
+
if (config2 && bootsOnOurConfig) {
|
|
31336
31337
|
window.MathJax = config2;
|
|
31337
31338
|
}
|
|
31338
31339
|
const script = document.createElement("script");
|
|
@@ -31341,7 +31342,10 @@ function injectMathJax$1(src, config2, { force = false } = {}) {
|
|
|
31341
31342
|
script.async = true;
|
|
31342
31343
|
script.setAttribute(DOENET_MATHJAX_SCRIPT_ATTR$1, "true");
|
|
31343
31344
|
script.addEventListener("load", () => {
|
|
31344
|
-
|
|
31345
|
+
const engine = window.MathJax;
|
|
31346
|
+
resolve(
|
|
31347
|
+
bootsOnOurConfig ? engine : primeUnconfiguredEngine$1(engine, config2)
|
|
31348
|
+
);
|
|
31345
31349
|
});
|
|
31346
31350
|
script.addEventListener("error", () => {
|
|
31347
31351
|
reject2(
|
|
@@ -31351,6 +31355,83 @@ function injectMathJax$1(src, config2, { force = false } = {}) {
|
|
|
31351
31355
|
document.head.appendChild(script);
|
|
31352
31356
|
});
|
|
31353
31357
|
}
|
|
31358
|
+
function texConfig$1(config2) {
|
|
31359
|
+
const tex2 = config2?.tex;
|
|
31360
|
+
return tex2 && typeof tex2 === "object" ? tex2 : void 0;
|
|
31361
|
+
}
|
|
31362
|
+
function texDefsFromConfig$1(config2) {
|
|
31363
|
+
const macros = texConfig$1(config2)?.macros;
|
|
31364
|
+
if (!macros || typeof macros !== "object") {
|
|
31365
|
+
return "";
|
|
31366
|
+
}
|
|
31367
|
+
const defs = [];
|
|
31368
|
+
for (const [name2, value] of Object.entries(
|
|
31369
|
+
macros
|
|
31370
|
+
)) {
|
|
31371
|
+
if (!/^[A-Za-z]+$/.test(name2)) {
|
|
31372
|
+
continue;
|
|
31373
|
+
}
|
|
31374
|
+
let replacement;
|
|
31375
|
+
let argCount = 0;
|
|
31376
|
+
if (typeof value === "string") {
|
|
31377
|
+
replacement = value;
|
|
31378
|
+
} else if (Array.isArray(value) && value.length <= 2 && typeof value[0] === "string") {
|
|
31379
|
+
replacement = value[0];
|
|
31380
|
+
argCount = typeof value[1] === "number" ? value[1] : 0;
|
|
31381
|
+
} else {
|
|
31382
|
+
continue;
|
|
31383
|
+
}
|
|
31384
|
+
if (!Number.isInteger(argCount) || argCount < 0 || argCount > 9) {
|
|
31385
|
+
continue;
|
|
31386
|
+
}
|
|
31387
|
+
const parameters = Array.from(
|
|
31388
|
+
{ length: argCount },
|
|
31389
|
+
(_unused, index2) => `#${index2 + 1}`
|
|
31390
|
+
).join("");
|
|
31391
|
+
defs.push(`\\def\\${name2}${parameters}{${replacement}}`);
|
|
31392
|
+
}
|
|
31393
|
+
return defs.join("");
|
|
31394
|
+
}
|
|
31395
|
+
function texPackagesFromConfig$1(config2) {
|
|
31396
|
+
const packages = texConfig$1(config2)?.packages;
|
|
31397
|
+
if (!packages || typeof packages !== "object" || Array.isArray(packages)) {
|
|
31398
|
+
return [];
|
|
31399
|
+
}
|
|
31400
|
+
const added = packages["[+]"];
|
|
31401
|
+
if (!Array.isArray(added)) {
|
|
31402
|
+
return [];
|
|
31403
|
+
}
|
|
31404
|
+
return added.filter(
|
|
31405
|
+
(name2) => typeof name2 === "string" && /^[\w-]+$/.test(name2)
|
|
31406
|
+
);
|
|
31407
|
+
}
|
|
31408
|
+
async function convertForSideEffect$1(engine, tex2) {
|
|
31409
|
+
if (typeof engine.tex2mmlPromise !== "function") {
|
|
31410
|
+
return;
|
|
31411
|
+
}
|
|
31412
|
+
try {
|
|
31413
|
+
await engine.tex2mmlPromise(tex2);
|
|
31414
|
+
} catch (reason) {
|
|
31415
|
+
console.warn(
|
|
31416
|
+
`DoenetViewer: could not prime MathJax with "${tex2}"; math relying on it may not render as it does on doenet.org.`,
|
|
31417
|
+
reason
|
|
31418
|
+
);
|
|
31419
|
+
}
|
|
31420
|
+
}
|
|
31421
|
+
async function primeUnconfiguredEngine$1(engine, config2) {
|
|
31422
|
+
try {
|
|
31423
|
+
await engine.startup?.promise;
|
|
31424
|
+
} catch {
|
|
31425
|
+
}
|
|
31426
|
+
const defs = texDefsFromConfig$1(config2);
|
|
31427
|
+
if (defs) {
|
|
31428
|
+
await convertForSideEffect$1(engine, defs);
|
|
31429
|
+
}
|
|
31430
|
+
for (const packageName of texPackagesFromConfig$1(config2)) {
|
|
31431
|
+
await convertForSideEffect$1(engine, `\\require{${packageName}}`);
|
|
31432
|
+
}
|
|
31433
|
+
return engine;
|
|
31434
|
+
}
|
|
31354
31435
|
function createMathJaxPromise$1(options) {
|
|
31355
31436
|
const {
|
|
31356
31437
|
config: config2,
|
|
@@ -31359,16 +31440,25 @@ function createMathJaxPromise$1(options) {
|
|
|
31359
31440
|
timeoutMs = DEFAULT_TIMEOUT_MS$1
|
|
31360
31441
|
} = options;
|
|
31361
31442
|
if (isMathJaxEngine$1(window.MathJax)) {
|
|
31362
|
-
return
|
|
31443
|
+
return primeUnconfiguredEngine$1(window.MathJax, config2);
|
|
31363
31444
|
}
|
|
31364
31445
|
if (useExistingMathJax || findMathJaxScript$1()) {
|
|
31365
|
-
return waitForExistingMathJax$1(timeoutMs).
|
|
31366
|
-
|
|
31367
|
-
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
|
|
31371
|
-
|
|
31446
|
+
return waitForExistingMathJax$1(timeoutMs).then(
|
|
31447
|
+
// The host's engine: ours to use, not ours to have configured.
|
|
31448
|
+
(engine) => primeUnconfiguredEngine$1(engine, config2),
|
|
31449
|
+
// The takeover copy is one we load and stage `config` on ourselves,
|
|
31450
|
+
// so it needs no priming. Handling the rejection here rather than in
|
|
31451
|
+
// a trailing `.catch` also keeps a priming failure above — which is
|
|
31452
|
+
// never fatal — from being mistaken for a host that never loaded,
|
|
31453
|
+
// and answered by injecting a second engine over the host's.
|
|
31454
|
+
(reason) => {
|
|
31455
|
+
console.warn(
|
|
31456
|
+
"DoenetViewer: a host-provided MathJax did not become usable in time; falling back to loading Doenet's own copy.",
|
|
31457
|
+
reason
|
|
31458
|
+
);
|
|
31459
|
+
return injectMathJax$1(src, config2, { force: true });
|
|
31460
|
+
}
|
|
31461
|
+
);
|
|
31372
31462
|
}
|
|
31373
31463
|
return injectMathJax$1(src, config2);
|
|
31374
31464
|
}
|
|
@@ -31813,7 +31903,7 @@ async function cidFromArrayBuffer(data) {
|
|
|
31813
31903
|
await crypto.subtle.digest("SHA-256", new Uint8Array());
|
|
31814
31904
|
digest = (data2) => crypto.subtle.digest("SHA-256", data2);
|
|
31815
31905
|
} catch (e2) {
|
|
31816
|
-
const sha256 = (await import("./sha256-DT5xJ2Hv-
|
|
31906
|
+
const sha256 = (await import("./sha256-DT5xJ2Hv-Df6rPmxa.js").then((n2) => n2.s)).default;
|
|
31817
31907
|
digest = (data2) => sha256(data2, {
|
|
31818
31908
|
asBytes: true
|
|
31819
31909
|
});
|
|
@@ -33563,8 +33653,19 @@ function getMediaLicenseDisplay(code, version2) {
|
|
|
33563
33653
|
return { kind: info.kind, label, url: info.url(resolvedVersion) };
|
|
33564
33654
|
}
|
|
33565
33655
|
const mathjaxConfig$1 = {
|
|
33656
|
+
loader: {
|
|
33657
|
+
// The `units` package is neither bundled into the combined component
|
|
33658
|
+
// we load nor reachable through `autoload`, so it has to be requested
|
|
33659
|
+
// by name. MathJax fetches it during startup, from the same place it
|
|
33660
|
+
// gets the rest of its components.
|
|
33661
|
+
load: ["[tex]/units"]
|
|
33662
|
+
},
|
|
33566
33663
|
tex: {
|
|
33567
33664
|
tags: "ams",
|
|
33665
|
+
// `[+]` adds to MathJax's default package list rather than replacing
|
|
33666
|
+
// it. `units` supplies `\units`, `\unitfrac`, and `\nicefrac`, so that
|
|
33667
|
+
// units can be typeset semantically instead of hand-spaced.
|
|
33668
|
+
packages: { "[+]": ["units"] },
|
|
33568
33669
|
macros: {
|
|
33569
33670
|
lt: "<",
|
|
33570
33671
|
gt: ">",
|
|
@@ -54501,7 +54602,7 @@ function DocViewer({
|
|
|
54501
54602
|
for (const rendererClassName of coreInfo.current.rendererTypesInDocument) {
|
|
54502
54603
|
rendererClassNames.push(rendererClassName);
|
|
54503
54604
|
rendererLoaders.push(
|
|
54504
|
-
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./renderers/GraphFrame.tsx": () => import("./GraphFrame-
|
|
54605
|
+
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./renderers/GraphFrame.tsx": () => import("./GraphFrame-9DKkyWmx.js"), "./renderers/JSXGraphRenderer.tsx": () => import("./JSXGraphRenderer-nyjG7BH_.js").then((n2) => n2.m), "./renderers/_error.tsx": () => import("./_error-KTVE1Cmm.js"), "./renderers/alert.tsx": () => import("./alert-CAoV5KO7.js"), "./renderers/angle.tsx": () => import("./angle-CIquMUbu.js"), "./renderers/answer.tsx": () => import("./answer-D3wj_4sq.js"), "./renderers/asList.tsx": () => import("./asList-CXN1ByVo.js"), "./renderers/blockQuote.tsx": () => import("./blockQuote-C0h6gejJ.js"), "./renderers/boolean.tsx": () => import("./boolean-M3pLxnBv.js"), "./renderers/booleanInput.tsx": () => import("./booleanInput-Cym-6m6x.js"), "./renderers/br.tsx": () => import("./br-CVJPNyXk.js"), "./renderers/button.tsx": () => import("./button-D0ohGecs.js"), "./renderers/c.tsx": () => import("./c-eoIDTgNm.js"), "./renderers/cell.tsx": () => import("./cell-DpbuNWtO.js"), "./renderers/choiceInput.tsx": () => import("./choiceInput-DzD83Nuu.js"), "./renderers/circle.tsx": () => import("./circle-DyUPDkVz.js"), "./renderers/cobwebPolyline.tsx": () => import("./cobwebPolyline-BzUTPER1.js"), "./renderers/codeEditor.tsx": () => import("./codeEditor-CJJyunPZ.js"), "./renderers/containerBlock.tsx": () => import("./containerBlock-v4HOfv9P.js"), "./renderers/containerInline.tsx": () => import("./containerInline-CiW891EU.js"), "./renderers/curve.tsx": () => import("./curve-CPxGvTZT.js"), "./renderers/ellipsis.tsx": () => import("./ellipsis-C_pkBl9_.js"), "./renderers/em.tsx": () => import("./em-CBO0OsRD.js"), "./renderers/embed.tsx": () => import("./embed-AQVAd6i-.js"), "./renderers/feedback.tsx": () => import("./feedback-BhalmRm0.js"), "./renderers/figure.tsx": () => import("./figure-D4BqMqOY.js"), "./renderers/footnote.tsx": () => import("./footnote-BsosLkGk.js"), "./renderers/fractionInput.tsx": () => import("./fractionInput-YSC8m_TJ.js"), "./renderers/graph.tsx": () => import("./graph-DfeIoe8w.js"), "./renderers/hint.tsx": () => import("./hint-CtKpI7yK.js"), "./renderers/hr.tsx": () => import("./hr-DkgoddaT.js"), "./renderers/image.tsx": () => import("./image-B4oZku3N.js"), "./renderers/label.tsx": () => import("./label-DlLvV-jo.js"), "./renderers/legend.tsx": () => import("./legend-B2k_wmNo.js"), "./renderers/line.tsx": () => import("./line-LGJOwDC5.js"), "./renderers/lineSegment.tsx": () => import("./lineSegment-B_dttwSd.js"), "./renderers/list.tsx": () => import("./list-BnIeFjsO.js"), "./renderers/lq.tsx": () => import("./lq-CXesBvfn.js"), "./renderers/lsq.tsx": () => import("./lsq-DVDwLjmw.js"), "./renderers/math.tsx": () => import("./math-C-Sh2D5I.js"), "./renderers/mathInput.tsx": () => import("./mathInput-D-6qMd9e.js"), "./renderers/matrixInput.tsx": () => import("./matrixInput-JLSRMn4D.js"), "./renderers/mdash.tsx": () => import("./mdash-COz2sVTB.js"), "./renderers/nbsp.tsx": () => import("./nbsp-DVC90S8v.js"), "./renderers/ndash.tsx": () => import("./ndash-chGzIski.js"), "./renderers/number.tsx": () => import("./number-CyQBdwGY.js"), "./renderers/orbitalDiagram.tsx": () => import("./orbitalDiagram-DePvUk5K.js"), "./renderers/orbitalDiagramInput.tsx": () => import("./orbitalDiagramInput-CHWJGW-f.js"), "./renderers/p.tsx": () => import("./p-D6OyBnEV.js"), "./renderers/paginatorControls.tsx": () => import("./paginatorControls-CSXH-5Nq.js"), "./renderers/pegboard.tsx": () => import("./pegboard-DYe4eb-I.js"), "./renderers/point.tsx": () => import("./point-BuynOHMD.js"), "./renderers/polygon.tsx": () => import("./polygon-D6xgJh8x.js"), "./renderers/polyline.tsx": () => import("./polyline-DPgiQsAY.js"), "./renderers/pre.tsx": () => import("./pre-BZuBq5sh.js"), "./renderers/prefigure.tsx": () => import("./prefigure-CyFAdHPV.js"), "./renderers/pretzel.tsx": () => import("./pretzel-BbRfj1g7.js"), "./renderers/q.tsx": () => import("./q-B6AyBEeZ.js"), "./renderers/ray.tsx": () => import("./ray-rZ0iZCvA.js"), "./renderers/ref.tsx": () => import("./ref-C5cQ3y7w.js"), "./renderers/regionBetweenCurveXAxis.tsx": () => import("./regionBetweenCurveXAxis-CPN2zhEl.js"), "./renderers/regionBetweenCurves.tsx": () => import("./regionBetweenCurves-DVgpgZwu.js"), "./renderers/row.tsx": () => import("./row-CJBC7pO3.js"), "./renderers/rq.tsx": () => import("./rq-BDT9tRR6.js"), "./renderers/rsq.tsx": () => import("./rsq-BbBzIjnx.js"), "./renderers/section.tsx": () => import("./section-DgLone7p.js"), "./renderers/sideBySide.tsx": () => import("./sideBySide-HF9AfMIR.js"), "./renderers/slider.tsx": () => import("./slider-6B-5I2da.js"), "./renderers/slopeField.tsx": () => import("./slopeField-iVgW6SgU.js"), "./renderers/solution.tsx": () => import("./solution-D_YHTYTD.js"), "./renderers/spreadsheet.tsx": () => import("./spreadsheet-BQioUoe7.js"), "./renderers/sq.tsx": () => import("./sq-BNJP_BYq.js"), "./renderers/subsetOfRealsInput.tsx": () => import("./subsetOfRealsInput-DKiqpbnQ.js"), "./renderers/summaryStatistics.tsx": () => import("./summaryStatistics-BzRSNPpA.js"), "./renderers/table.tsx": () => import("./table-DYUHxR4a.js"), "./renderers/tabular.tsx": () => import("./tabular-CF95szoG.js"), "./renderers/tag.tsx": () => import("./tag-BZ5TsBeZ.js"), "./renderers/text.tsx": () => import("./text-CnHK_WP1.js"), "./renderers/textInput.tsx": () => import("./textInput-YUwGJoSU.js"), "./renderers/vector.tsx": () => import("./vector-D_gPFSzR.js"), "./renderers/vectorField.tsx": () => import("./vectorField-CGx8lfmG.js"), "./renderers/video.tsx": () => import("./video-D6tkF8pX.js") }), `./renderers/${rendererClassName}.tsx`, 3)
|
|
54505
54606
|
);
|
|
54506
54607
|
}
|
|
54507
54608
|
const documentComponentInstructions = coreInfo.current.documentToRender;
|
|
@@ -91633,7 +91734,8 @@ function waitForExistingMathJax(timeoutMs) {
|
|
|
91633
91734
|
}
|
|
91634
91735
|
function injectMathJax(src, config2, { force = false } = {}) {
|
|
91635
91736
|
return new Promise((resolve, reject2) => {
|
|
91636
|
-
|
|
91737
|
+
const bootsOnOurConfig = !config2 || force || window.MathJax == null;
|
|
91738
|
+
if (config2 && bootsOnOurConfig) {
|
|
91637
91739
|
window.MathJax = config2;
|
|
91638
91740
|
}
|
|
91639
91741
|
const script = document.createElement("script");
|
|
@@ -91642,7 +91744,10 @@ function injectMathJax(src, config2, { force = false } = {}) {
|
|
|
91642
91744
|
script.async = true;
|
|
91643
91745
|
script.setAttribute(DOENET_MATHJAX_SCRIPT_ATTR, "true");
|
|
91644
91746
|
script.addEventListener("load", () => {
|
|
91645
|
-
|
|
91747
|
+
const engine = window.MathJax;
|
|
91748
|
+
resolve(
|
|
91749
|
+
bootsOnOurConfig ? engine : primeUnconfiguredEngine(engine, config2)
|
|
91750
|
+
);
|
|
91646
91751
|
});
|
|
91647
91752
|
script.addEventListener("error", () => {
|
|
91648
91753
|
reject2(
|
|
@@ -91652,6 +91757,83 @@ function injectMathJax(src, config2, { force = false } = {}) {
|
|
|
91652
91757
|
document.head.appendChild(script);
|
|
91653
91758
|
});
|
|
91654
91759
|
}
|
|
91760
|
+
function texConfig(config2) {
|
|
91761
|
+
const tex2 = config2?.tex;
|
|
91762
|
+
return tex2 && typeof tex2 === "object" ? tex2 : void 0;
|
|
91763
|
+
}
|
|
91764
|
+
function texDefsFromConfig(config2) {
|
|
91765
|
+
const macros = texConfig(config2)?.macros;
|
|
91766
|
+
if (!macros || typeof macros !== "object") {
|
|
91767
|
+
return "";
|
|
91768
|
+
}
|
|
91769
|
+
const defs = [];
|
|
91770
|
+
for (const [name2, value] of Object.entries(
|
|
91771
|
+
macros
|
|
91772
|
+
)) {
|
|
91773
|
+
if (!/^[A-Za-z]+$/.test(name2)) {
|
|
91774
|
+
continue;
|
|
91775
|
+
}
|
|
91776
|
+
let replacement;
|
|
91777
|
+
let argCount = 0;
|
|
91778
|
+
if (typeof value === "string") {
|
|
91779
|
+
replacement = value;
|
|
91780
|
+
} else if (Array.isArray(value) && value.length <= 2 && typeof value[0] === "string") {
|
|
91781
|
+
replacement = value[0];
|
|
91782
|
+
argCount = typeof value[1] === "number" ? value[1] : 0;
|
|
91783
|
+
} else {
|
|
91784
|
+
continue;
|
|
91785
|
+
}
|
|
91786
|
+
if (!Number.isInteger(argCount) || argCount < 0 || argCount > 9) {
|
|
91787
|
+
continue;
|
|
91788
|
+
}
|
|
91789
|
+
const parameters = Array.from(
|
|
91790
|
+
{ length: argCount },
|
|
91791
|
+
(_unused, index2) => `#${index2 + 1}`
|
|
91792
|
+
).join("");
|
|
91793
|
+
defs.push(`\\def\\${name2}${parameters}{${replacement}}`);
|
|
91794
|
+
}
|
|
91795
|
+
return defs.join("");
|
|
91796
|
+
}
|
|
91797
|
+
function texPackagesFromConfig(config2) {
|
|
91798
|
+
const packages = texConfig(config2)?.packages;
|
|
91799
|
+
if (!packages || typeof packages !== "object" || Array.isArray(packages)) {
|
|
91800
|
+
return [];
|
|
91801
|
+
}
|
|
91802
|
+
const added = packages["[+]"];
|
|
91803
|
+
if (!Array.isArray(added)) {
|
|
91804
|
+
return [];
|
|
91805
|
+
}
|
|
91806
|
+
return added.filter(
|
|
91807
|
+
(name2) => typeof name2 === "string" && /^[\w-]+$/.test(name2)
|
|
91808
|
+
);
|
|
91809
|
+
}
|
|
91810
|
+
async function convertForSideEffect(engine, tex2) {
|
|
91811
|
+
if (typeof engine.tex2mmlPromise !== "function") {
|
|
91812
|
+
return;
|
|
91813
|
+
}
|
|
91814
|
+
try {
|
|
91815
|
+
await engine.tex2mmlPromise(tex2);
|
|
91816
|
+
} catch (reason) {
|
|
91817
|
+
console.warn(
|
|
91818
|
+
`DoenetViewer: could not prime MathJax with "${tex2}"; math relying on it may not render as it does on doenet.org.`,
|
|
91819
|
+
reason
|
|
91820
|
+
);
|
|
91821
|
+
}
|
|
91822
|
+
}
|
|
91823
|
+
async function primeUnconfiguredEngine(engine, config2) {
|
|
91824
|
+
try {
|
|
91825
|
+
await engine.startup?.promise;
|
|
91826
|
+
} catch {
|
|
91827
|
+
}
|
|
91828
|
+
const defs = texDefsFromConfig(config2);
|
|
91829
|
+
if (defs) {
|
|
91830
|
+
await convertForSideEffect(engine, defs);
|
|
91831
|
+
}
|
|
91832
|
+
for (const packageName of texPackagesFromConfig(config2)) {
|
|
91833
|
+
await convertForSideEffect(engine, `\\require{${packageName}}`);
|
|
91834
|
+
}
|
|
91835
|
+
return engine;
|
|
91836
|
+
}
|
|
91655
91837
|
function createMathJaxPromise(options) {
|
|
91656
91838
|
const {
|
|
91657
91839
|
config: config2,
|
|
@@ -91660,16 +91842,25 @@ function createMathJaxPromise(options) {
|
|
|
91660
91842
|
timeoutMs = DEFAULT_TIMEOUT_MS
|
|
91661
91843
|
} = options;
|
|
91662
91844
|
if (isMathJaxEngine(window.MathJax)) {
|
|
91663
|
-
return
|
|
91845
|
+
return primeUnconfiguredEngine(window.MathJax, config2);
|
|
91664
91846
|
}
|
|
91665
91847
|
if (useExistingMathJax || findMathJaxScript()) {
|
|
91666
|
-
return waitForExistingMathJax(timeoutMs).
|
|
91667
|
-
|
|
91668
|
-
|
|
91669
|
-
|
|
91670
|
-
|
|
91671
|
-
|
|
91672
|
-
|
|
91848
|
+
return waitForExistingMathJax(timeoutMs).then(
|
|
91849
|
+
// The host's engine: ours to use, not ours to have configured.
|
|
91850
|
+
(engine) => primeUnconfiguredEngine(engine, config2),
|
|
91851
|
+
// The takeover copy is one we load and stage `config` on ourselves,
|
|
91852
|
+
// so it needs no priming. Handling the rejection here rather than in
|
|
91853
|
+
// a trailing `.catch` also keeps a priming failure above — which is
|
|
91854
|
+
// never fatal — from being mistaken for a host that never loaded,
|
|
91855
|
+
// and answered by injecting a second engine over the host's.
|
|
91856
|
+
(reason) => {
|
|
91857
|
+
console.warn(
|
|
91858
|
+
"DoenetViewer: a host-provided MathJax did not become usable in time; falling back to loading Doenet's own copy.",
|
|
91859
|
+
reason
|
|
91860
|
+
);
|
|
91861
|
+
return injectMathJax(src, config2, { force: true });
|
|
91862
|
+
}
|
|
91863
|
+
);
|
|
91673
91864
|
}
|
|
91674
91865
|
return injectMathJax(src, config2);
|
|
91675
91866
|
}
|
|
@@ -117798,8 +117989,19 @@ Object.fromEntries(
|
|
|
117798
117989
|
mediaLicenses.map((info) => [info.code.toLowerCase(), info])
|
|
117799
117990
|
);
|
|
117800
117991
|
const mathjaxConfig = {
|
|
117992
|
+
loader: {
|
|
117993
|
+
// The `units` package is neither bundled into the combined component
|
|
117994
|
+
// we load nor reachable through `autoload`, so it has to be requested
|
|
117995
|
+
// by name. MathJax fetches it during startup, from the same place it
|
|
117996
|
+
// gets the rest of its components.
|
|
117997
|
+
load: ["[tex]/units"]
|
|
117998
|
+
},
|
|
117801
117999
|
tex: {
|
|
117802
118000
|
tags: "ams",
|
|
118001
|
+
// `[+]` adds to MathJax's default package list rather than replacing
|
|
118002
|
+
// it. `units` supplies `\units`, `\unitfrac`, and `\nicefrac`, so that
|
|
118003
|
+
// units can be typeset semantically instead of hand-spaced.
|
|
118004
|
+
packages: { "[+]": ["units"] },
|
|
117803
118005
|
macros: {
|
|
117804
118006
|
lt: "<",
|
|
117805
118007
|
gt: ">",
|
|
@@ -118240,7 +118442,7 @@ function ExternalAwareVirtualKeyboard({
|
|
|
118240
118442
|
}
|
|
118241
118443
|
const LazyInner = React__default.lazy(async () => {
|
|
118242
118444
|
const module = await importRendererWithRetry(
|
|
118243
|
-
() => import("./EditorViewer-
|
|
118445
|
+
() => import("./EditorViewer-BxpWXPcn.js"),
|
|
118244
118446
|
"EditorViewer"
|
|
118245
118447
|
);
|
|
118246
118448
|
return { default: module.EditorViewer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as hostProvidedWorkerUrl, o as doenetGlobalConfig } from "./doenetml-
|
|
2
|
-
import { D, a, c, b, d, f, g, e, h, i, m, j, r, s, k, l } from "./doenetml-
|
|
1
|
+
import { n as hostProvidedWorkerUrl, o as doenetGlobalConfig } from "./doenetml-BM48JGfR.js";
|
|
2
|
+
import { D, a, c, b, d, f, g, e, h, i, m, j, r, s, k, l } from "./doenetml-BM48JGfR.js";
|
|
3
3
|
const workerPath = "./doenetml-worker/index.js";
|
|
4
4
|
function resolveWorkerUrl() {
|
|
5
5
|
try {
|