@doenet/v06-to-v07 0.7.21-dev.367 → 0.7.21-dev.368

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.
@@ -42591,7 +42591,7 @@ async function cidFromArrayBuffer(data) {
42591
42591
  await crypto.subtle.digest("SHA-256", new Uint8Array());
42592
42592
  digest = (data2) => crypto.subtle.digest("SHA-256", data2);
42593
42593
  } catch (e22) {
42594
- const sha256 = (await import("./sha256-1m3pbIuR-doXkfhnK-DnBnHZ9g.js").then((n2) => n2.s)).default;
42594
+ const sha256 = (await import("./sha256-1m3pbIuR-C9EeBBiw-C-sYwf5C.js").then((n2) => n2.s)).default;
42595
42595
  digest = (data2) => sha256(data2, {
42596
42596
  asBytes: true
42597
42597
  });
@@ -46357,7 +46357,7 @@ class Indent {
46357
46357
  }
46358
46358
  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";
46359
46359
  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';
46360
- 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';
46360
+ 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';
46361
46361
  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";
46362
46362
  const CATALOG_NAMESPACES = [
46363
46363
  "chrome",
@@ -46717,7 +46717,7 @@ function normalizeLocaleTag(tag2) {
46717
46717
  }
46718
46718
  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";
46719
46719
  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";
46720
- 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';
46720
+ 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';
46721
46721
  const BUNDLED_TRANSLATIONS = {
46722
46722
  es: {
46723
46723
  chrome: esChrome,
@@ -46771,6 +46771,12 @@ const DIAGNOSTIC_CODES = {
46771
46771
  "doenet-i0009": "pretzel-circuit-first-index",
46772
46772
  "doenet-i0010": "variant-index-must-be-number",
46773
46773
  "doenet-i0011": "variant-index-must-be-integer",
46774
+ "doenet-i0012": "sequence-invalid-length",
46775
+ "doenet-i0013": "sequence-invalid-step",
46776
+ "doenet-i0014": "sequence-invalid-endpoint-number",
46777
+ "doenet-i0015": "sequence-invalid-endpoint-letters",
46778
+ "doenet-i0016": "sequence-invalid-endpoint",
46779
+ "doenet-i0017": "angle-too-many-lines",
46774
46780
  "doenet-w0001": "line-points-undetermined-dimensions",
46775
46781
  "doenet-w0002": "line-points-too-few-dimensions",
46776
46782
  "doenet-w0003": "line-points-depend-on-variables",
@@ -46797,6 +46803,39 @@ const DIAGNOSTIC_CODES = {
46797
46803
  "doenet-w0024": "label-for-answer-with-authored-inputs",
46798
46804
  "doenet-w0025": "label-for-answer-without-input",
46799
46805
  "doenet-w0026": "label-for-must-reference-input-or-answer",
46806
+ "doenet-w0027": "circle-through-points-non-numerical",
46807
+ "doenet-w0028": "circle-too-many-through-points",
46808
+ "doenet-w0029": "circle-overprescribed-radius-center-points",
46809
+ "doenet-w0030": "circle-center-with-multiple-points",
46810
+ "doenet-w0031": "circle-radius-too-small",
46811
+ "doenet-w0032": "circle-radius-with-many-points",
46812
+ "doenet-w0033": "circle-invalid-center-or-through-points",
46813
+ "doenet-w0034": "circle-radius-center-with-multiple-points",
46814
+ "doenet-w0035": "circle-change-radius-non-numerical",
46815
+ "doenet-w0036": "circle-radius-with-points-non-numerical",
46816
+ "doenet-w0037": "circle-change-center-non-numerical",
46817
+ "doenet-w0038": "function-domain-insufficient-dimensions",
46818
+ "doenet-w0039": "function-domain-invalid-format",
46819
+ "doenet-w0040": "function-ignoring-non-numerical",
46820
+ "doenet-w0041": "function-ignoring-empty",
46821
+ "doenet-w0042": "function-points-too-close",
46822
+ "doenet-w0043": "target-not-found",
46823
+ "doenet-w0044": "target-state-variable-not-found",
46824
+ "doenet-w0045": "ode-system-variables-match-independent",
46825
+ "doenet-w0046": "ode-system-duplicate-variable-names",
46826
+ "doenet-w0047": "ode-system-rhs-function-error",
46827
+ "doenet-w0048": "angle-invalid-through-point",
46828
+ "doenet-w0049": "parabola-vertex-too-many-points",
46829
+ "doenet-w0050": "parabola-too-many-points",
46830
+ "doenet-w0051": "select-from-sequence-coprime-not-numbers",
46831
+ "doenet-w0052": "select-from-sequence-coprime-with-exclude-combinations",
46832
+ "doenet-w0053": "ionic-compound-not-two-ions",
46833
+ "doenet-w0054": "ionic-compound-needs-cation-and-anion",
46834
+ "doenet-w0055": "intersection-too-many-items",
46835
+ "doenet-w0056": "function-iterates-input-output-mismatch",
46836
+ "doenet-w0057": "solve-equations-cannot-evaluate",
46837
+ "doenet-w0058": "math-operators-operand-number-required",
46838
+ "doenet-w0059": "eigen-decomposition-failed",
46800
46839
  "doenet-a0001": "accessibility-short-description-or-decorative",
46801
46840
  "doenet-a0002": "accessibility-video-short-description",
46802
46841
  "doenet-a0003": "accessibility-input-short-description-or-label",
@@ -85040,10 +85079,10 @@ class ExtractMath extends MathOperatorOneInput {
85040
85079
  definition({ dependencyValues }) {
85041
85080
  if (dependencyValues.type === "operand") {
85042
85081
  if (dependencyValues.operandNumber === null) {
85043
- let warning = {
85044
- message: `Must specify a operandNumber when extracting a math operand.`,
85045
- type: "warning"
85046
- };
85082
+ let warning = codedDiagnostic({
85083
+ type: "warning",
85084
+ code: "doenet-w0058"
85085
+ });
85047
85086
  return {
85048
85087
  setValue: {
85049
85088
  mathOperator: () => Context.fromAst("_")
@@ -87076,13 +87115,15 @@ let Function$1 = class Function2 extends InlineComponent {
87076
87115
  numInputs
87077
87116
  );
87078
87117
  if (specifiedDomain.length !== numInputs) {
87079
- let warning = {
87118
+ let warning = codedDiagnostic({
87080
87119
  type: "warning",
87081
- message: `Insufficient dimensions for domain for function. Domain has ${specifiedDomain.length} interval${specifiedDomain.length === 1 ? "" : "s"} but the function has ${numInputs} input${numInputs === 1 ? "" : "s"}.`
87082
- };
87083
- if (globalDependencyValues.domainAttr.position) {
87084
- warning.position = globalDependencyValues.domainAttr.position;
87085
- }
87120
+ code: "doenet-w0038",
87121
+ args: {
87122
+ intervals: specifiedDomain.length,
87123
+ inputs: numInputs
87124
+ },
87125
+ position: globalDependencyValues.domainAttr.position || void 0
87126
+ });
87086
87127
  let infDomain = Context.fromAst([
87087
87128
  "interval",
87088
87129
  ["tuple", -Infinity, Infinity],
@@ -87102,13 +87143,11 @@ let Function$1 = class Function2 extends InlineComponent {
87102
87143
  Array.isArray(interval.tree) && interval.tree[0] === "interval"
87103
87144
  )
87104
87145
  )) {
87105
- let warning = {
87146
+ let warning = codedDiagnostic({
87106
87147
  type: "warning",
87107
- message: `Invalid format for domain for function.`
87108
- };
87109
- if (globalDependencyValues.domainAttr.position) {
87110
- warning.position = globalDependencyValues.domainAttr.position;
87111
- }
87148
+ code: "doenet-w0039",
87149
+ position: globalDependencyValues.domainAttr.position || void 0
87150
+ });
87112
87151
  let infDomain = Context.fromAst([
87113
87152
  "interval",
87114
87153
  ["tuple", -Infinity, Infinity],
@@ -90402,39 +90441,51 @@ function calculateInterpolationPoints({ dependencyValues, numerics }) {
90402
90441
  if (point2.x !== null) {
90403
90442
  x2 = point2.x.evaluate_to_constant();
90404
90443
  if (!Number.isFinite(x2)) {
90405
- diagnostics2.push({
90406
- message: `Ignoring non-numerical ${type} of function.`,
90407
- type: "warning"
90408
- });
90444
+ diagnostics2.push(
90445
+ codedDiagnostic({
90446
+ type: "warning",
90447
+ code: "doenet-w0040",
90448
+ args: { type }
90449
+ })
90450
+ );
90409
90451
  continue;
90410
90452
  }
90411
90453
  }
90412
90454
  if (point2.y !== null) {
90413
90455
  y2 = point2.y.evaluate_to_constant();
90414
90456
  if (!Number.isFinite(y2)) {
90415
- diagnostics2.push({
90416
- message: `Ignoring non-numerical ${type} of function.`,
90417
- type: "warning"
90418
- });
90457
+ diagnostics2.push(
90458
+ codedDiagnostic({
90459
+ type: "warning",
90460
+ code: "doenet-w0040",
90461
+ args: { type }
90462
+ })
90463
+ );
90419
90464
  continue;
90420
90465
  }
90421
90466
  }
90422
90467
  if (point2.slope !== null && point2.slope !== void 0) {
90423
90468
  slope = point2.slope.evaluate_to_constant();
90424
90469
  if (!Number.isFinite(slope)) {
90425
- diagnostics2.push({
90426
- message: `Ignoring non-numerical slope of function.`,
90427
- type: "warning"
90428
- });
90470
+ diagnostics2.push(
90471
+ codedDiagnostic({
90472
+ type: "warning",
90473
+ code: "doenet-w0040",
90474
+ args: { type: "slope" }
90475
+ })
90476
+ );
90429
90477
  slope = null;
90430
90478
  }
90431
90479
  }
90432
90480
  if (x2 === null) {
90433
90481
  if (y2 === null) {
90434
- diagnostics2.push({
90435
- message: `Ignoring empty ${type} of function.`,
90436
- type: "warning"
90437
- });
90482
+ diagnostics2.push(
90483
+ codedDiagnostic({
90484
+ type: "warning",
90485
+ code: "doenet-w0041",
90486
+ args: { type }
90487
+ })
90488
+ );
90438
90489
  continue;
90439
90490
  }
90440
90491
  pointsWithoutX.push({
@@ -90459,10 +90510,12 @@ function calculateInterpolationPoints({ dependencyValues, numerics }) {
90459
90510
  for (let ind = 0; ind < pointsWithX.length; ind++) {
90460
90511
  let p2 = pointsWithX[ind];
90461
90512
  if (p2.x <= xPrev + eps) {
90462
- diagnostics2.push({
90463
- message: `Function contains two points with locations too close together. Can't define function.`,
90464
- type: "warning"
90465
- });
90513
+ diagnostics2.push(
90514
+ codedDiagnostic({
90515
+ type: "warning",
90516
+ code: "doenet-w0042"
90517
+ })
90518
+ );
90466
90519
  return {
90467
90520
  setValue: { interpolationPoints: null },
90468
90521
  sendDiagnostics: diagnostics2
@@ -95965,14 +96018,13 @@ class ODESystem extends InlineComponent {
95965
96018
  if (variables2.some(
95966
96019
  (x2) => x2.equals(globalDependencyValues.independentVariable)
95967
96020
  )) {
95968
- const warning = {
95969
- type: "warning",
95970
- message: "Variables of `<odeSystem>` must be different than independent variable."
95971
- };
95972
- if (globalDependencyValues.variables?.position) {
95973
- warning.position = globalDependencyValues.variables.position;
95974
- }
95975
- diagnostics2.push(warning);
96021
+ diagnostics2.push(
96022
+ codedDiagnostic({
96023
+ type: "warning",
96024
+ code: "doenet-w0045",
96025
+ position: globalDependencyValues.variables?.position || void 0
96026
+ })
96027
+ );
95976
96028
  }
95977
96029
  if (validVariables.length < numDims) {
95978
96030
  validVariables.push(
@@ -96297,10 +96349,12 @@ class ODESystem extends InlineComponent {
96297
96349
  valid = false;
96298
96350
  }
96299
96351
  if ([...new Set(varNames)].length !== varNames.length) {
96300
- diagnostics2.push({
96301
- message: "Can't define ODE RHS functions with duplicate dependent variable names.",
96302
- type: "warning"
96303
- });
96352
+ diagnostics2.push(
96353
+ codedDiagnostic({
96354
+ type: "warning",
96355
+ code: "doenet-w0046"
96356
+ })
96357
+ );
96304
96358
  valid = false;
96305
96359
  }
96306
96360
  let fs;
@@ -96309,10 +96363,12 @@ class ODESystem extends InlineComponent {
96309
96363
  (x2) => x2.subscripts_to_strings().f()
96310
96364
  );
96311
96365
  } catch (e32) {
96312
- diagnostics2.push({
96313
- message: "Cannot define ODE RHS function. Error creating mathjs function.",
96314
- type: "warning"
96315
- });
96366
+ diagnostics2.push(
96367
+ codedDiagnostic({
96368
+ type: "warning",
96369
+ code: "doenet-w0047"
96370
+ })
96371
+ );
96316
96372
  valid = false;
96317
96373
  }
96318
96374
  if (!valid) {
@@ -110509,20 +110565,20 @@ class IonicCompound extends InlineComponent {
110509
110565
  (child) => child.stateValues.charge
110510
110566
  );
110511
110567
  if (charges.length !== 2) {
110512
- let warning = {
110513
- message: "Have not implemented ionic compound for anything other than two ions.",
110514
- type: "warning"
110515
- };
110568
+ let warning = codedDiagnostic({
110569
+ type: "warning",
110570
+ code: "doenet-w0053"
110571
+ });
110516
110572
  return {
110517
110573
  setValue: { ionicCompound: null },
110518
110574
  sendDiagnostics: [warning]
110519
110575
  };
110520
110576
  }
110521
110577
  if (!(charges[0] * charges[1] < 0)) {
110522
- let warning = {
110523
- message: "Ionic compound implemented only for one cation and one anion.",
110524
- type: "warning"
110525
- };
110578
+ let warning = codedDiagnostic({
110579
+ type: "warning",
110580
+ code: "doenet-w0054"
110581
+ });
110526
110582
  return {
110527
110583
  setValue: { ionicCompound: null },
110528
110584
  sendDiagnostics: [warning]
@@ -131504,9 +131560,11 @@ class Circle extends Curve {
131504
131560
  }),
131505
131561
  definition: function({ dependencyValues }) {
131506
131562
  if (dependencyValues.haveNonNumericalThroughPoints) {
131507
- let message = "Haven't implemented `<circle>` through " + dependencyValues.numThroughPoints + " points";
131508
- message += " in case where the points don't have numerical values.";
131509
- let warning = { message, type: "warning" };
131563
+ let warning = codedDiagnostic({
131564
+ type: "warning",
131565
+ code: "doenet-w0027",
131566
+ args: { count: dependencyValues.numThroughPoints }
131567
+ });
131510
131568
  return {
131511
131569
  setValue: {
131512
131570
  numericalRadiusCalculatedWithCenter: null,
@@ -131578,10 +131636,10 @@ class Circle extends Curve {
131578
131636
  }
131579
131637
  };
131580
131638
  } else if (dependencyValues.numThroughPoints > 3) {
131581
- let warning = {
131582
- message: "Cannot calculate circle through more than 3 points.",
131583
- type: "warning"
131584
- };
131639
+ let warning = codedDiagnostic({
131640
+ type: "warning",
131641
+ code: "doenet-w0028"
131642
+ });
131585
131643
  return {
131586
131644
  setValue: {
131587
131645
  numericalRadiusCalculatedWithCenter: null,
@@ -131616,10 +131674,10 @@ class Circle extends Curve {
131616
131674
  }),
131617
131675
  definition({ dependencyValues }) {
131618
131676
  if (dependencyValues.havePrescribedCenter && dependencyValues.havePrescribedRadius && dependencyValues.numThroughPoints > 0) {
131619
- let warning = {
131620
- message: "Cannot calculate circle with specified radius, center and through points.",
131621
- type: "warning"
131622
- };
131677
+ let warning = codedDiagnostic({
131678
+ type: "warning",
131679
+ code: "doenet-w0029"
131680
+ });
131623
131681
  return {
131624
131682
  setValue: { haveCenterRadiusPoints: true },
131625
131683
  sendDiagnostics: [warning]
@@ -131763,10 +131821,10 @@ class Circle extends Curve {
131763
131821
  );
131764
131822
  return { setValue: { numericalRadius } };
131765
131823
  } else {
131766
- let warning = {
131767
- message: "Cannot calculate circle with specified center through more than 1 point.",
131768
- type: "warning"
131769
- };
131824
+ let warning = codedDiagnostic({
131825
+ type: "warning",
131826
+ code: "doenet-w0030"
131827
+ });
131770
131828
  return {
131771
131829
  setValue: { numericalRadius: NaN },
131772
131830
  sendDiagnostics: [warning]
@@ -132068,10 +132126,18 @@ class Circle extends Curve {
132068
132126
  let r22 = r2 * r2;
132069
132127
  if (r2 < 0 || 4 * r22 < dist2) {
132070
132128
  let dist3 = Math.round(Math.sqrt(dist2) * 100) / 100;
132071
- let warning = {
132072
- message: `Cannot calculate circle: given that the distance between the two points is ${dist3}, the specified radius ${r2} is too small.`,
132073
- type: "warning"
132074
- };
132129
+ let warning = codedDiagnostic({
132130
+ type: "warning",
132131
+ code: "doenet-w0031",
132132
+ // Strings rather than numbers: the radius is
132133
+ // the author's own value quoted back, and a
132134
+ // number argument is formatted as a quantity,
132135
+ // which would round 0.0001 away to 0.
132136
+ args: {
132137
+ distance: String(dist3),
132138
+ radius: String(r2)
132139
+ }
132140
+ });
132075
132141
  return {
132076
132142
  setValue: { numericalCenter: [NaN, NaN] },
132077
132143
  sendDiagnostics: [warning]
@@ -132088,10 +132154,10 @@ class Circle extends Curve {
132088
132154
  setValue: { numericalCenter: [centerx, centery] }
132089
132155
  };
132090
132156
  } else {
132091
- let warning = {
132092
- message: "Cannot create circle through more than two points with a specified radius.",
132093
- type: "warning"
132094
- };
132157
+ let warning = codedDiagnostic({
132158
+ type: "warning",
132159
+ code: "doenet-w0032"
132160
+ });
132095
132161
  return {
132096
132162
  setValue: { numericalCenter: [NaN, NaN] },
132097
132163
  sendDiagnostics: [warning]
@@ -132345,20 +132411,20 @@ class Circle extends Curve {
132345
132411
  let radius = ptx.subtract(ctx).pow(2).add(pty.subtract(cty).pow(2)).pow(0.5).simplify();
132346
132412
  return { setValue: { radius } };
132347
132413
  } catch (e32) {
132348
- let warning = {
132349
- message: "Invalid center or through points of circle.",
132350
- type: "warning"
132351
- };
132414
+ let warning = codedDiagnostic({
132415
+ type: "warning",
132416
+ code: "doenet-w0033"
132417
+ });
132352
132418
  return {
132353
132419
  setValue: { radius: Context.fromAst("_") },
132354
132420
  sendDiagnostics: [warning]
132355
132421
  };
132356
132422
  }
132357
132423
  } else {
132358
- let warning = {
132359
- message: "Cannot calculate radius of circle with specified center through more than 1 point.",
132360
- type: "warning"
132361
- };
132424
+ let warning = codedDiagnostic({
132425
+ type: "warning",
132426
+ code: "doenet-w0034"
132427
+ });
132362
132428
  return {
132363
132429
  setValue: { radius: Context.fromAst("_") },
132364
132430
  sendDiagnostics: [warning]
@@ -132422,10 +132488,10 @@ class Circle extends Curve {
132422
132488
  instructions
132423
132489
  };
132424
132490
  } else {
132425
- let warning = {
132426
- message: "Cannot change radius of circle with non-numerical through points",
132427
- type: "warning"
132428
- };
132491
+ let warning = codedDiagnostic({
132492
+ type: "warning",
132493
+ code: "doenet-w0035"
132494
+ });
132429
132495
  return { success: false, sendDiagnostics: [warning] };
132430
132496
  }
132431
132497
  }
@@ -132696,10 +132762,12 @@ class Circle extends Curve {
132696
132762
  } else {
132697
132763
  let diagnostics2 = [];
132698
132764
  if (globalDependencyValues.haveNonNumericalPrescribedRadius || globalDependencyValues.haveNonNumericalThroughPoints) {
132699
- diagnostics2.push({
132700
- message: "Cannot create circle through more than one point with specified radius when don't have numerical values.",
132701
- type: "warning"
132702
- });
132765
+ diagnostics2.push(
132766
+ codedDiagnostic({
132767
+ type: "warning",
132768
+ code: "doenet-w0036"
132769
+ })
132770
+ );
132703
132771
  }
132704
132772
  return {
132705
132773
  setValue: {
@@ -132805,10 +132873,10 @@ class Circle extends Curve {
132805
132873
  instructions
132806
132874
  };
132807
132875
  } else {
132808
- let warning = {
132809
- message: "Haven't implemented changing center of circle through points with non numerical values.",
132810
- type: "warning"
132811
- };
132876
+ let warning = codedDiagnostic({
132877
+ type: "warning",
132878
+ code: "doenet-w0037"
132879
+ });
132812
132880
  return { success: false, sendDiagnostics: [warning] };
132813
132881
  }
132814
132882
  }
@@ -133709,10 +133777,10 @@ class Parabola extends Curve {
133709
133777
  }
133710
133778
  return { setValue: { a: a2, b: b2, c: c2, realValued } };
133711
133779
  } else {
133712
- let warning = {
133713
- message: "Haven't implemented parabola with vertex through more than 1 point.",
133714
- type: "warning"
133715
- };
133780
+ let warning = codedDiagnostic({
133781
+ type: "warning",
133782
+ code: "doenet-w0049"
133783
+ });
133716
133784
  return {
133717
133785
  setValue: {
133718
133786
  a: NaN,
@@ -133855,10 +133923,10 @@ class Parabola extends Curve {
133855
133923
  }
133856
133924
  return { setValue: { a: a2, b: b2, c: c2, realValued } };
133857
133925
  } else {
133858
- let warning = {
133859
- message: "Haven't implemented parabola through more than 3 points.",
133860
- type: "warning"
133861
- };
133926
+ let warning = codedDiagnostic({
133927
+ type: "warning",
133928
+ code: "doenet-w0050"
133929
+ });
133862
133930
  return {
133863
133931
  setValue: {
133864
133932
  a: NaN,
@@ -139675,10 +139743,13 @@ class Angle extends GraphicalComponent {
139675
139743
  arrayDefinitionByKey({ globalDependencyValues }) {
139676
139744
  if (globalDependencyValues.lineChildren) {
139677
139745
  if (globalDependencyValues.lineChildren.length > 2) {
139678
- let warning = {
139679
- message: `Cannot define an angle between ${globalDependencyValues.lineChildren.length} lines`,
139680
- type: "info"
139681
- };
139746
+ let warning = codedDiagnostic({
139747
+ type: "info",
139748
+ code: "doenet-i0017",
139749
+ args: {
139750
+ count: globalDependencyValues.lineChildren.length
139751
+ }
139752
+ });
139682
139753
  let points2 = {};
139683
139754
  for (let i2 = 0; i2 < 3; i2++) {
139684
139755
  for (let j2 = 0; j2 < 2; j2++) {
@@ -139818,13 +139889,13 @@ class Angle extends GraphicalComponent {
139818
139889
  }
139819
139890
  const diagnostics2 = [];
139820
139891
  if (foundBadThroughPoint) {
139821
- diagnostics2.push({
139822
- message: "Invalid point in through of `<angle>`",
139823
- type: "warning"
139824
- });
139825
- if (globalDependencyValues.throughAttr.position) {
139826
- diagnostics2[diagnostics2.length - 1].position = globalDependencyValues.throughAttr.position;
139827
- }
139892
+ diagnostics2.push(
139893
+ codedDiagnostic({
139894
+ type: "warning",
139895
+ code: "doenet-w0048",
139896
+ position: globalDependencyValues.throughAttr.position || void 0
139897
+ })
139898
+ );
139828
139899
  }
139829
139900
  if (numPointsSpecified === 0) {
139830
139901
  points["0,0"] = Context.fromAst(1);
@@ -154957,10 +155028,12 @@ function returnStandardSequenceStateVariableDefinitions() {
154957
155028
  let validSequence = true;
154958
155029
  if (dependencyValues.specifiedLength !== null) {
154959
155030
  if (!Number.isInteger(dependencyValues.specifiedLength) || dependencyValues.specifiedLength < 0) {
154960
- diagnostics2.push({
154961
- message: "Invalid length of sequence. Must be a non-negative integer.",
154962
- type: "info"
154963
- });
155031
+ diagnostics2.push(
155032
+ codedDiagnostic({
155033
+ type: "info",
155034
+ code: "doenet-i0012"
155035
+ })
155036
+ );
154964
155037
  validSequence = false;
154965
155038
  }
154966
155039
  }
@@ -154970,10 +155043,13 @@ function returnStandardSequenceStateVariableDefinitions() {
154970
155043
  dependencyValues.specifiedStep
154971
155044
  );
154972
155045
  if (!Number.isFinite(numericalStep)) {
154973
- diagnostics2.push({
154974
- message: "Invalid step of sequence. Must be a number for sequence of type " + dependencyValues.type + ".",
154975
- type: "info"
154976
- });
155046
+ diagnostics2.push(
155047
+ codedDiagnostic({
155048
+ type: "info",
155049
+ code: "doenet-i0013",
155050
+ args: { type: dependencyValues.type }
155051
+ })
155052
+ );
154977
155053
  validSequence = false;
154978
155054
  }
154979
155055
  }
@@ -154984,26 +155060,35 @@ function returnStandardSequenceStateVariableDefinitions() {
154984
155060
  dependencyValues.specifiedFrom
154985
155061
  );
154986
155062
  if (!Number.isFinite(numericalFrom)) {
154987
- diagnostics2.push({
154988
- message: `Invalid "from" of number sequence. Must be a number.`,
154989
- type: "info"
154990
- });
155063
+ diagnostics2.push(
155064
+ codedDiagnostic({
155065
+ type: "info",
155066
+ code: "doenet-i0014",
155067
+ args: { attribute: "from" }
155068
+ })
155069
+ );
154991
155070
  validSequence = false;
154992
155071
  }
154993
155072
  } else if (dependencyValues.type === "letters") {
154994
155073
  if (lettersToNumber(dependencyValues.specifiedFrom) === void 0) {
154995
- diagnostics2.push({
154996
- message: `Invalid "from" of letters sequence. Must be a letter combination.`,
154997
- type: "info"
154998
- });
155074
+ diagnostics2.push(
155075
+ codedDiagnostic({
155076
+ type: "info",
155077
+ code: "doenet-i0015",
155078
+ args: { attribute: "from" }
155079
+ })
155080
+ );
154999
155081
  validSequence = false;
155000
155082
  }
155001
155083
  } else {
155002
155084
  if (Number.isNaN(dependencyValues.specifiedFrom.tree)) {
155003
- diagnostics2.push({
155004
- message: `Invalid "from" of sequence.`,
155005
- type: "info"
155006
- });
155085
+ diagnostics2.push(
155086
+ codedDiagnostic({
155087
+ type: "info",
155088
+ code: "doenet-i0016",
155089
+ args: { attribute: "from" }
155090
+ })
155091
+ );
155007
155092
  validSequence = false;
155008
155093
  }
155009
155094
  }
@@ -155014,26 +155099,35 @@ function returnStandardSequenceStateVariableDefinitions() {
155014
155099
  dependencyValues.specifiedTo
155015
155100
  );
155016
155101
  if (!Number.isFinite(numericalTo)) {
155017
- diagnostics2.push({
155018
- message: `Invalid "to" of number sequence. Must be a number.`,
155019
- type: "info"
155020
- });
155102
+ diagnostics2.push(
155103
+ codedDiagnostic({
155104
+ type: "info",
155105
+ code: "doenet-i0014",
155106
+ args: { attribute: "to" }
155107
+ })
155108
+ );
155021
155109
  validSequence = false;
155022
155110
  }
155023
155111
  } else if (dependencyValues.type === "letters") {
155024
155112
  if (lettersToNumber(dependencyValues.specifiedTo) === void 0) {
155025
- diagnostics2.push({
155026
- message: `Invalid "to" of letters sequence. Must be a letter combination.`,
155027
- type: "info"
155028
- });
155113
+ diagnostics2.push(
155114
+ codedDiagnostic({
155115
+ type: "info",
155116
+ code: "doenet-i0015",
155117
+ args: { attribute: "to" }
155118
+ })
155119
+ );
155029
155120
  validSequence = false;
155030
155121
  }
155031
155122
  } else {
155032
155123
  if (Number.isNaN(dependencyValues.specifiedTo.tree)) {
155033
- diagnostics2.push({
155034
- message: `Invalid "to" of sequence.`,
155035
- type: "info"
155036
- });
155124
+ diagnostics2.push(
155125
+ codedDiagnostic({
155126
+ type: "info",
155127
+ code: "doenet-i0016",
155128
+ args: { attribute: "to" }
155129
+ })
155130
+ );
155037
155131
  validSequence = false;
155038
155132
  }
155039
155133
  }
@@ -159538,10 +159632,12 @@ class Intersection extends CompositeComponent {
159538
159632
  if (totNums < 2) {
159539
159633
  return { replacements: [], diagnostics: diagnostics2, nComponents };
159540
159634
  } else if (totNums > 2) {
159541
- diagnostics2.push({
159542
- message: "Haven't implemented intersection for more than two items",
159543
- type: "warning"
159544
- });
159635
+ diagnostics2.push(
159636
+ codedDiagnostic({
159637
+ type: "warning",
159638
+ code: "doenet-w0055"
159639
+ })
159640
+ );
159545
159641
  return { replacements: [], diagnostics: diagnostics2, nComponents };
159546
159642
  }
159547
159643
  let points = [];
@@ -202276,10 +202372,12 @@ class SelectFromSequence extends Sequence {
202276
202372
  definition: function({ dependencyValues }) {
202277
202373
  const diagnostics2 = [];
202278
202374
  if (dependencyValues.coprime && dependencyValues.type !== "number") {
202279
- diagnostics2.push({
202280
- message: "coprime ignored since not selecting numbers",
202281
- type: "warning"
202282
- });
202375
+ diagnostics2.push(
202376
+ codedDiagnostic({
202377
+ type: "warning",
202378
+ code: "doenet-w0051"
202379
+ })
202380
+ );
202283
202381
  }
202284
202382
  if (dependencyValues.excludeCombinations !== null) {
202285
202383
  let excludedCombinations = dependencyValues.excludeCombinations.stateValues.lists.map(
@@ -202299,10 +202397,12 @@ class SelectFromSequence extends Sequence {
202299
202397
  }
202300
202398
  }
202301
202399
  if (dependencyValues.coprime) {
202302
- diagnostics2.push({
202303
- message: "coprime ignored since excludeCombinations specified",
202304
- type: "warning"
202305
- });
202400
+ diagnostics2.push(
202401
+ codedDiagnostic({
202402
+ type: "warning",
202403
+ code: "doenet-w0052"
202404
+ })
202405
+ );
202306
202406
  }
202307
202407
  }
202308
202408
  return {
@@ -204809,10 +204909,13 @@ class AnimateFromSequence extends BaseComponent {
204809
204909
  }
204810
204910
  let diagnostics2 = [];
204811
204911
  if (targetIdentities === null || targetIdentities.length === 0) {
204812
- diagnostics2.push({
204813
- message: "Invalid target for `<animateFromSequence>`: cannot find target.",
204814
- type: "warning"
204815
- });
204912
+ diagnostics2.push(
204913
+ codedDiagnostic({
204914
+ type: "warning",
204915
+ code: "doenet-w0043",
204916
+ args: { source: "animateFromSequence" }
204917
+ })
204918
+ );
204816
204919
  }
204817
204920
  return {
204818
204921
  setValue: { targetIdentities },
@@ -204879,11 +204982,13 @@ class AnimateFromSequence extends BaseComponent {
204879
204982
  for (let ind in dependencyValues.targetIdentities) {
204880
204983
  let target = dependencyValues["target" + ind];
204881
204984
  if (target == null) {
204882
- let message = "Invalid target for `<animateFromSequence>`: cannot find target.";
204883
- diagnostics2.push({
204884
- message,
204885
- type: "warning"
204886
- });
204985
+ diagnostics2.push(
204986
+ codedDiagnostic({
204987
+ type: "warning",
204988
+ code: "doenet-w0043",
204989
+ args: { source: "animateFromSequence" }
204990
+ })
204991
+ );
204887
204992
  continue;
204888
204993
  }
204889
204994
  targets.push(target);
@@ -204895,17 +205000,29 @@ class AnimateFromSequence extends BaseComponent {
204895
205000
  prop += `[idx]`;
204896
205001
  }
204897
205002
  }
204898
- let message = `Invalid target for \`<animateFromSequence>\`: cannot find a state variable named "${prop}" on a \`<${target.componentType}>\`.`;
204899
- diagnostics2.push({
204900
- message,
204901
- type: "warning"
204902
- });
205003
+ diagnostics2.push(
205004
+ codedDiagnostic({
205005
+ type: "warning",
205006
+ code: "doenet-w0044",
205007
+ args: {
205008
+ source: "animateFromSequence",
205009
+ property: prop,
205010
+ component: target.componentType
205011
+ }
205012
+ })
205013
+ );
204903
205014
  } else {
204904
- let message = `Invalid target for \`<animateFromSequence>\`: cannot find a state variable named "value" on a \`<${target.componentType}>\`.`;
204905
- diagnostics2.push({
204906
- message,
204907
- type: "warning"
204908
- });
205015
+ diagnostics2.push(
205016
+ codedDiagnostic({
205017
+ type: "warning",
205018
+ code: "doenet-w0044",
205019
+ args: {
205020
+ source: "animateFromSequence",
205021
+ property: "value",
205022
+ component: target.componentType
205023
+ }
205024
+ })
205025
+ );
204909
205026
  }
204910
205027
  }
204911
205028
  }
@@ -215981,16 +216098,13 @@ class FunctionIterates extends InlineComponent {
215981
216098
  return { setValue: { numDimensions: 0 } };
215982
216099
  } else if (dependencyValues.functionAttr.stateValues.numInputs !== dependencyValues.functionAttr.stateValues.numOutputs) {
215983
216100
  let numInputs = dependencyValues.functionAttr.stateValues.numInputs;
215984
- let numInputsPhrase = numInputs.toString() + (numInputs === 1 ? " input" : " inputs");
215985
216101
  let numOutputs = dependencyValues.functionAttr.stateValues.numOutputs;
215986
- let numOutputsPhrase = numOutputs.toString() + (numOutputs === 1 ? " output" : " outputs");
215987
- let warning = {
216102
+ let warning = codedDiagnostic({
215988
216103
  type: "warning",
215989
- message: `Function iterates are possible only if the number of inputs of the function is equal to the number of outputs. This function has ${numInputsPhrase} and ${numOutputsPhrase}.`
215990
- };
215991
- if (dependencyValues.functionAttr.position) {
215992
- warning.position = dependencyValues.functionAttr.position;
215993
- }
216104
+ code: "doenet-w0056",
216105
+ args: { inputs: numInputs, outputs: numOutputs },
216106
+ position: dependencyValues.functionAttr.position || void 0
216107
+ });
215994
216108
  return {
215995
216109
  setValue: { numDimensions: 0 },
215996
216110
  sendDiagnostics: [warning]
@@ -217686,8 +217800,13 @@ class SolveEquations extends InlineComponent {
217686
217800
  try {
217687
217801
  f_base = formula.f();
217688
217802
  } catch (e32) {
217689
- let message = "Cannot solve equation as could not evaluate equation: " + expression.toString();
217690
- let diagnostics2 = [{ message, type: "warning" }];
217803
+ let diagnostics2 = [
217804
+ codedDiagnostic({
217805
+ type: "warning",
217806
+ code: "doenet-w0057",
217807
+ args: { equation: expression.toString() }
217808
+ })
217809
+ ];
217691
217810
  return {
217692
217811
  setValue: { allSolutions: [] },
217693
217812
  sendDiagnostics: diagnostics2
@@ -223324,10 +223443,10 @@ class EigenDecomposition extends BaseComponent {
223324
223443
  "Could nt calculate eigenvalues of matrix",
223325
223444
  e32
223326
223445
  );
223327
- let warning = {
223328
- message: "Could not calculate eigenvalues of matrix",
223329
- type: "warning"
223330
- };
223446
+ let warning = codedDiagnostic({
223447
+ type: "warning",
223448
+ code: "doenet-w0059"
223449
+ });
223331
223450
  return {
223332
223451
  setValue: { decomposition: null, numEigenvectors: 0 },
223333
223452
  sendDiagnostics: [warning]
@@ -233016,4 +233135,4 @@ export {
233016
233135
  getDefaultExportFromCjs as g,
233017
233136
  updateSyntaxFromV06toV07 as u
233018
233137
  };
233019
- //# sourceMappingURL=index-RygVZ98K.js.map
233138
+ //# sourceMappingURL=index-CdNFDkf5.js.map