@pie-element/rubric 9.0.3 → 9.0.4-next.20261009061152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +18 -18
- package/dist/browser/delivery/index.js +3 -3
- package/dist/browser/{dist--wEaCgG2.js → dist-BozR537o.js} +2875 -2875
- package/dist/browser/{dist--wEaCgG2.js.map → dist-BozR537o.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +12 -12
- package/dist/browser/editor-runtime/delivery/index.js +3 -3
- package/dist/browser/editor-runtime/{dist-C_dI1eu1.js → dist-DXc6iEOE.js} +2875 -2875
- package/dist/browser/editor-runtime/{dist-C_dI1eu1.js.map → dist-DXc6iEOE.js.map} +1 -1
- package/dist/browser/editor-runtime/{main-CHmmbjU-.js → main-BK1jqjaG.js} +3 -3
- package/dist/browser/editor-runtime/{main-CHmmbjU-.js.map → main-BK1jqjaG.js.map} +1 -1
- package/dist/browser/{mathjax-BKrHE4xs-DMJdB93L.js → editor-runtime/mathjax-CptWnMbQ-BymmkoDr.js} +21 -21
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-olIoaCQN.js.map → mathjax-CptWnMbQ-BymmkoDr.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +3 -3
- package/dist/browser/{speech-worker-CP5P4gRS-G4rtBs8u.js → editor-runtime/speech-worker-CTpOB9m5-pwCKeQ9c.js} +46 -43
- package/dist/browser/editor-runtime/speech-worker-CTpOB9m5-pwCKeQ9c.js.map +1 -0
- package/dist/browser/{main-D2nC2-bE.js → main-s90AAOvx.js} +3 -3
- package/dist/browser/{main-D2nC2-bE.js.map → main-s90AAOvx.js.map} +1 -1
- package/dist/browser/{editor-runtime/mathjax-BKrHE4xs-olIoaCQN.js → mathjax-CptWnMbQ-ncPHVakS.js} +25 -25
- package/dist/browser/{mathjax-BKrHE4xs-DMJdB93L.js.map → mathjax-CptWnMbQ-ncPHVakS.js.map} +1 -1
- package/dist/browser/print/index.js +3 -3
- package/dist/browser/{editor-runtime/speech-worker-CP5P4gRS-OkQyXQak.js → speech-worker-CTpOB9m5-BIgcSm3A.js} +20 -17
- package/dist/browser/speech-worker-CTpOB9m5-BIgcSm3A.js.map +1 -0
- package/dist/index.iife.js +22 -22
- package/module/print.js +717 -714
- package/module/print.js.map +1 -1
- package/package.json +10 -10
- package/dist/browser/editor-runtime/speech-worker-CP5P4gRS-OkQyXQak.js.map +0 -1
- package/dist/browser/speech-worker-CP5P4gRS-G4rtBs8u.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { G as t, K as n, M as r, N as i, _ as a, at as o, f as s, j as c, t as l, wt as u, x as d } from "./dist-
|
|
1
|
+
import { h as e } from "./speech-worker-CTpOB9m5-pwCKeQ9c.js";
|
|
2
|
+
import { G as t, K as n, M as r, N as i, _ as a, at as o, f as s, j as c, t as l, wt as u, x as d } from "./dist-DXc6iEOE.js";
|
|
3
3
|
import f from "react";
|
|
4
4
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
5
5
|
//#region src/delivery/main.tsx
|
|
@@ -147,4 +147,4 @@ var v = _(s, "UiLayout") || _(x.UiLayout, "UiLayout"), y = l, b = y.default, x =
|
|
|
147
147
|
//#endregion
|
|
148
148
|
export { M as t };
|
|
149
149
|
|
|
150
|
-
//# sourceMappingURL=main-
|
|
150
|
+
//# sourceMappingURL=main-BK1jqjaG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-CHmmbjU-.js","names":[],"sources":["../../../src/delivery/main.tsx"],"sourcesContent":["// @ts-nocheck\n\nimport React from 'react';\nimport { styled } from '@mui/material/styles';\nimport ListItem from '@mui/material/ListItem';\nimport List from '@mui/material/List';\nimport Collapse from '@mui/material/Collapse';\nimport { color, createUniqueId, UiLayout as UiLayoutImport } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport PropTypes from 'prop-types';\nimport Translator from '@pie-lib/translator';\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\n\nconst { translator } = Translator;\n\nconst StyledUiLayout: any = styled(UiLayout)({\n color: color.text(),\n backgroundColor: color.background(),\n // apply styles to tables to match the rest of the UI\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '8px 12px',\n textAlign: 'left',\n },\n // reset paragraph margins and line-height inside lists to override client styles\n '& ul p, & ol p': {\n marginBottom: 0,\n marginTop: 0,\n lineHeight: 'normal',\n },\n});\n\nconst StyledListItem: any = styled(ListItem)({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n padding: '12px 0px',\n});\n\nconst Text: any = styled('div')({\n color: color.text(),\n});\n\nconst TitleText: any = styled('h3')({\n color: color.text(),\n fontSize: '16px',\n fontWeight: '700',\n margin: 0,\n paddingBottom: '6px',\n});\n\nconst SampleTitleText: any = styled('h4')({\n color: color.text(),\n fontSize: '16px',\n fontWeight: 'normal',\n margin: 0,\n paddingBottom: '6px',\n});\n\n// A native button handles Enter and Space without scrolling the page; the resets drop the\n// browser's button chrome and keep it full width.\nconst RubricToggle: any = styled('button')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n padding: 0,\n border: 0,\n background: 'transparent',\n font: 'inherit',\n textAlign: 'inherit',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: theme.typography.fontSize,\n fontWeight: '500',\n color: color.tertiary(),\n margin: 0,\n minHeight: 24,\n}));\n\nconst ChevronStyle: any = styled('span')({\n display: 'inline-flex',\n transition: 'transform 0.2s',\n marginLeft: 2,\n alignSelf: 'center',\n});\n\nconst HiddenScreenReader: any = styled('h2')({\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0,0,0,0)',\n border: 0,\n whiteSpace: 'nowrap',\n});\n\nexport const RubricType = PropTypes.shape({\n excludeZero: PropTypes.bool,\n points: PropTypes.arrayOf(PropTypes.string),\n sampleAnswers: PropTypes.arrayOf(PropTypes.string),\n animationsDisabled: PropTypes.bool,\n});\n\nclass Rubric extends React.Component {\n dudUrl = 'javascript:;';\n idPrefix = createUniqueId('rubric');\n\n constructor(props) {\n super(props);\n this.state = {\n rubricOpen: false,\n };\n this.toggleRubric = this.toggleRubric.bind(this);\n }\n\n static propTypes = {\n model: PropTypes.object.isRequired,\n animationsDisabled: PropTypes.bool,\n value: RubricType,\n };\n\n toggleRubric() {\n this.setState({ rubricOpen: !this.state.rubricOpen });\n }\n\n shouldRenderPoint: any = (index, value) => {\n if (!value.excludeZero) {\n return true;\n } else {\n return index !== 0;\n }\n };\n\n render() {\n const { model, value } = this.props;\n let { animationsDisabled } = this.props;\n animationsDisabled = animationsDisabled || value.animationsDisabled;\n\n if (value && value.points) {\n const { extraCSSRules } = model || {};\n const { points, sampleAnswers } = value;\n\n const rubricList = (\n <List>\n {points\n .slice(0)\n .reverse()\n .map((desc, index) => {\n index = points.length - index - 1;\n const pointsLabel = value.excludeZero ? index + 1 : index;\n\n return (\n <React.Fragment key={index}>\n <StyledListItem key={`P${index}`}>\n <TitleText>\n {pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}\n </TitleText>\n <Text dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(desc) }} />\n </StyledListItem>\n\n {sampleAnswers && sampleAnswers[index] && (\n <StyledListItem key={`S${index}`}>\n <SampleTitleText>\n Sample Answer\n </SampleTitleText>\n <Text dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(sampleAnswers[index]) }} />\n </StyledListItem>\n )}\n </React.Fragment>\n );\n })}\n </List>\n );\n\n return (\n <StyledUiLayout extraCSSRules={extraCSSRules}>\n {/* screen reader only heading for navigation as per PD-5057 */}\n <HiddenScreenReader>{translator.t('rubric.rubric', { lng: value.language })}</HiddenScreenReader>\n {!animationsDisabled ? (\n <React.Fragment>\n <RubricToggle\n type=\"button\"\n id={`${this.idPrefix}-toggle`}\n aria-expanded={this.state.rubricOpen}\n aria-controls={`${this.idPrefix}-content`}\n onClick={this.toggleRubric}\n >\n {translator.t(this.state.rubricOpen ? 'rubric.hideRubric' : 'rubric.showRubric', {\n lng: value.language,\n })}\n <ChevronStyle aria-hidden=\"true\">\n {this.state.rubricOpen ? (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"18 15 12 9 6 15\"></polyline>\n </svg>\n ) : (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n )}\n </ChevronStyle>\n </RubricToggle>\n <Collapse\n id={`${this.idPrefix}-content`}\n in={this.state.rubricOpen}\n timeout={{ enter: 225, exit: 195 }}\n >\n {rubricList}\n </Collapse>\n </React.Fragment>\n ) : (\n rubricList\n )}\n </StyledUiLayout>\n );\n } else {\n return null;\n }\n }\n}\n\nexport default Rubric;\n"],"mappings":";;;;;;AASA,SAAS,EAA6B,GAAY;CAChD,OACE,OAAO,KAAU,cAChB,OAAO,KAAU,cAAY,KAAkB,OAAO,EAAM,YAAa;AAE9E;AAEA,SAAS,EAAyB,GAAkB,GAAsB;CAUxE,OATI,CAAC,KACD,EAA6B,CAAW,IAAU,IAClD,EAA6B,EAAY,OAAO,IAAU,EAAY,UACtE,KAAe,EAA6B,EAAY,EAAY,IAC/D,EAAY,KAEjB,KAAe,EAA6B,EAAY,EAAY,EAAE,OAAO,IACxE,EAAY,EAAY,CAAC,UAE3B;AACT;AACA,IAAM,IAAW,EAAyB,GAAgB,UAAU,KAAK,EAAyB,EAAS,UAAU,UAAU,GAEzH,IAAuB,GACvB,IAAuB,EAAqB,SAC5C,IACJ,KAAwB,OAAO,KAAyB,WACpD,IACA,GAKA,EAAE,kBAAe,GAEjB,IAAsB,EAAO,CAAQ,CAAC,CAAC;CAC3C,OAAO,EAAM,KAAK;CAClB,iBAAiB,EAAM,WAAW;CAElC,yBAAyB,EACvB,gBAAgB,WAClB;CACA,sDAAsD;EACpD,SAAS;EACT,WAAW;CACb;CAEA,kBAAkB;EAChB,cAAc;EACd,WAAW;EACX,YAAY;CACd;AACF,CAAC,GAEK,IAAsB,EAAO,CAAQ,CAAC,CAAC;CAC3C,SAAS;CACT,eAAe;CACf,YAAY;CACZ,SAAS;AACX,CAAC,GAEK,IAAY,EAAO,KAAK,CAAC,CAAC,EAC9B,OAAO,EAAM,KAAK,EACpB,CAAC,GAEK,IAAiB,EAAO,IAAI,CAAC,CAAC;CAClC,OAAO,EAAM,KAAK;CAClB,UAAU;CACV,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AG,KAAK,SAAS;KAChC,SAAS,KAAK;eALhB,CAOG,EAAW,EAAE,KAAK,MAAM,aAAa,sBAAsB,qBAAqB,EAC/E,KAAK,EAAM,SACb,CAAC,GACD,kBAAC,GAAD;MAAc,eAAY;gBACvB,KAAK,MAAM,aACV,kBAAC,OAAD;OACE,OAAM;OACN,QAAO;OACP,SAAQ;OACR,MAAK;OACL,QAAO;OACP,aAAY;OACZ,eAAc;OACd,gBAAe;iBAEf,kBAAC,YAAD,EAAU,QAAO,kBAA4B,CAAA;MAC1C,CAAA,IAEL,kBAAC,OAAD;OACE,OAAM;OACN,QAAO;OACP,SAAQ;OACR,MAAK;OACL,QAAO;OACP,aAAY;OACZ,eAAc;OACd,gBAAe;iBAEf,kBAAC,YAAD,EAAU,QAAO,iBAA2B,CAAA;MACzC,CAAA;KAEK,CAAA,CACF;QACd,kBAAC,GAAD;KACE,IAAI,GAAG,KAAK,SAAS;KACrB,IAAI,KAAK,MAAM;KACf,SAAS;MAAE,OAAO;MAAK,MAAM;KAAI;eAEhC;IACO,CAAA,CACI,EAAA,CAAA,CAIJ;;EAEpB,OACE,OAAO;CAEX;AACF"}
|
|
1
|
+
{"version":3,"file":"main-BK1jqjaG.js","names":[],"sources":["../../../src/delivery/main.tsx"],"sourcesContent":["// @ts-nocheck\n\nimport React from 'react';\nimport { styled } from '@mui/material/styles';\nimport ListItem from '@mui/material/ListItem';\nimport List from '@mui/material/List';\nimport Collapse from '@mui/material/Collapse';\nimport { color, createUniqueId, UiLayout as UiLayoutImport } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport PropTypes from 'prop-types';\nimport Translator from '@pie-lib/translator';\nimport { sanitizeModelHtml } from '@pie-element/shared-utils';\n\nconst { translator } = Translator;\n\nconst StyledUiLayout: any = styled(UiLayout)({\n color: color.text(),\n backgroundColor: color.background(),\n // apply styles to tables to match the rest of the UI\n '&:not(.MathJax) table': {\n borderCollapse: 'collapse',\n },\n '&:not(.MathJax) table td, &:not(.MathJax) table th': {\n padding: '8px 12px',\n textAlign: 'left',\n },\n // reset paragraph margins and line-height inside lists to override client styles\n '& ul p, & ol p': {\n marginBottom: 0,\n marginTop: 0,\n lineHeight: 'normal',\n },\n});\n\nconst StyledListItem: any = styled(ListItem)({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n padding: '12px 0px',\n});\n\nconst Text: any = styled('div')({\n color: color.text(),\n});\n\nconst TitleText: any = styled('h3')({\n color: color.text(),\n fontSize: '16px',\n fontWeight: '700',\n margin: 0,\n paddingBottom: '6px',\n});\n\nconst SampleTitleText: any = styled('h4')({\n color: color.text(),\n fontSize: '16px',\n fontWeight: 'normal',\n margin: 0,\n paddingBottom: '6px',\n});\n\n// A native button handles Enter and Space without scrolling the page; the resets drop the\n// browser's button chrome and keep it full width.\nconst RubricToggle: any = styled('button')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n padding: 0,\n border: 0,\n background: 'transparent',\n font: 'inherit',\n textAlign: 'inherit',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: theme.typography.fontSize,\n fontWeight: '500',\n color: color.tertiary(),\n margin: 0,\n minHeight: 24,\n}));\n\nconst ChevronStyle: any = styled('span')({\n display: 'inline-flex',\n transition: 'transform 0.2s',\n marginLeft: 2,\n alignSelf: 'center',\n});\n\nconst HiddenScreenReader: any = styled('h2')({\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0,0,0,0)',\n border: 0,\n whiteSpace: 'nowrap',\n});\n\nexport const RubricType = PropTypes.shape({\n excludeZero: PropTypes.bool,\n points: PropTypes.arrayOf(PropTypes.string),\n sampleAnswers: PropTypes.arrayOf(PropTypes.string),\n animationsDisabled: PropTypes.bool,\n});\n\nclass Rubric extends React.Component {\n dudUrl = 'javascript:;';\n idPrefix = createUniqueId('rubric');\n\n constructor(props) {\n super(props);\n this.state = {\n rubricOpen: false,\n };\n this.toggleRubric = this.toggleRubric.bind(this);\n }\n\n static propTypes = {\n model: PropTypes.object.isRequired,\n animationsDisabled: PropTypes.bool,\n value: RubricType,\n };\n\n toggleRubric() {\n this.setState({ rubricOpen: !this.state.rubricOpen });\n }\n\n shouldRenderPoint: any = (index, value) => {\n if (!value.excludeZero) {\n return true;\n } else {\n return index !== 0;\n }\n };\n\n render() {\n const { model, value } = this.props;\n let { animationsDisabled } = this.props;\n animationsDisabled = animationsDisabled || value.animationsDisabled;\n\n if (value && value.points) {\n const { extraCSSRules } = model || {};\n const { points, sampleAnswers } = value;\n\n const rubricList = (\n <List>\n {points\n .slice(0)\n .reverse()\n .map((desc, index) => {\n index = points.length - index - 1;\n const pointsLabel = value.excludeZero ? index + 1 : index;\n\n return (\n <React.Fragment key={index}>\n <StyledListItem key={`P${index}`}>\n <TitleText>\n {pointsLabel === 1 ? `${pointsLabel} PT` : `${pointsLabel} PTS`}\n </TitleText>\n <Text dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(desc) }} />\n </StyledListItem>\n\n {sampleAnswers && sampleAnswers[index] && (\n <StyledListItem key={`S${index}`}>\n <SampleTitleText>\n Sample Answer\n </SampleTitleText>\n <Text dangerouslySetInnerHTML={{ __html: sanitizeModelHtml(sampleAnswers[index]) }} />\n </StyledListItem>\n )}\n </React.Fragment>\n );\n })}\n </List>\n );\n\n return (\n <StyledUiLayout extraCSSRules={extraCSSRules}>\n {/* screen reader only heading for navigation as per PD-5057 */}\n <HiddenScreenReader>{translator.t('rubric.rubric', { lng: value.language })}</HiddenScreenReader>\n {!animationsDisabled ? (\n <React.Fragment>\n <RubricToggle\n type=\"button\"\n id={`${this.idPrefix}-toggle`}\n aria-expanded={this.state.rubricOpen}\n aria-controls={`${this.idPrefix}-content`}\n onClick={this.toggleRubric}\n >\n {translator.t(this.state.rubricOpen ? 'rubric.hideRubric' : 'rubric.showRubric', {\n lng: value.language,\n })}\n <ChevronStyle aria-hidden=\"true\">\n {this.state.rubricOpen ? (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"18 15 12 9 6 15\"></polyline>\n </svg>\n ) : (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n )}\n </ChevronStyle>\n </RubricToggle>\n <Collapse\n id={`${this.idPrefix}-content`}\n in={this.state.rubricOpen}\n timeout={{ enter: 225, exit: 195 }}\n >\n {rubricList}\n </Collapse>\n </React.Fragment>\n ) : (\n rubricList\n )}\n </StyledUiLayout>\n );\n } else {\n return null;\n }\n }\n}\n\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,SAAQ;OACR,MAAK;OACL,QAAO;OACP,aAAY;OACZ,eAAc;OACd,gBAAe;iBAEf,kBAAC,YAAD,EAAU,QAAO,kBAA4B,CAAA;MAC1C,CAAA,IAEL,kBAAC,OAAD;OACE,OAAM;OACN,QAAO;OACP,SAAQ;OACR,MAAK;OACL,QAAO;OACP,aAAY;OACZ,eAAc;OACd,gBAAe;iBAEf,kBAAC,YAAD,EAAU,QAAO,iBAA2B,CAAA;MACzC,CAAA;KAEK,CAAA,CACF;QACd,kBAAC,GAAD;KACE,IAAI,GAAG,KAAK,SAAS;KACrB,IAAI,KAAK,MAAM;KACf,SAAS;MAAE,OAAO;MAAK,MAAM;KAAI;eAEhC;IACO,CAAA,CACI,EAAA,CAAA,CAIJ;;EAEpB,OACE,OAAO;CAEX;AACF"}
|
package/dist/browser/{mathjax-BKrHE4xs-DMJdB93L.js → editor-runtime/mathjax-CptWnMbQ-BymmkoDr.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e,
|
|
1
|
+
import { a as e, l as t, m as n, n as r, r as i, t as a } from "./speech-worker-CTpOB9m5-pwCKeQ9c.js";
|
|
2
2
|
import { A as o, C as s, D as c, E as l, O as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as ee, g as v, h as y, i as b, j as te, k as ne, l as x, m as re, n as ie, o as S, p as ae, s as oe, t as se, u as ce, v as le, w as ue, x as de, y as fe } from "./chtml-CbqemTOM-x0_YISTK.js";
|
|
3
|
-
//#region ../../shared/math-rendering-mathjax/dist/browser/mathjax-
|
|
3
|
+
//#region ../../shared/math-rendering-mathjax/dist/browser/mathjax-CptWnMbQ.js
|
|
4
4
|
var pe = Object.create, me = Object.defineProperty, he = Object.getOwnPropertyDescriptor, ge = Object.getOwnPropertyNames, _e = Object.getPrototypeOf, C = Object.prototype.hasOwnProperty, ve = (e, t, n) => () => {
|
|
5
5
|
if (n) throw n[0];
|
|
6
6
|
try {
|
|
@@ -24,8 +24,8 @@ var pe = Object.create, me = Object.defineProperty, he = Object.getOwnPropertyDe
|
|
|
24
24
|
}, Se = (e, t, n) => (n = e == null ? {} : pe(_e(e)), xe(t || !e || !e.__esModule ? me(n, "default", {
|
|
25
25
|
value: e,
|
|
26
26
|
enumerable: !0
|
|
27
|
-
}) : n, e)), Ce = /* @__PURE__ */ ((e) => typeof
|
|
28
|
-
if (typeof
|
|
27
|
+
}) : n, e)), Ce = /* @__PURE__ */ ((e) => typeof n < "u" ? n : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof n < "u" ? n : e)[t] }) : e)(function(e) {
|
|
28
|
+
if (typeof n < "u") return n.apply(this, arguments);
|
|
29
29
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
30
30
|
});
|
|
31
31
|
function we(e, t, n, r, i, a, o = null) {
|
|
@@ -36599,24 +36599,24 @@ function W_(t) {
|
|
|
36599
36599
|
}
|
|
36600
36600
|
var G_ = ["mathjax-newcm-font", "mathjax-mhchem-font-extension"].map(W_), K_ = /%%URL%%\/([^"')]+)/g;
|
|
36601
36601
|
function q_(e) {
|
|
36602
|
-
let
|
|
36603
|
-
H_ = !!
|
|
36604
|
-
let
|
|
36605
|
-
se.addFontURLs = (
|
|
36606
|
-
if (!G_.includes(
|
|
36607
|
-
for (let [
|
|
36608
|
-
let
|
|
36609
|
-
let o =
|
|
36610
|
-
return o || (
|
|
36602
|
+
let n = r(e);
|
|
36603
|
+
H_ = !!n;
|
|
36604
|
+
let a = se.addFontURLs.bind(se);
|
|
36605
|
+
se.addFontURLs = (n, r, i) => {
|
|
36606
|
+
if (!G_.includes(i)) return a(n, r, i);
|
|
36607
|
+
for (let [a, o] of Object.entries(r)) {
|
|
36608
|
+
let r = !0, s = String(o.src).replace(K_, (n, a) => {
|
|
36609
|
+
let o = t(e, `${i}/${a}`);
|
|
36610
|
+
return o || (r = !1), o ?? "";
|
|
36611
36611
|
});
|
|
36612
|
-
|
|
36612
|
+
r && (n[a] = {
|
|
36613
36613
|
...o,
|
|
36614
36614
|
src: s
|
|
36615
36615
|
});
|
|
36616
36616
|
}
|
|
36617
36617
|
};
|
|
36618
36618
|
let o = [...e.urls?.keys() ?? []];
|
|
36619
|
-
return e.root || o.some((e) => G_.some((t) => e.startsWith(`${t}/`))) ||
|
|
36619
|
+
return e.root || o.some((e) => G_.some((t) => e.startsWith(`${t}/`))) || i(H_ ? "no-web-fonts" : "no-web-fonts-or-speech"), n;
|
|
36620
36620
|
}
|
|
36621
36621
|
function J_() {
|
|
36622
36622
|
return new Promise((e) => {
|
|
@@ -36633,13 +36633,13 @@ function Y_(e) {
|
|
|
36633
36633
|
function X_(e, t, n) {
|
|
36634
36634
|
if (Cm.startup) throw Error("[math-rendering] The bundled MathJax starts once");
|
|
36635
36635
|
z_(e), de.asyncLoad = V_, Y_(n);
|
|
36636
|
-
let
|
|
36636
|
+
let r = q_(t), i = e.loader?.load?.includes("a11y/assistive-mml") ?? !1;
|
|
36637
36637
|
Cm.config = e, Cm._ = {
|
|
36638
36638
|
a11y: {
|
|
36639
36639
|
explorer: { Region: Oc },
|
|
36640
36640
|
explorer_ts: gl,
|
|
36641
36641
|
sre_ts: Js,
|
|
36642
|
-
...
|
|
36642
|
+
...i ? { "assistive-mml": qt } : {}
|
|
36643
36643
|
},
|
|
36644
36644
|
output: { chtml_ts: { CHTML: ym } },
|
|
36645
36645
|
ui: { menu: { Menu: { Menu: Ah } } }
|
|
@@ -36662,11 +36662,11 @@ function X_(e, t, n) {
|
|
|
36662
36662
|
fontData: se,
|
|
36663
36663
|
fontURL: W_("mathjax-newcm-font")
|
|
36664
36664
|
})), u = Dl();
|
|
36665
|
-
|
|
36665
|
+
r && (u.createWorker = async (e) => a(r, e));
|
|
36666
36666
|
let d = new Ql(u, 5);
|
|
36667
|
-
d = oc(d, new lu({ allowHtmlInTokenNodes: !0 })), d = Dc(d, null), d = bl(d),
|
|
36667
|
+
d = oc(d, new lu({ allowHtmlInTokenNodes: !0 })), d = Dc(d, null), d = bl(d), i && (d = Zt(d)), d = Yh(d), de.handlers.register(d);
|
|
36668
36668
|
let f = { ...e.options };
|
|
36669
|
-
|
|
36669
|
+
r || (f.enableEnrichment = !1);
|
|
36670
36670
|
let p = de.document(document, {
|
|
36671
36671
|
...f,
|
|
36672
36672
|
MenuClass: U_,
|
|
@@ -36689,4 +36689,4 @@ function X_(e, t, n) {
|
|
|
36689
36689
|
//#endregion
|
|
36690
36690
|
export { I_ as TEX_PACKAGES, X_ as createMathJax };
|
|
36691
36691
|
|
|
36692
|
-
//# sourceMappingURL=mathjax-
|
|
36692
|
+
//# sourceMappingURL=mathjax-CptWnMbQ-BymmkoDr.js.map
|