@doenet/v06-to-v07 0.7.21-dev.375 → 0.7.21-dev.377

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.
@@ -37473,1007 +37473,6 @@ class ParameterStack {
37473
37473
  return lastParams;
37474
37474
  }
37475
37475
  }
37476
- class Numerics {
37477
- constructor({
37478
- maxIterationsRoot = 80,
37479
- maxIterationsMinimize = 500,
37480
- eps = 1e-6
37481
- } = {}) {
37482
- this.maxIterationsRoot = maxIterationsRoot;
37483
- this.maxIterationsMinimize = maxIterationsMinimize;
37484
- this.eps = eps;
37485
- }
37486
- /**
37487
- *
37488
- * Find zero of an univariate function f.
37489
- * @param {function} f Function, whose root is to be found
37490
- * @param {Array,Number} x0 Start value or start interval enclosing the root
37491
- * @param {Object} object Parent object in case f is method of it
37492
- * @returns {Number} the approximation of the root
37493
- * Algorithm:
37494
- * G.Forsythe, M.Malcolm, C.Moler, Computer methods for mathematical
37495
- * computations. M., Mir, 1980, p.180 of the Russian edition
37496
- *
37497
- * If x0 is an array containing lower and upper bound for the zero
37498
- * algorithm 748 is applied. Otherwise, if x0 is a number,
37499
- * the algorithm tries to bracket a zero of f starting from x0.
37500
- * If this fails, we fall back to Newton's method.
37501
- */
37502
- fzero(f2, x0, object2) {
37503
- var a2, b2, c2, fa2, fb, fc, aa2, blist, i2, len, u2, fu, prev_step, t1, cb2, t22, tol_act, p2, q2, new_step, eps = this.eps, maxiter = this.maxIterationsRoot, niter = 0;
37504
- if (Array.isArray(x0)) {
37505
- if (x0.length < 2) {
37506
- throw new Error(
37507
- "fzero: length of array x0 has to be at least two."
37508
- );
37509
- }
37510
- a2 = x0[0];
37511
- fa2 = f2.call(object2, a2);
37512
- b2 = x0[1];
37513
- fb = f2.call(object2, b2);
37514
- } else {
37515
- a2 = x0;
37516
- fa2 = f2.call(object2, a2);
37517
- if (a2 === 0) {
37518
- aa2 = 1;
37519
- } else {
37520
- aa2 = a2;
37521
- }
37522
- blist = [
37523
- 0.9 * aa2,
37524
- 1.1 * aa2,
37525
- aa2 - 1,
37526
- aa2 + 1,
37527
- 0.5 * aa2,
37528
- 1.5 * aa2,
37529
- -aa2,
37530
- 2 * aa2,
37531
- -10 * aa2,
37532
- 10 * aa2
37533
- ];
37534
- len = blist.length;
37535
- for (i2 = 0; i2 < len; i2++) {
37536
- b2 = blist[i2];
37537
- fb = f2.call(object2, b2);
37538
- if (fa2 * fb <= 0) {
37539
- break;
37540
- }
37541
- }
37542
- if (b2 < a2) {
37543
- u2 = a2;
37544
- a2 = b2;
37545
- b2 = u2;
37546
- fu = fa2;
37547
- fa2 = fb;
37548
- fb = fu;
37549
- }
37550
- }
37551
- if (fa2 * fb > 0) {
37552
- if (Array.isArray(x0)) {
37553
- return this.fminbr(f2, [a2, b2], object2).x;
37554
- }
37555
- return this.Newton(f2, a2, object2);
37556
- }
37557
- c2 = a2;
37558
- fc = fa2;
37559
- while (niter < maxiter) {
37560
- prev_step = b2 - a2;
37561
- if (Math.abs(fc) < Math.abs(fb)) {
37562
- a2 = b2;
37563
- b2 = c2;
37564
- c2 = a2;
37565
- fa2 = fb;
37566
- fb = fc;
37567
- fc = fa2;
37568
- }
37569
- tol_act = 0.5 * eps * (Math.abs(b2) + 1);
37570
- new_step = (c2 - b2) * 0.5;
37571
- if (Math.abs(new_step) <= tol_act && Math.abs(fb) <= eps) {
37572
- return b2;
37573
- }
37574
- if (Math.abs(prev_step) >= tol_act && Math.abs(fa2) > Math.abs(fb)) {
37575
- cb2 = c2 - b2;
37576
- if (a2 === c2) {
37577
- t1 = fb / fa2;
37578
- p2 = cb2 * t1;
37579
- q2 = 1 - t1;
37580
- } else {
37581
- q2 = fa2 / fc;
37582
- t1 = fb / fc;
37583
- t22 = fb / fa2;
37584
- p2 = t22 * (cb2 * q2 * (q2 - t1) - (b2 - a2) * (t1 - 1));
37585
- q2 = (q2 - 1) * (t1 - 1) * (t22 - 1);
37586
- }
37587
- if (p2 > 0) {
37588
- q2 = -q2;
37589
- } else {
37590
- p2 = -p2;
37591
- }
37592
- if (p2 < 0.75 * cb2 * q2 - Math.abs(tol_act * q2) * 0.5 && p2 < Math.abs(prev_step * q2 * 0.5)) {
37593
- new_step = p2 / q2;
37594
- }
37595
- }
37596
- if (Math.abs(new_step) < tol_act) {
37597
- if (new_step > 0) {
37598
- new_step = tol_act;
37599
- } else {
37600
- new_step = -tol_act;
37601
- }
37602
- }
37603
- a2 = b2;
37604
- fa2 = fb;
37605
- b2 += new_step;
37606
- fb = f2.call(object2, b2);
37607
- if (fb > 0 && fc > 0 || fb < 0 && fc < 0) {
37608
- c2 = a2;
37609
- fc = fa2;
37610
- }
37611
- niter++;
37612
- }
37613
- return b2;
37614
- }
37615
- /**
37616
- *
37617
- * Find minimum of an univariate function f.
37618
- * <p>
37619
- * Algorithm:
37620
- * G.Forsythe, M.Malcolm, C.Moler, Computer methods for mathematical
37621
- * computations. M., Mir, 1980, p.180 of the Russian edition
37622
- *
37623
- * @param {function} f Function, whose minimum is to be found
37624
- * @param {Array} x0 Start interval enclosing the minimum
37625
- * @param {Object} context Parent object in case f is method of it
37626
- *
37627
- * Return object with attributes:
37628
- * - success: true if reached minimum before max number of iterations
37629
- * - x: the approximation of the minimum value position
37630
- * - fx: the value of f at x
37631
- * - tol: the tolerance used in computing the minimum
37632
- **/
37633
- fminbr(f2, x0, context, eps_override) {
37634
- let eps = eps_override !== void 0 ? eps_override : this.eps;
37635
- var a2, b2, x2, v2, w2, fx, fv, fw, range2, middle_range, tol_act, new_step, p2, q2, t22, ft2, r2 = (3 - Math.sqrt(5)) * 0.5, tol = eps, sqrteps = eps, maxiter = this.maxIterationsMinimize, niter = 0;
37636
- if (!Array.isArray(x0) || x0.length < 2) {
37637
- throw new Error(
37638
- "Numerics.fminbr: length of array x0 has to be at least two."
37639
- );
37640
- }
37641
- a2 = x0[0];
37642
- b2 = x0[1];
37643
- v2 = a2 + r2 * (b2 - a2);
37644
- fv = f2.call(context, v2);
37645
- if (Number.isNaN(fv)) {
37646
- return { success: false };
37647
- }
37648
- x2 = v2;
37649
- w2 = v2;
37650
- fx = fv;
37651
- fw = fv;
37652
- while (niter < maxiter) {
37653
- range2 = b2 - a2;
37654
- middle_range = (a2 + b2) * 0.5;
37655
- tol_act = sqrteps * Math.abs(x2) + tol / 3;
37656
- if (Math.abs(x2 - middle_range) + range2 * 0.5 <= 2 * tol_act) {
37657
- return { success: true, x: x2, fx, tol: tol_act };
37658
- }
37659
- new_step = r2 * (x2 < middle_range ? b2 - x2 : a2 - x2);
37660
- if (Math.abs(x2 - w2) >= tol_act) {
37661
- t22 = (x2 - w2) * (fx - fv);
37662
- q2 = (x2 - v2) * (fx - fw);
37663
- p2 = (x2 - v2) * q2 - (x2 - w2) * t22;
37664
- q2 = 2 * (q2 - t22);
37665
- if (q2 > 0) {
37666
- p2 = -p2;
37667
- } else {
37668
- q2 = -q2;
37669
- }
37670
- if (Math.abs(p2) < Math.abs(new_step * q2) && // If x+p/q falls in [a,b]
37671
- p2 > q2 * (a2 - x2 + 2 * tol_act) && // not too close to a and
37672
- p2 < q2 * (b2 - x2 - 2 * tol_act)) {
37673
- new_step = p2 / q2;
37674
- }
37675
- }
37676
- if (Math.abs(new_step) < tol_act) {
37677
- if (new_step > 0) {
37678
- new_step = tol_act;
37679
- } else {
37680
- new_step = -tol_act;
37681
- }
37682
- }
37683
- t22 = x2 + new_step;
37684
- ft2 = f2.call(context, t22);
37685
- if (Number.isNaN(ft2)) {
37686
- return { success: false };
37687
- }
37688
- if (ft2 <= fx) {
37689
- if (t22 < x2) {
37690
- b2 = x2;
37691
- } else {
37692
- a2 = x2;
37693
- }
37694
- v2 = w2;
37695
- w2 = x2;
37696
- x2 = t22;
37697
- fv = fw;
37698
- fw = fx;
37699
- fx = ft2;
37700
- } else {
37701
- if (t22 < x2) {
37702
- a2 = t22;
37703
- } else {
37704
- b2 = t22;
37705
- }
37706
- if (ft2 <= fw || w2 === x2) {
37707
- v2 = w2;
37708
- w2 = t22;
37709
- fv = fw;
37710
- fw = ft2;
37711
- } else if (ft2 <= fv || v2 === x2 || v2 === w2) {
37712
- v2 = t22;
37713
- fv = ft2;
37714
- }
37715
- }
37716
- niter += 1;
37717
- }
37718
- return { success: false, x: x2, fx };
37719
- }
37720
- /**
37721
- * Newton's method to find roots of a funtion in one variable.
37722
- * @param {function} f We search for a solution of f(x)=0.
37723
- * @param {Number} x initial guess for the root, i.e. start value.
37724
- * @param {Object} context optional object that is treated as "this" in the function body. This is useful if
37725
- * the function is a method of an object and contains a reference to its parent object via "this".
37726
- * @returns {Number} A root of the function f.
37727
- */
37728
- Newton(f2, x2, context) {
37729
- var df, i2 = 0, h2 = this.eps, newf = f2.apply(context, [x2]);
37730
- if (Array.isArray(x2)) {
37731
- x2 = x2[0];
37732
- }
37733
- while (i2 < 50 && Math.abs(newf) > h2) {
37734
- df = this.D(f2, context)(x2);
37735
- if (Math.abs(df) > h2) {
37736
- x2 -= newf / df;
37737
- } else {
37738
- x2 += Math.random() * 0.2 - 1;
37739
- }
37740
- newf = f2.apply(context, [x2]);
37741
- i2 += 1;
37742
- }
37743
- return x2;
37744
- }
37745
- /**
37746
- * Numerical (symmetric) approximation of derivative.
37747
- * @param {function} f Function in one variable to be differentiated.
37748
- * @param {object} [obj] Optional object that is treated as "this" in the function body. This is useful, if the function is a
37749
- * method of an object and contains a reference to its parent object via "this".
37750
- * @returns {function} Derivative function of a given function f.
37751
- */
37752
- D(f2, obj) {
37753
- if (!(obj === void 0 || obj === null)) {
37754
- return function(x2) {
37755
- var h2 = 1e-5, h22 = h2 * 2;
37756
- return (f2(x2 + h2) - f2(x2 - h2)) / h22;
37757
- };
37758
- }
37759
- return function(x2) {
37760
- var h2 = 1e-5, h22 = h2 * 2;
37761
- return (f2.apply(obj, [x2 + h2]) - f2.apply(obj, [x2 - h2])) / h22;
37762
- };
37763
- }
37764
- }
37765
- var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
37766
- function getDefaultExportFromCjs$1(x2) {
37767
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
37768
- }
37769
- function getAugmentedNamespace(n2) {
37770
- if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
37771
- var f2 = n2.default;
37772
- if (typeof f2 == "function") {
37773
- var a2 = function a3() {
37774
- var isInstance = false;
37775
- try {
37776
- isInstance = this instanceof a3;
37777
- } catch {
37778
- }
37779
- if (isInstance) {
37780
- return Reflect.construct(f2, arguments, this.constructor);
37781
- }
37782
- return f2.apply(this, arguments);
37783
- };
37784
- a2.prototype = f2.prototype;
37785
- } else a2 = {};
37786
- Object.defineProperty(a2, "__esModule", { value: true });
37787
- Object.keys(n2).forEach(function(k2) {
37788
- var d2 = Object.getOwnPropertyDescriptor(n2, k2);
37789
- Object.defineProperty(a2, k2, d2.get ? d2 : {
37790
- enumerable: true,
37791
- get: function() {
37792
- return n2[k2];
37793
- }
37794
- });
37795
- });
37796
- return a2;
37797
- }
37798
- var alea$1 = { exports: {} };
37799
- var alea = alea$1.exports;
37800
- var hasRequiredAlea;
37801
- function requireAlea() {
37802
- if (hasRequiredAlea) return alea$1.exports;
37803
- hasRequiredAlea = 1;
37804
- (function(module) {
37805
- (function(global2, module2, define2) {
37806
- function Alea(seed) {
37807
- var me2 = this, mash = Mash();
37808
- me2.next = function() {
37809
- var t22 = 2091639 * me2.s0 + me2.c * 23283064365386963e-26;
37810
- me2.s0 = me2.s1;
37811
- me2.s1 = me2.s2;
37812
- return me2.s2 = t22 - (me2.c = t22 | 0);
37813
- };
37814
- me2.c = 1;
37815
- me2.s0 = mash(" ");
37816
- me2.s1 = mash(" ");
37817
- me2.s2 = mash(" ");
37818
- me2.s0 -= mash(seed);
37819
- if (me2.s0 < 0) {
37820
- me2.s0 += 1;
37821
- }
37822
- me2.s1 -= mash(seed);
37823
- if (me2.s1 < 0) {
37824
- me2.s1 += 1;
37825
- }
37826
- me2.s2 -= mash(seed);
37827
- if (me2.s2 < 0) {
37828
- me2.s2 += 1;
37829
- }
37830
- mash = null;
37831
- }
37832
- function copy2(f2, t22) {
37833
- t22.c = f2.c;
37834
- t22.s0 = f2.s0;
37835
- t22.s1 = f2.s1;
37836
- t22.s2 = f2.s2;
37837
- return t22;
37838
- }
37839
- function impl(seed, opts) {
37840
- var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;
37841
- prng.int32 = function() {
37842
- return xg.next() * 4294967296 | 0;
37843
- };
37844
- prng.double = function() {
37845
- return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;
37846
- };
37847
- prng.quick = prng;
37848
- if (state) {
37849
- if (typeof state == "object") copy2(state, xg);
37850
- prng.state = function() {
37851
- return copy2(xg, {});
37852
- };
37853
- }
37854
- return prng;
37855
- }
37856
- function Mash() {
37857
- var n2 = 4022871197;
37858
- var mash = function(data) {
37859
- data = String(data);
37860
- for (var i2 = 0; i2 < data.length; i2++) {
37861
- n2 += data.charCodeAt(i2);
37862
- var h2 = 0.02519603282416938 * n2;
37863
- n2 = h2 >>> 0;
37864
- h2 -= n2;
37865
- h2 *= n2;
37866
- n2 = h2 >>> 0;
37867
- h2 -= n2;
37868
- n2 += h2 * 4294967296;
37869
- }
37870
- return (n2 >>> 0) * 23283064365386963e-26;
37871
- };
37872
- return mash;
37873
- }
37874
- if (module2 && module2.exports) {
37875
- module2.exports = impl;
37876
- } else {
37877
- this.alea = impl;
37878
- }
37879
- })(
37880
- alea,
37881
- module
37882
- );
37883
- })(alea$1);
37884
- return alea$1.exports;
37885
- }
37886
- var xor128$1 = { exports: {} };
37887
- var xor128 = xor128$1.exports;
37888
- var hasRequiredXor128;
37889
- function requireXor128() {
37890
- if (hasRequiredXor128) return xor128$1.exports;
37891
- hasRequiredXor128 = 1;
37892
- (function(module) {
37893
- (function(global2, module2, define2) {
37894
- function XorGen(seed) {
37895
- var me2 = this, strseed = "";
37896
- me2.x = 0;
37897
- me2.y = 0;
37898
- me2.z = 0;
37899
- me2.w = 0;
37900
- me2.next = function() {
37901
- var t22 = me2.x ^ me2.x << 11;
37902
- me2.x = me2.y;
37903
- me2.y = me2.z;
37904
- me2.z = me2.w;
37905
- return me2.w ^= me2.w >>> 19 ^ t22 ^ t22 >>> 8;
37906
- };
37907
- if (seed === (seed | 0)) {
37908
- me2.x = seed;
37909
- } else {
37910
- strseed += seed;
37911
- }
37912
- for (var k2 = 0; k2 < strseed.length + 64; k2++) {
37913
- me2.x ^= strseed.charCodeAt(k2) | 0;
37914
- me2.next();
37915
- }
37916
- }
37917
- function copy2(f2, t22) {
37918
- t22.x = f2.x;
37919
- t22.y = f2.y;
37920
- t22.z = f2.z;
37921
- t22.w = f2.w;
37922
- return t22;
37923
- }
37924
- function impl(seed, opts) {
37925
- var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
37926
- return (xg.next() >>> 0) / 4294967296;
37927
- };
37928
- prng.double = function() {
37929
- do {
37930
- var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
37931
- } while (result2 === 0);
37932
- return result2;
37933
- };
37934
- prng.int32 = xg.next;
37935
- prng.quick = prng;
37936
- if (state) {
37937
- if (typeof state == "object") copy2(state, xg);
37938
- prng.state = function() {
37939
- return copy2(xg, {});
37940
- };
37941
- }
37942
- return prng;
37943
- }
37944
- if (module2 && module2.exports) {
37945
- module2.exports = impl;
37946
- } else {
37947
- this.xor128 = impl;
37948
- }
37949
- })(
37950
- xor128,
37951
- module
37952
- );
37953
- })(xor128$1);
37954
- return xor128$1.exports;
37955
- }
37956
- var xorwow$1 = { exports: {} };
37957
- var xorwow = xorwow$1.exports;
37958
- var hasRequiredXorwow;
37959
- function requireXorwow() {
37960
- if (hasRequiredXorwow) return xorwow$1.exports;
37961
- hasRequiredXorwow = 1;
37962
- (function(module) {
37963
- (function(global2, module2, define2) {
37964
- function XorGen(seed) {
37965
- var me2 = this, strseed = "";
37966
- me2.next = function() {
37967
- var t22 = me2.x ^ me2.x >>> 2;
37968
- me2.x = me2.y;
37969
- me2.y = me2.z;
37970
- me2.z = me2.w;
37971
- me2.w = me2.v;
37972
- return (me2.d = me2.d + 362437 | 0) + (me2.v = me2.v ^ me2.v << 4 ^ (t22 ^ t22 << 1)) | 0;
37973
- };
37974
- me2.x = 0;
37975
- me2.y = 0;
37976
- me2.z = 0;
37977
- me2.w = 0;
37978
- me2.v = 0;
37979
- if (seed === (seed | 0)) {
37980
- me2.x = seed;
37981
- } else {
37982
- strseed += seed;
37983
- }
37984
- for (var k2 = 0; k2 < strseed.length + 64; k2++) {
37985
- me2.x ^= strseed.charCodeAt(k2) | 0;
37986
- if (k2 == strseed.length) {
37987
- me2.d = me2.x << 10 ^ me2.x >>> 4;
37988
- }
37989
- me2.next();
37990
- }
37991
- }
37992
- function copy2(f2, t22) {
37993
- t22.x = f2.x;
37994
- t22.y = f2.y;
37995
- t22.z = f2.z;
37996
- t22.w = f2.w;
37997
- t22.v = f2.v;
37998
- t22.d = f2.d;
37999
- return t22;
38000
- }
38001
- function impl(seed, opts) {
38002
- var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
38003
- return (xg.next() >>> 0) / 4294967296;
38004
- };
38005
- prng.double = function() {
38006
- do {
38007
- var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
38008
- } while (result2 === 0);
38009
- return result2;
38010
- };
38011
- prng.int32 = xg.next;
38012
- prng.quick = prng;
38013
- if (state) {
38014
- if (typeof state == "object") copy2(state, xg);
38015
- prng.state = function() {
38016
- return copy2(xg, {});
38017
- };
38018
- }
38019
- return prng;
38020
- }
38021
- if (module2 && module2.exports) {
38022
- module2.exports = impl;
38023
- } else {
38024
- this.xorwow = impl;
38025
- }
38026
- })(
38027
- xorwow,
38028
- module
38029
- );
38030
- })(xorwow$1);
38031
- return xorwow$1.exports;
38032
- }
38033
- var xorshift7$1 = { exports: {} };
38034
- var xorshift7 = xorshift7$1.exports;
38035
- var hasRequiredXorshift7;
38036
- function requireXorshift7() {
38037
- if (hasRequiredXorshift7) return xorshift7$1.exports;
38038
- hasRequiredXorshift7 = 1;
38039
- (function(module) {
38040
- (function(global2, module2, define2) {
38041
- function XorGen(seed) {
38042
- var me2 = this;
38043
- me2.next = function() {
38044
- var X2 = me2.x, i2 = me2.i, t22, v2;
38045
- t22 = X2[i2];
38046
- t22 ^= t22 >>> 7;
38047
- v2 = t22 ^ t22 << 24;
38048
- t22 = X2[i2 + 1 & 7];
38049
- v2 ^= t22 ^ t22 >>> 10;
38050
- t22 = X2[i2 + 3 & 7];
38051
- v2 ^= t22 ^ t22 >>> 3;
38052
- t22 = X2[i2 + 4 & 7];
38053
- v2 ^= t22 ^ t22 << 7;
38054
- t22 = X2[i2 + 7 & 7];
38055
- t22 = t22 ^ t22 << 13;
38056
- v2 ^= t22 ^ t22 << 9;
38057
- X2[i2] = v2;
38058
- me2.i = i2 + 1 & 7;
38059
- return v2;
38060
- };
38061
- function init(me3, seed2) {
38062
- var j2, X2 = [];
38063
- if (seed2 === (seed2 | 0)) {
38064
- X2[0] = seed2;
38065
- } else {
38066
- seed2 = "" + seed2;
38067
- for (j2 = 0; j2 < seed2.length; ++j2) {
38068
- X2[j2 & 7] = X2[j2 & 7] << 15 ^ seed2.charCodeAt(j2) + X2[j2 + 1 & 7] << 13;
38069
- }
38070
- }
38071
- while (X2.length < 8) X2.push(0);
38072
- for (j2 = 0; j2 < 8 && X2[j2] === 0; ++j2) ;
38073
- if (j2 == 8) X2[7] = -1;
38074
- else X2[j2];
38075
- me3.x = X2;
38076
- me3.i = 0;
38077
- for (j2 = 256; j2 > 0; --j2) {
38078
- me3.next();
38079
- }
38080
- }
38081
- init(me2, seed);
38082
- }
38083
- function copy2(f2, t22) {
38084
- t22.x = f2.x.slice();
38085
- t22.i = f2.i;
38086
- return t22;
38087
- }
38088
- function impl(seed, opts) {
38089
- if (seed == null) seed = +/* @__PURE__ */ new Date();
38090
- var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
38091
- return (xg.next() >>> 0) / 4294967296;
38092
- };
38093
- prng.double = function() {
38094
- do {
38095
- var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
38096
- } while (result2 === 0);
38097
- return result2;
38098
- };
38099
- prng.int32 = xg.next;
38100
- prng.quick = prng;
38101
- if (state) {
38102
- if (state.x) copy2(state, xg);
38103
- prng.state = function() {
38104
- return copy2(xg, {});
38105
- };
38106
- }
38107
- return prng;
38108
- }
38109
- if (module2 && module2.exports) {
38110
- module2.exports = impl;
38111
- } else {
38112
- this.xorshift7 = impl;
38113
- }
38114
- })(
38115
- xorshift7,
38116
- module
38117
- );
38118
- })(xorshift7$1);
38119
- return xorshift7$1.exports;
38120
- }
38121
- var xor4096$1 = { exports: {} };
38122
- var xor4096 = xor4096$1.exports;
38123
- var hasRequiredXor4096;
38124
- function requireXor4096() {
38125
- if (hasRequiredXor4096) return xor4096$1.exports;
38126
- hasRequiredXor4096 = 1;
38127
- (function(module) {
38128
- (function(global2, module2, define2) {
38129
- function XorGen(seed) {
38130
- var me2 = this;
38131
- me2.next = function() {
38132
- var w2 = me2.w, X2 = me2.X, i2 = me2.i, t22, v2;
38133
- me2.w = w2 = w2 + 1640531527 | 0;
38134
- v2 = X2[i2 + 34 & 127];
38135
- t22 = X2[i2 = i2 + 1 & 127];
38136
- v2 ^= v2 << 13;
38137
- t22 ^= t22 << 17;
38138
- v2 ^= v2 >>> 15;
38139
- t22 ^= t22 >>> 12;
38140
- v2 = X2[i2] = v2 ^ t22;
38141
- me2.i = i2;
38142
- return v2 + (w2 ^ w2 >>> 16) | 0;
38143
- };
38144
- function init(me3, seed2) {
38145
- var t22, v2, i2, j2, w2, X2 = [], limit = 128;
38146
- if (seed2 === (seed2 | 0)) {
38147
- v2 = seed2;
38148
- seed2 = null;
38149
- } else {
38150
- seed2 = seed2 + "\0";
38151
- v2 = 0;
38152
- limit = Math.max(limit, seed2.length);
38153
- }
38154
- for (i2 = 0, j2 = -32; j2 < limit; ++j2) {
38155
- if (seed2) v2 ^= seed2.charCodeAt((j2 + 32) % seed2.length);
38156
- if (j2 === 0) w2 = v2;
38157
- v2 ^= v2 << 10;
38158
- v2 ^= v2 >>> 15;
38159
- v2 ^= v2 << 4;
38160
- v2 ^= v2 >>> 13;
38161
- if (j2 >= 0) {
38162
- w2 = w2 + 1640531527 | 0;
38163
- t22 = X2[j2 & 127] ^= v2 + w2;
38164
- i2 = 0 == t22 ? i2 + 1 : 0;
38165
- }
38166
- }
38167
- if (i2 >= 128) {
38168
- X2[(seed2 && seed2.length || 0) & 127] = -1;
38169
- }
38170
- i2 = 127;
38171
- for (j2 = 4 * 128; j2 > 0; --j2) {
38172
- v2 = X2[i2 + 34 & 127];
38173
- t22 = X2[i2 = i2 + 1 & 127];
38174
- v2 ^= v2 << 13;
38175
- t22 ^= t22 << 17;
38176
- v2 ^= v2 >>> 15;
38177
- t22 ^= t22 >>> 12;
38178
- X2[i2] = v2 ^ t22;
38179
- }
38180
- me3.w = w2;
38181
- me3.X = X2;
38182
- me3.i = i2;
38183
- }
38184
- init(me2, seed);
38185
- }
38186
- function copy2(f2, t22) {
38187
- t22.i = f2.i;
38188
- t22.w = f2.w;
38189
- t22.X = f2.X.slice();
38190
- return t22;
38191
- }
38192
- function impl(seed, opts) {
38193
- if (seed == null) seed = +/* @__PURE__ */ new Date();
38194
- var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
38195
- return (xg.next() >>> 0) / 4294967296;
38196
- };
38197
- prng.double = function() {
38198
- do {
38199
- var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
38200
- } while (result2 === 0);
38201
- return result2;
38202
- };
38203
- prng.int32 = xg.next;
38204
- prng.quick = prng;
38205
- if (state) {
38206
- if (state.X) copy2(state, xg);
38207
- prng.state = function() {
38208
- return copy2(xg, {});
38209
- };
38210
- }
38211
- return prng;
38212
- }
38213
- if (module2 && module2.exports) {
38214
- module2.exports = impl;
38215
- } else {
38216
- this.xor4096 = impl;
38217
- }
38218
- })(
38219
- xor4096,
38220
- // window object or global
38221
- module
38222
- );
38223
- })(xor4096$1);
38224
- return xor4096$1.exports;
38225
- }
38226
- var tychei$1 = { exports: {} };
38227
- var tychei = tychei$1.exports;
38228
- var hasRequiredTychei;
38229
- function requireTychei() {
38230
- if (hasRequiredTychei) return tychei$1.exports;
38231
- hasRequiredTychei = 1;
38232
- (function(module) {
38233
- (function(global2, module2, define2) {
38234
- function XorGen(seed) {
38235
- var me2 = this, strseed = "";
38236
- me2.next = function() {
38237
- var b2 = me2.b, c2 = me2.c, d2 = me2.d, a2 = me2.a;
38238
- b2 = b2 << 25 ^ b2 >>> 7 ^ c2;
38239
- c2 = c2 - d2 | 0;
38240
- d2 = d2 << 24 ^ d2 >>> 8 ^ a2;
38241
- a2 = a2 - b2 | 0;
38242
- me2.b = b2 = b2 << 20 ^ b2 >>> 12 ^ c2;
38243
- me2.c = c2 = c2 - d2 | 0;
38244
- me2.d = d2 << 16 ^ c2 >>> 16 ^ a2;
38245
- return me2.a = a2 - b2 | 0;
38246
- };
38247
- me2.a = 0;
38248
- me2.b = 0;
38249
- me2.c = 2654435769 | 0;
38250
- me2.d = 1367130551;
38251
- if (seed === Math.floor(seed)) {
38252
- me2.a = seed / 4294967296 | 0;
38253
- me2.b = seed | 0;
38254
- } else {
38255
- strseed += seed;
38256
- }
38257
- for (var k2 = 0; k2 < strseed.length + 20; k2++) {
38258
- me2.b ^= strseed.charCodeAt(k2) | 0;
38259
- me2.next();
38260
- }
38261
- }
38262
- function copy2(f2, t22) {
38263
- t22.a = f2.a;
38264
- t22.b = f2.b;
38265
- t22.c = f2.c;
38266
- t22.d = f2.d;
38267
- return t22;
38268
- }
38269
- function impl(seed, opts) {
38270
- var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
38271
- return (xg.next() >>> 0) / 4294967296;
38272
- };
38273
- prng.double = function() {
38274
- do {
38275
- var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
38276
- } while (result2 === 0);
38277
- return result2;
38278
- };
38279
- prng.int32 = xg.next;
38280
- prng.quick = prng;
38281
- if (state) {
38282
- if (typeof state == "object") copy2(state, xg);
38283
- prng.state = function() {
38284
- return copy2(xg, {});
38285
- };
38286
- }
38287
- return prng;
38288
- }
38289
- if (module2 && module2.exports) {
38290
- module2.exports = impl;
38291
- } else {
38292
- this.tychei = impl;
38293
- }
38294
- })(
38295
- tychei,
38296
- module
38297
- );
38298
- })(tychei$1);
38299
- return tychei$1.exports;
38300
- }
38301
- var seedrandom$3 = { exports: {} };
38302
- const __viteBrowserExternal = {};
38303
- const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38304
- __proto__: null,
38305
- default: __viteBrowserExternal
38306
- }, Symbol.toStringTag, { value: "Module" }));
38307
- const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
38308
- var seedrandom$2 = seedrandom$3.exports;
38309
- var hasRequiredSeedrandom$1;
38310
- function requireSeedrandom$1() {
38311
- if (hasRequiredSeedrandom$1) return seedrandom$3.exports;
38312
- hasRequiredSeedrandom$1 = 1;
38313
- (function(module) {
38314
- (function(global2, pool, math2) {
38315
- var width = 256, chunks = 6, digits2 = 52, rngname = "random", startdenom = math2.pow(width, chunks), significance = math2.pow(2, digits2), overflow = significance * 2, mask = width - 1, nodecrypto;
38316
- function seedrandom2(seed, options, callback) {
38317
- var key = [];
38318
- options = options == true ? { entropy: true } : options || {};
38319
- var shortseed = mixkey(flatten2(
38320
- options.entropy ? [seed, tostring(pool)] : seed == null ? autoseed() : seed,
38321
- 3
38322
- ), key);
38323
- var arc4 = new ARC4(key);
38324
- var prng = function() {
38325
- var n2 = arc4.g(chunks), d2 = startdenom, x2 = 0;
38326
- while (n2 < significance) {
38327
- n2 = (n2 + x2) * width;
38328
- d2 *= width;
38329
- x2 = arc4.g(1);
38330
- }
38331
- while (n2 >= overflow) {
38332
- n2 /= 2;
38333
- d2 /= 2;
38334
- x2 >>>= 1;
38335
- }
38336
- return (n2 + x2) / d2;
38337
- };
38338
- prng.int32 = function() {
38339
- return arc4.g(4) | 0;
38340
- };
38341
- prng.quick = function() {
38342
- return arc4.g(4) / 4294967296;
38343
- };
38344
- prng.double = prng;
38345
- mixkey(tostring(arc4.S), pool);
38346
- return (options.pass || callback || function(prng2, seed2, is_math_call, state) {
38347
- if (state) {
38348
- if (state.S) {
38349
- copy2(state, arc4);
38350
- }
38351
- prng2.state = function() {
38352
- return copy2(arc4, {});
38353
- };
38354
- }
38355
- if (is_math_call) {
38356
- math2[rngname] = prng2;
38357
- return seed2;
38358
- } else return prng2;
38359
- })(
38360
- prng,
38361
- shortseed,
38362
- "global" in options ? options.global : this == math2,
38363
- options.state
38364
- );
38365
- }
38366
- function ARC4(key) {
38367
- var t22, keylen = key.length, me2 = this, i2 = 0, j2 = me2.i = me2.j = 0, s2 = me2.S = [];
38368
- if (!keylen) {
38369
- key = [keylen++];
38370
- }
38371
- while (i2 < width) {
38372
- s2[i2] = i2++;
38373
- }
38374
- for (i2 = 0; i2 < width; i2++) {
38375
- s2[i2] = s2[j2 = mask & j2 + key[i2 % keylen] + (t22 = s2[i2])];
38376
- s2[j2] = t22;
38377
- }
38378
- (me2.g = function(count) {
38379
- var t32, r2 = 0, i3 = me2.i, j3 = me2.j, s3 = me2.S;
38380
- while (count--) {
38381
- t32 = s3[i3 = mask & i3 + 1];
38382
- r2 = r2 * width + s3[mask & (s3[i3] = s3[j3 = mask & j3 + t32]) + (s3[j3] = t32)];
38383
- }
38384
- me2.i = i3;
38385
- me2.j = j3;
38386
- return r2;
38387
- })(width);
38388
- }
38389
- function copy2(f2, t22) {
38390
- t22.i = f2.i;
38391
- t22.j = f2.j;
38392
- t22.S = f2.S.slice();
38393
- return t22;
38394
- }
38395
- function flatten2(obj, depth) {
38396
- var result2 = [], typ = typeof obj, prop;
38397
- if (depth && typ == "object") {
38398
- for (prop in obj) {
38399
- try {
38400
- result2.push(flatten2(obj[prop], depth - 1));
38401
- } catch (e32) {
38402
- }
38403
- }
38404
- }
38405
- return result2.length ? result2 : typ == "string" ? obj : obj + "\0";
38406
- }
38407
- function mixkey(seed, key) {
38408
- var stringseed = seed + "", smear, j2 = 0;
38409
- while (j2 < stringseed.length) {
38410
- key[mask & j2] = mask & (smear ^= key[mask & j2] * 19) + stringseed.charCodeAt(j2++);
38411
- }
38412
- return tostring(key);
38413
- }
38414
- function autoseed() {
38415
- try {
38416
- var out;
38417
- if (nodecrypto && (out = nodecrypto.randomBytes)) {
38418
- out = out(width);
38419
- } else {
38420
- out = new Uint8Array(width);
38421
- (global2.crypto || global2.msCrypto).getRandomValues(out);
38422
- }
38423
- return tostring(out);
38424
- } catch (e32) {
38425
- var browser = global2.navigator, plugins2 = browser && browser.plugins;
38426
- return [+/* @__PURE__ */ new Date(), global2, plugins2, global2.screen, tostring(pool)];
38427
- }
38428
- }
38429
- function tostring(a2) {
38430
- return String.fromCharCode.apply(0, a2);
38431
- }
38432
- mixkey(math2.random(), pool);
38433
- if (module.exports) {
38434
- module.exports = seedrandom2;
38435
- try {
38436
- nodecrypto = require$$0;
38437
- } catch (ex) {
38438
- }
38439
- } else {
38440
- math2["seed" + rngname] = seedrandom2;
38441
- }
38442
- })(
38443
- // global: `self` in browsers (including strict mode and web workers),
38444
- // otherwise `this` in Node and other environments
38445
- typeof self !== "undefined" ? self : seedrandom$2,
38446
- [],
38447
- // pool: entropy pool starts empty
38448
- Math
38449
- // math: package containing random, pow, and seedrandom
38450
- );
38451
- })(seedrandom$3);
38452
- return seedrandom$3.exports;
38453
- }
38454
- var seedrandom$1;
38455
- var hasRequiredSeedrandom;
38456
- function requireSeedrandom() {
38457
- if (hasRequiredSeedrandom) return seedrandom$1;
38458
- hasRequiredSeedrandom = 1;
38459
- var alea2 = requireAlea();
38460
- var xor1282 = requireXor128();
38461
- var xorwow2 = requireXorwow();
38462
- var xorshift72 = requireXorshift7();
38463
- var xor40962 = requireXor4096();
38464
- var tychei2 = requireTychei();
38465
- var sr2 = requireSeedrandom$1();
38466
- sr2.alea = alea2;
38467
- sr2.xor128 = xor1282;
38468
- sr2.xorwow = xorwow2;
38469
- sr2.xorshift7 = xorshift72;
38470
- sr2.xor4096 = xor40962;
38471
- sr2.tychei = tychei2;
38472
- seedrandom$1 = sr2;
38473
- return seedrandom$1;
38474
- }
38475
- var seedrandomExports = requireSeedrandom();
38476
- const seedrandom$4 = /* @__PURE__ */ getDefaultExportFromCjs$1(seedrandomExports);
38477
37476
  class FluentType {
38478
37477
  /**
38479
37478
  * Create a `FluentType` instance.
@@ -39402,7 +38401,7 @@ class Indent {
39402
38401
  }
39403
38402
  const chrome$1 = "# Viewer chrome: buttons, panel headers, and other UI the reader interacts\n# with. Rendered on the main thread and selected by `uiLocale`.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`submit-button`, `answer-status.correct`).\n#\n# This catalog is the source of truth for every other locale: `lint:i18n`\n# rejects a translation that defines a key missing here. Run\n# `npm run codegen -w @doenet/i18n` after editing.\n\n\n## Answer submission — the check-work button and the status it reports.\n\nanswer-checking = Checking...\nanswer-submitting = Submitting...\n\n# Announced to a screen reader while the submission is in flight. Separate\n# from the button's own text, which is abbreviated.\nanswer-checking-status = Checking answer\nanswer-submitting-status = Submitting answer\n\nanswer-correct = Correct\nanswer-incorrect = Incorrect\n\n# Shown instead of a correctness verdict when the activity withholds\n# correctness: the response was recorded, nothing is claimed about it.\nanswer-response-saved = Response Saved\n\n# Partial credit. `-credit` is used when repeated attempts reduce the credit\n# available, `-correct` when they do not, and `-short` on a button too narrow\n# for a word.\nanswer-percent-credit = { $percent }% Credit\nanswer-percent-correct = { $percent }% Correct\nanswer-percent-short = { $percent } %\n\nmax-credit-available = Max credit available: { $percent }%\n\n# Fluent formats `{ $count }` with `Intl.NumberFormat`, so a four-digit\n# attempt count renders as \"1,000\" where the hand-built string said \"1000\".\n# That is the one place English output is not byte-identical to what this\n# replaced, and grouping is the locale-correct rendering, so it stands.\nattempts-remaining =\n { $count ->\n [0] no attempts remaining\n [one] { $count } attempt remaining\n *[other] { $count } attempts remaining\n }\n\n# Appended to an input's accessible name once its response has been graded,\n# so a screen reader reports the verdict along with the field.\nvalidation-correct = (Correct)\nvalidation-incorrect = (Incorrect)\nvalidation-partially-correct = (Partially correct)\n\n# Tooltip on the badge that reports how many responses have been submitted to\n# one answer, shown only to a host that asked for it. `$answerId` is the\n# answer's authored name and is never translated.\nanswer-show-responses =\n { $count ->\n [one] Show { $count } response to { $answerId }\n *[other] Show { $count } responses to { $answerId }\n }\n\n\n## Disclosure panels\n\nfeedback-heading = Feedback\n\n# Follows a disclosure panel's own heading — \"Solution (click to open)\" — and\n# is shared by `<solution>`, `<hint>`, and a collapsible `<section>`. The whole\n# parenthetical is one message: where the word for open or close falls inside\n# it is the translator's business.\ncollapsible-click-to-open = (click to open)\ncollapsible-click-to-close = (click to close)\n\n# Placeholder inside a panel that has been opened before its contents have\n# arrived from the core. Shared by `<solution>` and a collapsible `<section>`.\ncollapsible-initializing = Initializing...\n\n# Tooltip on a footnote marker, naming what activating it will do.\nfootnote-show = Show footnote\nfootnote-hide = Hide footnote\n\n# Tooltip on the ⓘ affordance that reveals an input's description.\ndescription-more-information = more information\n\n\n## Controls\n\nslider-previous = Prev\nslider-next = Next\n\nkeyboard-open = Open Keyboard\nkeyboard-close = Close Keyboard\n\n# Accessible names of a matrix input's size controls, whose visible labels are\n# the symbols `r-` `r+` `c-` `c+`.\nmatrix-remove-row = Remove row\nmatrix-add-row = Add row\nmatrix-remove-column = Remove column\nmatrix-add-column = Add column\n\n# Modes and actions of the subset-of-reals input's control strip. The button\n# that selects all of the reals is the symbol `R`, not a word, and stays in\n# place.\nsubset-add-remove-points = Add/Remove points\nsubset-toggle-points-intervals = Toggle points and intervals\nsubset-move-points = Move Points\nsubset-clear = Clear\n\n# Buttons that edit an orbital diagram: rows hold boxes, boxes hold up to\n# three spin arrows.\norbital-add-row = Add Row\norbital-remove-row = Remove Row\norbital-add-box = Add Box\norbital-remove-box = Remove Box\norbital-add-up-arrow = Add Up Arrow\norbital-add-down-arrow = Add Down Arrow\norbital-remove-arrow = Remove Arrow\n\n# Accessible name of the text field naming one row of an orbital diagram,\n# counting from 1.\norbital-row-label = Label for row { $row }\n\n# Labels the answer column of a pretzel exercise's grid.\npretzel-answer = Answer\n\n# Caption above the table a `<summaryStatistics>` renders. `$column` is the\n# authored name of the data column being summarized and is never translated.\n# The table's own headings (`mean`, `stdev`, `quartile1`, …) are the statistic\n# ids an author references, not prose, and stay in place.\nsummary-statistics-caption = Summary statistics of { $column }\n\n\n## Math input\n\n# Accessible name of the popover that previews the typed expression, and of\n# the rendered expression inside it.\nmath-input-preview-region = math expression preview\nmath-input-preview = Preview\nmath-input-invalid-expression = Invalid expression:\n\n\n## Document status\n\n# Shown while the core is still starting up and nothing can be rendered yet.\nviewer-initializing = Initializing...\n\n\n## Errors\n\n# Prefixes an error message wherever one is shown in place of content: an\n# `<error>` the core reported, the error boundary's fallback, and the\n# placeholder left where a renderer chunk failed to load.\nerror-heading = Error\n\n# Banner above a document that compiled with at least one error in it.\ndocument-contains-errors = This document contains errors!\n\n# Shown in place of the document when a renderer threw and the error boundary\n# caught it.\nsomething-went-wrong = Something went wrong.\n\n# Shown in place of a single renderer whose code chunk never arrived.\nrenderer-load-failed = a renderer failed to load. Please reload the page.\n\n# Shown in place of the document when the core worker could not be started\n# after retries, rather than leaving the pane blank.\ncore-start-failed = The document viewer could not be started. Please reload the page.\n";
39404
38403
  const content = '# Worker-generated content: style descriptions ("thick red line"), boolean\n# words, and other prose the core computes into the document. Selected by\n# `documentLocale`, which follows the content\'s language rather than the\n# reader\'s UI language.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`color.blue`, `noun.line-segment`).\n\n\n## Style vocabulary\n##\n## The words the style pipeline derives from a component\'s numeric and\n## enumerated style values. A word an author writes directly — `lineColorWord`,\n## `markerStyleWord`, and their siblings — passes through untranslated: the\n## author chose those words, and rewriting them would be a surprise. So does a\n## CSS named color asked for by name ("rebeccapurple"), which\n## `resolveColorWord` deliberately preserves.\n##\n## Every adjective here is handed `$gender`, the grammatical gender of the noun\n## it describes (see `noun-gender`). English has no agreement and ignores it; a\n## language that inflects selects on it.\n\n# The canonical color families a color value resolves to.\ncolor =\n .black = black\n .white = white\n .gray = gray\n .red = red\n .orange = orange\n .yellow = yellow\n .green = green\n .cyan = cyan\n .blue = blue\n .purple = purple\n .pink = pink\n .brown = brown\n\n# Stroke widths. Only the extremes are named — a middling width is described by\n# its color alone.\nline-width =\n .thick = thick\n .thin = thin\n\n# Dash patterns. A solid stroke is described by its color alone.\nline-style =\n .dashed = dashed\n .dotted = dotted\n\n# Patterns a shape\'s interior can be filled with. A solid fill is described by\n# its color alone.\nfill-style =\n .horizontal = horizontal lines\n .vertical = vertical lines\n .diagonal = diagonal lines\n .backdiagonal = reverse diagonal lines\n .dots = dots\n .diamonds = diamonds\n\n# The things being described. The shapes a point can be drawn as ("square",\n# "cross") are nouns too: a point\'s description names its marker shape rather\n# than always saying "point".\nnoun =\n .line = line\n .line-segment = line segment\n .ray = ray\n .vector = vector\n .curve = curve\n .function = function\n .parabola = parabola\n .polyline = polyline\n .polygon = polygon\n .triangle = triangle\n .rectangle = rectangle\n .circle = circle\n .region = region\n .point = point\n .square = square\n .diamond = diamond\n .cross = cross\n .plus = plus\n\n# A regular polygon names its side count, so it is a message of its own rather\n# than one of `noun`\'s attributes.\n#\n# `$part` splits the noun where a language needs it split: `head` is the word\n# the adjectives attach to, `tail` a complement that follows them. English\n# folds the side count into the head and has no tail; Spanish says "polígono\n# regular" and puts "de 5 lados" after the adjectives, so that they stay beside\n# the noun they agree with. `style-with-noun` and `style-filled-with-noun`\n# place the two halves.\n#\n# `$numSides` is a real number, so it is formatted by the locale\'s own rules —\n# a 1000-gon reads "1,000-sided" here and "de 1000 lados" in Spanish. That is\n# the number-formatting policy in the README, and the one place a description\n# is not character-for-character what the pre-catalog code produced.\nnoun-regular-polygon =\n { $part ->\n [tail] { "" }\n *[head] { $numSides }-sided regular polygon\n }\n\n# The grammatical gender of the noun being described, passed to every adjective\n# describing it so that translations can agree. English has no grammatical\n# gender, so every noun answers the same and the answer goes unused.\n#\n# `$noun` is one of `noun`\'s attribute names, `regular-polygon` for the shape\n# `noun-regular-polygon` names, or the head of a phrase the description builds\n# without naming it as a noun: `border`, `fill`, `text`, or `background`. A\n# word this message does not list falls to its default gender — which is also\n# what an author\'s own `markerStyleWord` gets, since the catalog has never seen\n# it.\nnoun-gender = neuter\n\n\n## Style composition\n##\n## `$parts` names which pieces the style actually supplies, so that a\n## translation can order and inflect each combination on its own terms instead\n## of substituting into a fixed English frame. An absent piece is a different\n## branch, never an empty placeable.\n\n# The adjectives describing a stroke: its width, its dash pattern, and its\n# color. Also describes a shape\'s border, where the color is dropped when it\n# matches the fill it surrounds.\nstyle-stroke =\n { $parts ->\n [width-style-color] { $width } { $lineStyle } { $color }\n [width-color] { $width } { $color }\n [style-color] { $lineStyle } { $color }\n [width-style] { $width } { $lineStyle }\n [width] { $width }\n [style] { $lineStyle }\n *[color] { $color }\n }\n\n# A style description followed by what it describes: "thick red line".\n#\n# `$nounTail` is the noun\'s trailing complement, for the nouns whose\n# translation splits around the adjectives (see `noun-regular-polygon`).\n# English has none today, so it only ever selects `noun` for itself — the other\n# variant is still what a partly-translated locale falls back to, and dropping\n# it would drop that locale\'s side count.\nstyle-with-noun =\n { $parts ->\n [noun-tail] { $description } { $noun } { $nounTail }\n *[noun] { $description } { $noun }\n }\n\n# The word marking a shape as filled.\n#\n# A key of its own, looked up by the code and handed to the messages below as\n# `$filled`, rather than literal text inside them: a language that inflects it\n# has to agree it with the shape. Referencing it from those messages would not\n# do — a term reference (`{ -filled }`) gets an empty scope and never sees\n# `$gender`, and a message reference resolves only inside its own bundle, so a\n# locale that translated `style-filled` but not this word would render the\n# reference literally instead of falling back to English.\nstyle-filled-word = filled\n\n# A filled shape, and the pattern its interior is drawn with, if any.\nstyle-filled =\n { $parts ->\n [pattern] { $filled } { $color } with { $pattern }\n *[plain] { $filled } { $color }\n }\n\n# The same, naming the shape: "filled blue circle with diamonds".\n#\n# The `-tail` variants carry the noun\'s trailing complement, as\n# `style-with-noun` does.\nstyle-filled-with-noun =\n { $parts ->\n [pattern] { $filled } { $color } { $noun } with { $pattern }\n [plain-tail] { $filled } { $color } { $noun } { $nounTail }\n [pattern-tail] { $filled } { $color } { $noun } { $nounTail } with { $pattern }\n *[plain] { $filled } { $color } { $noun }\n }\n\n# The border clause appended to a filled shape: "with a thick red border".\n#\n# `$parts` carries two distinctions English cares about: whether a fill pattern\n# was already mentioned, which makes this a further clause ("and") rather than\n# the first ("with"), and whether the surrounding description named the shape,\n# which is where English wants an article.\nstyle-border-clause =\n { $parts ->\n [with-article] with a { $border } border\n [and] and { $border } border\n [and-article] and a { $border } border\n *[with] with { $border } border\n }\n\n# How a shape\'s interior is filled, on its own: "blue diamonds".\nstyle-fill =\n { $parts ->\n [pattern] { $color } { $pattern }\n *[plain] { $color }\n }\n\nstyle-unfilled = unfilled\n\n# How a piece of text is styled: its color, and the background behind it.\nstyle-text =\n { $parts ->\n [background] { $color } with a { $background } background\n *[plain] { $color }\n }\n\n# What `backgroundColor` answers when nothing is drawn behind the text.\nstyle-background-none = none\n';
39405
- const diagnostics = '# Errors and warnings surfaced to the reader or author. Produced by the worker\n# but addressed to whoever is looking at the screen, so these are selected by\n# `uiLocale`, not `documentLocale`.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`invalid-attribute-value`).\n#\n# Reached by stable diagnostic code rather than by a literal `t("key")` call:\n# `DIAGNOSTIC_CODES` in `src/diagnostics.ts` maps `doenet-w0001` to the id\n# below, and `lint:i18n` treats that registry as the call site. Adding a\n# message here without registering a code for it fails the lint as an orphan.\n#\n# Translators: `through`, `endpoint`, `midpointOffset`, `numDimensions` and the\n# like are DoenetML attribute names. They are part of the language, not prose,\n# and must be left in English exactly as written.\n\n## `<lineSegment>`\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } is ignored when two endpoints are specified\n *[other] { $attributes } are ignored when two endpoints are specified\n }\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } is ignored when an endpoint and a midpoint are both specified\n *[other] { $attributes } are ignored when an endpoint and a midpoint are both specified\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset has no effect without a midpoint\n\n## `<line>`\n\nline-points-undetermined-dimensions = Line through points of undetermined dimensions.\n\nline-points-too-few-dimensions = Line must be through points of at least two dimensions.\n\n# $variables is a bare enumeration of variable names, not an "and" list.\nline-points-depend-on-variables = Line is through points that depend on variables: { $variables }.\n\nline-equation-invalid-format = Invalid format for equation of line in variables { $variable1 } and { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = Ray is prescribed by through, endpoint, and direction. Ignoring specified through.\n\nray-dimension-mismatch = numDimensions mismatch in ray.\n\n## `<vector>`\n\nvector-overprescribed-head = Vector is prescribed by head, tail, and displacement. Ignoring specified head.\n\nvector-dimension-mismatch = numDimensions mismatch in vector.\n\n## Attracting and constraining\n\n# $component is the DoenetML tag of the child that was named, e.g. "polygon".\nattract-to-without-nearest-point = Cannot attract to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-without-nearest-point = Cannot constrain to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-interior-without-nearest-point = Cannot constrain to interior of a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\n## `<choiceInput>`\n\n# Translators: `labelPosition` is an attribute name and stays in English.\nchoice-input-label-position-ignored = labelPosition is ignored for non-inline choiceInput\n\n## Ordering children by index\n##\n## These name the component in prose rather than as a tag, matching how the\n## messages have always read. The component names stay in English; the nouns\n## around them are prose and should be translated.\n\nchoice-input-indices-count-mismatch = Ignoring indices specified for choiceInput as number of indices doesn\'t match number of choice children.\n\npretzel-indices-count-mismatch = Ignoring indices specified for problem as number of indices doesn\'t match number of problem children.\n\nshuffle-indices-count-mismatch = Ignoring indices specified for shuffle as number of indices doesn\'t match number of components.\n\n# $component is `choiceInput`, `pretzel` or `shuffle` — a DoenetML component\n# name, so it stays in English.\nindices-ignored-out-of-range = Ignoring indices specified for { $component } as some indices out of range.\n\npretzel-indices-repeated = Ignoring indices specified for pretzel as some indices are repeated.\n\npretzel-circuit-first-index = Ignoring indices specified for pretzel in circuit mode as the first index must be 1.\n\n## `<shuffle>` and `<sort>`\n\n# $component is `shuffle` or `sort`. These two components accept the same\n# children and fail the same ways, so they share their messages.\nstring-children-need-type = For `<{ $component }>` to work with string children, a `type` attribute must be specified.\n\n# $type is what the author wrote; math, text, number and boolean are attribute\n# values and stay in English.\ninvalid-type-defaulting-to-math = Invalid type { $type } for { $component } component. Must be one of math, text, number, or boolean. Defaulting to math.\n\n# $value is the string child that could not be used.\nstring-not-valid-component-to-arrange = String "{ $value }" is not a valid component to { $component }. Ignoring.\n\n## Types and variables\n\ninvalid-type-defaulting-to-number = Invalid type { $type }, setting type to number.\n\ninvalid-variable-value = Invalid value of a variable: `{ $value }`\n\n## Variants\n\n# $index is what the author wrote, reproduced verbatim rather than as a number:\n# it reached this message precisely because it was not one.\nvariant-index-must-be-number = Variant index { $index } must be a number\n\nvariant-index-must-be-integer = Variant index { $index } must be an integer\n\n## `<sideBySide>`\n\n# $component is `sideBySide` or `sbsGroup`.\nside-by-side-absolute-widths = `<{ $component }>` is not implemented for absolute measurements. Setting widths to relative.\n\nside-by-side-absolute-margins = `<{ $component }>` is not implemented for absolute measurements. Setting margins to relative.\n\nside-by-side-no-block-child = Invalid `<{ $component }>`: it must have at least one block child.\n\n## `<label>`\n\n# Translators: `for` is an attribute name and stays in English.\nlabel-for-ignored-on-graphical = The `for` attribute on graphical `<label>` is ignored.\n\nlabel-for-must-resolve-to-one = The `for` attribute on `<label>` must resolve to exactly one component.\n\nlabel-for-unresolved = The `for` attribute on `<label>` could not be resolved to a component.\n\nlabel-for-answer-with-authored-inputs = The `for` attribute on `<label>` references an `<answer>` with explicitly authored inputs; reference the input directly.\n\nlabel-for-answer-without-input = The `for` attribute on `<label>` references an `<answer>` without an input to label.\n\nlabel-for-must-reference-input-or-answer = The `for` attribute on `<label>` must reference an input or an answer.\n\n## Accessibility\n\n# $component is a DoenetML tag, e.g. "graph" or "image".\naccessibility-short-description-or-decorative = For accessibility, `<{ $component }>` must either have a short description or be specified as decorative.\n\naccessibility-video-short-description = For accessibility, `<video>` must have a short description.\n\naccessibility-input-short-description-or-label = For accessibility, `<{ $component }>` must have a short description or a label.\n\n# The companion to the message above, for the input an `<answer>` creates on the\n# author\'s behalf. Two messages rather than one with the subject passed in: the\n# subject is a phrase here, not a name, and a phrase handed over as an argument\n# would never reach a translator.\naccessibility-answer-input-short-description-or-label = For accessibility, an `<answer>` creating an input must have a short description or a label.\n\naccessibility-short-description-contains-math = Short descriptions should not contain math components such as `<{ $component }>`. Spell out any math with words.\n\n# $colorName is an attribute name and stays in English. $ratio and $threshold\n# are contrast ratios; $mode says which theme the shortfall was measured in,\n# and is `dark` or `light`.\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } has insufficient contrast for the section heading text (dark mode) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n *[other] { $colorName } has insufficient contrast for the section heading text ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n }\n\n## `<circle>`\n\n# $count is the number of through points.\ncircle-through-points-non-numerical = Haven\'t implemented `<circle>` through { $count } points in case where the points don\'t have numerical values.\n\ncircle-too-many-through-points = Cannot calculate circle through more than 3 points.\n\ncircle-overprescribed-radius-center-points = Cannot calculate circle with specified radius, center and through points.\n\ncircle-center-with-multiple-points = Cannot calculate circle with specified center through more than 1 point.\n\n# $distance and $radius arrive as strings, not numbers: $radius is the author\'s\n# own value echoed back for diagnosis, and formatting it as a quantity would\n# round a radius of 0.0001 away to 0.\ncircle-radius-too-small = Cannot calculate circle: given that the distance between the two points is { $distance }, the specified radius { $radius } is too small.\n\ncircle-radius-with-many-points = Cannot create circle through more than two points with a specified radius.\n\ncircle-invalid-center-or-through-points = Invalid center or through points of circle.\n\ncircle-radius-center-with-multiple-points = Cannot calculate radius of circle with specified center through more than 1 point.\n\ncircle-change-radius-non-numerical = Cannot change radius of circle with non-numerical through points\n\ncircle-radius-with-points-non-numerical = Cannot create circle through more than one point with specified radius when don\'t have numerical values.\n\ncircle-change-center-non-numerical = Haven\'t implemented changing center of circle through points with non numerical values.\n\n## `<function>`\n\n# Two independent counts in one sentence, so the variants multiply out. A\n# select\'s variants each need their own line, so the inner one spans lines too;\n# that is safe because newlines inside a placeable never reach the rendered\n# value. Only text continuing onto a further line would.\nfunction-domain-insufficient-dimensions =\n { $intervals ->\n [one] Insufficient dimensions for domain for function. Domain has { $intervals } interval but the function has { $inputs ->\n [one] { $inputs } input\n *[other] { $inputs } inputs\n }.\n *[other] Insufficient dimensions for domain for function. Domain has { $intervals } intervals but the function has { $inputs ->\n [one] { $inputs } input\n *[other] { $inputs } inputs\n }.\n }\n\nfunction-domain-invalid-format = Invalid format for domain for function.\n\n# $type is what was being read off the point. It selects the wording rather\n# than being substituted into it: "maximum", "slope" and the rest are English\n# nouns, and a noun handed over as an argument would never reach a translator.\n# The catch-all reproduces the pre-catalog behavior for a value not listed here.\nfunction-ignoring-non-numerical =\n { $type ->\n [maximum] Ignoring non-numerical maximum of function.\n [minimum] Ignoring non-numerical minimum of function.\n [extremum] Ignoring non-numerical extremum of function.\n [point] Ignoring non-numerical point of function.\n [slope] Ignoring non-numerical slope of function.\n *[other] Ignoring non-numerical { $type } of function.\n }\n\nfunction-ignoring-empty =\n { $type ->\n [maximum] Ignoring empty maximum of function.\n [minimum] Ignoring empty minimum of function.\n [extremum] Ignoring empty extremum of function.\n [point] Ignoring empty point of function.\n *[other] Ignoring empty { $type } of function.\n }\n\nfunction-points-too-close = Function contains two points with locations too close together. Can\'t define function.\n\nfunction-iterates-input-output-mismatch =\n { $inputs ->\n [one] Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has { $inputs } input and { $outputs ->\n [one] { $outputs } output\n *[other] { $outputs } outputs\n }.\n *[other] Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has { $inputs } inputs and { $outputs ->\n [one] { $outputs } output\n *[other] { $outputs } outputs\n }.\n }\n\n## `<sequence>`\n\nsequence-invalid-length = Invalid length of sequence. Must be a non-negative integer.\n\n# $type is a sequence type: number, letters, or math.\nsequence-invalid-step = Invalid step of sequence. Must be a number for sequence of type { $type }.\n\n# $attribute is `from` or `to` — an attribute name, so it stays in English.\nsequence-invalid-endpoint-number = Invalid "{ $attribute }" of number sequence. Must be a number.\n\nsequence-invalid-endpoint-letters = Invalid "{ $attribute }" of letters sequence. Must be a letter combination.\n\nsequence-invalid-endpoint = Invalid "{ $attribute }" of sequence.\n\nselect-from-sequence-coprime-not-numbers = coprime ignored since not selecting numbers\n\nselect-from-sequence-coprime-with-exclude-combinations = coprime ignored since excludeCombinations specified\n\n## Resolving a `target`\n##\n## Raised by the components that take a `target` attribute. They resolve it\n## through the same code and fail the same two ways, so they share these two\n## messages rather than spelling each one out per component: $source is the tag\n## of the component that raised it, part of the DoenetML language, so it stays\n## in English.\n\ntarget-not-found = Invalid target for `<{ $source }>`: cannot find target.\n\n# $property is the state variable that was looked for; $component is the tag it\n# was looked for on.\ntarget-state-variable-not-found = Invalid target for `<{ $source }>`: cannot find a state variable named "{ $property }" on a `<{ $component }>`.\n\n## `<odeSystem>`\n\node-system-variables-match-independent = Variables of `<odeSystem>` must be different than independent variable.\n\node-system-duplicate-variable-names = Can\'t define ODE RHS functions with duplicate dependent variable names.\n\node-system-rhs-function-error = Cannot define ODE RHS function. Error creating mathjs function.\n\n## `<angle>`, `<parabola>`, and `<intersection>`\n\n# $count is how many line children were found.\nangle-too-many-lines = Cannot define an angle between { $count } lines\n\nangle-invalid-through-point = Invalid point in through of `<angle>`\n\nparabola-vertex-too-many-points = Haven\'t implemented parabola with vertex through more than 1 point.\n\nparabola-too-many-points = Haven\'t implemented parabola through more than 3 points.\n\nintersection-too-many-items = Haven\'t implemented intersection for more than two items\n\n## Other math components\n\nionic-compound-not-two-ions = Have not implemented ionic compound for anything other than two ions.\n\nionic-compound-needs-cation-and-anion = Ionic compound implemented only for one cation and one anion.\n\n# $equation is the equation as the author wrote it.\nsolve-equations-cannot-evaluate = Cannot solve equation as could not evaluate equation: { $equation }\n\n# Translators: `operandNumber` is an attribute name and stays in English.\nmath-operators-operand-number-required = Must specify a operandNumber when extracting a math operand.\n\neigen-decomposition-failed = Could not calculate eigenvalues of matrix\n\n## PreFigure renderer\n\n# Translators: xLabelPosition, yLabelPosition and their values are attribute\n# names and stay in English, as does the renderer\'s name.\nprefigure-x-label-position-unsupported = `<graph>`: xLabelPosition="left" is not supported in prefigure renderer; using right-position behavior.\n\nprefigure-y-label-position-unsupported = `<graph>`: yLabelPosition="bottom" is not supported in prefigure renderer; using top-position behavior.\n\nprefigure-invalid-axis-bounds = `<graph>`: invalid axis bounds for prefigure conversion; using default bbox (-10,-10,10,10).\n\nprefigure-invalid-width = `<graph>`: invalid width for prefigure conversion; using default diagram width 425.\n\nprefigure-invalid-aspect-ratio = `<graph>`: invalid aspectRatio for prefigure conversion; using default aspect ratio 1.\n\nprefigure-annotations-not-rendered = `<graph>`: annotations will not be rendered when not using the PreFigure renderer.\n\nmultiple-annotations-children = Multiple `<annotations>` children found in `<graph>`; all but the last one are ignored.\n\n## Referring to other components\n##\n## `<updateValue>`\'s own "cannot find target" messages are not here: it\n## resolves a target the same way `<animateFromSequence>` does and fails the\n## same ways, so the two share `target-not-found` and\n## `target-state-variable-not-found` above.\n\ncopy-unrecognized-component-type = Cannot extend or copy an unrecognized component type: { $type }.\n\ncopy-prop-not-found = Could not find prop { $property } on a component of type { $component }\n\ncollect-no-source = No source found for collect.\n\ncollect-invalid-component-type = Cannot collect components of type `<{ $component }>` as it is an invalid component type.\n\n## `<dataFrame>`\n\n# $componentIdx is an internal index, passed as a string so it is not grouped\n# like a quantity; the odd spacing before the colon is reproduced from the\n# original message.\ndata-frame-inconsistent-row-lengths = Data has invalid shape. Rows has inconsistent lengths. Found in componentIdx :{ $componentIdx }\n\ndata-frame-duplicate-column-names = Data has duplicate column names. Found in componentIdx :{ $componentIdx }\n\ndata-frame-missing-column-name = Data is missing a column name. Found in componentIdx :{ $componentIdx }\n\n## `<answer>` and scoring\n\nanswer-award-depends-on-own-response = An award for this answer is based on the answer tag\'s own submitted response, which will lead to unexpected behavior.\n\n# Translators: maxNumAttempts and sectionWideCheckWork are attribute names.\nanswer-max-num-attempts-in-section-wide-check-work = Setting `maxNumAttempts` on an `<answer>` inside a container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the container. Set `maxNumAttempts` on the container instead.\n\nnested-section-wide-check-work-max-num-attempts = Setting `maxNumAttempts` on a container with `sectionWideCheckWork` that is inside another container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the outer container. Set `maxNumAttempts` on the outer container instead.\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nanswer-attributes-need-symbolic-equality =\n { $attributesCount ->\n [one] The { $attributes } attribute will have no effect without symbolicEquality set.\n *[other] The { $attributes } attributes will have no effect without symbolicEquality set.\n }\n\nanswer-invalid-type = Invalid type for answer: { $type }\n\n## `<module>`, `<conditionalContent>`, `<slider>`, `<pretzel>`\n\nmodule-attribute-child-needs-name = Since the component `<{ $component }>` does not have a name, it cannot be used for a module attribute\n\nmodule-attribute-name-already-defined = The component `<{ $component } name="{ $name }">` cannot be used as an attribute for a module because the `<module>` component type already has a "{ $name }" attribute defined.\n\nconditional-content-condition-ignored = Attribute `condition` is ignored on a `<conditionalContent>` component with case or else children.\n\nslider-markers-type-mismatch = Markers type doesn\'t match slider type.\n\npretzel-problem-needs-statement-and-answer = Invalid pretzel: each `<problem>` must contain one `<statement>` and one `<answer>`.\n\npretzel-circuit-first-problem-distractor = Invalid pretzel: in mode="circuit", the first `<problem>` cannot be a distractor.\n\n## Attribute values\n\n# $values is a list of the values that were rejected, each already in\n# backticks; $valuesCount is how many there were.\nattribute-invalid-values =\n { $valuesCount ->\n [one] Invalid value { $values } for attribute `{ $attribute }`; ignoring.\n *[other] Invalid values { $values } for attribute `{ $attribute }`; ignoring.\n }\n\nattribute-must-be-references = Invalid value `{ $value }` for attribute `{ $attribute }`. Attribute must be composed of references that begin with a `$`.\n\n# $names is a list of the rejected names, each already in single quotes.\nmath-input-invalid-function-names = <mathInput>: ignored invalid function name(s) in { $attribute }: { $names }. Each name\'s display segment must be at least 2 characters (letters or dashes); an optional `|<mathspeak alternative>` suffix may follow.\n\n## Building components from the source\n\n# Raised while the source is being turned into components, by throwing rather\n# than by building a record: the thrower is caught, the component becomes an\n# `_error`, and the diagnostic is re-raised from it.\n\ncomponent-type-invalid = Invalid component type: `<{ $componentType }>`\n\nattribute-repeated = Cannot repeat attribute { $attribute }.\n\nattribute-invalid-for-component = Invalid attribute "{ $attribute }" for a component of type `<{ $componentType }>`.\n\n## Style definition contrast\n\n# $context names the pair being compared, $mode which colour scheme it was\n# rendered in. Both are symbolic — the phrase is chosen here so a translator\n# can rewrite it, rather than being handed over already in English.\nstyle-definition-insufficient-contrast =\n Style definition { $styleNumber } has insufficient contrast for { $context ->\n [text-on-background] text color against background color\n [high-contrast] high-contrast color against the canvas\n [line] line color against the canvas\n [marker] marker color against the canvas\n *[text-on-canvas] text color against the canvas\n }{ $mode ->\n [dark] { " (dark mode)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n\n# $suggestion says whether a concrete replacement colour could be computed.\n# The attribute names and colour values in the `available` branch are\n# DoenetML source, not prose, and stay as they are in every language.\nstyle-definition-dark-mode-text-background-contrast =\n Although style definition { $styleNumber } has specified colors that provide sufficient contrast for light mode, the dark-mode colors derived from these values have insufficient contrast for the text color against the background color ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set { $lightAttribute }="{ $lightColor }") or override the dark-mode color (e.g., set { $darkAttribute }="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived colors with textColorDarkMode and/or backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Although style definition { $styleNumber } has a specified text color that provides sufficient contrast for light mode, the dark-mode text color derived from this value has insufficient contrast against the canvas ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set textColor="{ $lightColor }") or override the dark-mode color (e.g., set textColorDarkMode="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived color with textColorDarkMode.\n }\n\nsection-multiple-style-palettes = A section can select only one <stylePalette>; using the last one.\n\n## Unique variants\n\n# Explanations of why a component\'s unique variants could not be worked out.\n# $component is the tag that could not be analyzed and stays as written; the\n# reason is a separate message per situation, so a host can tell them apart by\n# code and a translator sees a whole sentence rather than a fragment.\n\nvariant-num-to-select-not-non-negative-integer = cannot determine unique variants of { $component } as numToSelect isn\'t a non-negative integer.\n\nvariant-num-to-select-not-constant-number = cannot determine unique variants of { $component } as numToSelect isn\'t constant number.\n\nvariant-with-replacement-not-constant-boolean = cannot determine unique variants of { $component } as withReplacement isn\'t constant boolean.\n\nvariant-select-weight-disables-unique = Unique variants for select disabled if have an option with selectWeight or selectForVariants specified\n\nvariant-coprime-undetermined = cannot determine unique variants of { $component } as cannot determine coprime is always false.\n\n# $attribute is an attribute name (`from`, `to`, `step`, `sort`, `length`) and\n# stays as written.\nvariant-attribute-not-constant = cannot determine unique variants of { $component } as { $attribute } isn\'t a constant.\n\nvariant-attribute-not-number = cannot determine unique variants of { $component } as { $attribute } isn\'t a number.\n\n# $type is the sequence type the component was declared with. $expected names\n# what the value had to be, symbolically, because which one applies depends on\n# both the type and the attribute.\nvariant-attribute-wrong-type-for-sequence =\n cannot determine unique variants of { $component } of { $type } type as { $attribute } isn\'t { $expected ->\n [letters-combination] a combination of letters\n [math-expression] a valid math expression\n [integer] an integer\n *[number] a number\n }.\n\nvariant-length-not-integer = cannot determine unique variants of { $component } as length isn\'t an integer.\n\nvariant-sort-not-implemented = have not implemented unique variants of a { $component } with sort\n\nvariant-exclude-combinations-not-implemented = have not implemented unique variants of a { $component } with excludeCombinations\n\nvariant-math-exclude-not-implemented = have not implemented unique variants of a { $component } of type math with exclude\n\nvariant-non-constant-exclude-not-implemented = have not implemented unique variants of a { $component } with non-constant exclude\n\n## PreFigure conversion\n\n# $subject identifies the component the warning is about, already written as\n# `<tag>` or `<tag> (name)`. It is composed in code rather than here because\n# Fluent terms cannot take a variable as an argument, so a shared subject\n# fragment cannot be parameterized from the catalog. It holds only a tag name,\n# a component name and punctuation — never a word — which is why a descendant\n# with no type reads `<?>` rather than `<unknown>`.\n\nprefigure-descendant-unsupported = { $subject }: unsupported in graph prefigure renderer; descendant skipped.\n\nprefigure-descendant-invalid-geometry = { $subject }: non-finite or incomplete geometry; descendant skipped.\n\nprefigure-curve-label-omitted = { $subject }: labels are not supported on converted curve elements; label omitted.\n\nprefigure-curve-unsupported-definition-type = { $subject }: unsupported curve function definition type \'{ $definitionType }\'; descendant skipped.\n\nprefigure-region-flip-functions-unsupported = { $subject }: unsupported flipFunctions attribute on regionBetweenCurves; descendant skipped.\n\nprefigure-region-non-formula-child = { $subject }: only formula-typed child functions are supported on regionBetweenCurves; descendant skipped.\n\n# $labelKind says which family of object carried the label, since the advice\n# is the same but the object is not.\nprefigure-label-position-unsupported =\n { $subject }: unsupported labelPosition \'{ $labelPosition }\' for { $labelKind ->\n [line-family] line-family label\n *[point] point label\n }; default PreFigure alignment used.\n\nprefigure-fill-style-unsupported = { $subject }: fill style \'{ $fillStyle }\' is unsupported by PreFigure; falling back to a solid fill.\n\nprefigure-line-style-unknown = { $subject }: unknown line style \'{ $lineStyle }\' omitted from PreFigure output.\n\nprefigure-marker-style-mapped-to-diamond = { $subject }: marker style \'{ $markerStyle }\' mapped to PreFigure style \'diamond\'.\n\nprefigure-marker-style-unsupported = { $subject }: marker style \'{ $markerStyle }\' is unsupported by PreFigure; default style used.\n\n## PreFigure annotations\n\nannotation-ref-unresolvable = `<annotation>`: invalid `ref`; cannot resolve target. Annotation omitted.\n\nannotation-ref-multiple-targets = `<annotation>`: `ref` resolved to multiple targets; using the first target.\n\nannotation-ref-outside-graph = `<annotation>`: invalid `ref`; target is outside the containing graph. Annotation omitted.\n\nannotation-ref-unsupported-target = `<annotation>`: invalid `ref`; target is not a supported graphical object in prefigure conversion. Annotation omitted.\n\nannotation-text-missing = `<annotation>`: missing or empty `text`; emitting empty text.\n';
38404
+ const diagnostics = '# Errors and warnings surfaced to the reader or author. Produced by the worker\n# but addressed to whoever is looking at the screen, so these are selected by\n# `uiLocale`, not `documentLocale`.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`invalid-attribute-value`).\n#\n# Reached by stable diagnostic code rather than by a literal `t("key")` call:\n# `DIAGNOSTIC_CODES` in `src/diagnostics.ts` maps `doenet-w0001` to the id\n# below, and `lint:i18n` treats that registry as the call site. Adding a\n# message here without registering a code for it fails the lint as an orphan.\n#\n# Translators: `through`, `endpoint`, `midpointOffset`, `numDimensions` and the\n# like are DoenetML attribute names. They are part of the language, not prose,\n# and must be left in English exactly as written.\n\n## `<lineSegment>`\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } is ignored when two endpoints are specified\n *[other] { $attributes } are ignored when two endpoints are specified\n }\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } is ignored when an endpoint and a midpoint are both specified\n *[other] { $attributes } are ignored when an endpoint and a midpoint are both specified\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset has no effect without a midpoint\n\n## `<line>`\n\nline-points-undetermined-dimensions = Line through points of undetermined dimensions.\n\nline-points-too-few-dimensions = Line must be through points of at least two dimensions.\n\n# $variables is a bare enumeration of variable names, not an "and" list.\nline-points-depend-on-variables = Line is through points that depend on variables: { $variables }.\n\nline-equation-invalid-format = Invalid format for equation of line in variables { $variable1 } and { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = Ray is prescribed by through, endpoint, and direction. Ignoring specified through.\n\nray-dimension-mismatch = numDimensions mismatch in ray.\n\n## `<vector>`\n\nvector-overprescribed-head = Vector is prescribed by head, tail, and displacement. Ignoring specified head.\n\nvector-dimension-mismatch = numDimensions mismatch in vector.\n\n## Attracting and constraining\n\n# $component is the DoenetML tag of the child that was named, e.g. "polygon".\nattract-to-without-nearest-point = Cannot attract to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-without-nearest-point = Cannot constrain to a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\nconstrain-to-interior-without-nearest-point = Cannot constrain to interior of a `<{ $component }>` as it doesn\'t have a nearestPoint state variable.\n\n## `<choiceInput>`\n\n# Translators: `labelPosition` is an attribute name and stays in English.\nchoice-input-label-position-ignored = labelPosition is ignored for non-inline choiceInput\n\n## Ordering children by index\n##\n## These name the component in prose rather than as a tag, matching how the\n## messages have always read. The component names stay in English; the nouns\n## around them are prose and should be translated.\n\nchoice-input-indices-count-mismatch = Ignoring indices specified for choiceInput as number of indices doesn\'t match number of choice children.\n\npretzel-indices-count-mismatch = Ignoring indices specified for problem as number of indices doesn\'t match number of problem children.\n\nshuffle-indices-count-mismatch = Ignoring indices specified for shuffle as number of indices doesn\'t match number of components.\n\n# $component is `choiceInput`, `pretzel` or `shuffle` — a DoenetML component\n# name, so it stays in English.\nindices-ignored-out-of-range = Ignoring indices specified for { $component } as some indices out of range.\n\npretzel-indices-repeated = Ignoring indices specified for pretzel as some indices are repeated.\n\npretzel-circuit-first-index = Ignoring indices specified for pretzel in circuit mode as the first index must be 1.\n\n## `<shuffle>` and `<sort>`\n\n# $component is `shuffle` or `sort`. These two components accept the same\n# children and fail the same ways, so they share their messages.\nstring-children-need-type = For `<{ $component }>` to work with string children, a `type` attribute must be specified.\n\n# $type is what the author wrote; math, text, number and boolean are attribute\n# values and stay in English.\ninvalid-type-defaulting-to-math = Invalid type { $type } for { $component } component. Must be one of math, text, number, or boolean. Defaulting to math.\n\n# $value is the string child that could not be used.\nstring-not-valid-component-to-arrange = String "{ $value }" is not a valid component to { $component }. Ignoring.\n\n## Types and variables\n\ninvalid-type-defaulting-to-number = Invalid type { $type }, setting type to number.\n\ninvalid-variable-value = Invalid value of a variable: `{ $value }`\n\n## Variants\n\n# $index is what the author wrote, reproduced verbatim rather than as a number:\n# it reached this message precisely because it was not one.\nvariant-index-must-be-number = Variant index { $index } must be a number\n\nvariant-index-must-be-integer = Variant index { $index } must be an integer\n\n## `<sideBySide>`\n\n# $component is `sideBySide` or `sbsGroup`.\nside-by-side-absolute-widths = `<{ $component }>` is not implemented for absolute measurements. Setting widths to relative.\n\nside-by-side-absolute-margins = `<{ $component }>` is not implemented for absolute measurements. Setting margins to relative.\n\nside-by-side-no-block-child = Invalid `<{ $component }>`: it must have at least one block child.\n\n## `<label>`\n\n# Translators: `for` is an attribute name and stays in English.\nlabel-for-ignored-on-graphical = The `for` attribute on graphical `<label>` is ignored.\n\nlabel-for-must-resolve-to-one = The `for` attribute on `<label>` must resolve to exactly one component.\n\nlabel-for-unresolved = The `for` attribute on `<label>` could not be resolved to a component.\n\nlabel-for-answer-with-authored-inputs = The `for` attribute on `<label>` references an `<answer>` with explicitly authored inputs; reference the input directly.\n\nlabel-for-answer-without-input = The `for` attribute on `<label>` references an `<answer>` without an input to label.\n\nlabel-for-must-reference-input-or-answer = The `for` attribute on `<label>` must reference an input or an answer.\n\n## Accessibility\n\n# $component is a DoenetML tag, e.g. "graph" or "image".\naccessibility-short-description-or-decorative = For accessibility, `<{ $component }>` must either have a short description or be specified as decorative.\n\naccessibility-video-short-description = For accessibility, `<video>` must have a short description.\n\naccessibility-input-short-description-or-label = For accessibility, `<{ $component }>` must have a short description or a label.\n\n# The companion to the message above, for the input an `<answer>` creates on the\n# author\'s behalf. Two messages rather than one with the subject passed in: the\n# subject is a phrase here, not a name, and a phrase handed over as an argument\n# would never reach a translator.\naccessibility-answer-input-short-description-or-label = For accessibility, an `<answer>` creating an input must have a short description or a label.\n\naccessibility-short-description-contains-math = Short descriptions should not contain math components such as `<{ $component }>`. Spell out any math with words.\n\n# $colorName is an attribute name and stays in English. $ratio and $threshold\n# are contrast ratios; $mode says which theme the shortfall was measured in,\n# and is `dark` or `light`.\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } has insufficient contrast for the section heading text (dark mode) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n *[other] { $colorName } has insufficient contrast for the section heading text ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n }\n\n## `<circle>`\n\n# $count is the number of through points.\ncircle-through-points-non-numerical = Haven\'t implemented `<circle>` through { $count } points in case where the points don\'t have numerical values.\n\ncircle-too-many-through-points = Cannot calculate circle through more than 3 points.\n\ncircle-overprescribed-radius-center-points = Cannot calculate circle with specified radius, center and through points.\n\ncircle-center-with-multiple-points = Cannot calculate circle with specified center through more than 1 point.\n\n# $distance and $radius arrive as strings, not numbers: $radius is the author\'s\n# own value echoed back for diagnosis, and formatting it as a quantity would\n# round a radius of 0.0001 away to 0.\ncircle-radius-too-small = Cannot calculate circle: given that the distance between the two points is { $distance }, the specified radius { $radius } is too small.\n\ncircle-radius-with-many-points = Cannot create circle through more than two points with a specified radius.\n\ncircle-invalid-center-or-through-points = Invalid center or through points of circle.\n\ncircle-radius-center-with-multiple-points = Cannot calculate radius of circle with specified center through more than 1 point.\n\ncircle-change-radius-non-numerical = Cannot change radius of circle with non-numerical through points\n\ncircle-radius-with-points-non-numerical = Cannot create circle through more than one point with specified radius when don\'t have numerical values.\n\ncircle-change-center-non-numerical = Haven\'t implemented changing center of circle through points with non numerical values.\n\n## `<function>`\n\n# Two independent counts in one sentence, so the variants multiply out. A\n# select\'s variants each need their own line, so the inner one spans lines too;\n# that is safe because newlines inside a placeable never reach the rendered\n# value. Only text continuing onto a further line would.\nfunction-domain-insufficient-dimensions =\n { $intervals ->\n [one] Insufficient dimensions for domain for function. Domain has { $intervals } interval but the function has { $inputs ->\n [one] { $inputs } input\n *[other] { $inputs } inputs\n }.\n *[other] Insufficient dimensions for domain for function. Domain has { $intervals } intervals but the function has { $inputs ->\n [one] { $inputs } input\n *[other] { $inputs } inputs\n }.\n }\n\nfunction-domain-invalid-format = Invalid format for domain for function.\n\n# $type is what was being read off the point. It selects the wording rather\n# than being substituted into it: "maximum", "slope" and the rest are English\n# nouns, and a noun handed over as an argument would never reach a translator.\n# The catch-all reproduces the pre-catalog behavior for a value not listed here.\nfunction-ignoring-non-numerical =\n { $type ->\n [maximum] Ignoring non-numerical maximum of function.\n [minimum] Ignoring non-numerical minimum of function.\n [extremum] Ignoring non-numerical extremum of function.\n [point] Ignoring non-numerical point of function.\n [slope] Ignoring non-numerical slope of function.\n *[other] Ignoring non-numerical { $type } of function.\n }\n\nfunction-ignoring-empty =\n { $type ->\n [maximum] Ignoring empty maximum of function.\n [minimum] Ignoring empty minimum of function.\n [extremum] Ignoring empty extremum of function.\n [point] Ignoring empty point of function.\n *[other] Ignoring empty { $type } of function.\n }\n\nfunction-points-too-close = Function contains two points with locations too close together. Can\'t define function.\n\nfunction-iterates-input-output-mismatch =\n { $inputs ->\n [one] Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has { $inputs } input and { $outputs ->\n [one] { $outputs } output\n *[other] { $outputs } outputs\n }.\n *[other] Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has { $inputs } inputs and { $outputs ->\n [one] { $outputs } output\n *[other] { $outputs } outputs\n }.\n }\n\n## `<sequence>`\n\nsequence-invalid-length = Invalid length of sequence. Must be a non-negative integer.\n\n# $type is a sequence type: number, letters, or math.\nsequence-invalid-step = Invalid step of sequence. Must be a number for sequence of type { $type }.\n\n# $attribute is `from` or `to` — an attribute name, so it stays in English.\nsequence-invalid-endpoint-number = Invalid "{ $attribute }" of number sequence. Must be a number.\n\nsequence-invalid-endpoint-letters = Invalid "{ $attribute }" of letters sequence. Must be a letter combination.\n\nsequence-invalid-endpoint = Invalid "{ $attribute }" of sequence.\n\nselect-from-sequence-coprime-not-numbers = coprime ignored since not selecting numbers\n\nselect-from-sequence-coprime-with-exclude-combinations = coprime ignored since excludeCombinations specified\n\n## Resolving a `target`\n##\n## Raised by the components that take a `target` attribute. They resolve it\n## through the same code and fail the same two ways, so they share these two\n## messages rather than spelling each one out per component: $source is the tag\n## of the component that raised it, part of the DoenetML language, so it stays\n## in English.\n\ntarget-not-found = Invalid target for `<{ $source }>`: cannot find target.\n\n# $property is the state variable that was looked for; $component is the tag it\n# was looked for on.\ntarget-state-variable-not-found = Invalid target for `<{ $source }>`: cannot find a state variable named "{ $property }" on a `<{ $component }>`.\n\n## `<odeSystem>`\n\node-system-variables-match-independent = Variables of `<odeSystem>` must be different than independent variable.\n\node-system-duplicate-variable-names = Can\'t define ODE RHS functions with duplicate dependent variable names.\n\node-system-rhs-function-error = Cannot define ODE RHS function. Error creating mathjs function.\n\n## `<angle>`, `<parabola>`, and `<intersection>`\n\n# $count is how many line children were found.\nangle-too-many-lines = Cannot define an angle between { $count } lines\n\nangle-invalid-through-point = Invalid point in through of `<angle>`\n\nparabola-vertex-too-many-points = Haven\'t implemented parabola with vertex through more than 1 point.\n\nparabola-too-many-points = Haven\'t implemented parabola through more than 3 points.\n\nintersection-too-many-items = Haven\'t implemented intersection for more than two items\n\n## Other math components\n\nionic-compound-not-two-ions = Have not implemented ionic compound for anything other than two ions.\n\nionic-compound-needs-cation-and-anion = Ionic compound implemented only for one cation and one anion.\n\n# $equation is the equation as the author wrote it.\nsolve-equations-cannot-evaluate = Cannot solve equation as could not evaluate equation: { $equation }\n\n# Translators: `operandNumber` is an attribute name and stays in English.\nmath-operators-operand-number-required = Must specify a operandNumber when extracting a math operand.\n\neigen-decomposition-failed = Could not calculate eigenvalues of matrix\n\n## PreFigure renderer\n\n# Translators: xLabelPosition, yLabelPosition and their values are attribute\n# names and stay in English, as does the renderer\'s name.\nprefigure-x-label-position-unsupported = `<graph>`: xLabelPosition="left" is not supported in prefigure renderer; using right-position behavior.\n\nprefigure-y-label-position-unsupported = `<graph>`: yLabelPosition="bottom" is not supported in prefigure renderer; using top-position behavior.\n\nprefigure-invalid-axis-bounds = `<graph>`: invalid axis bounds for prefigure conversion; using default bbox (-10,-10,10,10).\n\nprefigure-invalid-width = `<graph>`: invalid width for prefigure conversion; using default diagram width 425.\n\nprefigure-invalid-aspect-ratio = `<graph>`: invalid aspectRatio for prefigure conversion; using default aspect ratio 1.\n\nprefigure-annotations-not-rendered = `<graph>`: annotations will not be rendered when not using the PreFigure renderer.\n\nmultiple-annotations-children = Multiple `<annotations>` children found in `<graph>`; all but the last one are ignored.\n\n## Referring to other components\n##\n## `<updateValue>`\'s own "cannot find target" messages are not here: it\n## resolves a target the same way `<animateFromSequence>` does and fails the\n## same ways, so the two share `target-not-found` and\n## `target-state-variable-not-found` above.\n\ncopy-unrecognized-component-type = Cannot extend or copy an unrecognized component type: { $type }.\n\ncopy-prop-not-found = Could not find prop { $property } on a component of type { $component }\n\ncollect-no-source = No source found for collect.\n\ncollect-invalid-component-type = Cannot collect components of type `<{ $component }>` as it is an invalid component type.\n\n# $reference is the reference exactly as the author wrote it, `$` and all —\n# the `$p.styleDescription[1]` of `<text extend="$p.styleDescription[1]" />`.\n# An index only means something applied to an array, and the thing named here\n# is not one. The reference is quoted back rather than explained because the\n# text in front of the author is the only part of this they can act on: the\n# state variable and component index the core knows about are its own business\n# and go to the console instead.\nreference-index-unavailable = Cannot reference index `{ $reference }`\n\n## `<callAction>`\n\n# $action is the `actionName` the author asked for, part of the DoenetML\n# language, so it stays in English. $reference is the `target` as written.\ncomponent-action-unavailable = Cannot call { $action } on component `{ $reference }`\n\n## `<dataFrame>`\n\n# $componentIdx is an internal index, passed as a string so it is not grouped\n# like a quantity; the odd spacing before the colon is reproduced from the\n# original message.\ndata-frame-inconsistent-row-lengths = Data has invalid shape. Rows has inconsistent lengths. Found in componentIdx :{ $componentIdx }\n\ndata-frame-duplicate-column-names = Data has duplicate column names. Found in componentIdx :{ $componentIdx }\n\ndata-frame-missing-column-name = Data is missing a column name. Found in componentIdx :{ $componentIdx }\n\n## `<answer>` and scoring\n\nanswer-award-depends-on-own-response = An award for this answer is based on the answer tag\'s own submitted response, which will lead to unexpected behavior.\n\n# Translators: maxNumAttempts and sectionWideCheckWork are attribute names.\nanswer-max-num-attempts-in-section-wide-check-work = Setting `maxNumAttempts` on an `<answer>` inside a container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the container. Set `maxNumAttempts` on the container instead.\n\nnested-section-wide-check-work-max-num-attempts = Setting `maxNumAttempts` on a container with `sectionWideCheckWork` that is inside another container with `sectionWideCheckWork` has no effect, as the number of attempts is controlled by the outer container. Set `maxNumAttempts` on the outer container instead.\n\n# $attributes is a list of attribute names; $attributesCount is its length.\nanswer-attributes-need-symbolic-equality =\n { $attributesCount ->\n [one] The { $attributes } attribute will have no effect without symbolicEquality set.\n *[other] The { $attributes } attributes will have no effect without symbolicEquality set.\n }\n\nanswer-invalid-type = Invalid type for answer: { $type }\n\n## `<module>`, `<conditionalContent>`, `<slider>`, `<pretzel>`\n\nmodule-attribute-child-needs-name = Since the component `<{ $component }>` does not have a name, it cannot be used for a module attribute\n\nmodule-attribute-name-already-defined = The component `<{ $component } name="{ $name }">` cannot be used as an attribute for a module because the `<module>` component type already has a "{ $name }" attribute defined.\n\nconditional-content-condition-ignored = Attribute `condition` is ignored on a `<conditionalContent>` component with case or else children.\n\nslider-markers-type-mismatch = Markers type doesn\'t match slider type.\n\npretzel-problem-needs-statement-and-answer = Invalid pretzel: each `<problem>` must contain one `<statement>` and one `<answer>`.\n\npretzel-circuit-first-problem-distractor = Invalid pretzel: in mode="circuit", the first `<problem>` cannot be a distractor.\n\n## Attribute values\n\n# $values is a list of the values that were rejected, each already in\n# backticks; $valuesCount is how many there were.\nattribute-invalid-values =\n { $valuesCount ->\n [one] Invalid value { $values } for attribute `{ $attribute }`; ignoring.\n *[other] Invalid values { $values } for attribute `{ $attribute }`; ignoring.\n }\n\nattribute-must-be-references = Invalid value `{ $value }` for attribute `{ $attribute }`. Attribute must be composed of references that begin with a `$`.\n\n# $names is a list of the rejected names, each already in single quotes.\nmath-input-invalid-function-names = <mathInput>: ignored invalid function name(s) in { $attribute }: { $names }. Each name\'s display segment must be at least 2 characters (letters or dashes); an optional `|<mathspeak alternative>` suffix may follow.\n\n## Building components from the source\n\n# Raised while the source is being turned into components, by throwing rather\n# than by building a record: the thrower is caught, the component becomes an\n# `_error`, and the diagnostic is re-raised from it.\n\ncomponent-type-invalid = Invalid component type: `<{ $componentType }>`\n\nattribute-repeated = Cannot repeat attribute { $attribute }.\n\nattribute-invalid-for-component = Invalid attribute "{ $attribute }" for a component of type `<{ $componentType }>`.\n\n## Style definition contrast\n\n# $context names the pair being compared, $mode which colour scheme it was\n# rendered in. Both are symbolic — the phrase is chosen here so a translator\n# can rewrite it, rather than being handed over already in English.\nstyle-definition-insufficient-contrast =\n Style definition { $styleNumber } has insufficient contrast for { $context ->\n [text-on-background] text color against background color\n [high-contrast] high-contrast color against the canvas\n [line] line color against the canvas\n [marker] marker color against the canvas\n *[text-on-canvas] text color against the canvas\n }{ $mode ->\n [dark] { " (dark mode)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1).\n\n# $suggestion says whether a concrete replacement colour could be computed.\n# The attribute names and colour values in the `available` branch are\n# DoenetML source, not prose, and stay as they are in every language.\nstyle-definition-dark-mode-text-background-contrast =\n Although style definition { $styleNumber } has specified colors that provide sufficient contrast for light mode, the dark-mode colors derived from these values have insufficient contrast for the text color against the background color ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set { $lightAttribute }="{ $lightColor }") or override the dark-mode color (e.g., set { $darkAttribute }="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived colors with textColorDarkMode and/or backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Although style definition { $styleNumber } has a specified text color that provides sufficient contrast for light mode, the dark-mode text color derived from this value has insufficient contrast against the canvas ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; requires at least { $threshold }:1). { $suggestion ->\n [available] To ensure sufficient contrast in dark mode, either increase the light-mode contrast (e.g., set textColor="{ $lightColor }") or override the dark-mode color (e.g., set textColorDarkMode="{ $darkColor }").\n *[none] To ensure sufficient contrast in dark mode, increase the light-mode contrast or override the derived color with textColorDarkMode.\n }\n\nsection-multiple-style-palettes = A section can select only one <stylePalette>; using the last one.\n\n## Unique variants\n\n# Explanations of why a component\'s unique variants could not be worked out.\n# $component is the tag that could not be analyzed and stays as written; the\n# reason is a separate message per situation, so a host can tell them apart by\n# code and a translator sees a whole sentence rather than a fragment.\n\nvariant-num-to-select-not-non-negative-integer = cannot determine unique variants of { $component } as numToSelect isn\'t a non-negative integer.\n\nvariant-num-to-select-not-constant-number = cannot determine unique variants of { $component } as numToSelect isn\'t constant number.\n\nvariant-with-replacement-not-constant-boolean = cannot determine unique variants of { $component } as withReplacement isn\'t constant boolean.\n\nvariant-select-weight-disables-unique = Unique variants for select disabled if have an option with selectWeight or selectForVariants specified\n\nvariant-coprime-undetermined = cannot determine unique variants of { $component } as cannot determine coprime is always false.\n\n# $attribute is an attribute name (`from`, `to`, `step`, `sort`, `length`) and\n# stays as written.\nvariant-attribute-not-constant = cannot determine unique variants of { $component } as { $attribute } isn\'t a constant.\n\nvariant-attribute-not-number = cannot determine unique variants of { $component } as { $attribute } isn\'t a number.\n\n# $type is the sequence type the component was declared with. $expected names\n# what the value had to be, symbolically, because which one applies depends on\n# both the type and the attribute.\nvariant-attribute-wrong-type-for-sequence =\n cannot determine unique variants of { $component } of { $type } type as { $attribute } isn\'t { $expected ->\n [letters-combination] a combination of letters\n [math-expression] a valid math expression\n [integer] an integer\n *[number] a number\n }.\n\nvariant-length-not-integer = cannot determine unique variants of { $component } as length isn\'t an integer.\n\nvariant-sort-not-implemented = have not implemented unique variants of a { $component } with sort\n\nvariant-exclude-combinations-not-implemented = have not implemented unique variants of a { $component } with excludeCombinations\n\nvariant-math-exclude-not-implemented = have not implemented unique variants of a { $component } of type math with exclude\n\nvariant-non-constant-exclude-not-implemented = have not implemented unique variants of a { $component } with non-constant exclude\n\n## PreFigure conversion\n\n# $subject identifies the component the warning is about, already written as\n# `<tag>` or `<tag> (name)`. It is composed in code rather than here because\n# Fluent terms cannot take a variable as an argument, so a shared subject\n# fragment cannot be parameterized from the catalog. It holds only a tag name,\n# a component name and punctuation — never a word — which is why a descendant\n# with no type reads `<?>` rather than `<unknown>`.\n\nprefigure-descendant-unsupported = { $subject }: unsupported in graph prefigure renderer; descendant skipped.\n\nprefigure-descendant-invalid-geometry = { $subject }: non-finite or incomplete geometry; descendant skipped.\n\nprefigure-curve-label-omitted = { $subject }: labels are not supported on converted curve elements; label omitted.\n\nprefigure-curve-unsupported-definition-type = { $subject }: unsupported curve function definition type \'{ $definitionType }\'; descendant skipped.\n\nprefigure-region-flip-functions-unsupported = { $subject }: unsupported flipFunctions attribute on regionBetweenCurves; descendant skipped.\n\nprefigure-region-non-formula-child = { $subject }: only formula-typed child functions are supported on regionBetweenCurves; descendant skipped.\n\n# $labelKind says which family of object carried the label, since the advice\n# is the same but the object is not.\nprefigure-label-position-unsupported =\n { $subject }: unsupported labelPosition \'{ $labelPosition }\' for { $labelKind ->\n [line-family] line-family label\n *[point] point label\n }; default PreFigure alignment used.\n\nprefigure-fill-style-unsupported = { $subject }: fill style \'{ $fillStyle }\' is unsupported by PreFigure; falling back to a solid fill.\n\nprefigure-line-style-unknown = { $subject }: unknown line style \'{ $lineStyle }\' omitted from PreFigure output.\n\nprefigure-marker-style-mapped-to-diamond = { $subject }: marker style \'{ $markerStyle }\' mapped to PreFigure style \'diamond\'.\n\nprefigure-marker-style-unsupported = { $subject }: marker style \'{ $markerStyle }\' is unsupported by PreFigure; default style used.\n\n## PreFigure annotations\n\nannotation-ref-unresolvable = `<annotation>`: invalid `ref`; cannot resolve target. Annotation omitted.\n\nannotation-ref-multiple-targets = `<annotation>`: `ref` resolved to multiple targets; using the first target.\n\nannotation-ref-outside-graph = `<annotation>`: invalid `ref`; target is outside the containing graph. Annotation omitted.\n\nannotation-ref-unsupported-target = `<annotation>`: invalid `ref`; target is not a supported graphical object in prefigure conversion. Annotation omitted.\n\nannotation-text-missing = `<annotation>`: missing or empty `text`; emitting empty text.\n\n## Composites and references\n\n# $componentType is the type the composite was asked to create, when it is\n# known; `none` when the composite did not say.\ncomposite-circular-dependency =\n { $componentType ->\n [none] Circular dependency detected.\n *[other] Circular dependency detected involving `<{ $componentType }>` component.\n }\n\n# $reference is the reference as the author wrote it, already carrying its `$`.\nreference-no-referent = No referent found for reference: `{ $reference }`\n\nreference-multiple-referents = Multiple referents found for reference: `{ $reference }`\n\n## Children that do not match\n\nchildren-invalid-attribute-format = Invalid format for attribute { $attribute } of `<{ $componentType }>`.\n\n# $children is the list of child types that did not match, already joined.\nchildren-invalid = Invalid children for `<{ $componentType }>`: Found invalid children: { $children }\n\n## Falling back to a default\n\nattribute-value-invalid-using-default = Invalid value `{ $value }` for attribute `{ $attribute }`, using value `{ $default }`\n\n## Loading a DoenetML version\n\n# $fallback is the version that will be used instead, or `none` when the\n# embedding page named a standalone bundle of its own.\ndoenetml-version-not-found =\n { $fallback ->\n [none] DoenetML version { $version } not found.\n *[other] DoenetML version { $version } not found. Falling back to version { $fallback }\n }\n';
39406
38405
  const editor = "# Editor and language-server surfaces: formatter labels, completion detail\n# text, hover help. Selected by `uiLocale`.\n#\n# Intentionally empty in i18n Phase 0 (#1515). A later phase moves the editor\n# strings into this file; note that the LSP ships bundled with its DoenetML\n# version, so these catalogs are version-correct rather than always-latest.\n#\n# Message ids are lower-kebab-case Fluent identifiers, optionally with a\n# single `.attribute` suffix (`format-document`).\n";
39407
38406
  const CATALOG_NAMESPACES = [
39408
38407
  "chrome",
@@ -39762,7 +38761,7 @@ function normalizeLocaleTag(tag2) {
39762
38761
  }
39763
38762
  const esChrome = "# Spanish viewer chrome. Translated from `locales/en/chrome.ftl`, which is the\n# source of truth: `lint:i18n` rejects a key that does not exist there, and\n# reports a key that exists there but not here as missing coverage.\n#\n# Message ids are never translated — only the text to the right of `=`.\n#\n# Register: impersonal throughout — infinitives and bare nouns, never a `tú`\n# or `usted` verb form. The viewer does not know how formally a deployment\n# addresses its readers, and an impersonal label is correct for both.\n\n\n## Answer submission\n\nanswer-checking = Comprobando...\nanswer-submitting = Enviando...\n\nanswer-checking-status = Comprobando la respuesta\nanswer-submitting-status = Enviando la respuesta\n\nanswer-correct = Correcto\nanswer-incorrect = Incorrecto\n\nanswer-response-saved = Respuesta guardada\n\n# Spanish typographic convention puts a space before the percent sign.\nanswer-percent-credit = { $percent } % de crédito\nanswer-percent-correct = { $percent } % correcto\nanswer-percent-short = { $percent } %\n\nmax-credit-available = Crédito máximo disponible: { $percent } %\n\nattempts-remaining =\n { $count ->\n [0] no quedan intentos\n [one] queda { $count } intento\n *[other] quedan { $count } intentos\n }\n\nvalidation-correct = (Correcto)\nvalidation-incorrect = (Incorrecto)\nvalidation-partially-correct = (Parcialmente correcto)\n\n# `Mostrar` is the infinitive, per the register note above.\nanswer-show-responses =\n { $count ->\n [one] Mostrar { $count } respuesta a { $answerId }\n *[other] Mostrar { $count } respuestas a { $answerId }\n }\n\n\n## Disclosure panels\n\nfeedback-heading = Comentarios\n\ncollapsible-click-to-open = (clic para abrir)\ncollapsible-click-to-close = (clic para cerrar)\ncollapsible-initializing = Inicializando...\n\nfootnote-show = Mostrar la nota al pie\nfootnote-hide = Ocultar la nota al pie\n\ndescription-more-information = más información\n\n\n## Controls\n\nslider-previous = Anterior\nslider-next = Siguiente\n\nkeyboard-open = Abrir el teclado\nkeyboard-close = Cerrar el teclado\n\nmatrix-remove-row = Eliminar fila\nmatrix-add-row = Añadir fila\nmatrix-remove-column = Eliminar columna\nmatrix-add-column = Añadir columna\n\nsubset-add-remove-points = Añadir/Eliminar puntos\nsubset-toggle-points-intervals = Alternar puntos e intervalos\nsubset-move-points = Mover puntos\nsubset-clear = Borrar\n\norbital-add-row = Añadir fila\norbital-remove-row = Eliminar fila\norbital-add-box = Añadir casilla\norbital-remove-box = Eliminar casilla\norbital-add-up-arrow = Añadir flecha hacia arriba\norbital-add-down-arrow = Añadir flecha hacia abajo\norbital-remove-arrow = Eliminar flecha\n\norbital-row-label = Etiqueta de la fila { $row }\n\npretzel-answer = Respuesta\n\nsummary-statistics-caption = Resumen estadístico de { $column }\n\n\n## Math input\n\nmath-input-preview-region = vista previa de la expresión matemática\nmath-input-preview = Vista previa\nmath-input-invalid-expression = Expresión no válida:\n\n\n## Document status\n\nviewer-initializing = Inicializando...\n\n\n## Errors\n\nerror-heading = Error\n\ndocument-contains-errors = ¡Este documento contiene errores!\n\nsomething-went-wrong = Algo salió mal.\n\n# Follows `error-heading` and a colon, so it begins in lower case, as in\n# English. The instruction is an infinitive, per the register note above.\nrenderer-load-failed = no se pudo cargar un componente. Recargar la página.\n\ncore-start-failed = No se pudo iniciar el visor del documento. Recargar la página.\n";
39764
38763
  const esContent = "# Spanish content catalog: the prose the core computes into the document.\n# Selected by `documentLocale` — the language the activity was written in.\n#\n# Spanish inflects. Adjectives follow their noun and agree with it in gender,\n# so every adjective below selects on `$gender`, the gender of the noun it\n# describes, and the composition messages put the noun first. Neither is\n# expressible by substituting into the English word order, which is why the\n# catalog controls the order and not the code.\n\n\n## Vocabulario de estilos\n\ncolor =\n .black =\n { $gender ->\n [f] negra\n *[m] negro\n }\n .white =\n { $gender ->\n [f] blanca\n *[m] blanco\n }\n .gray = gris\n .red =\n { $gender ->\n [f] roja\n *[m] rojo\n }\n .orange = naranja\n .yellow =\n { $gender ->\n [f] amarilla\n *[m] amarillo\n }\n .green = verde\n .cyan = cian\n .blue = azul\n .purple =\n { $gender ->\n [f] morada\n *[m] morado\n }\n .pink = rosa\n .brown = marrón\n\nline-width =\n .thick =\n { $gender ->\n [f] gruesa\n *[m] grueso\n }\n .thin =\n { $gender ->\n [f] delgada\n *[m] delgado\n }\n\nline-style =\n .dashed =\n { $gender ->\n [f] discontinua\n *[m] discontinuo\n }\n .dotted =\n { $gender ->\n [f] punteada\n *[m] punteado\n }\n\n# Sintagmas nominales: van detrás de «con» y no concuerdan con nada.\nfill-style =\n .horizontal = líneas horizontales\n .vertical = líneas verticales\n .diagonal = líneas diagonales\n .backdiagonal = líneas diagonales inversas\n .dots = puntos\n .diamonds = rombos\n\nnoun =\n .line = línea\n .line-segment = segmento\n .ray = semirrecta\n .vector = vector\n .curve = curva\n .function = función\n .parabola = parábola\n .polyline = polilínea\n .polygon = polígono\n .triangle = triángulo\n .rectangle = rectángulo\n .circle = círculo\n .region = región\n .point = punto\n .square = cuadrado\n .diamond = rombo\n .cross = cruz\n .plus = signo más\n\n# El nombre se parte: «polígono regular» lleva los adjetivos y «de 5 lados»\n# cierra el sintagma detrás de ellos. Si el complemento fuera delante, los\n# adjetivos quedarían separados del nombre con el que concuerdan («polígono\n# regular de 5 lados grueso rojo»).\nnoun-regular-polygon =\n { $part ->\n [tail] de { $numSides } lados\n *[head] polígono regular\n }\n\n# Además de los nombres de arriba, `$noun` puede ser «regular-polygon» (el\n# nombre que compone `noun-regular-polygon`) o el núcleo de un sintagma que no\n# se nombra en la descripción: «border», «fill», «text» y «background». Todos\n# ellos son masculinos en español —polígono, borde, relleno, texto, fondo—, así\n# que caen en el caso por defecto.\nnoun-gender =\n { $noun ->\n [line] f\n [ray] f\n [curve] f\n [function] f\n [parabola] f\n [polyline] f\n [region] f\n [cross] f\n *[other] m\n }\n\n\n## Composición de estilos\n\nstyle-stroke =\n { $parts ->\n [width-style-color] { $lineStyle } { $width } { $color }\n [width-color] { $width } { $color }\n [style-color] { $lineStyle } { $color }\n [width-style] { $lineStyle } { $width }\n [width] { $width }\n [style] { $lineStyle }\n *[color] { $color }\n }\n\n# El nombre va delante y los adjetivos detrás: «línea discontinua gruesa roja».\n# El complemento del nombre, si lo hay, cierra el sintagma: «polígono regular\n# grueso rojo de 5 lados».\nstyle-with-noun =\n { $parts ->\n [noun-tail] { $noun } { $description } { $nounTail }\n *[noun] { $noun } { $description }\n }\n\nstyle-filled-word =\n { $gender ->\n [f] rellena\n *[m] relleno\n }\n\nstyle-filled =\n { $parts ->\n [pattern] { $color } { $filled } con { $pattern }\n *[plain] { $color } { $filled }\n }\n\n# Aquí el complemento va pegado al nombre, y no al final como en\n# `style-with-noun`: «relleno de …» se lee como «lleno de …», así que «relleno\n# de 5 lados» diría otra cosa. «Polígono regular de 5 lados azul relleno».\nstyle-filled-with-noun =\n { $parts ->\n [pattern] { $noun } { $color } { $filled } con { $pattern }\n [plain-tail] { $noun } { $nounTail } { $color } { $filled }\n [pattern-tail] { $noun } { $nounTail } { $color } { $filled } con { $pattern }\n *[plain] { $noun } { $color } { $filled }\n }\n\n# «borde» es masculino, así que los adjetivos del borde concuerdan con él y no\n# con la figura que rodea.\nstyle-border-clause =\n { $parts ->\n [with-article] con un borde { $border }\n [and] y borde { $border }\n [and-article] y un borde { $border }\n *[with] con borde { $border }\n }\n\n# «de color» evita tener que concordar el color con un patrón en plural.\nstyle-fill =\n { $parts ->\n [pattern] { $pattern } de color { $color }\n *[plain] { $color }\n }\n\nstyle-unfilled = sin relleno\n\nstyle-text =\n { $parts ->\n [background] { $color } con un fondo { $background }\n *[plain] { $color }\n }\n\nstyle-background-none = ninguno\n";
39765
- const esDiagnostics = '# Advertencias y errores mostrados a quien lee o escribe el documento.\n# Seleccionados por `uiLocale`.\n#\n# Los nombres de atributos y componentes de DoenetML (`through`, `endpoint`,\n# `numDimensions`, …) forman parte del lenguaje y se dejan en inglés.\n\n## `<lineSegment>`\n\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican los dos extremos\n *[other] { $attributes } se ignoran cuando se especifican los dos extremos\n }\n\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican un extremo y el punto medio\n *[other] { $attributes } se ignoran cuando se especifican un extremo y el punto medio\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset no tiene efecto sin un punto medio\n\n## `<line>`\n\n# «Recta», no «línea», aunque `noun.line` en content.ftl diga «línea»: no es\n# una incoherencia, sino la diferencia entre describir el trazo dibujado («una\n# línea azul gruesa») y hablar del objeto geométrico, que en matemáticas es\n# una recta —de ahí «la ecuación de la recta».\n\nline-points-undetermined-dimensions = La recta pasa por puntos de dimensiones indeterminadas.\n\nline-points-too-few-dimensions = La recta debe pasar por puntos de al menos dos dimensiones.\n\nline-points-depend-on-variables = La recta pasa por puntos que dependen de las variables: { $variables }.\n\n# Enumeradas con coma en vez de «y»: las variables de <line> son `x` e `y` por\n# omisión, y «en las variables x y y» sería a la vez incorrecto (ante el sonido\n# /i/ la conjunción es «e») e ilegible. La coma es correcta sea cual sea el\n# nombre de la variable, que aquí no se conoce de antemano.\nline-equation-invalid-format = Formato no válido para la ecuación de la recta en las variables { $variable1 }, { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = La semirrecta está determinada por through, endpoint y direction. Se ignora el through especificado.\n\nray-dimension-mismatch = Discrepancia de numDimensions en la semirrecta.\n\n## `<vector>`\n\nvector-overprescribed-head = El vector está determinado por head, tail y displacement. Se ignora el head especificado.\n\nvector-dimension-mismatch = Discrepancia de numDimensions en el vector.\n\n## Atraer y restringir\n\nattract-to-without-nearest-point = No se puede atraer a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-without-nearest-point = No se puede restringir a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-interior-without-nearest-point = No se puede restringir al interior de un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\n## `<choiceInput>`\n\nchoice-input-label-position-ignored = labelPosition se ignora en un choiceInput que no es inline\n\n## Ordenar hijos por índice\n\nchoice-input-indices-count-mismatch = Se ignoran los índices especificados para choiceInput porque su cantidad no coincide con la cantidad de hijos choice.\n\npretzel-indices-count-mismatch = Se ignoran los índices especificados para problem porque su cantidad no coincide con la cantidad de hijos problem.\n\nshuffle-indices-count-mismatch = Se ignoran los índices especificados para shuffle porque su cantidad no coincide con la cantidad de componentes.\n\nindices-ignored-out-of-range = Se ignoran los índices especificados para { $component } porque algunos están fuera de rango.\n\npretzel-indices-repeated = Se ignoran los índices especificados para pretzel porque algunos están repetidos.\n\npretzel-circuit-first-index = Se ignoran los índices especificados para pretzel en modo circuit porque el primer índice debe ser 1.\n\n## `<shuffle>` y `<sort>`\n\nstring-children-need-type = Para que `<{ $component }>` funcione con hijos de texto, se debe especificar el atributo `type`.\n\ninvalid-type-defaulting-to-math = Tipo no válido { $type } para el componente { $component }. Debe ser math, text, number o boolean. Se usa math.\n\nstring-not-valid-component-to-arrange = La cadena "{ $value }" no es un componente válido para { $component }. Se ignora.\n\n## Tipos y variables\n\ninvalid-type-defaulting-to-number = Tipo no válido { $type }, se establece el tipo en number.\n\ninvalid-variable-value = Valor no válido de una variable: `{ $value }`\n\n## Variantes\n\nvariant-index-must-be-number = El índice de variante { $index } debe ser un número\n\nvariant-index-must-be-integer = El índice de variante { $index } debe ser un número entero\n\n## `<sideBySide>`\n\nside-by-side-absolute-widths = `<{ $component }>` no está implementado para medidas absolutas. Los anchos se establecen como relativos.\n\nside-by-side-absolute-margins = `<{ $component }>` no está implementado para medidas absolutas. Los márgenes se establecen como relativos.\n\nside-by-side-no-block-child = `<{ $component }>` no es válido: debe tener al menos un hijo de bloque.\n\n## `<label>`\n\nlabel-for-ignored-on-graphical = Se ignora el atributo `for` en un `<label>` gráfico.\n\nlabel-for-must-resolve-to-one = El atributo `for` de `<label>` debe corresponder exactamente a un componente.\n\nlabel-for-unresolved = No se pudo resolver el atributo `for` de `<label>` a un componente.\n\nlabel-for-answer-with-authored-inputs = El atributo `for` de `<label>` hace referencia a un `<answer>` con entradas escritas explícitamente; haz referencia a la entrada directamente.\n\nlabel-for-answer-without-input = El atributo `for` de `<label>` hace referencia a un `<answer>` que no tiene ninguna entrada que etiquetar.\n\nlabel-for-must-reference-input-or-answer = El atributo `for` de `<label>` debe hacer referencia a una entrada o a un `<answer>`.\n\n## Accesibilidad\n\naccessibility-short-description-or-decorative = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o estar marcado como decorativo.\n\naccessibility-video-short-description = Por accesibilidad, `<video>` debe tener una descripción breve.\n\naccessibility-input-short-description-or-label = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o una etiqueta.\n\naccessibility-answer-input-short-description-or-label = Por accesibilidad, la entrada creada por un `<answer>` debe tener una descripción breve o una etiqueta.\n\naccessibility-short-description-contains-math = Las descripciones breves no deben contener componentes matemáticos como `<{ $component }>`. Expresa las matemáticas con palabras.\n\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección (modo oscuro) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n *[other] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n }\n\n## `<circle>`\n\ncircle-through-points-non-numerical = No está implementado un `<circle>` que pase por { $count } puntos cuando los puntos no tienen valores numéricos.\n\ncircle-too-many-through-points = No se puede calcular una circunferencia que pase por más de 3 puntos.\n\ncircle-overprescribed-radius-center-points = No se puede calcular una circunferencia con radio, centro y puntos de paso especificados a la vez.\n\ncircle-center-with-multiple-points = No se puede calcular una circunferencia con centro especificado que pase por más de 1 punto.\n\ncircle-radius-too-small = No se puede calcular la circunferencia: dado que la distancia entre los dos puntos es { $distance }, el radio especificado { $radius } es demasiado pequeño.\n\ncircle-radius-with-many-points = No se puede crear una circunferencia que pase por más de dos puntos con un radio especificado.\n\ncircle-invalid-center-or-through-points = El centro o los puntos de paso de la circunferencia no son válidos.\n\ncircle-radius-center-with-multiple-points = No se puede calcular el radio de una circunferencia con centro especificado que pase por más de 1 punto.\n\ncircle-change-radius-non-numerical = No se puede cambiar el radio de una circunferencia con puntos de paso no numéricos\n\ncircle-radius-with-points-non-numerical = No se puede crear una circunferencia que pase por más de un punto con un radio especificado cuando no hay valores numéricos.\n\ncircle-change-center-non-numerical = No está implementado cambiar el centro de una circunferencia que pasa por puntos con valores no numéricos.\n\n## `<function>`\n\nfunction-domain-insufficient-dimensions =\n { $intervals ->\n [one] Dimensiones insuficientes para el dominio de la función. El dominio tiene { $intervals } intervalo pero la función tiene { $inputs ->\n [one] { $inputs } entrada\n *[other] { $inputs } entradas\n }.\n *[other] Dimensiones insuficientes para el dominio de la función. El dominio tiene { $intervals } intervalos pero la función tiene { $inputs ->\n [one] { $inputs } entrada\n *[other] { $inputs } entradas\n }.\n }\n\nfunction-domain-invalid-format = Formato no válido para el dominio de la función.\n\nfunction-ignoring-non-numerical =\n { $type ->\n [maximum] Se ignora el máximo no numérico de la función.\n [minimum] Se ignora el mínimo no numérico de la función.\n [extremum] Se ignora el extremo no numérico de la función.\n [point] Se ignora el punto no numérico de la función.\n [slope] Se ignora la pendiente no numérica de la función.\n *[other] Se ignora { $type } no numérico de la función.\n }\n\nfunction-ignoring-empty =\n { $type ->\n [maximum] Se ignora el máximo vacío de la función.\n [minimum] Se ignora el mínimo vacío de la función.\n [extremum] Se ignora el extremo vacío de la función.\n [point] Se ignora el punto vacío de la función.\n *[other] Se ignora { $type } vacío de la función.\n }\n\nfunction-points-too-close = La función contiene dos puntos demasiado próximos entre sí. No se puede definir la función.\n\nfunction-iterates-input-output-mismatch =\n { $inputs ->\n [one] Las iteraciones de una función solo son posibles si el número de entradas es igual al número de salidas. Esta función tiene { $inputs } entrada y { $outputs ->\n [one] { $outputs } salida\n *[other] { $outputs } salidas\n }.\n *[other] Las iteraciones de una función solo son posibles si el número de entradas es igual al número de salidas. Esta función tiene { $inputs } entradas y { $outputs ->\n [one] { $outputs } salida\n *[other] { $outputs } salidas\n }.\n }\n\n## `<sequence>`\n\nsequence-invalid-length = Longitud de la secuencia no válida. Debe ser un entero no negativo.\n\nsequence-invalid-step = Paso de la secuencia no válido. Debe ser un número para una secuencia de tipo { $type }.\n\nsequence-invalid-endpoint-number = El valor de "{ $attribute }" de la secuencia numérica no es válido. Debe ser un número.\n\nsequence-invalid-endpoint-letters = El valor de "{ $attribute }" de la secuencia de letras no es válido. Debe ser una combinación de letras.\n\nsequence-invalid-endpoint = El valor de "{ $attribute }" de la secuencia no es válido.\n\nselect-from-sequence-coprime-not-numbers = Se ignora coprime porque no se están seleccionando números\n\nselect-from-sequence-coprime-with-exclude-combinations = Se ignora coprime porque se especificó excludeCombinations\n\n## Resolución de `target`\n\ntarget-not-found = Destino no válido para `<{ $source }>`: no se encuentra el destino.\n\ntarget-state-variable-not-found = Destino no válido para `<{ $source }>`: no se encuentra una variable de estado llamada "{ $property }" en un `<{ $component }>`.\n\n## `<odeSystem>`\n\node-system-variables-match-independent = Las variables de `<odeSystem>` deben ser distintas de la variable independiente.\n\node-system-duplicate-variable-names = No se pueden definir las funciones del lado derecho de la EDO con nombres de variables dependientes repetidos.\n\node-system-rhs-function-error = No se puede definir la función del lado derecho de la EDO. Error al crear la función de mathjs.\n\n## `<angle>`, `<parabola>` e `<intersection>`\n\nangle-too-many-lines = No se puede definir un ángulo entre { $count } rectas\n\nangle-invalid-through-point = Punto no válido en through de `<angle>`\n\nparabola-vertex-too-many-points = No está implementada una parábola con vértice que pase por más de 1 punto.\n\nparabola-too-many-points = No está implementada una parábola que pase por más de 3 puntos.\n\nintersection-too-many-items = No está implementada la intersección de más de dos objetos\n\n## Otros componentes matemáticos\n\nionic-compound-not-two-ions = No está implementado el compuesto iónico para algo distinto de dos iones.\n\nionic-compound-needs-cation-and-anion = El compuesto iónico solo está implementado para un catión y un anión.\n\nsolve-equations-cannot-evaluate = No se puede resolver la ecuación porque no se pudo evaluar: { $equation }\n\nmath-operators-operand-number-required = Se debe especificar operandNumber al extraer un operando matemático.\n\neigen-decomposition-failed = No se pudieron calcular los valores propios de la matriz\n\n## Renderizador PreFigure\n\nprefigure-x-label-position-unsupported = `<graph>`: xLabelPosition="left" no es compatible con el renderizador prefigure; se usa el comportamiento de posición derecha.\n\nprefigure-y-label-position-unsupported = `<graph>`: yLabelPosition="bottom" no es compatible con el renderizador prefigure; se usa el comportamiento de posición superior.\n\nprefigure-invalid-axis-bounds = `<graph>`: los límites de los ejes no son válidos para la conversión a prefigure; se usa el bbox predeterminado (-10,-10,10,10).\n\nprefigure-invalid-width = `<graph>`: el ancho no es válido para la conversión a prefigure; se usa el ancho de diagrama predeterminado 425.\n\nprefigure-invalid-aspect-ratio = `<graph>`: aspectRatio no es válido para la conversión a prefigure; se usa la relación de aspecto predeterminada 1.\n\nprefigure-annotations-not-rendered = `<graph>`: las anotaciones no se representan si no se usa el renderizador PreFigure.\n\nmultiple-annotations-children = Se encontraron varios hijos `<annotations>` en `<graph>`; se ignoran todos menos el último.\n\n## Referencias a otros componentes\n\ncopy-unrecognized-component-type = No se puede extender ni copiar un tipo de componente desconocido: { $type }.\n\ncopy-prop-not-found = No se encontró la propiedad { $property } en un componente de tipo { $component }\n\ncollect-no-source = No se encontró ninguna fuente para collect.\n\ncollect-invalid-component-type = No se pueden recolectar componentes de tipo `<{ $component }>` porque no es un tipo de componente válido.\n\n## `<dataFrame>`\n\ndata-frame-inconsistent-row-lengths = Los datos tienen una forma no válida. Las filas tienen longitudes distintas. Encontrado en componentIdx :{ $componentIdx }\n\ndata-frame-duplicate-column-names = Los datos tienen nombres de columna repetidos. Encontrado en componentIdx :{ $componentIdx }\n\ndata-frame-missing-column-name = A los datos les falta el nombre de una columna. Encontrado en componentIdx :{ $componentIdx }\n\n## `<answer>` y puntuación\n\nanswer-award-depends-on-own-response = Un award de esta respuesta depende de la respuesta enviada por el propio answer, lo que provocará un comportamiento inesperado.\n\nanswer-max-num-attempts-in-section-wide-check-work = Establecer `maxNumAttempts` en un `<answer>` dentro de un contenedor con `sectionWideCheckWork` no tiene efecto, porque el número de intentos lo controla el contenedor. Establece `maxNumAttempts` en el contenedor.\n\nnested-section-wide-check-work-max-num-attempts = Establecer `maxNumAttempts` en un contenedor con `sectionWideCheckWork` que está dentro de otro contenedor con `sectionWideCheckWork` no tiene efecto, porque el número de intentos lo controla el contenedor exterior. Establece `maxNumAttempts` en el contenedor exterior.\n\nanswer-attributes-need-symbolic-equality =\n { $attributesCount ->\n [one] El atributo { $attributes } no tendrá efecto si no se establece symbolicEquality.\n *[other] Los atributos { $attributes } no tendrán efecto si no se establece symbolicEquality.\n }\n\nanswer-invalid-type = Tipo no válido para answer: { $type }\n\n## `<module>`, `<conditionalContent>`, `<slider>` y pretzel\n\nmodule-attribute-child-needs-name = Como el componente `<{ $component }>` no tiene nombre, no se puede usar como atributo de módulo\n\nmodule-attribute-name-already-defined = El componente `<{ $component } name="{ $name }">` no se puede usar como atributo de un módulo porque el tipo de componente `<module>` ya tiene definido un atributo "{ $name }".\n\nconditional-content-condition-ignored = Se ignora el atributo `condition` en un `<conditionalContent>` que tiene hijos case o else.\n\nslider-markers-type-mismatch = El tipo de los marcadores no coincide con el tipo del slider.\n\npretzel-problem-needs-statement-and-answer = Pretzel no válido: cada `<problem>` debe contener un `<statement>` y un `<answer>`.\n\npretzel-circuit-first-problem-distractor = Pretzel no válido: en mode="circuit", el primer `<problem>` no puede ser un distractor.\n\n## Valores de atributos\n\nattribute-invalid-values =\n { $valuesCount ->\n [one] Valor no válido { $values } para el atributo `{ $attribute }`; se ignora.\n *[other] Valores no válidos { $values } para el atributo `{ $attribute }`; se ignoran.\n }\n\nattribute-must-be-references = Valor no válido `{ $value }` para el atributo `{ $attribute }`. El atributo debe estar compuesto de referencias que empiecen por `$`.\n\nmath-input-invalid-function-names = <mathInput>: se ignoran nombres de función no válidos en { $attribute }: { $names }. El segmento visible de cada nombre debe tener al menos 2 caracteres (letras o guiones); puede añadirse un sufijo opcional `|<alternativa de mathspeak>`.\n\n## Construcción de componentes a partir del código fuente\n\ncomponent-type-invalid = Tipo de componente no válido: `<{ $componentType }>`\n\nattribute-repeated = No se puede repetir el atributo { $attribute }.\n\nattribute-invalid-for-component = Atributo "{ $attribute }" no válido para un componente de tipo `<{ $componentType }>`.\n\n## Contraste de las definiciones de estilo\n\nstyle-definition-insufficient-contrast =\n La definición de estilo { $styleNumber } no tiene suficiente contraste para { $context ->\n [text-on-background] el color del texto sobre el color de fondo\n [high-contrast] el color de alto contraste sobre el lienzo\n [line] el color de las líneas sobre el lienzo\n [marker] el color de los marcadores sobre el lienzo\n *[text-on-canvas] el color del texto sobre el lienzo\n }{ $mode ->\n [dark] { " (modo oscuro)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n\nstyle-definition-dark-mode-text-background-contrast =\n Aunque la definición de estilo { $styleNumber } especifica colores con suficiente contraste en modo claro, los colores de modo oscuro derivados de esos valores no tienen suficiente contraste entre el color del texto y el color de fondo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con { $lightAttribute }="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con { $darkAttribute }="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye los colores derivados mediante textColorDarkMode o backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Aunque la definición de estilo { $styleNumber } especifica un color de texto con suficiente contraste en modo claro, el color de texto de modo oscuro derivado de ese valor no tiene suficiente contraste sobre el lienzo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con textColor="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con textColorDarkMode="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye el color derivado mediante textColorDarkMode.\n }\n\nsection-multiple-style-palettes = Una sección solo puede seleccionar un <stylePalette>; se usará el último.\n\n## Variantes únicas\n\nvariant-num-to-select-not-non-negative-integer = no se pueden determinar las variantes únicas de { $component } porque numToSelect no es un entero no negativo.\n\nvariant-num-to-select-not-constant-number = no se pueden determinar las variantes únicas de { $component } porque numToSelect no es un número constante.\n\nvariant-with-replacement-not-constant-boolean = no se pueden determinar las variantes únicas de { $component } porque withReplacement no es un booleano constante.\n\nvariant-select-weight-disables-unique = Las variantes únicas quedan desactivadas en select si alguna opción especifica selectWeight o selectForVariants\n\nvariant-coprime-undetermined = no se pueden determinar las variantes únicas de { $component } porque no se puede determinar si coprime es siempre falso.\n\nvariant-attribute-not-constant = no se pueden determinar las variantes únicas de { $component } porque { $attribute } no es constante.\n\nvariant-attribute-not-number = no se pueden determinar las variantes únicas de { $component } porque { $attribute } no es un número.\n\nvariant-attribute-wrong-type-for-sequence =\n no se pueden determinar las variantes únicas de { $component } de tipo { $type } porque { $attribute } no es { $expected ->\n [letters-combination] una combinación de letras\n [math-expression] una expresión matemática válida\n [integer] un entero\n *[number] un número\n }.\n\nvariant-length-not-integer = no se pueden determinar las variantes únicas de { $component } porque length no es un entero.\n\nvariant-sort-not-implemented = no se han implementado las variantes únicas de un { $component } con sort\n\nvariant-exclude-combinations-not-implemented = no se han implementado las variantes únicas de un { $component } con excludeCombinations\n\nvariant-math-exclude-not-implemented = no se han implementado las variantes únicas de un { $component } de tipo math con exclude\n\nvariant-non-constant-exclude-not-implemented = no se han implementado las variantes únicas de un { $component } con exclude no constante\n\n## Conversión a PreFigure\n\nprefigure-descendant-unsupported = { $subject }: no se admite en el renderizador prefigure de gráficos; se omite el descendiente.\n\nprefigure-descendant-invalid-geometry = { $subject }: geometría no finita o incompleta; se omite el descendiente.\n\nprefigure-curve-label-omitted = { $subject }: las etiquetas no se admiten en los elementos de curva convertidos; se omite la etiqueta.\n\nprefigure-curve-unsupported-definition-type = { $subject }: tipo de definición de función de curva no admitido \'{ $definitionType }\'; se omite el descendiente.\n\nprefigure-region-flip-functions-unsupported = { $subject }: atributo flipFunctions no admitido en regionBetweenCurves; se omite el descendiente.\n\nprefigure-region-non-formula-child = { $subject }: en regionBetweenCurves solo se admiten funciones hijas de tipo fórmula; se omite el descendiente.\n\nprefigure-label-position-unsupported =\n { $subject }: labelPosition \'{ $labelPosition }\' no admitido para { $labelKind ->\n [line-family] una etiqueta de la familia de líneas\n *[point] una etiqueta de punto\n }; se usa la alineación predeterminada de PreFigure.\n\nprefigure-fill-style-unsupported = { $subject }: PreFigure no admite el estilo de relleno \'{ $fillStyle }\'; se usa un relleno sólido.\n\nprefigure-line-style-unknown = { $subject }: estilo de línea desconocido \'{ $lineStyle }\'; se omite de la salida de PreFigure.\n\nprefigure-marker-style-mapped-to-diamond = { $subject }: el estilo de marcador \'{ $markerStyle }\' se asigna al estilo \'diamond\' de PreFigure.\n\nprefigure-marker-style-unsupported = { $subject }: PreFigure no admite el estilo de marcador \'{ $markerStyle }\'; se usa el estilo predeterminado.\n\n## Anotaciones de PreFigure\n\nannotation-ref-unresolvable = `<annotation>`: `ref` no válido; no se puede resolver el destino. Se omite la anotación.\n\nannotation-ref-multiple-targets = `<annotation>`: `ref` se resolvió a varios destinos; se usa el primero.\n\nannotation-ref-outside-graph = `<annotation>`: `ref` no válido; el destino está fuera del gráfico que lo contiene. Se omite la anotación.\n\nannotation-ref-unsupported-target = `<annotation>`: `ref` no válido; el destino no es un objeto gráfico admitido en la conversión a prefigure. Se omite la anotación.\n\nannotation-text-missing = `<annotation>`: falta `text` o está vacío; se emite texto vacío.\n';
38764
+ const esDiagnostics = '# Advertencias y errores mostrados a quien lee o escribe el documento.\n# Seleccionados por `uiLocale`.\n#\n# Los nombres de atributos y componentes de DoenetML (`through`, `endpoint`,\n# `numDimensions`, …) forman parte del lenguaje y se dejan en inglés.\n\n## `<lineSegment>`\n\nline-segment-attributes-ignored-with-endpoints =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican los dos extremos\n *[other] { $attributes } se ignoran cuando se especifican los dos extremos\n }\n\nline-segment-attributes-ignored-with-endpoint-and-midpoint =\n { $attributesCount ->\n [one] { $attributes } se ignora cuando se especifican un extremo y el punto medio\n *[other] { $attributes } se ignoran cuando se especifican un extremo y el punto medio\n }\n\nline-segment-midpoint-offset-without-midpoint = midpointOffset no tiene efecto sin un punto medio\n\n## `<line>`\n\n# «Recta», no «línea», aunque `noun.line` en content.ftl diga «línea»: no es\n# una incoherencia, sino la diferencia entre describir el trazo dibujado («una\n# línea azul gruesa») y hablar del objeto geométrico, que en matemáticas es\n# una recta —de ahí «la ecuación de la recta».\n\nline-points-undetermined-dimensions = La recta pasa por puntos de dimensiones indeterminadas.\n\nline-points-too-few-dimensions = La recta debe pasar por puntos de al menos dos dimensiones.\n\nline-points-depend-on-variables = La recta pasa por puntos que dependen de las variables: { $variables }.\n\n# Enumeradas con coma en vez de «y»: las variables de <line> son `x` e `y` por\n# omisión, y «en las variables x y y» sería a la vez incorrecto (ante el sonido\n# /i/ la conjunción es «e») e ilegible. La coma es correcta sea cual sea el\n# nombre de la variable, que aquí no se conoce de antemano.\nline-equation-invalid-format = Formato no válido para la ecuación de la recta en las variables { $variable1 }, { $variable2 }.\n\n## `<ray>`\n\nray-overprescribed-through = La semirrecta está determinada por through, endpoint y direction. Se ignora el through especificado.\n\nray-dimension-mismatch = Discrepancia de numDimensions en la semirrecta.\n\n## `<vector>`\n\nvector-overprescribed-head = El vector está determinado por head, tail y displacement. Se ignora el head especificado.\n\nvector-dimension-mismatch = Discrepancia de numDimensions en el vector.\n\n## Atraer y restringir\n\nattract-to-without-nearest-point = No se puede atraer a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-without-nearest-point = No se puede restringir a un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\nconstrain-to-interior-without-nearest-point = No se puede restringir al interior de un `<{ $component }>` porque no tiene la variable de estado nearestPoint.\n\n## `<choiceInput>`\n\nchoice-input-label-position-ignored = labelPosition se ignora en un choiceInput que no es inline\n\n## Ordenar hijos por índice\n\nchoice-input-indices-count-mismatch = Se ignoran los índices especificados para choiceInput porque su cantidad no coincide con la cantidad de hijos choice.\n\npretzel-indices-count-mismatch = Se ignoran los índices especificados para problem porque su cantidad no coincide con la cantidad de hijos problem.\n\nshuffle-indices-count-mismatch = Se ignoran los índices especificados para shuffle porque su cantidad no coincide con la cantidad de componentes.\n\nindices-ignored-out-of-range = Se ignoran los índices especificados para { $component } porque algunos están fuera de rango.\n\npretzel-indices-repeated = Se ignoran los índices especificados para pretzel porque algunos están repetidos.\n\npretzel-circuit-first-index = Se ignoran los índices especificados para pretzel en modo circuit porque el primer índice debe ser 1.\n\n## `<shuffle>` y `<sort>`\n\nstring-children-need-type = Para que `<{ $component }>` funcione con hijos de texto, se debe especificar el atributo `type`.\n\ninvalid-type-defaulting-to-math = Tipo no válido { $type } para el componente { $component }. Debe ser math, text, number o boolean. Se usa math.\n\nstring-not-valid-component-to-arrange = La cadena "{ $value }" no es un componente válido para { $component }. Se ignora.\n\n## Tipos y variables\n\ninvalid-type-defaulting-to-number = Tipo no válido { $type }, se establece el tipo en number.\n\ninvalid-variable-value = Valor no válido de una variable: `{ $value }`\n\n## Variantes\n\nvariant-index-must-be-number = El índice de variante { $index } debe ser un número\n\nvariant-index-must-be-integer = El índice de variante { $index } debe ser un número entero\n\n## `<sideBySide>`\n\nside-by-side-absolute-widths = `<{ $component }>` no está implementado para medidas absolutas. Los anchos se establecen como relativos.\n\nside-by-side-absolute-margins = `<{ $component }>` no está implementado para medidas absolutas. Los márgenes se establecen como relativos.\n\nside-by-side-no-block-child = `<{ $component }>` no es válido: debe tener al menos un hijo de bloque.\n\n## `<label>`\n\nlabel-for-ignored-on-graphical = Se ignora el atributo `for` en un `<label>` gráfico.\n\nlabel-for-must-resolve-to-one = El atributo `for` de `<label>` debe corresponder exactamente a un componente.\n\nlabel-for-unresolved = No se pudo resolver el atributo `for` de `<label>` a un componente.\n\nlabel-for-answer-with-authored-inputs = El atributo `for` de `<label>` hace referencia a un `<answer>` con entradas escritas explícitamente; haz referencia a la entrada directamente.\n\nlabel-for-answer-without-input = El atributo `for` de `<label>` hace referencia a un `<answer>` que no tiene ninguna entrada que etiquetar.\n\nlabel-for-must-reference-input-or-answer = El atributo `for` de `<label>` debe hacer referencia a una entrada o a un `<answer>`.\n\n## Accesibilidad\n\naccessibility-short-description-or-decorative = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o estar marcado como decorativo.\n\naccessibility-video-short-description = Por accesibilidad, `<video>` debe tener una descripción breve.\n\naccessibility-input-short-description-or-label = Por accesibilidad, `<{ $component }>` debe tener una descripción breve o una etiqueta.\n\naccessibility-answer-input-short-description-or-label = Por accesibilidad, la entrada creada por un `<answer>` debe tener una descripción breve o una etiqueta.\n\naccessibility-short-description-contains-math = Las descripciones breves no deben contener componentes matemáticos como `<{ $component }>`. Expresa las matemáticas con palabras.\n\naccessibility-section-title-insufficient-contrast =\n { $mode ->\n [dark] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección (modo oscuro) ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n *[other] { $colorName } no tiene suficiente contraste con el texto del encabezado de sección ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n }\n\n## `<circle>`\n\ncircle-through-points-non-numerical = No está implementado un `<circle>` que pase por { $count } puntos cuando los puntos no tienen valores numéricos.\n\ncircle-too-many-through-points = No se puede calcular una circunferencia que pase por más de 3 puntos.\n\ncircle-overprescribed-radius-center-points = No se puede calcular una circunferencia con radio, centro y puntos de paso especificados a la vez.\n\ncircle-center-with-multiple-points = No se puede calcular una circunferencia con centro especificado que pase por más de 1 punto.\n\ncircle-radius-too-small = No se puede calcular la circunferencia: dado que la distancia entre los dos puntos es { $distance }, el radio especificado { $radius } es demasiado pequeño.\n\ncircle-radius-with-many-points = No se puede crear una circunferencia que pase por más de dos puntos con un radio especificado.\n\ncircle-invalid-center-or-through-points = El centro o los puntos de paso de la circunferencia no son válidos.\n\ncircle-radius-center-with-multiple-points = No se puede calcular el radio de una circunferencia con centro especificado que pase por más de 1 punto.\n\ncircle-change-radius-non-numerical = No se puede cambiar el radio de una circunferencia con puntos de paso no numéricos\n\ncircle-radius-with-points-non-numerical = No se puede crear una circunferencia que pase por más de un punto con un radio especificado cuando no hay valores numéricos.\n\ncircle-change-center-non-numerical = No está implementado cambiar el centro de una circunferencia que pasa por puntos con valores no numéricos.\n\n## `<function>`\n\nfunction-domain-insufficient-dimensions =\n { $intervals ->\n [one] Dimensiones insuficientes para el dominio de la función. El dominio tiene { $intervals } intervalo pero la función tiene { $inputs ->\n [one] { $inputs } entrada\n *[other] { $inputs } entradas\n }.\n *[other] Dimensiones insuficientes para el dominio de la función. El dominio tiene { $intervals } intervalos pero la función tiene { $inputs ->\n [one] { $inputs } entrada\n *[other] { $inputs } entradas\n }.\n }\n\nfunction-domain-invalid-format = Formato no válido para el dominio de la función.\n\nfunction-ignoring-non-numerical =\n { $type ->\n [maximum] Se ignora el máximo no numérico de la función.\n [minimum] Se ignora el mínimo no numérico de la función.\n [extremum] Se ignora el extremo no numérico de la función.\n [point] Se ignora el punto no numérico de la función.\n [slope] Se ignora la pendiente no numérica de la función.\n *[other] Se ignora { $type } no numérico de la función.\n }\n\nfunction-ignoring-empty =\n { $type ->\n [maximum] Se ignora el máximo vacío de la función.\n [minimum] Se ignora el mínimo vacío de la función.\n [extremum] Se ignora el extremo vacío de la función.\n [point] Se ignora el punto vacío de la función.\n *[other] Se ignora { $type } vacío de la función.\n }\n\nfunction-points-too-close = La función contiene dos puntos demasiado próximos entre sí. No se puede definir la función.\n\nfunction-iterates-input-output-mismatch =\n { $inputs ->\n [one] Las iteraciones de una función solo son posibles si el número de entradas es igual al número de salidas. Esta función tiene { $inputs } entrada y { $outputs ->\n [one] { $outputs } salida\n *[other] { $outputs } salidas\n }.\n *[other] Las iteraciones de una función solo son posibles si el número de entradas es igual al número de salidas. Esta función tiene { $inputs } entradas y { $outputs ->\n [one] { $outputs } salida\n *[other] { $outputs } salidas\n }.\n }\n\n## `<sequence>`\n\nsequence-invalid-length = Longitud de la secuencia no válida. Debe ser un entero no negativo.\n\nsequence-invalid-step = Paso de la secuencia no válido. Debe ser un número para una secuencia de tipo { $type }.\n\nsequence-invalid-endpoint-number = El valor de "{ $attribute }" de la secuencia numérica no es válido. Debe ser un número.\n\nsequence-invalid-endpoint-letters = El valor de "{ $attribute }" de la secuencia de letras no es válido. Debe ser una combinación de letras.\n\nsequence-invalid-endpoint = El valor de "{ $attribute }" de la secuencia no es válido.\n\nselect-from-sequence-coprime-not-numbers = Se ignora coprime porque no se están seleccionando números\n\nselect-from-sequence-coprime-with-exclude-combinations = Se ignora coprime porque se especificó excludeCombinations\n\n## Resolución de `target`\n\ntarget-not-found = Destino no válido para `<{ $source }>`: no se encuentra el destino.\n\ntarget-state-variable-not-found = Destino no válido para `<{ $source }>`: no se encuentra una variable de estado llamada "{ $property }" en un `<{ $component }>`.\n\n## `<odeSystem>`\n\node-system-variables-match-independent = Las variables de `<odeSystem>` deben ser distintas de la variable independiente.\n\node-system-duplicate-variable-names = No se pueden definir las funciones del lado derecho de la EDO con nombres de variables dependientes repetidos.\n\node-system-rhs-function-error = No se puede definir la función del lado derecho de la EDO. Error al crear la función de mathjs.\n\n## `<angle>`, `<parabola>` e `<intersection>`\n\nangle-too-many-lines = No se puede definir un ángulo entre { $count } rectas\n\nangle-invalid-through-point = Punto no válido en through de `<angle>`\n\nparabola-vertex-too-many-points = No está implementada una parábola con vértice que pase por más de 1 punto.\n\nparabola-too-many-points = No está implementada una parábola que pase por más de 3 puntos.\n\nintersection-too-many-items = No está implementada la intersección de más de dos objetos\n\n## Otros componentes matemáticos\n\nionic-compound-not-two-ions = No está implementado el compuesto iónico para algo distinto de dos iones.\n\nionic-compound-needs-cation-and-anion = El compuesto iónico solo está implementado para un catión y un anión.\n\nsolve-equations-cannot-evaluate = No se puede resolver la ecuación porque no se pudo evaluar: { $equation }\n\nmath-operators-operand-number-required = Se debe especificar operandNumber al extraer un operando matemático.\n\neigen-decomposition-failed = No se pudieron calcular los valores propios de la matriz\n\n## Renderizador PreFigure\n\nprefigure-x-label-position-unsupported = `<graph>`: xLabelPosition="left" no es compatible con el renderizador prefigure; se usa el comportamiento de posición derecha.\n\nprefigure-y-label-position-unsupported = `<graph>`: yLabelPosition="bottom" no es compatible con el renderizador prefigure; se usa el comportamiento de posición superior.\n\nprefigure-invalid-axis-bounds = `<graph>`: los límites de los ejes no son válidos para la conversión a prefigure; se usa el bbox predeterminado (-10,-10,10,10).\n\nprefigure-invalid-width = `<graph>`: el ancho no es válido para la conversión a prefigure; se usa el ancho de diagrama predeterminado 425.\n\nprefigure-invalid-aspect-ratio = `<graph>`: aspectRatio no es válido para la conversión a prefigure; se usa la relación de aspecto predeterminada 1.\n\nprefigure-annotations-not-rendered = `<graph>`: las anotaciones no se representan si no se usa el renderizador PreFigure.\n\nmultiple-annotations-children = Se encontraron varios hijos `<annotations>` en `<graph>`; se ignoran todos menos el último.\n\n## Referencias a otros componentes\n\ncopy-unrecognized-component-type = No se puede extender ni copiar un tipo de componente desconocido: { $type }.\n\ncopy-prop-not-found = No se encontró la propiedad { $property } en un componente de tipo { $component }\n\ncollect-no-source = No se encontró ninguna fuente para collect.\n\ncollect-invalid-component-type = No se pueden recolectar componentes de tipo `<{ $component }>` porque no es un tipo de componente válido.\n\nreference-index-unavailable = No se puede referenciar el índice `{ $reference }`\n\n## `<callAction>`\n\ncomponent-action-unavailable = No se puede llamar a { $action } en el componente `{ $reference }`\n\n## `<dataFrame>`\n\ndata-frame-inconsistent-row-lengths = Los datos tienen una forma no válida. Las filas tienen longitudes distintas. Encontrado en componentIdx :{ $componentIdx }\n\ndata-frame-duplicate-column-names = Los datos tienen nombres de columna repetidos. Encontrado en componentIdx :{ $componentIdx }\n\ndata-frame-missing-column-name = A los datos les falta el nombre de una columna. Encontrado en componentIdx :{ $componentIdx }\n\n## `<answer>` y puntuación\n\nanswer-award-depends-on-own-response = Un award de esta respuesta depende de la respuesta enviada por el propio answer, lo que provocará un comportamiento inesperado.\n\nanswer-max-num-attempts-in-section-wide-check-work = Establecer `maxNumAttempts` en un `<answer>` dentro de un contenedor con `sectionWideCheckWork` no tiene efecto, porque el número de intentos lo controla el contenedor. Establece `maxNumAttempts` en el contenedor.\n\nnested-section-wide-check-work-max-num-attempts = Establecer `maxNumAttempts` en un contenedor con `sectionWideCheckWork` que está dentro de otro contenedor con `sectionWideCheckWork` no tiene efecto, porque el número de intentos lo controla el contenedor exterior. Establece `maxNumAttempts` en el contenedor exterior.\n\nanswer-attributes-need-symbolic-equality =\n { $attributesCount ->\n [one] El atributo { $attributes } no tendrá efecto si no se establece symbolicEquality.\n *[other] Los atributos { $attributes } no tendrán efecto si no se establece symbolicEquality.\n }\n\nanswer-invalid-type = Tipo no válido para answer: { $type }\n\n## `<module>`, `<conditionalContent>`, `<slider>` y pretzel\n\nmodule-attribute-child-needs-name = Como el componente `<{ $component }>` no tiene nombre, no se puede usar como atributo de módulo\n\nmodule-attribute-name-already-defined = El componente `<{ $component } name="{ $name }">` no se puede usar como atributo de un módulo porque el tipo de componente `<module>` ya tiene definido un atributo "{ $name }".\n\nconditional-content-condition-ignored = Se ignora el atributo `condition` en un `<conditionalContent>` que tiene hijos case o else.\n\nslider-markers-type-mismatch = El tipo de los marcadores no coincide con el tipo del slider.\n\npretzel-problem-needs-statement-and-answer = Pretzel no válido: cada `<problem>` debe contener un `<statement>` y un `<answer>`.\n\npretzel-circuit-first-problem-distractor = Pretzel no válido: en mode="circuit", el primer `<problem>` no puede ser un distractor.\n\n## Valores de atributos\n\nattribute-invalid-values =\n { $valuesCount ->\n [one] Valor no válido { $values } para el atributo `{ $attribute }`; se ignora.\n *[other] Valores no válidos { $values } para el atributo `{ $attribute }`; se ignoran.\n }\n\nattribute-must-be-references = Valor no válido `{ $value }` para el atributo `{ $attribute }`. El atributo debe estar compuesto de referencias que empiecen por `$`.\n\nmath-input-invalid-function-names = <mathInput>: se ignoran nombres de función no válidos en { $attribute }: { $names }. El segmento visible de cada nombre debe tener al menos 2 caracteres (letras o guiones); puede añadirse un sufijo opcional `|<alternativa de mathspeak>`.\n\n## Construcción de componentes a partir del código fuente\n\ncomponent-type-invalid = Tipo de componente no válido: `<{ $componentType }>`\n\nattribute-repeated = No se puede repetir el atributo { $attribute }.\n\nattribute-invalid-for-component = Atributo "{ $attribute }" no válido para un componente de tipo `<{ $componentType }>`.\n\n## Contraste de las definiciones de estilo\n\nstyle-definition-insufficient-contrast =\n La definición de estilo { $styleNumber } no tiene suficiente contraste para { $context ->\n [text-on-background] el color del texto sobre el color de fondo\n [high-contrast] el color de alto contraste sobre el lienzo\n [line] el color de las líneas sobre el lienzo\n [marker] el color de los marcadores sobre el lienzo\n *[text-on-canvas] el color del texto sobre el lienzo\n }{ $mode ->\n [dark] { " (modo oscuro)" }\n *[light] { "" }\n } ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1).\n\nstyle-definition-dark-mode-text-background-contrast =\n Aunque la definición de estilo { $styleNumber } especifica colores con suficiente contraste en modo claro, los colores de modo oscuro derivados de esos valores no tienen suficiente contraste entre el color del texto y el color de fondo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con { $lightAttribute }="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con { $darkAttribute }="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye los colores derivados mediante textColorDarkMode o backgroundColorDarkMode.\n }\n\nstyle-definition-dark-mode-text-canvas-contrast =\n Aunque la definición de estilo { $styleNumber } especifica un color de texto con suficiente contraste en modo claro, el color de texto de modo oscuro derivado de ese valor no tiene suficiente contraste sobre el lienzo ({ NUMBER($ratio, minimumFractionDigits: 2, maximumFractionDigits: 2) }:1; se requiere al menos { $threshold }:1). { $suggestion ->\n [available] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro (por ejemplo, con textColor="{ $lightColor }") o define el color de modo oscuro (por ejemplo, con textColorDarkMode="{ $darkColor }").\n *[none] Para lograr suficiente contraste en modo oscuro, aumenta el contraste en modo claro o sustituye el color derivado mediante textColorDarkMode.\n }\n\nsection-multiple-style-palettes = Una sección solo puede seleccionar un <stylePalette>; se usará el último.\n\n## Variantes únicas\n\nvariant-num-to-select-not-non-negative-integer = no se pueden determinar las variantes únicas de { $component } porque numToSelect no es un entero no negativo.\n\nvariant-num-to-select-not-constant-number = no se pueden determinar las variantes únicas de { $component } porque numToSelect no es un número constante.\n\nvariant-with-replacement-not-constant-boolean = no se pueden determinar las variantes únicas de { $component } porque withReplacement no es un booleano constante.\n\nvariant-select-weight-disables-unique = Las variantes únicas quedan desactivadas en select si alguna opción especifica selectWeight o selectForVariants\n\nvariant-coprime-undetermined = no se pueden determinar las variantes únicas de { $component } porque no se puede determinar si coprime es siempre falso.\n\nvariant-attribute-not-constant = no se pueden determinar las variantes únicas de { $component } porque { $attribute } no es constante.\n\nvariant-attribute-not-number = no se pueden determinar las variantes únicas de { $component } porque { $attribute } no es un número.\n\nvariant-attribute-wrong-type-for-sequence =\n no se pueden determinar las variantes únicas de { $component } de tipo { $type } porque { $attribute } no es { $expected ->\n [letters-combination] una combinación de letras\n [math-expression] una expresión matemática válida\n [integer] un entero\n *[number] un número\n }.\n\nvariant-length-not-integer = no se pueden determinar las variantes únicas de { $component } porque length no es un entero.\n\nvariant-sort-not-implemented = no se han implementado las variantes únicas de un { $component } con sort\n\nvariant-exclude-combinations-not-implemented = no se han implementado las variantes únicas de un { $component } con excludeCombinations\n\nvariant-math-exclude-not-implemented = no se han implementado las variantes únicas de un { $component } de tipo math con exclude\n\nvariant-non-constant-exclude-not-implemented = no se han implementado las variantes únicas de un { $component } con exclude no constante\n\n## Conversión a PreFigure\n\nprefigure-descendant-unsupported = { $subject }: no se admite en el renderizador prefigure de gráficos; se omite el descendiente.\n\nprefigure-descendant-invalid-geometry = { $subject }: geometría no finita o incompleta; se omite el descendiente.\n\nprefigure-curve-label-omitted = { $subject }: las etiquetas no se admiten en los elementos de curva convertidos; se omite la etiqueta.\n\nprefigure-curve-unsupported-definition-type = { $subject }: tipo de definición de función de curva no admitido \'{ $definitionType }\'; se omite el descendiente.\n\nprefigure-region-flip-functions-unsupported = { $subject }: atributo flipFunctions no admitido en regionBetweenCurves; se omite el descendiente.\n\nprefigure-region-non-formula-child = { $subject }: en regionBetweenCurves solo se admiten funciones hijas de tipo fórmula; se omite el descendiente.\n\nprefigure-label-position-unsupported =\n { $subject }: labelPosition \'{ $labelPosition }\' no admitido para { $labelKind ->\n [line-family] una etiqueta de la familia de líneas\n *[point] una etiqueta de punto\n }; se usa la alineación predeterminada de PreFigure.\n\nprefigure-fill-style-unsupported = { $subject }: PreFigure no admite el estilo de relleno \'{ $fillStyle }\'; se usa un relleno sólido.\n\nprefigure-line-style-unknown = { $subject }: estilo de línea desconocido \'{ $lineStyle }\'; se omite de la salida de PreFigure.\n\nprefigure-marker-style-mapped-to-diamond = { $subject }: el estilo de marcador \'{ $markerStyle }\' se asigna al estilo \'diamond\' de PreFigure.\n\nprefigure-marker-style-unsupported = { $subject }: PreFigure no admite el estilo de marcador \'{ $markerStyle }\'; se usa el estilo predeterminado.\n\n## Anotaciones de PreFigure\n\nannotation-ref-unresolvable = `<annotation>`: `ref` no válido; no se puede resolver el destino. Se omite la anotación.\n\nannotation-ref-multiple-targets = `<annotation>`: `ref` se resolvió a varios destinos; se usa el primero.\n\nannotation-ref-outside-graph = `<annotation>`: `ref` no válido; el destino está fuera del gráfico que lo contiene. Se omite la anotación.\n\nannotation-ref-unsupported-target = `<annotation>`: `ref` no válido; el destino no es un objeto gráfico admitido en la conversión a prefigure. Se omite la anotación.\n\nannotation-text-missing = `<annotation>`: falta `text` o está vacío; se emite texto vacío.\n\n## Composites y referencias\n\ncomposite-circular-dependency =\n { $componentType ->\n [none] Se detectó una dependencia circular.\n *[other] Se detectó una dependencia circular en la que participa un componente `<{ $componentType }>`.\n }\n\nreference-no-referent = No se encontró ningún referente para la referencia: `{ $reference }`\n\nreference-multiple-referents = Se encontraron varios referentes para la referencia: `{ $reference }`\n\n## Hijos que no coinciden\n\nchildren-invalid-attribute-format = Formato no válido para el atributo { $attribute } de `<{ $componentType }>`.\n\nchildren-invalid = Hijos no válidos para `<{ $componentType }>`: se encontraron hijos no válidos: { $children }\n\n## Se recurre a un valor predeterminado\n\nattribute-value-invalid-using-default = Valor no válido `{ $value }` para el atributo `{ $attribute }`; se usa el valor `{ $default }`\n\n## Carga de una versión de DoenetML\n\ndoenetml-version-not-found =\n { $fallback ->\n [none] No se encontró la versión { $version } de DoenetML.\n *[other] No se encontró la versión { $version } de DoenetML. Se recurrirá a la versión { $fallback }\n }\n';
39766
38765
  const BUNDLED_TRANSLATIONS = {
39767
38766
  es: {
39768
38767
  chrome: esChrome,
@@ -39839,6 +38838,7 @@ const DIAGNOSTIC_CODES = {
39839
38838
  "doenet-i0032": "variant-exclude-combinations-not-implemented",
39840
38839
  "doenet-i0033": "variant-math-exclude-not-implemented",
39841
38840
  "doenet-i0034": "variant-non-constant-exclude-not-implemented",
38841
+ "doenet-i0048": "attribute-value-invalid-using-default",
39842
38842
  "doenet-w0001": "line-points-undetermined-dimensions",
39843
38843
  "doenet-w0002": "line-points-too-few-dimensions",
39844
38844
  "doenet-w0003": "line-points-depend-on-variables",
@@ -39938,10 +38938,18 @@ const DIAGNOSTIC_CODES = {
39938
38938
  "doenet-w0097": "annotation-ref-outside-graph",
39939
38939
  "doenet-w0098": "annotation-ref-unsupported-target",
39940
38940
  "doenet-w0099": "annotation-text-missing",
38941
+ "doenet-w0100": "reference-index-unavailable",
38942
+ "doenet-w0102": "component-action-unavailable",
38943
+ "doenet-w0104": "reference-no-referent",
38944
+ "doenet-w0105": "reference-multiple-referents",
38945
+ "doenet-w0106": "children-invalid-attribute-format",
38946
+ "doenet-w0107": "children-invalid",
39941
38947
  "doenet-e0001": "pretzel-circuit-first-problem-distractor",
39942
38948
  "doenet-e0002": "component-type-invalid",
39943
38949
  "doenet-e0003": "attribute-repeated",
39944
38950
  "doenet-e0004": "attribute-invalid-for-component",
38951
+ "doenet-e0005": "composite-circular-dependency",
38952
+ "doenet-e0006": "doenetml-version-not-found",
39945
38953
  "doenet-a0001": "accessibility-short-description-or-decorative",
39946
38954
  "doenet-a0002": "accessibility-video-short-description",
39947
38955
  "doenet-a0003": "accessibility-input-short-description-or-label",
@@ -40026,8 +39034,8 @@ function codedDiagnostic({
40026
39034
  ...level === void 0 ? {} : { level }
40027
39035
  };
40028
39036
  }
40029
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
40030
- function getDefaultExportFromCjs(x2) {
39037
+ var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
39038
+ function getDefaultExportFromCjs$1(x2) {
40031
39039
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
40032
39040
  }
40033
39041
  var colorName$1;
@@ -40188,7 +39196,7 @@ function requireColorName() {
40188
39196
  return colorName$1;
40189
39197
  }
40190
39198
  var colorNameExports = requireColorName();
40191
- const colorName = /* @__PURE__ */ getDefaultExportFromCjs(colorNameExports);
39199
+ const colorName = /* @__PURE__ */ getDefaultExportFromCjs$1(colorNameExports);
40192
39200
  var r$2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$3 = function(r2) {
40193
39201
  return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
40194
39202
  }, n$2 = function(r2, t22, n2) {
@@ -43883,7 +42891,7 @@ function requireBase32() {
43883
42891
  var root2 = typeof window === "object" ? window : {};
43884
42892
  var NODE_JS = !root2.HI_BASE32_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node;
43885
42893
  if (NODE_JS) {
43886
- root2 = commonjsGlobal;
42894
+ root2 = commonjsGlobal$1;
43887
42895
  }
43888
42896
  var COMMON_JS = !root2.HI_BASE32_NO_COMMON_JS && true && module.exports;
43889
42897
  var BASE32_ENCODE_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split("");
@@ -44238,7 +43246,7 @@ function requireBase32() {
44238
43246
  return base32$1.exports;
44239
43247
  }
44240
43248
  var base32Exports = requireBase32();
44241
- const base32 = /* @__PURE__ */ getDefaultExportFromCjs(base32Exports);
43249
+ const base32 = /* @__PURE__ */ getDefaultExportFromCjs$1(base32Exports);
44242
43250
  async function cidFromText(text) {
44243
43251
  let encoder = new TextEncoder();
44244
43252
  let data = encoder.encode(text);
@@ -44251,7 +43259,7 @@ async function cidFromArrayBuffer(data) {
44251
43259
  await crypto.subtle.digest("SHA-256", new Uint8Array());
44252
43260
  digest = (data2) => crypto.subtle.digest("SHA-256", data2);
44253
43261
  } catch (e22) {
44254
- const sha256 = (await import("./sha256-AuWkkb03-D1I5-QGz-DRYHn_Zz.js").then((n2) => n2.s)).default;
43262
+ const sha256 = (await import("./sha256-AuWkkb03-BRc1rhF7-huwwLq2C.js").then((n2) => n2.s)).default;
44255
43263
  digest = (data2) => sha256(data2, {
44256
43264
  asBytes: true
44257
43265
  });
@@ -46987,6 +45995,1035 @@ function requireCssesc() {
46987
45995
  }
46988
45996
  requireCssesc();
46989
45997
  const data_format_version = "0.7.0";
45998
+ class DiagnosticError extends Error {
45999
+ constructor({
46000
+ code,
46001
+ args
46002
+ }) {
46003
+ super(formatEnglishDiagnostic(code, args));
46004
+ this.name = "DiagnosticError";
46005
+ this.code = code;
46006
+ if (args !== void 0) {
46007
+ this.args = args;
46008
+ }
46009
+ }
46010
+ }
46011
+ function diagnosticCodeFrom(value) {
46012
+ if (typeof value !== "object" || value === null || !("code" in value)) {
46013
+ return {};
46014
+ }
46015
+ const code = value.code;
46016
+ if (typeof code !== "string" || !isDiagnosticCode(code)) {
46017
+ return {};
46018
+ }
46019
+ const args = value.args;
46020
+ const argsAreUsable = typeof args === "object" && args !== null && !Array.isArray(args);
46021
+ return {
46022
+ code,
46023
+ ...argsAreUsable ? { args } : {}
46024
+ };
46025
+ }
46026
+ class Numerics {
46027
+ constructor({
46028
+ maxIterationsRoot = 80,
46029
+ maxIterationsMinimize = 500,
46030
+ eps = 1e-6
46031
+ } = {}) {
46032
+ this.maxIterationsRoot = maxIterationsRoot;
46033
+ this.maxIterationsMinimize = maxIterationsMinimize;
46034
+ this.eps = eps;
46035
+ }
46036
+ /**
46037
+ *
46038
+ * Find zero of an univariate function f.
46039
+ * @param {function} f Function, whose root is to be found
46040
+ * @param {Array,Number} x0 Start value or start interval enclosing the root
46041
+ * @param {Object} object Parent object in case f is method of it
46042
+ * @returns {Number} the approximation of the root
46043
+ * Algorithm:
46044
+ * G.Forsythe, M.Malcolm, C.Moler, Computer methods for mathematical
46045
+ * computations. M., Mir, 1980, p.180 of the Russian edition
46046
+ *
46047
+ * If x0 is an array containing lower and upper bound for the zero
46048
+ * algorithm 748 is applied. Otherwise, if x0 is a number,
46049
+ * the algorithm tries to bracket a zero of f starting from x0.
46050
+ * If this fails, we fall back to Newton's method.
46051
+ */
46052
+ fzero(f2, x0, object2) {
46053
+ var a2, b2, c2, fa2, fb, fc, aa2, blist, i2, len, u2, fu, prev_step, t1, cb2, t22, tol_act, p2, q2, new_step, eps = this.eps, maxiter = this.maxIterationsRoot, niter = 0;
46054
+ if (Array.isArray(x0)) {
46055
+ if (x0.length < 2) {
46056
+ throw new Error(
46057
+ "fzero: length of array x0 has to be at least two."
46058
+ );
46059
+ }
46060
+ a2 = x0[0];
46061
+ fa2 = f2.call(object2, a2);
46062
+ b2 = x0[1];
46063
+ fb = f2.call(object2, b2);
46064
+ } else {
46065
+ a2 = x0;
46066
+ fa2 = f2.call(object2, a2);
46067
+ if (a2 === 0) {
46068
+ aa2 = 1;
46069
+ } else {
46070
+ aa2 = a2;
46071
+ }
46072
+ blist = [
46073
+ 0.9 * aa2,
46074
+ 1.1 * aa2,
46075
+ aa2 - 1,
46076
+ aa2 + 1,
46077
+ 0.5 * aa2,
46078
+ 1.5 * aa2,
46079
+ -aa2,
46080
+ 2 * aa2,
46081
+ -10 * aa2,
46082
+ 10 * aa2
46083
+ ];
46084
+ len = blist.length;
46085
+ for (i2 = 0; i2 < len; i2++) {
46086
+ b2 = blist[i2];
46087
+ fb = f2.call(object2, b2);
46088
+ if (fa2 * fb <= 0) {
46089
+ break;
46090
+ }
46091
+ }
46092
+ if (b2 < a2) {
46093
+ u2 = a2;
46094
+ a2 = b2;
46095
+ b2 = u2;
46096
+ fu = fa2;
46097
+ fa2 = fb;
46098
+ fb = fu;
46099
+ }
46100
+ }
46101
+ if (fa2 * fb > 0) {
46102
+ if (Array.isArray(x0)) {
46103
+ return this.fminbr(f2, [a2, b2], object2).x;
46104
+ }
46105
+ return this.Newton(f2, a2, object2);
46106
+ }
46107
+ c2 = a2;
46108
+ fc = fa2;
46109
+ while (niter < maxiter) {
46110
+ prev_step = b2 - a2;
46111
+ if (Math.abs(fc) < Math.abs(fb)) {
46112
+ a2 = b2;
46113
+ b2 = c2;
46114
+ c2 = a2;
46115
+ fa2 = fb;
46116
+ fb = fc;
46117
+ fc = fa2;
46118
+ }
46119
+ tol_act = 0.5 * eps * (Math.abs(b2) + 1);
46120
+ new_step = (c2 - b2) * 0.5;
46121
+ if (Math.abs(new_step) <= tol_act && Math.abs(fb) <= eps) {
46122
+ return b2;
46123
+ }
46124
+ if (Math.abs(prev_step) >= tol_act && Math.abs(fa2) > Math.abs(fb)) {
46125
+ cb2 = c2 - b2;
46126
+ if (a2 === c2) {
46127
+ t1 = fb / fa2;
46128
+ p2 = cb2 * t1;
46129
+ q2 = 1 - t1;
46130
+ } else {
46131
+ q2 = fa2 / fc;
46132
+ t1 = fb / fc;
46133
+ t22 = fb / fa2;
46134
+ p2 = t22 * (cb2 * q2 * (q2 - t1) - (b2 - a2) * (t1 - 1));
46135
+ q2 = (q2 - 1) * (t1 - 1) * (t22 - 1);
46136
+ }
46137
+ if (p2 > 0) {
46138
+ q2 = -q2;
46139
+ } else {
46140
+ p2 = -p2;
46141
+ }
46142
+ if (p2 < 0.75 * cb2 * q2 - Math.abs(tol_act * q2) * 0.5 && p2 < Math.abs(prev_step * q2 * 0.5)) {
46143
+ new_step = p2 / q2;
46144
+ }
46145
+ }
46146
+ if (Math.abs(new_step) < tol_act) {
46147
+ if (new_step > 0) {
46148
+ new_step = tol_act;
46149
+ } else {
46150
+ new_step = -tol_act;
46151
+ }
46152
+ }
46153
+ a2 = b2;
46154
+ fa2 = fb;
46155
+ b2 += new_step;
46156
+ fb = f2.call(object2, b2);
46157
+ if (fb > 0 && fc > 0 || fb < 0 && fc < 0) {
46158
+ c2 = a2;
46159
+ fc = fa2;
46160
+ }
46161
+ niter++;
46162
+ }
46163
+ return b2;
46164
+ }
46165
+ /**
46166
+ *
46167
+ * Find minimum of an univariate function f.
46168
+ * <p>
46169
+ * Algorithm:
46170
+ * G.Forsythe, M.Malcolm, C.Moler, Computer methods for mathematical
46171
+ * computations. M., Mir, 1980, p.180 of the Russian edition
46172
+ *
46173
+ * @param {function} f Function, whose minimum is to be found
46174
+ * @param {Array} x0 Start interval enclosing the minimum
46175
+ * @param {Object} context Parent object in case f is method of it
46176
+ *
46177
+ * Return object with attributes:
46178
+ * - success: true if reached minimum before max number of iterations
46179
+ * - x: the approximation of the minimum value position
46180
+ * - fx: the value of f at x
46181
+ * - tol: the tolerance used in computing the minimum
46182
+ **/
46183
+ fminbr(f2, x0, context, eps_override) {
46184
+ let eps = eps_override !== void 0 ? eps_override : this.eps;
46185
+ var a2, b2, x2, v2, w2, fx, fv, fw, range2, middle_range, tol_act, new_step, p2, q2, t22, ft2, r2 = (3 - Math.sqrt(5)) * 0.5, tol = eps, sqrteps = eps, maxiter = this.maxIterationsMinimize, niter = 0;
46186
+ if (!Array.isArray(x0) || x0.length < 2) {
46187
+ throw new Error(
46188
+ "Numerics.fminbr: length of array x0 has to be at least two."
46189
+ );
46190
+ }
46191
+ a2 = x0[0];
46192
+ b2 = x0[1];
46193
+ v2 = a2 + r2 * (b2 - a2);
46194
+ fv = f2.call(context, v2);
46195
+ if (Number.isNaN(fv)) {
46196
+ return { success: false };
46197
+ }
46198
+ x2 = v2;
46199
+ w2 = v2;
46200
+ fx = fv;
46201
+ fw = fv;
46202
+ while (niter < maxiter) {
46203
+ range2 = b2 - a2;
46204
+ middle_range = (a2 + b2) * 0.5;
46205
+ tol_act = sqrteps * Math.abs(x2) + tol / 3;
46206
+ if (Math.abs(x2 - middle_range) + range2 * 0.5 <= 2 * tol_act) {
46207
+ return { success: true, x: x2, fx, tol: tol_act };
46208
+ }
46209
+ new_step = r2 * (x2 < middle_range ? b2 - x2 : a2 - x2);
46210
+ if (Math.abs(x2 - w2) >= tol_act) {
46211
+ t22 = (x2 - w2) * (fx - fv);
46212
+ q2 = (x2 - v2) * (fx - fw);
46213
+ p2 = (x2 - v2) * q2 - (x2 - w2) * t22;
46214
+ q2 = 2 * (q2 - t22);
46215
+ if (q2 > 0) {
46216
+ p2 = -p2;
46217
+ } else {
46218
+ q2 = -q2;
46219
+ }
46220
+ if (Math.abs(p2) < Math.abs(new_step * q2) && // If x+p/q falls in [a,b]
46221
+ p2 > q2 * (a2 - x2 + 2 * tol_act) && // not too close to a and
46222
+ p2 < q2 * (b2 - x2 - 2 * tol_act)) {
46223
+ new_step = p2 / q2;
46224
+ }
46225
+ }
46226
+ if (Math.abs(new_step) < tol_act) {
46227
+ if (new_step > 0) {
46228
+ new_step = tol_act;
46229
+ } else {
46230
+ new_step = -tol_act;
46231
+ }
46232
+ }
46233
+ t22 = x2 + new_step;
46234
+ ft2 = f2.call(context, t22);
46235
+ if (Number.isNaN(ft2)) {
46236
+ return { success: false };
46237
+ }
46238
+ if (ft2 <= fx) {
46239
+ if (t22 < x2) {
46240
+ b2 = x2;
46241
+ } else {
46242
+ a2 = x2;
46243
+ }
46244
+ v2 = w2;
46245
+ w2 = x2;
46246
+ x2 = t22;
46247
+ fv = fw;
46248
+ fw = fx;
46249
+ fx = ft2;
46250
+ } else {
46251
+ if (t22 < x2) {
46252
+ a2 = t22;
46253
+ } else {
46254
+ b2 = t22;
46255
+ }
46256
+ if (ft2 <= fw || w2 === x2) {
46257
+ v2 = w2;
46258
+ w2 = t22;
46259
+ fv = fw;
46260
+ fw = ft2;
46261
+ } else if (ft2 <= fv || v2 === x2 || v2 === w2) {
46262
+ v2 = t22;
46263
+ fv = ft2;
46264
+ }
46265
+ }
46266
+ niter += 1;
46267
+ }
46268
+ return { success: false, x: x2, fx };
46269
+ }
46270
+ /**
46271
+ * Newton's method to find roots of a funtion in one variable.
46272
+ * @param {function} f We search for a solution of f(x)=0.
46273
+ * @param {Number} x initial guess for the root, i.e. start value.
46274
+ * @param {Object} context optional object that is treated as "this" in the function body. This is useful if
46275
+ * the function is a method of an object and contains a reference to its parent object via "this".
46276
+ * @returns {Number} A root of the function f.
46277
+ */
46278
+ Newton(f2, x2, context) {
46279
+ var df, i2 = 0, h2 = this.eps, newf = f2.apply(context, [x2]);
46280
+ if (Array.isArray(x2)) {
46281
+ x2 = x2[0];
46282
+ }
46283
+ while (i2 < 50 && Math.abs(newf) > h2) {
46284
+ df = this.D(f2, context)(x2);
46285
+ if (Math.abs(df) > h2) {
46286
+ x2 -= newf / df;
46287
+ } else {
46288
+ x2 += Math.random() * 0.2 - 1;
46289
+ }
46290
+ newf = f2.apply(context, [x2]);
46291
+ i2 += 1;
46292
+ }
46293
+ return x2;
46294
+ }
46295
+ /**
46296
+ * Numerical (symmetric) approximation of derivative.
46297
+ * @param {function} f Function in one variable to be differentiated.
46298
+ * @param {object} [obj] Optional object that is treated as "this" in the function body. This is useful, if the function is a
46299
+ * method of an object and contains a reference to its parent object via "this".
46300
+ * @returns {function} Derivative function of a given function f.
46301
+ */
46302
+ D(f2, obj) {
46303
+ if (!(obj === void 0 || obj === null)) {
46304
+ return function(x2) {
46305
+ var h2 = 1e-5, h22 = h2 * 2;
46306
+ return (f2(x2 + h2) - f2(x2 - h2)) / h22;
46307
+ };
46308
+ }
46309
+ return function(x2) {
46310
+ var h2 = 1e-5, h22 = h2 * 2;
46311
+ return (f2.apply(obj, [x2 + h2]) - f2.apply(obj, [x2 - h2])) / h22;
46312
+ };
46313
+ }
46314
+ }
46315
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
46316
+ function getDefaultExportFromCjs(x2) {
46317
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
46318
+ }
46319
+ function getAugmentedNamespace(n2) {
46320
+ if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
46321
+ var f2 = n2.default;
46322
+ if (typeof f2 == "function") {
46323
+ var a2 = function a3() {
46324
+ var isInstance = false;
46325
+ try {
46326
+ isInstance = this instanceof a3;
46327
+ } catch {
46328
+ }
46329
+ if (isInstance) {
46330
+ return Reflect.construct(f2, arguments, this.constructor);
46331
+ }
46332
+ return f2.apply(this, arguments);
46333
+ };
46334
+ a2.prototype = f2.prototype;
46335
+ } else a2 = {};
46336
+ Object.defineProperty(a2, "__esModule", { value: true });
46337
+ Object.keys(n2).forEach(function(k2) {
46338
+ var d2 = Object.getOwnPropertyDescriptor(n2, k2);
46339
+ Object.defineProperty(a2, k2, d2.get ? d2 : {
46340
+ enumerable: true,
46341
+ get: function() {
46342
+ return n2[k2];
46343
+ }
46344
+ });
46345
+ });
46346
+ return a2;
46347
+ }
46348
+ var alea$1 = { exports: {} };
46349
+ var alea = alea$1.exports;
46350
+ var hasRequiredAlea;
46351
+ function requireAlea() {
46352
+ if (hasRequiredAlea) return alea$1.exports;
46353
+ hasRequiredAlea = 1;
46354
+ (function(module) {
46355
+ (function(global2, module2, define2) {
46356
+ function Alea(seed) {
46357
+ var me2 = this, mash = Mash();
46358
+ me2.next = function() {
46359
+ var t22 = 2091639 * me2.s0 + me2.c * 23283064365386963e-26;
46360
+ me2.s0 = me2.s1;
46361
+ me2.s1 = me2.s2;
46362
+ return me2.s2 = t22 - (me2.c = t22 | 0);
46363
+ };
46364
+ me2.c = 1;
46365
+ me2.s0 = mash(" ");
46366
+ me2.s1 = mash(" ");
46367
+ me2.s2 = mash(" ");
46368
+ me2.s0 -= mash(seed);
46369
+ if (me2.s0 < 0) {
46370
+ me2.s0 += 1;
46371
+ }
46372
+ me2.s1 -= mash(seed);
46373
+ if (me2.s1 < 0) {
46374
+ me2.s1 += 1;
46375
+ }
46376
+ me2.s2 -= mash(seed);
46377
+ if (me2.s2 < 0) {
46378
+ me2.s2 += 1;
46379
+ }
46380
+ mash = null;
46381
+ }
46382
+ function copy2(f2, t22) {
46383
+ t22.c = f2.c;
46384
+ t22.s0 = f2.s0;
46385
+ t22.s1 = f2.s1;
46386
+ t22.s2 = f2.s2;
46387
+ return t22;
46388
+ }
46389
+ function impl(seed, opts) {
46390
+ var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;
46391
+ prng.int32 = function() {
46392
+ return xg.next() * 4294967296 | 0;
46393
+ };
46394
+ prng.double = function() {
46395
+ return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;
46396
+ };
46397
+ prng.quick = prng;
46398
+ if (state) {
46399
+ if (typeof state == "object") copy2(state, xg);
46400
+ prng.state = function() {
46401
+ return copy2(xg, {});
46402
+ };
46403
+ }
46404
+ return prng;
46405
+ }
46406
+ function Mash() {
46407
+ var n2 = 4022871197;
46408
+ var mash = function(data) {
46409
+ data = String(data);
46410
+ for (var i2 = 0; i2 < data.length; i2++) {
46411
+ n2 += data.charCodeAt(i2);
46412
+ var h2 = 0.02519603282416938 * n2;
46413
+ n2 = h2 >>> 0;
46414
+ h2 -= n2;
46415
+ h2 *= n2;
46416
+ n2 = h2 >>> 0;
46417
+ h2 -= n2;
46418
+ n2 += h2 * 4294967296;
46419
+ }
46420
+ return (n2 >>> 0) * 23283064365386963e-26;
46421
+ };
46422
+ return mash;
46423
+ }
46424
+ if (module2 && module2.exports) {
46425
+ module2.exports = impl;
46426
+ } else {
46427
+ this.alea = impl;
46428
+ }
46429
+ })(
46430
+ alea,
46431
+ module
46432
+ );
46433
+ })(alea$1);
46434
+ return alea$1.exports;
46435
+ }
46436
+ var xor128$1 = { exports: {} };
46437
+ var xor128 = xor128$1.exports;
46438
+ var hasRequiredXor128;
46439
+ function requireXor128() {
46440
+ if (hasRequiredXor128) return xor128$1.exports;
46441
+ hasRequiredXor128 = 1;
46442
+ (function(module) {
46443
+ (function(global2, module2, define2) {
46444
+ function XorGen(seed) {
46445
+ var me2 = this, strseed = "";
46446
+ me2.x = 0;
46447
+ me2.y = 0;
46448
+ me2.z = 0;
46449
+ me2.w = 0;
46450
+ me2.next = function() {
46451
+ var t22 = me2.x ^ me2.x << 11;
46452
+ me2.x = me2.y;
46453
+ me2.y = me2.z;
46454
+ me2.z = me2.w;
46455
+ return me2.w ^= me2.w >>> 19 ^ t22 ^ t22 >>> 8;
46456
+ };
46457
+ if (seed === (seed | 0)) {
46458
+ me2.x = seed;
46459
+ } else {
46460
+ strseed += seed;
46461
+ }
46462
+ for (var k2 = 0; k2 < strseed.length + 64; k2++) {
46463
+ me2.x ^= strseed.charCodeAt(k2) | 0;
46464
+ me2.next();
46465
+ }
46466
+ }
46467
+ function copy2(f2, t22) {
46468
+ t22.x = f2.x;
46469
+ t22.y = f2.y;
46470
+ t22.z = f2.z;
46471
+ t22.w = f2.w;
46472
+ return t22;
46473
+ }
46474
+ function impl(seed, opts) {
46475
+ var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
46476
+ return (xg.next() >>> 0) / 4294967296;
46477
+ };
46478
+ prng.double = function() {
46479
+ do {
46480
+ var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
46481
+ } while (result2 === 0);
46482
+ return result2;
46483
+ };
46484
+ prng.int32 = xg.next;
46485
+ prng.quick = prng;
46486
+ if (state) {
46487
+ if (typeof state == "object") copy2(state, xg);
46488
+ prng.state = function() {
46489
+ return copy2(xg, {});
46490
+ };
46491
+ }
46492
+ return prng;
46493
+ }
46494
+ if (module2 && module2.exports) {
46495
+ module2.exports = impl;
46496
+ } else {
46497
+ this.xor128 = impl;
46498
+ }
46499
+ })(
46500
+ xor128,
46501
+ module
46502
+ );
46503
+ })(xor128$1);
46504
+ return xor128$1.exports;
46505
+ }
46506
+ var xorwow$1 = { exports: {} };
46507
+ var xorwow = xorwow$1.exports;
46508
+ var hasRequiredXorwow;
46509
+ function requireXorwow() {
46510
+ if (hasRequiredXorwow) return xorwow$1.exports;
46511
+ hasRequiredXorwow = 1;
46512
+ (function(module) {
46513
+ (function(global2, module2, define2) {
46514
+ function XorGen(seed) {
46515
+ var me2 = this, strseed = "";
46516
+ me2.next = function() {
46517
+ var t22 = me2.x ^ me2.x >>> 2;
46518
+ me2.x = me2.y;
46519
+ me2.y = me2.z;
46520
+ me2.z = me2.w;
46521
+ me2.w = me2.v;
46522
+ return (me2.d = me2.d + 362437 | 0) + (me2.v = me2.v ^ me2.v << 4 ^ (t22 ^ t22 << 1)) | 0;
46523
+ };
46524
+ me2.x = 0;
46525
+ me2.y = 0;
46526
+ me2.z = 0;
46527
+ me2.w = 0;
46528
+ me2.v = 0;
46529
+ if (seed === (seed | 0)) {
46530
+ me2.x = seed;
46531
+ } else {
46532
+ strseed += seed;
46533
+ }
46534
+ for (var k2 = 0; k2 < strseed.length + 64; k2++) {
46535
+ me2.x ^= strseed.charCodeAt(k2) | 0;
46536
+ if (k2 == strseed.length) {
46537
+ me2.d = me2.x << 10 ^ me2.x >>> 4;
46538
+ }
46539
+ me2.next();
46540
+ }
46541
+ }
46542
+ function copy2(f2, t22) {
46543
+ t22.x = f2.x;
46544
+ t22.y = f2.y;
46545
+ t22.z = f2.z;
46546
+ t22.w = f2.w;
46547
+ t22.v = f2.v;
46548
+ t22.d = f2.d;
46549
+ return t22;
46550
+ }
46551
+ function impl(seed, opts) {
46552
+ var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
46553
+ return (xg.next() >>> 0) / 4294967296;
46554
+ };
46555
+ prng.double = function() {
46556
+ do {
46557
+ var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
46558
+ } while (result2 === 0);
46559
+ return result2;
46560
+ };
46561
+ prng.int32 = xg.next;
46562
+ prng.quick = prng;
46563
+ if (state) {
46564
+ if (typeof state == "object") copy2(state, xg);
46565
+ prng.state = function() {
46566
+ return copy2(xg, {});
46567
+ };
46568
+ }
46569
+ return prng;
46570
+ }
46571
+ if (module2 && module2.exports) {
46572
+ module2.exports = impl;
46573
+ } else {
46574
+ this.xorwow = impl;
46575
+ }
46576
+ })(
46577
+ xorwow,
46578
+ module
46579
+ );
46580
+ })(xorwow$1);
46581
+ return xorwow$1.exports;
46582
+ }
46583
+ var xorshift7$1 = { exports: {} };
46584
+ var xorshift7 = xorshift7$1.exports;
46585
+ var hasRequiredXorshift7;
46586
+ function requireXorshift7() {
46587
+ if (hasRequiredXorshift7) return xorshift7$1.exports;
46588
+ hasRequiredXorshift7 = 1;
46589
+ (function(module) {
46590
+ (function(global2, module2, define2) {
46591
+ function XorGen(seed) {
46592
+ var me2 = this;
46593
+ me2.next = function() {
46594
+ var X2 = me2.x, i2 = me2.i, t22, v2;
46595
+ t22 = X2[i2];
46596
+ t22 ^= t22 >>> 7;
46597
+ v2 = t22 ^ t22 << 24;
46598
+ t22 = X2[i2 + 1 & 7];
46599
+ v2 ^= t22 ^ t22 >>> 10;
46600
+ t22 = X2[i2 + 3 & 7];
46601
+ v2 ^= t22 ^ t22 >>> 3;
46602
+ t22 = X2[i2 + 4 & 7];
46603
+ v2 ^= t22 ^ t22 << 7;
46604
+ t22 = X2[i2 + 7 & 7];
46605
+ t22 = t22 ^ t22 << 13;
46606
+ v2 ^= t22 ^ t22 << 9;
46607
+ X2[i2] = v2;
46608
+ me2.i = i2 + 1 & 7;
46609
+ return v2;
46610
+ };
46611
+ function init(me3, seed2) {
46612
+ var j2, X2 = [];
46613
+ if (seed2 === (seed2 | 0)) {
46614
+ X2[0] = seed2;
46615
+ } else {
46616
+ seed2 = "" + seed2;
46617
+ for (j2 = 0; j2 < seed2.length; ++j2) {
46618
+ X2[j2 & 7] = X2[j2 & 7] << 15 ^ seed2.charCodeAt(j2) + X2[j2 + 1 & 7] << 13;
46619
+ }
46620
+ }
46621
+ while (X2.length < 8) X2.push(0);
46622
+ for (j2 = 0; j2 < 8 && X2[j2] === 0; ++j2) ;
46623
+ if (j2 == 8) X2[7] = -1;
46624
+ else X2[j2];
46625
+ me3.x = X2;
46626
+ me3.i = 0;
46627
+ for (j2 = 256; j2 > 0; --j2) {
46628
+ me3.next();
46629
+ }
46630
+ }
46631
+ init(me2, seed);
46632
+ }
46633
+ function copy2(f2, t22) {
46634
+ t22.x = f2.x.slice();
46635
+ t22.i = f2.i;
46636
+ return t22;
46637
+ }
46638
+ function impl(seed, opts) {
46639
+ if (seed == null) seed = +/* @__PURE__ */ new Date();
46640
+ var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
46641
+ return (xg.next() >>> 0) / 4294967296;
46642
+ };
46643
+ prng.double = function() {
46644
+ do {
46645
+ var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
46646
+ } while (result2 === 0);
46647
+ return result2;
46648
+ };
46649
+ prng.int32 = xg.next;
46650
+ prng.quick = prng;
46651
+ if (state) {
46652
+ if (state.x) copy2(state, xg);
46653
+ prng.state = function() {
46654
+ return copy2(xg, {});
46655
+ };
46656
+ }
46657
+ return prng;
46658
+ }
46659
+ if (module2 && module2.exports) {
46660
+ module2.exports = impl;
46661
+ } else {
46662
+ this.xorshift7 = impl;
46663
+ }
46664
+ })(
46665
+ xorshift7,
46666
+ module
46667
+ );
46668
+ })(xorshift7$1);
46669
+ return xorshift7$1.exports;
46670
+ }
46671
+ var xor4096$1 = { exports: {} };
46672
+ var xor4096 = xor4096$1.exports;
46673
+ var hasRequiredXor4096;
46674
+ function requireXor4096() {
46675
+ if (hasRequiredXor4096) return xor4096$1.exports;
46676
+ hasRequiredXor4096 = 1;
46677
+ (function(module) {
46678
+ (function(global2, module2, define2) {
46679
+ function XorGen(seed) {
46680
+ var me2 = this;
46681
+ me2.next = function() {
46682
+ var w2 = me2.w, X2 = me2.X, i2 = me2.i, t22, v2;
46683
+ me2.w = w2 = w2 + 1640531527 | 0;
46684
+ v2 = X2[i2 + 34 & 127];
46685
+ t22 = X2[i2 = i2 + 1 & 127];
46686
+ v2 ^= v2 << 13;
46687
+ t22 ^= t22 << 17;
46688
+ v2 ^= v2 >>> 15;
46689
+ t22 ^= t22 >>> 12;
46690
+ v2 = X2[i2] = v2 ^ t22;
46691
+ me2.i = i2;
46692
+ return v2 + (w2 ^ w2 >>> 16) | 0;
46693
+ };
46694
+ function init(me3, seed2) {
46695
+ var t22, v2, i2, j2, w2, X2 = [], limit = 128;
46696
+ if (seed2 === (seed2 | 0)) {
46697
+ v2 = seed2;
46698
+ seed2 = null;
46699
+ } else {
46700
+ seed2 = seed2 + "\0";
46701
+ v2 = 0;
46702
+ limit = Math.max(limit, seed2.length);
46703
+ }
46704
+ for (i2 = 0, j2 = -32; j2 < limit; ++j2) {
46705
+ if (seed2) v2 ^= seed2.charCodeAt((j2 + 32) % seed2.length);
46706
+ if (j2 === 0) w2 = v2;
46707
+ v2 ^= v2 << 10;
46708
+ v2 ^= v2 >>> 15;
46709
+ v2 ^= v2 << 4;
46710
+ v2 ^= v2 >>> 13;
46711
+ if (j2 >= 0) {
46712
+ w2 = w2 + 1640531527 | 0;
46713
+ t22 = X2[j2 & 127] ^= v2 + w2;
46714
+ i2 = 0 == t22 ? i2 + 1 : 0;
46715
+ }
46716
+ }
46717
+ if (i2 >= 128) {
46718
+ X2[(seed2 && seed2.length || 0) & 127] = -1;
46719
+ }
46720
+ i2 = 127;
46721
+ for (j2 = 4 * 128; j2 > 0; --j2) {
46722
+ v2 = X2[i2 + 34 & 127];
46723
+ t22 = X2[i2 = i2 + 1 & 127];
46724
+ v2 ^= v2 << 13;
46725
+ t22 ^= t22 << 17;
46726
+ v2 ^= v2 >>> 15;
46727
+ t22 ^= t22 >>> 12;
46728
+ X2[i2] = v2 ^ t22;
46729
+ }
46730
+ me3.w = w2;
46731
+ me3.X = X2;
46732
+ me3.i = i2;
46733
+ }
46734
+ init(me2, seed);
46735
+ }
46736
+ function copy2(f2, t22) {
46737
+ t22.i = f2.i;
46738
+ t22.w = f2.w;
46739
+ t22.X = f2.X.slice();
46740
+ return t22;
46741
+ }
46742
+ function impl(seed, opts) {
46743
+ if (seed == null) seed = +/* @__PURE__ */ new Date();
46744
+ var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
46745
+ return (xg.next() >>> 0) / 4294967296;
46746
+ };
46747
+ prng.double = function() {
46748
+ do {
46749
+ var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
46750
+ } while (result2 === 0);
46751
+ return result2;
46752
+ };
46753
+ prng.int32 = xg.next;
46754
+ prng.quick = prng;
46755
+ if (state) {
46756
+ if (state.X) copy2(state, xg);
46757
+ prng.state = function() {
46758
+ return copy2(xg, {});
46759
+ };
46760
+ }
46761
+ return prng;
46762
+ }
46763
+ if (module2 && module2.exports) {
46764
+ module2.exports = impl;
46765
+ } else {
46766
+ this.xor4096 = impl;
46767
+ }
46768
+ })(
46769
+ xor4096,
46770
+ // window object or global
46771
+ module
46772
+ );
46773
+ })(xor4096$1);
46774
+ return xor4096$1.exports;
46775
+ }
46776
+ var tychei$1 = { exports: {} };
46777
+ var tychei = tychei$1.exports;
46778
+ var hasRequiredTychei;
46779
+ function requireTychei() {
46780
+ if (hasRequiredTychei) return tychei$1.exports;
46781
+ hasRequiredTychei = 1;
46782
+ (function(module) {
46783
+ (function(global2, module2, define2) {
46784
+ function XorGen(seed) {
46785
+ var me2 = this, strseed = "";
46786
+ me2.next = function() {
46787
+ var b2 = me2.b, c2 = me2.c, d2 = me2.d, a2 = me2.a;
46788
+ b2 = b2 << 25 ^ b2 >>> 7 ^ c2;
46789
+ c2 = c2 - d2 | 0;
46790
+ d2 = d2 << 24 ^ d2 >>> 8 ^ a2;
46791
+ a2 = a2 - b2 | 0;
46792
+ me2.b = b2 = b2 << 20 ^ b2 >>> 12 ^ c2;
46793
+ me2.c = c2 = c2 - d2 | 0;
46794
+ me2.d = d2 << 16 ^ c2 >>> 16 ^ a2;
46795
+ return me2.a = a2 - b2 | 0;
46796
+ };
46797
+ me2.a = 0;
46798
+ me2.b = 0;
46799
+ me2.c = 2654435769 | 0;
46800
+ me2.d = 1367130551;
46801
+ if (seed === Math.floor(seed)) {
46802
+ me2.a = seed / 4294967296 | 0;
46803
+ me2.b = seed | 0;
46804
+ } else {
46805
+ strseed += seed;
46806
+ }
46807
+ for (var k2 = 0; k2 < strseed.length + 20; k2++) {
46808
+ me2.b ^= strseed.charCodeAt(k2) | 0;
46809
+ me2.next();
46810
+ }
46811
+ }
46812
+ function copy2(f2, t22) {
46813
+ t22.a = f2.a;
46814
+ t22.b = f2.b;
46815
+ t22.c = f2.c;
46816
+ t22.d = f2.d;
46817
+ return t22;
46818
+ }
46819
+ function impl(seed, opts) {
46820
+ var xg = new XorGen(seed), state = opts && opts.state, prng = function() {
46821
+ return (xg.next() >>> 0) / 4294967296;
46822
+ };
46823
+ prng.double = function() {
46824
+ do {
46825
+ var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result2 = (top + bot) / (1 << 21);
46826
+ } while (result2 === 0);
46827
+ return result2;
46828
+ };
46829
+ prng.int32 = xg.next;
46830
+ prng.quick = prng;
46831
+ if (state) {
46832
+ if (typeof state == "object") copy2(state, xg);
46833
+ prng.state = function() {
46834
+ return copy2(xg, {});
46835
+ };
46836
+ }
46837
+ return prng;
46838
+ }
46839
+ if (module2 && module2.exports) {
46840
+ module2.exports = impl;
46841
+ } else {
46842
+ this.tychei = impl;
46843
+ }
46844
+ })(
46845
+ tychei,
46846
+ module
46847
+ );
46848
+ })(tychei$1);
46849
+ return tychei$1.exports;
46850
+ }
46851
+ var seedrandom$3 = { exports: {} };
46852
+ const __viteBrowserExternal = {};
46853
+ const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
46854
+ __proto__: null,
46855
+ default: __viteBrowserExternal
46856
+ }, Symbol.toStringTag, { value: "Module" }));
46857
+ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
46858
+ var seedrandom$2 = seedrandom$3.exports;
46859
+ var hasRequiredSeedrandom$1;
46860
+ function requireSeedrandom$1() {
46861
+ if (hasRequiredSeedrandom$1) return seedrandom$3.exports;
46862
+ hasRequiredSeedrandom$1 = 1;
46863
+ (function(module) {
46864
+ (function(global2, pool, math2) {
46865
+ var width = 256, chunks = 6, digits2 = 52, rngname = "random", startdenom = math2.pow(width, chunks), significance = math2.pow(2, digits2), overflow = significance * 2, mask = width - 1, nodecrypto;
46866
+ function seedrandom2(seed, options, callback) {
46867
+ var key = [];
46868
+ options = options == true ? { entropy: true } : options || {};
46869
+ var shortseed = mixkey(flatten2(
46870
+ options.entropy ? [seed, tostring(pool)] : seed == null ? autoseed() : seed,
46871
+ 3
46872
+ ), key);
46873
+ var arc4 = new ARC4(key);
46874
+ var prng = function() {
46875
+ var n2 = arc4.g(chunks), d2 = startdenom, x2 = 0;
46876
+ while (n2 < significance) {
46877
+ n2 = (n2 + x2) * width;
46878
+ d2 *= width;
46879
+ x2 = arc4.g(1);
46880
+ }
46881
+ while (n2 >= overflow) {
46882
+ n2 /= 2;
46883
+ d2 /= 2;
46884
+ x2 >>>= 1;
46885
+ }
46886
+ return (n2 + x2) / d2;
46887
+ };
46888
+ prng.int32 = function() {
46889
+ return arc4.g(4) | 0;
46890
+ };
46891
+ prng.quick = function() {
46892
+ return arc4.g(4) / 4294967296;
46893
+ };
46894
+ prng.double = prng;
46895
+ mixkey(tostring(arc4.S), pool);
46896
+ return (options.pass || callback || function(prng2, seed2, is_math_call, state) {
46897
+ if (state) {
46898
+ if (state.S) {
46899
+ copy2(state, arc4);
46900
+ }
46901
+ prng2.state = function() {
46902
+ return copy2(arc4, {});
46903
+ };
46904
+ }
46905
+ if (is_math_call) {
46906
+ math2[rngname] = prng2;
46907
+ return seed2;
46908
+ } else return prng2;
46909
+ })(
46910
+ prng,
46911
+ shortseed,
46912
+ "global" in options ? options.global : this == math2,
46913
+ options.state
46914
+ );
46915
+ }
46916
+ function ARC4(key) {
46917
+ var t22, keylen = key.length, me2 = this, i2 = 0, j2 = me2.i = me2.j = 0, s2 = me2.S = [];
46918
+ if (!keylen) {
46919
+ key = [keylen++];
46920
+ }
46921
+ while (i2 < width) {
46922
+ s2[i2] = i2++;
46923
+ }
46924
+ for (i2 = 0; i2 < width; i2++) {
46925
+ s2[i2] = s2[j2 = mask & j2 + key[i2 % keylen] + (t22 = s2[i2])];
46926
+ s2[j2] = t22;
46927
+ }
46928
+ (me2.g = function(count) {
46929
+ var t32, r2 = 0, i3 = me2.i, j3 = me2.j, s3 = me2.S;
46930
+ while (count--) {
46931
+ t32 = s3[i3 = mask & i3 + 1];
46932
+ r2 = r2 * width + s3[mask & (s3[i3] = s3[j3 = mask & j3 + t32]) + (s3[j3] = t32)];
46933
+ }
46934
+ me2.i = i3;
46935
+ me2.j = j3;
46936
+ return r2;
46937
+ })(width);
46938
+ }
46939
+ function copy2(f2, t22) {
46940
+ t22.i = f2.i;
46941
+ t22.j = f2.j;
46942
+ t22.S = f2.S.slice();
46943
+ return t22;
46944
+ }
46945
+ function flatten2(obj, depth) {
46946
+ var result2 = [], typ = typeof obj, prop;
46947
+ if (depth && typ == "object") {
46948
+ for (prop in obj) {
46949
+ try {
46950
+ result2.push(flatten2(obj[prop], depth - 1));
46951
+ } catch (e32) {
46952
+ }
46953
+ }
46954
+ }
46955
+ return result2.length ? result2 : typ == "string" ? obj : obj + "\0";
46956
+ }
46957
+ function mixkey(seed, key) {
46958
+ var stringseed = seed + "", smear, j2 = 0;
46959
+ while (j2 < stringseed.length) {
46960
+ key[mask & j2] = mask & (smear ^= key[mask & j2] * 19) + stringseed.charCodeAt(j2++);
46961
+ }
46962
+ return tostring(key);
46963
+ }
46964
+ function autoseed() {
46965
+ try {
46966
+ var out;
46967
+ if (nodecrypto && (out = nodecrypto.randomBytes)) {
46968
+ out = out(width);
46969
+ } else {
46970
+ out = new Uint8Array(width);
46971
+ (global2.crypto || global2.msCrypto).getRandomValues(out);
46972
+ }
46973
+ return tostring(out);
46974
+ } catch (e32) {
46975
+ var browser = global2.navigator, plugins2 = browser && browser.plugins;
46976
+ return [+/* @__PURE__ */ new Date(), global2, plugins2, global2.screen, tostring(pool)];
46977
+ }
46978
+ }
46979
+ function tostring(a2) {
46980
+ return String.fromCharCode.apply(0, a2);
46981
+ }
46982
+ mixkey(math2.random(), pool);
46983
+ if (module.exports) {
46984
+ module.exports = seedrandom2;
46985
+ try {
46986
+ nodecrypto = require$$0;
46987
+ } catch (ex) {
46988
+ }
46989
+ } else {
46990
+ math2["seed" + rngname] = seedrandom2;
46991
+ }
46992
+ })(
46993
+ // global: `self` in browsers (including strict mode and web workers),
46994
+ // otherwise `this` in Node and other environments
46995
+ typeof self !== "undefined" ? self : seedrandom$2,
46996
+ [],
46997
+ // pool: entropy pool starts empty
46998
+ Math
46999
+ // math: package containing random, pow, and seedrandom
47000
+ );
47001
+ })(seedrandom$3);
47002
+ return seedrandom$3.exports;
47003
+ }
47004
+ var seedrandom$1;
47005
+ var hasRequiredSeedrandom;
47006
+ function requireSeedrandom() {
47007
+ if (hasRequiredSeedrandom) return seedrandom$1;
47008
+ hasRequiredSeedrandom = 1;
47009
+ var alea2 = requireAlea();
47010
+ var xor1282 = requireXor128();
47011
+ var xorwow2 = requireXorwow();
47012
+ var xorshift72 = requireXorshift7();
47013
+ var xor40962 = requireXor4096();
47014
+ var tychei2 = requireTychei();
47015
+ var sr2 = requireSeedrandom$1();
47016
+ sr2.alea = alea2;
47017
+ sr2.xor128 = xor1282;
47018
+ sr2.xorwow = xorwow2;
47019
+ sr2.xorshift7 = xorshift72;
47020
+ sr2.xor4096 = xor40962;
47021
+ sr2.tychei = tychei2;
47022
+ seedrandom$1 = sr2;
47023
+ return seedrandom$1;
47024
+ }
47025
+ var seedrandomExports = requireSeedrandom();
47026
+ const seedrandom$4 = /* @__PURE__ */ getDefaultExportFromCjs(seedrandomExports);
46990
47027
  function getVariantsForDescendantsForUniqueVariants({
46991
47028
  variantIndex,
46992
47029
  serializedComponent,
@@ -48439,6 +48476,18 @@ function getSourceLocationForComponent(component, components) {
48439
48476
  }
48440
48477
  return { position: position2, sourceDoc };
48441
48478
  }
48479
+ function doenetMLStringForReference(originalPath, allDoenetMLs) {
48480
+ if (!originalPath || originalPath.length === 0) {
48481
+ return "";
48482
+ }
48483
+ const startOffset = originalPath[0].position?.start.offset;
48484
+ const endOffset = originalPath[originalPath.length - 1].position?.end.offset;
48485
+ const sourceDoc = originalPath[0].sourceDoc ?? 0;
48486
+ if (startOffset == void 0 || endOffset == void 0) {
48487
+ return "";
48488
+ }
48489
+ return allDoenetMLs?.[sourceDoc]?.substring(startOffset, endOffset) ?? "";
48490
+ }
48442
48491
  const TAG_NAME_REGEX = /^[A-Za-z0-9_:-]+/;
48443
48492
  function narrowPositionToOpeningTag(position2, source) {
48444
48493
  if (!position2 || !source) {
@@ -48464,33 +48513,8 @@ function narrowPositionToOpeningTag(position2, source) {
48464
48513
  }
48465
48514
  };
48466
48515
  }
48467
- class DiagnosticError extends Error {
48468
- constructor({
48469
- code,
48470
- args
48471
- }) {
48472
- super(formatEnglishDiagnostic(code, args));
48473
- this.name = "DiagnosticError";
48474
- this.code = code;
48475
- if (args !== void 0) {
48476
- this.args = args;
48477
- }
48478
- }
48479
- }
48480
- function diagnosticCodeFrom(value) {
48481
- if (typeof value !== "object" || value === null || !("code" in value)) {
48482
- return {};
48483
- }
48484
- const code = value.code;
48485
- if (typeof code !== "string" || !isDiagnosticCode(code)) {
48486
- return {};
48487
- }
48488
- const args = value.args;
48489
- const argsAreUsable = typeof args === "object" && args !== null && !Array.isArray(args);
48490
- return {
48491
- code,
48492
- ...argsAreUsable ? { args } : {}
48493
- };
48516
+ function reportInternalError(message) {
48517
+ console.warn(`DoenetML internal: ${message}`);
48494
48518
  }
48495
48519
  function errorComponentState(message, source) {
48496
48520
  const codeAndArgs = diagnosticCodeFrom(source);
@@ -52395,11 +52419,15 @@ async function expandShadowingComposite({
52395
52419
  while (shadowedByShadowed?.length > 0) {
52396
52420
  if (shadowedByShadowed.includes(nameOfCompositeMediatingTheShadow)) {
52397
52421
  foundCircular = true;
52398
- let message = "Circular dependency detected";
52399
- if (component.attributes.createComponentOfType?.primitive) {
52400
- message += ` involving \`<${component.attributes.createComponentOfType.primitive.value}>\` component`;
52401
- }
52402
- message += ".";
52422
+ const circular = codedDiagnostic({
52423
+ type: "error",
52424
+ code: "doenet-e0005",
52425
+ args: {
52426
+ componentType: component.attributes.createComponentOfType?.primitive?.value ?? "none"
52427
+ },
52428
+ position: compositeMediatingTheShadow.position,
52429
+ sourceDoc: compositeMediatingTheShadow.sourceDoc
52430
+ });
52403
52431
  serializedReplacements = [
52404
52432
  {
52405
52433
  type: "serialized",
@@ -52408,17 +52436,12 @@ async function expandShadowingComposite({
52408
52436
  attributes: {},
52409
52437
  doenetAttributes: {},
52410
52438
  children: [],
52411
- state: { message },
52439
+ state: errorComponentState(circular.message, circular),
52412
52440
  position: compositeMediatingTheShadow.position,
52413
52441
  sourceDoc: compositeMediatingTheShadow.sourceDoc
52414
52442
  }
52415
52443
  ];
52416
- core2.addDiagnostic({
52417
- type: "error",
52418
- message,
52419
- position: compositeMediatingTheShadow.position,
52420
- sourceDoc: compositeMediatingTheShadow.sourceDoc
52421
- });
52444
+ core2.addDiagnostic(circular);
52422
52445
  break;
52423
52446
  }
52424
52447
  shadowedByShadowed = shadowedByShadowed.reduce(
@@ -52535,7 +52558,8 @@ async function createAndSetReplacements({
52535
52558
  console.error(e32);
52536
52559
  component.replacements = await core2.setErrorReplacements({
52537
52560
  composite: component,
52538
- message: e32.message
52561
+ message: e32.message,
52562
+ source: e32
52539
52563
  });
52540
52564
  }
52541
52565
  core2.parameterStack.pop();
@@ -53083,18 +53107,13 @@ function defaultReturnEntryDimensions() {
53083
53107
  return 0;
53084
53108
  }
53085
53109
  function multiDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayValues = this.arrayValues }) {
53086
- const component = this.svComponent;
53087
- const addDiagnostic = component.coreFunctions.addDiagnostic;
53088
53110
  const numDimensions = this.numDimensions;
53089
53111
  let index2 = this.keyToIndex(arrayKey);
53090
53112
  let numDimensionsInArrayKey = index2.length;
53091
53113
  if (numDimensionsInArrayKey > numDimensions) {
53092
- addDiagnostic({
53093
- type: "info",
53094
- message: "Cannot set array value. Number of dimensions is too large.",
53095
- position: component.position,
53096
- sourceDoc: component.sourceDoc
53097
- });
53114
+ reportInternalError(
53115
+ "Cannot set array value. Number of dimensions is too large."
53116
+ );
53098
53117
  return { nFailures: 1 };
53099
53118
  }
53100
53119
  let arrayValuesDrillDown = arrayValues;
@@ -53107,12 +53126,7 @@ function multiDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayVa
53107
53126
  arrayValuesDrillDown = arrayValuesDrillDown[indComponent];
53108
53127
  arraySizeDrillDown = arraySizeDrillDown.slice(1);
53109
53128
  } else {
53110
- addDiagnostic({
53111
- type: "info",
53112
- message: "ignore setting array value out of bounds",
53113
- position: component.position,
53114
- sourceDoc: component.sourceDoc
53115
- });
53129
+ reportInternalError("ignore setting array value out of bounds");
53116
53130
  return { nFailures: 1 };
53117
53131
  }
53118
53132
  }
@@ -53120,23 +53134,15 @@ function multiDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayVa
53120
53134
  if (numDimensionsInArrayKey < numDimensions) {
53121
53135
  let setArrayValuesPiece = function(desiredValue, arrayValuesPiece, arraySizePiece) {
53122
53136
  if (!Array.isArray(desiredValue)) {
53123
- addDiagnostic({
53124
- type: "info",
53125
- message: "ignoring array values with insufficient dimensions",
53126
- position: component.position,
53127
- sourceDoc: component.sourceDoc
53128
- });
53137
+ reportInternalError(
53138
+ "ignoring array values with insufficient dimensions"
53139
+ );
53129
53140
  return { nFailures: 1 };
53130
53141
  }
53131
53142
  let nFailuresSub = 0;
53132
53143
  let currentSize = arraySizePiece[0];
53133
53144
  if (desiredValue.length > currentSize) {
53134
- addDiagnostic({
53135
- type: "info",
53136
- message: "ignoring array values out of bounds",
53137
- position: component.position,
53138
- sourceDoc: component.sourceDoc
53139
- });
53145
+ reportInternalError("ignoring array values out of bounds");
53140
53146
  nFailuresSub += desiredValue.length - currentSize;
53141
53147
  desiredValue = desiredValue.slice(0, currentSize);
53142
53148
  }
@@ -53176,13 +53182,9 @@ function oneDimSetArrayValue({ value, arrayKey, arraySize: arraySize2, arrayValu
53176
53182
  arrayValues[ind] = value;
53177
53183
  return { nFailures: 0 };
53178
53184
  } else {
53179
- const component = this.svComponent;
53180
- component.coreFunctions.addDiagnostic({
53181
- type: "info",
53182
- message: `Ignoring setting array values out of bounds: ${arrayKey} of ${this.svVarName}`,
53183
- position: component.position,
53184
- sourceDoc: component.sourceDoc
53185
- });
53185
+ reportInternalError(
53186
+ `Ignoring setting array values out of bounds: ${arrayKey} of ${this.svVarName}`
53187
+ );
53186
53188
  return { nFailures: 1 };
53187
53189
  }
53188
53190
  }
@@ -54185,8 +54187,25 @@ async function arrayEntryNamesFromPropIndex({
54185
54187
  core: core2,
54186
54188
  stateVariables,
54187
54189
  component,
54188
- propIndex
54190
+ propIndex,
54191
+ reference
54189
54192
  }) {
54193
+ function reportPropIndexFailure(varName, detail) {
54194
+ reportInternalError(
54195
+ `Cannot get propIndex from ${varName} of ${component.componentIdx}${detail}`
54196
+ );
54197
+ if (reference) {
54198
+ core2.addDiagnostic(
54199
+ codedDiagnostic({
54200
+ type: "warning",
54201
+ code: "doenet-w0100",
54202
+ args: { reference: reference.text },
54203
+ position: reference.position,
54204
+ sourceDoc: reference.sourceDoc
54205
+ })
54206
+ );
54207
+ }
54208
+ }
54190
54209
  let newVarNames = [];
54191
54210
  for (let varName of stateVariables) {
54192
54211
  let stateVarObj = component.state[varName];
@@ -54214,23 +54233,16 @@ async function arrayEntryNamesFromPropIndex({
54214
54233
  varName
54215
54234
  );
54216
54235
  } else {
54217
- core2.addDiagnostic({
54218
- type: "warning",
54219
- message: `Cannot get propIndex from ${varName} of ${component.componentIdx} as it is not an array or array entry state variable`,
54220
- position: component.position,
54221
- sourceDoc: component.sourceDoc
54222
- });
54236
+ reportPropIndexFailure(
54237
+ varName,
54238
+ " as it is not an array or array entry state variable"
54239
+ );
54223
54240
  newName = varName;
54224
54241
  }
54225
54242
  if (newName) {
54226
54243
  newVarNames.push(newName);
54227
54244
  } else {
54228
- core2.addDiagnostic({
54229
- type: "warning",
54230
- message: `Cannot get propIndex from ${varName} of ${component.componentIdx}`,
54231
- position: component.position,
54232
- sourceDoc: component.sourceDoc
54233
- });
54245
+ reportPropIndexFailure(varName, "");
54234
54246
  newVarNames.push(varName);
54235
54247
  }
54236
54248
  }
@@ -55305,10 +55317,17 @@ function validateAttributeValue({
55305
55317
  );
55306
55318
  }
55307
55319
  }
55308
- diagnostics2.push({
55309
- message: `Invalid value \`${valueOrig}\` for attribute \`${attribute}\`, using value \`${defaultValue}\``,
55310
- type: "info"
55311
- });
55320
+ diagnostics2.push(
55321
+ codedDiagnostic({
55322
+ type: "info",
55323
+ code: "doenet-i0048",
55324
+ args: {
55325
+ value: String(valueOrig),
55326
+ attribute,
55327
+ default: String(defaultValue)
55328
+ }
55329
+ })
55330
+ );
55312
55331
  value = defaultValue;
55313
55332
  }
55314
55333
  } else if (attributeSpecification.clamp) {
@@ -55348,10 +55367,9 @@ async function addComponents({
55348
55367
  if (!initialAdd) {
55349
55368
  parent = core2._components[parentIdx];
55350
55369
  if (!parent) {
55351
- core2.addDiagnostic({
55352
- type: "warning",
55353
- message: `Cannot add children to parent ${parentIdx} as ${parentIdx} does not exist`
55354
- });
55370
+ reportInternalError(
55371
+ `Cannot add children to parent ${parentIdx} as ${parentIdx} does not exist`
55372
+ );
55355
55373
  return [];
55356
55374
  }
55357
55375
  ancestors = ancestorsForChild(parent);
@@ -56094,13 +56112,19 @@ async function deriveChildResultsFromDefiningChildren({
56094
56112
  if (parent.doenetAttributes.isAttributeChildFor) {
56095
56113
  let attributeForComponentType = parent.ancestors[0].componentClass.componentType;
56096
56114
  core2.unmatchedChildren[parent.componentIdx] = {
56097
- message: `Invalid format for attribute ${parent.doenetAttributes.isAttributeChildFor} of \`<${attributeForComponentType}>\`.`
56115
+ code: "doenet-w0106",
56116
+ args: {
56117
+ attribute: parent.doenetAttributes.isAttributeChildFor,
56118
+ componentType: attributeForComponentType
56119
+ }
56098
56120
  };
56099
56121
  } else {
56100
56122
  core2.unmatchedChildren[parent.componentIdx] = {
56101
- message: `Invalid children for \`<${parent.componentType}>\`: Found invalid children: ${unmatchedChildrenTypes.join(
56102
- ", "
56103
- )}`
56123
+ code: "doenet-w0107",
56124
+ args: {
56125
+ componentType: parent.componentType,
56126
+ children: unmatchedChildrenTypes.join(", ")
56127
+ }
56104
56128
  };
56105
56129
  }
56106
56130
  }
@@ -56845,11 +56869,22 @@ const _Dependency = class _Dependency2 {
56845
56869
  mappedVarNames = convertedVarNames;
56846
56870
  }
56847
56871
  if (this.propIndex !== void 0) {
56872
+ const referringComponent = this.dependencyHandler.core._components[this.upstreamComponentIdx];
56873
+ const referenceText = doenetMLStringForReference(
56874
+ referringComponent?.refResolution?.originalPath,
56875
+ this.dependencyHandler.core.allDoenetMLs
56876
+ );
56848
56877
  mappedVarNames = await arrayEntryNamesFromPropIndex({
56849
56878
  core: this.dependencyHandler.core,
56850
56879
  stateVariables: mappedVarNames,
56851
56880
  component: downComponent,
56852
- propIndex: this.propIndex
56881
+ propIndex: this.propIndex,
56882
+ reference: referenceText ? {
56883
+ text: `$${referenceText}`,
56884
+ // Marked where the index was written.
56885
+ position: referringComponent.position,
56886
+ sourceDoc: referringComponent.sourceDoc
56887
+ } : void 0
56853
56888
  });
56854
56889
  }
56855
56890
  let downVarNames = mappedVarNames;
@@ -59992,17 +60027,10 @@ const _RefResolutionDependency = class _RefResolutionDependency2 extends Depende
59992
60027
  ]);
59993
60028
  }
59994
60029
  let refResolution;
59995
- const getDoenetMLStringForReference = () => {
59996
- const originalPath = composite.refResolution.originalPath;
59997
- const startOffset = originalPath[0].position?.start.offset;
59998
- const endOffset = originalPath[originalPath.length - 1].position?.end.offset;
59999
- const sourceDoc = originalPath[0].sourceDoc ?? 0;
60000
- let doenetMLString = "";
60001
- if (startOffset != void 0 && endOffset != void 0) {
60002
- doenetMLString = this.dependencyHandler.core.allDoenetMLs?.[sourceDoc]?.substring(startOffset, endOffset) ?? "";
60003
- }
60004
- return doenetMLString;
60005
- };
60030
+ const getDoenetMLStringForReference = () => doenetMLStringForReference(
60031
+ composite.refResolution.originalPath,
60032
+ this.dependencyHandler.core.allDoenetMLs
60033
+ );
60006
60034
  const skip_parent_search = resolveComponentResult.path[0].name === "";
60007
60035
  try {
60008
60036
  refResolution = this.dependencyHandler.core.resolvePath(
@@ -60013,13 +60041,18 @@ const _RefResolutionDependency = class _RefResolutionDependency2 extends Depende
60013
60041
  } catch (e32) {
60014
60042
  if (e32 === "NonUniqueReferent" || e32 === "NoReferent") {
60015
60043
  const referenceText = getDoenetMLStringForReference();
60016
- const message = e32 === "NonUniqueReferent" ? `Multiple referents found for reference: \`$${referenceText}\`` : `No referent found for reference: \`$${referenceText}\``;
60017
- this.dependencyHandler.core.addDiagnostic({
60018
- type: "warning",
60019
- message,
60020
- position: composite.position,
60021
- sourceDoc: composite.sourceDoc
60022
- });
60044
+ this.dependencyHandler.core.addDiagnostic(
60045
+ codedDiagnostic({
60046
+ type: "warning",
60047
+ // Spread rather than a ternary on the value: the
60048
+ // code has to sit next to `code:` as a literal, or
60049
+ // `lint:i18n` reads it as a code nothing raises.
60050
+ ...e32 === "NonUniqueReferent" ? { code: "doenet-w0105" } : { code: "doenet-w0104" },
60051
+ args: { reference: `$${referenceText}` },
60052
+ position: composite.position,
60053
+ sourceDoc: composite.sourceDoc
60054
+ })
60055
+ );
60023
60056
  this.extendIdx = -1;
60024
60057
  this.unresolvedPath = this.originalPath;
60025
60058
  return {
@@ -60079,12 +60112,15 @@ const _RefResolutionDependency = class _RefResolutionDependency2 extends Depende
60079
60112
  };
60080
60113
  }
60081
60114
  const referenceText = getDoenetMLStringForReference();
60082
- this.dependencyHandler.core.addDiagnostic({
60083
- type: "warning",
60084
- message: `No referent found for reference: \`$${referenceText}\``,
60085
- position: composite.position,
60086
- sourceDoc: composite.sourceDoc
60087
- });
60115
+ this.dependencyHandler.core.addDiagnostic(
60116
+ codedDiagnostic({
60117
+ type: "warning",
60118
+ code: "doenet-w0104",
60119
+ args: { reference: `$${referenceText}` },
60120
+ position: composite.position,
60121
+ sourceDoc: composite.sourceDoc
60122
+ })
60123
+ );
60088
60124
  this.compositeReplacementDependencies.push(
60089
60125
  newRefComponent.componentIdx
60090
60126
  );
@@ -65010,7 +65046,8 @@ class CompositeReplacementUpdater {
65010
65046
  console.error(e32);
65011
65047
  newComponents = await this.setErrorReplacements({
65012
65048
  composite: component,
65013
- message: e32.message
65049
+ message: e32.message,
65050
+ source: e32
65014
65051
  });
65015
65052
  }
65016
65053
  this.core.parameterStack.pop();
@@ -65194,11 +65231,13 @@ class CompositeReplacementUpdater {
65194
65231
  }
65195
65232
  async setErrorReplacements({
65196
65233
  composite,
65197
- message
65234
+ message,
65235
+ source
65198
65236
  }) {
65199
65237
  this.core.addDiagnostic({
65200
65238
  type: "error",
65201
65239
  message,
65240
+ ...diagnosticCodeFrom(source),
65202
65241
  position: composite.position,
65203
65242
  sourceDoc: composite.sourceDoc
65204
65243
  });
@@ -65207,7 +65246,10 @@ class CompositeReplacementUpdater {
65207
65246
  type: "serialized",
65208
65247
  componentType: "_error",
65209
65248
  componentIdx: this.core._components.length,
65210
- state: { message },
65249
+ // The same code the record above forwards. Coding one and not
65250
+ // the other would leave the error on screen in English while
65251
+ // the diagnostics panel showed it translated.
65252
+ state: errorComponentState(message, source),
65211
65253
  position: composite.position,
65212
65254
  sourceDoc: composite.sourceDoc,
65213
65255
  children: [],
@@ -65501,7 +65543,8 @@ class CompositeReplacementUpdater {
65501
65543
  console.error(e32);
65502
65544
  newComponents = await this.setErrorReplacements({
65503
65545
  composite: shadowingComponent,
65504
- message: e32.message
65546
+ message: e32.message,
65547
+ source: e32
65505
65548
  });
65506
65549
  }
65507
65550
  this.core.parameterStack.pop();
@@ -66009,21 +66052,15 @@ class EssentialValueWriter {
66009
66052
  continue;
66010
66053
  }
66011
66054
  }
66012
- this.core.addDiagnostic({
66013
- type: "info",
66014
- message: `can't update state variable ${vName} of component ${cIdx}, as it doesn't exist.`,
66015
- position: this.core._components[cIdx].position,
66016
- sourceDoc: this.core._components[cIdx].sourceDoc
66017
- });
66055
+ reportInternalError(
66056
+ `can't update state variable ${vName} of component ${cIdx}, as it doesn't exist.`
66057
+ );
66018
66058
  continue;
66019
66059
  }
66020
66060
  if (!compStateObj.hasEssential) {
66021
- this.core.addDiagnostic({
66022
- type: "info",
66023
- message: `can't update state variable ${vName} of component ${cIdx}, as it does not have an essential state variable.`,
66024
- position: this.core._components[cIdx].position,
66025
- sourceDoc: this.core._components[cIdx].sourceDoc
66026
- });
66061
+ reportInternalError(
66062
+ `can't update state variable ${vName} of component ${cIdx}, as it does not have an essential state variable.`
66063
+ );
66027
66064
  continue;
66028
66065
  }
66029
66066
  let essentialVarName = vName;
@@ -66244,51 +66281,36 @@ class EssentialValueWriter {
66244
66281
  if (!stateVarObj.additionalStateVariablesDefined.includes(
66245
66282
  varName2
66246
66283
  )) {
66247
- this.core.addDiagnostic({
66248
- type: "info",
66249
- message: `Can't invert ${varName2} at the same time as ${stateVariable}, as not an additional state variable defined`,
66250
- position: component.position,
66251
- sourceDoc: component.sourceDoc
66252
- });
66284
+ reportInternalError(
66285
+ `Can't invert ${varName2} at the same time as ${stateVariable}, as not an additional state variable defined`
66286
+ );
66253
66287
  continue;
66254
66288
  }
66255
66289
  inverseDefinitionArgs.desiredStateVariableValues[varName2] = instruction.additionalStateVariableValues[varName2];
66256
66290
  }
66257
66291
  }
66258
66292
  if (!stateVarObj.inverseDefinition) {
66259
- this.core.addDiagnostic({
66260
- type: "info",
66261
- message: `Cannot change state variable ${stateVariable} of ${component.componentIdx} as it doesn't have an inverse definition`,
66262
- position: component.position,
66263
- sourceDoc: component.sourceDoc
66264
- });
66293
+ reportInternalError(
66294
+ `Cannot change state variable ${stateVariable} of ${component.componentIdx} as it doesn't have an inverse definition`
66295
+ );
66265
66296
  return;
66266
66297
  }
66267
66298
  if (!instruction.overrideFixed && !stateVarObj.ignoreFixed && await component.stateValues.fixed) {
66268
- this.core.addDiagnostic({
66269
- type: "info",
66270
- message: `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixed is true.`,
66271
- position: component.position,
66272
- sourceDoc: component.sourceDoc
66273
- });
66299
+ reportInternalError(
66300
+ `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixed is true.`
66301
+ );
66274
66302
  return;
66275
66303
  }
66276
66304
  if (!instruction.overrideFixed && stateVarObj.isLocation && await component.stateValues.fixLocation) {
66277
- this.core.addDiagnostic({
66278
- type: "info",
66279
- message: `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixLocation is true.`,
66280
- position: component.position,
66281
- sourceDoc: component.sourceDoc
66282
- });
66305
+ reportInternalError(
66306
+ `Changing ${stateVariable} of ${component.componentIdx} did not succeed because fixLocation is true.`
66307
+ );
66283
66308
  return;
66284
66309
  }
66285
66310
  if (!(initialChange || await component.stateValues.modifyIndirectly !== false)) {
66286
- this.core.addDiagnostic({
66287
- type: "info",
66288
- message: `Changing ${stateVariable} of ${component.componentIdx} did not succeed because modifyIndirectly is false.`,
66289
- position: component.position,
66290
- sourceDoc: component.sourceDoc
66291
- });
66311
+ reportInternalError(
66312
+ `Changing ${stateVariable} of ${component.componentIdx} did not succeed because modifyIndirectly is false.`
66313
+ );
66292
66314
  return;
66293
66315
  }
66294
66316
  let inverseResult = await stateVarObj.inverseDefinition(
@@ -66472,21 +66494,15 @@ class EssentialValueWriter {
66472
66494
  while (baseComponent.shadows && (baseComponent.shadows.propVariable === void 0 || baseComponent.doenetAttributes.fromImplicitProp && this.core._components[baseComponent.shadows.componentIdx].constructor.implicitPropReturnsSameType)) {
66473
66495
  baseComponent = this.core._components[baseComponent.shadows.componentIdx];
66474
66496
  if (!instruction.overrideFixed && !stateVarObj.ignoreFixed && await baseComponent.stateValues.fixed) {
66475
- this.core.addDiagnostic({
66476
- type: "info",
66477
- message: `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixed is true.`,
66478
- position: baseComponent.position,
66479
- sourceDoc: baseComponent.sourceDoc
66480
- });
66497
+ reportInternalError(
66498
+ `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixed is true.`
66499
+ );
66481
66500
  return;
66482
66501
  }
66483
66502
  if (!instruction.overrideFixed && !stateVarObj.isLocation && await baseComponent.stateValues.fixLocation) {
66484
- this.core.addDiagnostic({
66485
- type: "info",
66486
- message: `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixLocation is true.`,
66487
- position: baseComponent.position,
66488
- sourceDoc: baseComponent.sourceDoc
66489
- });
66503
+ reportInternalError(
66504
+ `Changing ${stateVariable} of ${baseComponent.componentIdx} did not succeed because fixLocation is true.`
66505
+ );
66490
66506
  return;
66491
66507
  }
66492
66508
  }
@@ -66620,24 +66636,18 @@ class EssentialValueWriter {
66620
66636
  "stateVariable",
66621
66637
  "parentStateVariable"
66622
66638
  ].includes(dep2.dependencyType) && dep2.downstreamComponentIndices.length === 1)) {
66623
- this.core.addDiagnostic({
66624
- type: "info",
66625
- message: `Can't simultaneously set additional dependency value ${dependencyName2} if it isn't a state variable`,
66626
- position: this.core._components[dComponentIdx].position,
66627
- sourceDoc: this.core._components[dComponentIdx].sourceDoc
66628
- });
66639
+ reportInternalError(
66640
+ `Can't simultaneously set additional dependency value ${dependencyName2} if it isn't a state variable`
66641
+ );
66629
66642
  continue;
66630
66643
  }
66631
66644
  let varName2 = dep2.mappedDownstreamVariableNamesByComponent[0][0];
66632
66645
  if (dep2.downstreamComponentIndices[0] !== dComponentIdx || !stateVarObj2.additionalStateVariablesDefined.includes(
66633
66646
  varName2
66634
66647
  )) {
66635
- this.core.addDiagnostic({
66636
- type: "info",
66637
- message: `Can't simultaneously set additional dependency value ${dependencyName2} if it doesn't correspond to additional state variable defined of ${dependencyName}'s state variable`,
66638
- position: this.core._components[dComponentIdx].position,
66639
- sourceDoc: this.core._components[dComponentIdx].sourceDoc
66640
- });
66648
+ reportInternalError(
66649
+ `Can't simultaneously set additional dependency value ${dependencyName2} if it doesn't correspond to additional state variable defined of ${dependencyName}'s state variable`
66650
+ );
66641
66651
  continue;
66642
66652
  }
66643
66653
  if (!inst.additionalStateVariableValues) {
@@ -68982,8 +68992,13 @@ class UpdateExecutor {
68982
68992
  * Main path: look up `component.actions[actionName]` (with optional
68983
68993
  * case-insensitive fallback when `caseInsensitiveMatch` is set), record
68984
68994
  * the `event` if provided, and `await` the action. Returns
68985
- * `{ actionId }` on success. If the component exists but the action
68986
- * does not, a warning diagnostic is added and `{}` is returned.
68995
+ * `{ actionId }` on success. If the component exists but the action does
68996
+ * not, `{ actionUnavailable: true }` is returned: what an author can be
68997
+ * told about that depends on how the action was asked for, and only the
68998
+ * caller knows. `<callAction>` turns it into a warning naming the
68999
+ * `target` the author wrote; everything else reaches here from a
69000
+ * renderer or from the core itself, where there is nothing an author
69001
+ * wrote to name, so all that is left is a line on the console.
68987
69002
  */
68988
69003
  async performAction({
68989
69004
  componentIdx,
@@ -69059,12 +69074,10 @@ class UpdateExecutor {
69059
69074
  return { actionId: args.actionId };
69060
69075
  }
69061
69076
  if (component) {
69062
- this.core.addDiagnostic({
69063
- type: "warning",
69064
- message: `Cannot run action ${actionName} on component ${componentIdx}`,
69065
- position: component.position,
69066
- sourceDoc: component.sourceDoc
69067
- });
69077
+ reportInternalError(
69078
+ `Cannot run action ${actionName} on component ${componentIdx}`
69079
+ );
69080
+ return { actionUnavailable: true };
69068
69081
  }
69069
69082
  return {};
69070
69083
  }
@@ -69167,10 +69180,9 @@ class UpdateExecutor {
69167
69180
  if (component) {
69168
69181
  componentsToDelete.push(component);
69169
69182
  } else {
69170
- this.core.addDiagnostic({
69171
- type: "info",
69172
- message: `Cannot delete ${componentIdx} as it doesn't exist.`
69173
- });
69183
+ reportInternalError(
69184
+ `Cannot delete ${componentIdx} as it doesn't exist.`
69185
+ );
69174
69186
  }
69175
69187
  }
69176
69188
  if (componentsToDelete.length > 0) {
@@ -69636,8 +69648,8 @@ function requireCore() {
69636
69648
  if (!crypto2 && typeof window !== "undefined" && window.msCrypto) {
69637
69649
  crypto2 = window.msCrypto;
69638
69650
  }
69639
- if (!crypto2 && typeof commonjsGlobal$1 !== "undefined" && commonjsGlobal$1.crypto) {
69640
- crypto2 = commonjsGlobal$1.crypto;
69651
+ if (!crypto2 && typeof commonjsGlobal !== "undefined" && commonjsGlobal.crypto) {
69652
+ crypto2 = commonjsGlobal.crypto;
69641
69653
  }
69642
69654
  if (!crypto2 && typeof commonjsRequire === "function") {
69643
69655
  try {
@@ -70309,7 +70321,7 @@ function requireSha1() {
70309
70321
  return sha1$2.exports;
70310
70322
  }
70311
70323
  var sha1Exports = requireSha1();
70312
- const sha1 = /* @__PURE__ */ getDefaultExportFromCjs$1(sha1Exports);
70324
+ const sha1 = /* @__PURE__ */ getDefaultExportFromCjs(sha1Exports);
70313
70325
  var encBase64$1 = { exports: {} };
70314
70326
  var encBase64 = encBase64$1.exports;
70315
70327
  var hasRequiredEncBase64;
@@ -70419,7 +70431,7 @@ function requireEncBase64() {
70419
70431
  return encBase64$1.exports;
70420
70432
  }
70421
70433
  var encBase64Exports = requireEncBase64();
70422
- const Base64 = /* @__PURE__ */ getDefaultExportFromCjs$1(encBase64Exports);
70434
+ const Base64 = /* @__PURE__ */ getDefaultExportFromCjs(encBase64Exports);
70423
70435
  var defaults$1;
70424
70436
  var hasRequiredDefaults;
70425
70437
  function requireDefaults() {
@@ -70525,7 +70537,7 @@ function requireLib() {
70525
70537
  return lib;
70526
70538
  }
70527
70539
  var libExports = requireLib();
70528
- const stringify = /* @__PURE__ */ getDefaultExportFromCjs$1(libExports);
70540
+ const stringify = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
70529
70541
  function returnScoredContainerAncestorDependency(...variableNames) {
70530
70542
  return {
70531
70543
  dependencyType: "ancestor",
@@ -71262,6 +71274,11 @@ class Core {
71262
71274
  requestComponentDoenetML: this.requestComponentDoenetML.bind(this),
71263
71275
  copyToClipboard: this.copyToClipboard.bind(this),
71264
71276
  navigateToTarget: (args) => navigateToTarget({ core: this, args }),
71277
+ // The DoenetML behind a reference a component holds, so a
71278
+ // component can name a `target` back to the author as they wrote
71279
+ // it. The source text lives on core; the resolved path a
71280
+ // component has is the half that needs looking up in it.
71281
+ doenetMLStringForReference: (originalPath) => doenetMLStringForReference(originalPath, this.allDoenetMLs),
71265
71282
  // State-variable runtime plumbing, not component-facing API:
71266
71283
  // the shared state-variable functions in StateVariableInitializer
71267
71284
  // reach core through `svComponent.coreFunctions`.
@@ -71445,12 +71462,16 @@ class Core {
71445
71462
  if (Object.keys(this.unmatchedChildren).length > 0) {
71446
71463
  for (const componentIdxStr in this.unmatchedChildren) {
71447
71464
  let parent = this._components[Number(componentIdxStr)];
71448
- this.addDiagnostic({
71449
- type: "warning",
71450
- message: this.unmatchedChildren[Number(componentIdxStr)].message,
71451
- position: parent.position,
71452
- sourceDoc: parent.sourceDoc
71453
- });
71465
+ const unmatched = this.unmatchedChildren[Number(componentIdxStr)];
71466
+ this.addDiagnostic(
71467
+ codedDiagnostic({
71468
+ type: "warning",
71469
+ code: unmatched.code,
71470
+ args: unmatched.args,
71471
+ position: parent.position,
71472
+ sourceDoc: parent.sourceDoc
71473
+ })
71474
+ );
71454
71475
  }
71455
71476
  }
71456
71477
  let diagnostics2 = void 0;
@@ -216064,7 +216085,14 @@ class CallAction extends InlineComponent {
216064
216085
  definition: () => ({ setValue: { clickAction: "callAction" } })
216065
216086
  };
216066
216087
  stateVariableDefinitions.targetComponentIdx = {
216067
- additionalStateVariablesDefined: ["unresolvedPath"],
216088
+ // `targetOriginalPath` is the resolved path of the `target`
216089
+ // reference, kept so that a failure can quote back the `$…` the
216090
+ // author typed. The component index alone is no use for that:
216091
+ // it never appeared in the document.
216092
+ additionalStateVariablesDefined: [
216093
+ "unresolvedPath",
216094
+ "targetOriginalPath"
216095
+ ],
216068
216096
  returnDependencies: () => ({
216069
216097
  target: {
216070
216098
  dependencyType: "attributeRefResolutions",
@@ -216078,7 +216106,8 @@ class CallAction extends InlineComponent {
216078
216106
  return {
216079
216107
  setValue: {
216080
216108
  targetComponentIdx: target.componentIdx,
216081
- unresolvedPath: target.unresolvedPath
216109
+ unresolvedPath: target.unresolvedPath,
216110
+ targetOriginalPath: target.originalPath
216082
216111
  }
216083
216112
  };
216084
216113
  }
@@ -216086,7 +216115,8 @@ class CallAction extends InlineComponent {
216086
216115
  return {
216087
216116
  setValue: {
216088
216117
  targetComponentIdx: null,
216089
- unresolvedPath: null
216118
+ unresolvedPath: null,
216119
+ targetOriginalPath: null
216090
216120
  }
216091
216121
  };
216092
216122
  }
@@ -216114,7 +216144,7 @@ class CallAction extends InlineComponent {
216114
216144
  if (actionId) {
216115
216145
  args.actionId = actionId;
216116
216146
  }
216117
- await this.coreFunctions.performAction({
216147
+ const result2 = await this.coreFunctions.performAction({
216118
216148
  componentIdx: targetIdx,
216119
216149
  actionName,
216120
216150
  args,
@@ -216127,6 +216157,9 @@ class CallAction extends InlineComponent {
216127
216157
  },
216128
216158
  caseInsensitiveMatch: true
216129
216159
  });
216160
+ if (result2?.actionUnavailable) {
216161
+ await this.warnActionUnavailable(actionName);
216162
+ }
216130
216163
  await this.coreFunctions.triggerChainedActions({
216131
216164
  componentIdx: this.componentIdx,
216132
216165
  actionId,
@@ -216135,6 +216168,32 @@ class CallAction extends InlineComponent {
216135
216168
  });
216136
216169
  }
216137
216170
  }
216171
+ /**
216172
+ * Warn that `actionName` is not an action of the component `target`
216173
+ * names, quoting the reference as the author wrote it.
216174
+ *
216175
+ * Says nothing when the reference has no source behind it — a `target`
216176
+ * a composite built rather than a document supplied. There is no text to
216177
+ * quote then, and a warning that names an empty reference tells an author
216178
+ * less than the console line `performAction` has already written.
216179
+ */
216180
+ async warnActionUnavailable(actionName) {
216181
+ const referenceText = this.coreFunctions.doenetMLStringForReference(
216182
+ await this.stateValues.targetOriginalPath
216183
+ );
216184
+ if (!referenceText) {
216185
+ return;
216186
+ }
216187
+ this.coreFunctions.addDiagnostic(
216188
+ codedDiagnostic({
216189
+ type: "warning",
216190
+ code: "doenet-w0102",
216191
+ args: { action: actionName, reference: `$${referenceText}` },
216192
+ position: this.position,
216193
+ sourceDoc: this.sourceDoc
216194
+ })
216195
+ );
216196
+ }
216138
216197
  async callActionIfTriggerNewlyTrue({
216139
216198
  stateValues,
216140
216199
  previousValues,
@@ -228779,27 +228838,26 @@ class Copy extends CompositeComponent {
228779
228838
  }
228780
228839
  }
228781
228840
  console.error("we're calling this circular", e32);
228782
- let message = "Circular dependency detected";
228783
- if (component.attributes.createComponentOfType?.primitive) {
228784
- message += ` involving \`<${component.attributes.createComponentOfType.primitive.value}>\` component`;
228785
- }
228786
- message += ".";
228841
+ const circular = codedDiagnostic({
228842
+ type: "error",
228843
+ code: "doenet-e0005",
228844
+ args: {
228845
+ componentType: component.attributes.createComponentOfType?.primitive?.value ?? "none"
228846
+ }
228847
+ });
228787
228848
  serializedReplacements = [
228788
228849
  {
228789
228850
  type: "serialized",
228790
228851
  componentType: "_error",
228791
228852
  componentIdx: nComponents++,
228792
228853
  stateId: `${stateIdInfo.prefix}${stateIdInfo.num++}`,
228793
- state: { message },
228854
+ state: errorComponentState(circular.message, circular),
228794
228855
  attributes: {},
228795
228856
  doenetAttributes: {},
228796
228857
  children: []
228797
228858
  }
228798
228859
  ];
228799
- diagnostics2.push({
228800
- message,
228801
- type: "error"
228802
- });
228860
+ diagnostics2.push(circular);
228803
228861
  return { serializedReplacements, diagnostics: diagnostics2, nComponents };
228804
228862
  }
228805
228863
  if (!link && serializedReplacements[0].state) {
@@ -233460,7 +233518,7 @@ const upgradeRefElement = () => {
233460
233518
  };
233461
233519
  export {
233462
233520
  updateSyntaxFromV06toV07_root as a,
233463
- getDefaultExportFromCjs as g,
233521
+ getDefaultExportFromCjs$1 as g,
233464
233522
  updateSyntaxFromV06toV07 as u
233465
233523
  };
233466
- //# sourceMappingURL=index-B8gGm0cZ.js.map
233524
+ //# sourceMappingURL=index-zKFRcpBN.js.map