@pie-element/matrix 5.0.5-next.20261014231219 → 5.0.5
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/{Radio-BZDiUUie.js → Radio-B9esqhiG.js} +4 -2
- package/dist/browser/Radio-B9esqhiG.js.map +1 -0
- package/dist/browser/author/index.js +6016 -5983
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +5 -2
- package/dist/browser/delivery/index.js +6 -3
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{Radio-BlhdmLQ_.js → Radio-xpT0fBwu.js} +4 -2
- package/dist/browser/editor-runtime/Radio-xpT0fBwu.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +3381 -3348
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +5 -2
- package/dist/browser/editor-runtime/delivery/index.js +6 -3
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/schemas/configuration.schema.json +1 -1
- package/dist/schemas/model.schema.json +1 -1
- package/dist/schemas/session.schema.json +1 -1
- package/package.json +11 -11
- package/dist/browser/Radio-BZDiUUie.js.map +0 -1
- package/dist/browser/editor-runtime/Radio-BlhdmLQ_.js.map +0 -1
|
@@ -53,8 +53,11 @@ var a = (e, t) => new Promise((n) => {
|
|
|
53
53
|
return ["teacherInstructions", "prompt"].forEach((r) => {
|
|
54
54
|
t[r]?.required && !o(e[r]) && (n[r] = "This field is required.");
|
|
55
55
|
}), n;
|
|
56
|
-
}
|
|
56
|
+
}, c = Object.freeze({
|
|
57
|
+
name: "@pie-element/matrix",
|
|
58
|
+
version: "5.0.5"
|
|
59
|
+
});
|
|
57
60
|
//#endregion
|
|
58
|
-
export { a as createCorrectResponseSession, n as createDefaultModel, r as model, i as outcome, s as validate };
|
|
61
|
+
export { a as createCorrectResponseSession, n as createDefaultModel, r as model, i as outcome, c as piePackage, s as validate };
|
|
59
62
|
|
|
60
63
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as e } from "../speech-worker-CTpOB9m5-pwCKeQ9c.js";
|
|
2
|
-
import { E as t, Mt as n, O as r, T as i, a, d as o, i as s, jt as c, kt as l, st as u, t as d, y as f } from "../Radio-
|
|
2
|
+
import { E as t, Mt as n, O as r, T as i, a, d as o, i as s, jt as c, kt as l, st as u, t as d, y as f } from "../Radio-xpT0fBwu.js";
|
|
3
3
|
import p from "react";
|
|
4
4
|
import { createRoot as m } from "react-dom/client";
|
|
5
5
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
@@ -215,8 +215,11 @@ var L = a, R = L.default, z = R && typeof R == "object" ? R : L, B = I(f, "Previ
|
|
|
215
215
|
disconnectedCallback() {
|
|
216
216
|
this._root &&= (this._root.unmount(), null);
|
|
217
217
|
}
|
|
218
|
-
}
|
|
218
|
+
}, W = Object.freeze({
|
|
219
|
+
name: "@pie-element/matrix",
|
|
220
|
+
version: "5.0.5"
|
|
221
|
+
});
|
|
219
222
|
//#endregion
|
|
220
|
-
export { U as default, H as isComplete };
|
|
223
|
+
export { U as default, H as isComplete, W as piePackage };
|
|
221
224
|
|
|
222
225
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../shared/player-events/dist/index.js","../../../../src/delivery/ChoiceInput.tsx","../../../../src/delivery/Matrix.tsx","../../../../src/delivery/Main.tsx","../../../../src/delivery/index.ts"],"sourcesContent":["//#region src/session-notifier.ts\nvar e = \"commitPendingSession\", t = /* @__PURE__ */ new WeakMap();\nfunction n(e, n) {\n\tlet r = t.get(e);\n\tr || (r = /* @__PURE__ */ new Set(), t.set(e, r)), r.add(n);\n}\nfunction r(t) {\n\treturn Object.getOwnPropertyDescriptor(t, e) !== void 0;\n}\nfunction i(t) {\n\tif (r(t)) return;\n\tlet n = t[e];\n\tObject.defineProperty(t, e, {\n\t\tvalue: () => {\n\t\t\tif (typeof n == \"function\") try {\n\t\t\t\tn.call(t);\n\t\t\t} catch {}\n\t\t\to(t);\n\t\t},\n\t\tconfigurable: !0,\n\t\tenumerable: !1,\n\t\twritable: !0\n\t});\n}\nfunction a(e, t, r = {}) {\n\tlet a = r.delayMs, o = typeof a == \"function\" ? a : () => a ?? 0, s = r.maxWaitMs, c = null, l = null, u = !1, d = () => {\n\t\tc !== null && (clearTimeout(c), c = null), l !== null && (clearTimeout(l), l = null);\n\t}, f = () => {\n\t\td(), u && (u = !1, t());\n\t}, p = {\n\t\tnotify() {\n\t\t\tu = !0, c !== null && clearTimeout(c), c = setTimeout(f, Math.max(0, o())), s !== void 0 && l === null && (l = setTimeout(f, Math.max(0, s)));\n\t\t},\n\t\tflush() {\n\t\t\tif (!u) {\n\t\t\t\td();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tf();\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(\"[session-notifier] a committed session-changed dispatch threw\", e);\n\t\t\t}\n\t\t}\n\t};\n\treturn n(e, p), i(e), p;\n}\nfunction o(e) {\n\tlet n = t.get(e);\n\tif (n) for (let e of [...n]) e.flush();\n}\n//#endregion\n//#region src/index.ts\nvar s = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, c = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { s as ModelSetEvent, e as SESSION_COMMIT_METHOD, c as SessionChangedEvent, a as createSessionNotifier, o as flushSessionNotifiers };\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\n\nimport { color } from '@pie-lib/render-ui';\nimport Radio from '@mui/material/Radio';\n\nconst StyledRadio: any = styled(Radio)({\n '&.MuiRadio-root': {\n color: `var(--choice-input-color, ${color.text()})`,\n },\n '&.MuiRadio-root.Mui-checked': {\n color: `var(--choice-input-selected-color, ${color.primary()})`,\n },\n '&.MuiRadio-root.Mui-disabled': {\n color: `var(--choice-input-disabled-color, ${color.defaults.DISABLED})`,\n },\n});\n\nconst ChoiceInput = (props) => {\n const { disabled, checked, labelledBy, matrixKey, matrixValue, name, onChange } = props;\n\n const onChangeWrapper = () => {\n if (disabled) {\n return;\n }\n onChange({\n matrixValue,\n matrixKey,\n });\n };\n\n return (\n <StyledRadio\n checked={checked}\n name={name}\n onChange={onChangeWrapper}\n disabled={disabled}\n slotProps={{ input: { 'aria-labelledby': labelledBy } }}\n />\n );\n};\n\nChoiceInput.propTypes = {\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool.isRequired,\n labelledBy: PropTypes.string,\n matrixValue: PropTypes.number.isRequired,\n matrixKey: PropTypes.string.isRequired,\n name: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n};\n\nChoiceInput.defaultProps = {\n checked: false,\n disabled: false,\n};\n\nexport default ChoiceInput;\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport ChoiceInput from './ChoiceInput.js';\nimport { color, Collapsible as CollapsibleImport, PreviewPrompt as PreviewPromptImport, useUniqueId } from '@pie-lib/render-ui';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\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}\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;\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nconst MatrixWrapper = styled.div`\n color: ${color.text()};\n background-color: ${color.background()};\n font-family: Roboto, Arial, Helvetica, sans-serif;\n`;\n\nconst MatrixGridWrapper = styled.div`\n display: grid;\n grid-template-columns: ${(props) => props.gridTemplateColumns};\n grid-column-gap: 30px;\n grid-row-gap: 20px;\n margin-top: 20px;\n`;\n\n// A subgrid keeps the row's cells in the matrix columns while the row is its own radio group.\nconst MatrixRow = styled.div`\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n`;\n\nconst TeacherInstructions: any = styled(Collapsible)`\n margin-bottom: 16px;\n`;\n\nconst MatrixGridItem = styled.div`\n align-self: center;\n justify-self: center;\n white-space: nowrap;\n`;\n\nconst Matrix = (props) => {\n const {\n disabled,\n prompt,\n onSessionChange,\n columnLabels,\n matrixValues,\n rowLabels,\n session,\n teacherInstructions,\n language,\n } = props;\n\n // The row and column labels are plain grid cells, so each radio references them by id for its name.\n const idPrefix = useUniqueId('matrix');\n const rowLabelId = (rowIndex) => `${idPrefix}-row-${rowIndex}`;\n const columnLabelId = (columnIndex) => `${idPrefix}-column-${columnIndex}`;\n // A row's radios share a name, so the browser gives the row one tab stop and arrow-key selection.\n const rowGroupName = (rowIndex) => `${idPrefix}-row-${rowIndex}-choice`;\n const gridTemplateColumns = [...columnLabels, {}].map(() => 'min-content').join(' ');\n\n return (\n <MatrixWrapper>\n {teacherInstructions && (\n <TeacherInstructions\n className={teacherInstructions}\n labels={{\n hidden: translator.t('common:showTeacherInstructions', { lng: language }),\n visible: translator.t('common:hideTeacherInstructions', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </TeacherInstructions>\n )}\n\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n\n <MatrixGridWrapper gridTemplateColumns={gridTemplateColumns}>\n <MatrixGridItem />\n {columnLabels.map((columnLabel, columnIndex) => (\n <MatrixGridItem key={`column-${columnIndex}`} id={columnLabelId(columnIndex)}>\n {columnLabel}\n </MatrixGridItem>\n ))}\n {rowLabels.map((rowLabel, rowIndex) => (\n <MatrixRow key={`row-${rowIndex}`} role=\"radiogroup\" aria-labelledby={rowLabelId(rowIndex)}>\n <MatrixGridItem id={rowLabelId(rowIndex)}>{rowLabel}</MatrixGridItem>\n {columnLabels.map((_, columnIndex) => {\n const matrixKey = `${rowIndex}-${columnIndex}`;\n\n return (\n <MatrixGridItem key={matrixKey}>\n <ChoiceInput\n matrixKey={matrixKey}\n matrixValue={matrixValues[matrixKey] || 0}\n disabled={disabled}\n name={rowGroupName(rowIndex)}\n labelledBy={`${rowLabelId(rowIndex)} ${columnLabelId(columnIndex)}`}\n onChange={onSessionChange}\n checked={session.value && Object.prototype.hasOwnProperty.call(session.value, matrixKey)}\n />\n </MatrixGridItem>\n );\n })}\n </MatrixRow>\n ))}\n </MatrixGridWrapper>\n </MatrixWrapper>\n );\n};\n\nMatrix.propTypes = {\n prompt: PropTypes.string,\n teacherInstructions: PropTypes.string,\n language: PropTypes.string,\n session: PropTypes.object,\n matrixValues: PropTypes.object,\n rowLabels: PropTypes.arrayOf(PropTypes.string),\n columnLabels: PropTypes.arrayOf(PropTypes.string),\n disabled: PropTypes.bool.isRequired,\n onSessionChange: PropTypes.func.isRequired,\n};\n\nMatrix.defaultProps = {\n session: {\n value: {},\n },\n};\n\nexport default Matrix;\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { PreviewLayout as PreviewLayoutImport } 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}\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;\nconst PreviewLayout = unwrapReactInteropSymbol(PreviewLayoutImport, 'PreviewLayout') || unwrapReactInteropSymbol(renderUi.PreviewLayout, 'PreviewLayout');\nimport Matrix from './Matrix.js';\n\nclass Main extends React.Component {\n static propTypes = {\n model: PropTypes.object,\n session: PropTypes.object,\n onSessionChange: PropTypes.func,\n };\n\n static defaultProps = {\n model: {},\n session: {},\n };\n\n render() {\n const { model, onSessionChange, session } = this.props;\n const { extraCSSRules } = model;\n return (\n <PreviewLayout extraCSSRules={extraCSSRules}>\n <Matrix {...model} session={session} onSessionChange={onSessionChange} />\n </PreviewLayout>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport Main from './Main.js';\n\nexport const isComplete = (session) => {\n if (!session || !session.value) {\n return false;\n }\n return !!Object.keys(session.value).length;\n};\n\nexport default class Matrix extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n }\n\n set model(m) {\n this._model = m;\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n sessionChanged({ matrixKey, matrixValue }) {\n // keys are `row-column`: the separator keeps row 1 from matching rows 10 to 19\n const matrixRowPrefix = `${matrixKey.split('-')[0]}-`;\n const sessionValueClone = Object.keys(this._session.value || {}).reduce((acc, key) => {\n if (!key.startsWith(matrixRowPrefix)) {\n acc[key] = this._session.value[key];\n }\n return acc;\n }, {});\n sessionValueClone[matrixKey] = matrixValue;\n this._session.value = sessionValueClone;\n const complete = isComplete(this._session, this._model);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), complete));\n this._render();\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onSessionChange: this.sessionChanged.bind(this),\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }\n}\n"],"mappings":";;;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;CACf;CAEA,IAAI,QAAQ,GAAG;EAEb,AADA,KAAK,WAAW,GAChB,KAAK,QAAQ;CACf;CAEA,IAAI,UAAU;EACZ,OAAO,KAAK;CACd;CAEA,eAAe,EAAE,cAAW,kBAAe;EAEzC,IAAM,IAAkB,GAAG,EAAU,MAAM,GAAG,CAAC,CAAC,GAAG,IAC7C,IAAoB,OAAO,KAAK,KAAK,SAAS,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAK,OACvE,EAAI,WAAW,CAAe,MACjC,EAAI,KAAO,KAAK,SAAS,MAAM,KAE1B,IACN,CAAC,CAAC;EAEL,AADA,EAAkB,KAAa,GAC/B,KAAK,SAAS,QAAQ;EACtB,IAAM,IAAW,EAAW,KAAK,UAAU,KAAK,MAAM;EAGtD,AADA,KAAK,cAAc,IAAI,EAAoB,KAAK,QAAQ,YAAY,GAAG,CAAQ,CAAC,GAChF,KAAK,QAAQ;CACf;CAEA,oBAAoB;EAClB,KAAK,QAAQ;CACf;CAEA,UAAU;EACR,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,UACxB;EAGF,IAAM,IAAK,EAAM,cAAc,GAAM;GACnC,OAAO,KAAK;GACZ,SAAS,KAAK;GACd,iBAAiB,KAAK,eAAe,KAAK,IAAI;EAChD,CAAC;EAMD,AAJA,AACE,KAAK,UAAQ,EAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAE,GACpB,qBAAqB;GACnB,EAAW,IAAI;EACjB,CAAC;CACH;CAEA,uBAAuB;EACrB,AAEE,KAAK,WADL,KAAK,MAAM,QAAQ,GACN;CAEjB;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../shared/player-events/dist/index.js","../../../../src/delivery/ChoiceInput.tsx","../../../../src/delivery/Matrix.tsx","../../../../src/delivery/Main.tsx","../../../../src/delivery/index.ts"],"sourcesContent":["//#region src/session-notifier.ts\nvar e = \"commitPendingSession\", t = /* @__PURE__ */ new WeakMap();\nfunction n(e, n) {\n\tlet r = t.get(e);\n\tr || (r = /* @__PURE__ */ new Set(), t.set(e, r)), r.add(n);\n}\nfunction r(t) {\n\treturn Object.getOwnPropertyDescriptor(t, e) !== void 0;\n}\nfunction i(t) {\n\tif (r(t)) return;\n\tlet n = t[e];\n\tObject.defineProperty(t, e, {\n\t\tvalue: () => {\n\t\t\tif (typeof n == \"function\") try {\n\t\t\t\tn.call(t);\n\t\t\t} catch {}\n\t\t\to(t);\n\t\t},\n\t\tconfigurable: !0,\n\t\tenumerable: !1,\n\t\twritable: !0\n\t});\n}\nfunction a(e, t, r = {}) {\n\tlet a = r.delayMs, o = typeof a == \"function\" ? a : () => a ?? 0, s = r.maxWaitMs, c = null, l = null, u = !1, d = () => {\n\t\tc !== null && (clearTimeout(c), c = null), l !== null && (clearTimeout(l), l = null);\n\t}, f = () => {\n\t\td(), u && (u = !1, t());\n\t}, p = {\n\t\tnotify() {\n\t\t\tu = !0, c !== null && clearTimeout(c), c = setTimeout(f, Math.max(0, o())), s !== void 0 && l === null && (l = setTimeout(f, Math.max(0, s)));\n\t\t},\n\t\tflush() {\n\t\t\tif (!u) {\n\t\t\t\td();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tf();\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(\"[session-notifier] a committed session-changed dispatch threw\", e);\n\t\t\t}\n\t\t}\n\t};\n\treturn n(e, p), i(e), p;\n}\nfunction o(e) {\n\tlet n = t.get(e);\n\tif (n) for (let e of [...n]) e.flush();\n}\n//#endregion\n//#region ../../../node_modules/.bun/@pie-players+pie-context@1.0.0-beta.3/node_modules/@pie-players/pie-context/dist/events.js\nfunction s(e, t, n) {\n\tlet r = t.ownerDocument?.defaultView?.Event ?? Event;\n\treturn Object.assign(new r(e, {\n\t\tbubbles: !0,\n\t\tcomposed: !0\n\t}), n);\n}\nvar c = /* @__PURE__ */ new WeakSet(), l = (e, t) => typeof t == \"object\" && !!t && e.has(t), u = class {\n\tconstructor(e, t, n, r) {\n\t\tlet i = s(\"context-request\", t, {\n\t\t\tcontext: e,\n\t\t\tcontextTarget: t,\n\t\t\tcallback: n,\n\t\t\tsubscribe: r ?? !1\n\t\t});\n\t\treturn c.add(i), i;\n\t}\n\tstatic [Symbol.hasInstance](e) {\n\t\treturn l(c, e);\n\t}\n}, d = (e) => {\n\tlet t = [];\n\tfor (let n of e) n.requestorRef.deref() && n.callbackRef.deref() && t.push(n);\n\treturn t;\n}, f = class {\n\thost;\n\tpendingByContext = /* @__PURE__ */ new Map();\n\tattached = !1;\n\tconstructor(e) {\n\t\tthis.host = e;\n\t}\n\tattach() {\n\t\tthis.attached || (this.attached = !0, this.host.addEventListener(\"context-request\", this.onContextRequest), this.host.addEventListener(\"context-provider\", this.onContextProvider));\n\t}\n\tdetach() {\n\t\tthis.attached && (this.attached = !1, this.host.removeEventListener(\"context-request\", this.onContextRequest), this.host.removeEventListener(\"context-provider\", this.onContextProvider), this.pendingByContext.clear());\n\t}\n\tonContextRequest = (e) => {\n\t\tif (e.cancelBubble) return;\n\t\tlet t = e;\n\t\tif (t.subscribe !== !0 || typeof t.callback != \"function\" || t.context === void 0) return;\n\t\tlet n = t.contextTarget ?? e.composedPath?.()[0];\n\t\tif (!n) return;\n\t\tlet r = this.pendingByContext.get(t.context);\n\t\tr || (r = {\n\t\t\tcallbacks: /* @__PURE__ */ new WeakMap(),\n\t\t\trequests: []\n\t\t}, this.pendingByContext.set(t.context, r));\n\t\tlet i = t.callback, a = r.callbacks.get(n);\n\t\ta || (a = /* @__PURE__ */ new WeakSet(), r.callbacks.set(n, a)), !a.has(i) && (a.add(i), r.requests.push({\n\t\t\trequestorRef: new WeakRef(n),\n\t\t\tcallbackRef: new WeakRef(i)\n\t\t}), r.requests = d(r.requests));\n\t};\n\tonContextProvider = (e) => {\n\t\tlet t = e.context;\n\t\tif (t === void 0) return;\n\t\tlet n = this.pendingByContext.get(t);\n\t\tif (!(!n || n.requests.length === 0)) {\n\t\t\tthis.pendingByContext.delete(t);\n\t\t\tfor (let e of n.requests) {\n\t\t\t\tlet n = e.requestorRef.deref(), r = e.callbackRef.deref();\n\t\t\t\t!n || !r || n.dispatchEvent(new u(t, n, r, !0));\n\t\t\t}\n\t\t}\n\t};\n}, p = Symbol.for(\"pie.context.documentRoot\");\nfunction m(e) {\n\tif (!e) return;\n\tlet t = e;\n\tif (t[p]) return;\n\tlet n = e.documentElement;\n\tif (!n) return;\n\tlet r = new f(n);\n\tr.attach(), t[p] = r;\n}\n//#endregion\n//#region ../../../node_modules/.bun/@pie-players+pie-context@1.0.0-beta.3/node_modules/@pie-players/pie-context/dist/consumer.js\nvar h = class {\n\thost;\n\tcontext;\n\tsubscribe;\n\tonValue;\n\tisConnected = !1;\n\tisDisconnected = !1;\n\tunsubscribe;\n\tcurrentValue;\n\tconstructor(e, t) {\n\t\tthis.host = e, this.context = t.context, this.subscribe = t.subscribe ?? !0, this.onValue = t.onValue;\n\t}\n\tconnect() {\n\t\tthis.isConnected || (this.isConnected = !0, this.isDisconnected = !1, this.subscribe && m(this.host.ownerDocument), this.requestValue());\n\t}\n\tdisconnect() {\n\t\tthis.isConnected && (this.isConnected = !1, this.isDisconnected = !0, this.unsubscribe?.(), this.unsubscribe = void 0);\n\t}\n\tget value() {\n\t\treturn this.currentValue;\n\t}\n\thandleValue = (e, t) => {\n\t\tif (this.isDisconnected) {\n\t\t\tt?.();\n\t\t\treturn;\n\t\t}\n\t\tt !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = t), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = e, this.onValue?.(e);\n\t};\n\trequestValue() {\n\t\tthis.host.dispatchEvent(new u(this.context, this.host, this.handleValue, this.subscribe));\n\t}\n}, g = (e, t, n) => {\n\tlet r = new h(e, {\n\t\tcontext: t,\n\t\tsubscribe: !0,\n\t\tonValue: n\n\t});\n\tr.connect();\n\tlet i = (e) => {\n\t\te.context === t && r.requestValue();\n\t};\n\treturn e.addEventListener(\"context-provider\", i), () => {\n\t\te.removeEventListener(\"context-provider\", i), r.disconnect();\n\t};\n}, _ = ((e) => e)(Symbol.for(\"pie.sessionCommit\")), v = 1500;\nfunction y(e) {\n\treturn typeof e == \"number\" && Number.isFinite(e) && e >= 0 ? e : v;\n}\nfunction b(e, t) {\n\treturn g(e, _, (e) => {\n\t\tt(y(e?.idleSaveDelayMs));\n\t});\n}\n//#endregion\n//#region src/index.ts\nvar x = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, S = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { v as DEFAULT_IDLE_SAVE_DELAY_MS, x as ModelSetEvent, e as SESSION_COMMIT_METHOD, S as SessionChangedEvent, a as createSessionNotifier, o as flushSessionNotifiers, y as resolveIdleSaveDelay, b as subscribeIdleSaveDelay };\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\n\nimport { color } from '@pie-lib/render-ui';\nimport Radio from '@mui/material/Radio';\n\nconst StyledRadio: any = styled(Radio)({\n '&.MuiRadio-root': {\n color: `var(--choice-input-color, ${color.text()})`,\n },\n '&.MuiRadio-root.Mui-checked': {\n color: `var(--choice-input-selected-color, ${color.primary()})`,\n },\n '&.MuiRadio-root.Mui-disabled': {\n color: `var(--choice-input-disabled-color, ${color.defaults.DISABLED})`,\n },\n});\n\nconst ChoiceInput = (props) => {\n const { disabled, checked, labelledBy, matrixKey, matrixValue, name, onChange } = props;\n\n const onChangeWrapper = () => {\n if (disabled) {\n return;\n }\n onChange({\n matrixValue,\n matrixKey,\n });\n };\n\n return (\n <StyledRadio\n checked={checked}\n name={name}\n onChange={onChangeWrapper}\n disabled={disabled}\n slotProps={{ input: { 'aria-labelledby': labelledBy } }}\n />\n );\n};\n\nChoiceInput.propTypes = {\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool.isRequired,\n labelledBy: PropTypes.string,\n matrixValue: PropTypes.number.isRequired,\n matrixKey: PropTypes.string.isRequired,\n name: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n};\n\nChoiceInput.defaultProps = {\n checked: false,\n disabled: false,\n};\n\nexport default ChoiceInput;\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport ChoiceInput from './ChoiceInput.js';\nimport { color, Collapsible as CollapsibleImport, PreviewPrompt as PreviewPromptImport, useUniqueId } from '@pie-lib/render-ui';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\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}\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;\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nconst MatrixWrapper = styled.div`\n color: ${color.text()};\n background-color: ${color.background()};\n font-family: Roboto, Arial, Helvetica, sans-serif;\n`;\n\nconst MatrixGridWrapper = styled.div`\n display: grid;\n grid-template-columns: ${(props) => props.gridTemplateColumns};\n grid-column-gap: 30px;\n grid-row-gap: 20px;\n margin-top: 20px;\n`;\n\n// A subgrid keeps the row's cells in the matrix columns while the row is its own radio group.\nconst MatrixRow = styled.div`\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n`;\n\nconst TeacherInstructions: any = styled(Collapsible)`\n margin-bottom: 16px;\n`;\n\nconst MatrixGridItem = styled.div`\n align-self: center;\n justify-self: center;\n white-space: nowrap;\n`;\n\nconst Matrix = (props) => {\n const {\n disabled,\n prompt,\n onSessionChange,\n columnLabels,\n matrixValues,\n rowLabels,\n session,\n teacherInstructions,\n language,\n } = props;\n\n // The row and column labels are plain grid cells, so each radio references them by id for its name.\n const idPrefix = useUniqueId('matrix');\n const rowLabelId = (rowIndex) => `${idPrefix}-row-${rowIndex}`;\n const columnLabelId = (columnIndex) => `${idPrefix}-column-${columnIndex}`;\n // A row's radios share a name, so the browser gives the row one tab stop and arrow-key selection.\n const rowGroupName = (rowIndex) => `${idPrefix}-row-${rowIndex}-choice`;\n const gridTemplateColumns = [...columnLabels, {}].map(() => 'min-content').join(' ');\n\n return (\n <MatrixWrapper>\n {teacherInstructions && (\n <TeacherInstructions\n className={teacherInstructions}\n labels={{\n hidden: translator.t('common:showTeacherInstructions', { lng: language }),\n visible: translator.t('common:hideTeacherInstructions', { lng: language }),\n }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </TeacherInstructions>\n )}\n\n <PreviewPrompt className=\"prompt\" prompt={prompt} />\n\n <MatrixGridWrapper gridTemplateColumns={gridTemplateColumns}>\n <MatrixGridItem />\n {columnLabels.map((columnLabel, columnIndex) => (\n <MatrixGridItem key={`column-${columnIndex}`} id={columnLabelId(columnIndex)}>\n {columnLabel}\n </MatrixGridItem>\n ))}\n {rowLabels.map((rowLabel, rowIndex) => (\n <MatrixRow key={`row-${rowIndex}`} role=\"radiogroup\" aria-labelledby={rowLabelId(rowIndex)}>\n <MatrixGridItem id={rowLabelId(rowIndex)}>{rowLabel}</MatrixGridItem>\n {columnLabels.map((_, columnIndex) => {\n const matrixKey = `${rowIndex}-${columnIndex}`;\n\n return (\n <MatrixGridItem key={matrixKey}>\n <ChoiceInput\n matrixKey={matrixKey}\n matrixValue={matrixValues[matrixKey] || 0}\n disabled={disabled}\n name={rowGroupName(rowIndex)}\n labelledBy={`${rowLabelId(rowIndex)} ${columnLabelId(columnIndex)}`}\n onChange={onSessionChange}\n checked={session.value && Object.prototype.hasOwnProperty.call(session.value, matrixKey)}\n />\n </MatrixGridItem>\n );\n })}\n </MatrixRow>\n ))}\n </MatrixGridWrapper>\n </MatrixWrapper>\n );\n};\n\nMatrix.propTypes = {\n prompt: PropTypes.string,\n teacherInstructions: PropTypes.string,\n language: PropTypes.string,\n session: PropTypes.object,\n matrixValues: PropTypes.object,\n rowLabels: PropTypes.arrayOf(PropTypes.string),\n columnLabels: PropTypes.arrayOf(PropTypes.string),\n disabled: PropTypes.bool.isRequired,\n onSessionChange: PropTypes.func.isRequired,\n};\n\nMatrix.defaultProps = {\n session: {\n value: {},\n },\n};\n\nexport default Matrix;\n","// @ts-nocheck\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { PreviewLayout as PreviewLayoutImport } 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}\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;\nconst PreviewLayout = unwrapReactInteropSymbol(PreviewLayoutImport, 'PreviewLayout') || unwrapReactInteropSymbol(renderUi.PreviewLayout, 'PreviewLayout');\nimport Matrix from './Matrix.js';\n\nclass Main extends React.Component {\n static propTypes = {\n model: PropTypes.object,\n session: PropTypes.object,\n onSessionChange: PropTypes.func,\n };\n\n static defaultProps = {\n model: {},\n session: {},\n };\n\n render() {\n const { model, onSessionChange, session } = this.props;\n const { extraCSSRules } = model;\n return (\n <PreviewLayout extraCSSRules={extraCSSRules}>\n <Matrix {...model} session={session} onSessionChange={onSessionChange} />\n </PreviewLayout>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport Main from './Main.js';\n\nexport const isComplete = (session) => {\n if (!session || !session.value) {\n return false;\n }\n return !!Object.keys(session.value).length;\n};\n\nexport default class Matrix extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n }\n\n set model(m) {\n this._model = m;\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n sessionChanged({ matrixKey, matrixValue }) {\n // keys are `row-column`: the separator keeps row 1 from matching rows 10 to 19\n const matrixRowPrefix = `${matrixKey.split('-')[0]}-`;\n const sessionValueClone = Object.keys(this._session.value || {}).reduce((acc, key) => {\n if (!key.startsWith(matrixRowPrefix)) {\n acc[key] = this._session.value[key];\n }\n return acc;\n }, {});\n sessionValueClone[matrixKey] = matrixValue;\n this._session.value = sessionValueClone;\n const complete = isComplete(this._session, this._model);\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), complete));\n this._render();\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onSessionChange: this.sessionChanged.bind(this),\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }\n}\n"],"mappings":";;;;;CA0LQ,MAAM,UAAU,YAAY;CACnC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG,GAAG;EACpB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;IACX,UAAU;GACX;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD;IAAG,IAAI,MAAM,UAAU,YAAY;CAClC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG;EACjB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;GACZ;EACD,CAAC,GAAG,KAAK,YAAY,GAA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UAAU,KAAK,MAAM;EAGtD,AADA,KAAK,cAAc,IAAI,EAAoB,KAAK,QAAQ,YAAY,GAAG,CAAQ,CAAC,GAChF,KAAK,QAAQ;CACf;CAEA,oBAAoB;EAClB,KAAK,QAAQ;CACf;CAEA,UAAU;EACR,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,UACxB;EAGF,IAAM,IAAK,EAAM,cAAc,GAAM;GACnC,OAAO,KAAK;GACZ,SAAS,KAAK;GACd,iBAAiB,KAAK,eAAe,KAAK,IAAI;EAChD,CAAC;EAMD,AAJA,AACE,KAAK,UAAQ,EAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAE,GACpB,qBAAqB;GACnB,EAAW,IAAI;EACjB,CAAC;CACH;CAEA,uBAAuB;EACrB,AAEE,KAAK,WADL,KAAK,MAAM,QAAQ,GACN;CAEjB;AACF"}
|
package/dist/index.iife.js
CHANGED
|
@@ -40,7 +40,7 @@ Error generating stack: `+e.message+`
|
|
|
40
40
|
color: ${at} !important;
|
|
41
41
|
background-color: ${lt} !important;
|
|
42
42
|
}
|
|
43
|
-
`;function dt(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=it,t.textContent=ut,e.head.appendChild(t)}var ft=/[-]/g,pt={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},mt={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},ht={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},gt={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},_t={"+":`plus`,"-":`minus`,"−":`minus`,"±":`plus or minus`,"∓":`minus or plus`,"×":`times`,"⋅":`times`,"·":`times`,"*":`times`,"÷":`divided by`,"/":`divided by`,"=":`equals`,"≠":`does not equal`,"<":`is less than`,">":`is greater than`,"≤":`is less than or equal to`,"≥":`is greater than or equal to`,"≈":`is approximately equal to`,"≡":`is equivalent to`,"∝":`is proportional to`,"∈":`is an element of`,"∉":`is not an element of`,"⊂":`is a subset of`,"⊆":`is a subset of or equal to`,"∪":`union`,"∩":`intersection`,"→":`right arrow`,"←":`left arrow`,"⇒":`implies`,"⇔":`if and only if`,"∑":`sum`,"∏":`product`,"∫":`integral`,"∞":`infinity`,"∠":`angle`,"⊥":`is perpendicular to`,"∥":`is parallel to`,"∴":`therefore`,",":`comma`,";":`semicolon`,":":`colon`,"|":`vertical bar`,"‖":`double vertical bar`,...mt,...ht,...gt},vt=new Set([`|`,`‖`]),yt=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),bt={α:`alpha`,β:`beta`,γ:`gamma`,δ:`delta`,ε:`epsilon`,θ:`theta`,λ:`lambda`,μ:`mu`,π:`pi`,ρ:`rho`,σ:`sigma`,τ:`tau`,φ:`phi`,ω:`omega`,Δ:`capital delta`,Σ:`capital sigma`,Ω:`capital omega`,"∞":`infinity`,sin:`sine`,cos:`cosine`,tan:`tangent`,sec:`secant`,csc:`cosecant`,cot:`cotangent`,ln:`natural log`,lim:`limit`},xt={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},St=e=>(e.textContent??``).replace(ft,``).replace(/\s+/g,` `).trim(),Ct=e=>e.replace(/\s+/g,` `).trim(),wt=e=>[...e.children];function Tt(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?Tt(e.children[0]):!1}function Et(e){let t=e?St(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function Dt(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function Ot(e){return bt[e]??e}function kt(e){return _t[e]??e}function At(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(zt(r)),n=!0;continue}let e=St(r);e&&(!n&&pt[e]?t.push(pt[e]):e in gt?t.push(gt[e]):(t.push(kt(e)),n=e in ht||vt.has(e)&&n))}return t.filter(Boolean).join(` `)}function jt(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(St(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&St(t)===St(r)&&!a.some(i)){let e=Ct(At(a));return St(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return At(e)}function Mt(e,t){let n=e?zt(e):``,r=t?zt(t):``;return Tt(e)&&Tt(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function Nt(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function Pt(e,t){let n=t?St(t):``;if(t&&Tt(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in gt)return`${e} ${gt[n]}`}let r=t?zt(t):``;return Tt(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function Ft(e,t){let n=t?zt(t):``;return Tt(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function It(e,t,n){let r=St(e);if(r===`lim`)return`limit as ${t?zt(t):``} of`;if(!yt.has(r))return;let i=t?`from ${zt(t)}`:``,a=n?`to ${zt(n)}`:``;return`${kt(r)} ${i} ${a} of`}function Lt(e){let t=wt(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>wt(e).filter(e=>e.localName===`mtd`)),r=Math.max(0,...n.map(e=>e.length)),i=n.map((e,t)=>`row ${t+1}: ${e.map(e=>Ct(At(wt(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function Rt(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=wt(e).map((e,t,n)=>t<n.length-1?`${zt(e)} ${kt(r[Math.min(t,r.length-1)]??`,`)}`:zt(e));return[kt(t),...i,kt(n)].filter(Boolean).join(` `)}function zt(e){let t=wt(e);switch(e.localName){case`mi`:return Ot(St(e));case`mn`:case`mtext`:case`ms`:return St(e);case`mo`:return kt(St(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?zt(t[0]):``;case`mfrac`:return Mt(t[0],t[1]);case`msqrt`:return Nt(Ct(At(t)),`square root`,t.length===1&&Tt(t[0]));case`mroot`:{let e=Et(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${Dt(e)} root`:`root with index ${t[1]?zt(t[1]):``}`;return Nt(t[0]?zt(t[0]):``,n,Tt(t[0]))}case`msup`:return Pt(t[0]?zt(t[0]):``,t[1]);case`msub`:return Ft(t[0]?zt(t[0]):``,t[1]);case`msubsup`:return(t[0]?It(t[0],t[1],t[2]):void 0)||Pt(Ft(t[0]?zt(t[0]):``,t[1]),t[2]);case`munder`:case`mover`:case`munderover`:{let[n,r,i]=t,a=e.localName===`mover`?void 0:r,o=e.localName===`munder`?void 0:e.localName===`mover`?r:i,s=n?It(n,a,o):void 0;if(s)return s;let c=n?zt(n):``,l=e.localName===`mover`&&r?xt[St(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${zt(a)} below`:``,o?`with ${zt(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return Rt(e);case`mtable`:return Lt(e);case`mrow`:case`math`:return jt(t);default:return t.length?At(t):St(e)}}function Bt(e){return Ct(zt(e))}var Vt=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function Ht(e){if(e.hasAttribute(`aria-label`)||!e.closest(Vt))return;let t=e.querySelector(`math`),n=t?Bt(t):``;n&&e.setAttribute(`aria-label`,n)}function Ut(e){for(let t of e.querySelectorAll(`mjx-container`))Ht(t)}var Wt=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function Gt(){let e=globalThis;e[Wt]||(e[Wt]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${y}`))}function Kt(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),Gt()}function F(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>Kt(e),{once:!0}),a})}`${S}`;var qt={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},Jt=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,Yt=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,Xt=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,Zt=/\\embed\{newLine\}\[\]/g,Qt=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],$t=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),en=`MJX-CHTML-styles`,tn=`PIE-MJX-SVG-styles`,nn=`PIE-MathJax-Menu-Settings`,rn={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},an=200,on=201,sn=202;function cn(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function ln(e){for(let[t,n]of Qt)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function un(e){return ln(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var dn=`mathjax_ignore`,fn=`mathjax_process`;function pn(e,t){let n=e.closest(`.${dn}, .${fn}`);return n!==null&&t.contains(n)&&!n.classList.contains(fn)}function mn(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||pn(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${un(n)}\\)`.replace(Zt,`\\newline `),t.dataset.mathHandled=`true`)}}function hn(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function gn(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?Xt:Yt).test(e.textContent??``)}function _n(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=ne(e,{}.url),c=E(),l={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=le();return vn(t)&&yn(t),e}}},startup:{typeset:!1,ready:()=>{let e=le(),r=e?.startup,i=vn(e);i&&(yn(e),bn(e,s.speechLocales),O(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(xn(r?.document),Sn(r?.document),r?.document?.addStyles?.(rn),F(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...qt}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:c}},a11y:{inTabOrder:c}}};r&&l.tex&&(console.warn(Jt),l.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],l.tex.processEscapes=!0),a||(l.chtml={fontURL:``});let u=k(s.speechLocales);u&&l.options&&(l.options.sre={locale:u}),de(l,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function vn(e){return!!e?.version?.startsWith(`4.`)}function yn(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=pe);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=tn)}function bn(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=nn;try{let e=localStorage.getItem(nn);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(nn,JSON.stringify(i)):localStorage.removeItem(nn)}catch{}}}function xn(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(cn(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,on,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&cn(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===en&&(r.id=pe),Tn()}function Sn(e){let t=e=>{e.typesetRoot&&Ht(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,sn,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function Cn(e){return e instanceof HTMLStyleElement&&me.includes(e.id)}function wn(e){M(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function Tn(){let e=document.head,t=[...e.children].find(Cn);if(t){wn(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(Cn);if(e){wn(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function En(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=an&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function Dn(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=le()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function On(e){let t=le();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():Dn(t):_n(e)}function kn(e){return On(e).then(()=>{let e=le();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function An(e){let t=fe,n=t[$t];return n||(n=kn(e),t[$t]=n),n}function jn(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=he();r&&M(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),mn(n),P(n),hn(n),rt(n);let i=An(e);if(!gn(n,t)){i.catch(()=>{});return}await i;let a=le();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){dt(),En(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}cn(n),Ut(n)}}}var Mn=`@pie-lib/math-rendering`,Nn=`@pie-lib/math-rendering@2`,Pn=`pie-print`,Fn=50,In=1e4,Ln=null;function Rn(){return!!window[Nn]?.opts?.useSingleDollar}function zn(){return Ln||=jn({useSingleDollar:Rn()}),Ln}function Bn(){if(typeof window>`u`)return null;let e=window[Mn];return typeof e?.renderMath==`function`&&e.renderMath!==Wn?e:null}function Vn(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===Pn)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Hn(){let e=window.renderMath;return typeof e==`function`?e:null}async function Un(e){let t=Vn(e);if(!t)return null;let n=Hn();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+In;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,Fn));let e=Hn();if(e)return e}return null}var Wn=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Bn(),i=r||t?null:await Un(n);return r?(await r.renderMath?.(n),Ut(n)):i&&i!==Wn?(await i(n),Ut(n)):await zn()(n),t?n.innerHTML:void 0},Gn=function(){return null};Gn.isRequired=Gn;var Kn=()=>Gn,I={array:Gn,bigint:Gn,bool:Gn,func:Gn,number:Gn,object:Gn,string:Gn,symbol:Gn,any:Gn,element:Gn,elementType:Gn,node:Gn,arrayOf:Kn,instanceOf:Kn,objectOf:Kn,oneOf:Kn,oneOfType:Kn,shape:Kn,exact:Kn,checkPropTypes:()=>{},resetWarningCache:()=>{}};I.PropTypes=I;var qn=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),Jn=o(((e,t)=>{t.exports=qn()})),L=l(d(),1),R=Jn(),Yn=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,Xn=({size:e,children:t})=>(e=Yn(e),(0,R.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));Xn.propTypes={size:I.number,children:I.oneOfType([I.arrayOf(I.node),I.node]).isRequired};var Zn=({size:e,children:t,sx:n})=>(0,R.jsx)(Xn,{size:e,children:(0,R.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});Zn.propTypes={size:I.oneOfType([I.string,I.number]),children:I.oneOfType([I.arrayOf(I.node),I.node]).isRequired,sx:I.object};var Qn=({fill:e})=>(0,R.jsx)(`polygon`,{points:`17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7`,fill:e});Qn.propTypes={fill:I.string.isRequired};var $n=({fill:e})=>(0,R.jsx)(`polygon`,{transform:`translate(2, 0)`,points:`34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3`,fill:e});$n.propTypes={fill:I.string.isRequired};var er=({fill:e})=>(0,R.jsx)(`path`,{transform:`translate(1, 0)`,d:`M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z`,fill:e});er.propTypes={fill:I.string.isRequired};var tr=({fill:e})=>(0,R.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});tr.propTypes={fill:I.string.isRequired};var nr=({fill:e})=>(0,R.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});nr.propTypes={fill:I.string.isRequired};var rr=(e,t)=>{class n extends L.Component{static propTypes={iconSet:I.oneOf([`emoji`,`check`]),shape:I.oneOf([`round`,`square`]),category:I.oneOf([`feedback`,void 0]),open:I.bool,size:I.oneOfType([I.number,I.string]),fg:I.string,bg:I.string};static defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,size:30,fg:`#4aaf46`,bg:`#f8ffe2`};render(){let{iconSet:n,shape:r,category:i,open:a,size:o,fg:s,bg:c}=this.props,l=n===`check`?(0,R.jsx)(e,{fill:s}):(0,R.jsx)(t,{fill:s}),u=n===`check`?(0,R.jsx)(e,{fill:c}):(0,R.jsx)(t,{fill:c});return a?(0,R.jsx)(Zn,{size:o,children:u}):(0,R.jsxs)(Zn,{size:o,children:[i===`feedback`?r===`round`?(0,R.jsx)(er,{fill:c}):(0,R.jsx)($n,{fill:c}):r===`round`?(0,R.jsx)(tr,{fill:c}):(0,R.jsx)(nr,{fill:c}),l]})}}return n},ir=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,R.jsx)(`path`,{d:`M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2
|
|
43
|
+
`;function dt(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=it,t.textContent=ut,e.head.appendChild(t)}var ft=/[-]/g,pt={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},mt={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},ht={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},gt={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},_t={"+":`plus`,"-":`minus`,"−":`minus`,"±":`plus or minus`,"∓":`minus or plus`,"×":`times`,"⋅":`times`,"·":`times`,"*":`times`,"÷":`divided by`,"/":`divided by`,"=":`equals`,"≠":`does not equal`,"<":`is less than`,">":`is greater than`,"≤":`is less than or equal to`,"≥":`is greater than or equal to`,"≈":`is approximately equal to`,"≡":`is equivalent to`,"∝":`is proportional to`,"∈":`is an element of`,"∉":`is not an element of`,"⊂":`is a subset of`,"⊆":`is a subset of or equal to`,"∪":`union`,"∩":`intersection`,"→":`right arrow`,"←":`left arrow`,"⇒":`implies`,"⇔":`if and only if`,"∑":`sum`,"∏":`product`,"∫":`integral`,"∞":`infinity`,"∠":`angle`,"⊥":`is perpendicular to`,"∥":`is parallel to`,"∴":`therefore`,",":`comma`,";":`semicolon`,":":`colon`,"|":`vertical bar`,"‖":`double vertical bar`,...mt,...ht,...gt},vt=new Set([`|`,`‖`]),yt=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),bt={α:`alpha`,β:`beta`,γ:`gamma`,δ:`delta`,ε:`epsilon`,θ:`theta`,λ:`lambda`,μ:`mu`,π:`pi`,ρ:`rho`,σ:`sigma`,τ:`tau`,φ:`phi`,ω:`omega`,Δ:`capital delta`,Σ:`capital sigma`,Ω:`capital omega`,"∞":`infinity`,sin:`sine`,cos:`cosine`,tan:`tangent`,sec:`secant`,csc:`cosecant`,cot:`cotangent`,ln:`natural log`,lim:`limit`},xt={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},St=e=>(e.textContent??``).replace(ft,``).replace(/\s+/g,` `).trim(),Ct=e=>e.replace(/\s+/g,` `).trim(),wt=e=>[...e.children];function Tt(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?Tt(e.children[0]):!1}function Et(e){let t=e?St(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function Dt(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function Ot(e){return bt[e]??e}function kt(e){return _t[e]??e}function At(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(zt(r)),n=!0;continue}let e=St(r);e&&(!n&&pt[e]?t.push(pt[e]):e in gt?t.push(gt[e]):(t.push(kt(e)),n=e in ht||vt.has(e)&&n))}return t.filter(Boolean).join(` `)}function jt(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(St(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&St(t)===St(r)&&!a.some(i)){let e=Ct(At(a));return St(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return At(e)}function Mt(e,t){let n=e?zt(e):``,r=t?zt(t):``;return Tt(e)&&Tt(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function Nt(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function Pt(e,t){let n=t?St(t):``;if(t&&Tt(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in gt)return`${e} ${gt[n]}`}let r=t?zt(t):``;return Tt(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function Ft(e,t){let n=t?zt(t):``;return Tt(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function It(e,t,n){let r=St(e);if(r===`lim`)return`limit as ${t?zt(t):``} of`;if(!yt.has(r))return;let i=t?`from ${zt(t)}`:``,a=n?`to ${zt(n)}`:``;return`${kt(r)} ${i} ${a} of`}function Lt(e){let t=wt(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>wt(e).filter(e=>e.localName===`mtd`)),r=Math.max(0,...n.map(e=>e.length)),i=n.map((e,t)=>`row ${t+1}: ${e.map(e=>Ct(At(wt(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function Rt(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=wt(e).map((e,t,n)=>t<n.length-1?`${zt(e)} ${kt(r[Math.min(t,r.length-1)]??`,`)}`:zt(e));return[kt(t),...i,kt(n)].filter(Boolean).join(` `)}function zt(e){let t=wt(e);switch(e.localName){case`mi`:return Ot(St(e));case`mn`:case`mtext`:case`ms`:return St(e);case`mo`:return kt(St(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?zt(t[0]):``;case`mfrac`:return Mt(t[0],t[1]);case`msqrt`:return Nt(Ct(At(t)),`square root`,t.length===1&&Tt(t[0]));case`mroot`:{let e=Et(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${Dt(e)} root`:`root with index ${t[1]?zt(t[1]):``}`;return Nt(t[0]?zt(t[0]):``,n,Tt(t[0]))}case`msup`:return Pt(t[0]?zt(t[0]):``,t[1]);case`msub`:return Ft(t[0]?zt(t[0]):``,t[1]);case`msubsup`:return(t[0]?It(t[0],t[1],t[2]):void 0)||Pt(Ft(t[0]?zt(t[0]):``,t[1]),t[2]);case`munder`:case`mover`:case`munderover`:{let[n,r,i]=t,a=e.localName===`mover`?void 0:r,o=e.localName===`munder`?void 0:e.localName===`mover`?r:i,s=n?It(n,a,o):void 0;if(s)return s;let c=n?zt(n):``,l=e.localName===`mover`&&r?xt[St(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${zt(a)} below`:``,o?`with ${zt(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return Rt(e);case`mtable`:return Lt(e);case`mrow`:case`math`:return jt(t);default:return t.length?At(t):St(e)}}function Bt(e){return Ct(zt(e))}var Vt=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function Ht(e){if(e.hasAttribute(`aria-label`)||!e.closest(Vt))return;let t=e.querySelector(`math`),n=t?Bt(t):``;n&&e.setAttribute(`aria-label`,n)}function Ut(e){for(let t of e.querySelectorAll(`mjx-container`))Ht(t)}var Wt=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function Gt(){let e=globalThis;e[Wt]||(e[Wt]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${y}`))}function Kt(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),Gt()}function F(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>Kt(e),{once:!0}),a})}`${S}`;var qt={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1],perpendicular:`\\perp`,divide:`\\div`},Jt=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,Yt=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,Xt=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,Zt=/\\embed\{newLine\}\[\]/g,Qt=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],$t=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),en=`MJX-CHTML-styles`,tn=`PIE-MJX-SVG-styles`,nn=`PIE-MathJax-Menu-Settings`,rn={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},an=200,on=201,sn=202;function cn(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function ln(e){for(let[t,n]of Qt)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function un(e){return ln(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var dn=`mathjax_ignore`,fn=`mathjax_process`;function pn(e,t){let n=e.closest(`.${dn}, .${fn}`);return n!==null&&t.contains(n)&&!n.classList.contains(fn)}function mn(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||pn(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${un(n)}\\)`.replace(Zt,`\\newline `),t.dataset.mathHandled=`true`)}}function hn(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function gn(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?Xt:Yt).test(e.textContent??``)}function _n(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=ne(e,{}.url),c=E(),l={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=le();return vn(t)&&yn(t),e}}},startup:{typeset:!1,ready:()=>{let e=le(),r=e?.startup,i=vn(e);i&&(yn(e),bn(e,s.speechLocales),O(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(xn(r?.document),Sn(r?.document),r?.document?.addStyles?.(rn),F(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...qt}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:c}},a11y:{inTabOrder:c}}};r&&l.tex&&(console.warn(Jt),l.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],l.tex.processEscapes=!0),a||(l.chtml={fontURL:``});let u=k(s.speechLocales);u&&l.options&&(l.options.sre={locale:u}),de(l,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function vn(e){return!!e?.version?.startsWith(`4.`)}function yn(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=pe);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=tn)}function bn(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=nn;try{let e=localStorage.getItem(nn);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(nn,JSON.stringify(i)):localStorage.removeItem(nn)}catch{}}}function xn(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(cn(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,on,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&cn(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===en&&(r.id=pe),Tn()}function Sn(e){let t=e=>{e.typesetRoot&&Ht(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,sn,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function Cn(e){return e instanceof HTMLStyleElement&&me.includes(e.id)}function wn(e){M(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function Tn(){let e=document.head,t=[...e.children].find(Cn);if(t){wn(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(Cn);if(e){wn(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function En(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=an&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function Dn(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=le()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function On(e){let t=le();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():Dn(t):_n(e)}function kn(e){return On(e).then(()=>{let e=le();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function An(e){let t=fe,n=t[$t];return n||(n=kn(e),t[$t]=n),n}function jn(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=he();r&&M(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),mn(n),P(n),hn(n),rt(n);let i=An(e);if(!gn(n,t)){i.catch(()=>{});return}await i;let a=le();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){dt(),En(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}cn(n),Ut(n)}}}var Mn=`@pie-lib/math-rendering`,Nn=`@pie-lib/math-rendering@2`,Pn=`pie-print`,Fn=50,In=1e4,Ln=null;function Rn(){return!!window[Nn]?.opts?.useSingleDollar}function zn(){return Ln||=jn({useSingleDollar:Rn()}),Ln}function Bn(){if(typeof window>`u`)return null;let e=window[Mn];return typeof e?.renderMath==`function`&&e.renderMath!==Wn?e:null}function Vn(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===Pn)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Hn(){let e=window.renderMath;return typeof e==`function`?e:null}async function Un(e){let t=Vn(e);if(!t)return null;let n=Hn();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+In;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,Fn));let e=Hn();if(e)return e}return null}var Wn=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Bn(),i=r||t?null:await Un(n);return r?(await r.renderMath?.(n),Ut(n)):i&&i!==Wn?(await i(n),Ut(n)):await zn()(n),t?n.innerHTML:void 0},Gn=function(){return null};Gn.isRequired=Gn;var Kn=()=>Gn,I={array:Gn,bigint:Gn,bool:Gn,func:Gn,number:Gn,object:Gn,string:Gn,symbol:Gn,any:Gn,element:Gn,elementType:Gn,node:Gn,arrayOf:Kn,instanceOf:Kn,objectOf:Kn,oneOf:Kn,oneOfType:Kn,shape:Kn,exact:Kn,checkPropTypes:()=>{},resetWarningCache:()=>{}};I.PropTypes=I;var qn=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),Jn=o(((e,t)=>{t.exports=qn()})),L=l(d(),1),R=Jn(),Yn=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,Xn=({size:e,children:t})=>(e=Yn(e),(0,R.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));Xn.propTypes={size:I.number,children:I.oneOfType([I.arrayOf(I.node),I.node]).isRequired};var Zn=({size:e,children:t,sx:n})=>(0,R.jsx)(Xn,{size:e,children:(0,R.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});Zn.propTypes={size:I.oneOfType([I.string,I.number]),children:I.oneOfType([I.arrayOf(I.node),I.node]).isRequired,sx:I.object};var Qn=({fill:e})=>(0,R.jsx)(`polygon`,{points:`17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7`,fill:e});Qn.propTypes={fill:I.string.isRequired};var $n=({fill:e})=>(0,R.jsx)(`polygon`,{transform:`translate(2, 0)`,points:`34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3`,fill:e});$n.propTypes={fill:I.string.isRequired};var er=({fill:e})=>(0,R.jsx)(`path`,{transform:`translate(1, 0)`,d:`M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z`,fill:e});er.propTypes={fill:I.string.isRequired};var tr=({fill:e})=>(0,R.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});tr.propTypes={fill:I.string.isRequired};var nr=({fill:e})=>(0,R.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});nr.propTypes={fill:I.string.isRequired};var rr=(e,t)=>{class n extends L.Component{static propTypes={iconSet:I.oneOf([`emoji`,`check`]),shape:I.oneOf([`round`,`square`]),category:I.oneOf([`feedback`,void 0]),open:I.bool,size:I.oneOfType([I.number,I.string]),fg:I.string,bg:I.string};static defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,size:30,fg:`#4aaf46`,bg:`#f8ffe2`};render(){let{iconSet:n,shape:r,category:i,open:a,size:o,fg:s,bg:c}=this.props,l=n===`check`?(0,R.jsx)(e,{fill:s}):(0,R.jsx)(t,{fill:s}),u=n===`check`?(0,R.jsx)(e,{fill:c}):(0,R.jsx)(t,{fill:c});return a?(0,R.jsx)(Zn,{size:o,children:u}):(0,R.jsxs)(Zn,{size:o,children:[i===`feedback`?r===`round`?(0,R.jsx)(er,{fill:c}):(0,R.jsx)($n,{fill:c}):r===`round`?(0,R.jsx)(tr,{fill:c}):(0,R.jsx)(nr,{fill:c}),l]})}}return n},ir=({fill:e})=>(0,R.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,R.jsx)(`path`,{d:`M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2
|
|
44
44
|
c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z`,fill:e}),(0,R.jsx)(`rect`,{x:`21.1`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e}),(0,R.jsx)(`rect`,{x:`12.7`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e})]});ir.propTypes={fill:I.string.isRequired};var ar=({fill:e,x:t=0,y:n=0})=>(0,R.jsx)(`polygon`,{transform:`translate(${t}, ${n})`,points:`19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4`,fill:e});ar.propTypes={fill:I.string.isRequired,x:I.number,y:I.number};var or=rr(ar,ir);or.propTypes={iconSet:I.oneOf([`emoji`,`check`]),shape:I.oneOf([`round`,`square`]),category:I.oneOf([`feedback`,void 0]),open:I.bool,fg:I.string,bg:I.string,size:I.oneOfType([I.string,I.number])},or.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#f8ffe2`,size:30};function sr(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var cr=`$$material`;function lr(){return lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lr.apply(null,arguments)}function ur(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dr(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var fr=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(dr(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=ur(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),pr=`-ms-`,mr=`-moz-`,z=`-webkit-`,hr=`comm`,gr=`rule`,_r=`decl`,vr=`@import`,yr=`@keyframes`,br=`@layer`,xr=Math.abs,Sr=String.fromCharCode,Cr=Object.assign;function wr(e,t){return Or(e,0)^45?(((t<<2^Or(e,0))<<2^Or(e,1))<<2^Or(e,2))<<2^Or(e,3):0}function Tr(e){return e.trim()}function Er(e,t){return(e=t.exec(e))?e[0]:e}function B(e,t,n){return e.replace(t,n)}function Dr(e,t){return e.indexOf(t)}function Or(e,t){return e.charCodeAt(t)|0}function kr(e,t,n){return e.slice(t,n)}function Ar(e){return e.length}function jr(e){return e.length}function Mr(e,t){return t.push(e),e}function Nr(e,t){return e.map(t).join(``)}var Pr=1,Fr=1,Ir=0,Lr=0,Rr=0,zr=``;function Br(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Pr,column:Fr,length:o,return:``}}function Vr(e,t){return Cr(Br(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Hr(){return Rr}function Ur(){return Rr=Lr>0?Or(zr,--Lr):0,Fr--,Rr===10&&(Fr=1,Pr--),Rr}function Wr(){return Rr=Lr<Ir?Or(zr,Lr++):0,Fr++,Rr===10&&(Fr=1,Pr++),Rr}function Gr(){return Or(zr,Lr)}function Kr(){return Lr}function qr(e,t){return kr(zr,e,t)}function Jr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Yr(e){return Pr=Fr=1,Ir=Ar(zr=e),Lr=0,[]}function Xr(e){return zr=``,e}function Zr(e){return Tr(qr(Lr-1,ei(e===91?e+2:e===40?e+1:e)))}function Qr(e){for(;(Rr=Gr())&&Rr<33;)Wr();return Jr(e)>2||Jr(Rr)>3?``:` `}function $r(e,t){for(;--t&&Wr()&&!(Rr<48||Rr>102||Rr>57&&Rr<65||Rr>70&&Rr<97););return qr(e,Kr()+(t<6&&Gr()==32&&Wr()==32))}function ei(e){for(;Wr();)switch(Rr){case e:return Lr;case 34:case 39:e!==34&&e!==39&&ei(Rr);break;case 40:e===41&&ei(e);break;case 92:Wr();break}return Lr}function ti(e,t){for(;Wr()&&e+Rr!==57&&!(e+Rr===84&&Gr()===47););return`/*`+qr(t,Lr-1)+`*`+Sr(e===47?e:Wr())}function ni(e){for(;!Jr(Gr());)Wr();return qr(e,Lr)}function ri(e){return Xr(ii(``,null,null,null,[``],e=Yr(e),0,[0],e))}function ii(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=Wr()){case 40:if(m!=108&&Or(C,d-1)==58){Dr(C+=B(Zr(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Zr(v);break;case 9:case 10:case 13:case 32:C+=Qr(m);break;case 92:C+=$r(Kr()-1,7);continue;case 47:switch(Gr()){case 42:case 47:Mr(oi(ti(Wr(),Kr()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=Ar(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=B(C,/\f/g,``)),p>0&&Ar(C)-d&&Mr(p>32?si(C+`;`,r,n,d-1):si(B(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(Mr(S=ai(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)ii(C,t,S,S,b,a,d,s,x);else switch(f===99&&Or(C,3)===110?100:f){case 100:case 108:case 109:case 115:ii(e,S,S,r&&Mr(ai(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:ii(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Ar(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Ur()==125)continue}switch(C+=Sr(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Ar(C)-1)*_,_=1;break;case 64:Gr()===45&&(C+=Zr(Wr())),f=Gr(),u=d=Ar(y=C+=ni(Kr())),v++;break;case 45:m===45&&Ar(C)==2&&(h=0)}}return a}function ai(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=jr(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=kr(e,d+1,d=xr(h=o[m])),y=e;_<p;++_)(y=Tr(h>0?f[_]+` `+v:B(v,/&\f/g,f[_])))&&(c[g++]=y);return Br(e,t,n,i===0?gr:s,c,l,u)}function oi(e,t,n){return Br(e,t,n,hr,Sr(Hr()),kr(e,2,-2),0)}function si(e,t,n,r){return Br(e,t,n,_r,kr(e,0,r),kr(e,r+1,-1),r)}function ci(e,t){for(var n=``,r=jr(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function li(e,t,n,r){switch(e.type){case br:if(e.children.length)break;case vr:case _r:return e.return=e.return||e.value;case hr:return``;case yr:return e.return=e.value+`{`+ci(e.children,r)+`}`;case gr:e.value=e.props.join(`,`)}return Ar(n=ci(e.children,r))?e.return=e.value+`{`+n+`}`:``}function ui(e){var t=jr(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function di(e){return function(t){t.root||(t=t.return)&&e(t)}}function fi(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var pi=function(e,t,n){for(var r=0,i=0;r=i,i=Gr(),r===38&&i===12&&(t[n]=1),!Jr(i);)Wr();return qr(e,Lr)},mi=function(e,t){var n=-1,r=44;do switch(Jr(r)){case 0:r===38&&Gr()===12&&(t[n]=1),e[n]+=pi(Lr-1,t,n);break;case 2:e[n]+=Zr(r);break;case 4:if(r===44){e[++n]=Gr()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=Sr(r)}while(r=Wr());return e},hi=function(e,t){return Xr(mi(Yr(e),t))},gi=new WeakMap,_i=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!gi.get(n))&&!r){gi.set(e,!0);for(var i=[],a=hi(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},vi=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function yi(e,t){switch(wr(e,t)){case 5103:return z+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+mr+e+pr+e+e;case 6828:case 4268:return z+e+pr+e+e;case 6165:return z+e+pr+`flex-`+e+e;case 5187:return z+e+B(e,/(\w+).+(:[^]+)/,z+`box-$1$2`+pr+`flex-$1$2`)+e;case 5443:return z+e+pr+`flex-item-`+B(e,/flex-|-self/,``)+e;case 4675:return z+e+pr+`flex-line-pack`+B(e,/align-content|flex-|-self/,``)+e;case 5548:return z+e+pr+B(e,`shrink`,`negative`)+e;case 5292:return z+e+pr+B(e,`basis`,`preferred-size`)+e;case 6060:return z+`box-`+B(e,`-grow`,``)+z+e+pr+B(e,`grow`,`positive`)+e;case 4554:return z+B(e,/([^-])(transform)/g,`$1`+z+`$2`)+e;case 6187:return B(B(B(e,/(zoom-|grab)/,z+`$1`),/(image-set)/,z+`$1`),e,``)+e;case 5495:case 3959:return B(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return B(B(e,/(.+:)(flex-)?(.*)/,z+`box-pack:$3`+pr+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+z+e+e;case 4095:case 3583:case 4068:case 2532:return B(e,/(.+)-inline(.+)/,z+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ar(e)-1-t>6)switch(Or(e,t+1)){case 109:if(Or(e,t+4)!==45)break;case 102:return B(e,/(.+:)(.+)-([^]+)/,`$1`+z+`$2-$3$1`+mr+(Or(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Dr(e,`stretch`)?yi(B(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(Or(e,t+1)!==115)break;case 6444:switch(Or(e,Ar(e)-3-(~Dr(e,`!important`)&&10))){case 107:return B(e,`:`,`:`+z)+e;case 101:return B(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+z+(Or(e,14)===45?`inline-`:``)+`box$3$1`+z+`$2$3$1`+pr+`$2box$3`)+e}break;case 5936:switch(Or(e,t+11)){case 114:return z+e+pr+B(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return z+e+pr+B(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return z+e+pr+B(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return z+e+pr+e+e}return e}var bi=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case _r:e.return=yi(e.value,e.length);break;case yr:return ci([Vr(e,{value:B(e.value,`@`,`@`+z)})],r);case gr:if(e.length)return Nr(e.props,function(t){switch(Er(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return ci([Vr(e,{props:[B(t,/:(read-\w+)/,`:`+mr+`$1`)]})],r);case`::placeholder`:return ci([Vr(e,{props:[B(t,/:(plac\w+)/,`:`+z+`input-$1`)]}),Vr(e,{props:[B(t,/:(plac\w+)/,`:`+mr+`$1`)]}),Vr(e,{props:[B(t,/:(plac\w+)/,pr+`input-$1`)]})],r)}return``})}}],xi=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||bi,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[_i,vi],l,u=[li,di(function(e){l.insert(e)})],d=ui(c.concat(r,u)),f=function(e){return ci(ri(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new fr({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},Si=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Ci=o(((e,t)=>{t.exports=Si()})),wi=o(((e,t)=>{var n=Ci(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function Ti(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var Ei=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},Di=function(e,t,n){Ei(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function Oi(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ki={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ai=/[A-Z]|^ms/g,ji=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mi=function(e){return e.charCodeAt(1)===45},Ni=function(e){return e!=null&&typeof e!=`boolean`},Pi=fi(function(e){return Mi(e)?e:e.replace(Ai,`-$&`).toLowerCase()}),Fi=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(ji,function(e,t,n){return zi={name:t,styles:n,next:zi},t})}return ki[e]!==1&&!Mi(e)&&typeof t==`number`&&t!==0?t+`px`:t};function Ii(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return zi={name:i.name,styles:i.styles,next:zi},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)zi={name:o.name,styles:o.styles,next:zi},o=o.next;return a.styles+`;`}return Li(e,t,n);case`function`:if(e!==void 0){var s=zi,c=n(e);return zi=s,Ii(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Li(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ii(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Ni(s)&&(r+=Pi(a)+`:`+Fi(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Ni(o[c])&&(r+=Pi(a)+`:`+Fi(a,o[c])+`;`);else{var l=Ii(e,t,o);switch(a){case`animation`:case`animationName`:r+=Pi(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var Ri=/label:\s*([^\s;{]+)\s*(;|$)/g,zi;function Bi(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;zi=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=Ii(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=Ii(n,t,e[o]),r&&(i+=a[o]);Ri.lastIndex=0;for(var s=``,c;(c=Ri.exec(i))!==null;)s+=`-`+c[1];return{name:Oi(i)+s,styles:i,next:zi}}var Vi=function(e){return e()},Hi=L.useInsertionEffect?L.useInsertionEffect:!1,Ui=Hi||Vi,Wi=Hi||L.useLayoutEffect,Gi=L.createContext(typeof HTMLElement<`u`?xi({key:`css`}):null),Ki=Gi.Provider,qi=function(e){return(0,L.forwardRef)(function(t,n){return e(t,(0,L.useContext)(Gi),n)})},Ji=L.createContext({}),Yi={}.hasOwnProperty,Xi=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Zi=function(e,t){var n={};for(var r in t)Yi.call(t,r)&&(n[r]=t[r]);return n[Xi]=e,n},Qi=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ei(t,n,r),Ui(function(){return Di(t,n,r)}),null},$i=qi(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Xi],a=[r],o=``;typeof e.className==`string`?o=Ti(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=Bi(a,void 0,L.useContext(Ji));o+=t.key+`-`+s.name;var c={};for(var l in e)Yi.call(e,l)&&l!==`css`&&l!==Xi&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),L.createElement(L.Fragment,null,L.createElement(Qi,{cache:t,serialized:s,isStringTag:typeof i==`string`}),L.createElement(i,c))});wi();var ea=function(e,t){var n=arguments;if(t==null||!Yi.call(t,`css`))return L.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=$i,i[1]=Zi(e,t);for(var a=2;a<r;a++)i[a]=n[a];return L.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(ea||={});var ta=qi(function(e,t){var n=e.styles,r=Bi([n],void 0,L.useContext(Ji)),i=L.useRef();return Wi(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Wi(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&Di(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function na(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bi(t)}function ra(){var e=na.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var ia=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,aa=fi(function(e){return ia.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),oa=function(e){return e!==`theme`},sa=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?aa:oa},ca=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},la=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ei(t,n,r),Ui(function(){return Di(t,n,r)}),null},ua=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=ca(t,n,r),c=s||sa(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=qi(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=L.useContext(Ji)}typeof e.className==`string`?a=Ti(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=Bi(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?sa(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),L.createElement(L.Fragment,null,L.createElement(la,{cache:t,serialized:m,isStringTag:typeof r==`string`}),L.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,lr({},n,r,{shouldForwardProp:ca(h,r,!0)})).apply(void 0,d)},h}},da=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),fa=ua.bind(null);da.forEach(function(e){fa[e]=fa(e)});var pa=new Map,ma={insert:void 0},ha=(e,t)=>{let n=xi(e);return n.sheet=new t({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n},ga;if(typeof document==`object`&&(ga=document.querySelector(`[name="emotion-insertion-point"]`),!ga)){ga=document.createElement(`meta`),ga.setAttribute(`name`,`emotion-insertion-point`),ga.setAttribute(`content`,``);let e=document.querySelector(`head`);e&&e.prepend(ga)}function _a(e,t){if(e||t){class n extends fr{insert(e,t){return ma.insert?ma.insert(e,t):(this.key&&this.key.endsWith(`global`)&&(this.before=ga),super.insert(e,t))}}let r=ha({key:`css`,insertionPoint:e?ga:void 0},n);if(t){let e=r.insert;r.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return r}}function va(e){let{injectFirst:t,enableCssLayer:n,children:r}=e,i=L.useMemo(()=>{let e=`${t}-${n}`;if(typeof document==`object`&&pa.has(e))return pa.get(e);let r=_a(t,n);return pa.set(e,r),r},[t,n]);return i?(0,R.jsx)(Ki,{value:i,children:r}):r}function ya(e){return e==null||Object.keys(e).length===0}function ba(e){let{styles:t,defaultTheme:n={}}=e;return(0,R.jsx)(ta,{styles:typeof t==`function`?e=>t(ya(e)?n:e):t})}function xa(e,t){return fa(e,t)}function Sa(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Ca=[];function wa(e){return Ca[0]=e,Bi(Ca)}var Ta=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),Ea=o(((e,t)=>{t.exports=Ta()}))();function Da(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Oa(e){if(L.isValidElement(e)||(0,Ea.isValidElementType)(e)||!Da(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=Oa(e[n])}),t}function ka(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return Da(e)&&Da(t)&&Object.keys(t).forEach(i=>{L.isValidElement(t[i])||(0,Ea.isValidElementType)(t[i])?r[i]=t[i]:Da(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Da(e[i])?r[i]=ka(e[i],t[i],n):n.clone?r[i]=Da(t[i])?Oa(t[i]):t[i]:r[i]=t[i]}),r}var Aa=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function ja(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Aa(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}function Ma(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function Na(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function Pa(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function Fa(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var Ia={borderRadius:4};function La(e,t){return t?ka(e,t,{clone:!1}):e}var Ra={xs:0,sm:600,md:900,lg:1200,xl:1536},za={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${Ra[e]}px)`},Ba={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:Ra[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Va(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||za;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||za;return Object.keys(t).reduce((i,a)=>{if(Na(e.keys,a)){let e=Pa(r.containerQueries?r:Ba,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||Ra).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function Ha(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function Ua(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function Wa(e){if(typeof e!=`string`)throw Error(sr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ga(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function Ka(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:Ga(e,n)||r,t&&(i=t(i,r,e)),i}function qa(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=Ga(o,r)||{};return Va(e,a,e=>{let r=Ka(s,i,e);return e===r&&typeof e==`string`&&(r=Ka(s,i,`${t}${e==="default"?``:Wa(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function Ja(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var Ya={m:`margin`,p:`padding`},Xa={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},Za={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Qa=Ja(e=>{if(e.length>2)if(Za[e])e=Za[e];else return[e];let[t,n]=e.split(``),r=Ya[t],i=Xa[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),$a=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],eo=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],to=[...$a,...eo];function no(e,t,n,r){let i=Ga(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function ro(e){return no(e,`spacing`,8,`spacing`)}function io(e,t){return typeof t==`string`||t==null?t:e(t)}function ao(e,t){return n=>e.reduce((e,r)=>(e[r]=io(t,n),e),{})}function oo(e,t,n,r){if(!t.includes(n))return null;let i=ao(Qa(n),r),a=e[n];return Va(e,a,i)}function so(e,t){let n=ro(e.theme);return Object.keys(e).map(r=>oo(e,t,r,n)).reduce(La,{})}function co(e){return so(e,$a)}co.propTypes={},co.filterProps=$a;function lo(e){return so(e,eo)}lo.propTypes={},lo.filterProps=eo;function uo(e){return so(e,to)}uo.propTypes={},uo.filterProps=to;function fo(e=8,t=ro({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function po(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?La(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function mo(e){return typeof e==`number`?`${e}px solid`:e}function ho(e,t){return qa({prop:e,themeKey:`borders`,transform:t})}var go=ho(`border`,mo),_o=ho(`borderTop`,mo),vo=ho(`borderRight`,mo),yo=ho(`borderBottom`,mo),bo=ho(`borderLeft`,mo),xo=ho(`borderColor`),So=ho(`borderTopColor`),Co=ho(`borderRightColor`),wo=ho(`borderBottomColor`),To=ho(`borderLeftColor`),Eo=ho(`outline`,mo),Do=ho(`outlineColor`),Oo=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=no(e.theme,`shape.borderRadius`,4,`borderRadius`);return Va(e,e.borderRadius,e=>({borderRadius:io(t,e)}))}return null};Oo.propTypes={},Oo.filterProps=[`borderRadius`],po(go,_o,vo,yo,bo,xo,So,Co,wo,To,Oo,Eo,Do);var ko=e=>{if(e.gap!==void 0&&e.gap!==null){let t=no(e.theme,`spacing`,8,`gap`);return Va(e,e.gap,e=>({gap:io(t,e)}))}return null};ko.propTypes={},ko.filterProps=[`gap`];var Ao=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=no(e.theme,`spacing`,8,`columnGap`);return Va(e,e.columnGap,e=>({columnGap:io(t,e)}))}return null};Ao.propTypes={},Ao.filterProps=[`columnGap`];var jo=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=no(e.theme,`spacing`,8,`rowGap`);return Va(e,e.rowGap,e=>({rowGap:io(t,e)}))}return null};jo.propTypes={},jo.filterProps=[`rowGap`],po(ko,Ao,jo,qa({prop:`gridColumn`}),qa({prop:`gridRow`}),qa({prop:`gridAutoFlow`}),qa({prop:`gridAutoColumns`}),qa({prop:`gridAutoRows`}),qa({prop:`gridTemplateColumns`}),qa({prop:`gridTemplateRows`}),qa({prop:`gridTemplateAreas`}),qa({prop:`gridArea`}));function Mo(e,t){return t===`grey`?t:e}po(qa({prop:`color`,themeKey:`palette`,transform:Mo}),qa({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Mo}),qa({prop:`backgroundColor`,themeKey:`palette`,transform:Mo}));function No(e){return e<=1&&e!==0?`${e*100}%`:e}var Po=qa({prop:`width`,transform:No}),Fo=e=>e.maxWidth!==void 0&&e.maxWidth!==null?Va(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||Ra[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:No(t)}}):null;Fo.filterProps=[`maxWidth`];var Io=qa({prop:`minWidth`,transform:No}),Lo=qa({prop:`height`,transform:No}),Ro=qa({prop:`maxHeight`,transform:No}),zo=qa({prop:`minHeight`,transform:No});qa({prop:`size`,cssProperty:`width`,transform:No}),qa({prop:`size`,cssProperty:`height`,transform:No}),po(Po,Fo,Io,Lo,Ro,zo,qa({prop:`boxSizing`}));var Bo={border:{themeKey:`borders`,transform:mo},borderTop:{themeKey:`borders`,transform:mo},borderRight:{themeKey:`borders`,transform:mo},borderBottom:{themeKey:`borders`,transform:mo},borderLeft:{themeKey:`borders`,transform:mo},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:mo},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Oo},color:{themeKey:`palette`,transform:Mo},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Mo},backgroundColor:{themeKey:`palette`,transform:Mo},p:{style:lo},pt:{style:lo},pr:{style:lo},pb:{style:lo},pl:{style:lo},px:{style:lo},py:{style:lo},padding:{style:lo},paddingTop:{style:lo},paddingRight:{style:lo},paddingBottom:{style:lo},paddingLeft:{style:lo},paddingX:{style:lo},paddingY:{style:lo},paddingInline:{style:lo},paddingInlineStart:{style:lo},paddingInlineEnd:{style:lo},paddingBlock:{style:lo},paddingBlockStart:{style:lo},paddingBlockEnd:{style:lo},m:{style:co},mt:{style:co},mr:{style:co},mb:{style:co},ml:{style:co},mx:{style:co},my:{style:co},margin:{style:co},marginTop:{style:co},marginRight:{style:co},marginBottom:{style:co},marginLeft:{style:co},marginX:{style:co},marginY:{style:co},marginInline:{style:co},marginInlineStart:{style:co},marginInlineEnd:{style:co},marginBlock:{style:co},marginBlockStart:{style:co},marginBlockEnd:{style:co},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ko},rowGap:{style:jo},columnGap:{style:Ao},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:No},maxWidth:{style:Fo},minWidth:{transform:No},height:{transform:No},maxHeight:{transform:No},minHeight:{transform:No},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function Vo(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function Ho(e,t){return typeof e==`function`?e(t):e}function Uo(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=Ga(n,s)||{};return l?l(i):Va(i,t,t=>{let n=Ka(u,c,t);return t===n&&typeof t==`string`&&(n=Ka(u,c,`${e}${t==="default"?``:Wa(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??Bo;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=Ha(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=Ho(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=La(l,e(n,a,i,o));else{let e=Va({theme:i},a,e=>({[n]:e}));Vo(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=La(l,e)}else l=La(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":Ma(i,Ua(c,l))}:Ma(i,Ua(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var Wo=Uo();Wo.filterProps=[`sx`];function Go(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Ko(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=ja(n),c=fo(i),l=ka({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...Ia,...a}},o);return l=Fa(l),l.applyStyles=Go,l=t.reduce((e,t)=>ka(e,t),l),l.unstable_sxConfig={...Bo,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Wo({sx:e,theme:this})},l}function qo(e){return Object.keys(e).length===0}function Jo(e=null){let t=L.useContext(Ji);return!t||qo(t)?e:t}var Yo=Ko();function Xo(e=Yo){return Jo(e)}function Zo(e){let t=wa(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Qo({styles:e,themeId:t,defaultTheme:n={}}){let r=Xo(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Zo(typeof e==`function`?e(i):e)):Zo(a)),(0,R.jsx)(ba,{styles:a})}var $o=e=>e,es=(()=>{let e=$o;return{configure(t){e=t},generate(t){return e(t)},reset(){e=$o}}})();function ts(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ts(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function V(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ts(e))&&(r&&(r+=` `),r+=t);return r}var ns={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function rs(e,t,n=`Mui`){let r=ns[t];return r?`${n}-${r}`:`${es.generate(e)}-${t}`}function is(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=rs(e,t,n)}),r}function as(e){let{variants:t,...n}=e,r={variants:t,style:wa(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=wa(e.style))}),r}var os=Ko();function ss(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function cs(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function ls(e){return e?(t,n)=>n[e]:null}function us(e,t,n){e.theme=ms(e.theme)?n:e.theme[t]||e.theme}function ds(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>ds(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?cs(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?cs(wa(i),n):i}return fs(e,r.variants,[t],n)}return r?.isProcessed?n?cs(wa(r.style),n):r.style:n?cs(wa(r),n):r}function fs(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?cs(wa(o.style(i)),r):o.style(i))):n.push(r?cs(wa(o.style),r):o.style)}return n}function ps(e={}){let{themeId:t,defaultTheme:n=os,rootShouldForwardProp:r=ss,slotShouldForwardProp:i=ss}=e;function a(e){us(e,t,n)}return(e,t={})=>{Sa(e,e=>e.filter(e=>e!==Wo));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=ls(gs(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=ss;o===`Root`||o===`root`?m=r:o?m=i:hs(e)&&(m=void 0);let h=xa(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return ds(t,e,t.theme.modularCssLayers?d:void 0)};if(Da(e)){let t=as(e);return function(e){return t.variants?ds(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?cs(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=ds(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?fs(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Wo),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function ms(e){for(let t in e)return!1;return!0}function hs(e){return typeof e==`string`&&e.charCodeAt(0)>96}function gs(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function _s(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=_s(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=V(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}var vs=typeof window<`u`?L.useLayoutEffect:L.useEffect;function ys(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function bs(e,t=0,n=1){return ys(e,t,n)}function xs(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function Ss(e){if(e.type)return e;if(e.charAt(0)===`#`)return Ss(xs(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(sr(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(sr(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var Cs=e=>{let t=Ss(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},ws=(e,t)=>{try{return Cs(e)}catch{return e}};function Ts(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function Es(e){e=Ss(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),Ts({type:s,values:c})}function Ds(e){e=Ss(e);let t=e.type===`hsl`||e.type===`hsla`?Ss(Es(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Os(e,t){let n=Ds(e),r=Ds(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ks(e,t){return e=Ss(e),t=bs(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,Ts(e)}function As(e,t,n){try{return ks(e,t)}catch{return e}}function js(e,t){if(e=Ss(e),t=bs(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Ts(e)}function H(e,t,n){try{return js(e,t)}catch{return e}}function Ms(e,t){if(e=Ss(e),t=bs(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Ts(e)}function U(e,t,n){try{return Ms(e,t)}catch{return e}}function Ns(e,t=.15){return Ds(e)>.5?js(e,t):Ms(e,t)}function Ps(e,t,n){try{return Ns(e,t)}catch{return e}}var Fs=L.createContext(null);function Is(){return L.useContext(Fs)}var Ls=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Rs(e,t){return typeof t==`function`?t(e):{...e,...t}}function zs(e){let{children:t,theme:n}=e,r=Is(),i=L.useMemo(()=>{let e=r===null?{...n}:Rs(r,n);return e!=null&&(e[Ls]=r!==null),e},[n,r]);return(0,R.jsx)(Fs.Provider,{value:i,children:t})}var Bs=L.createContext();function Vs({value:e,...t}){return(0,R.jsx)(Bs.Provider,{value:e??!0,...t})}var Hs=()=>L.useContext(Bs)??!1,Us=L.createContext(void 0);function Ws({value:e,children:t}){return(0,R.jsx)(Us.Provider,{value:e,children:t})}function Gs(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?_s(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?_s(i,r,t.components.mergeClassNameAndStyle):r}function Ks({props:e,name:t}){return Gs({props:e,name:t,theme:{components:L.useContext(Us)}})}var qs=0;function Js(e){let[t,n]=L.useState(e),r=e||t;return L.useEffect(()=>{t??(qs+=1,n(`mui-${qs}`))},[t]),r}var Ys={...L}.useId;function Xs(e){if(Ys!==void 0){let t=Ys();return e??t}return Js(e)}function Zs(e){let t=Jo(),n=Xs()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,vs(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,R.jsx)(Qo,{styles:i}):null}var Qs={};function $s(e,t,n,r=!1){return L.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function ec(e){let{children:t,theme:n,themeId:r}=e,i=Jo(Qs),a=Is()||Qs,o=$s(r,i,n),s=$s(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=Zs(o);return(0,R.jsx)(zs,{theme:s,children:(0,R.jsx)(Ji.Provider,{value:o,children:(0,R.jsx)(Vs,{value:c,children:(0,R.jsxs)(Ws,{value:r?o[r].components:o.components,children:[l,t]})})})})}var tc={theme:void 0};function nc(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(tc.theme=r.theme,i=as(e(tc)),t=i,n=r.theme),i}}var rc=`mode`,ic=`color-scheme`,ac=`data-color-scheme`;function oc(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=rc,colorSchemeStorageKey:a=ic,attribute:o=ac,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
45
45
|
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let d=u.match(/\[([^[\]]+)\]/);if(d){let[e,t]=d[1].split(`=`);t||(l+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
46
46
|
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/matrix@5.0.5
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/matrix@5.0.5/dist/schemas/configuration.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"baseInputConfiguration": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/matrix@5.0.5
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/matrix@5.0.5/dist/schemas/model.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/matrix@5.0.5
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/matrix@5.0.5/dist/schemas/session.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/matrix",
|
|
3
|
-
"version": "5.0.5
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,21 +11,21 @@
|
|
|
11
11
|
"@emotion/react": "^11.14.0",
|
|
12
12
|
"@mui/icons-material": "^7.3.4",
|
|
13
13
|
"@mui/material": "^7.3.4",
|
|
14
|
-
"@pie-lib/render-ui": "8.0.5
|
|
15
|
-
"@pie-lib/translator": "5.0.
|
|
14
|
+
"@pie-lib/render-ui": "8.0.5",
|
|
15
|
+
"@pie-lib/translator": "5.0.1",
|
|
16
16
|
"debug": "^4.1.1",
|
|
17
17
|
"prop-types": "^15.8.1",
|
|
18
18
|
"styled-components": "^6.5.3",
|
|
19
|
-
"@pie-lib/editable-html-tip-tap": "3.0
|
|
20
|
-
"@pie-lib/config-ui": "14.0.5
|
|
21
|
-
"@pie-element/shared-configure-events": "0.1.
|
|
22
|
-
"@pie-element/shared-lodash": "0.1.
|
|
23
|
-
"@pie-element/shared-player-events": "0.
|
|
24
|
-
"@pie-element/shared-math-rendering-mathjax": "0.
|
|
19
|
+
"@pie-lib/editable-html-tip-tap": "3.1.0",
|
|
20
|
+
"@pie-lib/config-ui": "14.0.5",
|
|
21
|
+
"@pie-element/shared-configure-events": "0.1.1",
|
|
22
|
+
"@pie-element/shared-lodash": "0.1.2",
|
|
23
|
+
"@pie-element/shared-player-events": "0.2.0",
|
|
24
|
+
"@pie-element/shared-math-rendering-mathjax": "0.1.6",
|
|
25
25
|
"react-is": "^18.3.1",
|
|
26
26
|
"react": "^18.2.0",
|
|
27
27
|
"react-dom": "^18.2.0",
|
|
28
|
-
"@pie-element/shared-types": "0.2.
|
|
28
|
+
"@pie-element/shared-types": "0.2.1"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
31
|
".": {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"browserEditorRuntime": {
|
|
100
100
|
"name": "@pie-element/shared-editor-runtime",
|
|
101
|
-
"version": "0.1.
|
|
101
|
+
"version": "0.1.2",
|
|
102
102
|
"views": {
|
|
103
103
|
"delivery": "editor-runtime/delivery",
|
|
104
104
|
"author": "editor-runtime/author",
|