@pie-element/math-inline 12.1.1-next.42 → 12.1.1-next.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +5174 -5173
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/{dist-CuWXpGIy.js → dist-CQJsyamN.js} +1731 -1667
- package/dist/browser/dist-CQJsyamN.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +2243 -2242
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{dist-L9vrtTkN.js → dist-DMfQpkwV.js} +1731 -1667
- package/dist/browser/editor-runtime/dist-DMfQpkwV.js.map +1 -0
- package/dist/browser/editor-runtime/{main-WltpU9HP.js → main-C26X4jqh.js} +154 -154
- package/dist/browser/editor-runtime/{main-WltpU9HP.js.map → main-C26X4jqh.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{main-CKdHiINt.js → main-BT-ouGfG.js} +154 -154
- package/dist/browser/{main-CKdHiINt.js.map → main-BT-ouGfG.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/index.iife.js +30 -30
- package/module/print.js +2027 -1995
- package/module/print.js.map +1 -1
- package/package.json +8 -8
- package/dist/browser/dist-CuWXpGIy.js.map +0 -1
- package/dist/browser/editor-runtime/dist-L9vrtTkN.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as e, t, y as n } from "./dist--pvq7WNe.js";
|
|
2
|
-
import { C as r, L as i, M as a,
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import { jsx as
|
|
6
|
-
import
|
|
2
|
+
import { C as r, L as i, M as a, S as o, T as s, _ as c, dt as l, f as u, ft as d, g as f, h as p, ht as m, kt as h, m as g, n as _, pt as v, u as ee, v as y, w as b, z as x } from "./dist-CQJsyamN.js";
|
|
3
|
+
import { t as S } from "./dist-DCmVXYeO.js";
|
|
4
|
+
import C, { useRef as w } from "react";
|
|
5
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
6
|
+
import te from "react-dom";
|
|
7
7
|
//#region ../../lib-react/correct-answer-toggle/dist/expander.js
|
|
8
|
-
var
|
|
8
|
+
var D = /* @__PURE__ */ n(h(), 1), O = "height ease-in 300ms, opacity ease-in 300ms", k = m("div")(() => ({
|
|
9
9
|
position: "relative",
|
|
10
10
|
height: 0,
|
|
11
11
|
overflow: "hidden",
|
|
@@ -13,7 +13,7 @@ var E = /* @__PURE__ */ n(o(), 1), D = "height ease-in 300ms, opacity ease-in 30
|
|
|
13
13
|
visibility: "hidden",
|
|
14
14
|
width: 0,
|
|
15
15
|
"&.enter": {
|
|
16
|
-
transition:
|
|
16
|
+
transition: O,
|
|
17
17
|
opacity: 1,
|
|
18
18
|
height: "auto",
|
|
19
19
|
width: "auto",
|
|
@@ -27,7 +27,7 @@ var E = /* @__PURE__ */ n(o(), 1), D = "height ease-in 300ms, opacity ease-in 30
|
|
|
27
27
|
minHeight: "25px"
|
|
28
28
|
},
|
|
29
29
|
"&.exit": {
|
|
30
|
-
transition:
|
|
30
|
+
transition: O,
|
|
31
31
|
opacity: 0,
|
|
32
32
|
height: 0,
|
|
33
33
|
visibility: "visible",
|
|
@@ -39,9 +39,9 @@ var E = /* @__PURE__ */ n(o(), 1), D = "height ease-in 300ms, opacity ease-in 30
|
|
|
39
39
|
height: 0,
|
|
40
40
|
width: 0
|
|
41
41
|
}
|
|
42
|
-
})),
|
|
43
|
-
let { show: t, children: n, className: r } = e, i =
|
|
44
|
-
return /* @__PURE__ */
|
|
42
|
+
})), A = (e) => {
|
|
43
|
+
let { show: t, children: n, className: r } = e, i = w(null);
|
|
44
|
+
return /* @__PURE__ */ T(v, {
|
|
45
45
|
nodeRef: i,
|
|
46
46
|
in: t,
|
|
47
47
|
appear: !0,
|
|
@@ -53,53 +53,53 @@ var E = /* @__PURE__ */ n(o(), 1), D = "height ease-in 300ms, opacity ease-in 30
|
|
|
53
53
|
exit: "exit",
|
|
54
54
|
exitDone: "exit-done"
|
|
55
55
|
},
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ T(k, {
|
|
57
57
|
ref: i,
|
|
58
58
|
className: r,
|
|
59
59
|
children: n
|
|
60
60
|
})
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
show:
|
|
65
|
-
className:
|
|
66
|
-
children:
|
|
63
|
+
A.propTypes = {
|
|
64
|
+
show: D.default.bool.isRequired,
|
|
65
|
+
className: D.default.string,
|
|
66
|
+
children: D.default.oneOfType([D.default.arrayOf(D.default.node), D.default.node]).isRequired
|
|
67
67
|
};
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region ../../lib-react/icons/dist/correct-response-icon.js
|
|
70
|
-
var
|
|
70
|
+
var j = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ E("svg", {
|
|
71
71
|
preserveAspectRatio: "xMinYMin meet",
|
|
72
72
|
version: "1.1",
|
|
73
73
|
viewBox: "-283 359 34 35",
|
|
74
74
|
style: { enableBackground: "new -283 359 34 35" },
|
|
75
75
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ T("circle", {
|
|
77
77
|
cx: "-266",
|
|
78
78
|
cy: "375.9",
|
|
79
79
|
r: "14",
|
|
80
80
|
fill: e
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ T("path", {
|
|
83
83
|
d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
|
|
84
84
|
fill: e
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ T("polygon", {
|
|
87
87
|
points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
|
|
88
88
|
fill: t
|
|
89
89
|
})
|
|
90
90
|
]
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
bgFill:
|
|
94
|
-
fgFill:
|
|
92
|
+
j.propTypes = {
|
|
93
|
+
bgFill: D.default.string.isRequired,
|
|
94
|
+
fgFill: D.default.string.isRequired
|
|
95
95
|
};
|
|
96
|
-
var
|
|
96
|
+
var M = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ E("svg", {
|
|
97
97
|
preserveAspectRatio: "xMinYMin meet",
|
|
98
98
|
version: "1.1",
|
|
99
99
|
viewBox: "-129.5 127 34 35",
|
|
100
100
|
style: { enableBackground: "new -129.5 127 34 35" },
|
|
101
101
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ T("path", {
|
|
103
103
|
style: {
|
|
104
104
|
fill: "#D0CAC5",
|
|
105
105
|
stroke: "#E6E3E0",
|
|
@@ -108,7 +108,7 @@ var j = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
108
108
|
},
|
|
109
109
|
d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
|
|
110
110
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ T("path", {
|
|
112
112
|
style: {
|
|
113
113
|
fill: "#B3ABA4",
|
|
114
114
|
stroke: "#CDC7C2",
|
|
@@ -117,68 +117,68 @@ var j = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
117
117
|
},
|
|
118
118
|
d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ T("circle", {
|
|
121
121
|
cx: "-114.2",
|
|
122
122
|
cy: "143.5",
|
|
123
123
|
r: "14",
|
|
124
124
|
fill: e
|
|
125
125
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ T("path", {
|
|
127
127
|
d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
|
|
128
128
|
fill: n
|
|
129
129
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ T("polygon", {
|
|
131
131
|
points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
|
|
132
132
|
fill: t
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
});
|
|
136
|
-
|
|
137
|
-
bgFill:
|
|
138
|
-
fgFill:
|
|
139
|
-
borderFill:
|
|
136
|
+
M.propTypes = {
|
|
137
|
+
bgFill: D.default.string.isRequired,
|
|
138
|
+
fgFill: D.default.string.isRequired,
|
|
139
|
+
borderFill: D.default.string.isRequired
|
|
140
140
|
};
|
|
141
|
-
var
|
|
141
|
+
var N = m("div")(({ size: e }) => ({
|
|
142
142
|
width: e || "25px",
|
|
143
143
|
height: e || "25px"
|
|
144
|
-
})),
|
|
144
|
+
})), P = ({ open: e, size: t }) => /* @__PURE__ */ T(N, {
|
|
145
145
|
size: t,
|
|
146
|
-
children: e ? /* @__PURE__ */
|
|
146
|
+
children: e ? /* @__PURE__ */ T(j, {
|
|
147
147
|
bgFill: "#bce2ff",
|
|
148
148
|
fgFill: "#1a9cff"
|
|
149
|
-
}) : /* @__PURE__ */
|
|
149
|
+
}) : /* @__PURE__ */ T(M, {
|
|
150
150
|
bgFill: "white",
|
|
151
151
|
fgFill: "#1a9cff",
|
|
152
152
|
borderFill: "#bce2ff"
|
|
153
153
|
})
|
|
154
154
|
});
|
|
155
|
-
|
|
156
|
-
open:
|
|
157
|
-
size:
|
|
158
|
-
},
|
|
155
|
+
P.propTypes = {
|
|
156
|
+
open: D.default.bool,
|
|
157
|
+
size: D.default.string
|
|
158
|
+
}, P.defaultProps = { open: !1 };
|
|
159
159
|
//#endregion
|
|
160
160
|
//#region ../../lib-react/correct-answer-toggle/dist/index.js
|
|
161
|
-
function
|
|
161
|
+
function F(e) {
|
|
162
162
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
return !e ||
|
|
164
|
+
function I(e, t) {
|
|
165
|
+
return !e || F(e) ? e : F(e.default) ? e.default : t && F(e[t]) ? e[t] : t && F(e[t]?.default) ? e[t].default : e;
|
|
166
166
|
}
|
|
167
|
-
var
|
|
167
|
+
var L = I(b, "Readable") || I(ne.Readable, "Readable"), R = y, z = R.default, ne = z && typeof z == "object" ? z : R, { translator: B } = S, V = {
|
|
168
168
|
WebkitTouchCallout: "none",
|
|
169
169
|
WebkitUserSelect: "none",
|
|
170
170
|
KhtmlUserSelect: "none",
|
|
171
171
|
MozUserSelect: "none",
|
|
172
172
|
msUserSelect: "none",
|
|
173
173
|
userSelect: "none"
|
|
174
|
-
}, re =
|
|
174
|
+
}, re = m("div")(() => ({
|
|
175
175
|
width: "100%",
|
|
176
176
|
cursor: "pointer"
|
|
177
|
-
})), H =
|
|
177
|
+
})), H = m("div")(() => ({
|
|
178
178
|
margin: "0 auto",
|
|
179
179
|
textAlign: "center",
|
|
180
180
|
display: "flex"
|
|
181
|
-
})), U =
|
|
181
|
+
})), U = m("div")(() => ({
|
|
182
182
|
width: "fit-content",
|
|
183
183
|
minWidth: "140px",
|
|
184
184
|
alignSelf: "center",
|
|
@@ -186,7 +186,7 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
186
186
|
color: `var(--correct-answer-toggle-label-color, ${d.text()})`,
|
|
187
187
|
fontWeight: "normal",
|
|
188
188
|
...V
|
|
189
|
-
})), W =
|
|
189
|
+
})), W = m("div")(() => ({
|
|
190
190
|
position: "absolute",
|
|
191
191
|
width: "25px",
|
|
192
192
|
"&.enter": { opacity: "0" },
|
|
@@ -199,20 +199,20 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
199
199
|
opacity: "0",
|
|
200
200
|
transition: "opacity 0.3s ease-in"
|
|
201
201
|
}
|
|
202
|
-
})), G =
|
|
202
|
+
})), G = m("div")(() => ({
|
|
203
203
|
width: "25px",
|
|
204
204
|
marginRight: "5px",
|
|
205
205
|
display: "flex",
|
|
206
206
|
alignItems: "center"
|
|
207
|
-
})), ie = class e extends
|
|
207
|
+
})), ie = class e extends C.Component {
|
|
208
208
|
static propTypes = {
|
|
209
|
-
onToggle:
|
|
210
|
-
toggled:
|
|
211
|
-
show:
|
|
212
|
-
hideMessage:
|
|
213
|
-
showMessage:
|
|
214
|
-
className:
|
|
215
|
-
language:
|
|
209
|
+
onToggle: D.default.func,
|
|
210
|
+
toggled: D.default.bool,
|
|
211
|
+
show: D.default.bool,
|
|
212
|
+
hideMessage: D.default.string,
|
|
213
|
+
showMessage: D.default.string,
|
|
214
|
+
className: D.default.string,
|
|
215
|
+
language: D.default.string
|
|
216
216
|
};
|
|
217
217
|
static defaultProps = {
|
|
218
218
|
showMessage: "Show correct answer",
|
|
@@ -221,7 +221,7 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
221
221
|
toggled: !1
|
|
222
222
|
};
|
|
223
223
|
constructor(t) {
|
|
224
|
-
super(t), this.state = { show: t.show }, this.openIconRef =
|
|
224
|
+
super(t), this.state = { show: t.show }, this.openIconRef = C.createRef(), this.closedIconRef = C.createRef(), e.defaultProps = {
|
|
225
225
|
...e.defaultProps,
|
|
226
226
|
showMessage: B.t("common:showCorrectAnswer", { lng: t.language }),
|
|
227
227
|
hideMessage: B.t("common:hideCorrectAnswer", { lng: t.language })
|
|
@@ -242,14 +242,14 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
242
242
|
}
|
|
243
243
|
render() {
|
|
244
244
|
let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
|
|
245
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ T(re, {
|
|
246
246
|
className: e,
|
|
247
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ T(A, {
|
|
248
248
|
show: this.state.show,
|
|
249
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ E(H, {
|
|
250
250
|
onClick: this.onClick.bind(this),
|
|
251
251
|
onTouchEnd: this.onTouch.bind(this),
|
|
252
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ E(G, { children: [/* @__PURE__ */ T(v, {
|
|
253
253
|
nodeRef: this.openIconRef,
|
|
254
254
|
timeout: 400,
|
|
255
255
|
in: t,
|
|
@@ -260,11 +260,11 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
260
260
|
exit: "exit",
|
|
261
261
|
exitActive: "exit-active"
|
|
262
262
|
},
|
|
263
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ T(W, {
|
|
264
264
|
ref: this.openIconRef,
|
|
265
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ T(P, { open: t }, "correct-open")
|
|
266
266
|
})
|
|
267
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ T(v, {
|
|
268
268
|
nodeRef: this.closedIconRef,
|
|
269
269
|
timeout: 5e3,
|
|
270
270
|
in: !t,
|
|
@@ -275,13 +275,13 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
275
275
|
exit: "exit",
|
|
276
276
|
exitActive: "exit-active"
|
|
277
277
|
},
|
|
278
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ T(W, {
|
|
279
279
|
ref: this.closedIconRef,
|
|
280
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ T(P, { open: t }, "correct-closed")
|
|
281
281
|
})
|
|
282
|
-
})] }), /* @__PURE__ */
|
|
282
|
+
})] }), /* @__PURE__ */ T(L, {
|
|
283
283
|
false: !0,
|
|
284
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ T(U, {
|
|
285
285
|
"aria-hidden": !this.state.show,
|
|
286
286
|
children: t ? n : r
|
|
287
287
|
})
|
|
@@ -293,11 +293,11 @@ var I = F(y, "Readable") || F(z.Readable, "Readable"), L = v, R = L.default, z =
|
|
|
293
293
|
}, ae = {
|
|
294
294
|
advanced: "Advanced Multi",
|
|
295
295
|
simple: "Simple"
|
|
296
|
-
}, oe =
|
|
296
|
+
}, oe = m("div")(({ theme: e }) => ({
|
|
297
297
|
marginTop: e.spacing(2),
|
|
298
298
|
marginBottom: e.spacing(2),
|
|
299
299
|
padding: e.spacing(1)
|
|
300
|
-
})), se =
|
|
300
|
+
})), se = m("div", { shouldForwardProp: (e) => !["isCorrect", "isIncorrect"].includes(e) })(({ theme: e, isCorrect: t, isIncorrect: n }) => ({
|
|
301
301
|
color: d.text(),
|
|
302
302
|
background: d.background(),
|
|
303
303
|
border: t ? `2px solid ${d.correct()} !important` : n ? `2px solid ${d.incorrect()} !important` : `1px solid ${d.primaryLight()}`,
|
|
@@ -327,15 +327,15 @@ if (typeof document < "u") {
|
|
|
327
327
|
`, document.head.appendChild(t);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
var ce = class extends
|
|
330
|
+
var ce = class extends C.Component {
|
|
331
331
|
static propTypes = {
|
|
332
|
-
onSimpleResponseChange:
|
|
333
|
-
model:
|
|
334
|
-
emptyResponse:
|
|
335
|
-
session:
|
|
336
|
-
showCorrect:
|
|
337
|
-
onSubFieldFocus:
|
|
338
|
-
showKeypad:
|
|
332
|
+
onSimpleResponseChange: D.default.func,
|
|
333
|
+
model: D.default.object.isRequired,
|
|
334
|
+
emptyResponse: D.default.bool,
|
|
335
|
+
session: D.default.object.isRequired,
|
|
336
|
+
showCorrect: D.default.bool,
|
|
337
|
+
onSubFieldFocus: D.default.func.isRequired,
|
|
338
|
+
showKeypad: D.default.bool.isRequired
|
|
339
339
|
};
|
|
340
340
|
constructor(e) {
|
|
341
341
|
super(e), this.mathToolBarId = `math-toolbar-${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
@@ -354,15 +354,15 @@ var ce = class extends x.Component {
|
|
|
354
354
|
let { model: e, showCorrect: t, session: n, emptyResponse: r, onSimpleResponseChange: i, showKeypad: a } = this.props, { config: o, disabled: s, correctness: c } = e || {};
|
|
355
355
|
if (!o) return;
|
|
356
356
|
let l = c && c.correct, { responses: u, equationEditor: d } = o;
|
|
357
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ T(oe, {
|
|
358
358
|
"data-keypad": !0,
|
|
359
|
-
children: t || s ? /* @__PURE__ */
|
|
359
|
+
children: t || s ? /* @__PURE__ */ T(se, {
|
|
360
360
|
isIncorrect: !r && !l && !t,
|
|
361
361
|
isCorrect: !r && (l || t),
|
|
362
|
-
children: /* @__PURE__ */
|
|
363
|
-
}) : /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ T(g.Static, { latex: t ? u && u.length && u[0].answer : n.response || "" })
|
|
363
|
+
}) : /* @__PURE__ */ T("div", {
|
|
364
364
|
id: this.mathToolBarId,
|
|
365
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ T(_, {
|
|
366
366
|
classNames: { editor: "response-editor" },
|
|
367
367
|
latex: n.response,
|
|
368
368
|
keypadMode: d,
|
|
@@ -385,7 +385,7 @@ function K(e) {
|
|
|
385
385
|
function q(e, t) {
|
|
386
386
|
return !e || K(e) ? e : K(e.default) ? e.default : t && K(e[t]) ? e[t] : t && K(e[t]?.default) ? e[t].default : e;
|
|
387
387
|
}
|
|
388
|
-
var le = q(a, "UiLayout") || q(X.UiLayout, "UiLayout"), J = q(
|
|
388
|
+
var le = q(a, "UiLayout") || q(X.UiLayout, "UiLayout"), J = q(s, "PreviewPrompt") || q(X.PreviewPrompt, "PreviewPrompt"), ue = q(b, "Readable") || q(X.Readable, "Readable"), de = q(i, "Collapsible") || q(X.Collapsible, "Collapsible"), fe = q(l, "Feedback") || q(X.Feedback, "Feedback"), pe = y, Y = pe.default, X = Y && typeof Y == "object" ? Y : pe, { translator: Z } = S, me = !1, he = /\\newline/g, Q = /{{response}}/gm, ge = 6, _e = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
389
389
|
function ve(e = []) {
|
|
390
390
|
return e.map((e) => ({
|
|
391
391
|
name: e,
|
|
@@ -431,11 +431,11 @@ function Se(e, t) {
|
|
|
431
431
|
}
|
|
432
432
|
return n;
|
|
433
433
|
}
|
|
434
|
-
var Ce = class extends
|
|
434
|
+
var Ce = class extends C.Component {
|
|
435
435
|
static propTypes = {
|
|
436
|
-
session:
|
|
437
|
-
onSessionChange:
|
|
438
|
-
model:
|
|
436
|
+
session: D.default.object.isRequired,
|
|
437
|
+
onSessionChange: D.default.func,
|
|
438
|
+
model: D.default.object.isRequired
|
|
439
439
|
};
|
|
440
440
|
constructor(e) {
|
|
441
441
|
super(e);
|
|
@@ -447,11 +447,11 @@ var Ce = class extends x.Component {
|
|
|
447
447
|
},
|
|
448
448
|
activeAnswerBlock: "",
|
|
449
449
|
showCorrect: this.props.model.config.alwaysShowCorrect || !1,
|
|
450
|
-
tooltipContainerRef:
|
|
450
|
+
tooltipContainerRef: C.createRef()
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
453
|
UNSAFE_componentWillMount() {
|
|
454
|
-
typeof window < "u" && (me ||= (
|
|
454
|
+
typeof window < "u" && (me ||= (f("answerBlock", (e) => {
|
|
455
455
|
let t = we();
|
|
456
456
|
return {
|
|
457
457
|
htmlString: `<div class="${t.blockContainer}">
|
|
@@ -473,7 +473,7 @@ var Ce = class extends x.Component {
|
|
|
473
473
|
let a = r[t];
|
|
474
474
|
p(n, a && a.value || ""), e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
|
|
475
475
|
}
|
|
476
|
-
}),
|
|
476
|
+
}), x(this.root);
|
|
477
477
|
};
|
|
478
478
|
countResponseOccurrences(e) {
|
|
479
479
|
let t = e?.match(/\{\{response\}\}/g);
|
|
@@ -503,7 +503,7 @@ var Ce = class extends x.Component {
|
|
|
503
503
|
return !r || !i;
|
|
504
504
|
}
|
|
505
505
|
componentDidMount() {
|
|
506
|
-
this.handleAnswerBlockDomUpdate(), this.updateAria(), setTimeout(() =>
|
|
506
|
+
this.handleAnswerBlockDomUpdate(), this.updateAria(), setTimeout(() => x(this.root), 100);
|
|
507
507
|
}
|
|
508
508
|
componentDidUpdate(e, t) {
|
|
509
509
|
this.handleAnswerBlockDomUpdate(), e.model?.config?.responseType !== this.props.model?.config?.responseType && this.updateAria();
|
|
@@ -581,7 +581,7 @@ var Ce = class extends x.Component {
|
|
|
581
581
|
this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
|
|
582
582
|
};
|
|
583
583
|
subFieldChanged = (e, t) => {
|
|
584
|
-
if (
|
|
584
|
+
if (c(), e) {
|
|
585
585
|
let n = window.scrollX, r = window.scrollY;
|
|
586
586
|
this.setState((n) => ({ session: {
|
|
587
587
|
...n.session,
|
|
@@ -628,9 +628,9 @@ var Ce = class extends x.Component {
|
|
|
628
628
|
}, 1);
|
|
629
629
|
}
|
|
630
630
|
render() {
|
|
631
|
-
let { model: t } = this.props, { activeAnswerBlock: n, showCorrect: i, session: a, tooltipContainerRef:
|
|
632
|
-
if (!
|
|
633
|
-
let { showNote:
|
|
631
|
+
let { model: t } = this.props, { activeAnswerBlock: n, showCorrect: i, session: a, tooltipContainerRef: s } = this.state, { config: c, correctness: l, disabled: f, extraCSSRules: p, view: m, teacherInstructions: h, rationale: _, feedback: v, animationsDisabled: y, printMode: b, alwaysShowCorrect: x, language: S } = t || {};
|
|
632
|
+
if (!c) return null;
|
|
633
|
+
let { showNote: C, note: w, prompt: D, responses: O, responseType: k, equationEditor: A, customKeys: j, id: M, env: { mode: N, role: P } = {} } = c || {}, F = (i || N === "view" && P === "instructor") && C && w, I = e(O), L = !I && l && l.correctness !== "correct", R = f && l, z = ve(j), ne = l && l.correct, B = xe(t, this.state) || "", V = f && !l, re = b && !x, H = _ && (r(_) || o(_)), U = h && (r(h) || o(h)), W = /* @__PURE__ */ T(Ne, { children: /* @__PURE__ */ T(g.Static, {
|
|
634
634
|
className: "static-math",
|
|
635
635
|
ref: (e) => {
|
|
636
636
|
e && (this.mqStatic = e);
|
|
@@ -641,43 +641,43 @@ var Ce = class extends x.Component {
|
|
|
641
641
|
setInput: this.setInput,
|
|
642
642
|
onSubFieldFocus: this.onSubFieldFocus,
|
|
643
643
|
onBlur: this.onBlur
|
|
644
|
-
}) }), G = /* @__PURE__ */
|
|
645
|
-
|
|
646
|
-
V && U && (
|
|
644
|
+
}) }), G = /* @__PURE__ */ E(Oe, { children: [
|
|
645
|
+
N === "gather" && /* @__PURE__ */ T(Pe, { children: "Math Equation Response Question" }),
|
|
646
|
+
V && U && (y ? /* @__PURE__ */ T("div", { dangerouslySetInnerHTML: { __html: h } }) : /* @__PURE__ */ T($, {
|
|
647
647
|
labels: {
|
|
648
648
|
hidden: "Show Teacher Instructions",
|
|
649
649
|
visible: "Hide Teacher Instructions"
|
|
650
650
|
},
|
|
651
|
-
children: /* @__PURE__ */
|
|
651
|
+
children: /* @__PURE__ */ T("div", { dangerouslySetInnerHTML: { __html: h } })
|
|
652
652
|
})),
|
|
653
|
-
|
|
654
|
-
re ? W : /* @__PURE__ */
|
|
653
|
+
D && /* @__PURE__ */ T(De, { children: /* @__PURE__ */ T(J, { prompt: D }) }),
|
|
654
|
+
re ? W : /* @__PURE__ */ T(ue, {
|
|
655
655
|
false: !0,
|
|
656
|
-
children: /* @__PURE__ */
|
|
656
|
+
children: /* @__PURE__ */ E(Me, {
|
|
657
657
|
tabIndex: 0,
|
|
658
|
-
children: [
|
|
658
|
+
children: [k === ae.simple && /* @__PURE__ */ T(ce, {
|
|
659
659
|
onSimpleResponseChange: this.onSimpleResponseChange,
|
|
660
660
|
showCorrect: i,
|
|
661
|
-
emptyResponse:
|
|
661
|
+
emptyResponse: I,
|
|
662
662
|
model: t,
|
|
663
663
|
session: a,
|
|
664
664
|
onSubFieldFocus: this.onSubFieldFocus,
|
|
665
665
|
showKeypad: !!n
|
|
666
|
-
}),
|
|
667
|
-
ref:
|
|
668
|
-
isIncorrect: !
|
|
669
|
-
isCorrect: !
|
|
670
|
-
showCorrectness: !
|
|
666
|
+
}), k === ae.advanced && /* @__PURE__ */ T(je, {
|
|
667
|
+
ref: s,
|
|
668
|
+
isIncorrect: !I && !ne && !i,
|
|
669
|
+
isCorrect: !I && (ne || i),
|
|
670
|
+
showCorrectness: !I && f && l && !m,
|
|
671
671
|
correctAnswerShown: i,
|
|
672
|
-
printCorrect:
|
|
673
|
-
children: /* @__PURE__ */
|
|
672
|
+
printCorrect: b && x,
|
|
673
|
+
children: /* @__PURE__ */ T(ee, {
|
|
674
674
|
ref: (e) => this.setTooltipRef(e),
|
|
675
675
|
enterTouchDelay: 0,
|
|
676
676
|
interactive: !0,
|
|
677
677
|
open: !!n,
|
|
678
678
|
slotProps: {
|
|
679
679
|
popper: {
|
|
680
|
-
container:
|
|
680
|
+
container: s?.current || void 0,
|
|
681
681
|
placement: "bottom-start",
|
|
682
682
|
sx: {
|
|
683
683
|
backgroundColor: "transparent",
|
|
@@ -720,16 +720,16 @@ var Ce = class extends x.Component {
|
|
|
720
720
|
boxShadow: "none"
|
|
721
721
|
} }
|
|
722
722
|
},
|
|
723
|
-
title: Object.keys(a.answers).map((e) => e === n && !(i ||
|
|
723
|
+
title: Object.keys(a.answers).map((e) => e === n && !(i || f) && /* @__PURE__ */ T(Ae, {
|
|
724
724
|
"data-keypad": !0,
|
|
725
|
-
style: { width: be(
|
|
726
|
-
children: /* @__PURE__ */
|
|
727
|
-
additionalKeys:
|
|
728
|
-
mode:
|
|
725
|
+
style: { width: be(z, A) },
|
|
726
|
+
children: /* @__PURE__ */ T(u, {
|
|
727
|
+
additionalKeys: z,
|
|
728
|
+
mode: A || ge,
|
|
729
729
|
onClick: this.onClick
|
|
730
730
|
})
|
|
731
731
|
}, e) || null),
|
|
732
|
-
children: /* @__PURE__ */
|
|
732
|
+
children: /* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(g.Static, {
|
|
733
733
|
className: "static-math",
|
|
734
734
|
ref: (e) => {
|
|
735
735
|
e && (this.mqStatic = e);
|
|
@@ -745,22 +745,22 @@ var Ce = class extends x.Component {
|
|
|
745
745
|
})]
|
|
746
746
|
})
|
|
747
747
|
}),
|
|
748
|
-
V &&
|
|
749
|
-
V && H && (
|
|
748
|
+
V && F && /* @__PURE__ */ T(ke, { dangerouslySetInnerHTML: { __html: `<strong>Note:</strong> ${w}` } }),
|
|
749
|
+
V && H && (y ? /* @__PURE__ */ T("div", { dangerouslySetInnerHTML: { __html: _ } }) : /* @__PURE__ */ T(de, {
|
|
750
750
|
labels: {
|
|
751
751
|
hidden: "Show Rationale",
|
|
752
752
|
visible: "Hide Rationale"
|
|
753
753
|
},
|
|
754
|
-
children: /* @__PURE__ */
|
|
754
|
+
children: /* @__PURE__ */ T("div", { dangerouslySetInnerHTML: { __html: _ } })
|
|
755
755
|
}))
|
|
756
756
|
] });
|
|
757
|
-
return
|
|
758
|
-
extraCSSRules:
|
|
757
|
+
return R && (L || U || H || v) ? /* @__PURE__ */ T(Te, {
|
|
758
|
+
extraCSSRules: p,
|
|
759
759
|
ref: (e) => {
|
|
760
|
-
let t =
|
|
760
|
+
let t = te.findDOMNode(e);
|
|
761
761
|
this.root = t || this.root;
|
|
762
762
|
},
|
|
763
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ T(Ee, {
|
|
764
764
|
interactive: !0,
|
|
765
765
|
enterTouchDelay: 0,
|
|
766
766
|
placement: "bottom-start",
|
|
@@ -781,46 +781,46 @@ var Ce = class extends x.Component {
|
|
|
781
781
|
}]
|
|
782
782
|
}
|
|
783
783
|
},
|
|
784
|
-
title: /* @__PURE__ */
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
language:
|
|
784
|
+
title: /* @__PURE__ */ E("div", { children: [
|
|
785
|
+
/* @__PURE__ */ T(Oe, { children: L && /* @__PURE__ */ T(Fe, {
|
|
786
|
+
language: S,
|
|
787
787
|
show: !0,
|
|
788
788
|
toggled: i,
|
|
789
789
|
onToggle: this.toggleShowCorrect
|
|
790
790
|
}) }),
|
|
791
|
-
U && /* @__PURE__ */
|
|
791
|
+
U && /* @__PURE__ */ T($, {
|
|
792
792
|
labels: {
|
|
793
793
|
hidden: "Show Teacher Instructions",
|
|
794
794
|
visible: "Hide Teacher Instructions"
|
|
795
795
|
},
|
|
796
|
-
children: /* @__PURE__ */
|
|
796
|
+
children: /* @__PURE__ */ T(J, { prompt: h })
|
|
797
797
|
}, "collapsible-teacher-instructions"),
|
|
798
|
-
|
|
798
|
+
F && r(w) && /* @__PURE__ */ T($, {
|
|
799
799
|
labels: {
|
|
800
|
-
hidden: Z.t("common:showNote", { lng:
|
|
801
|
-
visible: Z.t("common:hideNote", { lng:
|
|
800
|
+
hidden: Z.t("common:showNote", { lng: S }),
|
|
801
|
+
visible: Z.t("common:hideNote", { lng: S })
|
|
802
802
|
},
|
|
803
|
-
children: /* @__PURE__ */
|
|
803
|
+
children: /* @__PURE__ */ T(J, { prompt: w })
|
|
804
804
|
}, "collapsible-note"),
|
|
805
|
-
H && /* @__PURE__ */
|
|
805
|
+
H && /* @__PURE__ */ T($, {
|
|
806
806
|
labels: {
|
|
807
807
|
hidden: "Show Rationale",
|
|
808
808
|
visible: "Hide Rationale"
|
|
809
809
|
},
|
|
810
|
-
children: /* @__PURE__ */
|
|
810
|
+
children: /* @__PURE__ */ T(J, { prompt: _ })
|
|
811
811
|
}, "collapsible-rationale"),
|
|
812
|
-
|
|
812
|
+
v && /* @__PURE__ */ T(fe, {
|
|
813
813
|
correctness: l.correctness,
|
|
814
|
-
feedback:
|
|
814
|
+
feedback: v
|
|
815
815
|
})
|
|
816
816
|
] }),
|
|
817
817
|
children: G
|
|
818
818
|
})
|
|
819
|
-
}) : /* @__PURE__ */
|
|
820
|
-
id:
|
|
821
|
-
extraCSSRules:
|
|
819
|
+
}) : /* @__PURE__ */ T(Te, {
|
|
820
|
+
id: M,
|
|
821
|
+
extraCSSRules: p,
|
|
822
822
|
ref: (e) => {
|
|
823
|
-
let t =
|
|
823
|
+
let t = te.findDOMNode(e);
|
|
824
824
|
this.root = t || this.root;
|
|
825
825
|
},
|
|
826
826
|
children: G
|
|
@@ -880,20 +880,20 @@ if (typeof document < "u") {
|
|
|
880
880
|
`, document.head.appendChild(t);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
var Te =
|
|
883
|
+
var Te = m(le)(() => ({
|
|
884
884
|
color: d.text(),
|
|
885
885
|
backgroundColor: d.background(),
|
|
886
886
|
display: "inline-block"
|
|
887
|
-
})), Ee =
|
|
887
|
+
})), Ee = m(ee)({}), De = m("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Oe = m("div")({
|
|
888
888
|
width: "100%",
|
|
889
889
|
position: "relative",
|
|
890
890
|
backgroundColor: d.background(),
|
|
891
891
|
color: d.text()
|
|
892
|
-
}), ke =
|
|
892
|
+
}), ke = m("div")(({ theme: e }) => ({ paddingBottom: e.spacing(2) })), $ = m(de)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Ae = m("div")(({ theme: e }) => ({
|
|
893
893
|
zIndex: 10,
|
|
894
894
|
minWidth: "400px",
|
|
895
895
|
marginTop: e.spacing(2)
|
|
896
|
-
})), je =
|
|
896
|
+
})), je = m("div", { shouldForwardProp: (e) => ![
|
|
897
897
|
"isIncorrect",
|
|
898
898
|
"isCorrect",
|
|
899
899
|
"showCorrectness",
|
|
@@ -923,7 +923,7 @@ var Te = h(le)(() => ({
|
|
|
923
923
|
"& sup": { top: 0 }
|
|
924
924
|
}
|
|
925
925
|
};
|
|
926
|
-
}), Me =
|
|
926
|
+
}), Me = m("div")({
|
|
927
927
|
position: "relative",
|
|
928
928
|
"& .mq-overarrow-inner": {
|
|
929
929
|
border: "none !important",
|
|
@@ -953,21 +953,21 @@ var Te = h(le)(() => ({
|
|
|
953
953
|
paddingTop: "1.5px !important"
|
|
954
954
|
},
|
|
955
955
|
"& .mq-parallelogram": { lineHeight: .85 }
|
|
956
|
-
}), Ne =
|
|
956
|
+
}), Ne = m("div")(({ theme: e }) => ({
|
|
957
957
|
marginBottom: e.spacing(1),
|
|
958
958
|
pointerEvents: "none"
|
|
959
|
-
})), Pe =
|
|
959
|
+
})), Pe = m("h2")({
|
|
960
960
|
position: "absolute",
|
|
961
961
|
left: "-10000px",
|
|
962
962
|
top: "auto",
|
|
963
963
|
width: "1px",
|
|
964
964
|
height: "1px",
|
|
965
965
|
overflow: "hidden"
|
|
966
|
-
}), Fe =
|
|
966
|
+
}), Fe = m(ie)(({ theme: e }) => ({
|
|
967
967
|
color: d.text(),
|
|
968
968
|
marginBottom: e.spacing(2)
|
|
969
969
|
}));
|
|
970
970
|
//#endregion
|
|
971
971
|
export { Ce as t };
|
|
972
972
|
|
|
973
|
-
//# sourceMappingURL=main-
|
|
973
|
+
//# sourceMappingURL=main-BT-ouGfG.js.map
|