@pie-element/math-inline 5.9.8 → 5.9.11

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/module/element.js CHANGED
@@ -1,816 +1,3959 @@
1
- import {_dll_react, _dll_debug, _dll_prop_types, _dll_classnames, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_pie_lib__render_ui, _dll_material_ui__icons, _dll_pie_lib__correct_answer_toggle, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.13/module/index.js";
2
- import {_dll_pie_lib__math_input, _dll_pie_framework__mathquill} from "../../../@pie-lib/math-edit-module@^1.2.0/module/index.js";
3
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.1.1/module/index.js";
4
- const ResponseTypes$1 = {
5
- advanced: 'Advanced Multi',
6
- simple: 'Simple'
1
+ import {_dll_prop_types, _dll_react, _dll_material_ui__core_styles, _dll_classnames, _dll_react_dom, _dll_material_ui__core, _dll_debug, _dll_material_ui__core_collapse_index, _dll_lodash} from "../../../@pie-lib/shared-module@^1.4.19/module/index.js";
2
+ import {_dll_pie_lib__math_toolbar, _dll_pie_lib__math_input, _dll_pie_framework__mathquill} from "../../../@pie-lib/math-edit-module@^1.2.6/module/index.js";
3
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.1.7/module/index.js";
4
+ const React$n = _dll_react;
5
+ const PropTypes$p = _dll_prop_types;
6
+ const _jsxFileName$l = "/home/circleci/repo/node_modules/@pie-lib/icons/src/sized.jsx";
7
+ const normalizeSize = size => {
8
+ return typeof size === 'string' ? size : typeof size === 'number' ? `${size}px` : '30px';
9
+ };
10
+ const Sized = ({size, children}) => {
11
+ size = normalizeSize(size);
12
+ const style = {
13
+ height: size,
14
+ width: size,
15
+ display: 'inline-block',
16
+ position: 'relative'
17
+ };
18
+ return React$n.createElement('div', {
19
+ style: style,
20
+ __self: undefined,
21
+ __source: {
22
+ fileName: _jsxFileName$l,
23
+ lineNumber: 18
24
+ }
25
+ }, children);
26
+ };
27
+ Sized.propTypes = {
28
+ size: PropTypes$p.number,
29
+ children: PropTypes$p.oneOfType([PropTypes$p.arrayOf(PropTypes$p.node), PropTypes$p.node]).isRequired
30
+ };
31
+ const React$m = _dll_react;
32
+ const PropTypes$o = _dll_prop_types;
33
+ const _jsxFileName$k = "/home/circleci/repo/node_modules/@pie-lib/icons/src/icon-root.jsx";
34
+ const IconRoot = ({size, children}) => React$m.createElement(Sized, {
35
+ size: size,
36
+ __self: undefined,
37
+ __source: {
38
+ fileName: _jsxFileName$k,
39
+ lineNumber: 10
40
+ }
41
+ }, React$m.createElement('svg', {
42
+ preserveAspectRatio: "xMinYMin meet",
43
+ version: "1.1",
44
+ x: "0px",
45
+ y: "0px",
46
+ viewBox: "0 0 44 40",
47
+ style: {
48
+ enableBackground: 'new 0 0 44 40'
49
+ },
50
+ __self: undefined,
51
+ __source: {
52
+ fileName: _jsxFileName$k,
53
+ lineNumber: 11
54
+ }
55
+ }, ' ', children));
56
+ IconRoot.propTypes = {
57
+ size: PropTypes$o.oneOf([PropTypes$o.string, PropTypes$o.number]),
58
+ children: PropTypes$o.oneOfType([PropTypes$o.arrayOf(PropTypes$o.node), PropTypes$o.node]).isRequired
59
+ };
60
+ const getStyles = (name, fg, bg) => ({
61
+ bg: {
62
+ fill: `var(--icons-${name}-bg, ${bg})`
63
+ },
64
+ fg: {
65
+ fill: `var(--icons-${name}-fg, ${fg})`
66
+ }
67
+ });
68
+ ({
69
+ className: PropTypes$o.string
70
+ });
71
+ const SquareFeedbackBox = ({className}) => React$m.createElement('polygon', {
72
+ transform: "translate(2, 0)",
73
+ className: className,
74
+ points: "34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3",
75
+ __self: undefined,
76
+ __source: {
77
+ fileName: _jsxFileName$k,
78
+ lineNumber: 51
79
+ }
80
+ });
81
+ SquareFeedbackBox.propTypes = {
82
+ className: PropTypes$o.string
83
+ };
84
+ const RoundFeedbackBox = ({className}) => React$m.createElement('path', {
85
+ transform: "translate(1, 0)",
86
+ className: className,
87
+ 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",
88
+ __self: undefined,
89
+ __source: {
90
+ fileName: _jsxFileName$k,
91
+ lineNumber: 62
92
+ }
93
+ });
94
+ RoundFeedbackBox.propTypes = {
95
+ className: PropTypes$o.string
96
+ };
97
+ const Circle$1 = ({className}) => React$m.createElement('circle', {
98
+ transform: "translate(-3, 0)",
99
+ className: className,
100
+ cx: "23",
101
+ cy: "20.4",
102
+ r: "16",
103
+ __self: undefined,
104
+ __source: {
105
+ fileName: _jsxFileName$k,
106
+ lineNumber: 73
107
+ }
108
+ });
109
+ Circle$1.propTypes = {
110
+ className: PropTypes$o.string
111
+ };
112
+ const Square = ({className}) => React$m.createElement('rect', {
113
+ x: "3.6",
114
+ y: "4.1",
115
+ className: className,
116
+ width: "32",
117
+ height: "32",
118
+ __self: undefined,
119
+ __source: {
120
+ fileName: _jsxFileName$k,
121
+ lineNumber: 81
122
+ }
123
+ });
124
+ Square.propTypes = {
125
+ className: PropTypes$o.string
126
+ };
127
+ const PropTypes$n = _dll_prop_types;
128
+ const React$l = _dll_react;
129
+ const _jsxFileName$j = "/home/circleci/repo/node_modules/@pie-lib/icons/src/icon-base.jsx";
130
+ var IconBase = (Action, Emoji) => {
131
+ class IconBase extends React$l.Component {
132
+ static __initStatic() {
133
+ this.propTypes = {
134
+ classes: PropTypes$n.object.isRequired,
135
+ size: PropTypes$n.number
136
+ };
137
+ }
138
+ constructor(props) {
139
+ super(props);
140
+ const {classes, size} = this.props;
141
+ this.icons = {
142
+ feedback: {
143
+ round: {
144
+ check: React$l.createElement(IconRoot, {
145
+ size: size,
146
+ __self: this,
147
+ __source: {
148
+ fileName: _jsxFileName$j,
149
+ lineNumber: 20
150
+ }
151
+ }, React$l.createElement(RoundFeedbackBox, {
152
+ className: classes.bg,
153
+ __self: this,
154
+ __source: {
155
+ fileName: _jsxFileName$j,
156
+ lineNumber: 21
157
+ }
158
+ }), React$l.createElement(Action, {
159
+ className: classes.fg,
160
+ __self: this,
161
+ __source: {
162
+ fileName: _jsxFileName$j,
163
+ lineNumber: 22
164
+ }
165
+ })),
166
+ emoji: React$l.createElement(IconRoot, {
167
+ size: size,
168
+ __self: this,
169
+ __source: {
170
+ fileName: _jsxFileName$j,
171
+ lineNumber: 26
172
+ }
173
+ }, React$l.createElement(RoundFeedbackBox, {
174
+ className: classes.bg,
175
+ __self: this,
176
+ __source: {
177
+ fileName: _jsxFileName$j,
178
+ lineNumber: 27
179
+ }
180
+ }), React$l.createElement(Emoji, {
181
+ className: classes.fg,
182
+ __self: this,
183
+ __source: {
184
+ fileName: _jsxFileName$j,
185
+ lineNumber: 28
186
+ }
187
+ })),
188
+ open: {
189
+ check: React$l.createElement(IconRoot, {
190
+ size: size,
191
+ __self: this,
192
+ __source: {
193
+ fileName: _jsxFileName$j,
194
+ lineNumber: 33
195
+ }
196
+ }, React$l.createElement(Action, {
197
+ className: classes.bg,
198
+ __self: this,
199
+ __source: {
200
+ fileName: _jsxFileName$j,
201
+ lineNumber: 34
202
+ }
203
+ })),
204
+ emoji: React$l.createElement(IconRoot, {
205
+ size: size,
206
+ __self: this,
207
+ __source: {
208
+ fileName: _jsxFileName$j,
209
+ lineNumber: 38
210
+ }
211
+ }, React$l.createElement(Emoji, {
212
+ className: classes.bg,
213
+ __self: this,
214
+ __source: {
215
+ fileName: _jsxFileName$j,
216
+ lineNumber: 39
217
+ }
218
+ }))
219
+ }
220
+ },
221
+ square: {
222
+ check: React$l.createElement(IconRoot, {
223
+ size: size,
224
+ __self: this,
225
+ __source: {
226
+ fileName: _jsxFileName$j,
227
+ lineNumber: 46
228
+ }
229
+ }, React$l.createElement(SquareFeedbackBox, {
230
+ className: classes.bg,
231
+ __self: this,
232
+ __source: {
233
+ fileName: _jsxFileName$j,
234
+ lineNumber: 47
235
+ }
236
+ }), React$l.createElement(Action, {
237
+ className: classes.fg,
238
+ __self: this,
239
+ __source: {
240
+ fileName: _jsxFileName$j,
241
+ lineNumber: 48
242
+ }
243
+ })),
244
+ emoji: React$l.createElement(IconRoot, {
245
+ size: size,
246
+ __self: this,
247
+ __source: {
248
+ fileName: _jsxFileName$j,
249
+ lineNumber: 52
250
+ }
251
+ }, React$l.createElement(SquareFeedbackBox, {
252
+ className: classes.bg,
253
+ __self: this,
254
+ __source: {
255
+ fileName: _jsxFileName$j,
256
+ lineNumber: 53
257
+ }
258
+ }), React$l.createElement(Emoji, {
259
+ className: classes.fg,
260
+ __self: this,
261
+ __source: {
262
+ fileName: _jsxFileName$j,
263
+ lineNumber: 54
264
+ }
265
+ })),
266
+ open: {
267
+ check: React$l.createElement(IconRoot, {
268
+ size: size,
269
+ __self: this,
270
+ __source: {
271
+ fileName: _jsxFileName$j,
272
+ lineNumber: 59
273
+ }
274
+ }, React$l.createElement(Action, {
275
+ className: classes.bg,
276
+ __self: this,
277
+ __source: {
278
+ fileName: _jsxFileName$j,
279
+ lineNumber: 60
280
+ }
281
+ })),
282
+ emoji: React$l.createElement(IconRoot, {
283
+ size: size,
284
+ __self: this,
285
+ __source: {
286
+ fileName: _jsxFileName$j,
287
+ lineNumber: 64
288
+ }
289
+ }, React$l.createElement(Emoji, {
290
+ className: classes.bg,
291
+ __self: this,
292
+ __source: {
293
+ fileName: _jsxFileName$j,
294
+ lineNumber: 65
295
+ }
296
+ }))
297
+ }
298
+ }
299
+ },
300
+ round: {
301
+ check: React$l.createElement(IconRoot, {
302
+ size: size,
303
+ __self: this,
304
+ __source: {
305
+ fileName: _jsxFileName$j,
306
+ lineNumber: 73
307
+ }
308
+ }, React$l.createElement(Circle$1, {
309
+ className: classes.bg,
310
+ __self: this,
311
+ __source: {
312
+ fileName: _jsxFileName$j,
313
+ lineNumber: 74
314
+ }
315
+ }), React$l.createElement(Action, {
316
+ className: classes.fg,
317
+ __self: this,
318
+ __source: {
319
+ fileName: _jsxFileName$j,
320
+ lineNumber: 75
321
+ }
322
+ })),
323
+ emoji: React$l.createElement(IconRoot, {
324
+ size: size,
325
+ __self: this,
326
+ __source: {
327
+ fileName: _jsxFileName$j,
328
+ lineNumber: 79
329
+ }
330
+ }, React$l.createElement(Circle$1, {
331
+ className: classes.bg,
332
+ __self: this,
333
+ __source: {
334
+ fileName: _jsxFileName$j,
335
+ lineNumber: 80
336
+ }
337
+ }), React$l.createElement(Emoji, {
338
+ className: classes.fg,
339
+ __self: this,
340
+ __source: {
341
+ fileName: _jsxFileName$j,
342
+ lineNumber: 81
343
+ }
344
+ })),
345
+ open: {
346
+ check: React$l.createElement(IconRoot, {
347
+ size: size,
348
+ __self: this,
349
+ __source: {
350
+ fileName: _jsxFileName$j,
351
+ lineNumber: 86
352
+ }
353
+ }, React$l.createElement(Action, {
354
+ className: classes.bg,
355
+ __self: this,
356
+ __source: {
357
+ fileName: _jsxFileName$j,
358
+ lineNumber: 87
359
+ }
360
+ })),
361
+ emoji: React$l.createElement(IconRoot, {
362
+ size: size,
363
+ __self: this,
364
+ __source: {
365
+ fileName: _jsxFileName$j,
366
+ lineNumber: 91
367
+ }
368
+ }, React$l.createElement(Emoji, {
369
+ className: classes.bg,
370
+ __self: this,
371
+ __source: {
372
+ fileName: _jsxFileName$j,
373
+ lineNumber: 92
374
+ }
375
+ }))
376
+ }
377
+ },
378
+ square: {
379
+ check: React$l.createElement(IconRoot, {
380
+ size: size,
381
+ __self: this,
382
+ __source: {
383
+ fileName: _jsxFileName$j,
384
+ lineNumber: 99
385
+ }
386
+ }, React$l.createElement(Square, {
387
+ className: classes.bg,
388
+ __self: this,
389
+ __source: {
390
+ fileName: _jsxFileName$j,
391
+ lineNumber: 100
392
+ }
393
+ }), React$l.createElement(Action, {
394
+ className: classes.fg,
395
+ __self: this,
396
+ __source: {
397
+ fileName: _jsxFileName$j,
398
+ lineNumber: 101
399
+ }
400
+ })),
401
+ emoji: React$l.createElement(IconRoot, {
402
+ size: size,
403
+ __self: this,
404
+ __source: {
405
+ fileName: _jsxFileName$j,
406
+ lineNumber: 105
407
+ }
408
+ }, React$l.createElement(Square, {
409
+ className: classes.bg,
410
+ __self: this,
411
+ __source: {
412
+ fileName: _jsxFileName$j,
413
+ lineNumber: 106
414
+ }
415
+ }), React$l.createElement(Emoji, {
416
+ className: classes.fg,
417
+ __self: this,
418
+ __source: {
419
+ fileName: _jsxFileName$j,
420
+ lineNumber: 107
421
+ }
422
+ })),
423
+ open: {
424
+ check: React$l.createElement(IconRoot, {
425
+ size: size,
426
+ __self: this,
427
+ __source: {
428
+ fileName: _jsxFileName$j,
429
+ lineNumber: 112
430
+ }
431
+ }, React$l.createElement(Action, {
432
+ className: classes.bg,
433
+ __self: this,
434
+ __source: {
435
+ fileName: _jsxFileName$j,
436
+ lineNumber: 113
437
+ }
438
+ })),
439
+ emoji: React$l.createElement(IconRoot, {
440
+ size: size,
441
+ __self: this,
442
+ __source: {
443
+ fileName: _jsxFileName$j,
444
+ lineNumber: 117
445
+ }
446
+ }, React$l.createElement(Emoji, {
447
+ className: classes.bg,
448
+ __self: this,
449
+ __source: {
450
+ fileName: _jsxFileName$j,
451
+ lineNumber: 118
452
+ }
453
+ }))
454
+ }
455
+ }
456
+ };
457
+ }
458
+ render() {
459
+ if (this.props.category === undefined) {
460
+ if (this.props.open === true) {
461
+ return this.icons[this.props.shape].open[this.props.iconSet];
462
+ } else {
463
+ return this.icons[this.props.shape][this.props.iconSet];
464
+ }
465
+ } else {
466
+ if (this.props.open === true) {
467
+ return this.icons.feedback[this.props.shape].open[this.props.iconSet];
468
+ } else {
469
+ return this.icons.feedback[this.props.shape][this.props.iconSet];
470
+ }
471
+ }
472
+ }
473
+ }
474
+ IconBase.__initStatic();
475
+ IconBase.propTypes = {
476
+ iconSet: PropTypes$n.oneOf(['emoji', 'check']),
477
+ shape: PropTypes$n.oneOf(['round', 'square']),
478
+ category: PropTypes$n.oneOf(['feedback', undefined]),
479
+ open: PropTypes$n.bool
480
+ };
481
+ IconBase.defaultProps = {
482
+ iconSet: 'check',
483
+ shape: 'round',
484
+ category: undefined,
485
+ open: false
486
+ };
487
+ return IconBase;
488
+ };
489
+ const PropTypes$m = _dll_prop_types;
490
+ const React$k = _dll_react;
491
+ const {withStyles: withStyles$g} = _dll_material_ui__core_styles;
492
+ const _jsxFileName$i = "/home/circleci/repo/node_modules/@pie-lib/icons/src/correct-icon.jsx";
493
+ const styles$b = getStyles('correct', '#f8ffe2', '#4aaf46');
494
+ const Emoji$3 = ({className}) => React$k.createElement('g', {
495
+ transform: 'translate(1, 0)',
496
+ __self: undefined,
497
+ __source: {
498
+ fileName: _jsxFileName$i,
499
+ lineNumber: 10
500
+ }
501
+ }, React$k.createElement('path', {
502
+ className: className,
503
+ 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 c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z",
504
+ __self: undefined,
505
+ __source: {
506
+ fileName: _jsxFileName$i,
507
+ lineNumber: 11
508
+ }
509
+ }), React$k.createElement('rect', {
510
+ x: "21.1",
511
+ y: "13.1",
512
+ className: className,
513
+ width: "3.7",
514
+ height: "4.7",
515
+ __self: undefined,
516
+ __source: {
517
+ fileName: _jsxFileName$i,
518
+ lineNumber: 16
519
+ }
520
+ }), React$k.createElement('rect', {
521
+ x: "12.7",
522
+ y: "13.1",
523
+ className: className,
524
+ width: "3.7",
525
+ height: "4.7",
526
+ __self: undefined,
527
+ __source: {
528
+ fileName: _jsxFileName$i,
529
+ lineNumber: 17
530
+ }
531
+ }));
532
+ Emoji$3.propTypes = {
533
+ className: PropTypes$m.string
534
+ };
535
+ Emoji$3.defaultProps = {
536
+ x: 0
537
+ };
538
+ const Check$1 = ({className, x, y}) => React$k.createElement('polygon', {
539
+ transform: `translate(${x}, ${y})`,
540
+ className: className,
541
+ 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",
542
+ __self: undefined,
543
+ __source: {
544
+ fileName: _jsxFileName$i,
545
+ lineNumber: 30
546
+ }
547
+ });
548
+ Check$1.propTypes = {
549
+ x: PropTypes$m.number,
550
+ y: PropTypes$m.number,
551
+ className: PropTypes$m.string
552
+ };
553
+ Check$1.defaultProps = {
554
+ x: 0,
555
+ y: 0
556
+ };
557
+ const Correct = IconBase(Check$1, Emoji$3);
558
+ Correct.propTypes = {
559
+ iconSet: PropTypes$m.oneOf(['emoji', 'check']),
560
+ shape: PropTypes$m.oneOf(['round', 'square']),
561
+ category: PropTypes$m.oneOf(['feedback', undefined]),
562
+ open: PropTypes$m.bool
563
+ };
564
+ Correct.defaultProps = {
565
+ iconSet: 'check',
566
+ shape: 'round',
567
+ category: undefined,
568
+ open: false
569
+ };
570
+ var correctIcon = withStyles$g(styles$b)(Correct);
571
+ const PropTypes$l = _dll_prop_types;
572
+ const React$j = _dll_react;
573
+ const classNames$3 = _dll_classnames;
574
+ const {withStyles: withStyles$f} = _dll_material_ui__core_styles;
575
+ const _jsxFileName$h = "/home/circleci/repo/node_modules/@pie-lib/icons/src/correct-response-icon.jsx";
576
+ const OpenIcon = ({bg, fg}) => React$j.createElement('svg', {
577
+ preserveAspectRatio: "xMinYMin meet",
578
+ version: "1.1",
579
+ id: "Layer_1",
580
+ x: "0px",
581
+ y: "0px",
582
+ viewBox: "-283 359 34 35",
583
+ style: {
584
+ enableBackground: 'new -283 359 34 35'
585
+ },
586
+ __self: undefined,
587
+ __source: {
588
+ fileName: _jsxFileName$h,
589
+ lineNumber: 7
590
+ }
591
+ }, React$j.createElement('circle', {
592
+ className: bg,
593
+ cx: "-266",
594
+ cy: "375.9",
595
+ r: "14",
596
+ __self: undefined,
597
+ __source: {
598
+ fileName: _jsxFileName$h,
599
+ lineNumber: 16
600
+ }
601
+ }), React$j.createElement('path', {
602
+ className: bg,
603
+ 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 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",
604
+ __self: undefined,
605
+ __source: {
606
+ fileName: _jsxFileName$h,
607
+ lineNumber: 17
608
+ }
609
+ }), React$j.createElement('polygon', {
610
+ className: fg,
611
+ 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 ",
612
+ __self: undefined,
613
+ __source: {
614
+ fileName: _jsxFileName$h,
615
+ lineNumber: 22
616
+ }
617
+ }));
618
+ OpenIcon.propTypes = {
619
+ bg: PropTypes$l.string,
620
+ fg: PropTypes$l.string
621
+ };
622
+ const CloseIcon = ({bg, fg, border}) => React$j.createElement('svg', {
623
+ preserveAspectRatio: "xMinYMin meet",
624
+ version: "1.1",
625
+ x: "0px",
626
+ y: "0px",
627
+ viewBox: "-129.5 127 34 35",
628
+ style: {
629
+ enableBackground: 'new -129.5 127 34 35'
630
+ },
631
+ __self: undefined,
632
+ __source: {
633
+ fileName: _jsxFileName$h,
634
+ lineNumber: 35
635
+ }
636
+ }, React$j.createElement('path', {
637
+ style: {
638
+ fill: '#D0CAC5',
639
+ stroke: '#E6E3E0',
640
+ strokeWidth: 0.75,
641
+ strokeMiterlimit: 10
642
+ },
643
+ 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 C-97.4,153.5-104.3,160.4-112.9,160.4z",
644
+ __self: undefined,
645
+ __source: {
646
+ fileName: _jsxFileName$h,
647
+ lineNumber: 43
648
+ }
649
+ }), React$j.createElement('path', {
650
+ style: {
651
+ fill: '#B3ABA4',
652
+ stroke: '#CDC7C2',
653
+ strokeWidth: 0.5,
654
+ strokeMiterlimit: 10
655
+ },
656
+ 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",
657
+ __self: undefined,
658
+ __source: {
659
+ fileName: _jsxFileName$h,
660
+ lineNumber: 53
661
+ }
662
+ }), React$j.createElement('circle', {
663
+ className: bg,
664
+ cx: "-114.2",
665
+ cy: "143.5",
666
+ r: "14",
667
+ __self: undefined,
668
+ __source: {
669
+ fileName: _jsxFileName$h,
670
+ lineNumber: 62
671
+ }
672
+ }), React$j.createElement('path', {
673
+ className: border,
674
+ 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 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",
675
+ __self: undefined,
676
+ __source: {
677
+ fileName: _jsxFileName$h,
678
+ lineNumber: 63
679
+ }
680
+ }), React$j.createElement('polygon', {
681
+ className: fg,
682
+ points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
683
+ __self: undefined,
684
+ __source: {
685
+ fileName: _jsxFileName$h,
686
+ lineNumber: 68
687
+ }
688
+ }));
689
+ CloseIcon.propTypes = {
690
+ bg: PropTypes$l.string,
691
+ fg: PropTypes$l.string,
692
+ border: PropTypes$l.string
693
+ };
694
+ const styles$a = {
695
+ root: {
696
+ width: props => props.size || '25px',
697
+ height: props => props.size || '25px'
698
+ },
699
+ hideIconBg: {
700
+ fill: '#bce2ff'
701
+ },
702
+ hideIconFg: {
703
+ fill: '#1a9cff'
704
+ },
705
+ showIconBg: {
706
+ fill: 'white'
707
+ },
708
+ showIconFg: {
709
+ fill: '#1a9cff'
710
+ },
711
+ showIconBorder: {
712
+ fill: '#bce2ff'
713
+ }
714
+ };
715
+ const CorrectResponse = ({open, classes, className}) => React$j.createElement('div', {
716
+ className: classNames$3(className, classes.root),
717
+ __self: undefined,
718
+ __source: {
719
+ fileName: _jsxFileName$h,
720
+ lineNumber: 104
721
+ }
722
+ }, open ? React$j.createElement(OpenIcon, {
723
+ bg: classes.hideIconBg,
724
+ fg: classes.hideIconFg,
725
+ __self: undefined,
726
+ __source: {
727
+ fileName: _jsxFileName$h,
728
+ lineNumber: 106
729
+ }
730
+ }) : React$j.createElement(CloseIcon, {
731
+ bg: classes.showIconBg,
732
+ border: classes.showIconBorder,
733
+ fg: classes.showIconFg,
734
+ __self: undefined,
735
+ __source: {
736
+ fileName: _jsxFileName$h,
737
+ lineNumber: 108
738
+ }
739
+ }));
740
+ CorrectResponse.propTypes = {
741
+ classes: PropTypes$l.object.isRequired,
742
+ open: PropTypes$l.bool,
743
+ size: PropTypes$l.string,
744
+ className: PropTypes$l.string
745
+ };
746
+ CorrectResponse.defaultProps = {
747
+ open: false
748
+ };
749
+ var CorrectResponse$1 = withStyles$f(styles$a)(CorrectResponse);
750
+ const PropTypes$k = _dll_prop_types;
751
+ const React$i = _dll_react;
752
+ const {withStyles: withStyles$e} = _dll_material_ui__core_styles;
753
+ const _jsxFileName$g = "/home/circleci/repo/node_modules/@pie-lib/icons/src/incorrect-icon.jsx";
754
+ const Ex = ({className}) => React$i.createElement('g', {
755
+ transform: 'translate(0.5, 0.5)',
756
+ __self: undefined,
757
+ __source: {
758
+ fileName: _jsxFileName$g,
759
+ lineNumber: 8
760
+ }
761
+ }, React$i.createElement('rect', {
762
+ x: "11",
763
+ y: "17.3",
764
+ transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)",
765
+ className: className,
766
+ width: "16.6",
767
+ height: "3.7",
768
+ __self: undefined,
769
+ __source: {
770
+ fileName: _jsxFileName$g,
771
+ lineNumber: 9
772
+ }
773
+ }), React$i.createElement('rect', {
774
+ x: "17.4",
775
+ y: "10.7",
776
+ transform: "matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)",
777
+ className: className,
778
+ width: "3.7",
779
+ height: "16.6",
780
+ __self: undefined,
781
+ __source: {
782
+ fileName: _jsxFileName$g,
783
+ lineNumber: 17
784
+ }
785
+ }));
786
+ Ex.propTypes = {
787
+ className: PropTypes$k.string
788
+ };
789
+ const Emoji$2 = ({className}) => React$i.createElement('g', {
790
+ transform: 'translate(1,0)',
791
+ __self: undefined,
792
+ __source: {
793
+ fileName: _jsxFileName$g,
794
+ lineNumber: 32
795
+ }
796
+ }, React$i.createElement('rect', {
797
+ x: "21",
798
+ y: "12.9",
799
+ className: className,
800
+ width: "3.7",
801
+ height: "4.7",
802
+ __self: undefined,
803
+ __source: {
804
+ fileName: _jsxFileName$g,
805
+ lineNumber: 33
806
+ }
807
+ }), React$i.createElement('rect', {
808
+ x: "12.7",
809
+ y: "12.9",
810
+ className: className,
811
+ width: "3.7",
812
+ height: "4.7",
813
+ __self: undefined,
814
+ __source: {
815
+ fileName: _jsxFileName$g,
816
+ lineNumber: 34
817
+ }
818
+ }), React$i.createElement('rect', {
819
+ x: "12.2",
820
+ y: "22.5",
821
+ className: className,
822
+ width: "13",
823
+ height: "3.3",
824
+ __self: undefined,
825
+ __source: {
826
+ fileName: _jsxFileName$g,
827
+ lineNumber: 35
828
+ }
829
+ }));
830
+ Emoji$2.propTypes = {
831
+ className: PropTypes$k.string
832
+ };
833
+ const styles$9 = getStyles('incorrect', '#fbf2e3', '#fcb733');
834
+ const Incorrect = IconBase(Ex, Emoji$2);
835
+ var incorrectIcon = withStyles$e(styles$9)(Incorrect);
836
+ Incorrect.propTypes = {
837
+ iconSet: PropTypes$k.oneOf(['emoji', 'check']),
838
+ shape: PropTypes$k.oneOf(['round', 'square']),
839
+ category: PropTypes$k.oneOf(['feedback', undefined]),
840
+ open: PropTypes$k.bool
841
+ };
842
+ Incorrect.defaultProps = {
843
+ iconSet: 'check',
844
+ shape: 'round',
845
+ category: undefined,
846
+ open: false
847
+ };
848
+ const PropTypes$j = _dll_prop_types;
849
+ const React$h = _dll_react;
850
+ const _jsxFileName$f = "/home/circleci/repo/node_modules/@pie-lib/icons/src/instructions-icon.jsx";
851
+ const Lines = () => {
852
+ const style = {
853
+ fill: 'none',
854
+ stroke: '#BCE2FF',
855
+ strokeWidth: 2,
856
+ strokeMiterlimit: 10
857
+ };
858
+ return React$h.createElement('g', {
859
+ __self: undefined,
860
+ __source: {
861
+ fileName: _jsxFileName$f,
862
+ lineNumber: 13
863
+ }
864
+ }, React$h.createElement('line', {
865
+ style: style,
866
+ x1: "-98",
867
+ y1: "142",
868
+ x2: "-114.6",
869
+ y2: "142",
870
+ __self: undefined,
871
+ __source: {
872
+ fileName: _jsxFileName$f,
873
+ lineNumber: 14
874
+ }
875
+ }), React$h.createElement('line', {
876
+ style: style,
877
+ x1: "-98",
878
+ y1: "146.3",
879
+ x2: "-114.6",
880
+ y2: "146.3",
881
+ __self: undefined,
882
+ __source: {
883
+ fileName: _jsxFileName$f,
884
+ lineNumber: 15
885
+ }
886
+ }), React$h.createElement('line', {
887
+ style: style,
888
+ x1: "-104",
889
+ y1: "150.7",
890
+ x2: "-114.6",
891
+ y2: "150.7",
892
+ __self: undefined,
893
+ __source: {
894
+ fileName: _jsxFileName$f,
895
+ lineNumber: 16
896
+ }
897
+ }));
898
+ };
899
+ const Root$1 = ({children, size}) => React$h.createElement(Sized, {
900
+ size: size,
901
+ __self: undefined,
902
+ __source: {
903
+ fileName: _jsxFileName$f,
904
+ lineNumber: 22
905
+ }
906
+ }, React$h.createElement('svg', {
907
+ version: "1.1",
908
+ viewBox: "-128 129 31 31",
909
+ style: {
910
+ enableBackground: 'new -128 129 31 31'
911
+ },
912
+ __self: undefined,
913
+ __source: {
914
+ fileName: _jsxFileName$f,
915
+ lineNumber: 23
916
+ }
917
+ }, children));
918
+ Root$1.propTypes = {
919
+ children: PropTypes$j.oneOfType([PropTypes$j.arrayOf(PropTypes$j.node), PropTypes$j.node]).isRequired,
920
+ size: PropTypes$j.number
921
+ };
922
+ const GreyInfo = () => {
923
+ return React$h.createElement('g', {
924
+ __self: undefined,
925
+ __source: {
926
+ fileName: _jsxFileName$f,
927
+ lineNumber: 36
928
+ }
929
+ }, React$h.createElement('rect', {
930
+ x: "-123.9",
931
+ y: "135.3",
932
+ style: {
933
+ fill: '#D0CAC5',
934
+ stroke: '#E6E3E0',
935
+ strokeWidth: 0.75,
936
+ strokeLinejoin: 'round',
937
+ strokeMiterlimit: 10
938
+ },
939
+ width: "4.1",
940
+ height: "4.1",
941
+ __self: undefined,
942
+ __source: {
943
+ fileName: _jsxFileName$f,
944
+ lineNumber: 37
945
+ }
946
+ }), React$h.createElement('polygon', {
947
+ style: {
948
+ fill: '#D0CAC5',
949
+ stroke: '#E6E3E0',
950
+ strokeWidth: 0.75,
951
+ strokeLinejoin: 'round',
952
+ strokeMiterlimit: 10
953
+ },
954
+ points: "-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 ",
955
+ __self: undefined,
956
+ __source: {
957
+ fileName: _jsxFileName$f,
958
+ lineNumber: 50
959
+ }
960
+ }), React$h.createElement('rect', {
961
+ x: "-124.7",
962
+ y: "134.7",
963
+ style: {
964
+ fill: '#B3ABA4',
965
+ stroke: '#CDC7C2',
966
+ strokeWidth: 0.5,
967
+ strokeLinecap: 'round',
968
+ strokeLinejoin: 'round',
969
+ strokeMiterlimit: 10
970
+ },
971
+ width: "4.1",
972
+ height: "4.1",
973
+ __self: undefined,
974
+ __source: {
975
+ fileName: _jsxFileName$f,
976
+ lineNumber: 61
977
+ }
978
+ }), React$h.createElement('polygon', {
979
+ style: {
980
+ fill: '#B3ABA4',
981
+ stroke: '#CDC7C2',
982
+ strokeWidth: 0.5,
983
+ strokeLinecap: 'round',
984
+ strokeLinejoin: 'round',
985
+ strokeMiterlimit: 10
986
+ },
987
+ points: "-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 ",
988
+ __self: undefined,
989
+ __source: {
990
+ fileName: _jsxFileName$f,
991
+ lineNumber: 76
992
+ }
993
+ }), React$h.createElement('rect', {
994
+ x: "-125.5",
995
+ y: "134",
996
+ style: {
997
+ fill: '#7FABC6'
998
+ },
999
+ width: "4.1",
1000
+ height: "4.1",
1001
+ __self: undefined,
1002
+ __source: {
1003
+ fileName: _jsxFileName$f,
1004
+ lineNumber: 88
1005
+ }
1006
+ }), React$h.createElement('polygon', {
1007
+ style: {
1008
+ fill: '#7FABC6'
1009
+ },
1010
+ points: "-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 ",
1011
+ __self: undefined,
1012
+ __source: {
1013
+ fileName: _jsxFileName$f,
1014
+ lineNumber: 89
1015
+ }
1016
+ }));
1017
+ };
1018
+ const BlueInfo = () => React$h.createElement('g', {
1019
+ __self: undefined,
1020
+ __source: {
1021
+ fileName: _jsxFileName$f,
1022
+ lineNumber: 99
1023
+ }
1024
+ }, React$h.createElement('rect', {
1025
+ x: "-123.9",
1026
+ y: "135.3",
1027
+ style: {
1028
+ fill: '#D0CAC5',
1029
+ stroke: '#E6E3E0',
1030
+ strokeWidth: 0.75,
1031
+ strokeLinejoin: 'round',
1032
+ strokeMiterlimit: 10
1033
+ },
1034
+ width: "4.1",
1035
+ height: "4.1",
1036
+ __self: undefined,
1037
+ __source: {
1038
+ fileName: _jsxFileName$f,
1039
+ lineNumber: 100
1040
+ }
1041
+ }), React$h.createElement('polygon', {
1042
+ style: {
1043
+ fill: '#D0CAC5',
1044
+ stroke: '#E6E3E0',
1045
+ strokeWidth: 0.75,
1046
+ strokeLinejoin: 'round',
1047
+ strokeMiterlimit: 10
1048
+ },
1049
+ points: "-119.8,150.4 -119.8,142.2 -125,142.2 -125,144.9 -122.6,144.9 -122.6,150.4 -125.6,150.4 -125.6,153.2 -116.8,153.2 -116.8,150.4 ",
1050
+ __self: undefined,
1051
+ __source: {
1052
+ fileName: _jsxFileName$f,
1053
+ lineNumber: 113
1054
+ }
1055
+ }), React$h.createElement('rect', {
1056
+ x: "-124.7",
1057
+ y: "134.7",
1058
+ style: {
1059
+ fill: '#B3ABA4',
1060
+ stroke: '#CDC7C2',
1061
+ strokeWidth: 0.5,
1062
+ strokeLinecap: 'round',
1063
+ strokeLinejoin: 'round',
1064
+ strokeMiterlimit: 10
1065
+ },
1066
+ width: "4.1",
1067
+ height: "4.1",
1068
+ __self: undefined,
1069
+ __source: {
1070
+ fileName: _jsxFileName$f,
1071
+ lineNumber: 124
1072
+ }
1073
+ }), React$h.createElement('polygon', {
1074
+ style: {
1075
+ fill: '#B3ABA4',
1076
+ stroke: '#CDC7C2',
1077
+ strokeWidth: 0.5,
1078
+ strokeLinecap: 'round',
1079
+ strokeLinejoin: 'round',
1080
+ strokeMiterlimit: 10
1081
+ },
1082
+ points: "-120.6,149.8 -120.6,141.5 -125.8,141.5 -125.8,144.3 -123.3,144.3 -123.3,149.8 -126.4,149.8 -126.4,152.5 -117.6,152.5 -117.6,149.8 ",
1083
+ __self: undefined,
1084
+ __source: {
1085
+ fileName: _jsxFileName$f,
1086
+ lineNumber: 138
1087
+ }
1088
+ }), React$h.createElement('rect', {
1089
+ x: "-125.5",
1090
+ y: "134",
1091
+ style: {
1092
+ fill: '#1A9CFF'
1093
+ },
1094
+ width: "4.1",
1095
+ height: "4.1",
1096
+ __self: undefined,
1097
+ __source: {
1098
+ fileName: _jsxFileName$f,
1099
+ lineNumber: 150
1100
+ }
1101
+ }), React$h.createElement('polygon', {
1102
+ style: {
1103
+ fill: '#1A9CFF'
1104
+ },
1105
+ points: "-121.4,149.1 -121.4,140.9 -126.5,140.9 -126.5,143.6 -124.1,143.6 -124.1,149.1 -127.1,149.1 -127.1,151.9 -118.4,151.9 -118.4,149.1 ",
1106
+ __self: undefined,
1107
+ __source: {
1108
+ fileName: _jsxFileName$f,
1109
+ lineNumber: 151
1110
+ }
1111
+ }));
1112
+ class Instructions extends React$h.Component {
1113
+ constructor(props) {
1114
+ super(props);
1115
+ }
1116
+ render() {
1117
+ if (this.props.open === true) {
1118
+ return React$h.createElement(Root$1, {
1119
+ __self: this,
1120
+ __source: {
1121
+ fileName: _jsxFileName$f,
1122
+ lineNumber: 167
1123
+ }
1124
+ }, React$h.createElement(GreyInfo, {
1125
+ __self: this,
1126
+ __source: {
1127
+ fileName: _jsxFileName$f,
1128
+ lineNumber: 168
1129
+ }
1130
+ }), React$h.createElement(Lines, {
1131
+ __self: this,
1132
+ __source: {
1133
+ fileName: _jsxFileName$f,
1134
+ lineNumber: 169
1135
+ }
1136
+ }));
1137
+ } else {
1138
+ return React$h.createElement(Root$1, {
1139
+ __self: this,
1140
+ __source: {
1141
+ fileName: _jsxFileName$f,
1142
+ lineNumber: 174
1143
+ }
1144
+ }, React$h.createElement(BlueInfo, {
1145
+ __self: this,
1146
+ __source: {
1147
+ fileName: _jsxFileName$f,
1148
+ lineNumber: 175
1149
+ }
1150
+ }), React$h.createElement(Lines, {
1151
+ __self: this,
1152
+ __source: {
1153
+ fileName: _jsxFileName$f,
1154
+ lineNumber: 176
1155
+ }
1156
+ }));
1157
+ }
1158
+ }
1159
+ }
1160
+ Instructions.propTypes = {
1161
+ open: PropTypes$j.bool
1162
+ };
1163
+ Instructions.defaultProps = {
1164
+ open: false
1165
+ };
1166
+ const PropTypes$i = _dll_prop_types;
1167
+ const React$g = _dll_react;
1168
+ const {withStyles: withStyles$d} = _dll_material_ui__core_styles;
1169
+ const _jsxFileName$e = "/home/circleci/repo/node_modules/@pie-lib/icons/src/learn-more-icon.jsx";
1170
+ const Glint = ({fill}) => React$g.createElement('path', {
1171
+ fill: fill,
1172
+ d: "M-130.4,142.1c0-2.1,1.7-3.9,3.9-3.9c0.3,0,0.5,0,0.8,0.1c-0.6-0.8-1.5-1.3-2.6-1.3c-1.8,0-3.3,1.5-3.3,3.3c0,1.1,0.5,2,1.3,2.6C-130.4,142.6-130.4,142.4-130.4,142.1z",
1173
+ __self: undefined,
1174
+ __source: {
1175
+ fileName: _jsxFileName$e,
1176
+ lineNumber: 7
1177
+ }
1178
+ });
1179
+ Glint.propTypes = {
1180
+ fill: PropTypes$i.string
1181
+ };
1182
+ class LearnMore extends React$g.Component {
1183
+ static __initStatic() {
1184
+ this.propTypes = {
1185
+ classes: PropTypes$i.object.isRequired,
1186
+ size: PropTypes$i.number
1187
+ };
1188
+ }
1189
+ render() {
1190
+ const {classes, size} = this.props;
1191
+ if (this.props.open === true) {
1192
+ return React$g.createElement(Sized, {
1193
+ size: size,
1194
+ __self: this,
1195
+ __source: {
1196
+ fileName: _jsxFileName$e,
1197
+ lineNumber: 28
1198
+ }
1199
+ }, React$g.createElement('svg', {
1200
+ preserveAspectRatio: "xMinYMin meet",
1201
+ viewBox: "-135 129 16 32",
1202
+ __self: this,
1203
+ __source: {
1204
+ fileName: _jsxFileName$e,
1205
+ lineNumber: 29
1206
+ }
1207
+ }, React$g.createElement('path', {
1208
+ className: classes.hideBg,
1209
+ d: "M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z",
1210
+ __self: this,
1211
+ __source: {
1212
+ fileName: _jsxFileName$e,
1213
+ lineNumber: 30
1214
+ }
1215
+ }), React$g.createElement('path', {
1216
+ className: classes.hideBg,
1217
+ d: "M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z",
1218
+ __self: this,
1219
+ __source: {
1220
+ fileName: _jsxFileName$e,
1221
+ lineNumber: 34
1222
+ }
1223
+ }), React$g.createElement(Glint, {
1224
+ fill: classes.hideFg.fill,
1225
+ __self: this,
1226
+ __source: {
1227
+ fileName: _jsxFileName$e,
1228
+ lineNumber: 38
1229
+ }
1230
+ })));
1231
+ } else {
1232
+ return React$g.createElement(Sized, {
1233
+ size: size,
1234
+ __self: this,
1235
+ __source: {
1236
+ fileName: _jsxFileName$e,
1237
+ lineNumber: 44
1238
+ }
1239
+ }, React$g.createElement('svg', {
1240
+ preserveAspectRatio: "xMinYMin meet",
1241
+ viewBox: "-135 129 16 31",
1242
+ __self: this,
1243
+ __source: {
1244
+ fileName: _jsxFileName$e,
1245
+ lineNumber: 45
1246
+ }
1247
+ }, React$g.createElement('path', {
1248
+ fill: "#D0CAC5",
1249
+ stroke: "#E6E3E0",
1250
+ className: "st0",
1251
+ d: "M-120.7,142.4c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-121.6,146-120.7,144.3-120.7,142.4z",
1252
+ __self: this,
1253
+ __source: {
1254
+ fileName: _jsxFileName$e,
1255
+ lineNumber: 46
1256
+ }
1257
+ }), React$g.createElement('path', {
1258
+ fill: "#D0CAC5",
1259
+ stroke: "#E6E3E0",
1260
+ className: "st0",
1261
+ d: "M-124.4,154.3h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-123.6,153.9-123.9,154.3-124.4,154.3z",
1262
+ __self: this,
1263
+ __source: {
1264
+ fileName: _jsxFileName$e,
1265
+ lineNumber: 52
1266
+ }
1267
+ }), React$g.createElement('path', {
1268
+ fill: "#B3ABA4",
1269
+ stroke: "#CDC7C2",
1270
+ className: "st1",
1271
+ d: "M-121.3,141.8c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.2,145.3-121.3,143.7-121.3,141.8z",
1272
+ __self: this,
1273
+ __source: {
1274
+ fileName: _jsxFileName$e,
1275
+ lineNumber: 58
1276
+ }
1277
+ }), ",", React$g.createElement('path', {
1278
+ fill: "#B3ABA4",
1279
+ stroke: "#CDC7C2",
1280
+ className: "st1",
1281
+ d: "M-125,153.7h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.2,153.3-124.6,153.7-125,153.7z",
1282
+ __self: this,
1283
+ __source: {
1284
+ fileName: _jsxFileName$e,
1285
+ lineNumber: 65
1286
+ }
1287
+ }), React$g.createElement('path', {
1288
+ className: classes.showBg,
1289
+ d: "M-122,141.1c0-3.7-3.3-6.6-7.1-5.8c-2.4,0.5-4.3,2.4-4.7,4.8c-0.4,2.3,0.6,4.4,2.2,5.7c0.4,0.3,0.6,0.8,0.6,1.3v1.9h6.1v-1.9c0-0.5,0.2-1,0.6-1.3C-122.8,144.7-122,143-122,141.1z",
1290
+ __self: this,
1291
+ __source: {
1292
+ fileName: _jsxFileName$e,
1293
+ lineNumber: 71
1294
+ }
1295
+ }), React$g.createElement('path', {
1296
+ className: classes.showBg,
1297
+ d: "M-125.7,153h-4.5c-0.4,0-0.8-0.4-0.8-0.8v-1.6h6.1v1.6C-124.9,152.7-125.2,153-125.7,153z",
1298
+ __self: this,
1299
+ __source: {
1300
+ fileName: _jsxFileName$e,
1301
+ lineNumber: 75
1302
+ }
1303
+ }), React$g.createElement(Glint, {
1304
+ fill: classes.hideFg.fill,
1305
+ __self: this,
1306
+ __source: {
1307
+ fileName: _jsxFileName$e,
1308
+ lineNumber: 79
1309
+ }
1310
+ })));
1311
+ }
1312
+ }
1313
+ }
1314
+ LearnMore.__initStatic();
1315
+ const styles$8 = {
1316
+ showBg: {
1317
+ fill: '#1a9cff'
1318
+ },
1319
+ hideFg: {
1320
+ fill: '#1a9cff'
1321
+ },
1322
+ hideBg: {
1323
+ fill: '#bce2ff'
1324
+ }
1325
+ };
1326
+ LearnMore.propTypes = {
1327
+ open: PropTypes$i.bool
1328
+ };
1329
+ LearnMore.defaultProps = {
1330
+ open: false
1331
+ };
1332
+ withStyles$d(styles$8)(LearnMore);
1333
+ const PropTypes$h = _dll_prop_types;
1334
+ const React$f = _dll_react;
1335
+ const {withStyles: withStyles$c} = _dll_material_ui__core_styles;
1336
+ const _jsxFileName$d = "/home/circleci/repo/node_modules/@pie-lib/icons/src/nothing-submitted-icon.jsx";
1337
+ const Exclamation = ({className}) => React$f.createElement('g', {
1338
+ __self: undefined,
1339
+ __source: {
1340
+ fileName: _jsxFileName$d,
1341
+ lineNumber: 8
1342
+ }
1343
+ }, React$f.createElement('rect', {
1344
+ x: "19.3",
1345
+ y: "10.3",
1346
+ className: className,
1347
+ width: "4.5",
1348
+ height: "12.7",
1349
+ __self: undefined,
1350
+ __source: {
1351
+ fileName: _jsxFileName$d,
1352
+ lineNumber: 9
1353
+ }
1354
+ }), React$f.createElement('rect', {
1355
+ x: "19.3",
1356
+ y: "26.2",
1357
+ className: className,
1358
+ width: "4.5",
1359
+ height: "4.5",
1360
+ __self: undefined,
1361
+ __source: {
1362
+ fileName: _jsxFileName$d,
1363
+ lineNumber: 10
1364
+ }
1365
+ }));
1366
+ const Octagon = ({className}) => React$f.createElement('polygon', {
1367
+ className: className,
1368
+ points: "14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5",
1369
+ __self: undefined,
1370
+ __source: {
1371
+ fileName: _jsxFileName$d,
1372
+ lineNumber: 15
1373
+ }
1374
+ });
1375
+ const Emoji$1 = ({className}) => React$f.createElement('g', {
1376
+ __self: undefined,
1377
+ __source: {
1378
+ fileName: _jsxFileName$d,
1379
+ lineNumber: 22
1380
+ }
1381
+ }, React$f.createElement('rect', {
1382
+ x: "23.8",
1383
+ y: "15",
1384
+ className: className,
1385
+ width: "3.5",
1386
+ height: "4.4",
1387
+ __self: undefined,
1388
+ __source: {
1389
+ fileName: _jsxFileName$d,
1390
+ lineNumber: 23
1391
+ }
1392
+ }), React$f.createElement('rect', {
1393
+ x: "16",
1394
+ y: "15",
1395
+ className: className,
1396
+ width: "3.5",
1397
+ height: "4.4",
1398
+ __self: undefined,
1399
+ __source: {
1400
+ fileName: _jsxFileName$d,
1401
+ lineNumber: 24
1402
+ }
1403
+ }), React$f.createElement('path', {
1404
+ className: className,
1405
+ d: "M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z",
1406
+ __self: undefined,
1407
+ __source: {
1408
+ fileName: _jsxFileName$d,
1409
+ lineNumber: 25
1410
+ }
1411
+ }));
1412
+ Emoji$1.propTypes = Octagon.propTypes = Exclamation.propTypes = {
1413
+ className: PropTypes$h.string
1414
+ };
1415
+ const styles$7 = getStyles('nothing-submitted', 'white', '#464146');
1416
+ class NothingSubmitted extends React$f.Component {
1417
+ static __initStatic() {
1418
+ this.propTypes = {
1419
+ classes: PropTypes$h.object.isRequired
1420
+ };
1421
+ }
1422
+ constructor(props) {
1423
+ super(props);
1424
+ const {classes} = this.props;
1425
+ this.icons = {
1426
+ check: React$f.createElement(IconRoot, {
1427
+ __self: this,
1428
+ __source: {
1429
+ fileName: _jsxFileName$d,
1430
+ lineNumber: 48
1431
+ }
1432
+ }, React$f.createElement(Octagon, {
1433
+ className: classes.bg,
1434
+ __self: this,
1435
+ __source: {
1436
+ fileName: _jsxFileName$d,
1437
+ lineNumber: 49
1438
+ }
1439
+ }), React$f.createElement(Exclamation, {
1440
+ className: classes.fg,
1441
+ __self: this,
1442
+ __source: {
1443
+ fileName: _jsxFileName$d,
1444
+ lineNumber: 50
1445
+ }
1446
+ })),
1447
+ emoji: React$f.createElement(IconRoot, {
1448
+ __self: this,
1449
+ __source: {
1450
+ fileName: _jsxFileName$d,
1451
+ lineNumber: 54
1452
+ }
1453
+ }, React$f.createElement(Octagon, {
1454
+ className: classes.bg,
1455
+ __self: this,
1456
+ __source: {
1457
+ fileName: _jsxFileName$d,
1458
+ lineNumber: 55
1459
+ }
1460
+ }), React$f.createElement(Emoji$1, {
1461
+ className: classes.fg,
1462
+ __self: this,
1463
+ __source: {
1464
+ fileName: _jsxFileName$d,
1465
+ lineNumber: 56
1466
+ }
1467
+ })),
1468
+ feedback: {
1469
+ check: React$f.createElement(IconRoot, {
1470
+ __self: this,
1471
+ __source: {
1472
+ fileName: _jsxFileName$d,
1473
+ lineNumber: 61
1474
+ }
1475
+ }, React$f.createElement(Octagon, {
1476
+ className: classes.bg,
1477
+ __self: this,
1478
+ __source: {
1479
+ fileName: _jsxFileName$d,
1480
+ lineNumber: 62
1481
+ }
1482
+ }), React$f.createElement(Emoji$1, {
1483
+ className: classes.fg,
1484
+ __self: this,
1485
+ __source: {
1486
+ fileName: _jsxFileName$d,
1487
+ lineNumber: 63
1488
+ }
1489
+ })),
1490
+ emoji: React$f.createElement(IconRoot, {
1491
+ __self: this,
1492
+ __source: {
1493
+ fileName: _jsxFileName$d,
1494
+ lineNumber: 67
1495
+ }
1496
+ }, React$f.createElement(Octagon, {
1497
+ className: classes.bg,
1498
+ __self: this,
1499
+ __source: {
1500
+ fileName: _jsxFileName$d,
1501
+ lineNumber: 68
1502
+ }
1503
+ }), React$f.createElement(Emoji$1, {
1504
+ className: classes.fg,
1505
+ __self: this,
1506
+ __source: {
1507
+ fileName: _jsxFileName$d,
1508
+ lineNumber: 69
1509
+ }
1510
+ })),
1511
+ square: {
1512
+ check: React$f.createElement(IconRoot, {
1513
+ __self: this,
1514
+ __source: {
1515
+ fileName: _jsxFileName$d,
1516
+ lineNumber: 74
1517
+ }
1518
+ }, React$f.createElement(Octagon, {
1519
+ className: classes.bg,
1520
+ __self: this,
1521
+ __source: {
1522
+ fileName: _jsxFileName$d,
1523
+ lineNumber: 75
1524
+ }
1525
+ }), React$f.createElement(Exclamation, {
1526
+ className: classes.fg,
1527
+ __self: this,
1528
+ __source: {
1529
+ fileName: _jsxFileName$d,
1530
+ lineNumber: 76
1531
+ }
1532
+ })),
1533
+ emoji: React$f.createElement(IconRoot, {
1534
+ __self: this,
1535
+ __source: {
1536
+ fileName: _jsxFileName$d,
1537
+ lineNumber: 80
1538
+ }
1539
+ }, React$f.createElement(Octagon, {
1540
+ className: classes.bg,
1541
+ __self: this,
1542
+ __source: {
1543
+ fileName: _jsxFileName$d,
1544
+ lineNumber: 81
1545
+ }
1546
+ }), React$f.createElement(Emoji$1, {
1547
+ className: classes.fg,
1548
+ __self: this,
1549
+ __source: {
1550
+ fileName: _jsxFileName$d,
1551
+ lineNumber: 82
1552
+ }
1553
+ })),
1554
+ open: {
1555
+ check: React$f.createElement(IconRoot, {
1556
+ __self: this,
1557
+ __source: {
1558
+ fileName: _jsxFileName$d,
1559
+ lineNumber: 87
1560
+ }
1561
+ }, React$f.createElement(Exclamation, {
1562
+ className: classes.bg,
1563
+ __self: this,
1564
+ __source: {
1565
+ fileName: _jsxFileName$d,
1566
+ lineNumber: 88
1567
+ }
1568
+ })),
1569
+ emoji: React$f.createElement(IconRoot, {
1570
+ __self: this,
1571
+ __source: {
1572
+ fileName: _jsxFileName$d,
1573
+ lineNumber: 92
1574
+ }
1575
+ }, React$f.createElement(Emoji$1, {
1576
+ className: classes.bg,
1577
+ __self: this,
1578
+ __source: {
1579
+ fileName: _jsxFileName$d,
1580
+ lineNumber: 93
1581
+ }
1582
+ }))
1583
+ }
1584
+ }
1585
+ }
1586
+ };
1587
+ }
1588
+ render() {
1589
+ if (this.props.category === undefined) {
1590
+ return this.icons[this.props.iconSet];
1591
+ } else {
1592
+ if (this.props.shape === undefined) {
1593
+ return this.icons.feedback[this.props.iconSet];
1594
+ } else {
1595
+ if (this.props.open === true) {
1596
+ return this.icons.feedback.square.open[this.props.iconSet];
1597
+ } else {
1598
+ return this.icons.feedback.square[this.props.iconSet];
1599
+ }
1600
+ }
1601
+ }
1602
+ }
1603
+ }
1604
+ NothingSubmitted.__initStatic();
1605
+ NothingSubmitted.propTypes = {
1606
+ iconSet: PropTypes$h.oneOf(['emoji', 'check', undefined]),
1607
+ shape: PropTypes$h.oneOf(['square', undefined]),
1608
+ category: PropTypes$h.oneOf(['feedback', undefined]),
1609
+ open: PropTypes$h.bool
1610
+ };
1611
+ NothingSubmitted.defaultProps = {
1612
+ iconSet: 'check',
1613
+ shape: undefined,
1614
+ category: undefined,
1615
+ open: false
1616
+ };
1617
+ var nothingSubmittedIcon = withStyles$c(styles$7)(NothingSubmitted);
1618
+ const PropTypes$g = _dll_prop_types;
1619
+ const React$e = _dll_react;
1620
+ const {withStyles: withStyles$b} = _dll_material_ui__core_styles;
1621
+ const _jsxFileName$c = "/home/circleci/repo/node_modules/@pie-lib/icons/src/partially-correct-icon.jsx";
1622
+ const styles$6 = getStyles('partially-correct', '#4aaf46', '#c1e1ac');
1623
+ const Check = ({className}) => React$e.createElement('g', {
1624
+ transform: 'translate(0, 0)',
1625
+ __self: undefined,
1626
+ __source: {
1627
+ fileName: _jsxFileName$c,
1628
+ lineNumber: 10
1629
+ }
1630
+ }, React$e.createElement('polygon', {
1631
+ className: className,
1632
+ points: "27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6",
1633
+ __self: undefined,
1634
+ __source: {
1635
+ fileName: _jsxFileName$c,
1636
+ lineNumber: 11
1637
+ }
1638
+ }), React$e.createElement('polygon', {
1639
+ className: className,
1640
+ points: "16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3",
1641
+ __self: undefined,
1642
+ __source: {
1643
+ fileName: _jsxFileName$c,
1644
+ lineNumber: 12
1645
+ }
1646
+ }));
1647
+ const Emoji = ({className}) => React$e.createElement('g', {
1648
+ transform: 'translate(2, 0)',
1649
+ __self: undefined,
1650
+ __source: {
1651
+ fileName: _jsxFileName$c,
1652
+ lineNumber: 17
1653
+ }
1654
+ }, React$e.createElement('rect', {
1655
+ x: "20.6",
1656
+ y: "11.8",
1657
+ className: className,
1658
+ width: "4",
1659
+ height: "5",
1660
+ __self: undefined,
1661
+ __source: {
1662
+ fileName: _jsxFileName$c,
1663
+ lineNumber: 18
1664
+ }
1665
+ }), React$e.createElement('rect', {
1666
+ x: "11.5",
1667
+ y: "11.8",
1668
+ className: className,
1669
+ width: "4",
1670
+ height: "5",
1671
+ __self: undefined,
1672
+ __source: {
1673
+ fileName: _jsxFileName$c,
1674
+ lineNumber: 19
1675
+ }
1676
+ }), React$e.createElement('rect', {
1677
+ x: "10.9",
1678
+ y: "22.9",
1679
+ transform: "matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)",
1680
+ className: className,
1681
+ width: "14.3",
1682
+ height: "3.7",
1683
+ __self: undefined,
1684
+ __source: {
1685
+ fileName: _jsxFileName$c,
1686
+ lineNumber: 20
1687
+ }
1688
+ }));
1689
+ Emoji.propTypes = Check.propTypes = {
1690
+ className: PropTypes$g.string
1691
+ };
1692
+ const PartiallyCorrect = IconBase(Check, Emoji);
1693
+ PartiallyCorrect.propTypes = {
1694
+ iconSet: PropTypes$g.oneOf(['emoji', 'check']),
1695
+ shape: PropTypes$g.oneOf(['round', 'square']),
1696
+ category: PropTypes$g.oneOf(['feedback', undefined]),
1697
+ open: PropTypes$g.bool
1698
+ };
1699
+ PartiallyCorrect.defaultProps = {
1700
+ iconSet: 'check',
1701
+ shape: 'round',
1702
+ category: undefined,
1703
+ open: false
1704
+ };
1705
+ var partiallyCorrectIcon = withStyles$b(styles$6)(PartiallyCorrect);
1706
+ const PropTypes$f = _dll_prop_types;
1707
+ const React$d = _dll_react;
1708
+ const {withStyles: withStyles$a} = _dll_material_ui__core_styles;
1709
+ const _jsxFileName$b = "/home/circleci/repo/node_modules/@pie-lib/icons/src/show-rationale-icon.jsx";
1710
+ const Info = ({fg}) => React$d.createElement('g', {
1711
+ __self: undefined,
1712
+ __source: {
1713
+ fileName: _jsxFileName$b,
1714
+ lineNumber: 7
1715
+ }
1716
+ }, React$d.createElement('rect', {
1717
+ x: "-115",
1718
+ y: "136.7",
1719
+ className: fg,
1720
+ width: "3",
1721
+ height: "3",
1722
+ __self: undefined,
1723
+ __source: {
1724
+ fileName: _jsxFileName$b,
1725
+ lineNumber: 8
1726
+ }
1727
+ }), React$d.createElement('polygon', {
1728
+ className: fg,
1729
+ points: "-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",
1730
+ __self: undefined,
1731
+ __source: {
1732
+ fileName: _jsxFileName$b,
1733
+ lineNumber: 9
1734
+ }
1735
+ }));
1736
+ Info.propTypes = {
1737
+ fg: PropTypes$f.string
1738
+ };
1739
+ const Border = ({className}) => React$d.createElement('path', {
1740
+ className: className,
1741
+ d: "M-113,158.5c-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,158.5-113,158.5zM-113,130.5c-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-105.6,130.5-113,130.5z",
1742
+ __self: undefined,
1743
+ __source: {
1744
+ fileName: _jsxFileName$b,
1745
+ lineNumber: 21
1746
+ }
1747
+ });
1748
+ Border.propTypes = {
1749
+ className: PropTypes$f.string
1750
+ };
1751
+ const Circle = () => React$d.createElement('g', {
1752
+ __self: undefined,
1753
+ __source: {
1754
+ fileName: _jsxFileName$b,
1755
+ lineNumber: 30
1756
+ }
1757
+ }, React$d.createElement('path', {
1758
+ style: {
1759
+ fill: '#D0CAC5',
1760
+ stroke: '#E6E3E0',
1761
+ strokeWidth: 0.75,
1762
+ strokeMiterlimit: 10
1763
+ },
1764
+ d: "M-111.7,160.9c-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.5C-96.2,154-103.1,160.9-111.7,160.9z",
1765
+ __self: undefined,
1766
+ __source: {
1767
+ fileName: _jsxFileName$b,
1768
+ lineNumber: 31
1769
+ }
1770
+ }), React$d.createElement('path', {
1771
+ style: {
1772
+ fill: '#B3ABA4',
1773
+ stroke: '#CDC7C2',
1774
+ strokeWidth: 0.5,
1775
+ strokeMiterlimit: 10
1776
+ },
1777
+ d: "M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z",
1778
+ __self: undefined,
1779
+ __source: {
1780
+ fileName: _jsxFileName$b,
1781
+ lineNumber: 40
1782
+ }
1783
+ }), React$d.createElement('circle', {
1784
+ style: {
1785
+ fill: '#FFFFFF'
1786
+ },
1787
+ cx: "-113",
1788
+ cy: "144",
1789
+ r: "14",
1790
+ __self: undefined,
1791
+ __source: {
1792
+ fileName: _jsxFileName$b,
1793
+ lineNumber: 49
1794
+ }
1795
+ }));
1796
+ const Root = ({children, size}) => {
1797
+ size = normalizeSize(size);
1798
+ const style = {
1799
+ height: size,
1800
+ width: size,
1801
+ display: 'inline-block',
1802
+ position: 'relative'
1803
+ };
1804
+ return React$d.createElement('div', {
1805
+ style: style,
1806
+ __self: undefined,
1807
+ __source: {
1808
+ fileName: _jsxFileName$b,
1809
+ lineNumber: 63
1810
+ }
1811
+ }, React$d.createElement('svg', {
1812
+ preserveAspectRatio: "xMinYMin meet",
1813
+ viewBox: "-129 128 34 34",
1814
+ __self: undefined,
1815
+ __source: {
1816
+ fileName: _jsxFileName$b,
1817
+ lineNumber: 64
1818
+ }
1819
+ }, children));
7
1820
  };
8
- const {HorizontalKeypad: HorizontalKeypad$1} = _dll_pie_lib__math_input;
9
- const {mq: mq$3} = _dll_pie_lib__math_input;
10
- const {updateSpans: updateSpans$1} = _dll_pie_lib__math_input;
11
- const React$6 = _dll_react;
12
- const debug$2 = _dll_debug;
13
- const PropTypes$5 = _dll_prop_types;
14
- const cx$3 = _dll_classnames;
15
- const {Button: Button} = _dll_material_ui__core;
16
- const {MenuItem: MenuItem} = _dll_material_ui__core;
17
- const {Select: Select} = _dll_material_ui__core;
18
- const {withStyles: withStyles$5} = _dll_material_ui__core_styles;
19
- const {color: color$2} = _dll_pie_lib__render_ui;
20
- const {InputContainer: InputContainer} = _dll_pie_lib__render_ui;
21
- const _jsxFileName$5 = "/home/circleci/repo/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx";
22
- const log$2 = debug$2('@pie-lib:math-toolbar:editor-and-pad');
23
- const decimalRegex = /\.|,/g;
24
- const toNodeData = data => {
25
- if (!data) {
26
- return;
27
- }
28
- const {type, value} = data;
29
- if (type === 'command' || type === 'cursor') {
30
- return data;
31
- } else if (type === 'answer') {
32
- return {
33
- type: 'answer',
34
- ...data
35
- };
36
- } else if (value === 'clear') {
37
- return {
38
- type: 'clear'
39
- };
40
- } else {
41
- return {
42
- type: 'write',
43
- value
44
- };
1821
+ Root.propTypes = {
1822
+ children: PropTypes$f.oneOfType([PropTypes$f.arrayOf(PropTypes$f.node), PropTypes$f.node]).isRequired,
1823
+ size: PropTypes$f.number
1824
+ };
1825
+ const styles$5 = {
1826
+ fg: {
1827
+ fill: '#1a9cff'
1828
+ },
1829
+ bg: {
1830
+ fill: '#bce2ff'
1831
+ },
1832
+ border: {
1833
+ fill: '#bbe3fd'
1834
+ },
1835
+ whiteBorder: {
1836
+ fill: 'white'
45
1837
  }
46
1838
  };
47
- class EditorAndPad extends React$6.Component {
1839
+ class ShowRationale extends React$d.Component {
48
1840
  static __initStatic() {
49
1841
  this.propTypes = {
50
- classNames: PropTypes$5.object,
51
- keypadMode: PropTypes$5.oneOfType([PropTypes$5.string, PropTypes$5.number]),
52
- autoFocus: PropTypes$5.bool,
53
- allowAnswerBlock: PropTypes$5.bool,
54
- showKeypad: PropTypes$5.bool,
55
- controlledKeypad: PropTypes$5.bool,
56
- controlledKeypadMode: PropTypes$5.bool,
57
- noDecimal: PropTypes$5.bool,
58
- additionalKeys: PropTypes$5.array,
59
- latex: PropTypes$5.string.isRequired,
60
- onAnswerBlockAdd: PropTypes$5.func,
61
- onFocus: PropTypes$5.func,
62
- onBlur: PropTypes$5.func,
63
- onChange: PropTypes$5.func.isRequired,
64
- classes: PropTypes$5.object
1842
+ classes: PropTypes$f.object.isRequired
65
1843
  };
66
1844
  }
67
1845
  constructor(props) {
68
1846
  super(props);
69
- EditorAndPad.prototype.__init.call(this);
70
- EditorAndPad.prototype.__init2.call(this);
71
- EditorAndPad.prototype.__init3.call(this);
72
- EditorAndPad.prototype.__init4.call(this);
73
- EditorAndPad.prototype.__init5.call(this);
74
- EditorAndPad.prototype.__init6.call(this);
75
- this.state = {
76
- equationEditor: 'item-authoring',
77
- addDisabled: false
1847
+ }
1848
+ render() {
1849
+ const {classes} = this.props;
1850
+ const info = React$d.createElement(Info, {
1851
+ fg: classes.fg,
1852
+ __self: this,
1853
+ __source: {
1854
+ fileName: _jsxFileName$b,
1855
+ lineNumber: 102
1856
+ }
1857
+ });
1858
+ const icons = {
1859
+ check: React$d.createElement(Root, {
1860
+ __self: this,
1861
+ __source: {
1862
+ fileName: _jsxFileName$b,
1863
+ lineNumber: 105
1864
+ }
1865
+ }, React$d.createElement(Circle, {
1866
+ __self: this,
1867
+ __source: {
1868
+ fileName: _jsxFileName$b,
1869
+ lineNumber: 106
1870
+ }
1871
+ }), info, React$d.createElement(Border, {
1872
+ className: classes.border,
1873
+ __self: this,
1874
+ __source: {
1875
+ fileName: _jsxFileName$b,
1876
+ lineNumber: 108
1877
+ }
1878
+ })),
1879
+ emoji: React$d.createElement(Root, {
1880
+ __self: this,
1881
+ __source: {
1882
+ fileName: _jsxFileName$b,
1883
+ lineNumber: 112
1884
+ }
1885
+ }, React$d.createElement(Circle, {
1886
+ __self: this,
1887
+ __source: {
1888
+ fileName: _jsxFileName$b,
1889
+ lineNumber: 113
1890
+ }
1891
+ }), info, React$d.createElement(Border, {
1892
+ className: classes.border,
1893
+ __self: this,
1894
+ __source: {
1895
+ fileName: _jsxFileName$b,
1896
+ lineNumber: 115
1897
+ }
1898
+ })),
1899
+ open: {
1900
+ check: React$d.createElement(Root, {
1901
+ __self: this,
1902
+ __source: {
1903
+ fileName: _jsxFileName$b,
1904
+ lineNumber: 120
1905
+ }
1906
+ }, React$d.createElement('circle', {
1907
+ style: {
1908
+ fill: '#FFFFFF'
1909
+ },
1910
+ cx: "-113",
1911
+ cy: "144",
1912
+ r: "14",
1913
+ __self: this,
1914
+ __source: {
1915
+ fileName: _jsxFileName$b,
1916
+ lineNumber: 121
1917
+ }
1918
+ }), React$d.createElement(Info, {
1919
+ fg: classes.bg,
1920
+ border: classes.whiteBorder,
1921
+ __self: this,
1922
+ __source: {
1923
+ fileName: _jsxFileName$b,
1924
+ lineNumber: 122
1925
+ }
1926
+ })),
1927
+ emoji: React$d.createElement(Root, {
1928
+ __self: this,
1929
+ __source: {
1930
+ fileName: _jsxFileName$b,
1931
+ lineNumber: 126
1932
+ }
1933
+ }, React$d.createElement('circle', {
1934
+ style: {
1935
+ fill: '#FFFFFF'
1936
+ },
1937
+ cx: "-113",
1938
+ cy: "144",
1939
+ r: "14",
1940
+ __self: this,
1941
+ __source: {
1942
+ fileName: _jsxFileName$b,
1943
+ lineNumber: 127
1944
+ }
1945
+ }), React$d.createElement(Info, {
1946
+ fg: classes.bg,
1947
+ border: classes.border,
1948
+ __self: this,
1949
+ __source: {
1950
+ fileName: _jsxFileName$b,
1951
+ lineNumber: 128
1952
+ }
1953
+ }))
1954
+ }
1955
+ };
1956
+ if (this.props.open === true) {
1957
+ return icons.open[this.props.iconSet];
1958
+ } else {
1959
+ return icons[this.props.iconSet];
1960
+ }
1961
+ }
1962
+ }
1963
+ ShowRationale.__initStatic();
1964
+ ShowRationale.propTypes = {
1965
+ iconSet: PropTypes$f.oneOf(['emoji', 'check']),
1966
+ open: PropTypes$f.bool
1967
+ };
1968
+ ShowRationale.defaultProps = {
1969
+ iconSet: 'check',
1970
+ open: false
1971
+ };
1972
+ withStyles$a(styles$5)(ShowRationale);
1973
+ function getDefaultExportFromCjs(x) {
1974
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1975
+ }
1976
+ function getAugmentedNamespace(n) {
1977
+ if (n.__esModule) return n;
1978
+ var a = Object.defineProperty({}, '__esModule', {
1979
+ value: true
1980
+ });
1981
+ Object.keys(n).forEach(function (k) {
1982
+ var d = Object.getOwnPropertyDescriptor(n, k);
1983
+ Object.defineProperty(a, k, d.get ? d : {
1984
+ enumerable: true,
1985
+ get: function () {
1986
+ return n[k];
1987
+ }
1988
+ });
1989
+ });
1990
+ return a;
1991
+ }
1992
+ var CSSTransition$1 = {
1993
+ exports: {}
1994
+ };
1995
+ var addClass = {
1996
+ exports: {}
1997
+ };
1998
+ var interopRequireDefault = {
1999
+ exports: {}
2000
+ };
2001
+ (function (module) {
2002
+ function _interopRequireDefault(obj) {
2003
+ return obj && obj.__esModule ? obj : {
2004
+ "default": obj
2005
+ };
2006
+ }
2007
+ (module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports);
2008
+ })(interopRequireDefault);
2009
+ getDefaultExportFromCjs(interopRequireDefault.exports);
2010
+ var hasClass = {
2011
+ exports: {}
2012
+ };
2013
+ (function (module, exports) {
2014
+ exports.__esModule = true;
2015
+ exports.default = hasClass;
2016
+ function hasClass(element, className) {
2017
+ if (element.classList) return !!className && element.classList.contains(className); else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
2018
+ }
2019
+ module.exports = exports["default"];
2020
+ })(hasClass, hasClass.exports);
2021
+ getDefaultExportFromCjs(hasClass.exports);
2022
+ (function (module, exports) {
2023
+ var _interopRequireDefault = interopRequireDefault.exports;
2024
+ exports.__esModule = true;
2025
+ exports.default = addClass;
2026
+ var _hasClass = _interopRequireDefault(hasClass.exports);
2027
+ function addClass(element, className) {
2028
+ if (element.classList) element.classList.add(className); else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className; else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
2029
+ }
2030
+ module.exports = exports["default"];
2031
+ })(addClass, addClass.exports);
2032
+ getDefaultExportFromCjs(addClass.exports);
2033
+ function replaceClassName(origClass, classToRemove) {
2034
+ return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
2035
+ }
2036
+ var removeClass = function removeClass(element, className) {
2037
+ if (element.classList) element.classList.remove(className); else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className); else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
2038
+ };
2039
+ var Transition$1 = {};
2040
+ function componentWillMount() {
2041
+ var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
2042
+ if (state !== null && state !== undefined) {
2043
+ this.setState(state);
2044
+ }
2045
+ }
2046
+ function componentWillReceiveProps(nextProps) {
2047
+ function updater(prevState) {
2048
+ var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
2049
+ return state !== null && state !== undefined ? state : null;
2050
+ }
2051
+ this.setState(updater.bind(this));
2052
+ }
2053
+ function componentWillUpdate(nextProps, nextState) {
2054
+ try {
2055
+ var prevProps = this.props;
2056
+ var prevState = this.state;
2057
+ this.props = nextProps;
2058
+ this.state = nextState;
2059
+ this.__reactInternalSnapshotFlag = true;
2060
+ this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
2061
+ } finally {
2062
+ this.props = prevProps;
2063
+ this.state = prevState;
2064
+ }
2065
+ }
2066
+ componentWillMount.__suppressDeprecationWarning = true;
2067
+ componentWillReceiveProps.__suppressDeprecationWarning = true;
2068
+ componentWillUpdate.__suppressDeprecationWarning = true;
2069
+ function polyfill(Component) {
2070
+ var prototype = Component.prototype;
2071
+ if (!prototype || !prototype.isReactComponent) {
2072
+ throw new Error('Can only polyfill class components');
2073
+ }
2074
+ if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
2075
+ return Component;
2076
+ }
2077
+ var foundWillMountName = null;
2078
+ var foundWillReceivePropsName = null;
2079
+ var foundWillUpdateName = null;
2080
+ if (typeof prototype.componentWillMount === 'function') {
2081
+ foundWillMountName = 'componentWillMount';
2082
+ } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
2083
+ foundWillMountName = 'UNSAFE_componentWillMount';
2084
+ }
2085
+ if (typeof prototype.componentWillReceiveProps === 'function') {
2086
+ foundWillReceivePropsName = 'componentWillReceiveProps';
2087
+ } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
2088
+ foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
2089
+ }
2090
+ if (typeof prototype.componentWillUpdate === 'function') {
2091
+ foundWillUpdateName = 'componentWillUpdate';
2092
+ } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
2093
+ foundWillUpdateName = 'UNSAFE_componentWillUpdate';
2094
+ }
2095
+ if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
2096
+ var componentName = Component.displayName || Component.name;
2097
+ var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
2098
+ throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks');
2099
+ }
2100
+ if (typeof Component.getDerivedStateFromProps === 'function') {
2101
+ prototype.componentWillMount = componentWillMount;
2102
+ prototype.componentWillReceiveProps = componentWillReceiveProps;
2103
+ }
2104
+ if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
2105
+ if (typeof prototype.componentDidUpdate !== 'function') {
2106
+ throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
2107
+ }
2108
+ prototype.componentWillUpdate = componentWillUpdate;
2109
+ var componentDidUpdate = prototype.componentDidUpdate;
2110
+ prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
2111
+ var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
2112
+ componentDidUpdate.call(this, prevProps, prevState, snapshot);
2113
+ };
2114
+ }
2115
+ return Component;
2116
+ }
2117
+ var reactLifecyclesCompat_es = Object.freeze({
2118
+ __proto__: null,
2119
+ polyfill: polyfill
2120
+ });
2121
+ var require$$2$2 = getAugmentedNamespace(reactLifecyclesCompat_es);
2122
+ var PropTypes$e = {};
2123
+ const require$$0$5 = _dll_prop_types;
2124
+ PropTypes$e.__esModule = true;
2125
+ PropTypes$e.classNamesShape = PropTypes$e.timeoutsShape = void 0;
2126
+ var _propTypes = _interopRequireDefault$2(require$$0$5);
2127
+ function _interopRequireDefault$2(obj) {
2128
+ return obj && obj.__esModule ? obj : {
2129
+ default: obj
2130
+ };
2131
+ }
2132
+ var timeoutsShape = _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
2133
+ enter: _propTypes.default.number,
2134
+ exit: _propTypes.default.number,
2135
+ appear: _propTypes.default.number
2136
+ }).isRequired]);
2137
+ PropTypes$e.timeoutsShape = timeoutsShape;
2138
+ var classNamesShape = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
2139
+ enter: _propTypes.default.string,
2140
+ exit: _propTypes.default.string,
2141
+ active: _propTypes.default.string
2142
+ }), _propTypes.default.shape({
2143
+ enter: _propTypes.default.string,
2144
+ enterDone: _propTypes.default.string,
2145
+ enterActive: _propTypes.default.string,
2146
+ exit: _propTypes.default.string,
2147
+ exitDone: _propTypes.default.string,
2148
+ exitActive: _propTypes.default.string
2149
+ })]);
2150
+ PropTypes$e.classNamesShape = classNamesShape;
2151
+ const require$$0$4 = _dll_prop_types;
2152
+ const require$$1$2 = _dll_react;
2153
+ const require$$2$1 = _dll_react_dom;
2154
+ Transition$1.__esModule = true;
2155
+ Transition$1.default = Transition$1.EXITING = Transition$1.ENTERED = Transition$1.ENTERING = Transition$1.EXITED = Transition$1.UNMOUNTED = void 0;
2156
+ var PropTypes$d = _interopRequireWildcard(require$$0$4);
2157
+ var _react$1 = _interopRequireDefault$1(require$$1$2);
2158
+ var _reactDom = _interopRequireDefault$1(require$$2$1);
2159
+ var _reactLifecyclesCompat = require$$2$2;
2160
+ var _PropTypes = PropTypes$e;
2161
+ function _interopRequireDefault$1(obj) {
2162
+ return obj && obj.__esModule ? obj : {
2163
+ default: obj
2164
+ };
2165
+ }
2166
+ function _interopRequireWildcard(obj) {
2167
+ if (obj && obj.__esModule) {
2168
+ return obj;
2169
+ } else {
2170
+ var newObj = {};
2171
+ if (obj != null) {
2172
+ for (var key in obj) {
2173
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
2174
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
2175
+ if (desc.get || desc.set) {
2176
+ Object.defineProperty(newObj, key, desc);
2177
+ } else {
2178
+ newObj[key] = obj[key];
2179
+ }
2180
+ }
2181
+ }
2182
+ }
2183
+ newObj.default = obj;
2184
+ return newObj;
2185
+ }
2186
+ }
2187
+ function _objectWithoutPropertiesLoose(source, excluded) {
2188
+ if (source == null) return {};
2189
+ var target = {};
2190
+ var sourceKeys = Object.keys(source);
2191
+ var key, i;
2192
+ for (i = 0; i < sourceKeys.length; i++) {
2193
+ key = sourceKeys[i];
2194
+ if (excluded.indexOf(key) >= 0) continue;
2195
+ target[key] = source[key];
2196
+ }
2197
+ return target;
2198
+ }
2199
+ function _inheritsLoose(subClass, superClass) {
2200
+ subClass.prototype = Object.create(superClass.prototype);
2201
+ subClass.prototype.constructor = subClass;
2202
+ subClass.__proto__ = superClass;
2203
+ }
2204
+ var UNMOUNTED = 'unmounted';
2205
+ Transition$1.UNMOUNTED = UNMOUNTED;
2206
+ var EXITED = 'exited';
2207
+ Transition$1.EXITED = EXITED;
2208
+ var ENTERING = 'entering';
2209
+ Transition$1.ENTERING = ENTERING;
2210
+ var ENTERED = 'entered';
2211
+ Transition$1.ENTERED = ENTERED;
2212
+ var EXITING = 'exiting';
2213
+ Transition$1.EXITING = EXITING;
2214
+ var Transition = (function (_React$Component) {
2215
+ _inheritsLoose(Transition, _React$Component);
2216
+ function Transition(props, context) {
2217
+ var _this;
2218
+ _this = _React$Component.call(this, props, context) || this;
2219
+ var parentGroup = context.transitionGroup;
2220
+ var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2221
+ var initialStatus;
2222
+ _this.appearStatus = null;
2223
+ if (props.in) {
2224
+ if (appear) {
2225
+ initialStatus = EXITED;
2226
+ _this.appearStatus = ENTERING;
2227
+ } else {
2228
+ initialStatus = ENTERED;
2229
+ }
2230
+ } else {
2231
+ if (props.unmountOnExit || props.mountOnEnter) {
2232
+ initialStatus = UNMOUNTED;
2233
+ } else {
2234
+ initialStatus = EXITED;
2235
+ }
2236
+ }
2237
+ _this.state = {
2238
+ status: initialStatus
2239
+ };
2240
+ _this.nextCallback = null;
2241
+ return _this;
2242
+ }
2243
+ var _proto = Transition.prototype;
2244
+ _proto.getChildContext = function getChildContext() {
2245
+ return {
2246
+ transitionGroup: null
2247
+ };
2248
+ };
2249
+ Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2250
+ var nextIn = _ref.in;
2251
+ if (nextIn && prevState.status === UNMOUNTED) {
2252
+ return {
2253
+ status: EXITED
2254
+ };
2255
+ }
2256
+ return null;
2257
+ };
2258
+ _proto.componentDidMount = function componentDidMount() {
2259
+ this.updateStatus(true, this.appearStatus);
2260
+ };
2261
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2262
+ var nextStatus = null;
2263
+ if (prevProps !== this.props) {
2264
+ var status = this.state.status;
2265
+ if (this.props.in) {
2266
+ if (status !== ENTERING && status !== ENTERED) {
2267
+ nextStatus = ENTERING;
2268
+ }
2269
+ } else {
2270
+ if (status === ENTERING || status === ENTERED) {
2271
+ nextStatus = EXITING;
2272
+ }
2273
+ }
2274
+ }
2275
+ this.updateStatus(false, nextStatus);
2276
+ };
2277
+ _proto.componentWillUnmount = function componentWillUnmount() {
2278
+ this.cancelNextCallback();
2279
+ };
2280
+ _proto.getTimeouts = function getTimeouts() {
2281
+ var timeout = this.props.timeout;
2282
+ var exit, enter, appear;
2283
+ exit = enter = appear = timeout;
2284
+ if (timeout != null && typeof timeout !== 'number') {
2285
+ exit = timeout.exit;
2286
+ enter = timeout.enter;
2287
+ appear = timeout.appear !== undefined ? timeout.appear : enter;
2288
+ }
2289
+ return {
2290
+ exit: exit,
2291
+ enter: enter,
2292
+ appear: appear
2293
+ };
2294
+ };
2295
+ _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2296
+ if (mounting === void 0) {
2297
+ mounting = false;
2298
+ }
2299
+ if (nextStatus !== null) {
2300
+ this.cancelNextCallback();
2301
+ var node = _reactDom.default.findDOMNode(this);
2302
+ if (nextStatus === ENTERING) {
2303
+ this.performEnter(node, mounting);
2304
+ } else {
2305
+ this.performExit(node);
2306
+ }
2307
+ } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2308
+ this.setState({
2309
+ status: UNMOUNTED
2310
+ });
2311
+ }
2312
+ };
2313
+ _proto.performEnter = function performEnter(node, mounting) {
2314
+ var _this2 = this;
2315
+ var enter = this.props.enter;
2316
+ var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
2317
+ var timeouts = this.getTimeouts();
2318
+ var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
2319
+ if (!mounting && !enter) {
2320
+ this.safeSetState({
2321
+ status: ENTERED
2322
+ }, function () {
2323
+ _this2.props.onEntered(node);
2324
+ });
2325
+ return;
2326
+ }
2327
+ this.props.onEnter(node, appearing);
2328
+ this.safeSetState({
2329
+ status: ENTERING
2330
+ }, function () {
2331
+ _this2.props.onEntering(node, appearing);
2332
+ _this2.onTransitionEnd(node, enterTimeout, function () {
2333
+ _this2.safeSetState({
2334
+ status: ENTERED
2335
+ }, function () {
2336
+ _this2.props.onEntered(node, appearing);
2337
+ });
2338
+ });
2339
+ });
2340
+ };
2341
+ _proto.performExit = function performExit(node) {
2342
+ var _this3 = this;
2343
+ var exit = this.props.exit;
2344
+ var timeouts = this.getTimeouts();
2345
+ if (!exit) {
2346
+ this.safeSetState({
2347
+ status: EXITED
2348
+ }, function () {
2349
+ _this3.props.onExited(node);
2350
+ });
2351
+ return;
2352
+ }
2353
+ this.props.onExit(node);
2354
+ this.safeSetState({
2355
+ status: EXITING
2356
+ }, function () {
2357
+ _this3.props.onExiting(node);
2358
+ _this3.onTransitionEnd(node, timeouts.exit, function () {
2359
+ _this3.safeSetState({
2360
+ status: EXITED
2361
+ }, function () {
2362
+ _this3.props.onExited(node);
2363
+ });
2364
+ });
2365
+ });
2366
+ };
2367
+ _proto.cancelNextCallback = function cancelNextCallback() {
2368
+ if (this.nextCallback !== null) {
2369
+ this.nextCallback.cancel();
2370
+ this.nextCallback = null;
2371
+ }
2372
+ };
2373
+ _proto.safeSetState = function safeSetState(nextState, callback) {
2374
+ callback = this.setNextCallback(callback);
2375
+ this.setState(nextState, callback);
2376
+ };
2377
+ _proto.setNextCallback = function setNextCallback(callback) {
2378
+ var _this4 = this;
2379
+ var active = true;
2380
+ this.nextCallback = function (event) {
2381
+ if (active) {
2382
+ active = false;
2383
+ _this4.nextCallback = null;
2384
+ callback(event);
2385
+ }
2386
+ };
2387
+ this.nextCallback.cancel = function () {
2388
+ active = false;
2389
+ };
2390
+ return this.nextCallback;
2391
+ };
2392
+ _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
2393
+ this.setNextCallback(handler);
2394
+ var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2395
+ if (!node || doesNotHaveTimeoutOrListener) {
2396
+ setTimeout(this.nextCallback, 0);
2397
+ return;
2398
+ }
2399
+ if (this.props.addEndListener) {
2400
+ this.props.addEndListener(node, this.nextCallback);
2401
+ }
2402
+ if (timeout != null) {
2403
+ setTimeout(this.nextCallback, timeout);
2404
+ }
2405
+ };
2406
+ _proto.render = function render() {
2407
+ var status = this.state.status;
2408
+ if (status === UNMOUNTED) {
2409
+ return null;
2410
+ }
2411
+ var _this$props = this.props, children = _this$props.children, childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]);
2412
+ delete childProps.in;
2413
+ delete childProps.mountOnEnter;
2414
+ delete childProps.unmountOnExit;
2415
+ delete childProps.appear;
2416
+ delete childProps.enter;
2417
+ delete childProps.exit;
2418
+ delete childProps.timeout;
2419
+ delete childProps.addEndListener;
2420
+ delete childProps.onEnter;
2421
+ delete childProps.onEntering;
2422
+ delete childProps.onEntered;
2423
+ delete childProps.onExit;
2424
+ delete childProps.onExiting;
2425
+ delete childProps.onExited;
2426
+ if (typeof children === 'function') {
2427
+ return children(status, childProps);
2428
+ }
2429
+ var child = _react$1.default.Children.only(children);
2430
+ return _react$1.default.cloneElement(child, childProps);
2431
+ };
2432
+ return Transition;
2433
+ })(_react$1.default.Component);
2434
+ Transition.contextTypes = {
2435
+ transitionGroup: PropTypes$d.object
2436
+ };
2437
+ Transition.childContextTypes = {
2438
+ transitionGroup: function transitionGroup() {}
2439
+ };
2440
+ Transition.propTypes = {
2441
+ children: PropTypes$d.oneOfType([PropTypes$d.func.isRequired, PropTypes$d.element.isRequired]).isRequired,
2442
+ in: PropTypes$d.bool,
2443
+ mountOnEnter: PropTypes$d.bool,
2444
+ unmountOnExit: PropTypes$d.bool,
2445
+ appear: PropTypes$d.bool,
2446
+ enter: PropTypes$d.bool,
2447
+ exit: PropTypes$d.bool,
2448
+ timeout: function timeout(props) {
2449
+ var pt = _PropTypes.timeoutsShape;
2450
+ if (!props.addEndListener) pt = pt.isRequired;
2451
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2452
+ args[_key - 1] = arguments[_key];
2453
+ }
2454
+ return pt.apply(void 0, [props].concat(args));
2455
+ },
2456
+ addEndListener: PropTypes$d.func,
2457
+ onEnter: PropTypes$d.func,
2458
+ onEntering: PropTypes$d.func,
2459
+ onEntered: PropTypes$d.func,
2460
+ onExit: PropTypes$d.func,
2461
+ onExiting: PropTypes$d.func,
2462
+ onExited: PropTypes$d.func
2463
+ };
2464
+ function noop() {}
2465
+ Transition.defaultProps = {
2466
+ in: false,
2467
+ mountOnEnter: false,
2468
+ unmountOnExit: false,
2469
+ appear: false,
2470
+ enter: true,
2471
+ exit: true,
2472
+ onEnter: noop,
2473
+ onEntering: noop,
2474
+ onEntered: noop,
2475
+ onExit: noop,
2476
+ onExiting: noop,
2477
+ onExited: noop
2478
+ };
2479
+ Transition.UNMOUNTED = 0;
2480
+ Transition.EXITED = 1;
2481
+ Transition.ENTERING = 2;
2482
+ Transition.ENTERED = 3;
2483
+ Transition.EXITING = 4;
2484
+ var _default = (0, _reactLifecyclesCompat.polyfill)(Transition);
2485
+ Transition$1.default = _default;
2486
+ const require$$0$3 = _dll_prop_types;
2487
+ const require$$3 = _dll_react;
2488
+ (function (module, exports) {
2489
+ exports.__esModule = true;
2490
+ exports.default = void 0;
2491
+ var PropTypes = _interopRequireWildcard(require$$0$3);
2492
+ var _addClass = _interopRequireDefault(addClass.exports);
2493
+ var _removeClass = _interopRequireDefault(removeClass);
2494
+ var _react = _interopRequireDefault(require$$3);
2495
+ var _Transition = _interopRequireDefault(Transition$1);
2496
+ var _PropTypes = PropTypes$e;
2497
+ function _interopRequireDefault(obj) {
2498
+ return obj && obj.__esModule ? obj : {
2499
+ default: obj
2500
+ };
2501
+ }
2502
+ function _interopRequireWildcard(obj) {
2503
+ if (obj && obj.__esModule) {
2504
+ return obj;
2505
+ } else {
2506
+ var newObj = {};
2507
+ if (obj != null) {
2508
+ for (var key in obj) {
2509
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
2510
+ var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
2511
+ if (desc.get || desc.set) {
2512
+ Object.defineProperty(newObj, key, desc);
2513
+ } else {
2514
+ newObj[key] = obj[key];
2515
+ }
2516
+ }
2517
+ }
2518
+ }
2519
+ newObj.default = obj;
2520
+ return newObj;
2521
+ }
2522
+ }
2523
+ function _extends() {
2524
+ _extends = Object.assign || (function (target) {
2525
+ for (var i = 1; i < arguments.length; i++) {
2526
+ var source = arguments[i];
2527
+ for (var key in source) {
2528
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
2529
+ target[key] = source[key];
2530
+ }
2531
+ }
2532
+ }
2533
+ return target;
2534
+ });
2535
+ return _extends.apply(this, arguments);
2536
+ }
2537
+ function _inheritsLoose(subClass, superClass) {
2538
+ subClass.prototype = Object.create(superClass.prototype);
2539
+ subClass.prototype.constructor = subClass;
2540
+ subClass.__proto__ = superClass;
2541
+ }
2542
+ var addClass$1 = function addClass(node, classes) {
2543
+ return node && classes && classes.split(' ').forEach(function (c) {
2544
+ return (0, _addClass.default)(node, c);
2545
+ });
2546
+ };
2547
+ var removeClass$1 = function removeClass(node, classes) {
2548
+ return node && classes && classes.split(' ').forEach(function (c) {
2549
+ return (0, _removeClass.default)(node, c);
2550
+ });
2551
+ };
2552
+ var CSSTransition = (function (_React$Component) {
2553
+ _inheritsLoose(CSSTransition, _React$Component);
2554
+ function CSSTransition() {
2555
+ var _this;
2556
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2557
+ args[_key] = arguments[_key];
2558
+ }
2559
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2560
+ _this.onEnter = function (node, appearing) {
2561
+ var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'), className = _this$getClassNames.className;
2562
+ _this.removeClasses(node, 'exit');
2563
+ addClass$1(node, className);
2564
+ if (_this.props.onEnter) {
2565
+ _this.props.onEnter(node, appearing);
2566
+ }
2567
+ };
2568
+ _this.onEntering = function (node, appearing) {
2569
+ var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'), activeClassName = _this$getClassNames2.activeClassName;
2570
+ _this.reflowAndAddClass(node, activeClassName);
2571
+ if (_this.props.onEntering) {
2572
+ _this.props.onEntering(node, appearing);
2573
+ }
2574
+ };
2575
+ _this.onEntered = function (node, appearing) {
2576
+ var appearClassName = _this.getClassNames('appear').doneClassName;
2577
+ var enterClassName = _this.getClassNames('enter').doneClassName;
2578
+ var doneClassName = appearing ? appearClassName + " " + enterClassName : enterClassName;
2579
+ _this.removeClasses(node, appearing ? 'appear' : 'enter');
2580
+ addClass$1(node, doneClassName);
2581
+ if (_this.props.onEntered) {
2582
+ _this.props.onEntered(node, appearing);
2583
+ }
2584
+ };
2585
+ _this.onExit = function (node) {
2586
+ var _this$getClassNames3 = _this.getClassNames('exit'), className = _this$getClassNames3.className;
2587
+ _this.removeClasses(node, 'appear');
2588
+ _this.removeClasses(node, 'enter');
2589
+ addClass$1(node, className);
2590
+ if (_this.props.onExit) {
2591
+ _this.props.onExit(node);
2592
+ }
2593
+ };
2594
+ _this.onExiting = function (node) {
2595
+ var _this$getClassNames4 = _this.getClassNames('exit'), activeClassName = _this$getClassNames4.activeClassName;
2596
+ _this.reflowAndAddClass(node, activeClassName);
2597
+ if (_this.props.onExiting) {
2598
+ _this.props.onExiting(node);
2599
+ }
2600
+ };
2601
+ _this.onExited = function (node) {
2602
+ var _this$getClassNames5 = _this.getClassNames('exit'), doneClassName = _this$getClassNames5.doneClassName;
2603
+ _this.removeClasses(node, 'exit');
2604
+ addClass$1(node, doneClassName);
2605
+ if (_this.props.onExited) {
2606
+ _this.props.onExited(node);
2607
+ }
2608
+ };
2609
+ _this.getClassNames = function (type) {
2610
+ var classNames = _this.props.classNames;
2611
+ var isStringClassNames = typeof classNames === 'string';
2612
+ var prefix = isStringClassNames && classNames ? classNames + '-' : '';
2613
+ var className = isStringClassNames ? prefix + type : classNames[type];
2614
+ var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active'];
2615
+ var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done'];
2616
+ return {
2617
+ className: className,
2618
+ activeClassName: activeClassName,
2619
+ doneClassName: doneClassName
2620
+ };
2621
+ };
2622
+ return _this;
2623
+ }
2624
+ var _proto = CSSTransition.prototype;
2625
+ _proto.removeClasses = function removeClasses(node, type) {
2626
+ var _this$getClassNames6 = this.getClassNames(type), className = _this$getClassNames6.className, activeClassName = _this$getClassNames6.activeClassName, doneClassName = _this$getClassNames6.doneClassName;
2627
+ className && removeClass$1(node, className);
2628
+ activeClassName && removeClass$1(node, activeClassName);
2629
+ doneClassName && removeClass$1(node, doneClassName);
2630
+ };
2631
+ _proto.reflowAndAddClass = function reflowAndAddClass(node, className) {
2632
+ if (className) {
2633
+ node && node.scrollTop;
2634
+ addClass$1(node, className);
2635
+ }
2636
+ };
2637
+ _proto.render = function render() {
2638
+ var props = _extends({}, this.props);
2639
+ delete props.classNames;
2640
+ return _react.default.createElement(_Transition.default, _extends({}, props, {
2641
+ onEnter: this.onEnter,
2642
+ onEntered: this.onEntered,
2643
+ onEntering: this.onEntering,
2644
+ onExit: this.onExit,
2645
+ onExiting: this.onExiting,
2646
+ onExited: this.onExited
2647
+ }));
2648
+ };
2649
+ return CSSTransition;
2650
+ })(_react.default.Component);
2651
+ CSSTransition.defaultProps = {
2652
+ classNames: ''
2653
+ };
2654
+ CSSTransition.propTypes = _extends({}, _Transition.default.propTypes, {
2655
+ classNames: _PropTypes.classNamesShape,
2656
+ onEnter: PropTypes.func,
2657
+ onEntering: PropTypes.func,
2658
+ onEntered: PropTypes.func,
2659
+ onExit: PropTypes.func,
2660
+ onExiting: PropTypes.func,
2661
+ onExited: PropTypes.func
2662
+ });
2663
+ var _default = CSSTransition;
2664
+ exports.default = _default;
2665
+ module.exports = exports["default"];
2666
+ })(CSSTransition$1, CSSTransition$1.exports);
2667
+ var CSSTransition = getDefaultExportFromCjs(CSSTransition$1.exports);
2668
+ var ReplaceTransition = {
2669
+ exports: {}
2670
+ };
2671
+ var TransitionGroup = {
2672
+ exports: {}
2673
+ };
2674
+ var ChildMapping = {};
2675
+ const require$$0$2 = _dll_react;
2676
+ ChildMapping.__esModule = true;
2677
+ ChildMapping.getChildMapping = getChildMapping;
2678
+ ChildMapping.mergeChildMappings = mergeChildMappings;
2679
+ ChildMapping.getInitialChildMapping = getInitialChildMapping;
2680
+ ChildMapping.getNextChildMapping = getNextChildMapping;
2681
+ var _react = require$$0$2;
2682
+ function getChildMapping(children, mapFn) {
2683
+ var mapper = function mapper(child) {
2684
+ return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;
2685
+ };
2686
+ var result = Object.create(null);
2687
+ if (children) _react.Children.map(children, function (c) {
2688
+ return c;
2689
+ }).forEach(function (child) {
2690
+ result[child.key] = mapper(child);
2691
+ });
2692
+ return result;
2693
+ }
2694
+ function mergeChildMappings(prev, next) {
2695
+ prev = prev || ({});
2696
+ next = next || ({});
2697
+ function getValueForKey(key) {
2698
+ return (key in next) ? next[key] : prev[key];
2699
+ }
2700
+ var nextKeysPending = Object.create(null);
2701
+ var pendingKeys = [];
2702
+ for (var prevKey in prev) {
2703
+ if ((prevKey in next)) {
2704
+ if (pendingKeys.length) {
2705
+ nextKeysPending[prevKey] = pendingKeys;
2706
+ pendingKeys = [];
2707
+ }
2708
+ } else {
2709
+ pendingKeys.push(prevKey);
2710
+ }
2711
+ }
2712
+ var i;
2713
+ var childMapping = {};
2714
+ for (var nextKey in next) {
2715
+ if (nextKeysPending[nextKey]) {
2716
+ for (i = 0; i < nextKeysPending[nextKey].length; i++) {
2717
+ var pendingNextKey = nextKeysPending[nextKey][i];
2718
+ childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
2719
+ }
2720
+ }
2721
+ childMapping[nextKey] = getValueForKey(nextKey);
2722
+ }
2723
+ for (i = 0; i < pendingKeys.length; i++) {
2724
+ childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
2725
+ }
2726
+ return childMapping;
2727
+ }
2728
+ function getProp(child, prop, props) {
2729
+ return props[prop] != null ? props[prop] : child.props[prop];
2730
+ }
2731
+ function getInitialChildMapping(props, onExited) {
2732
+ return getChildMapping(props.children, function (child) {
2733
+ return (0, _react.cloneElement)(child, {
2734
+ onExited: onExited.bind(null, child),
2735
+ in: true,
2736
+ appear: getProp(child, 'appear', props),
2737
+ enter: getProp(child, 'enter', props),
2738
+ exit: getProp(child, 'exit', props)
2739
+ });
2740
+ });
2741
+ }
2742
+ function getNextChildMapping(nextProps, prevChildMapping, onExited) {
2743
+ var nextChildMapping = getChildMapping(nextProps.children);
2744
+ var children = mergeChildMappings(prevChildMapping, nextChildMapping);
2745
+ Object.keys(children).forEach(function (key) {
2746
+ var child = children[key];
2747
+ if (!(0, _react.isValidElement)(child)) return;
2748
+ var hasPrev = (key in prevChildMapping);
2749
+ var hasNext = (key in nextChildMapping);
2750
+ var prevChild = prevChildMapping[key];
2751
+ var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in;
2752
+ if (hasNext && (!hasPrev || isLeaving)) {
2753
+ children[key] = (0, _react.cloneElement)(child, {
2754
+ onExited: onExited.bind(null, child),
2755
+ in: true,
2756
+ exit: getProp(child, 'exit', nextProps),
2757
+ enter: getProp(child, 'enter', nextProps)
2758
+ });
2759
+ } else if (!hasNext && hasPrev && !isLeaving) {
2760
+ children[key] = (0, _react.cloneElement)(child, {
2761
+ in: false
2762
+ });
2763
+ } else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {
2764
+ children[key] = (0, _react.cloneElement)(child, {
2765
+ onExited: onExited.bind(null, child),
2766
+ in: prevChild.props.in,
2767
+ exit: getProp(child, 'exit', nextProps),
2768
+ enter: getProp(child, 'enter', nextProps)
2769
+ });
2770
+ }
2771
+ });
2772
+ return children;
2773
+ }
2774
+ const require$$0$1 = _dll_prop_types;
2775
+ const require$$1$1 = _dll_react;
2776
+ (function (module, exports) {
2777
+ exports.__esModule = true;
2778
+ exports.default = void 0;
2779
+ var _propTypes = _interopRequireDefault(require$$0$1);
2780
+ var _react = _interopRequireDefault(require$$1$1);
2781
+ var _reactLifecyclesCompat = require$$2$2;
2782
+ var _ChildMapping = ChildMapping;
2783
+ function _interopRequireDefault(obj) {
2784
+ return obj && obj.__esModule ? obj : {
2785
+ default: obj
78
2786
  };
79
2787
  }
80
- componentDidMount() {
81
- if (this.input && this.props.autoFocus) {
82
- this.input.focus();
2788
+ function _objectWithoutPropertiesLoose(source, excluded) {
2789
+ if (source == null) return {};
2790
+ var target = {};
2791
+ var sourceKeys = Object.keys(source);
2792
+ var key, i;
2793
+ for (i = 0; i < sourceKeys.length; i++) {
2794
+ key = sourceKeys[i];
2795
+ if (excluded.indexOf(key) >= 0) continue;
2796
+ target[key] = source[key];
83
2797
  }
2798
+ return target;
84
2799
  }
85
- __init() {
86
- this.onClick = data => {
87
- const {noDecimal} = this.props;
88
- const c = toNodeData(data);
89
- log$2('mathChange: ', c);
90
- if (noDecimal && (c.value === '.' || c.value === ',')) {
91
- return;
92
- }
93
- if (c.type === 'clear') {
94
- log$2('call clear...');
95
- this.input.clear();
96
- } else if (c.type === 'command') {
97
- this.input.command(c.value);
98
- } else if (c.type === 'cursor') {
99
- this.input.keystroke(c.value);
100
- } else if (c.type === 'answer') {
101
- this.input.write('%response%');
102
- } else {
103
- this.input.write(c.value);
2800
+ function _extends() {
2801
+ _extends = Object.assign || (function (target) {
2802
+ for (var i = 1; i < arguments.length; i++) {
2803
+ var source = arguments[i];
2804
+ for (var key in source) {
2805
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
2806
+ target[key] = source[key];
2807
+ }
2808
+ }
104
2809
  }
105
- };
2810
+ return target;
2811
+ });
2812
+ return _extends.apply(this, arguments);
106
2813
  }
107
- __init2() {
108
- this.updateDisable = isEdit => {
109
- const {maxResponseAreas} = this.props;
110
- if (maxResponseAreas) {
111
- const shouldDisable = this.checkResponseAreasNumber(maxResponseAreas, isEdit);
112
- this.setState({
113
- addDisabled: shouldDisable
2814
+ function _inheritsLoose(subClass, superClass) {
2815
+ subClass.prototype = Object.create(superClass.prototype);
2816
+ subClass.prototype.constructor = subClass;
2817
+ subClass.__proto__ = superClass;
2818
+ }
2819
+ function _assertThisInitialized(self) {
2820
+ if (self === void 0) {
2821
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2822
+ }
2823
+ return self;
2824
+ }
2825
+ var values = Object.values || (function (obj) {
2826
+ return Object.keys(obj).map(function (k) {
2827
+ return obj[k];
2828
+ });
2829
+ });
2830
+ var defaultProps = {
2831
+ component: 'div',
2832
+ childFactory: function childFactory(child) {
2833
+ return child;
2834
+ }
2835
+ };
2836
+ var TransitionGroup = (function (_React$Component) {
2837
+ _inheritsLoose(TransitionGroup, _React$Component);
2838
+ function TransitionGroup(props, context) {
2839
+ var _this;
2840
+ _this = _React$Component.call(this, props, context) || this;
2841
+ var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this)));
2842
+ _this.state = {
2843
+ handleExited: handleExited,
2844
+ firstRender: true
2845
+ };
2846
+ return _this;
2847
+ }
2848
+ var _proto = TransitionGroup.prototype;
2849
+ _proto.getChildContext = function getChildContext() {
2850
+ return {
2851
+ transitionGroup: {
2852
+ isMounting: !this.appeared
2853
+ }
2854
+ };
2855
+ };
2856
+ _proto.componentDidMount = function componentDidMount() {
2857
+ this.appeared = true;
2858
+ this.mounted = true;
2859
+ };
2860
+ _proto.componentWillUnmount = function componentWillUnmount() {
2861
+ this.mounted = false;
2862
+ };
2863
+ TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
2864
+ var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
2865
+ return {
2866
+ children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),
2867
+ firstRender: false
2868
+ };
2869
+ };
2870
+ _proto.handleExited = function handleExited(child, node) {
2871
+ var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);
2872
+ if ((child.key in currentChildMapping)) return;
2873
+ if (child.props.onExited) {
2874
+ child.props.onExited(node);
2875
+ }
2876
+ if (this.mounted) {
2877
+ this.setState(function (state) {
2878
+ var children = _extends({}, state.children);
2879
+ delete children[child.key];
2880
+ return {
2881
+ children: children
2882
+ };
114
2883
  });
115
2884
  }
116
2885
  };
117
- }
118
- __init3() {
119
- this.onAnswerBlockClick = () => {
120
- this.props.onAnswerBlockAdd();
121
- this.onClick({
122
- type: 'answer'
123
- });
124
- this.updateDisable(true);
125
- };
126
- }
127
- __init4() {
128
- this.onEditorChange = latex => {
129
- const {onChange, noDecimal} = this.props;
130
- updateSpans$1();
131
- this.updateDisable(true);
132
- if (noDecimal && (latex.indexOf('.') !== -1 || latex.indexOf(',') !== -1) && this.input) {
133
- this.input.clear();
134
- this.input.write(latex.replace(decimalRegex, ''));
135
- return;
2886
+ _proto.render = function render() {
2887
+ var _this$props = this.props, Component = _this$props.component, childFactory = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
2888
+ var children = values(this.state.children).map(childFactory);
2889
+ delete props.appear;
2890
+ delete props.enter;
2891
+ delete props.exit;
2892
+ if (Component === null) {
2893
+ return children;
136
2894
  }
137
- onChange(latex);
2895
+ return _react.default.createElement(Component, props, children);
2896
+ };
2897
+ return TransitionGroup;
2898
+ })(_react.default.Component);
2899
+ TransitionGroup.childContextTypes = {
2900
+ transitionGroup: _propTypes.default.object.isRequired
2901
+ };
2902
+ TransitionGroup.propTypes = {
2903
+ component: _propTypes.default.any,
2904
+ children: _propTypes.default.node,
2905
+ appear: _propTypes.default.bool,
2906
+ enter: _propTypes.default.bool,
2907
+ exit: _propTypes.default.bool,
2908
+ childFactory: _propTypes.default.func
2909
+ };
2910
+ TransitionGroup.defaultProps = defaultProps;
2911
+ var _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);
2912
+ exports.default = _default;
2913
+ module.exports = exports["default"];
2914
+ })(TransitionGroup, TransitionGroup.exports);
2915
+ getDefaultExportFromCjs(TransitionGroup.exports);
2916
+ const require$$0 = _dll_prop_types;
2917
+ const require$$1 = _dll_react;
2918
+ const require$$2 = _dll_react_dom;
2919
+ (function (module, exports) {
2920
+ exports.__esModule = true;
2921
+ exports.default = void 0;
2922
+ var _propTypes = _interopRequireDefault(require$$0);
2923
+ var _react = _interopRequireDefault(require$$1);
2924
+ var _reactDom = require$$2;
2925
+ var _TransitionGroup = _interopRequireDefault(TransitionGroup.exports);
2926
+ function _interopRequireDefault(obj) {
2927
+ return obj && obj.__esModule ? obj : {
2928
+ default: obj
138
2929
  };
139
2930
  }
140
- shouldComponentUpdate(nextProps, nextState) {
141
- const inputIsDifferent = this.input.mathField.latex() !== nextProps.latex;
142
- log$2('[shouldComponentUpdate] ', 'inputIsDifferent: ', inputIsDifferent);
143
- if (!inputIsDifferent && this.props.keypadMode !== nextProps.keypadMode) {
144
- return true;
2931
+ function _objectWithoutPropertiesLoose(source, excluded) {
2932
+ if (source == null) return {};
2933
+ var target = {};
2934
+ var sourceKeys = Object.keys(source);
2935
+ var key, i;
2936
+ for (i = 0; i < sourceKeys.length; i++) {
2937
+ key = sourceKeys[i];
2938
+ if (excluded.indexOf(key) >= 0) continue;
2939
+ target[key] = source[key];
145
2940
  }
146
- if (!inputIsDifferent && this.props.noDecimal !== nextProps.noDecimal) {
147
- return true;
2941
+ return target;
2942
+ }
2943
+ function _inheritsLoose(subClass, superClass) {
2944
+ subClass.prototype = Object.create(superClass.prototype);
2945
+ subClass.prototype.constructor = subClass;
2946
+ subClass.__proto__ = superClass;
2947
+ }
2948
+ var ReplaceTransition = (function (_React$Component) {
2949
+ _inheritsLoose(ReplaceTransition, _React$Component);
2950
+ function ReplaceTransition() {
2951
+ var _this;
2952
+ for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
2953
+ _args[_key] = arguments[_key];
2954
+ }
2955
+ _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
2956
+ _this.handleEnter = function () {
2957
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2958
+ args[_key2] = arguments[_key2];
2959
+ }
2960
+ return _this.handleLifecycle('onEnter', 0, args);
2961
+ };
2962
+ _this.handleEntering = function () {
2963
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2964
+ args[_key3] = arguments[_key3];
2965
+ }
2966
+ return _this.handleLifecycle('onEntering', 0, args);
2967
+ };
2968
+ _this.handleEntered = function () {
2969
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2970
+ args[_key4] = arguments[_key4];
2971
+ }
2972
+ return _this.handleLifecycle('onEntered', 0, args);
2973
+ };
2974
+ _this.handleExit = function () {
2975
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
2976
+ args[_key5] = arguments[_key5];
2977
+ }
2978
+ return _this.handleLifecycle('onExit', 1, args);
2979
+ };
2980
+ _this.handleExiting = function () {
2981
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
2982
+ args[_key6] = arguments[_key6];
2983
+ }
2984
+ return _this.handleLifecycle('onExiting', 1, args);
2985
+ };
2986
+ _this.handleExited = function () {
2987
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
2988
+ args[_key7] = arguments[_key7];
2989
+ }
2990
+ return _this.handleLifecycle('onExited', 1, args);
2991
+ };
2992
+ return _this;
148
2993
  }
149
- if (!inputIsDifferent && this.state.equationEditor !== nextState.equationEditor) {
150
- return true;
2994
+ var _proto = ReplaceTransition.prototype;
2995
+ _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
2996
+ var _child$props;
2997
+ var children = this.props.children;
2998
+ var child = _react.default.Children.toArray(children)[idx];
2999
+ if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
3000
+ if (this.props[handler]) this.props[handler]((0, _reactDom.findDOMNode)(this));
3001
+ };
3002
+ _proto.render = function render() {
3003
+ var _this$props = this.props, children = _this$props.children, inProp = _this$props.in, props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
3004
+ var _React$Children$toArr = _react.default.Children.toArray(children), first = _React$Children$toArr[0], second = _React$Children$toArr[1];
3005
+ delete props.onEnter;
3006
+ delete props.onEntering;
3007
+ delete props.onEntered;
3008
+ delete props.onExit;
3009
+ delete props.onExiting;
3010
+ delete props.onExited;
3011
+ return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {
3012
+ key: 'first',
3013
+ onEnter: this.handleEnter,
3014
+ onEntering: this.handleEntering,
3015
+ onEntered: this.handleEntered
3016
+ }) : _react.default.cloneElement(second, {
3017
+ key: 'second',
3018
+ onEnter: this.handleExit,
3019
+ onEntering: this.handleExiting,
3020
+ onEntered: this.handleExited
3021
+ }));
3022
+ };
3023
+ return ReplaceTransition;
3024
+ })(_react.default.Component);
3025
+ ReplaceTransition.propTypes = {
3026
+ in: _propTypes.default.bool.isRequired,
3027
+ children: function children(props, propName) {
3028
+ if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components.");
3029
+ return null;
151
3030
  }
152
- if (!inputIsDifferent && this.props.controlledKeypad) {
153
- return this.props.showKeypad !== nextProps.showKeypad;
3031
+ };
3032
+ var _default = ReplaceTransition;
3033
+ exports.default = _default;
3034
+ module.exports = exports["default"];
3035
+ })(ReplaceTransition, ReplaceTransition.exports);
3036
+ getDefaultExportFromCjs(ReplaceTransition.exports);
3037
+ var _CSSTransition = _interopRequireDefault(CSSTransition$1.exports);
3038
+ var _ReplaceTransition = _interopRequireDefault(ReplaceTransition.exports);
3039
+ var _TransitionGroup = _interopRequireDefault(TransitionGroup.exports);
3040
+ var _Transition = _interopRequireDefault(Transition$1);
3041
+ function _interopRequireDefault(obj) {
3042
+ return obj && obj.__esModule ? obj : {
3043
+ default: obj
3044
+ };
3045
+ }
3046
+ var reactTransitionGroup = {
3047
+ Transition: _Transition.default,
3048
+ TransitionGroup: _TransitionGroup.default,
3049
+ ReplaceTransition: _ReplaceTransition.default,
3050
+ CSSTransition: _CSSTransition.default
3051
+ };
3052
+ const {colors: {green: green}} = _dll_material_ui__core;
3053
+ const {colors: {orange: orange}} = _dll_material_ui__core;
3054
+ const {colors: {pink: pink}} = _dll_material_ui__core;
3055
+ const {colors: {indigo: indigo}} = _dll_material_ui__core;
3056
+ const defaults$2 = {
3057
+ TEXT: 'black',
3058
+ DISABLED: 'grey',
3059
+ CORRECT: green[500],
3060
+ INCORRECT: orange[500],
3061
+ PRIMARY: indigo[500],
3062
+ PRIMARY_LIGHT: indigo[200],
3063
+ PRIMARY_DARK: indigo[800],
3064
+ SECONDARY: pink.A400,
3065
+ SECONDARY_LIGHT: pink[200],
3066
+ SECONDARY_DARK: pink[900],
3067
+ BACKGROUND: 'rgba(255,255,255,0)',
3068
+ SECONDARY_BACKGROUND: 'rgba(241,241,241,1)'
3069
+ };
3070
+ Object.freeze(defaults$2);
3071
+ const v = prefix => (...args) => {
3072
+ const fallback = args.pop();
3073
+ return args.reduceRight((acc, v) => {
3074
+ return `var(--${prefix}-${v}, ${acc})`;
3075
+ }, fallback);
3076
+ };
3077
+ const pv = v('pie');
3078
+ const text = () => pv('text', defaults$2.TEXT);
3079
+ const disabled = () => pv('disabled', defaults$2.DISABLED);
3080
+ const correct = () => pv('correct', defaults$2.CORRECT);
3081
+ const incorrect = () => pv('incorrect', defaults$2.INCORRECT);
3082
+ const primaryLight = () => pv('primary-light', defaults$2.PRIMARY_LIGHT);
3083
+ const secondary = () => pv('secondary', defaults$2.SECONDARY);
3084
+ const background = () => pv('background', defaults$2.BACKGROUND);
3085
+ const {withStyles: withStyles$9} = _dll_material_ui__core_styles;
3086
+ const React$c = _dll_react;
3087
+ const classNames$2 = _dll_classnames;
3088
+ const PropTypes$c = _dll_prop_types;
3089
+ const _jsxFileName$a = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/feedback.jsx";
3090
+ const styleSheet = {
3091
+ corespringFeedback: {
3092
+ transformOrigin: '0% 0px 0px',
3093
+ width: '100%',
3094
+ display: 'block',
3095
+ overflow: 'hidden',
3096
+ '&:.incorrect': {
3097
+ color: '#946202'
154
3098
  }
155
- return inputIsDifferent;
156
- }
157
- __init5() {
158
- this.onEditorTypeChange = evt => {
159
- this.setState({
160
- equationEditor: evt.target.value
161
- });
162
- };
3099
+ },
3100
+ content: {
3101
+ '-webkit-font-smoothing': 'antialiased',
3102
+ backgroundColor: `var(--feedback-bg-color, ${disabled()})`,
3103
+ borderRadius: '4px',
3104
+ fontFamily: '"Roboto", "Noto", sans-serif',
3105
+ fontSize: '12px',
3106
+ lineHeight: '25px',
3107
+ margin: '0px',
3108
+ padding: '10px',
3109
+ verticalAlign: 'middle',
3110
+ color: 'var(--feedback-color, white)'
3111
+ },
3112
+ correct: {
3113
+ backgroundColor: `var(--feedback-correct-bg-color, ${correct()})`
3114
+ },
3115
+ incorrect: {
3116
+ backgroundColor: `var(--feedback-incorrect-bg-color, ${incorrect()})`
3117
+ },
3118
+ feedbackEnter: {
3119
+ height: '1px'
3120
+ },
3121
+ feedbackEnterActive: {
3122
+ height: '45px',
3123
+ transition: 'height 500ms'
3124
+ },
3125
+ feedbackLeave: {
3126
+ height: '45px'
3127
+ },
3128
+ feedbackLeaveActive: {
3129
+ height: '1px',
3130
+ transition: 'height 200ms'
163
3131
  }
164
- __init6() {
165
- this.checkResponseAreasNumber = (maxResponseAreas, isEdit) => {
166
- const {latex} = this.input && this.input.props || ({});
167
- if (latex) {
168
- const count = (latex.match(/answerBlock/g) || []).length;
169
- return isEdit ? count === maxResponseAreas - 1 : count === maxResponseAreas;
170
- }
171
- return false;
3132
+ };
3133
+ class Feedback extends React$c.Component {
3134
+ static __initStatic() {
3135
+ this.propTypes = {
3136
+ correctness: PropTypes$c.string,
3137
+ feedback: PropTypes$c.string,
3138
+ classes: PropTypes$c.object.isRequired
172
3139
  };
173
3140
  }
174
3141
  render() {
175
- const {classNames, keypadMode, allowAnswerBlock, additionalKeys, controlledKeypad, controlledKeypadMode, showKeypad, noDecimal, latex, onFocus, onBlur, classes, error} = this.props;
176
- const shouldShowKeypad = !controlledKeypad || controlledKeypad && showKeypad;
177
- const {addDisabled} = this.state;
178
- log$2('[render]', latex);
179
- return React$6.createElement('div', {
180
- className: cx$3(classes.mathToolbar, classNames.mathToolbar),
181
- __self: this,
182
- __source: {
183
- fileName: _jsxFileName$5,
184
- lineNumber: 188
185
- }
186
- }, React$6.createElement('div', {
187
- className: classes.inputAndTypeContainer,
188
- __self: this,
189
- __source: {
190
- fileName: _jsxFileName$5,
191
- lineNumber: 189
192
- }
193
- }, controlledKeypadMode && React$6.createElement(InputContainer, {
194
- label: "Equation Editor",
195
- className: classes.selectContainer,
196
- __self: this,
197
- __source: {
198
- fileName: _jsxFileName$5,
199
- lineNumber: 191
200
- }
201
- }, React$6.createElement(Select, {
202
- className: classes.select,
203
- onChange: this.onEditorTypeChange,
204
- value: this.state.equationEditor,
205
- __self: this,
206
- __source: {
207
- fileName: _jsxFileName$5,
208
- lineNumber: 192
209
- }
210
- }, React$6.createElement(MenuItem, {
211
- value: "non-negative-integers",
212
- __self: this,
213
- __source: {
214
- fileName: _jsxFileName$5,
215
- lineNumber: 197
216
- }
217
- }, "Numeric - Non-Negative Integers"), React$6.createElement(MenuItem, {
218
- value: "integers",
219
- __self: this,
220
- __source: {
221
- fileName: _jsxFileName$5,
222
- lineNumber: 198
223
- }
224
- }, "Numeric - Integers"), React$6.createElement(MenuItem, {
225
- value: "decimals",
226
- __self: this,
227
- __source: {
228
- fileName: _jsxFileName$5,
229
- lineNumber: 199
230
- }
231
- }, "Numeric - Decimals"), React$6.createElement(MenuItem, {
232
- value: "fractions",
233
- __self: this,
234
- __source: {
235
- fileName: _jsxFileName$5,
236
- lineNumber: 200
237
- }
238
- }, "Numeric - Fractions"), React$6.createElement(MenuItem, {
239
- value: 1,
240
- __self: this,
241
- __source: {
242
- fileName: _jsxFileName$5,
243
- lineNumber: 201
244
- }
245
- }, "Grade 1 - 2"), React$6.createElement(MenuItem, {
246
- value: 3,
247
- __self: this,
248
- __source: {
249
- fileName: _jsxFileName$5,
250
- lineNumber: 202
251
- }
252
- }, "Grade 3 - 5"), React$6.createElement(MenuItem, {
253
- value: 6,
254
- __self: this,
255
- __source: {
256
- fileName: _jsxFileName$5,
257
- lineNumber: 203
258
- }
259
- }, "Grade 6 - 7"), React$6.createElement(MenuItem, {
260
- value: 8,
261
- __self: this,
262
- __source: {
263
- fileName: _jsxFileName$5,
264
- lineNumber: 204
3142
+ const {correctness, feedback, classes} = this.props;
3143
+ function chooseFeedback(correctness) {
3144
+ if (correctness && feedback) {
3145
+ return React$c.createElement(reactTransitionGroup.CSSTransition, {
3146
+ classNames: {
3147
+ enter: classes.feedbackEnter,
3148
+ enterActive: classes.feedbackEnterActive,
3149
+ leave: classes.feedbackLeave,
3150
+ leaveActive: classes.feedbackLeaveActive
3151
+ },
3152
+ key: "hasFeedback",
3153
+ timeout: {
3154
+ enter: 500,
3155
+ exit: 300
3156
+ },
3157
+ __self: this,
3158
+ __source: {
3159
+ fileName: _jsxFileName$a,
3160
+ lineNumber: 69
3161
+ }
3162
+ }, React$c.createElement('div', {
3163
+ className: classes.corespringFeedback,
3164
+ __self: this,
3165
+ __source: {
3166
+ fileName: _jsxFileName$a,
3167
+ lineNumber: 79
3168
+ }
3169
+ }, React$c.createElement('div', {
3170
+ className: classNames$2(classes.content, classes[correctness]),
3171
+ dangerouslySetInnerHTML: {
3172
+ __html: feedback
3173
+ },
3174
+ __self: this,
3175
+ __source: {
3176
+ fileName: _jsxFileName$a,
3177
+ lineNumber: 80
3178
+ }
3179
+ })));
3180
+ } else {
3181
+ return null;
265
3182
  }
266
- }, "Grade 8 - HS"), React$6.createElement(MenuItem, {
267
- value: 'geometry',
3183
+ }
3184
+ return React$c.createElement('div', {
268
3185
  __self: this,
269
3186
  __source: {
270
- fileName: _jsxFileName$5,
271
- lineNumber: 205
3187
+ fileName: _jsxFileName$a,
3188
+ lineNumber: 93
272
3189
  }
273
- }, "Geometry"), React$6.createElement(MenuItem, {
274
- value: 'advanced-algebra',
3190
+ }, React$c.createElement(reactTransitionGroup.TransitionGroup, {
275
3191
  __self: this,
276
3192
  __source: {
277
- fileName: _jsxFileName$5,
278
- lineNumber: 206
3193
+ fileName: _jsxFileName$a,
3194
+ lineNumber: 94
279
3195
  }
280
- }, "Advanced Algebra"), React$6.createElement(MenuItem, {
281
- value: 'statistics',
3196
+ }, chooseFeedback(correctness)));
3197
+ }
3198
+ }
3199
+ Feedback.__initStatic();
3200
+ var Feedback$1 = withStyles$9(styleSheet, {
3201
+ name: 'Feedback'
3202
+ })(Feedback);
3203
+ const React$b = _dll_react;
3204
+ const PropTypes$b = _dll_prop_types;
3205
+ const {Popover: Popover} = _dll_material_ui__core;
3206
+ const {withStyles: withStyles$8} = _dll_material_ui__core_styles;
3207
+ const debug$1 = _dll_debug;
3208
+ const _jsxFileName$9 = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/response-indicators.jsx";
3209
+ const log$1 = debug$1('pie-libs:render-ui:response-indicators');
3210
+ const styles$4 = () => ({
3211
+ responseIndicator: {
3212
+ cursor: 'pointer'
3213
+ },
3214
+ paper: {
3215
+ padding: '0',
3216
+ borderRadius: '4px'
3217
+ },
3218
+ popover: {
3219
+ cursor: 'pointer'
3220
+ },
3221
+ popperClose: {
3222
+ cursor: 'pointer'
3223
+ }
3224
+ });
3225
+ const BuildIndicator = (Icon, correctness) => {
3226
+ class RawIndicator extends React$b.Component {
3227
+ constructor(props) {
3228
+ super(props);
3229
+ RawIndicator.prototype.__init.call(this);
3230
+ RawIndicator.prototype.__init2.call(this);
3231
+ this.state = {};
3232
+ }
3233
+ __init() {
3234
+ this.handlePopoverOpen = event => {
3235
+ log$1('[handlePopoverOpen]', event.target);
3236
+ this.setState({
3237
+ anchorEl: event.target
3238
+ });
3239
+ };
3240
+ }
3241
+ __init2() {
3242
+ this.handlePopoverClose = () => {
3243
+ this.setState({
3244
+ anchorEl: null
3245
+ });
3246
+ };
3247
+ }
3248
+ render() {
3249
+ const {feedback, classes} = this.props;
3250
+ const {anchorEl} = this.state;
3251
+ return React$b.createElement('div', {
3252
+ className: feedback && classes.responseIndicator,
3253
+ __self: this,
3254
+ __source: {
3255
+ fileName: _jsxFileName$9,
3256
+ lineNumber: 47
3257
+ }
3258
+ }, React$b.createElement('span', {
3259
+ ref: r => this.icon = r,
3260
+ onClick: this.handlePopoverOpen,
3261
+ __self: this,
3262
+ __source: {
3263
+ fileName: _jsxFileName$9,
3264
+ lineNumber: 48
3265
+ }
3266
+ }, React$b.createElement(Icon, {
3267
+ __self: this,
3268
+ __source: {
3269
+ fileName: _jsxFileName$9,
3270
+ lineNumber: 49
3271
+ }
3272
+ })), feedback && React$b.createElement(Popover, {
3273
+ className: classes.popover,
3274
+ classes: {
3275
+ paper: classes.paper
3276
+ },
3277
+ open: !!anchorEl,
3278
+ anchorEl: anchorEl,
3279
+ anchorOrigin: {
3280
+ vertical: 'bottom',
3281
+ horizontal: 'left'
3282
+ },
3283
+ transformOrigin: {
3284
+ vertical: 'top',
3285
+ horizontal: 'left'
3286
+ },
3287
+ onClose: this.handlePopoverClose,
3288
+ __self: this,
3289
+ __source: {
3290
+ fileName: _jsxFileName$9,
3291
+ lineNumber: 53
3292
+ }
3293
+ }, React$b.createElement(Feedback$1, {
3294
+ feedback: feedback,
3295
+ correctness: correctness,
3296
+ __self: this,
3297
+ __source: {
3298
+ fileName: _jsxFileName$9,
3299
+ lineNumber: 70
3300
+ }
3301
+ })));
3302
+ }
3303
+ }
3304
+ RawIndicator.propTypes = {
3305
+ feedback: PropTypes$b.string,
3306
+ classes: PropTypes$b.object.isRequired
3307
+ };
3308
+ return withStyles$8(styles$4)(RawIndicator);
3309
+ };
3310
+ BuildIndicator(correctIcon, 'correct');
3311
+ BuildIndicator(incorrectIcon, 'incorrect');
3312
+ BuildIndicator(partiallyCorrectIcon, 'partially-correct');
3313
+ BuildIndicator(nothingSubmittedIcon, 'nothing-submitted');
3314
+ const React$a = _dll_react;
3315
+ const {withStyles: withStyles$7} = _dll_material_ui__core_styles;
3316
+ const Collapse = _dll_material_ui__core_collapse_index;
3317
+ const PropTypes$a = _dll_prop_types;
3318
+ const {renderMath: renderMath$2} = _dll_pie_lib__math_rendering;
3319
+ const _jsxFileName$8 = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx";
3320
+ class Collapsible extends React$a.Component {
3321
+ constructor(...args) {
3322
+ super(...args);
3323
+ Collapsible.prototype.__init.call(this);
3324
+ Collapsible.prototype.__init2.call(this);
3325
+ }
3326
+ static __initStatic() {
3327
+ this.propTypes = {
3328
+ classes: PropTypes$a.object.isRequired,
3329
+ className: PropTypes$a.string,
3330
+ children: PropTypes$a.object,
3331
+ labels: PropTypes$a.shape({
3332
+ visible: PropTypes$a.string,
3333
+ hidden: PropTypes$a.string
3334
+ })
3335
+ };
3336
+ }
3337
+ static __initStatic2() {
3338
+ this.defaultProps = {
3339
+ labels: {}
3340
+ };
3341
+ }
3342
+ __init() {
3343
+ this.state = {
3344
+ expanded: false
3345
+ };
3346
+ }
3347
+ __init2() {
3348
+ this.toggleExpanded = () => {
3349
+ this.setState(state => ({
3350
+ expanded: !state.expanded
3351
+ }));
3352
+ };
3353
+ }
3354
+ componentDidMount() {
3355
+ renderMath$2(this.root);
3356
+ }
3357
+ componentDidUpdate() {
3358
+ renderMath$2(this.root);
3359
+ }
3360
+ render() {
3361
+ const {classes, labels, children, className} = this.props;
3362
+ const title = this.state.expanded ? labels.visible || 'Hide' : labels.hidden || 'Show';
3363
+ return React$a.createElement('div', {
3364
+ className: className,
3365
+ ref: r => this.root = r,
282
3366
  __self: this,
283
3367
  __source: {
284
- fileName: _jsxFileName$5,
285
- lineNumber: 207
3368
+ fileName: _jsxFileName$8,
3369
+ lineNumber: 43
286
3370
  }
287
- }, "Statistics"), React$6.createElement(MenuItem, {
288
- value: 'item-authoring',
3371
+ }, React$a.createElement('div', {
3372
+ onClick: this.toggleExpanded,
289
3373
  __self: this,
290
3374
  __source: {
291
- fileName: _jsxFileName$5,
292
- lineNumber: 208
3375
+ fileName: _jsxFileName$8,
3376
+ lineNumber: 44
293
3377
  }
294
- }, "Item Authoring"))), React$6.createElement('div', {
295
- className: cx$3(classes.inputContainer, error ? classes.error : ''),
3378
+ }, React$a.createElement('span', {
3379
+ className: classes.title,
296
3380
  __self: this,
297
3381
  __source: {
298
- fileName: _jsxFileName$5,
299
- lineNumber: 212
3382
+ fileName: _jsxFileName$8,
3383
+ lineNumber: 45
300
3384
  }
301
- }, React$6.createElement(mq$3.Input, {
302
- onFocus: () => {
303
- onFocus && onFocus();
304
- this.updateDisable(false);
305
- },
306
- onBlur: () => {
307
- this.updateDisable(false);
308
- onBlur && onBlur();
309
- },
310
- className: cx$3(classes.mathEditor, classNames.editor, !controlledKeypadMode ? classes.longMathEditor : ''),
311
- innerRef: r => this.input = r,
312
- latex: latex,
313
- onChange: this.onEditorChange,
314
- __self: this,
315
- __source: {
316
- fileName: _jsxFileName$5,
317
- lineNumber: 213
318
- }
319
- }))), allowAnswerBlock && React$6.createElement(Button, {
320
- className: classes.addAnswerBlockButton,
321
- type: "primary",
322
- style: {
323
- bottom: shouldShowKeypad ? '320px' : '20px'
324
- },
325
- onClick: this.onAnswerBlockClick,
326
- disabled: addDisabled,
3385
+ }, title)), React$a.createElement(Collapse, {
3386
+ in: this.state.expanded,
3387
+ timeout: "auto",
3388
+ unmountOnExit: true,
3389
+ className: classes.collapsible,
327
3390
  __self: this,
328
3391
  __source: {
329
- fileName: _jsxFileName$5,
330
- lineNumber: 234
3392
+ fileName: _jsxFileName$8,
3393
+ lineNumber: 47
331
3394
  }
332
- }, "+ Response Area"), React$6.createElement('hr', {
333
- className: classes.hr,
334
- __self: this,
335
- __source: {
336
- fileName: _jsxFileName$5,
337
- lineNumber: 244
338
- }
339
- }), shouldShowKeypad && React$6.createElement(HorizontalKeypad$1, {
340
- additionalKeys: additionalKeys,
341
- mode: controlledKeypadMode ? this.state.equationEditor : keypadMode,
342
- onClick: this.onClick,
343
- noDecimal: noDecimal,
3395
+ }, children));
3396
+ }
3397
+ }
3398
+ Collapsible.__initStatic();
3399
+ Collapsible.__initStatic2();
3400
+ var Collapsible$1 = withStyles$7(theme => ({
3401
+ title: {
3402
+ color: theme.palette.primary.light,
3403
+ borderBottom: `1px dotted ${theme.palette.primary.light}`
3404
+ },
3405
+ collapsible: {
3406
+ paddingTop: theme.spacing.unit * 2
3407
+ }
3408
+ }))(Collapsible);
3409
+ const React$9 = _dll_react;
3410
+ const {withStyles: withStyles$6} = _dll_material_ui__core_styles;
3411
+ const {createMuiTheme: createMuiTheme} = _dll_material_ui__core_styles;
3412
+ const PropTypes$9 = _dll_prop_types;
3413
+ const _jsxFileName$7 = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/preview-layout.jsx";
3414
+ class PreviewLayout extends React$9.Component {
3415
+ static __initStatic() {
3416
+ this.propTypes = {
3417
+ children: PropTypes$9.oneOfType([PropTypes$9.arrayOf(PropTypes$9.node), PropTypes$9.node]).isRequired,
3418
+ classes: PropTypes$9.object
3419
+ };
3420
+ }
3421
+ render() {
3422
+ const {children, classes} = this.props;
3423
+ return React$9.createElement('div', {
3424
+ className: classes.container,
344
3425
  __self: this,
345
3426
  __source: {
346
- fileName: _jsxFileName$5,
347
- lineNumber: 246
3427
+ fileName: _jsxFileName$7,
3428
+ lineNumber: 14
348
3429
  }
349
- }));
3430
+ }, children);
350
3431
  }
351
- }
352
- EditorAndPad.__initStatic();
353
- const styles$3 = theme => ({
354
- inputAndTypeContainer: {
355
- display: 'flex',
356
- alignItems: 'center',
357
- '& *': {
358
- fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
359
- },
360
- '& .mq-overarrow.mq-arrow-both': {
361
- minWidth: '1.23em',
362
- '& *': {
363
- lineHeight: '1 !important'
364
- },
365
- '&:before': {
366
- top: '-0.4em',
367
- left: '-1px'
368
- },
369
- '&:after': {
370
- top: '-2.36em',
371
- right: '-1px'
372
- },
373
- '&.mq-empty:after': {
374
- top: '-0.45em'
375
- }
376
- },
377
- '& .mq-overarrow.mq-arrow-right': {
378
- '&:before': {
379
- top: '-0.4em',
380
- right: '-1px'
381
- }
382
- }
383
- },
384
- selectContainer: {
385
- flex: 'initial',
386
- width: '25%',
387
- minWidth: '100px',
388
- marginLeft: '15px',
389
- marginTop: '5px',
390
- marginBottom: '5px',
391
- marginRight: '5px'
392
- },
393
- mathEditor: {
394
- maxWidth: '400px',
395
- color: color$2.text(),
396
- backgroundColor: color$2.background(),
397
- padding: theme.spacing.unit
398
- },
399
- longMathEditor: {
400
- maxWidth: '500px'
401
- },
402
- addAnswerBlockButton: {
403
- position: 'absolute',
404
- right: '12px',
405
- border: '1px solid lightgrey'
3432
+ }
3433
+ PreviewLayout.__initStatic();
3434
+ const styles$3 = () => ({
3435
+ container: {
3436
+ display: 'flex',
3437
+ flexDirection: 'column',
3438
+ position: 'relative'
3439
+ }
3440
+ });
3441
+ createMuiTheme({
3442
+ typography: {
3443
+ useNextVariants: true
406
3444
  },
407
- hr: {
408
- padding: 0,
409
- margin: 0,
410
- height: '1px',
411
- border: 'none',
412
- borderBottom: `solid 1px ${theme.palette.primary.main}`
3445
+ palette: {
3446
+ action: {
3447
+ disabled: 'rgba(0, 0, 0, 0.54);'
3448
+ }
413
3449
  },
414
- mathToolbar: {
415
- zIndex: 9,
416
- position: 'relative',
417
- textAlign: 'center',
418
- width: 'auto',
419
- '& > .mq-math-mode': {
420
- border: 'solid 1px lightgrey'
421
- },
422
- '& > .mq-focused': {
423
- outline: 'none',
424
- boxShadow: 'none',
425
- border: `dotted 1px ${theme.palette.primary.main}`,
426
- borderRadius: '0px'
427
- },
428
- '& .mq-overarrow-inner': {
429
- border: 'none !important',
430
- paddingTop: '0 !important'
431
- },
432
- '& .mq-overarrow-inner-right': {
433
- display: 'none !important'
434
- },
435
- '& .mq-overarrow-inner-left': {
436
- display: 'none !important'
3450
+ overrides: {
3451
+ MuiRadio: {
3452
+ root: {
3453
+ '&$checked': {
3454
+ color: '#3f51b5 !important'
3455
+ }
3456
+ }
437
3457
  },
438
- '& .mq-longdiv-inner': {
439
- borderTop: '1px solid !important',
440
- paddingTop: '1.5px !important'
3458
+ MuiCheckbox: {
3459
+ root: {
3460
+ '&$checked': {
3461
+ color: '#3f51b5 !important'
3462
+ }
3463
+ }
441
3464
  },
442
- '& .mq-overarrow.mq-arrow-both': {
443
- minWidth: '1.23em'
3465
+ MuiTabs: {
3466
+ root: {
3467
+ borderBottom: '1px solid #eee'
3468
+ }
444
3469
  },
445
- '& .mq-parallelogram': {
446
- lineHeight: 0.85
3470
+ MuiSwitch: {
3471
+ root: {
3472
+ '&$checked': {
3473
+ color: '#3f51b5 !important',
3474
+ '& + $bar': {
3475
+ backgroundColor: '#3f51b5 !important',
3476
+ opacity: 0.5
3477
+ }
3478
+ }
3479
+ }
447
3480
  }
448
- },
449
- inputContainer: {
450
- minWidth: '500px',
451
- maxWidth: '900px',
452
- minHeight: '40px',
453
- width: '100%',
454
- display: 'flex',
455
- marginTop: theme.spacing.unit,
456
- marginBottom: theme.spacing.unit
457
- },
458
- error: {
459
- border: '2px solid red'
460
3481
  }
461
3482
  });
462
- var EditorAndPad$1 = withStyles$5(styles$3)(EditorAndPad);
463
- const React$5 = _dll_react;
464
- const {IconButton: IconButton} = _dll_material_ui__core;
465
- const {Check: Check} = _dll_material_ui__icons;
466
- const {withStyles: withStyles$4} = _dll_material_ui__core_styles;
467
- const PropTypes$4 = _dll_prop_types;
468
- const _jsxFileName$4 = "/home/circleci/repo/node_modules/@pie-lib/math-toolbar/src/done-button.jsx";
469
- const RawDoneButton = ({classes, onClick}) => React$5.createElement(IconButton, {
470
- 'aria-label': "Done",
471
- className: classes.iconRoot,
472
- onClick: onClick,
473
- classes: {
474
- label: classes.label,
475
- root: classes.iconRoot
476
- },
477
- __self: undefined,
478
- __source: {
479
- fileName: _jsxFileName$4,
480
- lineNumber: 9
3483
+ withStyles$6(styles$3)(PreviewLayout);
3484
+ const React$8 = _dll_react;
3485
+ const PropTypes$8 = _dll_prop_types;
3486
+ const {renderMath: renderMath$1} = _dll_pie_lib__math_rendering;
3487
+ const _jsxFileName$6 = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/html-and-math.js";
3488
+ class HtmlAndMath extends React$8.Component {
3489
+ static __initStatic() {
3490
+ this.propTypes = {
3491
+ tag: PropTypes$8.string,
3492
+ className: PropTypes$8.string,
3493
+ html: PropTypes$8.string
3494
+ };
481
3495
  }
482
- }, React$5.createElement(Check, {
483
- __self: undefined,
484
- __source: {
485
- fileName: _jsxFileName$4,
486
- lineNumber: 18
3496
+ static __initStatic2() {
3497
+ this.defaultProps = {
3498
+ tag: 'div',
3499
+ html: ''
3500
+ };
487
3501
  }
488
- }));
489
- RawDoneButton.propTypes = {
490
- classes: PropTypes$4.object.isRequired,
491
- onClick: PropTypes$4.func
3502
+ componentDidMount() {
3503
+ if (this.node) {
3504
+ renderMath$1(this.node);
3505
+ }
3506
+ }
3507
+ componentDidUpdate() {
3508
+ if (this.node) {
3509
+ renderMath$1(this.node);
3510
+ }
3511
+ }
3512
+ render() {
3513
+ const {tag, className, html} = this.props;
3514
+ const Tag = tag || 'div';
3515
+ return React$8.createElement(Tag, {
3516
+ ref: r => this.node = r,
3517
+ className: className,
3518
+ dangerouslySetInnerHTML: {
3519
+ __html: html
3520
+ },
3521
+ __self: this,
3522
+ __source: {
3523
+ fileName: _jsxFileName$6,
3524
+ lineNumber: 33
3525
+ }
3526
+ });
3527
+ }
3528
+ }
3529
+ HtmlAndMath.__initStatic();
3530
+ HtmlAndMath.__initStatic2();
3531
+ const {InputLabel: InputLabel} = _dll_material_ui__core;
3532
+ const {FormControl: FormControl} = _dll_material_ui__core;
3533
+ const PropTypes$7 = _dll_prop_types;
3534
+ const React$7 = _dll_react;
3535
+ const classNames$1 = _dll_classnames;
3536
+ const {withStyles: withStyles$5} = _dll_material_ui__core_styles;
3537
+ const _jsxFileName$5 = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/input-container.jsx";
3538
+ const RawInputContainer = props => {
3539
+ const {label, className, children, classes} = props;
3540
+ const names = classNames$1(classes.formControl, className);
3541
+ return React$7.createElement(FormControl, {
3542
+ className: names,
3543
+ __self: undefined,
3544
+ __source: {
3545
+ fileName: _jsxFileName$5,
3546
+ lineNumber: 13
3547
+ }
3548
+ }, React$7.createElement(InputLabel, {
3549
+ className: classes.label,
3550
+ shrink: true,
3551
+ __self: undefined,
3552
+ __source: {
3553
+ fileName: _jsxFileName$5,
3554
+ lineNumber: 14
3555
+ }
3556
+ }, label), children);
492
3557
  };
493
- const styles$2 = {
494
- iconRoot: {
495
- verticalAlign: 'top',
496
- width: '28px',
497
- height: '28px',
498
- color: '#00bb00'
3558
+ RawInputContainer.propTypes = {
3559
+ label: PropTypes$7.oneOfType([PropTypes$7.string, PropTypes$7.object]).isRequired,
3560
+ className: PropTypes$7.string,
3561
+ children: PropTypes$7.oneOfType([PropTypes$7.arrayOf(PropTypes$7.node), PropTypes$7.node]).isRequired,
3562
+ classes: PropTypes$7.object.isRequired
3563
+ };
3564
+ withStyles$5(theme => ({
3565
+ formControl: {
3566
+ marginLeft: 0,
3567
+ marginRight: theme.spacing.unit,
3568
+ paddingBottom: theme.spacing.unit,
3569
+ flex: '1 0 auto',
3570
+ minWidth: theme.spacing.unit * 4
499
3571
  },
500
3572
  label: {
501
- position: 'absolute',
502
- top: '2px'
3573
+ fontSize: 'inherit',
3574
+ whiteSpace: 'nowrap'
3575
+ }
3576
+ }))(RawInputContainer);
3577
+ const React$6 = _dll_react;
3578
+ const {Component: Component} = _dll_react;
3579
+ const {withStyles: withStyles$4} = _dll_material_ui__core_styles;
3580
+ const PropTypes$6 = _dll_prop_types;
3581
+ const _jsxFileName$4 = "/home/circleci/repo/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx";
3582
+ const NEWLINE_BLOCK_REGEX = /\\embed\{newLine\}\[\]/g;
3583
+ const NEWLINE_LATEX$1 = '\\newline ';
3584
+ class PreviewPrompt extends Component {
3585
+ constructor(...args) {
3586
+ super(...args);
3587
+ PreviewPrompt.prototype.__init.call(this);
503
3588
  }
504
- };
505
- const DoneButton = withStyles$4(styles$2)(RawDoneButton);
506
- const React$4 = _dll_react;
507
- const classNames = _dll_classnames;
508
- const debug$1 = _dll_debug;
509
- const {withStyles: withStyles$3} = _dll_material_ui__core_styles;
510
- const PropTypes$3 = _dll_prop_types;
511
- const {mq: mq$2} = _dll_pie_lib__math_input;
512
- const _jsxFileName$3 = "/home/circleci/repo/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx";
513
- const log$1 = debug$1('@pie-lib:math-toolbar:math-preview');
514
- class RawMathPreview extends React$4.Component {
515
3589
  static __initStatic() {
516
3590
  this.propTypes = {
517
- latex: PropTypes$3.string,
518
- node: PropTypes$3.object,
519
- classes: PropTypes$3.object,
520
- isSelected: PropTypes$3.bool,
521
- onFocus: PropTypes$3.func,
522
- onBlur: PropTypes$3.func
3591
+ classes: PropTypes$6.object,
3592
+ prompt: PropTypes$6.string,
3593
+ tagName: PropTypes$6.string,
3594
+ className: PropTypes$6.string,
3595
+ onClick: PropTypes$6.func,
3596
+ defaultClassName: PropTypes$6.string
523
3597
  };
524
3598
  }
525
- render() {
526
- log$1('[render] data: ', this.props.node.data);
527
- const latex = this.props.node.data.get('latex');
528
- const {classes, isSelected, onFocus, onBlur} = this.props;
529
- return React$4.createElement('div', {
530
- className: classNames(classes.root, isSelected && classes.selected),
531
- __self: this,
532
- __source: {
533
- fileName: _jsxFileName$3,
534
- lineNumber: 25
535
- }
536
- }, ' ', React$4.createElement('span', {
537
- className: classes.insideOverlay,
538
- __self: this,
539
- __source: {
540
- fileName: _jsxFileName$3,
541
- lineNumber: 27
3599
+ static __initStatic2() {
3600
+ this.defaultProps = {
3601
+ onClick: () => {}
3602
+ };
3603
+ }
3604
+ __init() {
3605
+ this.parsedText = text => {
3606
+ const div = document.createElement('div');
3607
+ div.innerHTML = text;
3608
+ const audio = div.querySelector('audio');
3609
+ if (audio) {
3610
+ const source = document.createElement('source');
3611
+ source.setAttribute('type', 'audio/mp3');
3612
+ source.setAttribute('src', audio.getAttribute('src'));
3613
+ audio.removeAttribute('src');
3614
+ audio.appendChild(source);
542
3615
  }
543
- }), React$4.createElement(mq$2.Static, {
544
- latex: latex,
545
- onFocus: onFocus,
546
- onBlur: onBlur,
3616
+ return div.innerHTML;
3617
+ };
3618
+ }
3619
+ render() {
3620
+ const {prompt, classes, tagName, className, onClick, defaultClassName} = this.props;
3621
+ const CustomTag = tagName || 'div';
3622
+ const customClasses = `${classes.promptTable} ${classes[className] || ''} ${defaultClassName || ''}`;
3623
+ return React$6.createElement(CustomTag, {
3624
+ onClick: onClick,
3625
+ className: customClasses,
3626
+ dangerouslySetInnerHTML: {
3627
+ __html: this.parsedText(prompt || '').replace(NEWLINE_BLOCK_REGEX, NEWLINE_LATEX$1)
3628
+ },
547
3629
  __self: this,
548
3630
  __source: {
549
- fileName: _jsxFileName$3,
550
- lineNumber: 28
3631
+ fileName: _jsxFileName$4,
3632
+ lineNumber: 50
551
3633
  }
552
- }));
3634
+ });
553
3635
  }
554
3636
  }
555
- RawMathPreview.__initStatic();
556
- const mp = theme => ({
557
- root: {
558
- display: 'inline-flex',
559
- alignItems: 'center',
560
- position: 'relative',
561
- '& > .mq-math-mode': {
562
- border: 'solid 1px lightgrey'
563
- },
564
- '& > .mq-focused': {
565
- outline: 'none',
566
- boxShadow: 'none',
567
- border: 'solid 1px black',
568
- borderRadius: '0px'
569
- },
570
- '& *': {
571
- fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'
572
- },
573
- '& .mq-overarrow-inner': {
574
- paddingTop: '0 !important',
575
- border: 'none !important'
576
- },
577
- '& .mq-overarrow.mq-arrow-both': {
578
- minWidth: '1.23em',
579
- '& *': {
580
- lineHeight: '1 !important'
581
- },
582
- '&:before': {
583
- top: '-0.4em',
584
- left: '-1px'
585
- },
586
- '&:after': {
587
- top: '-2.36em',
588
- right: '-1px'
589
- },
590
- '&.mq-empty:after': {
591
- top: '-0.45em'
592
- }
3637
+ PreviewPrompt.__initStatic();
3638
+ PreviewPrompt.__initStatic2();
3639
+ const styles$2 = theme => ({
3640
+ prompt: {
3641
+ verticalAlign: 'middle',
3642
+ color: text()
3643
+ },
3644
+ rationale: {
3645
+ paddingLeft: theme.spacing.unit * 16
3646
+ },
3647
+ label: {
3648
+ color: `${text()} !important`,
3649
+ display: 'inline-block',
3650
+ verticalAlign: 'middle',
3651
+ cursor: 'pointer'
3652
+ },
3653
+ promptTable: {
3654
+ '&:not(.MathJax) > table': {
3655
+ borderCollapse: 'collapse'
593
3656
  },
594
- '& .mq-overarrow.mq-arrow-right': {
595
- '&:before': {
596
- top: '-0.4em',
597
- right: '-1px'
3657
+ '&:not(.MathJax) > table tr': {
3658
+ '&:nth-child(2n)': {
3659
+ backgroundColor: '#f6f8fa'
598
3660
  }
599
3661
  },
600
- '& .mq-overarrow-inner-right': {
601
- display: 'none !important'
602
- },
603
- '& .mq-overarrow-inner-left': {
604
- display: 'none !important'
605
- },
606
- '& .mq-longdiv-inner': {
607
- borderTop: '1px solid !important',
608
- paddingTop: '1.5px !important'
609
- },
610
- '& .mq-parallelogram': {
611
- lineHeight: 0.85
3662
+ '&:not(.MathJax) > table td, &:not(.MathJax) > table th': {
3663
+ padding: '.6em 1em',
3664
+ textAlign: 'center'
612
3665
  }
3666
+ }
3667
+ });
3668
+ var PreviewPrompt$1 = withStyles$4(styles$2)(PreviewPrompt);
3669
+ const PropTypes$5 = _dll_prop_types;
3670
+ const React$5 = _dll_react;
3671
+ const Readable = props => {
3672
+ return React$5.createElement(React$5.Fragment, null, React$5.Children.map(props.children, child => React$5.cloneElement(child, {
3673
+ 'data-pie-readable': props.false === undefined
3674
+ })));
3675
+ };
3676
+ Readable.propTypes = {
3677
+ children: PropTypes$5.node,
3678
+ false: PropTypes$5.bool
3679
+ };
3680
+ const PropTypes$4 = _dll_prop_types;
3681
+ ({
3682
+ children: PropTypes$4.node,
3683
+ purpose: PropTypes$4.string
3684
+ });
3685
+ const dp = new DOMParser();
3686
+ const markupToText = s => {
3687
+ const root = dp.parseFromString(s, 'text/html');
3688
+ return root.body.textContent;
3689
+ };
3690
+ const hasText = s => {
3691
+ if (!s) {
3692
+ return false;
3693
+ }
3694
+ const tc = markupToText(s);
3695
+ return !!(tc && tc.trim());
3696
+ };
3697
+ const noTouch = {
3698
+ '-webkit-touchCcallout': 'none',
3699
+ '-webkit-user-select': 'none',
3700
+ '-khtml-user-select': 'none',
3701
+ '-moz-user-select': 'none',
3702
+ '-ms-user-select': 'none',
3703
+ 'user-select': 'none'
3704
+ };
3705
+ var styles$1 = {
3706
+ root: {
3707
+ width: '100%',
3708
+ cursor: 'pointer'
613
3709
  },
614
- selected: {
615
- border: `solid 1px ${theme.palette.primary.main}`,
616
- '& > .mq-math-mode': {
617
- border: 'solid 0px lightgrey'
618
- }
3710
+ content: {
3711
+ margin: '0 auto',
3712
+ textAlign: 'center',
3713
+ display: 'flex'
619
3714
  },
620
- insideOverlay: {
3715
+ label: Object.assign({
3716
+ width: '140px',
3717
+ fontFamily: "'Roboto', sans-serif",
3718
+ height: '25px',
3719
+ lineHeight: '25px',
3720
+ verticalAlign: 'middle',
3721
+ color: `var(--correct-answer-toggle-label-color, ${text()})`,
3722
+ fontSize: '15px',
3723
+ fontWeight: 'normal'
3724
+ }, noTouch),
3725
+ icon: {
621
3726
  position: 'absolute',
622
- bottom: 0,
623
- left: 0,
624
- right: 0,
625
- top: 0
3727
+ width: '25px'
3728
+ },
3729
+ iconHolder: {
3730
+ width: '25px',
3731
+ marginRight: '5px'
3732
+ },
3733
+ enter: {
3734
+ opacity: '0'
3735
+ },
3736
+ enterActive: {
3737
+ opacity: '1',
3738
+ transition: 'opacity 0.3s ease-in'
3739
+ },
3740
+ exit: {
3741
+ opacity: '1'
3742
+ },
3743
+ exitActive: {
3744
+ opacity: '0',
3745
+ transition: 'opacity 0.3s ease-in'
626
3746
  }
627
- });
628
- withStyles$3(mp)(RawMathPreview);
3747
+ };
3748
+ const React$4 = _dll_react;
3749
+ const PropTypes$3 = _dll_prop_types;
3750
+ const {withStyles: withStyles$3} = _dll_material_ui__core_styles;
3751
+ const _jsxFileName$3 = "/home/circleci/repo/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx";
3752
+ const Expander = props => {
3753
+ const {classes, show, children} = props;
3754
+ return React$4.createElement(reactTransitionGroup.CSSTransition, {
3755
+ in: show,
3756
+ appear: true,
3757
+ mountOnEnter: false,
3758
+ timeout: 300,
3759
+ classNames: {
3760
+ ...classes
3761
+ },
3762
+ __self: undefined,
3763
+ __source: {
3764
+ fileName: _jsxFileName$3,
3765
+ lineNumber: 10
3766
+ }
3767
+ }, React$4.createElement('div', {
3768
+ className: classes.expander,
3769
+ __self: undefined,
3770
+ __source: {
3771
+ fileName: _jsxFileName$3,
3772
+ lineNumber: 17
3773
+ }
3774
+ }, children));
3775
+ };
3776
+ Expander.propTypes = {
3777
+ show: PropTypes$3.bool.isRequired,
3778
+ className: PropTypes$3.string,
3779
+ classes: PropTypes$3.object,
3780
+ children: PropTypes$3.oneOfType([PropTypes$3.arrayOf(PropTypes$3.node), PropTypes$3.node]).isRequired
3781
+ };
3782
+ const transition = 'height ease-in 300ms, opacity ease-in 300ms';
3783
+ var Expander$1 = withStyles$3(() => ({
3784
+ expander: {
3785
+ position: 'relative',
3786
+ height: 0,
3787
+ overflow: 'hidden',
3788
+ display: 'flex',
3789
+ visibility: 'hidden',
3790
+ width: 0
3791
+ },
3792
+ enter: {
3793
+ transition,
3794
+ opacity: 1,
3795
+ height: '25px',
3796
+ width: 'auto',
3797
+ visibility: 'visible'
3798
+ },
3799
+ enterDone: {
3800
+ height: '25px',
3801
+ visibility: 'visible',
3802
+ width: 'auto'
3803
+ },
3804
+ exit: {
3805
+ transition,
3806
+ opacity: 0,
3807
+ height: 0,
3808
+ visibility: 'visible',
3809
+ width: 0
3810
+ },
3811
+ exitDone: {
3812
+ opacity: 0,
3813
+ visibility: 'hidden',
3814
+ height: 0,
3815
+ width: 0
3816
+ }
3817
+ }))(Expander);
3818
+ const {withStyles: withStyles$2} = _dll_material_ui__core_styles;
629
3819
  const React$3 = _dll_react;
3820
+ const classNames = _dll_classnames;
630
3821
  const PropTypes$2 = _dll_prop_types;
631
- const cx$2 = _dll_classnames;
632
- const {withStyles: withStyles$2} = _dll_material_ui__core_styles;
633
- const _jsxFileName$2 = "/home/circleci/repo/node_modules/@pie-lib/math-toolbar/src/index.jsx";
634
- class MathToolbar extends React$3.Component {
3822
+ const _jsxFileName$2 = "/home/circleci/repo/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx";
3823
+ class CorrectAnswerToggle extends React$3.Component {
635
3824
  static __initStatic() {
636
3825
  this.propTypes = {
637
- autoFocus: PropTypes$2.bool,
638
- allowAnswerBlock: PropTypes$2.bool,
639
- controlledKeypad: PropTypes$2.bool,
640
- controlledKeypadMode: PropTypes$2.bool,
641
- keypadMode: PropTypes$2.oneOfType([PropTypes$2.string, PropTypes$2.number]),
642
- classNames: PropTypes$2.object,
643
- showKeypad: PropTypes$2.bool,
644
- noDecimal: PropTypes$2.bool,
645
- additionalKeys: PropTypes$2.array,
646
- latex: PropTypes$2.string.isRequired,
647
- onAnswerBlockAdd: PropTypes$2.func,
648
- onChange: PropTypes$2.func,
649
- onDone: PropTypes$2.func.isRequired,
650
- onFocus: PropTypes$2.func,
651
- onBlur: PropTypes$2.func,
652
- hideDoneButton: PropTypes$2.bool
3826
+ onToggle: PropTypes$2.func,
3827
+ toggled: PropTypes$2.bool,
3828
+ show: PropTypes$2.bool,
3829
+ hideMessage: PropTypes$2.string,
3830
+ showMessage: PropTypes$2.string,
3831
+ classes: PropTypes$2.object.isRequired,
3832
+ className: PropTypes$2.string
653
3833
  };
654
3834
  }
655
3835
  static __initStatic2() {
656
3836
  this.defaultProps = {
657
- classNames: {},
658
- keypadMode: 'item-authoring',
659
- autoFocus: false,
660
- allowAnswerBlock: false,
661
- controlledKeypad: false,
662
- controlledKeypadMode: false,
663
- noDecimal: false,
664
- showKeypad: true,
665
- additionalKeys: [],
666
- onChange: () => {},
667
- onAnswerBlockAdd: () => {},
668
- onFocus: () => {},
669
- hideDoneButton: false
3837
+ showMessage: 'Show correct answer',
3838
+ hideMessage: 'Hide correct answer',
3839
+ show: false,
3840
+ toggled: false
670
3841
  };
671
3842
  }
672
3843
  constructor(props) {
673
3844
  super(props);
674
- MathToolbar.prototype.__init.call(this);
675
- MathToolbar.prototype.__init2.call(this);
676
3845
  this.state = {
677
- latex: props.latex
3846
+ show: props.show
678
3847
  };
679
3848
  }
680
- __init() {
681
- this.done = () => {
682
- this.props.onDone(this.state.latex);
683
- };
3849
+ onClick() {
3850
+ this.props.onToggle(!this.props.toggled);
684
3851
  }
685
- UNSAFE_componentWillReceiveProps(nextProps) {
3852
+ componentWillReceiveProps(nextProps) {
686
3853
  this.setState({
687
- latex: nextProps.latex
3854
+ show: nextProps.show
688
3855
  });
689
3856
  }
690
- __init2() {
691
- this.onChange = latex => {
692
- this.setState({
693
- latex
694
- });
695
- this.props.onChange(latex);
696
- };
697
- }
698
3857
  render() {
699
- const {latex} = this.state;
700
- const {classNames, autoFocus, allowAnswerBlock, onAnswerBlockAdd, controlledKeypad, controlledKeypadMode, keypadMode, noDecimal, additionalKeys, showKeypad, onFocus, onBlur, hideDoneButton, error, maxResponseAreas} = this.props;
701
- return React$3.createElement(PureToolbar, {
702
- autoFocus: autoFocus,
703
- classNames: classNames,
704
- onAnswerBlockAdd: onAnswerBlockAdd,
705
- allowAnswerBlock: allowAnswerBlock,
706
- latex: latex,
707
- additionalKeys: additionalKeys,
708
- noDecimal: noDecimal,
709
- keypadMode: keypadMode,
710
- onChange: this.onChange,
711
- onDone: this.done,
712
- onFocus: onFocus,
713
- onBlur: onBlur,
714
- showKeypad: showKeypad,
715
- controlledKeypad: controlledKeypad,
716
- controlledKeypadMode: controlledKeypadMode,
717
- hideDoneButton: hideDoneButton,
718
- error: error,
719
- maxResponseAreas: maxResponseAreas,
3858
+ const {classes, className, toggled, hideMessage, showMessage} = this.props;
3859
+ return React$3.createElement('div', {
3860
+ className: classNames(classes.root, className),
720
3861
  __self: this,
721
3862
  __source: {
722
3863
  fileName: _jsxFileName$2,
723
- lineNumber: 88
3864
+ lineNumber: 52
724
3865
  }
725
- });
726
- }
727
- }
728
- MathToolbar.__initStatic();
729
- MathToolbar.__initStatic2();
730
- class RawPureToolbar extends React$3.Component {
731
- static __initStatic3() {
732
- this.propTypes = {
733
- classNames: PropTypes$2.object,
734
- latex: PropTypes$2.string.isRequired,
735
- keypadMode: PropTypes$2.oneOfType([PropTypes$2.string, PropTypes$2.number]),
736
- onChange: PropTypes$2.func.isRequired,
737
- onDone: PropTypes$2.func.isRequired,
738
- onBlur: PropTypes$2.func,
739
- onAnswerBlockAdd: PropTypes$2.func,
740
- additionalKeys: PropTypes$2.array,
741
- onFocus: PropTypes$2.func,
742
- classes: PropTypes$2.object.isRequired,
743
- autoFocus: PropTypes$2.bool,
744
- noDecimal: PropTypes$2.bool,
745
- allowAnswerBlock: PropTypes$2.bool,
746
- controlledKeypad: PropTypes$2.bool,
747
- controlledKeypadMode: PropTypes$2.bool,
748
- showKeypad: PropTypes$2.bool,
749
- hideDoneButton: PropTypes$2.bool
750
- };
751
- }
752
- render() {
753
- const {classNames, autoFocus, allowAnswerBlock, onAnswerBlockAdd, controlledKeypad, controlledKeypadMode, additionalKeys, showKeypad, keypadMode, noDecimal, latex, onChange, onDone, onFocus, onBlur, hideDoneButton, classes, error, maxResponseAreas} = this.props;
754
- return React$3.createElement('div', {
755
- className: cx$2(classes.pureToolbar, (classNames || ({})).toolbar),
3866
+ }, React$3.createElement(Expander$1, {
3867
+ show: this.state.show,
3868
+ className: classes.expander,
756
3869
  __self: this,
757
3870
  __source: {
758
3871
  fileName: _jsxFileName$2,
759
- lineNumber: 157
3872
+ lineNumber: 53
760
3873
  }
761
3874
  }, React$3.createElement('div', {
3875
+ className: classes.content,
3876
+ onClick: this.onClick.bind(this),
762
3877
  __self: this,
763
3878
  __source: {
764
3879
  fileName: _jsxFileName$2,
765
- lineNumber: 158
766
- }
767
- }), React$3.createElement(EditorAndPad$1, {
768
- autoFocus: autoFocus,
769
- keypadMode: keypadMode,
770
- classNames: classNames || ({}),
771
- controlledKeypad: controlledKeypad,
772
- controlledKeypadMode: controlledKeypadMode,
773
- noDecimal: noDecimal,
774
- showKeypad: showKeypad,
775
- additionalKeys: additionalKeys,
776
- allowAnswerBlock: allowAnswerBlock,
777
- onAnswerBlockAdd: onAnswerBlockAdd,
778
- latex: latex,
779
- onChange: onChange,
780
- onFocus: onFocus,
781
- onBlur: onBlur,
782
- error: error,
783
- maxResponseAreas: maxResponseAreas,
3880
+ lineNumber: 54
3881
+ }
3882
+ }, React$3.createElement('div', {
3883
+ className: classes.iconHolder,
784
3884
  __self: this,
785
3885
  __source: {
786
3886
  fileName: _jsxFileName$2,
787
- lineNumber: 159
3887
+ lineNumber: 55
788
3888
  }
789
- }), (!controlledKeypad || controlledKeypad && showKeypad) && !hideDoneButton && React$3.createElement(DoneButton, {
790
- onClick: onDone,
3889
+ }, React$3.createElement(CSSTransition, {
3890
+ timeout: 400,
3891
+ in: toggled,
3892
+ exit: !toggled,
3893
+ classNames: classes,
791
3894
  __self: this,
792
3895
  __source: {
793
3896
  fileName: _jsxFileName$2,
794
- lineNumber: 178
3897
+ lineNumber: 56
795
3898
  }
796
- }));
3899
+ }, React$3.createElement(CorrectResponse$1, {
3900
+ open: toggled,
3901
+ key: "correct-open",
3902
+ className: classes.icon,
3903
+ __self: this,
3904
+ __source: {
3905
+ fileName: _jsxFileName$2,
3906
+ lineNumber: 57
3907
+ }
3908
+ })), React$3.createElement(CSSTransition, {
3909
+ timeout: 5000,
3910
+ in: !toggled,
3911
+ exit: toggled,
3912
+ classNames: classes,
3913
+ __self: this,
3914
+ __source: {
3915
+ fileName: _jsxFileName$2,
3916
+ lineNumber: 59
3917
+ }
3918
+ }, React$3.createElement(CorrectResponse$1, {
3919
+ open: toggled,
3920
+ key: "correct-closed",
3921
+ className: classes.icon,
3922
+ __self: this,
3923
+ __source: {
3924
+ fileName: _jsxFileName$2,
3925
+ lineNumber: 60
3926
+ }
3927
+ }))), React$3.createElement(Readable, {
3928
+ false: true,
3929
+ __self: this,
3930
+ __source: {
3931
+ fileName: _jsxFileName$2,
3932
+ lineNumber: 63
3933
+ }
3934
+ }, React$3.createElement('div', {
3935
+ className: classes.label,
3936
+ 'aria-hidden': !this.state.show,
3937
+ __self: this,
3938
+ __source: {
3939
+ fileName: _jsxFileName$2,
3940
+ lineNumber: 64
3941
+ }
3942
+ }, toggled ? hideMessage : showMessage)))));
797
3943
  }
798
3944
  }
799
- RawPureToolbar.__initStatic3();
800
- const styles$1 = () => ({
801
- pureToolbar: {
802
- display: 'flex',
803
- width: '100%',
804
- zIndex: 8,
805
- alignItems: 'center'
806
- }
807
- });
808
- const PureToolbar = withStyles$2(styles$1)(RawPureToolbar);
3945
+ CorrectAnswerToggle.__initStatic();
3946
+ CorrectAnswerToggle.__initStatic2();
3947
+ var CorrectAnswerToggle$1 = withStyles$2(styles$1)(CorrectAnswerToggle);
3948
+ const ResponseTypes$1 = {
3949
+ advanced: 'Advanced Multi',
3950
+ simple: 'Simple'
3951
+ };
809
3952
  const React$2 = _dll_react;
810
3953
  const cx$1 = _dll_classnames;
811
3954
  const {withStyles: withStyles$1} = _dll_material_ui__core_styles;
812
3955
  const PropTypes$1 = _dll_prop_types;
813
- const {color: color$1} = _dll_pie_lib__render_ui;
3956
+ const {MathToolbar: MathToolbar} = _dll_pie_lib__math_toolbar;
814
3957
  const {mq: mq$1} = _dll_pie_lib__math_input;
815
3958
  const _jsxFileName$1 = "/home/circleci/repo/packages/math-inline/src/simple-question-block.jsx";
816
3959
  class SimpleQuestionBlockRaw extends React$2.Component {
@@ -914,7 +4057,7 @@ const SimpleQuestionBlock = withStyles$1(theme => ({
914
4057
  textAlign: 'left',
915
4058
  padding: theme.spacing.unit,
916
4059
  '&.mq-math-mode': {
917
- border: `1px solid ${color$1.primaryLight()}`
4060
+ border: `1px solid ${primaryLight()}`
918
4061
  }
919
4062
  },
920
4063
  expression: {
@@ -923,9 +4066,9 @@ const SimpleQuestionBlock = withStyles$1(theme => ({
923
4066
  padding: theme.spacing.unit
924
4067
  },
925
4068
  static: {
926
- color: color$1.text(),
927
- background: color$1.background(),
928
- border: `1px solid ${color$1.primaryLight()}`,
4069
+ color: text(),
4070
+ background: background(),
4071
+ border: `1px solid ${primaryLight()}`,
929
4072
  width: 'fit-content',
930
4073
  fontSize: '1rem',
931
4074
  padding: theme.spacing.unit / 2,
@@ -938,25 +4081,18 @@ const SimpleQuestionBlock = withStyles$1(theme => ({
938
4081
  }
939
4082
  },
940
4083
  correct: {
941
- border: `2px solid ${color$1.correct()} !important`,
4084
+ border: `2px solid ${correct()} !important`,
942
4085
  padding: theme.spacing.unit,
943
4086
  letterSpacing: '0.5px'
944
4087
  },
945
4088
  incorrect: {
946
- border: `2px solid ${color$1.incorrect()} !important`,
4089
+ border: `2px solid ${incorrect()} !important`,
947
4090
  padding: theme.spacing.unit,
948
4091
  letterSpacing: '0.5px'
949
4092
  }
950
4093
  }))(SimpleQuestionBlockRaw);
951
4094
  const React$1 = _dll_react;
952
4095
  const PropTypes = _dll_prop_types;
953
- const CorrectAnswerToggle = _dll_pie_lib__correct_answer_toggle;
954
- const {Feedback: Feedback} = _dll_pie_lib__render_ui;
955
- const {Collapsible: Collapsible} = _dll_pie_lib__render_ui;
956
- const {Readable: Readable} = _dll_pie_lib__render_ui;
957
- const {hasText: hasText} = _dll_pie_lib__render_ui;
958
- const {PreviewPrompt: PreviewPrompt} = _dll_pie_lib__render_ui;
959
- const {color: color} = _dll_pie_lib__render_ui;
960
4096
  const {withStyles: withStyles} = _dll_material_ui__core_styles;
961
4097
  const {Tooltip: Tooltip} = _dll_material_ui__core;
962
4098
  const {isEqual: isEqual} = _dll_lodash;
@@ -1350,7 +4486,7 @@ class Main extends React$1.Component {
1350
4486
  fileName: _jsxFileName,
1351
4487
  lineNumber: 426
1352
4488
  }
1353
- }, React$1.createElement(PreviewPrompt, {
4489
+ }, React$1.createElement(PreviewPrompt$1, {
1354
4490
  prompt: prompt,
1355
4491
  __self: this,
1356
4492
  __source: {
@@ -1449,7 +4585,7 @@ class Main extends React$1.Component {
1449
4585
  fileName: _jsxFileName,
1450
4586
  lineNumber: 498
1451
4587
  }
1452
- }, !animationsDisabled ? React$1.createElement(Collapsible, {
4588
+ }, !animationsDisabled ? React$1.createElement(Collapsible$1, {
1453
4589
  labels: {
1454
4590
  hidden: 'Show Teacher Instructions',
1455
4591
  visible: 'Hide Teacher Instructions'
@@ -1489,7 +4625,7 @@ class Main extends React$1.Component {
1489
4625
  fileName: _jsxFileName,
1490
4626
  lineNumber: 510
1491
4627
  }
1492
- }, !animationsDisabled ? React$1.createElement(Collapsible, {
4628
+ }, !animationsDisabled ? React$1.createElement(Collapsible$1, {
1493
4629
  labels: {
1494
4630
  hidden: 'Show Rationale',
1495
4631
  visible: 'Hide Rationale'
@@ -1548,7 +4684,7 @@ class Main extends React$1.Component {
1548
4684
  fileName: _jsxFileName,
1549
4685
  lineNumber: 540
1550
4686
  }
1551
- }, showCorrectAnswerToggle && React$1.createElement(CorrectAnswerToggle, {
4687
+ }, showCorrectAnswerToggle && React$1.createElement(CorrectAnswerToggle$1, {
1552
4688
  className: classes.toggle,
1553
4689
  show: true,
1554
4690
  toggled: showCorrect,
@@ -1558,7 +4694,7 @@ class Main extends React$1.Component {
1558
4694
  fileName: _jsxFileName,
1559
4695
  lineNumber: 542
1560
4696
  }
1561
- })), teacherInstructions && hasText(teacherInstructions) && [React$1.createElement(Collapsible, {
4697
+ })), teacherInstructions && hasText(teacherInstructions) && [React$1.createElement(Collapsible$1, {
1562
4698
  key: "collapsible",
1563
4699
  labels: {
1564
4700
  hidden: 'Show Teacher Instructions',
@@ -1570,7 +4706,7 @@ class Main extends React$1.Component {
1570
4706
  fileName: _jsxFileName,
1571
4707
  lineNumber: 551
1572
4708
  }
1573
- }, React$1.createElement(PreviewPrompt, {
4709
+ }, React$1.createElement(PreviewPrompt$1, {
1574
4710
  prompt: teacherInstructions,
1575
4711
  __self: this,
1576
4712
  __source: {
@@ -1584,7 +4720,7 @@ class Main extends React$1.Component {
1584
4720
  fileName: _jsxFileName,
1585
4721
  lineNumber: 561
1586
4722
  }
1587
- })], rationale && hasText(rationale) && [React$1.createElement(Collapsible, {
4723
+ })], rationale && hasText(rationale) && [React$1.createElement(Collapsible$1, {
1588
4724
  key: "collapsible",
1589
4725
  labels: {
1590
4726
  hidden: 'Show Rationale',
@@ -1595,7 +4731,7 @@ class Main extends React$1.Component {
1595
4731
  fileName: _jsxFileName,
1596
4732
  lineNumber: 564
1597
4733
  }
1598
- }, React$1.createElement(PreviewPrompt, {
4734
+ }, React$1.createElement(PreviewPrompt$1, {
1599
4735
  prompt: rationale,
1600
4736
  __self: this,
1601
4737
  __source: {
@@ -1609,7 +4745,7 @@ class Main extends React$1.Component {
1609
4745
  fileName: _jsxFileName,
1610
4746
  lineNumber: 573
1611
4747
  }
1612
- })], displayNote && hasText(note) && [React$1.createElement(Collapsible, {
4748
+ })], displayNote && hasText(note) && [React$1.createElement(Collapsible$1, {
1613
4749
  key: "collapsible",
1614
4750
  labels: {
1615
4751
  hidden: 'Show Note',
@@ -1620,7 +4756,7 @@ class Main extends React$1.Component {
1620
4756
  fileName: _jsxFileName,
1621
4757
  lineNumber: 576
1622
4758
  }
1623
- }, React$1.createElement(PreviewPrompt, {
4759
+ }, React$1.createElement(PreviewPrompt$1, {
1624
4760
  prompt: note,
1625
4761
  __self: this,
1626
4762
  __source: {
@@ -1634,7 +4770,7 @@ class Main extends React$1.Component {
1634
4770
  fileName: _jsxFileName,
1635
4771
  lineNumber: 585
1636
4772
  }
1637
- })], feedback && React$1.createElement(Feedback, {
4773
+ })], feedback && React$1.createElement(Feedback$1, {
1638
4774
  correctness: correctness.correctness,
1639
4775
  feedback: feedback,
1640
4776
  __self: this,
@@ -1675,10 +4811,10 @@ const styles = theme => ({
1675
4811
  display: 'inline-block'
1676
4812
  },
1677
4813
  tooltip: {
1678
- background: `${color.primaryLight()} !important`,
1679
- color: color.text(),
4814
+ background: `${primaryLight()} !important`,
4815
+ color: text(),
1680
4816
  padding: theme.spacing.unit * 2,
1681
- border: `1px solid ${color.secondary()}`,
4817
+ border: `1px solid ${secondary()}`,
1682
4818
  fontSize: '16px',
1683
4819
  '& :not(.MathJax) > table tr': {
1684
4820
  '&:nth-child(2n)': {
@@ -1705,8 +4841,8 @@ const styles = theme => ({
1705
4841
  width: '100%',
1706
4842
  position: 'relative',
1707
4843
  padding: theme.spacing.unit / 2,
1708
- backgroundColor: color.background(),
1709
- color: color.text()
4844
+ backgroundColor: background(),
4845
+ color: text()
1710
4846
  },
1711
4847
  title: {
1712
4848
  fontSize: '1.1rem',
@@ -1794,13 +4930,13 @@ const styles = theme => ({
1794
4930
  letterSpacing: '0.5px'
1795
4931
  },
1796
4932
  printCorrect: {
1797
- border: `2px solid ${color.correct()} !important`
4933
+ border: `2px solid ${correct()} !important`
1798
4934
  },
1799
4935
  correct: {
1800
- borderColor: `${color.correct()} !important`
4936
+ borderColor: `${correct()} !important`
1801
4937
  },
1802
4938
  incorrect: {
1803
- borderColor: `${color.incorrect()} !important`
4939
+ borderColor: `${incorrect()} !important`
1804
4940
  },
1805
4941
  blockContainer: {
1806
4942
  margin: `${theme.spacing.unit}px !important`,
@@ -1816,14 +4952,14 @@ const styles = theme => ({
1816
4952
  display: 'flex',
1817
4953
  alignItems: 'center',
1818
4954
  justifyContent: 'center',
1819
- borderRight: `2px solid ${color.disabled()} !important`
4955
+ borderRight: `2px solid ${disabled()} !important`
1820
4956
  },
1821
4957
  toggle: {
1822
- color: color.text()
4958
+ color: text()
1823
4959
  },
1824
4960
  blockMath: {
1825
- color: color.text(),
1826
- backgroundColor: color.background(),
4961
+ color: text(),
4962
+ backgroundColor: background(),
1827
4963
  padding: `${theme.spacing.unit / 2}px !important`,
1828
4964
  display: 'flex',
1829
4965
  alignItems: 'center',
@@ -1843,9 +4979,6 @@ const styles = theme => ({
1843
4979
  }
1844
4980
  });
1845
4981
  var Main$1 = withStyles(styles)(Main);
1846
- function getDefaultExportFromCjs(x) {
1847
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1848
- }
1849
4982
  var lib = {};
1850
4983
  Object.defineProperty(lib, "__esModule", {
1851
4984
  value: true
@@ -1888,12 +5021,25 @@ var utils = {};
1888
5021
  Object.defineProperty(utils, "__esModule", {
1889
5022
  value: true
1890
5023
  });
1891
- utils.ResponseTypes = void 0;
5024
+ utils.generateValidationMessage = utils.ResponseTypes = void 0;
1892
5025
  var ResponseTypes = {
1893
5026
  advanced: 'Advanced Multi',
1894
5027
  simple: 'Simple'
1895
5028
  };
1896
5029
  utils.ResponseTypes = ResponseTypes;
5030
+ var generateValidationMessage = function generateValidationMessage() {
5031
+ var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5032
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5033
+ var maxResponseAreas = config.maxResponseAreas;
5034
+ var responseType = model.responseType;
5035
+ var responseAreasMessage = '';
5036
+ var answersMessage = '\nAll correct answers (the primary and any alternates) should not be empty and should be unique.';
5037
+ if (responseType === 'Advanced Multi') {
5038
+ responseAreasMessage = '\nThere should be at least 1 ' + (maxResponseAreas ? ("and at most ").concat(maxResponseAreas, " ") : '') + 'response area' + (maxResponseAreas ? 's' : '') + ' defined.';
5039
+ }
5040
+ return 'Validation requirements:' + answersMessage + responseAreasMessage;
5041
+ };
5042
+ utils.generateValidationMessage = generateValidationMessage;
1897
5043
  (function (exports) {
1898
5044
  Object.defineProperty(exports, "__esModule", {
1899
5045
  value: true