mario-education 2.4.511-feedback → 2.4.511-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layouts/hooks/useHeaderSideBar.d.ts +1 -0
- package/dist/containers/MarioAi/components/ChatContent.d.ts +2 -2
- package/dist/containers/MarioAi/hooks/useHistoryPrompt.d.ts +1 -0
- package/dist/index.css +496 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1616 -74
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1596 -58
- package/dist/index.modern.js.map +1 -1
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var SearchIcon = _interopDefault(require('@material-ui/icons/Search'));
|
|
|
27
27
|
var Tabs = _interopDefault(require('@material-ui/core/Tabs'));
|
|
28
28
|
var Tab = _interopDefault(require('@material-ui/core/Tab'));
|
|
29
29
|
var Box = _interopDefault(require('@material-ui/core/Box'));
|
|
30
|
-
var styles$
|
|
30
|
+
var styles$f = require('@material-ui/core/styles');
|
|
31
31
|
var core$2 = require('@dnd-kit/core');
|
|
32
32
|
var sortable = require('@dnd-kit/sortable');
|
|
33
33
|
var toDate = _interopDefault(require('date-fns/toDate'));
|
|
@@ -43,7 +43,7 @@ var ArrowForwardIcon = _interopDefault(require('@material-ui/icons/ArrowForward'
|
|
|
43
43
|
var ArrowUpwardIcon = _interopDefault(require('@material-ui/icons/ArrowUpward'));
|
|
44
44
|
var ArrowDownwardIcon = _interopDefault(require('@material-ui/icons/ArrowDownward'));
|
|
45
45
|
var reactDom = require('react-dom');
|
|
46
|
-
var ArrowBackIcon = _interopDefault(require('@material-ui/icons/ArrowBack'));
|
|
46
|
+
var ArrowBackIcon$1 = _interopDefault(require('@material-ui/icons/ArrowBack'));
|
|
47
47
|
var VisibilityIcon = _interopDefault(require('@material-ui/icons/Visibility'));
|
|
48
48
|
var StarBorderIcon = _interopDefault(require('@material-ui/icons/StarBorder'));
|
|
49
49
|
var StarIcon = _interopDefault(require('@material-ui/icons/Star'));
|
|
@@ -87,6 +87,8 @@ var IconButton = _interopDefault(require('@material-ui/core/IconButton'));
|
|
|
87
87
|
var MenuIcon = _interopDefault(require('@material-ui/icons/Menu'));
|
|
88
88
|
var NotificationsIcon = _interopDefault(require('@material-ui/icons/Notifications'));
|
|
89
89
|
var HelpOutlineIcon = _interopDefault(require('@material-ui/icons/HelpOutline'));
|
|
90
|
+
var generativeAi = require('@google/generative-ai');
|
|
91
|
+
var Markdown = _interopDefault(require('react-markdown'));
|
|
90
92
|
var AddIcon = _interopDefault(require('@material-ui/icons/Add'));
|
|
91
93
|
var MoreVertIcon = _interopDefault(require('@material-ui/icons/MoreVert'));
|
|
92
94
|
|
|
@@ -20856,7 +20858,7 @@ var CustomTabs = function CustomTabs(props) {
|
|
|
20856
20858
|
history.push(path);
|
|
20857
20859
|
};
|
|
20858
20860
|
|
|
20859
|
-
var useStyles = styles$
|
|
20861
|
+
var useStyles = styles$f.makeStyles(function (theme) {
|
|
20860
20862
|
return {
|
|
20861
20863
|
title: {
|
|
20862
20864
|
fontWeight: 700,
|
|
@@ -50469,7 +50471,7 @@ var CustomHeaderComponent = function CustomHeaderComponent(_ref) {
|
|
|
50469
50471
|
className: styles["custom-header"] + " " + styles[classFontSize] + " " + (!!isGreyBackground && styles["grey-background"]) + " " + (!!borderNone && styles["border-none"])
|
|
50470
50472
|
}, React__default.createElement(core$1.Grid, {
|
|
50471
50473
|
className: "" + styles["custom-header-right"]
|
|
50472
|
-
}, !!isGoback && React__default.createElement(ArrowBackIcon, {
|
|
50474
|
+
}, !!isGoback && React__default.createElement(ArrowBackIcon$1, {
|
|
50473
50475
|
className: "custom-icon-back-page",
|
|
50474
50476
|
onClick: function onClick() {
|
|
50475
50477
|
return !!onHandleGoBack ? onHandleGoBack() : history.goBack();
|
|
@@ -51281,7 +51283,7 @@ var useFontStyles = function useFontStyles() {
|
|
|
51281
51283
|
}, [defaultFont]);
|
|
51282
51284
|
var useStyles = React.useMemo(function () {
|
|
51283
51285
|
if (defaultFont === LARGE_FONT_DEFAULT) {
|
|
51284
|
-
return styles$
|
|
51286
|
+
return styles$f.makeStyles({
|
|
51285
51287
|
fontCustom: {
|
|
51286
51288
|
fontSize: defaultFont + "px"
|
|
51287
51289
|
},
|
|
@@ -51292,7 +51294,7 @@ var useFontStyles = function useFontStyles() {
|
|
|
51292
51294
|
});
|
|
51293
51295
|
}
|
|
51294
51296
|
|
|
51295
|
-
return styles$
|
|
51297
|
+
return styles$f.makeStyles({
|
|
51296
51298
|
fontCustom: {
|
|
51297
51299
|
fontSize: defaultFont + "px"
|
|
51298
51300
|
},
|
|
@@ -51303,7 +51305,7 @@ var useFontStyles = function useFontStyles() {
|
|
|
51303
51305
|
}, [defaultFont]);
|
|
51304
51306
|
var useSmallStyles = React.useMemo(function () {
|
|
51305
51307
|
if (defaultFont === LARGE_FONT_DEFAULT) {
|
|
51306
|
-
return styles$
|
|
51308
|
+
return styles$f.makeStyles({
|
|
51307
51309
|
fontCustom: {
|
|
51308
51310
|
fontSize: "16px"
|
|
51309
51311
|
}
|
|
@@ -51311,14 +51313,14 @@ var useFontStyles = function useFontStyles() {
|
|
|
51311
51313
|
}
|
|
51312
51314
|
|
|
51313
51315
|
if (defaultFont === SMALL_FONT_DEFAULT) {
|
|
51314
|
-
return styles$
|
|
51316
|
+
return styles$f.makeStyles({
|
|
51315
51317
|
fontCustom: {
|
|
51316
51318
|
fontSize: "10px"
|
|
51317
51319
|
}
|
|
51318
51320
|
});
|
|
51319
51321
|
}
|
|
51320
51322
|
|
|
51321
|
-
return styles$
|
|
51323
|
+
return styles$f.makeStyles({
|
|
51322
51324
|
fontCustom: {
|
|
51323
51325
|
fontSize: "inherit"
|
|
51324
51326
|
}
|
|
@@ -51820,7 +51822,7 @@ var CustomButton = function CustomButton(_ref) {
|
|
|
51820
51822
|
_ref$fontSize = _ref.fontSize,
|
|
51821
51823
|
fontSize = _ref$fontSize === void 0 ? "inherit" : _ref$fontSize,
|
|
51822
51824
|
icon = _ref.icon;
|
|
51823
|
-
var ColorButton = styles$
|
|
51825
|
+
var ColorButton = styles$f.withStyles(function () {
|
|
51824
51826
|
return {
|
|
51825
51827
|
root: {
|
|
51826
51828
|
backgroundColor: backgroundColor != null ? backgroundColor : BACKGROUND_DEFAULT,
|
|
@@ -54670,7 +54672,7 @@ var SurveyDetailAdmin = function SurveyDetailAdmin() {
|
|
|
54670
54672
|
className: styles$6['header-survey-detail-container']
|
|
54671
54673
|
}, React__default.createElement(core$1.Grid, {
|
|
54672
54674
|
className: "" + styles$6["header-survey-detail"]
|
|
54673
|
-
}, React__default.createElement(ArrowBackIcon, {
|
|
54675
|
+
}, React__default.createElement(ArrowBackIcon$1, {
|
|
54674
54676
|
className: "" + styles$6["icon-back-page"],
|
|
54675
54677
|
onClick: function onClick() {
|
|
54676
54678
|
return onHandleGoBack();
|
|
@@ -54899,7 +54901,7 @@ var SurveyDetailAdmin = function SurveyDetailAdmin() {
|
|
|
54899
54901
|
})));
|
|
54900
54902
|
};
|
|
54901
54903
|
|
|
54902
|
-
var useStyles$5 = styles$
|
|
54904
|
+
var useStyles$5 = styles$f.makeStyles(function (theme) {
|
|
54903
54905
|
var _tabLabel;
|
|
54904
54906
|
|
|
54905
54907
|
return {
|
|
@@ -54954,8 +54956,8 @@ var useStyles$5 = styles$e.makeStyles(function (theme) {
|
|
|
54954
54956
|
}
|
|
54955
54957
|
};
|
|
54956
54958
|
});
|
|
54957
|
-
var useStyleModelCreate = styles$
|
|
54958
|
-
return styles$
|
|
54959
|
+
var useStyleModelCreate = styles$f.makeStyles(function (theme) {
|
|
54960
|
+
return styles$f.createStyles({
|
|
54959
54961
|
root: {
|
|
54960
54962
|
width: "100%"
|
|
54961
54963
|
},
|
|
@@ -54974,7 +54976,7 @@ var useStyleModelCreate = styles$e.makeStyles(function (theme) {
|
|
|
54974
54976
|
}
|
|
54975
54977
|
});
|
|
54976
54978
|
});
|
|
54977
|
-
var useStylesDataGrid = styles$
|
|
54979
|
+
var useStylesDataGrid = styles$f.makeStyles(function () {
|
|
54978
54980
|
return {
|
|
54979
54981
|
root: {
|
|
54980
54982
|
borderBottom: "none",
|
|
@@ -55466,7 +55468,7 @@ var ChipButton = function ChipButton(_ref) {
|
|
|
55466
55468
|
var color = _ref.color,
|
|
55467
55469
|
label = _ref.label,
|
|
55468
55470
|
backgroundColor = _ref.backgroundColor;
|
|
55469
|
-
var StyleChip = styles$
|
|
55471
|
+
var StyleChip = styles$f.withStyles({
|
|
55470
55472
|
root: {
|
|
55471
55473
|
backgroundColor: !!backgroundColor ? backgroundColor : BACKGROUND_COLOR,
|
|
55472
55474
|
color: color,
|
|
@@ -55622,7 +55624,7 @@ var SliderSurveyComponent = function SliderSurveyComponent(_ref) {
|
|
|
55622
55624
|
cursor: "default"
|
|
55623
55625
|
} : {};
|
|
55624
55626
|
var result = Math.abs(val - (averageOtherRatings || 0));
|
|
55625
|
-
var PrettoSlider = styles$
|
|
55627
|
+
var PrettoSlider = styles$f.withStyles({
|
|
55626
55628
|
root: (_root = {
|
|
55627
55629
|
color: "#EFEFEF",
|
|
55628
55630
|
height: 8,
|
|
@@ -55878,7 +55880,7 @@ var EmotionComponent = function EmotionComponent(_ref) {
|
|
|
55878
55880
|
}));
|
|
55879
55881
|
};
|
|
55880
55882
|
|
|
55881
|
-
var CustomRadio = styles$
|
|
55883
|
+
var CustomRadio = styles$f.withStyles({
|
|
55882
55884
|
root: {
|
|
55883
55885
|
"&$checked": {
|
|
55884
55886
|
color: "orange"
|
|
@@ -64521,7 +64523,7 @@ var _valueLabelFormat$1 = function valueLabelFormat(avatar) {
|
|
|
64521
64523
|
});
|
|
64522
64524
|
};
|
|
64523
64525
|
|
|
64524
|
-
var PrettoSlider = styles$
|
|
64526
|
+
var PrettoSlider = styles$f.withStyles({
|
|
64525
64527
|
root: (_root = {
|
|
64526
64528
|
color: "#EFEFEF",
|
|
64527
64529
|
height: 8,
|
|
@@ -68678,7 +68680,7 @@ var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
|
68678
68680
|
id: "simple-dialog-question"
|
|
68679
68681
|
}, React__default.createElement(core$1.Grid, {
|
|
68680
68682
|
className: "" + styles$6["box-header-select"]
|
|
68681
|
-
}, React__default.createElement(ArrowBackIcon, {
|
|
68683
|
+
}, React__default.createElement(ArrowBackIcon$1, {
|
|
68682
68684
|
className: "" + styles$6["header-select-icon"],
|
|
68683
68685
|
onClick: function onClick() {
|
|
68684
68686
|
return handleClose();
|
|
@@ -74736,7 +74738,7 @@ var NotificationAlert = function NotificationAlert(_ref) {
|
|
|
74736
74738
|
}, React__default.createElement(icons.Close, null))));
|
|
74737
74739
|
};
|
|
74738
74740
|
|
|
74739
|
-
var useStyles$j = styles$
|
|
74741
|
+
var useStyles$j = styles$f.makeStyles(function () {
|
|
74740
74742
|
return {
|
|
74741
74743
|
animate: {
|
|
74742
74744
|
left: function left(_ref2) {
|
|
@@ -75219,6 +75221,11 @@ var useHeaderSideBar = function useHeaderSideBar(_navigations) {
|
|
|
75219
75221
|
setScreenWidth = _useState2[1];
|
|
75220
75222
|
|
|
75221
75223
|
var params = new URLSearchParams(location.search);
|
|
75224
|
+
var isEnableMarioAi = reactRedux.useSelector(function (state) {
|
|
75225
|
+
var _state$common5;
|
|
75226
|
+
|
|
75227
|
+
return (_state$common5 = state.common) === null || _state$common5 === void 0 ? void 0 : _state$common5.isEnableMarioAi;
|
|
75228
|
+
});
|
|
75222
75229
|
var isReadOnly = params.get("isReadOnly");
|
|
75223
75230
|
|
|
75224
75231
|
var _useNotificationAlert = useNotificationAlert(),
|
|
@@ -75341,6 +75348,7 @@ var useHeaderSideBar = function useHeaderSideBar(_navigations) {
|
|
|
75341
75348
|
dispatch(marioCore.setEnableIEP(res.data.isEnableIEP));
|
|
75342
75349
|
dispatch(marioCore.setConversationOneToOne(res.data.isConversationOneToOne));
|
|
75343
75350
|
dispatch(marioCore.setEnableSurvey(res.data.isEnableSurvey));
|
|
75351
|
+
dispatch(marioCore.setEnableMarioAi(res.data.isEnableMarioAi));
|
|
75344
75352
|
});
|
|
75345
75353
|
}, function (err) {
|
|
75346
75354
|
console.error(err);
|
|
@@ -75448,6 +75456,11 @@ var useHeaderSideBar = function useHeaderSideBar(_navigations) {
|
|
|
75448
75456
|
}, {
|
|
75449
75457
|
name: "External Api",
|
|
75450
75458
|
icon: React__default.createElement(TokenIcon, null)
|
|
75459
|
+
}, {
|
|
75460
|
+
name: "MarioAI",
|
|
75461
|
+
icon: React__default.createElement("img", {
|
|
75462
|
+
src: "/images/mario-ai.png"
|
|
75463
|
+
})
|
|
75451
75464
|
}];
|
|
75452
75465
|
var renderNotificationBadge = React.useCallback(function () {
|
|
75453
75466
|
if (!unreadNoti) return React__default.createElement(NotificationsIcon, {
|
|
@@ -75590,10 +75603,11 @@ var useHeaderSideBar = function useHeaderSideBar(_navigations) {
|
|
|
75590
75603
|
handleClose: handleClose,
|
|
75591
75604
|
renderNavigationItem: renderNavigationItem,
|
|
75592
75605
|
goToSettings: goToSettings,
|
|
75593
|
-
t: t
|
|
75606
|
+
t: t,
|
|
75607
|
+
isEnableMarioAi: isEnableMarioAi
|
|
75594
75608
|
};
|
|
75595
75609
|
};
|
|
75596
|
-
var useStyles$k = styles$
|
|
75610
|
+
var useStyles$k = styles$f.makeStyles(function (theme) {
|
|
75597
75611
|
var _overlay, _menuButton, _title, _listItem, _drawer, _textPrivacy, _subMenuDrawer, _subDrawerItem, _drawerItem, _drawerContent, _drawerPaper, _drawerPaperMobile, _content;
|
|
75598
75612
|
|
|
75599
75613
|
return {
|
|
@@ -75849,7 +75863,7 @@ var TimesIcon = function TimesIcon(_ref) {
|
|
|
75849
75863
|
};
|
|
75850
75864
|
|
|
75851
75865
|
var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
75852
|
-
var _handleUserRole, _clsx;
|
|
75866
|
+
var _handleUserRole, _navigations$filter, _clsx;
|
|
75853
75867
|
|
|
75854
75868
|
var children = _ref.children,
|
|
75855
75869
|
navigations = _ref.navigations,
|
|
@@ -75880,7 +75894,8 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
|
75880
75894
|
onChangeFont = _useHeaderSideBar.onChangeFont,
|
|
75881
75895
|
handleClose = _useHeaderSideBar.handleClose,
|
|
75882
75896
|
renderNavigationItem = _useHeaderSideBar.renderNavigationItem,
|
|
75883
|
-
t = _useHeaderSideBar.t
|
|
75897
|
+
t = _useHeaderSideBar.t,
|
|
75898
|
+
isEnableMarioAi = _useHeaderSideBar.isEnableMarioAi;
|
|
75884
75899
|
|
|
75885
75900
|
return React__default.createElement("div", {
|
|
75886
75901
|
style: {
|
|
@@ -76012,9 +76027,13 @@ var HeaderSideBar = function HeaderSideBar(_ref) {
|
|
|
76012
76027
|
paddingTop: 0,
|
|
76013
76028
|
paddingBottom: 50
|
|
76014
76029
|
}
|
|
76015
|
-
}, !!navigations && navigations.
|
|
76030
|
+
}, !!navigations && (navigations === null || navigations === void 0 ? void 0 : (_navigations$filter = navigations.filter(function (r) {
|
|
76031
|
+
var _r$name;
|
|
76032
|
+
|
|
76033
|
+
return !isEnableMarioAi ? !((_r$name = r.name) !== null && _r$name !== void 0 && _r$name.includes('MarioAI')) : true;
|
|
76034
|
+
})) === null || _navigations$filter === void 0 ? void 0 : _navigations$filter.map(function (navigation) {
|
|
76016
76035
|
return renderNavigationItem(navigation);
|
|
76017
|
-
}))))), React__default.createElement("main", {
|
|
76036
|
+
})))))), React__default.createElement("main", {
|
|
76018
76037
|
className: clsx(classes.content, (_clsx = {}, _clsx[classes.contentShift] = isReadOnly ? false : isOpenSideBar, _clsx))
|
|
76019
76038
|
}, children));
|
|
76020
76039
|
};
|
|
@@ -77641,7 +77660,435 @@ var SurveyQuestion = function SurveyQuestion() {
|
|
|
77641
77660
|
}));
|
|
77642
77661
|
};
|
|
77643
77662
|
|
|
77644
|
-
var
|
|
77663
|
+
var useGeminiAI = function useGeminiAI() {
|
|
77664
|
+
var dispatch = reactRedux.useDispatch();
|
|
77665
|
+
|
|
77666
|
+
var systemPrompt = function systemPrompt(response) {
|
|
77667
|
+
return "\n Please analyze the following student feedback and categorize them into two groups:\n 1. Students who have flagged low energy.\n 2. Students who are feeling really happy.\n\n Return the result in JSON format with the structure:\n {\n \"lowEnergyStudents\": [\"name1\", \"name2\", ...],\n \"happyStudents\": [\"name1\", \"name2\", ...]\n }\n\n Here is the input data:\n " + response.map(function (r, index) {
|
|
77668
|
+
return index + ". " + r.studentName + ": \"" + r.answer + "\"";
|
|
77669
|
+
}) + "\n ";
|
|
77670
|
+
};
|
|
77671
|
+
|
|
77672
|
+
var _useState = React.useState([]),
|
|
77673
|
+
lowEnergyStudents = _useState[0],
|
|
77674
|
+
setLowEnergyStudents = _useState[1];
|
|
77675
|
+
|
|
77676
|
+
var _useState2 = React.useState([]),
|
|
77677
|
+
happyStudents = _useState2[0],
|
|
77678
|
+
setHappyStudents = _useState2[1];
|
|
77679
|
+
|
|
77680
|
+
var summarizeDataSchema = {
|
|
77681
|
+
description: "Summary of student emotional states",
|
|
77682
|
+
type: generativeAi.SchemaType.OBJECT,
|
|
77683
|
+
properties: {
|
|
77684
|
+
lowEnergyStudents: {
|
|
77685
|
+
type: generativeAi.SchemaType.ARRAY,
|
|
77686
|
+
items: {
|
|
77687
|
+
type: generativeAi.SchemaType.STRING
|
|
77688
|
+
}
|
|
77689
|
+
},
|
|
77690
|
+
happyStudents: {
|
|
77691
|
+
type: generativeAi.SchemaType.ARRAY,
|
|
77692
|
+
items: {
|
|
77693
|
+
type: generativeAi.SchemaType.STRING
|
|
77694
|
+
}
|
|
77695
|
+
}
|
|
77696
|
+
},
|
|
77697
|
+
required: ["lowEnergyStudents", "happyStudents"]
|
|
77698
|
+
};
|
|
77699
|
+
|
|
77700
|
+
var askGeminiAI = function askGeminiAI(summarizeResponses) {
|
|
77701
|
+
try {
|
|
77702
|
+
var _temp3 = function _temp3() {
|
|
77703
|
+
dispatch(marioCore.setLoading(false));
|
|
77704
|
+
};
|
|
77705
|
+
|
|
77706
|
+
dispatch(marioCore.setLoading(true));
|
|
77707
|
+
|
|
77708
|
+
var _temp4 = _catch(function () {
|
|
77709
|
+
var _systemPrompt;
|
|
77710
|
+
|
|
77711
|
+
var genAI = new generativeAi.GoogleGenerativeAI("AIzaSyAb1MebW5BcT__I8WZtbvKkDHYzZDHKZro");
|
|
77712
|
+
var model = genAI.getGenerativeModel({
|
|
77713
|
+
model: "gemini-1.5-flash",
|
|
77714
|
+
generationConfig: {
|
|
77715
|
+
responseMimeType: "application/json",
|
|
77716
|
+
responseSchema: summarizeDataSchema
|
|
77717
|
+
}
|
|
77718
|
+
});
|
|
77719
|
+
var prompt = (_systemPrompt = systemPrompt(summarizeResponses)) != null ? _systemPrompt : "";
|
|
77720
|
+
return Promise.resolve(model.generateContent(prompt)).then(function (result) {
|
|
77721
|
+
var _result$response;
|
|
77722
|
+
|
|
77723
|
+
var rawResponse = result === null || result === void 0 ? void 0 : (_result$response = result.response) === null || _result$response === void 0 ? void 0 : _result$response.text();
|
|
77724
|
+
var parsedResponse = JSON.parse(rawResponse);
|
|
77725
|
+
setLowEnergyStudents(parsedResponse.lowEnergyStudents || []);
|
|
77726
|
+
setHappyStudents(parsedResponse.happyStudents || []);
|
|
77727
|
+
});
|
|
77728
|
+
}, function (err) {
|
|
77729
|
+
var _err$response, _err$response$data;
|
|
77730
|
+
|
|
77731
|
+
dispatch(marioCore.setAlert({
|
|
77732
|
+
type: "danger",
|
|
77733
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
|
|
77734
|
+
}));
|
|
77735
|
+
});
|
|
77736
|
+
|
|
77737
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
77738
|
+
} catch (e) {
|
|
77739
|
+
return Promise.reject(e);
|
|
77740
|
+
}
|
|
77741
|
+
};
|
|
77742
|
+
|
|
77743
|
+
return {
|
|
77744
|
+
askGeminiAI: askGeminiAI,
|
|
77745
|
+
lowEnergyStudents: lowEnergyStudents,
|
|
77746
|
+
happyStudents: happyStudents
|
|
77747
|
+
};
|
|
77748
|
+
};
|
|
77749
|
+
|
|
77750
|
+
var SummarizeIcon = function SummarizeIcon() {
|
|
77751
|
+
return React__default.createElement("svg", {
|
|
77752
|
+
width: "34",
|
|
77753
|
+
height: "23",
|
|
77754
|
+
viewBox: "0 0 34 23",
|
|
77755
|
+
fill: "none",
|
|
77756
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
77757
|
+
}, React__default.createElement("path", {
|
|
77758
|
+
d: "M4.55029 2.54133C4.55029 2.2868 4.75663 2.08046 5.01117 2.08046H32.4766C32.7542 2.08046 32.9689 2.32414 32.9338 2.59955L30.5144 21.5967C30.4851 21.8268 30.2893 21.9993 30.0572 21.9993H5.0112C4.75667 21.9993 4.55033 21.793 4.55033 21.5385L4.55029 2.54133Z",
|
|
77759
|
+
fill: "#242424",
|
|
77760
|
+
stroke: "#242424",
|
|
77761
|
+
strokeWidth: "1.5"
|
|
77762
|
+
}), React__default.createElement("path", {
|
|
77763
|
+
d: "M1.09091 1.5377C1.04336 1.25646 1.2601 1 1.54533 1H8.79344C8.991 1 9.16658 1.12591 9.22995 1.31303L10.1746 4.10203C10.238 4.28914 10.4135 4.41505 10.6111 4.41505H26.5365C26.7558 4.41505 26.9448 4.56968 26.9882 4.78471L30.3525 21.4479C30.4102 21.7333 30.192 22 29.9008 22H4.93991C4.71503 22 4.52298 21.8377 4.48549 21.616L1.09091 1.5377Z",
|
|
77764
|
+
fill: "white",
|
|
77765
|
+
stroke: "#242424",
|
|
77766
|
+
strokeWidth: "1.5"
|
|
77767
|
+
}), React__default.createElement("rect", {
|
|
77768
|
+
x: "5.95801",
|
|
77769
|
+
y: "15.3038",
|
|
77770
|
+
width: "8.97068",
|
|
77771
|
+
height: "1.1628",
|
|
77772
|
+
rx: "0.581398",
|
|
77773
|
+
fill: "#242424"
|
|
77774
|
+
}), React__default.createElement("rect", {
|
|
77775
|
+
x: "6.3833",
|
|
77776
|
+
y: "17.6296",
|
|
77777
|
+
width: "8.97068",
|
|
77778
|
+
height: "1.1628",
|
|
77779
|
+
rx: "0.581398",
|
|
77780
|
+
fill: "#242424"
|
|
77781
|
+
}));
|
|
77782
|
+
};
|
|
77783
|
+
|
|
77784
|
+
var UnderstandIcon = function UnderstandIcon() {
|
|
77785
|
+
return React__default.createElement("svg", {
|
|
77786
|
+
width: "34",
|
|
77787
|
+
height: "34",
|
|
77788
|
+
viewBox: "0 0 34 34",
|
|
77789
|
+
fill: "none",
|
|
77790
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
77791
|
+
}, React__default.createElement("ellipse", {
|
|
77792
|
+
cx: "17.2416",
|
|
77793
|
+
cy: "10.9215",
|
|
77794
|
+
rx: "5.0863",
|
|
77795
|
+
ry: "5.10915",
|
|
77796
|
+
fill: "white",
|
|
77797
|
+
stroke: "#242424",
|
|
77798
|
+
strokeWidth: "1.5"
|
|
77799
|
+
}), React__default.createElement("path", {
|
|
77800
|
+
fillRule: "evenodd",
|
|
77801
|
+
clipRule: "evenodd",
|
|
77802
|
+
d: "M27.5707 21.9242C25.8211 19.6208 23.3251 17.9199 20.4453 17.1859C19.5708 17.899 18.456 18.3263 17.2419 18.3263C16.0277 18.3263 14.913 17.899 14.0385 17.1859C11.1587 17.9199 8.66281 19.6206 6.91316 21.9239C9.28534 25.047 13.0294 27.0623 17.2421 27.0623C21.4546 27.0623 25.1985 25.0472 27.5707 21.9242Z",
|
|
77803
|
+
fill: "#242424"
|
|
77804
|
+
}), React__default.createElement("path", {
|
|
77805
|
+
d: "M27.5707 21.9242L28.1679 22.3779L28.5125 21.9243L28.168 21.4706L27.5707 21.9242ZM20.4453 17.1859L20.6305 16.4591L20.2643 16.3658L19.9713 16.6046L20.4453 17.1859ZM14.0385 17.1859L14.5124 16.6046L14.2195 16.3657L13.8532 16.4591L14.0385 17.1859ZM6.91316 21.9239L6.31593 21.4703L5.97134 21.9239L6.31592 22.3776L6.91316 21.9239ZM28.168 21.4706C26.3186 19.0359 23.6791 17.2362 20.6305 16.4591L20.26 17.9127C22.9711 18.6037 25.3235 20.2057 26.9735 22.3779L28.168 21.4706ZM19.9713 16.6046C19.2255 17.2128 18.2768 17.5763 17.2419 17.5763V19.0763C18.6353 19.0763 19.9161 18.5852 20.9193 17.7671L19.9713 16.6046ZM17.2419 17.5763C16.207 17.5763 15.2582 17.2128 14.5124 16.6046L13.5645 17.7671C14.5677 18.5851 15.8485 19.0763 17.2419 19.0763V17.5763ZM13.8532 16.4591C10.8047 17.2361 8.16527 19.0357 6.31593 21.4703L7.5104 22.3776C9.16036 20.2055 11.5127 18.6036 14.2237 17.9126L13.8532 16.4591ZM6.31592 22.3776C8.82331 25.6787 12.7843 27.8123 17.2421 27.8123V26.3123C13.2746 26.3123 9.74737 24.4154 7.51041 21.4703L6.31592 22.3776ZM17.2421 27.8123C21.6997 27.8123 25.6605 25.6788 28.1679 22.3779L26.9735 21.4706C24.7365 24.4155 21.2094 26.3123 17.2421 26.3123V27.8123Z",
|
|
77806
|
+
fill: "#242424"
|
|
77807
|
+
}), React__default.createElement("path", {
|
|
77808
|
+
d: "M8.01468 1H1V8.04619",
|
|
77809
|
+
stroke: "#242424",
|
|
77810
|
+
strokeWidth: "1.5",
|
|
77811
|
+
strokeLinecap: "round"
|
|
77812
|
+
}), React__default.createElement("path", {
|
|
77813
|
+
d: "M8.01468 33H1V25.9538",
|
|
77814
|
+
stroke: "#242424",
|
|
77815
|
+
strokeWidth: "1.5",
|
|
77816
|
+
strokeLinecap: "round"
|
|
77817
|
+
}), React__default.createElement("path", {
|
|
77818
|
+
d: "M25.9853 1H33V8.04619",
|
|
77819
|
+
stroke: "#242424",
|
|
77820
|
+
strokeWidth: "1.5",
|
|
77821
|
+
strokeLinecap: "round"
|
|
77822
|
+
}), React__default.createElement("path", {
|
|
77823
|
+
d: "M25.9853 33H33V25.9538",
|
|
77824
|
+
stroke: "#242424",
|
|
77825
|
+
strokeWidth: "1.5",
|
|
77826
|
+
strokeLinecap: "round"
|
|
77827
|
+
}));
|
|
77828
|
+
};
|
|
77829
|
+
|
|
77830
|
+
var IdentifyIcon = function IdentifyIcon() {
|
|
77831
|
+
return React__default.createElement("svg", {
|
|
77832
|
+
width: "32",
|
|
77833
|
+
height: "34",
|
|
77834
|
+
viewBox: "0 0 32 34",
|
|
77835
|
+
fill: "none",
|
|
77836
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
77837
|
+
}, React__default.createElement("ellipse", {
|
|
77838
|
+
cx: "20.3296",
|
|
77839
|
+
cy: "22.2391",
|
|
77840
|
+
rx: "10.6704",
|
|
77841
|
+
ry: "10.7609",
|
|
77842
|
+
fill: "white",
|
|
77843
|
+
stroke: "#242424",
|
|
77844
|
+
strokeWidth: "1.4"
|
|
77845
|
+
}), React__default.createElement("path", {
|
|
77846
|
+
d: "M26.6513 13.5699C24.8818 12.2552 22.6951 11.4782 20.3286 11.4782C16.3772 11.4782 12.9274 13.6443 11.0831 16.8632C10.1768 18.445 9.6582 20.281 9.6582 22.2391C12.6549 22.8982 20.2488 22.0872 26.6513 13.5699Z",
|
|
77847
|
+
fill: "#242424"
|
|
77848
|
+
}), React__default.createElement("path", {
|
|
77849
|
+
d: "M9.6582 22.2391C12.6549 22.8982 20.2488 22.0872 26.6513 13.5699C24.8818 12.2552 22.6951 11.4782 20.3286 11.4782C16.3772 11.4782 12.9274 13.6443 11.0831 16.8632C10.1768 18.445 9.6582 20.281 9.6582 22.2391ZM9.6582 22.2391L10.5056 26.7454",
|
|
77850
|
+
stroke: "#242424",
|
|
77851
|
+
strokeWidth: "1.4"
|
|
77852
|
+
}), React__default.createElement("path", {
|
|
77853
|
+
d: "M29.1172 27.9828C28.1548 26.9837 25.0222 25.3613 22.2507 26.7542",
|
|
77854
|
+
stroke: "#242424",
|
|
77855
|
+
strokeWidth: "1.4",
|
|
77856
|
+
strokeLinecap: "round"
|
|
77857
|
+
}), React__default.createElement("path", {
|
|
77858
|
+
d: "M1 12.1834L4.25181 14.7912C4.45478 14.954 4.75636 14.8471 4.81296 14.5923L5.40844 11.9119C5.46504 11.6571 5.76662 11.5502 5.96959 11.713L9.46747 14.5181",
|
|
77859
|
+
stroke: "#242424",
|
|
77860
|
+
strokeWidth: "1.4"
|
|
77861
|
+
}), React__default.createElement("path", {
|
|
77862
|
+
d: "M8.70996 3.26892L10.1746 7.19015C10.2658 7.43434 10.5807 7.49719 10.7597 7.30692L12.6297 5.3194C12.8087 5.12913 13.1236 5.19198 13.2149 5.43617L14.7903 9.65411",
|
|
77863
|
+
stroke: "#242424",
|
|
77864
|
+
strokeWidth: "1.4"
|
|
77865
|
+
}), React__default.createElement("path", {
|
|
77866
|
+
d: "M19.7646 1L19.3511 5.17685C19.3256 5.43456 19.5773 5.63142 19.821 5.54443L22.4848 4.59376C22.7286 4.50677 22.9802 4.70362 22.9547 4.96134L22.51 9.45368",
|
|
77867
|
+
stroke: "#242424",
|
|
77868
|
+
strokeWidth: "1.4"
|
|
77869
|
+
}));
|
|
77870
|
+
};
|
|
77871
|
+
|
|
77872
|
+
var CALENDAR_OPTIONS$2 = [{
|
|
77873
|
+
label: "This week",
|
|
77874
|
+
startDate: moment().startOf("week").weekday(1).valueOf(),
|
|
77875
|
+
endDate: moment().endOf("week").weekday(7).valueOf()
|
|
77876
|
+
}, {
|
|
77877
|
+
label: "This month",
|
|
77878
|
+
startDate: moment().startOf("month").valueOf(),
|
|
77879
|
+
endDate: moment().endOf("month").valueOf()
|
|
77880
|
+
}, {
|
|
77881
|
+
label: "This school year",
|
|
77882
|
+
startDate: moment().startOf("year").valueOf(),
|
|
77883
|
+
endDate: moment().endOf("year").valueOf()
|
|
77884
|
+
}];
|
|
77885
|
+
var timeKeywords = ["this month", "this week", "this year", "last month", "last week", "last year", "today"];
|
|
77886
|
+
var IDataType;
|
|
77887
|
+
|
|
77888
|
+
(function (IDataType) {
|
|
77889
|
+
IDataType[IDataType["QuestionAnswer"] = 0] = "QuestionAnswer";
|
|
77890
|
+
IDataType[IDataType["Total"] = 1] = "Total";
|
|
77891
|
+
})(IDataType || (IDataType = {}));
|
|
77892
|
+
var THEME = {
|
|
77893
|
+
LIGHT: 'light',
|
|
77894
|
+
DARK: 'dark'
|
|
77895
|
+
};
|
|
77896
|
+
var MessageRole;
|
|
77897
|
+
|
|
77898
|
+
(function (MessageRole) {
|
|
77899
|
+
MessageRole[MessageRole["System"] = 0] = "System";
|
|
77900
|
+
MessageRole[MessageRole["User"] = 1] = "User";
|
|
77901
|
+
MessageRole[MessageRole["Model"] = 2] = "Model";
|
|
77902
|
+
})(MessageRole || (MessageRole = {}));
|
|
77903
|
+
|
|
77904
|
+
var DEFAULT_START_DATE$3 = moment().subtract(2, 'months').startOf("day").valueOf();
|
|
77905
|
+
var DEFAULT_END_DATE$3 = moment().endOf("day").valueOf();
|
|
77906
|
+
|
|
77907
|
+
var useSummarizeResponse = function useSummarizeResponse() {
|
|
77908
|
+
var dispatch = reactRedux.useDispatch();
|
|
77909
|
+
|
|
77910
|
+
var _useState = React.useState([]),
|
|
77911
|
+
summarizeResponses = _useState[0],
|
|
77912
|
+
setSummarizeResponses = _useState[1];
|
|
77913
|
+
|
|
77914
|
+
var _useState2 = React.useState({
|
|
77915
|
+
startDate: undefined,
|
|
77916
|
+
endDate: undefined
|
|
77917
|
+
}),
|
|
77918
|
+
filters = _useState2[0],
|
|
77919
|
+
setFilters = _useState2[1];
|
|
77920
|
+
|
|
77921
|
+
var handleChangeFilter = function handleChangeFilter(option) {
|
|
77922
|
+
setFilters({
|
|
77923
|
+
startDate: option.startDate,
|
|
77924
|
+
endDate: option.endDate
|
|
77925
|
+
});
|
|
77926
|
+
};
|
|
77927
|
+
|
|
77928
|
+
var getSummarizeQuestion = React.useCallback(function () {
|
|
77929
|
+
try {
|
|
77930
|
+
var _temp3 = function _temp3() {
|
|
77931
|
+
dispatch(marioCore.setLoading(false));
|
|
77932
|
+
};
|
|
77933
|
+
|
|
77934
|
+
dispatch(marioCore.setLoading(true));
|
|
77935
|
+
|
|
77936
|
+
var _temp4 = _catch(function () {
|
|
77937
|
+
return Promise.resolve(getSummarizeReport({
|
|
77938
|
+
startDate: DEFAULT_START_DATE,
|
|
77939
|
+
endDate: DEFAULT_END_DATE
|
|
77940
|
+
})).then(function (res) {
|
|
77941
|
+
if (res.data) {
|
|
77942
|
+
setSummarizeResponses(res.data.items || []);
|
|
77943
|
+
}
|
|
77944
|
+
});
|
|
77945
|
+
}, function (err) {
|
|
77946
|
+
dispatch(marioCore.setAlert({
|
|
77947
|
+
type: "danger",
|
|
77948
|
+
message: err.message
|
|
77949
|
+
}));
|
|
77950
|
+
});
|
|
77951
|
+
|
|
77952
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
77953
|
+
} catch (e) {
|
|
77954
|
+
return Promise.reject(e);
|
|
77955
|
+
}
|
|
77956
|
+
}, [filters]);
|
|
77957
|
+
React.useEffect(function () {
|
|
77958
|
+
if (filters.startDate && filters.endDate) {
|
|
77959
|
+
getSummarizeQuestion();
|
|
77960
|
+
}
|
|
77961
|
+
}, [filters]);
|
|
77962
|
+
return {
|
|
77963
|
+
handleChangeFilter: handleChangeFilter,
|
|
77964
|
+
summarizeResponses: summarizeResponses
|
|
77965
|
+
};
|
|
77966
|
+
};
|
|
77967
|
+
|
|
77968
|
+
var MarioAi = function MarioAi() {
|
|
77969
|
+
var _useGeminiAI = useGeminiAI(),
|
|
77970
|
+
askGeminiAI = _useGeminiAI.askGeminiAI,
|
|
77971
|
+
lowEnergyStudents = _useGeminiAI.lowEnergyStudents,
|
|
77972
|
+
happyStudents = _useGeminiAI.happyStudents;
|
|
77973
|
+
|
|
77974
|
+
var _useSummarizeResponse = useSummarizeResponse(),
|
|
77975
|
+
handleChangeFilter = _useSummarizeResponse.handleChangeFilter,
|
|
77976
|
+
summarizeResponses = _useSummarizeResponse.summarizeResponses;
|
|
77977
|
+
|
|
77978
|
+
var renderStudentList = function renderStudentList(title, students) {
|
|
77979
|
+
return React__default.createElement(core$1.Grid, {
|
|
77980
|
+
className: "mt-5"
|
|
77981
|
+
}, React__default.createElement(core$1.Typography, null, title), students.map(function (student, index) {
|
|
77982
|
+
return React__default.createElement(core$1.Typography, {
|
|
77983
|
+
key: index
|
|
77984
|
+
}, index + 1 + ". " + student);
|
|
77985
|
+
}));
|
|
77986
|
+
};
|
|
77987
|
+
|
|
77988
|
+
return React__default.createElement(core$1.Grid, null, React__default.createElement(core$1.Grid, {
|
|
77989
|
+
className: "mt-5"
|
|
77990
|
+
}, CALENDAR_OPTIONS$2.map(function (option) {
|
|
77991
|
+
return React__default.createElement(core$1.Button, {
|
|
77992
|
+
key: option.label,
|
|
77993
|
+
onClick: function onClick() {
|
|
77994
|
+
return handleChangeFilter(option);
|
|
77995
|
+
}
|
|
77996
|
+
}, option.label);
|
|
77997
|
+
}), React__default.createElement(core$1.Grid, {
|
|
77998
|
+
className: "my-5"
|
|
77999
|
+
}, React__default.createElement(core$1.Typography, null, "Summarize responses:"), summarizeResponses.map(function (response) {
|
|
78000
|
+
return React__default.createElement(core$1.Grid, null, React__default.createElement(core$1.Typography, null, response.studentName), React__default.createElement(core$1.Typography, null, response.answer));
|
|
78001
|
+
})), React__default.createElement(core$1.Grid, null, renderStudentList("Students have flagged low energy this week:", lowEnergyStudents), renderStudentList("Students are feeling really happy:", happyStudents)), React__default.createElement(core$1.Button, {
|
|
78002
|
+
onClick: function onClick() {
|
|
78003
|
+
return askGeminiAI(summarizeResponses);
|
|
78004
|
+
}
|
|
78005
|
+
}, "Generate")));
|
|
78006
|
+
};
|
|
78007
|
+
|
|
78008
|
+
var styles$d = {"ai-mario-container":"_1hAN-","ai-mario":"_U4585","ai-mario-header":"_3H3TX","title-welcome":"_2wizn","title-help-question":"_1uejP","card-data-container":"_wXhYW","card":"_3F1f0","content":"_cB_eW","title":"_30saB","description-card":"_6m3YS","icon":"_gG2mp","go-icon":"_1tJEn","list-prompts":"_1O09T","header":"_1lK2v","see-all":"_1Qk2i","text":"_3qcYP","list-item":"_2DkM3","item":"_1FFC5","background":"_rGovp","left":"_1X7t2","right":"_1w2YZ","opacity-footer":"_4kmno","dot-color":"_6K7Pz","dot-color__top":"_3mOqe","dot-color__bottom":"_1LVOo","ai-mario-chat":"_2eGy1","ai-mario-chat__header":"_1_oTD","go-back":"_u-oqg","chat-title":"_PBH_Y","switch-theme":"_31WqA","item___light-btn":"_3Zheb","item___dark-btn":"_7T1lB","ai-mario-chat__header___dark":"__lhBc","ai-mario-chat__content":"_2h1fv","content-container":"_3kxy-","chat-box":"_3gjP5","chat-box__content":"_2x_-F","name":"_2bqyW","message":"_1N1T3","option":"_31bf9","option__item":"_7cV8X","loader":"_2YD7M","loader__dot":"_23N4j","dot":"_3St_4","time":"_CjCyy","chat-box__user":"_ZC3ml","chat-box__user-container":"_2oBqf","ai-mario-chat__content___dark":"_1r1Jl","action-wrapper":"_2o38p","action-item":"_1IcP8","bracketed-input":"_206DV","bracketed-input-block":"_1A9xm","icon-input":"_1Lwom"};
|
|
78009
|
+
|
|
78010
|
+
var ArrowRightIcon = function ArrowRightIcon() {
|
|
78011
|
+
return React__default.createElement("svg", {
|
|
78012
|
+
width: "16",
|
|
78013
|
+
height: "16",
|
|
78014
|
+
viewBox: "0 0 16 16",
|
|
78015
|
+
fill: "none",
|
|
78016
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78017
|
+
}, React__default.createElement("path", {
|
|
78018
|
+
d: "M8.75036 3C8.55112 3 8.36007 3.07928 8.21936 3.22034C8.0783 3.36105 7.99902 3.5521 7.99902 3.75134C7.99902 3.95058 8.0783 4.14163 8.21936 4.28234L11.4397 7.50146H2.75C2.33579 7.50146 2 7.83725 2 8.25146C2 8.66568 2.33579 9.00146 2.75 9.00146H11.4395L8.21936 12.2203C7.9261 12.5136 7.9261 12.9891 8.21936 13.2823C8.51263 13.5756 8.9881 13.5756 9.28136 13.2823L13.7814 8.78234C13.9224 8.64163 14.0017 8.45058 14.0017 8.25134C14.0017 8.0521 13.9224 7.86105 13.7814 7.72034L9.28136 3.22034C9.14066 3.07928 8.9496 3 8.75036 3Z",
|
|
78019
|
+
fill: "#316CD9"
|
|
78020
|
+
}));
|
|
78021
|
+
};
|
|
78022
|
+
|
|
78023
|
+
var CardHeader = function CardHeader(_ref) {
|
|
78024
|
+
var id = _ref.id,
|
|
78025
|
+
name = _ref.name,
|
|
78026
|
+
description = _ref.description,
|
|
78027
|
+
icon = _ref.icon,
|
|
78028
|
+
goToChat = _ref.goToChat;
|
|
78029
|
+
return React__default.createElement("button", {
|
|
78030
|
+
type: 'button',
|
|
78031
|
+
onClick: function onClick() {
|
|
78032
|
+
goToChat(id);
|
|
78033
|
+
},
|
|
78034
|
+
className: styles$d['card']
|
|
78035
|
+
}, React__default.createElement("div", {
|
|
78036
|
+
className: styles$d['content']
|
|
78037
|
+
}, React__default.createElement("div", {
|
|
78038
|
+
className: styles$d['title'],
|
|
78039
|
+
dangerouslySetInnerHTML: {
|
|
78040
|
+
__html: name
|
|
78041
|
+
}
|
|
78042
|
+
}), React__default.createElement("div", {
|
|
78043
|
+
className: styles$d['description-card'],
|
|
78044
|
+
dangerouslySetInnerHTML: {
|
|
78045
|
+
__html: description
|
|
78046
|
+
}
|
|
78047
|
+
})), React__default.createElement("div", {
|
|
78048
|
+
className: styles$d['icon']
|
|
78049
|
+
}, icon), React__default.createElement("div", {
|
|
78050
|
+
className: styles$d['go-icon']
|
|
78051
|
+
}, React__default.createElement(ArrowRightIcon, null)));
|
|
78052
|
+
};
|
|
78053
|
+
|
|
78054
|
+
var HeaderAI = function HeaderAI(_ref) {
|
|
78055
|
+
var prompts = _ref.prompts,
|
|
78056
|
+
goToChat = _ref.goToChat,
|
|
78057
|
+
generateIcons = _ref.generateIcons;
|
|
78058
|
+
return React__default.createElement("div", {
|
|
78059
|
+
className: styles$d['ai-mario-header']
|
|
78060
|
+
}, React__default.createElement("div", {
|
|
78061
|
+
className: styles$d['title-welcome']
|
|
78062
|
+
}, "Hello, Kathryn. I'm your AI assistant created by MARIO."), React__default.createElement("div", {
|
|
78063
|
+
className: styles$d['title-help-question']
|
|
78064
|
+
}, "How can I help you today?"), React__default.createElement("div", {
|
|
78065
|
+
className: styles$d['card-data-container']
|
|
78066
|
+
}, prompts.map(function (r) {
|
|
78067
|
+
return React__default.createElement(CardHeader, {
|
|
78068
|
+
key: r.name,
|
|
78069
|
+
id: r.id,
|
|
78070
|
+
name: r.name,
|
|
78071
|
+
description: r.description,
|
|
78072
|
+
icon: generateIcons(r.name),
|
|
78073
|
+
goToChat: goToChat
|
|
78074
|
+
});
|
|
78075
|
+
})));
|
|
78076
|
+
};
|
|
78077
|
+
|
|
78078
|
+
var MoreIcon = function MoreIcon() {
|
|
78079
|
+
return React__default.createElement("svg", {
|
|
78080
|
+
width: "24",
|
|
78081
|
+
height: "24",
|
|
78082
|
+
viewBox: "0 0 24 24",
|
|
78083
|
+
fill: "none",
|
|
78084
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78085
|
+
}, React__default.createElement("g", {
|
|
78086
|
+
opacity: "0.4"
|
|
78087
|
+
}, React__default.createElement("path", {
|
|
78088
|
+
d: "M12 19.2693C11.5875 19.2693 11.2344 19.1224 10.9408 18.8285C10.6469 18.5349 10.5 18.1818 10.5 17.7693C10.5 17.3568 10.6469 17.0036 10.9408 16.7098C11.2344 16.4161 11.5875 16.2693 12 16.2693C12.4125 16.2693 12.7656 16.4161 13.0592 16.7098C13.3531 17.0036 13.5 17.3568 13.5 17.7693C13.5 18.1818 13.3531 18.5349 13.0592 18.8285C12.7656 19.1224 12.4125 19.2693 12 19.2693ZM12 13.5C11.5875 13.5 11.2344 13.3531 10.9408 13.0593C10.6469 12.7656 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9408C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9408C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7656 13.0592 13.0593C12.7656 13.3531 12.4125 13.5 12 13.5ZM12 7.73077C11.5875 7.73077 11.2344 7.58394 10.9408 7.29027C10.6469 6.99644 10.5 6.64327 10.5 6.23077C10.5 5.81827 10.6469 5.46519 10.9408 5.17152C11.2344 4.87769 11.5875 4.73077 12 4.73077C12.4125 4.73077 12.7656 4.87769 13.0592 5.17152C13.3531 5.46519 13.5 5.81827 13.5 6.23077C13.5 6.64327 13.3531 6.99644 13.0592 7.29027C12.7656 7.58394 12.4125 7.73077 12 7.73077Z",
|
|
78089
|
+
fill: "#242424"
|
|
78090
|
+
})));
|
|
78091
|
+
};
|
|
77645
78092
|
|
|
77646
78093
|
var PopoverCustom$1 = core$1.styled(core$1.Popover)(function () {
|
|
77647
78094
|
return {
|
|
@@ -77651,6 +78098,1097 @@ var PopoverCustom$1 = core$1.styled(core$1.Popover)(function () {
|
|
|
77651
78098
|
};
|
|
77652
78099
|
});
|
|
77653
78100
|
|
|
78101
|
+
var ListPrompts = function ListPrompts(_ref) {
|
|
78102
|
+
var maxHeight = _ref.maxHeight,
|
|
78103
|
+
historyPrompts = _ref.historyPrompts,
|
|
78104
|
+
handleClickAction = _ref.handleClickAction,
|
|
78105
|
+
handleCloseAction = _ref.handleCloseAction,
|
|
78106
|
+
anchorEl = _ref.anchorEl,
|
|
78107
|
+
popoverId = _ref.popoverId,
|
|
78108
|
+
openPopover = _ref.openPopover,
|
|
78109
|
+
removeData = _ref.removeData,
|
|
78110
|
+
selectId = _ref.selectId,
|
|
78111
|
+
goToViewHistory = _ref.goToViewHistory,
|
|
78112
|
+
generateIcons = _ref.generateIcons;
|
|
78113
|
+
return React__default.createElement("div", {
|
|
78114
|
+
className: styles$d['list-prompts'],
|
|
78115
|
+
style: {
|
|
78116
|
+
maxHeight: maxHeight / 2 + 25
|
|
78117
|
+
}
|
|
78118
|
+
}, React__default.createElement("div", {
|
|
78119
|
+
className: styles$d['header']
|
|
78120
|
+
}, React__default.createElement("div", {
|
|
78121
|
+
className: styles$d['title']
|
|
78122
|
+
}, "Last Prompts"), React__default.createElement("button", {
|
|
78123
|
+
type: 'button',
|
|
78124
|
+
className: styles$d['see-all']
|
|
78125
|
+
}, React__default.createElement("div", {
|
|
78126
|
+
className: styles$d['text'],
|
|
78127
|
+
onClick: function onClick() {
|
|
78128
|
+
console.log('ok');
|
|
78129
|
+
}
|
|
78130
|
+
}, "See all"), React__default.createElement(ArrowRightIcon, null))), React__default.createElement("div", {
|
|
78131
|
+
className: styles$d['list-item']
|
|
78132
|
+
}, historyPrompts.map(function (prompt) {
|
|
78133
|
+
return React__default.createElement("div", {
|
|
78134
|
+
key: prompt.name,
|
|
78135
|
+
className: styles$d['item']
|
|
78136
|
+
}, React__default.createElement("div", {
|
|
78137
|
+
className: styles$d['background']
|
|
78138
|
+
}), React__default.createElement("div", {
|
|
78139
|
+
className: styles$d['left']
|
|
78140
|
+
}, React__default.createElement("div", {
|
|
78141
|
+
className: styles$d['icon']
|
|
78142
|
+
}, generateIcons(prompt.name)), React__default.createElement("div", {
|
|
78143
|
+
className: styles$d['text']
|
|
78144
|
+
}, prompt.name)), React__default.createElement("div", {
|
|
78145
|
+
className: styles$d['right']
|
|
78146
|
+
}, React__default.createElement("div", {
|
|
78147
|
+
className: styles$d['text']
|
|
78148
|
+
}, prompt.createdAt), React__default.createElement("button", {
|
|
78149
|
+
type: 'button',
|
|
78150
|
+
className: styles$d['icon'],
|
|
78151
|
+
onClick: function onClick(event) {
|
|
78152
|
+
return handleClickAction(event, prompt.id);
|
|
78153
|
+
}
|
|
78154
|
+
}, React__default.createElement(MoreIcon, null))));
|
|
78155
|
+
})), React__default.createElement("div", {
|
|
78156
|
+
className: styles$d['opacity-footer']
|
|
78157
|
+
}), React__default.createElement(PopoverCustom$1, {
|
|
78158
|
+
id: popoverId,
|
|
78159
|
+
open: openPopover,
|
|
78160
|
+
anchorEl: anchorEl,
|
|
78161
|
+
onClose: function onClose() {
|
|
78162
|
+
return handleCloseAction();
|
|
78163
|
+
},
|
|
78164
|
+
anchorOrigin: {
|
|
78165
|
+
vertical: "top",
|
|
78166
|
+
horizontal: "left"
|
|
78167
|
+
},
|
|
78168
|
+
transformOrigin: {
|
|
78169
|
+
vertical: "top",
|
|
78170
|
+
horizontal: "left"
|
|
78171
|
+
}
|
|
78172
|
+
}, React__default.createElement("ul", {
|
|
78173
|
+
className: "" + styles$d["action-wrapper"]
|
|
78174
|
+
}, React__default.createElement("li", {
|
|
78175
|
+
onClick: function onClick() {
|
|
78176
|
+
goToViewHistory(selectId);
|
|
78177
|
+
},
|
|
78178
|
+
className: styles$d["action-item"] + " text-nowrap"
|
|
78179
|
+
}, "view"), React__default.createElement("li", {
|
|
78180
|
+
onClick: function onClick() {
|
|
78181
|
+
removeData(selectId);
|
|
78182
|
+
},
|
|
78183
|
+
className: styles$d["action-item"] + " text-nowrap"
|
|
78184
|
+
}, "remove"))));
|
|
78185
|
+
};
|
|
78186
|
+
|
|
78187
|
+
var PROMPT_URL = marioCore.BASE_URL + "/api/Prompt";
|
|
78188
|
+
var getPrompt = function getPrompt() {
|
|
78189
|
+
return marioCore.api.get("" + PROMPT_URL);
|
|
78190
|
+
};
|
|
78191
|
+
var getById$p = function getById(id) {
|
|
78192
|
+
return marioCore.api.get(PROMPT_URL + "/" + id);
|
|
78193
|
+
};
|
|
78194
|
+
var getHistoryPrompt = function getHistoryPrompt() {
|
|
78195
|
+
return marioCore.api.get(PROMPT_URL + "/history");
|
|
78196
|
+
};
|
|
78197
|
+
var getSessionAnswer = function getSessionAnswer(params) {
|
|
78198
|
+
return marioCore.api.get(PROMPT_URL + "/session-data", {
|
|
78199
|
+
params: params
|
|
78200
|
+
});
|
|
78201
|
+
};
|
|
78202
|
+
var createHistory = function createHistory(data) {
|
|
78203
|
+
return marioCore.api.post(PROMPT_URL + "/create-history", data);
|
|
78204
|
+
};
|
|
78205
|
+
var removeHistory = function removeHistory(id) {
|
|
78206
|
+
return marioCore.api["delete"](PROMPT_URL + "/history/" + id);
|
|
78207
|
+
};
|
|
78208
|
+
var getHistoryById = function getHistoryById(id) {
|
|
78209
|
+
return marioCore.api.get(PROMPT_URL + "/history/" + id);
|
|
78210
|
+
};
|
|
78211
|
+
var getTotalSession = function getTotalSession(params) {
|
|
78212
|
+
return marioCore.api.get(PROMPT_URL + "/session-total-data", {
|
|
78213
|
+
params: params
|
|
78214
|
+
});
|
|
78215
|
+
};
|
|
78216
|
+
|
|
78217
|
+
var useAIMario = function useAIMario() {
|
|
78218
|
+
var history = reactRouterDom.useHistory();
|
|
78219
|
+
var dispatch = reactRedux.useDispatch();
|
|
78220
|
+
var isOpenSideBar = reactRedux.useSelector(function (state) {
|
|
78221
|
+
var _state$common;
|
|
78222
|
+
|
|
78223
|
+
return (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.menuBar;
|
|
78224
|
+
});
|
|
78225
|
+
|
|
78226
|
+
var _useState = React.useState(null),
|
|
78227
|
+
anchorEl = _useState[0],
|
|
78228
|
+
setAnchorEl = _useState[1];
|
|
78229
|
+
|
|
78230
|
+
var aiMarioRef = React.useRef(null);
|
|
78231
|
+
|
|
78232
|
+
var _useState2 = React.useState(0),
|
|
78233
|
+
height = _useState2[0],
|
|
78234
|
+
setHeight = _useState2[1];
|
|
78235
|
+
|
|
78236
|
+
var _useState3 = React.useState([]),
|
|
78237
|
+
prompts = _useState3[0],
|
|
78238
|
+
setPrompts = _useState3[1];
|
|
78239
|
+
|
|
78240
|
+
var _useState4 = React.useState([]),
|
|
78241
|
+
historyPrompts = _useState4[0],
|
|
78242
|
+
setHistoryPrompts = _useState4[1];
|
|
78243
|
+
|
|
78244
|
+
var _useState5 = React.useState(null),
|
|
78245
|
+
selectId = _useState5[0],
|
|
78246
|
+
setSelectId = _useState5[1];
|
|
78247
|
+
|
|
78248
|
+
var handleClickAction = function handleClickAction(event, id) {
|
|
78249
|
+
setAnchorEl(event.currentTarget);
|
|
78250
|
+
setSelectId(id);
|
|
78251
|
+
};
|
|
78252
|
+
|
|
78253
|
+
var openPopover = Boolean(anchorEl);
|
|
78254
|
+
var popoverId = openPopover ? "simple-popover" : undefined;
|
|
78255
|
+
|
|
78256
|
+
var handleCloseAction = function handleCloseAction() {
|
|
78257
|
+
setAnchorEl(null);
|
|
78258
|
+
};
|
|
78259
|
+
|
|
78260
|
+
var goToChat = function goToChat(id) {
|
|
78261
|
+
history.push("/admin/mario-ai/chat/" + id);
|
|
78262
|
+
};
|
|
78263
|
+
|
|
78264
|
+
var goToViewHistory = function goToViewHistory(id) {
|
|
78265
|
+
history.push("/admin/mario-ai/history/" + id);
|
|
78266
|
+
};
|
|
78267
|
+
|
|
78268
|
+
var getAllPrompt = React.useCallback(function () {
|
|
78269
|
+
try {
|
|
78270
|
+
var _temp3 = function _temp3() {
|
|
78271
|
+
dispatch(marioCore.setLoading(false));
|
|
78272
|
+
};
|
|
78273
|
+
|
|
78274
|
+
dispatch(marioCore.setLoading(true));
|
|
78275
|
+
|
|
78276
|
+
var _temp4 = _catch(function () {
|
|
78277
|
+
return Promise.resolve(getPrompt()).then(function (res) {
|
|
78278
|
+
if (res.data) {
|
|
78279
|
+
setPrompts(res.data || []);
|
|
78280
|
+
}
|
|
78281
|
+
});
|
|
78282
|
+
}, function (err) {
|
|
78283
|
+
dispatch(marioCore.setAlert({
|
|
78284
|
+
type: "danger",
|
|
78285
|
+
message: err.message
|
|
78286
|
+
}));
|
|
78287
|
+
});
|
|
78288
|
+
|
|
78289
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
78290
|
+
} catch (e) {
|
|
78291
|
+
return Promise.reject(e);
|
|
78292
|
+
}
|
|
78293
|
+
}, []);
|
|
78294
|
+
var getAllHistoryPrompt = React.useCallback(function () {
|
|
78295
|
+
try {
|
|
78296
|
+
var _temp7 = function _temp7() {
|
|
78297
|
+
dispatch(marioCore.setLoading(false));
|
|
78298
|
+
};
|
|
78299
|
+
|
|
78300
|
+
dispatch(marioCore.setLoading(true));
|
|
78301
|
+
|
|
78302
|
+
var _temp8 = _catch(function () {
|
|
78303
|
+
return Promise.resolve(getHistoryPrompt()).then(function (res) {
|
|
78304
|
+
if (res.data) {
|
|
78305
|
+
setHistoryPrompts(res.data || []);
|
|
78306
|
+
}
|
|
78307
|
+
});
|
|
78308
|
+
}, function (err) {
|
|
78309
|
+
dispatch(marioCore.setAlert({
|
|
78310
|
+
type: "danger",
|
|
78311
|
+
message: err.message
|
|
78312
|
+
}));
|
|
78313
|
+
});
|
|
78314
|
+
|
|
78315
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
|
|
78316
|
+
} catch (e) {
|
|
78317
|
+
return Promise.reject(e);
|
|
78318
|
+
}
|
|
78319
|
+
}, []);
|
|
78320
|
+
var removeData = React.useCallback(function (id) {
|
|
78321
|
+
try {
|
|
78322
|
+
dispatch(marioCore.setModal({
|
|
78323
|
+
isOpen: true,
|
|
78324
|
+
type: "warning",
|
|
78325
|
+
message: "Do you want to delete this history?",
|
|
78326
|
+
onConfirm: function () {
|
|
78327
|
+
try {
|
|
78328
|
+
var _temp11 = function _temp11() {
|
|
78329
|
+
dispatch(marioCore.setLoading(false));
|
|
78330
|
+
};
|
|
78331
|
+
|
|
78332
|
+
dispatch(marioCore.setLoading(true));
|
|
78333
|
+
|
|
78334
|
+
var _temp12 = _catch(function () {
|
|
78335
|
+
return Promise.resolve(removeHistory(id)).then(function () {
|
|
78336
|
+
return Promise.resolve(getAllHistoryPrompt()).then(function () {
|
|
78337
|
+
dispatch(marioCore.setAlert({
|
|
78338
|
+
type: "success",
|
|
78339
|
+
message: "Delete history successfully"
|
|
78340
|
+
}));
|
|
78341
|
+
});
|
|
78342
|
+
});
|
|
78343
|
+
}, function (err) {
|
|
78344
|
+
var _err$response;
|
|
78345
|
+
|
|
78346
|
+
dispatch(marioCore.setAlert({
|
|
78347
|
+
type: "danger",
|
|
78348
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : _err$response.data) || err.message
|
|
78349
|
+
}));
|
|
78350
|
+
});
|
|
78351
|
+
|
|
78352
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp11) : _temp11(_temp12));
|
|
78353
|
+
} catch (e) {
|
|
78354
|
+
return Promise.reject(e);
|
|
78355
|
+
}
|
|
78356
|
+
}
|
|
78357
|
+
}));
|
|
78358
|
+
return Promise.resolve();
|
|
78359
|
+
} catch (e) {
|
|
78360
|
+
return Promise.reject(e);
|
|
78361
|
+
}
|
|
78362
|
+
}, []);
|
|
78363
|
+
React.useEffect(function () {
|
|
78364
|
+
getAllPrompt();
|
|
78365
|
+
getAllHistoryPrompt();
|
|
78366
|
+
|
|
78367
|
+
if (aiMarioRef.current) {
|
|
78368
|
+
var _height = aiMarioRef.current.offsetHeight;
|
|
78369
|
+
setHeight(_height);
|
|
78370
|
+
}
|
|
78371
|
+
}, []);
|
|
78372
|
+
return {
|
|
78373
|
+
handleClickAction: handleClickAction,
|
|
78374
|
+
handleCloseAction: handleCloseAction,
|
|
78375
|
+
anchorEl: anchorEl,
|
|
78376
|
+
popoverId: popoverId,
|
|
78377
|
+
openPopover: openPopover,
|
|
78378
|
+
goToChat: goToChat,
|
|
78379
|
+
isOpenSideBar: isOpenSideBar,
|
|
78380
|
+
height: height,
|
|
78381
|
+
aiMarioRef: aiMarioRef,
|
|
78382
|
+
prompts: prompts,
|
|
78383
|
+
historyPrompts: historyPrompts,
|
|
78384
|
+
removeData: removeData,
|
|
78385
|
+
selectId: selectId,
|
|
78386
|
+
goToViewHistory: goToViewHistory
|
|
78387
|
+
};
|
|
78388
|
+
};
|
|
78389
|
+
|
|
78390
|
+
var AIMario = function AIMario() {
|
|
78391
|
+
var _useAIMario = useAIMario(),
|
|
78392
|
+
isOpenSideBar = _useAIMario.isOpenSideBar,
|
|
78393
|
+
height = _useAIMario.height,
|
|
78394
|
+
aiMarioRef = _useAIMario.aiMarioRef,
|
|
78395
|
+
prompts = _useAIMario.prompts,
|
|
78396
|
+
goToChat = _useAIMario.goToChat,
|
|
78397
|
+
historyPrompts = _useAIMario.historyPrompts,
|
|
78398
|
+
handleClickAction = _useAIMario.handleClickAction,
|
|
78399
|
+
handleCloseAction = _useAIMario.handleCloseAction,
|
|
78400
|
+
anchorEl = _useAIMario.anchorEl,
|
|
78401
|
+
popoverId = _useAIMario.popoverId,
|
|
78402
|
+
openPopover = _useAIMario.openPopover,
|
|
78403
|
+
removeData = _useAIMario.removeData,
|
|
78404
|
+
selectId = _useAIMario.selectId,
|
|
78405
|
+
goToViewHistory = _useAIMario.goToViewHistory;
|
|
78406
|
+
|
|
78407
|
+
var generateIcons = function generateIcons(title) {
|
|
78408
|
+
var index = prompts.findIndex(function (r) {
|
|
78409
|
+
return r.name == title;
|
|
78410
|
+
});
|
|
78411
|
+
|
|
78412
|
+
switch (index) {
|
|
78413
|
+
case 0:
|
|
78414
|
+
return React__default.createElement(SummarizeIcon, null);
|
|
78415
|
+
|
|
78416
|
+
case 1:
|
|
78417
|
+
return React__default.createElement(UnderstandIcon, null);
|
|
78418
|
+
|
|
78419
|
+
case 2:
|
|
78420
|
+
return React__default.createElement(IdentifyIcon, null);
|
|
78421
|
+
|
|
78422
|
+
default:
|
|
78423
|
+
return React__default.createElement(IdentifyIcon, null);
|
|
78424
|
+
}
|
|
78425
|
+
};
|
|
78426
|
+
|
|
78427
|
+
return React__default.createElement("div", {
|
|
78428
|
+
className: styles$d["ai-mario-container"],
|
|
78429
|
+
style: isOpenSideBar ? {
|
|
78430
|
+
width: "calc(100vw - 300px)"
|
|
78431
|
+
} : {}
|
|
78432
|
+
}, React__default.createElement("div", {
|
|
78433
|
+
className: styles$d["ai-mario"],
|
|
78434
|
+
id: "ai_mario",
|
|
78435
|
+
ref: aiMarioRef
|
|
78436
|
+
}, React__default.createElement(HeaderAI, {
|
|
78437
|
+
prompts: prompts,
|
|
78438
|
+
goToChat: goToChat,
|
|
78439
|
+
generateIcons: generateIcons
|
|
78440
|
+
}), React__default.createElement(ListPrompts, {
|
|
78441
|
+
maxHeight: height,
|
|
78442
|
+
historyPrompts: historyPrompts,
|
|
78443
|
+
handleClickAction: handleClickAction,
|
|
78444
|
+
handleCloseAction: handleCloseAction,
|
|
78445
|
+
anchorEl: anchorEl,
|
|
78446
|
+
popoverId: popoverId,
|
|
78447
|
+
openPopover: openPopover,
|
|
78448
|
+
removeData: removeData,
|
|
78449
|
+
selectId: selectId,
|
|
78450
|
+
goToViewHistory: goToViewHistory,
|
|
78451
|
+
generateIcons: generateIcons
|
|
78452
|
+
}), React__default.createElement("div", {
|
|
78453
|
+
className: styles$d["dot-color"] + " " + styles$d["dot-color__top"]
|
|
78454
|
+
}), React__default.createElement("div", {
|
|
78455
|
+
className: styles$d["dot-color"] + " " + styles$d["dot-color__bottom"]
|
|
78456
|
+
})));
|
|
78457
|
+
};
|
|
78458
|
+
|
|
78459
|
+
var ArrowBackIcon = function ArrowBackIcon(_ref) {
|
|
78460
|
+
var _ref$color = _ref.color,
|
|
78461
|
+
color = _ref$color === void 0 ? '#242424' : _ref$color;
|
|
78462
|
+
return React__default.createElement("svg", {
|
|
78463
|
+
width: "16",
|
|
78464
|
+
height: "16",
|
|
78465
|
+
viewBox: "0 0 16 16",
|
|
78466
|
+
fill: "none",
|
|
78467
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78468
|
+
}, React__default.createElement("path", {
|
|
78469
|
+
d: "M7.24964 3C7.44888 3 7.63993 3.07928 7.78064 3.22034C7.9217 3.36105 8.00098 3.5521 8.00098 3.75134C8.00098 3.95058 7.9217 4.14163 7.78064 4.28234L4.5603 7.50146H13.25C13.6642 7.50146 14 7.83725 14 8.25146C14 8.66568 13.6642 9.00146 13.25 9.00146H4.56054L7.78064 12.2203C8.0739 12.5136 8.0739 12.9891 7.78064 13.2823C7.48737 13.5756 7.0119 13.5756 6.71864 13.2823L2.21864 8.78234C2.07757 8.64163 1.99829 8.45058 1.99829 8.25134C1.99829 8.0521 2.07757 7.86105 2.21864 7.72034L6.71864 3.22034C6.85934 3.07928 7.0504 3 7.24964 3Z",
|
|
78470
|
+
fill: color
|
|
78471
|
+
}));
|
|
78472
|
+
};
|
|
78473
|
+
|
|
78474
|
+
var LightIcon = function LightIcon(_ref) {
|
|
78475
|
+
var _ref$color = _ref.color,
|
|
78476
|
+
color = _ref$color === void 0 ? '#242424' : _ref$color;
|
|
78477
|
+
return React__default.createElement("svg", {
|
|
78478
|
+
width: "20",
|
|
78479
|
+
height: "20",
|
|
78480
|
+
viewBox: "0 0 20 20",
|
|
78481
|
+
fill: "none",
|
|
78482
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78483
|
+
}, React__default.createElement("path", {
|
|
78484
|
+
d: "M10.0002 12.4001C10.6669 12.4001 11.2335 12.1667 11.7002 11.7001C12.1669 11.2334 12.4002 10.6667 12.4002 10.0001C12.4002 9.33341 12.1669 8.76674 11.7002 8.30007C11.2335 7.83341 10.6669 7.60007 10.0002 7.60007C9.33353 7.60007 8.76686 7.83341 8.3002 8.30007C7.83353 8.76674 7.60019 9.33341 7.60019 10.0001C7.60019 10.6667 7.83353 11.2334 8.3002 11.7001C8.76686 12.1667 9.33353 12.4001 10.0002 12.4001ZM10.0002 14.0001C8.89353 14.0001 7.9502 13.6101 7.1702 12.8301C6.3902 12.0501 6.0002 11.1067 6.0002 10.0001C6.0002 8.89341 6.3902 7.95007 7.1702 7.17007C7.9502 6.39007 8.89353 6.00007 10.0002 6.00007C11.1069 6.00007 12.0502 6.39007 12.8302 7.17007C13.6102 7.95007 14.0002 8.89341 14.0002 10.0001C14.0002 11.1067 13.6102 12.0501 12.8302 12.8301C12.0502 13.6101 11.1069 14.0001 10.0002 14.0001ZM4.4002 10.8001H1.2002V9.20007H4.4002V10.8001ZM18.8002 10.8001H15.6002V9.20007H18.8002V10.8001ZM9.2002 4.40007V1.20007H10.8002V4.40007H9.2002ZM9.2002 18.8001V15.6001H10.8002V18.8001H9.2002ZM5.5202 6.60007L3.5002 4.66007L4.6402 3.48007L6.56019 5.48007L5.5202 6.60007ZM15.3602 16.5201L13.4202 14.5001L14.4802 13.4001L16.5002 15.3401L15.3602 16.5201ZM13.4002 5.52007L15.3402 3.50007L16.5202 4.64007L14.5202 6.56007L13.4002 5.52007ZM3.4802 15.3601L5.5002 13.4201L6.6002 14.4801L4.6602 16.5001L3.4802 15.3601Z",
|
|
78485
|
+
fill: color
|
|
78486
|
+
}));
|
|
78487
|
+
};
|
|
78488
|
+
|
|
78489
|
+
var DarkIcon = function DarkIcon(_ref) {
|
|
78490
|
+
var _ref$color = _ref.color,
|
|
78491
|
+
color = _ref$color === void 0 ? '#242424' : _ref$color;
|
|
78492
|
+
return React__default.createElement("svg", {
|
|
78493
|
+
width: "20",
|
|
78494
|
+
height: "20",
|
|
78495
|
+
viewBox: "0 0 20 20",
|
|
78496
|
+
fill: "none",
|
|
78497
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78498
|
+
}, React__default.createElement("g", null, React__default.createElement("path", {
|
|
78499
|
+
d: "M10.0008 17.2C8.00078 17.2 6.30078 16.5 4.90078 15.1C3.50078 13.7 2.80078 12 2.80078 10C2.80078 8.00005 3.50078 6.30005 4.90078 4.90005C6.30078 3.50005 8.00078 2.80005 10.0008 2.80005C10.1874 2.80005 10.3708 2.80672 10.5508 2.82005C10.7308 2.83338 10.9074 2.85338 11.0808 2.88005C10.5341 3.26672 10.0974 3.77005 9.77078 4.39005C9.44412 5.01005 9.28078 5.68005 9.28078 6.40005C9.28078 7.60005 9.70078 8.62005 10.5408 9.46005C11.3808 10.3 12.4008 10.72 13.6008 10.72C14.3341 10.72 15.0074 10.5567 15.6208 10.23C16.2341 9.90338 16.7341 9.46672 17.1208 8.92005C17.1474 9.09338 17.1674 9.27005 17.1808 9.45005C17.1941 9.63005 17.2008 9.81338 17.2008 10C17.2008 12 16.5008 13.7 15.1008 15.1C13.7008 16.5 12.0008 17.2 10.0008 17.2ZM10.0008 15.6C11.1741 15.6 12.2274 15.2767 13.1608 14.63C14.0941 13.9834 14.7741 13.14 15.2008 12.1C14.9341 12.1667 14.6674 12.22 14.4008 12.26C14.1341 12.3 13.8674 12.32 13.6008 12.32C11.9608 12.32 10.5641 11.7434 9.41078 10.59C8.25745 9.43672 7.68078 8.04005 7.68078 6.40005C7.68078 6.13338 7.70078 5.86672 7.74078 5.60005C7.78078 5.33338 7.83412 5.06672 7.90078 4.80005C6.86078 5.22672 6.01745 5.90672 5.37078 6.84005C4.72411 7.77338 4.40078 8.82672 4.40078 10C4.40078 11.5467 4.94745 12.8667 6.04078 13.96C7.13411 15.0534 8.45411 15.6 10.0008 15.6Z",
|
|
78500
|
+
fill: color
|
|
78501
|
+
})));
|
|
78502
|
+
};
|
|
78503
|
+
|
|
78504
|
+
var ChatHeader = function ChatHeader(_ref) {
|
|
78505
|
+
var theme = _ref.theme,
|
|
78506
|
+
setTheme = _ref.setTheme,
|
|
78507
|
+
goBack = _ref.goBack,
|
|
78508
|
+
isOpenSideBar = _ref.isOpenSideBar,
|
|
78509
|
+
name = _ref.name;
|
|
78510
|
+
return React__default.createElement("div", {
|
|
78511
|
+
className: styles$d['ai-mario-chat__header'] + " " + (theme === THEME.DARK ? styles$d['ai-mario-chat__header___dark'] : ''),
|
|
78512
|
+
style: isOpenSideBar ? {} : {
|
|
78513
|
+
width: '100%'
|
|
78514
|
+
}
|
|
78515
|
+
}, React__default.createElement("button", {
|
|
78516
|
+
type: 'button',
|
|
78517
|
+
className: styles$d['go-back'],
|
|
78518
|
+
onClick: goBack
|
|
78519
|
+
}, React__default.createElement(ArrowBackIcon, {
|
|
78520
|
+
color: theme === THEME.DARK ? '#fff' : '#242424'
|
|
78521
|
+
})), React__default.createElement("div", {
|
|
78522
|
+
className: styles$d['chat-title']
|
|
78523
|
+
}, name), React__default.createElement("button", {
|
|
78524
|
+
className: styles$d['switch-theme'],
|
|
78525
|
+
onClick: function onClick() {
|
|
78526
|
+
return setTheme(theme === THEME.LIGHT ? THEME.DARK : THEME.LIGHT);
|
|
78527
|
+
}
|
|
78528
|
+
}, React__default.createElement("div", {
|
|
78529
|
+
className: styles$d['item'] + " " + styles$d['item___light-btn'],
|
|
78530
|
+
style: theme === THEME.LIGHT ? {
|
|
78531
|
+
background: '#fff',
|
|
78532
|
+
color: '#242424'
|
|
78533
|
+
} : {
|
|
78534
|
+
background: 'transparent',
|
|
78535
|
+
color: '#7a778b'
|
|
78536
|
+
}
|
|
78537
|
+
}, React__default.createElement(LightIcon, {
|
|
78538
|
+
color: theme === THEME.DARK ? '#7a778b' : '#242424'
|
|
78539
|
+
})), React__default.createElement("div", {
|
|
78540
|
+
className: styles$d['item'] + " " + styles$d['item___dark-btn'],
|
|
78541
|
+
style: theme === THEME.DARK ? {
|
|
78542
|
+
background: '#fff',
|
|
78543
|
+
color: '#242424'
|
|
78544
|
+
} : {
|
|
78545
|
+
color: '#a6a6a6'
|
|
78546
|
+
}
|
|
78547
|
+
}, React__default.createElement(DarkIcon, {
|
|
78548
|
+
color: theme === THEME.DARK ? '#242424' : '#a6a6a6'
|
|
78549
|
+
}))));
|
|
78550
|
+
};
|
|
78551
|
+
|
|
78552
|
+
var useAIChat = function useAIChat() {
|
|
78553
|
+
var dispatch = reactRedux.useDispatch();
|
|
78554
|
+
var history = reactRouterDom.useHistory();
|
|
78555
|
+
|
|
78556
|
+
var _useParams = reactRouterDom.useParams(),
|
|
78557
|
+
id = _useParams.id;
|
|
78558
|
+
|
|
78559
|
+
var _useState = React.useState("light"),
|
|
78560
|
+
theme = _useState[0],
|
|
78561
|
+
setTheme = _useState[1];
|
|
78562
|
+
|
|
78563
|
+
var isOpenSideBar = reactRedux.useSelector(function (state) {
|
|
78564
|
+
var _state$common;
|
|
78565
|
+
|
|
78566
|
+
return (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.menuBar;
|
|
78567
|
+
});
|
|
78568
|
+
|
|
78569
|
+
var _useState2 = React.useState(),
|
|
78570
|
+
prompt = _useState2[0],
|
|
78571
|
+
setPrompt = _useState2[1];
|
|
78572
|
+
|
|
78573
|
+
var _useState3 = React.useState([]),
|
|
78574
|
+
chats = _useState3[0],
|
|
78575
|
+
setChats = _useState3[1];
|
|
78576
|
+
|
|
78577
|
+
var _useState4 = React.useState(null),
|
|
78578
|
+
historyId = _useState4[0],
|
|
78579
|
+
setHistoryId = _useState4[1];
|
|
78580
|
+
|
|
78581
|
+
var _useState5 = React.useState([]),
|
|
78582
|
+
answers = _useState5[0],
|
|
78583
|
+
setAnswers = _useState5[1];
|
|
78584
|
+
|
|
78585
|
+
var _useState6 = React.useState(""),
|
|
78586
|
+
inputString = _useState6[0],
|
|
78587
|
+
setInputString = _useState6[1];
|
|
78588
|
+
|
|
78589
|
+
var _useState7 = React.useState({
|
|
78590
|
+
checkInCompleteCount: 0,
|
|
78591
|
+
checkInCount: 0,
|
|
78592
|
+
oneToOneCompleteCount: 0,
|
|
78593
|
+
oneToOneCount: 0,
|
|
78594
|
+
studentNotDoneCheckIns: [],
|
|
78595
|
+
studentNotDoneConversations: []
|
|
78596
|
+
}),
|
|
78597
|
+
totalCheckIns = _useState7[0],
|
|
78598
|
+
setTotalCheckIns = _useState7[1];
|
|
78599
|
+
|
|
78600
|
+
var goBack = function goBack() {
|
|
78601
|
+
history.goBack();
|
|
78602
|
+
};
|
|
78603
|
+
|
|
78604
|
+
var getBracketedText = function getBracketedText(text) {
|
|
78605
|
+
return (text.match(/\[\[(.*?)\]\]/) || [])[1] || null;
|
|
78606
|
+
};
|
|
78607
|
+
|
|
78608
|
+
var submitPromptMessage = function submitPromptMessage() {
|
|
78609
|
+
if (!inputString) return;
|
|
78610
|
+
setChats(chats.map(function (r) {
|
|
78611
|
+
return _extends({}, r, {
|
|
78612
|
+
message: r.message.replace(/\[\[(.*?)\]\]/, inputString)
|
|
78613
|
+
});
|
|
78614
|
+
}));
|
|
78615
|
+
};
|
|
78616
|
+
|
|
78617
|
+
var getPromptDetail = React.useCallback(function () {
|
|
78618
|
+
try {
|
|
78619
|
+
var _temp3 = function _temp3() {
|
|
78620
|
+
dispatch(marioCore.setLoading(false));
|
|
78621
|
+
};
|
|
78622
|
+
|
|
78623
|
+
dispatch(marioCore.setLoading(true));
|
|
78624
|
+
|
|
78625
|
+
var _temp4 = _catch(function () {
|
|
78626
|
+
return Promise.resolve(getById$p(parseInt(id))).then(function (res) {
|
|
78627
|
+
var promptResponse = res.data;
|
|
78628
|
+
|
|
78629
|
+
if (promptResponse) {
|
|
78630
|
+
var _promptResponse$messa;
|
|
78631
|
+
|
|
78632
|
+
setPrompt(promptResponse);
|
|
78633
|
+
var regex = /\{{(.*?)}}/;
|
|
78634
|
+
setChats((promptResponse === null || promptResponse === void 0 ? void 0 : (_promptResponse$messa = promptResponse.messages) === null || _promptResponse$messa === void 0 ? void 0 : _promptResponse$messa.filter(function (i) {
|
|
78635
|
+
var _i$role;
|
|
78636
|
+
|
|
78637
|
+
return ((_i$role = i.role) === null || _i$role === void 0 ? void 0 : _i$role.toString()) != "System";
|
|
78638
|
+
}).map(function (r) {
|
|
78639
|
+
var _r$role, _r$message, _r$message$match, _r$message$match$, _r$message$match$$spl, _r$message$match$$spl2;
|
|
78640
|
+
|
|
78641
|
+
return {
|
|
78642
|
+
message: r.message.replace(/\$\{\{/g, ""),
|
|
78643
|
+
text: r.message.replace(/\$\{\{/g, ""),
|
|
78644
|
+
time: "",
|
|
78645
|
+
isUser: ((_r$role = r.role) === null || _r$role === void 0 ? void 0 : _r$role.toString()) == "User",
|
|
78646
|
+
options: (_r$message = r.message) === null || _r$message === void 0 ? void 0 : (_r$message$match = _r$message.match(regex)) === null || _r$message$match === void 0 ? void 0 : (_r$message$match$ = _r$message$match[1]) === null || _r$message$match$ === void 0 ? void 0 : (_r$message$match$$spl = _r$message$match$.split(" || ")) === null || _r$message$match$$spl === void 0 ? void 0 : (_r$message$match$$spl2 = _r$message$match$$spl[1]) === null || _r$message$match$$spl2 === void 0 ? void 0 : _r$message$match$$spl2.split("/")
|
|
78647
|
+
};
|
|
78648
|
+
})) || []);
|
|
78649
|
+
}
|
|
78650
|
+
});
|
|
78651
|
+
}, function (err) {
|
|
78652
|
+
dispatch(marioCore.setAlert({
|
|
78653
|
+
type: "danger",
|
|
78654
|
+
message: err.message
|
|
78655
|
+
}));
|
|
78656
|
+
});
|
|
78657
|
+
|
|
78658
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
78659
|
+
} catch (e) {
|
|
78660
|
+
return Promise.reject(e);
|
|
78661
|
+
}
|
|
78662
|
+
}, [id]);
|
|
78663
|
+
|
|
78664
|
+
var handleChoiceOption = function handleChoiceOption(option) {
|
|
78665
|
+
try {
|
|
78666
|
+
var responses = chats.concat([{
|
|
78667
|
+
isUser: true,
|
|
78668
|
+
message: option,
|
|
78669
|
+
time: ""
|
|
78670
|
+
}, {
|
|
78671
|
+
time: "",
|
|
78672
|
+
isUser: false,
|
|
78673
|
+
message: ""
|
|
78674
|
+
}]);
|
|
78675
|
+
setChats(responses);
|
|
78676
|
+
var startDate;
|
|
78677
|
+
var endDate;
|
|
78678
|
+
|
|
78679
|
+
switch (option.toLowerCase()) {
|
|
78680
|
+
case "this month":
|
|
78681
|
+
startDate = !(prompt !== null && prompt !== void 0 && prompt.isCompareDataTime) ? moment().startOf("month").valueOf() : moment().subtract(1, "month").startOf("month").valueOf();
|
|
78682
|
+
endDate = moment().endOf("month").valueOf();
|
|
78683
|
+
break;
|
|
78684
|
+
|
|
78685
|
+
case "this week":
|
|
78686
|
+
startDate = !(prompt !== null && prompt !== void 0 && prompt.isCompareDataTime) ? moment().startOf("week").valueOf() : moment().subtract(1, "week").startOf("week").valueOf();
|
|
78687
|
+
endDate = moment().endOf("week").valueOf();
|
|
78688
|
+
break;
|
|
78689
|
+
|
|
78690
|
+
case "last month":
|
|
78691
|
+
startDate = !(prompt !== null && prompt !== void 0 && prompt.isCompareDataTime) ? moment().subtract(1, "month").startOf("month").valueOf() : moment().subtract(2, "month").startOf("month").valueOf();
|
|
78692
|
+
endDate = moment().subtract(1, "month").endOf("month").valueOf();
|
|
78693
|
+
break;
|
|
78694
|
+
|
|
78695
|
+
case "last year":
|
|
78696
|
+
startDate = !(prompt !== null && prompt !== void 0 && prompt.isCompareDataTime) ? moment().subtract(1, "year").startOf("year").valueOf() : moment().subtract(2, "year").startOf("year").valueOf();
|
|
78697
|
+
endDate = moment().subtract(1, "year").endOf("year").valueOf();
|
|
78698
|
+
break;
|
|
78699
|
+
|
|
78700
|
+
case "today":
|
|
78701
|
+
startDate = !(prompt !== null && prompt !== void 0 && prompt.isCompareDataTime) ? moment().startOf("day").valueOf() : moment().subtract(1, "day").startOf("day").valueOf();
|
|
78702
|
+
endDate = moment().endOf("day").valueOf();
|
|
78703
|
+
break;
|
|
78704
|
+
|
|
78705
|
+
default:
|
|
78706
|
+
break;
|
|
78707
|
+
}
|
|
78708
|
+
|
|
78709
|
+
if (startDate && endDate) {
|
|
78710
|
+
!!prompt && getSessionAnswerData(startDate, endDate, prompt, option, responses);
|
|
78711
|
+
} else {
|
|
78712
|
+
if ((prompt === null || prompt === void 0 ? void 0 : prompt.dataType) == IDataType.Total) {
|
|
78713
|
+
var dataInputPrompt = "Here is the data summary: \n - Total check-ins: " + totalCheckIns.checkInCount + " \n - Completed check-ins: " + totalCheckIns.checkInCompleteCount + " \n - Total one-on-one sessions: " + totalCheckIns.oneToOneCount + " \n - Completed one-on-one sessions: " + totalCheckIns.oneToOneCompleteCount + " \n\n The following students and teachers have not completed their tasks: \n - Pending check-ins: " + totalCheckIns.studentNotDoneCheckIns.join(", ") + " \n - Pending one-on-one conversations: " + totalCheckIns.studentNotDoneConversations.join(", ");
|
|
78714
|
+
!!prompt && askGeminiAI(dataInputPrompt, prompt, "", responses);
|
|
78715
|
+
} else {
|
|
78716
|
+
var _dataInputPrompt = "This is the data:\n" + (!(answers !== null && answers !== void 0 && answers.length) ? "No data available for analysis." : answers.map(function (r) {
|
|
78717
|
+
return "Student name: " + r.fullName + ", \n Answer: " + r.answer + ", \n Student grade: " + r.grade + ", \n Start time: " + r.startTime + ", \n Question: " + r.question + ", \n Teacher name: " + r.teacherName + ";";
|
|
78718
|
+
}).join("\n"));
|
|
78719
|
+
|
|
78720
|
+
!!prompt && askGeminiAI(_dataInputPrompt, prompt, "", responses);
|
|
78721
|
+
}
|
|
78722
|
+
}
|
|
78723
|
+
} catch (err) {
|
|
78724
|
+
var _err$response;
|
|
78725
|
+
|
|
78726
|
+
dispatch(marioCore.setAlert({
|
|
78727
|
+
type: "danger",
|
|
78728
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : _err$response.data) || err.message
|
|
78729
|
+
}));
|
|
78730
|
+
}
|
|
78731
|
+
};
|
|
78732
|
+
|
|
78733
|
+
var getSessionAnswerData = React.useCallback(function (startDate, endDate, prompt, labelTime, responses) {
|
|
78734
|
+
try {
|
|
78735
|
+
var _temp6 = _catch(function () {
|
|
78736
|
+
var filters = {
|
|
78737
|
+
startDate: startDate,
|
|
78738
|
+
endDate: endDate,
|
|
78739
|
+
question: prompt.question,
|
|
78740
|
+
instruction: prompt.instruction,
|
|
78741
|
+
studentName: inputString
|
|
78742
|
+
};
|
|
78743
|
+
return Promise.resolve(prompt.dataType != IDataType.Total ? getSessionAnswer(filters) : getTotalSession(filters)).then(function (res) {
|
|
78744
|
+
if (prompt.dataType == IDataType.Total) {
|
|
78745
|
+
setTotalCheckIns(res.data);
|
|
78746
|
+
var totals = res.data;
|
|
78747
|
+
var dataInputPrompt = "Here is the data summary: \n - Total check-ins: " + totals.checkInCount + " \n - Completed check-ins: " + totals.checkInCompleteCount + " \n - Total one-on-one sessions: " + totals.oneToOneCount + " \n - Completed one-on-one sessions: " + totals.oneToOneCompleteCount + " \n\n The following students and teachers have not completed their tasks: \n - Pending check-ins: " + totals.studentNotDoneCheckIns.join(", ") + " \n - Pending one-on-one conversations: " + totals.studentNotDoneConversations.join(", ");
|
|
78748
|
+
askGeminiAI(dataInputPrompt, prompt, labelTime, responses);
|
|
78749
|
+
} else {
|
|
78750
|
+
var _answers = res.data || [];
|
|
78751
|
+
|
|
78752
|
+
setAnswers(_answers);
|
|
78753
|
+
|
|
78754
|
+
var _dataInputPrompt2 = "This is the data:\n" + (!(_answers !== null && _answers !== void 0 && _answers.length) ? "No data available for analysis." : _answers.map(function (r) {
|
|
78755
|
+
return "Student name: " + r.fullName + ", \n Answer: " + r.answer + ", \n Student grade: " + r.grade + ", \n Start time: " + r.startTime + ", \n Question: " + r.question + ", \n Teacher name: " + r.teacherName + ";";
|
|
78756
|
+
}).join("\n"));
|
|
78757
|
+
|
|
78758
|
+
askGeminiAI(_dataInputPrompt2, prompt, labelTime, responses);
|
|
78759
|
+
}
|
|
78760
|
+
});
|
|
78761
|
+
}, function (err) {
|
|
78762
|
+
var _err$response2;
|
|
78763
|
+
|
|
78764
|
+
dispatch(marioCore.setAlert({
|
|
78765
|
+
type: "danger",
|
|
78766
|
+
message: ((_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : _err$response2.data) || err.message
|
|
78767
|
+
}));
|
|
78768
|
+
});
|
|
78769
|
+
|
|
78770
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
78771
|
+
} catch (e) {
|
|
78772
|
+
return Promise.reject(e);
|
|
78773
|
+
}
|
|
78774
|
+
}, [prompt, historyId, inputString]);
|
|
78775
|
+
var saveHistoryPrompt = React.useCallback(function (data) {
|
|
78776
|
+
try {
|
|
78777
|
+
var _temp8 = _catch(function () {
|
|
78778
|
+
return Promise.resolve(createHistory(data)).then(function (res) {
|
|
78779
|
+
setHistoryId(res.data);
|
|
78780
|
+
});
|
|
78781
|
+
}, function (err) {
|
|
78782
|
+
var _err$response3;
|
|
78783
|
+
|
|
78784
|
+
dispatch(marioCore.setAlert({
|
|
78785
|
+
type: "danger",
|
|
78786
|
+
message: ((_err$response3 = err.response) === null || _err$response3 === void 0 ? void 0 : _err$response3.data) || err.message
|
|
78787
|
+
}));
|
|
78788
|
+
});
|
|
78789
|
+
|
|
78790
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
|
|
78791
|
+
} catch (e) {
|
|
78792
|
+
return Promise.reject(e);
|
|
78793
|
+
}
|
|
78794
|
+
}, [historyId]);
|
|
78795
|
+
|
|
78796
|
+
var askGeminiAI = function askGeminiAI(dataInputPrompt, prompt, labelTime, responses) {
|
|
78797
|
+
try {
|
|
78798
|
+
var _temp10 = _catch(function () {
|
|
78799
|
+
var genAI = new generativeAi.GoogleGenerativeAI("AIzaSyDLvLHpaqW2M7teNlTwN_0aFOTBvzL2yIM");
|
|
78800
|
+
var model = genAI.getGenerativeModel({
|
|
78801
|
+
model: prompt.aiModel
|
|
78802
|
+
});
|
|
78803
|
+
var userMessages = prompt.messages.filter(function (r) {
|
|
78804
|
+
var _r$role2;
|
|
78805
|
+
|
|
78806
|
+
return ((_r$role2 = r.role) === null || _r$role2 === void 0 ? void 0 : _r$role2.toString()) != "System";
|
|
78807
|
+
}).map(function (i) {
|
|
78808
|
+
var _i$role2, _i$message;
|
|
78809
|
+
|
|
78810
|
+
return {
|
|
78811
|
+
role: (_i$role2 = i.role) === null || _i$role2 === void 0 ? void 0 : _i$role2.toString().toLowerCase(),
|
|
78812
|
+
parts: [{
|
|
78813
|
+
text: (_i$message = i.message) === null || _i$message === void 0 ? void 0 : _i$message.replace(/{time}/g, labelTime)
|
|
78814
|
+
}]
|
|
78815
|
+
};
|
|
78816
|
+
});
|
|
78817
|
+
var updatedChatHistory = responses.filter(function (r) {
|
|
78818
|
+
return r.message;
|
|
78819
|
+
}).reduce(function (acc, i) {
|
|
78820
|
+
acc.push({
|
|
78821
|
+
role: i.isUser ? "user" : "model",
|
|
78822
|
+
parts: [{
|
|
78823
|
+
text: i.message
|
|
78824
|
+
}]
|
|
78825
|
+
});
|
|
78826
|
+
|
|
78827
|
+
if (timeKeywords.includes(i.message.toLowerCase())) {
|
|
78828
|
+
acc.push({
|
|
78829
|
+
role: "user",
|
|
78830
|
+
parts: [{
|
|
78831
|
+
text: dataInputPrompt
|
|
78832
|
+
}]
|
|
78833
|
+
});
|
|
78834
|
+
}
|
|
78835
|
+
|
|
78836
|
+
return acc;
|
|
78837
|
+
}, []);
|
|
78838
|
+
var systemMessages = prompt.messages.filter(function (r) {
|
|
78839
|
+
var _r$role3;
|
|
78840
|
+
|
|
78841
|
+
return ((_r$role3 = r.role) === null || _r$role3 === void 0 ? void 0 : _r$role3.toString()) == "System";
|
|
78842
|
+
}).map(function (i) {
|
|
78843
|
+
var _i$message2;
|
|
78844
|
+
|
|
78845
|
+
return {
|
|
78846
|
+
text: (_i$message2 = i.message) === null || _i$message2 === void 0 ? void 0 : _i$message2.replace(/{time}/g, labelTime)
|
|
78847
|
+
};
|
|
78848
|
+
});
|
|
78849
|
+
var contents = [].concat(userMessages, updatedChatHistory);
|
|
78850
|
+
return Promise.resolve(model.generateContent({
|
|
78851
|
+
contents: contents,
|
|
78852
|
+
systemInstruction: {
|
|
78853
|
+
role: "system",
|
|
78854
|
+
parts: [].concat(systemMessages, [{
|
|
78855
|
+
text: dataInputPrompt
|
|
78856
|
+
}])
|
|
78857
|
+
},
|
|
78858
|
+
generationConfig: {
|
|
78859
|
+
temperature: prompt.temperature,
|
|
78860
|
+
topP: prompt.topP,
|
|
78861
|
+
topK: prompt.topK,
|
|
78862
|
+
maxOutputTokens: prompt.maxOutputTokens,
|
|
78863
|
+
frequencyPenalty: prompt.frequencyPenalty,
|
|
78864
|
+
presencePenalty: prompt.presencePenalty,
|
|
78865
|
+
responseMimeType: "text/plain"
|
|
78866
|
+
}
|
|
78867
|
+
})).then(function (result) {
|
|
78868
|
+
var _result$response;
|
|
78869
|
+
|
|
78870
|
+
var partialText = result === null || result === void 0 ? void 0 : (_result$response = result.response) === null || _result$response === void 0 ? void 0 : _result$response.text();
|
|
78871
|
+
|
|
78872
|
+
if (!!partialText) {
|
|
78873
|
+
var aiChats = [];
|
|
78874
|
+
setChats(function (prevChats) {
|
|
78875
|
+
var _match$1$split$;
|
|
78876
|
+
|
|
78877
|
+
var regex = /\{{(.*?)}}/;
|
|
78878
|
+
var match = partialText.match(regex);
|
|
78879
|
+
var messageText = partialText.replace(regex, "").trim();
|
|
78880
|
+
var updatedChats = [].concat(prevChats, [{
|
|
78881
|
+
isUser: false,
|
|
78882
|
+
message: messageText,
|
|
78883
|
+
time: "",
|
|
78884
|
+
text: ""
|
|
78885
|
+
}], match ? [{
|
|
78886
|
+
isUser: false,
|
|
78887
|
+
message: match[1],
|
|
78888
|
+
time: "",
|
|
78889
|
+
text: "",
|
|
78890
|
+
options: (_match$1$split$ = match[1].split(" || ")[1]) === null || _match$1$split$ === void 0 ? void 0 : _match$1$split$.split("/")
|
|
78891
|
+
}] : []).filter(function (r) {
|
|
78892
|
+
return r.message;
|
|
78893
|
+
});
|
|
78894
|
+
aiChats = updatedChats;
|
|
78895
|
+
return updatedChats;
|
|
78896
|
+
});
|
|
78897
|
+
saveHistoryPrompt(_extends({}, prompt, {
|
|
78898
|
+
messages: aiChats,
|
|
78899
|
+
output: "",
|
|
78900
|
+
promptId: prompt.id,
|
|
78901
|
+
grade: "",
|
|
78902
|
+
calendar: "",
|
|
78903
|
+
createdAt: "",
|
|
78904
|
+
id: historyId != null ? historyId : undefined
|
|
78905
|
+
}));
|
|
78906
|
+
}
|
|
78907
|
+
});
|
|
78908
|
+
}, function (err) {
|
|
78909
|
+
var _err$response4, _err$response4$data;
|
|
78910
|
+
|
|
78911
|
+
dispatch(marioCore.setAlert({
|
|
78912
|
+
type: "danger",
|
|
78913
|
+
message: ((_err$response4 = err.response) === null || _err$response4 === void 0 ? void 0 : (_err$response4$data = _err$response4.data) === null || _err$response4$data === void 0 ? void 0 : _err$response4$data.title) || err.message
|
|
78914
|
+
}));
|
|
78915
|
+
});
|
|
78916
|
+
|
|
78917
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {}) : void 0);
|
|
78918
|
+
} catch (e) {
|
|
78919
|
+
return Promise.reject(e);
|
|
78920
|
+
}
|
|
78921
|
+
};
|
|
78922
|
+
|
|
78923
|
+
React.useEffect(function () {
|
|
78924
|
+
id && getPromptDetail();
|
|
78925
|
+
}, [id]);
|
|
78926
|
+
return {
|
|
78927
|
+
theme: theme,
|
|
78928
|
+
setTheme: setTheme,
|
|
78929
|
+
goBack: goBack,
|
|
78930
|
+
isOpenSideBar: isOpenSideBar,
|
|
78931
|
+
prompt: prompt,
|
|
78932
|
+
chats: chats,
|
|
78933
|
+
handleChoiceOption: handleChoiceOption,
|
|
78934
|
+
getBracketedText: getBracketedText,
|
|
78935
|
+
submitPromptMessage: submitPromptMessage,
|
|
78936
|
+
inputString: inputString,
|
|
78937
|
+
setInputString: setInputString
|
|
78938
|
+
};
|
|
78939
|
+
};
|
|
78940
|
+
|
|
78941
|
+
var MarioAIIcon = function MarioAIIcon() {
|
|
78942
|
+
return React__default.createElement("svg", {
|
|
78943
|
+
width: "32",
|
|
78944
|
+
height: "32",
|
|
78945
|
+
viewBox: "0 0 32 32",
|
|
78946
|
+
fill: "none",
|
|
78947
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
78948
|
+
}, React__default.createElement("circle", {
|
|
78949
|
+
cx: "16",
|
|
78950
|
+
cy: "16",
|
|
78951
|
+
r: "16",
|
|
78952
|
+
fill: "url(#paint0_linear_11446_18038)"
|
|
78953
|
+
}), React__default.createElement("path", {
|
|
78954
|
+
d: "M15.7334 17.5834C15.6051 17.9753 15.0615 17.9753 14.9332 17.5834L14.1807 15.2832C14.0151 14.7776 13.7361 14.3182 13.3658 13.9414C12.9954 13.5646 12.544 13.2808 12.0471 13.1125L9.78872 12.3465C9.40376 12.2159 9.40376 11.6625 9.78872 11.5319L12.0483 10.766C12.545 10.5974 12.9963 10.3133 13.3665 9.93633C13.7366 9.55933 14.0154 9.09975 14.1808 8.59402L14.9332 6.29501C14.9608 6.2092 15.0144 6.13448 15.0863 6.0815C15.1581 6.02852 15.2446 6 15.3333 6C15.422 6 15.5085 6.02852 15.5803 6.0815C15.6522 6.13448 15.7058 6.2092 15.7334 6.29501L16.4858 8.59521C16.6513 9.10072 16.9302 9.56006 17.3003 9.93684C17.6705 10.3136 18.1217 10.5975 18.6183 10.766L20.8779 11.5319C20.9622 11.5601 21.0356 11.6146 21.0876 11.6878C21.1396 11.7609 21.1677 11.8489 21.1677 11.9392C21.1677 12.0295 21.1396 12.1175 21.0876 12.1907C21.0356 12.2638 20.9622 12.3184 20.8779 12.3465L18.6183 13.1125C18.1217 13.281 17.6705 13.5648 17.3003 13.9416C16.9302 14.3184 16.6513 14.7777 16.4858 15.2832L15.7334 17.5834ZM20.2398 23.6385C20.223 23.6899 20.1908 23.7347 20.1477 23.7664C20.1045 23.7981 20.0527 23.8152 19.9995 23.8152C19.9462 23.8152 19.8944 23.7981 19.8512 23.7664C19.8081 23.7347 19.7759 23.6899 19.7592 23.6385L19.3077 22.2586C19.1059 21.6435 18.6323 21.1614 18.028 20.9559L16.6725 20.4964C16.622 20.4794 16.578 20.4466 16.5468 20.4026C16.5157 20.3587 16.4989 20.3059 16.4989 20.2518C16.4989 20.1976 16.5157 20.1448 16.5468 20.1009C16.578 20.057 16.622 20.0242 16.6725 20.0071L18.028 19.5476C18.326 19.4465 18.5968 19.2761 18.8189 19.05C19.0411 18.8239 19.2084 18.5483 19.3077 18.2449L19.7592 16.865C19.7759 16.8136 19.8081 16.7688 19.8512 16.7371C19.8944 16.7054 19.9462 16.6883 19.9995 16.6883C20.0527 16.6883 20.1045 16.7054 20.1477 16.7371C20.1908 16.7688 20.223 16.8136 20.2398 16.865L20.6912 18.2449C20.7905 18.5483 20.9578 18.8239 21.18 19.05C21.4021 19.2761 21.6729 19.4465 21.9709 19.5476L23.3264 20.0071C23.377 20.0242 23.4209 20.057 23.4521 20.1009C23.4832 20.1448 23.5 20.1976 23.5 20.2518C23.5 20.3059 23.4832 20.3587 23.4521 20.4026C23.4209 20.4466 23.377 20.4794 23.3264 20.4964L21.9709 20.9559C21.6729 21.057 21.4021 21.2274 21.18 21.4535C20.9578 21.6796 20.7905 21.9553 20.6912 22.2586L20.2398 23.6385ZM11.9935 24.8842C11.982 24.918 11.9604 24.9473 11.9317 24.9681C11.9031 24.9888 11.8688 25 11.8337 25C11.7985 25 11.7642 24.9888 11.7356 24.9681C11.7069 24.9473 11.6854 24.918 11.6739 24.8842L11.3729 23.9651C11.2387 23.5542 10.9226 23.2324 10.519 23.0958L9.61607 22.7895C9.58286 22.7777 9.55405 22.7558 9.53367 22.7266C9.51328 22.6975 9.50233 22.6626 9.50233 22.6268C9.50233 22.591 9.51328 22.5561 9.53367 22.5269C9.55405 22.4978 9.58286 22.4758 9.61607 22.4641L10.519 22.1577C10.7179 22.0903 10.8986 21.9767 11.0469 21.8258C11.1951 21.6749 11.3067 21.4909 11.3729 21.2884L11.6739 20.3693C11.6854 20.3355 11.7069 20.3062 11.7356 20.2854C11.7642 20.2647 11.7985 20.2535 11.8337 20.2535C11.8688 20.2535 11.9031 20.2647 11.9317 20.2854C11.9604 20.3062 11.982 20.3355 11.9935 20.3693L12.2945 21.2884C12.3606 21.4909 12.4723 21.6749 12.6205 21.8258C12.7687 21.9767 12.9495 22.0903 13.1484 22.1577L14.0501 22.4641C14.0833 22.4758 14.1121 22.4978 14.1325 22.5269C14.1529 22.5561 14.1638 22.591 14.1638 22.6268C14.1638 22.6626 14.1529 22.6975 14.1325 22.7266C14.1121 22.7558 14.0833 22.7777 14.0501 22.7895L13.1472 23.0958C12.7436 23.2324 12.4274 23.5542 12.2933 23.9651L11.9935 24.8842Z",
|
|
78955
|
+
fill: "white"
|
|
78956
|
+
}), React__default.createElement("defs", null, React__default.createElement("linearGradient", {
|
|
78957
|
+
id: "paint0_linear_11446_18038",
|
|
78958
|
+
x1: "0",
|
|
78959
|
+
y1: "16",
|
|
78960
|
+
x2: "32",
|
|
78961
|
+
y2: "16",
|
|
78962
|
+
gradientUnits: "userSpaceOnUse"
|
|
78963
|
+
}, React__default.createElement("stop", {
|
|
78964
|
+
stopColor: "#346DDA"
|
|
78965
|
+
}), React__default.createElement("stop", {
|
|
78966
|
+
offset: "1",
|
|
78967
|
+
stopColor: "#844DE1"
|
|
78968
|
+
}))));
|
|
78969
|
+
};
|
|
78970
|
+
|
|
78971
|
+
var ChatContent = function ChatContent(_ref) {
|
|
78972
|
+
var theme = _ref.theme,
|
|
78973
|
+
chats = _ref.chats,
|
|
78974
|
+
onSelectOption = _ref.onSelectOption,
|
|
78975
|
+
getBracketedText = _ref.getBracketedText,
|
|
78976
|
+
submitPromptMessage = _ref.submitPromptMessage,
|
|
78977
|
+
inputString = _ref.inputString,
|
|
78978
|
+
setInputString = _ref.setInputString;
|
|
78979
|
+
return React__default.createElement("div", {
|
|
78980
|
+
className: (theme === THEME.DARK ? styles$d["ai-mario-chat__content___dark"] : "") + " " + styles$d["ai-mario-chat__content"] + " "
|
|
78981
|
+
}, React__default.createElement("div", {
|
|
78982
|
+
className: "" + styles$d["content-container"]
|
|
78983
|
+
}, function () {
|
|
78984
|
+
var stopIndex = chats.findIndex(function (r) {
|
|
78985
|
+
return getBracketedText(r.message || "") !== null;
|
|
78986
|
+
});
|
|
78987
|
+
if (stopIndex === -1) stopIndex = chats.length;
|
|
78988
|
+
return chats.slice(0, stopIndex + 1).map(function (item, i) {
|
|
78989
|
+
var _item$message, _item$message$split, _item$message$split$, _item$text, _item$text$split, _item$text$split$;
|
|
78990
|
+
|
|
78991
|
+
var bracketedText = getBracketedText(item.message || "");
|
|
78992
|
+
return bracketedText ? React__default.createElement("div", {
|
|
78993
|
+
className: styles$d["bracketed-input-block"] + " d-flex align-items-center"
|
|
78994
|
+
}, React__default.createElement(core$1.TextField, {
|
|
78995
|
+
variant: "outlined",
|
|
78996
|
+
key: "input-" + i,
|
|
78997
|
+
type: "text",
|
|
78998
|
+
className: styles$d["bracketed-input"],
|
|
78999
|
+
label: "Please enter " + (bracketedText === null || bracketedText === void 0 ? void 0 : bracketedText.toLowerCase()) + "...",
|
|
79000
|
+
value: inputString,
|
|
79001
|
+
onChange: function onChange(e) {
|
|
79002
|
+
return setInputString === null || setInputString === void 0 ? void 0 : setInputString(e.target.value);
|
|
79003
|
+
}
|
|
79004
|
+
}), inputString && React__default.createElement(SendIcon, {
|
|
79005
|
+
className: styles$d["icon-input"],
|
|
79006
|
+
onClick: function onClick() {
|
|
79007
|
+
return submitPromptMessage === null || submitPromptMessage === void 0 ? void 0 : submitPromptMessage();
|
|
79008
|
+
}
|
|
79009
|
+
})) : React__default.createElement("div", {
|
|
79010
|
+
key: i,
|
|
79011
|
+
className: styles$d["chat-box"] + " " + (item.isUser ? styles$d["chat-box__user-container"] : "")
|
|
79012
|
+
}, !item.isUser && React__default.createElement("div", {
|
|
79013
|
+
className: styles$d["chat-box__avatar"]
|
|
79014
|
+
}, React__default.createElement(MarioAIIcon, null)), React__default.createElement("div", {
|
|
79015
|
+
className: styles$d["chat-box__content"] + " " + (item.isUser ? styles$d["chat-box__user"] : "")
|
|
79016
|
+
}, !item.isUser && React__default.createElement("div", {
|
|
79017
|
+
className: styles$d["name"]
|
|
79018
|
+
}, "Mario AI"), React__default.createElement("div", {
|
|
79019
|
+
className: styles$d["message"],
|
|
79020
|
+
style: !item.message && !item.text ? {
|
|
79021
|
+
display: "flex",
|
|
79022
|
+
justifyContent: "center",
|
|
79023
|
+
alignItems: "center",
|
|
79024
|
+
padding: "14px 24px 12px 24px",
|
|
79025
|
+
width: 80
|
|
79026
|
+
} : {}
|
|
79027
|
+
}, item.message || item.text ? React__default.createElement(React.Fragment, null, React__default.createElement(Markdown, null, ((_item$message = item.message) === null || _item$message === void 0 ? void 0 : (_item$message$split = _item$message.split(" || ")) === null || _item$message$split === void 0 ? void 0 : (_item$message$split$ = _item$message$split[0]) === null || _item$message$split$ === void 0 ? void 0 : _item$message$split$.trim()) || ((_item$text = item.text) === null || _item$text === void 0 ? void 0 : (_item$text$split = _item$text.split(" || ")) === null || _item$text$split === void 0 ? void 0 : (_item$text$split$ = _item$text$split[0]) === null || _item$text$split$ === void 0 ? void 0 : _item$text$split$.trim()) || ""), item.options && React__default.createElement("div", {
|
|
79028
|
+
className: styles$d["option"]
|
|
79029
|
+
}, item.options.map(function (option) {
|
|
79030
|
+
return React__default.createElement("button", {
|
|
79031
|
+
key: option,
|
|
79032
|
+
onClick: function onClick() {
|
|
79033
|
+
return onSelectOption === null || onSelectOption === void 0 ? void 0 : onSelectOption(option);
|
|
79034
|
+
},
|
|
79035
|
+
className: styles$d["option__item"]
|
|
79036
|
+
}, option);
|
|
79037
|
+
}))) : React__default.createElement("div", {
|
|
79038
|
+
className: styles$d["loader"]
|
|
79039
|
+
}, React__default.createElement("span", {
|
|
79040
|
+
className: styles$d["loader__dot"]
|
|
79041
|
+
}), React__default.createElement("span", {
|
|
79042
|
+
className: styles$d["loader__dot"]
|
|
79043
|
+
}), React__default.createElement("span", {
|
|
79044
|
+
className: styles$d["loader__dot"]
|
|
79045
|
+
}))), (item.message || item.text) && React__default.createElement("div", {
|
|
79046
|
+
className: styles$d["time"]
|
|
79047
|
+
}, item.time)));
|
|
79048
|
+
});
|
|
79049
|
+
}()));
|
|
79050
|
+
};
|
|
79051
|
+
|
|
79052
|
+
var ChatWithAI = function ChatWithAI() {
|
|
79053
|
+
var _prompt$name;
|
|
79054
|
+
|
|
79055
|
+
var _useAIChat = useAIChat(),
|
|
79056
|
+
theme = _useAIChat.theme,
|
|
79057
|
+
setTheme = _useAIChat.setTheme,
|
|
79058
|
+
goBack = _useAIChat.goBack,
|
|
79059
|
+
isOpenSideBar = _useAIChat.isOpenSideBar,
|
|
79060
|
+
prompt = _useAIChat.prompt,
|
|
79061
|
+
chats = _useAIChat.chats,
|
|
79062
|
+
handleChoiceOption = _useAIChat.handleChoiceOption,
|
|
79063
|
+
getBracketedText = _useAIChat.getBracketedText,
|
|
79064
|
+
submitPromptMessage = _useAIChat.submitPromptMessage,
|
|
79065
|
+
inputString = _useAIChat.inputString,
|
|
79066
|
+
setInputString = _useAIChat.setInputString;
|
|
79067
|
+
|
|
79068
|
+
return React__default.createElement("div", {
|
|
79069
|
+
className: styles$d['ai-mario-chat']
|
|
79070
|
+
}, React__default.createElement(ChatHeader, {
|
|
79071
|
+
theme: theme,
|
|
79072
|
+
setTheme: setTheme,
|
|
79073
|
+
goBack: goBack,
|
|
79074
|
+
isOpenSideBar: isOpenSideBar,
|
|
79075
|
+
name: (_prompt$name = prompt === null || prompt === void 0 ? void 0 : prompt.name) != null ? _prompt$name : ""
|
|
79076
|
+
}), React__default.createElement(ChatContent, {
|
|
79077
|
+
theme: theme,
|
|
79078
|
+
chats: chats,
|
|
79079
|
+
onSelectOption: handleChoiceOption,
|
|
79080
|
+
getBracketedText: getBracketedText,
|
|
79081
|
+
submitPromptMessage: submitPromptMessage,
|
|
79082
|
+
inputString: inputString,
|
|
79083
|
+
setInputString: setInputString
|
|
79084
|
+
}));
|
|
79085
|
+
};
|
|
79086
|
+
|
|
79087
|
+
var useHistoryPrompt = function useHistoryPrompt() {
|
|
79088
|
+
var dispatch = reactRedux.useDispatch();
|
|
79089
|
+
var history = reactRouterDom.useHistory();
|
|
79090
|
+
|
|
79091
|
+
var _useParams = reactRouterDom.useParams(),
|
|
79092
|
+
id = _useParams.id;
|
|
79093
|
+
|
|
79094
|
+
var _useState = React.useState("light"),
|
|
79095
|
+
theme = _useState[0],
|
|
79096
|
+
setTheme = _useState[1];
|
|
79097
|
+
|
|
79098
|
+
var isOpenSideBar = reactRedux.useSelector(function (state) {
|
|
79099
|
+
var _state$common;
|
|
79100
|
+
|
|
79101
|
+
return (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.menuBar;
|
|
79102
|
+
});
|
|
79103
|
+
|
|
79104
|
+
var _useState2 = React.useState(),
|
|
79105
|
+
prompt = _useState2[0],
|
|
79106
|
+
setPrompt = _useState2[1];
|
|
79107
|
+
|
|
79108
|
+
var goBack = function goBack() {
|
|
79109
|
+
history.goBack();
|
|
79110
|
+
};
|
|
79111
|
+
|
|
79112
|
+
var getBracketedText = function getBracketedText(text) {
|
|
79113
|
+
return (text.match(/\[\[(.*?)\]\]/) || [])[1] || null;
|
|
79114
|
+
};
|
|
79115
|
+
|
|
79116
|
+
var getPromptDetail = React.useCallback(function () {
|
|
79117
|
+
try {
|
|
79118
|
+
var _temp3 = function _temp3() {
|
|
79119
|
+
dispatch(marioCore.setLoading(false));
|
|
79120
|
+
};
|
|
79121
|
+
|
|
79122
|
+
dispatch(marioCore.setLoading(true));
|
|
79123
|
+
|
|
79124
|
+
var _temp4 = _catch(function () {
|
|
79125
|
+
return Promise.resolve(getHistoryById(parseInt(id))).then(function (res) {
|
|
79126
|
+
if (res.data) {
|
|
79127
|
+
setPrompt(res.data);
|
|
79128
|
+
}
|
|
79129
|
+
});
|
|
79130
|
+
}, function (err) {
|
|
79131
|
+
dispatch(marioCore.setAlert({
|
|
79132
|
+
type: "danger",
|
|
79133
|
+
message: err.message
|
|
79134
|
+
}));
|
|
79135
|
+
});
|
|
79136
|
+
|
|
79137
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
79138
|
+
} catch (e) {
|
|
79139
|
+
return Promise.reject(e);
|
|
79140
|
+
}
|
|
79141
|
+
}, [id]);
|
|
79142
|
+
React.useEffect(function () {
|
|
79143
|
+
id && getPromptDetail();
|
|
79144
|
+
}, [id]);
|
|
79145
|
+
return {
|
|
79146
|
+
theme: theme,
|
|
79147
|
+
setTheme: setTheme,
|
|
79148
|
+
goBack: goBack,
|
|
79149
|
+
isOpenSideBar: isOpenSideBar,
|
|
79150
|
+
prompt: prompt,
|
|
79151
|
+
getBracketedText: getBracketedText
|
|
79152
|
+
};
|
|
79153
|
+
};
|
|
79154
|
+
|
|
79155
|
+
var ViewHistoryPrompt = function ViewHistoryPrompt() {
|
|
79156
|
+
var _prompt$name;
|
|
79157
|
+
|
|
79158
|
+
var _useHistoryPrompt = useHistoryPrompt(),
|
|
79159
|
+
goBack = _useHistoryPrompt.goBack,
|
|
79160
|
+
isOpenSideBar = _useHistoryPrompt.isOpenSideBar,
|
|
79161
|
+
prompt = _useHistoryPrompt.prompt,
|
|
79162
|
+
setTheme = _useHistoryPrompt.setTheme,
|
|
79163
|
+
theme = _useHistoryPrompt.theme,
|
|
79164
|
+
getBracketedText = _useHistoryPrompt.getBracketedText;
|
|
79165
|
+
|
|
79166
|
+
return React__default.createElement("div", {
|
|
79167
|
+
className: styles$d["ai-mario-chat"]
|
|
79168
|
+
}, React__default.createElement(ChatHeader, {
|
|
79169
|
+
theme: theme,
|
|
79170
|
+
setTheme: setTheme,
|
|
79171
|
+
goBack: goBack,
|
|
79172
|
+
isOpenSideBar: isOpenSideBar,
|
|
79173
|
+
name: (_prompt$name = prompt === null || prompt === void 0 ? void 0 : prompt.name) != null ? _prompt$name : ""
|
|
79174
|
+
}), React__default.createElement(ChatContent, {
|
|
79175
|
+
theme: theme,
|
|
79176
|
+
chats: (prompt === null || prompt === void 0 ? void 0 : prompt.messages) || [],
|
|
79177
|
+
getBracketedText: getBracketedText,
|
|
79178
|
+
inputString: ""
|
|
79179
|
+
}));
|
|
79180
|
+
};
|
|
79181
|
+
|
|
79182
|
+
var styles$e = {"survey-portal":"_32YVh","create-new-btn":"_2pqkt","survey-portal-dashboard":"_10mFg","dashboard-root":"_ol6v1","dashboard-header":"_1nGwv","header-left":"_3ZVx1","header-left-title":"_3zJ6N","header-left-description":"_aNEzP","dashboard-cards":"_T2QhN","show-blur":"_2k8eW","scroll-btn":"_3LX77","dashboard-card":"_rV_wf","dashboard-card-title":"_1dkjY","dashboard-card-description":"_2N0Jl","learn-more-btn":"_FoRnw","dashboard-surveys":"_y4RMj","dashboard-stats":"_2vCyM","dashboard-stats-title":"_1RtaL","create-template-button":"_1VeM-","create-survey-button":"_2FW07","survey-index":"_1-7Lk","survey-index-left":"_7ASwE","last-survey-index":"_5wgo2","survey-index-right":"_1bOyN","survey-index-card":"_2N-Ie","index-title":"_n24sR","link-view-survey":"_1f6ee","header-link":"_3dWko","active-survey-card":"_bKT0k","index-card-value":"_1O-jW","index-card-description":"_GLrEM","schedule-survey-card":"_1LDJ_","survey-item":"_W9PK3","survey-item-title":"_3c4hi","survey-item-date":"_2EvrJ","survey-item-Active":"_29PJt","survey-item-Close":"_GAmd7","survey-item-more":"_1Gz67","action-wrapper":"_15kTE","action-item":"_3LaNO","template-icon":"_nXa-q"};
|
|
79183
|
+
|
|
79184
|
+
var PopoverCustom$2 = core$1.styled(core$1.Popover)(function () {
|
|
79185
|
+
return {
|
|
79186
|
+
"& .MuiPopover-paper": {
|
|
79187
|
+
boxShadow: "0px 0px 32px 0px rgba(64, 95, 152, 0.32)"
|
|
79188
|
+
}
|
|
79189
|
+
};
|
|
79190
|
+
});
|
|
79191
|
+
|
|
77654
79192
|
var SurveyPortal = function SurveyPortal() {
|
|
77655
79193
|
var _listTotal$find, _listTotal$find2, _listSurvey$items;
|
|
77656
79194
|
|
|
@@ -77746,22 +79284,22 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77746
79284
|
};
|
|
77747
79285
|
}, [questionCateList]);
|
|
77748
79286
|
return React__default.createElement(core$1.Grid, {
|
|
77749
|
-
className: styles$
|
|
79287
|
+
className: styles$e["dashboard-root"] + " "
|
|
77750
79288
|
}, React__default.createElement(core$1.Grid, {
|
|
77751
|
-
className: styles$
|
|
79289
|
+
className: styles$e["dashboard-header"] + " " + styles$e[isScrollable ? "show-blur" : ""] + " d-flex justify-content-between shadow-lg"
|
|
77752
79290
|
}, React__default.createElement(core$1.Grid, {
|
|
77753
|
-
className: "" + styles$
|
|
79291
|
+
className: "" + styles$e["header-left"]
|
|
77754
79292
|
}, React__default.createElement(core$1.Typography, {
|
|
77755
|
-
className: "" + styles$
|
|
79293
|
+
className: "" + styles$e["header-left-title"]
|
|
77756
79294
|
}, "Empower student well being with ready-to-use survey templates"), React__default.createElement(core$1.Typography, {
|
|
77757
|
-
className: "" + styles$
|
|
79295
|
+
className: "" + styles$e["header-left-description"]
|
|
77758
79296
|
}, "Our templates are research-based and designed to track and support emotional, social, and academic health in schools.")), React__default.createElement(core$1.Grid, {
|
|
77759
79297
|
ref: cardsRef,
|
|
77760
|
-
className: styles$
|
|
79298
|
+
className: styles$e["dashboard-cards"]
|
|
77761
79299
|
}, questionCateList === null || questionCateList === void 0 ? void 0 : questionCateList.map(function (r, index) {
|
|
77762
79300
|
return React__default.createElement(core$1.Grid, {
|
|
77763
79301
|
key: index,
|
|
77764
|
-
className: styles$
|
|
79302
|
+
className: styles$e["dashboard-card"]
|
|
77765
79303
|
}, React__default.createElement(core$1.Grid, null, React__default.createElement(core$1.Grid, {
|
|
77766
79304
|
container: true,
|
|
77767
79305
|
spacing: 2
|
|
@@ -77772,40 +79310,40 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77772
79310
|
arrow: true,
|
|
77773
79311
|
title: r.name || ""
|
|
77774
79312
|
}, React__default.createElement(core$1.Typography, {
|
|
77775
|
-
className: styles$
|
|
79313
|
+
className: styles$e["dashboard-card-title"]
|
|
77776
79314
|
}, r.name))), React__default.createElement(core$1.Grid, {
|
|
77777
79315
|
item: true,
|
|
77778
79316
|
xs: 4,
|
|
77779
79317
|
className: "d-flex justify-content-end"
|
|
77780
79318
|
}, React__default.createElement("img", {
|
|
77781
|
-
className: "" + styles$
|
|
79319
|
+
className: "" + styles$e["template-icon"],
|
|
77782
79320
|
src: "/images/" + templateIcons[index]
|
|
77783
79321
|
}))), React__default.createElement(CustomTooltip, {
|
|
77784
79322
|
arrow: true,
|
|
77785
79323
|
title: r.description || ""
|
|
77786
79324
|
}, React__default.createElement(core$1.Typography, {
|
|
77787
|
-
className: styles$
|
|
79325
|
+
className: styles$e["dashboard-card-description"]
|
|
77788
79326
|
}, r.description))), React__default.createElement(reactstrap.Button, {
|
|
77789
79327
|
onClick: function onClick() {
|
|
77790
79328
|
return goToTemplateSurvey();
|
|
77791
79329
|
},
|
|
77792
|
-
className: styles$
|
|
79330
|
+
className: styles$e["learn-more-btn"]
|
|
77793
79331
|
}, React__default.createElement(core$1.Typography, null, "Learn More"), React__default.createElement(ArrowForwardIcon, null)));
|
|
77794
79332
|
})), React__default.createElement("img", {
|
|
77795
79333
|
onClick: function onClick() {
|
|
77796
79334
|
return handleScroll();
|
|
77797
79335
|
},
|
|
77798
|
-
className: "" + styles$
|
|
79336
|
+
className: "" + styles$e["scroll-btn"],
|
|
77799
79337
|
src: imageSrc,
|
|
77800
79338
|
alt: "scroll",
|
|
77801
79339
|
onMouseEnter: handleMouseEnter,
|
|
77802
79340
|
onMouseLeave: handleMouseLeave
|
|
77803
79341
|
})), React__default.createElement(core$1.Grid, {
|
|
77804
|
-
className: styles$
|
|
79342
|
+
className: styles$e["dashboard-surveys"] + " shadow-lg"
|
|
77805
79343
|
}, React__default.createElement(core$1.Grid, {
|
|
77806
|
-
className: styles$
|
|
79344
|
+
className: styles$e["dashboard-stats"]
|
|
77807
79345
|
}, React__default.createElement(core$1.Typography, {
|
|
77808
|
-
className: styles$
|
|
79346
|
+
className: styles$e["dashboard-stats-title"]
|
|
77809
79347
|
}, "Surveys"), React__default.createElement(core$1.Grid, {
|
|
77810
79348
|
className: "d-flex align-items-center"
|
|
77811
79349
|
}, React__default.createElement("button", {
|
|
@@ -77813,85 +79351,85 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77813
79351
|
localStorage.setItem("OPEN_DEFAULT_MODEL", "true");
|
|
77814
79352
|
goToTemplateSurvey();
|
|
77815
79353
|
},
|
|
77816
|
-
className: styles$
|
|
79354
|
+
className: styles$e["create-template-button"]
|
|
77817
79355
|
}, React__default.createElement(AddIcon, null), React__default.createElement(core$1.Typography, null, "CREATE NEW TEMPLATE")), React__default.createElement("button", {
|
|
77818
79356
|
onClick: function onClick() {
|
|
77819
79357
|
return handleChangePageCreate();
|
|
77820
79358
|
},
|
|
77821
|
-
className: styles$
|
|
79359
|
+
className: styles$e["create-survey-button"]
|
|
77822
79360
|
}, React__default.createElement(AddIcon, null), React__default.createElement(core$1.Typography, null, "CREATE NEW SURVEY")))), React__default.createElement(core$1.Grid, {
|
|
77823
|
-
className: styles$
|
|
79361
|
+
className: styles$e["survey-index"] + " d-flex"
|
|
77824
79362
|
}, React__default.createElement(core$1.Grid, {
|
|
77825
|
-
className: styles$
|
|
79363
|
+
className: styles$e["survey-index-left"] + " d-flex flex-column"
|
|
77826
79364
|
}, React__default.createElement(core$1.Grid, {
|
|
77827
|
-
className: "d-flex align-items-center " + styles$
|
|
79365
|
+
className: "d-flex align-items-center " + styles$e["header-link"]
|
|
77828
79366
|
}, React__default.createElement(core$1.Typography, {
|
|
77829
|
-
className: "" + styles$
|
|
79367
|
+
className: "" + styles$e["index-title"]
|
|
77830
79368
|
}, "Survey Dashboard"), React__default.createElement(core$1.Grid, {
|
|
77831
79369
|
onClick: function onClick() {
|
|
77832
79370
|
return goToDashboardSurvey();
|
|
77833
79371
|
},
|
|
77834
|
-
className: "d-flex align-items-center " + styles$
|
|
79372
|
+
className: "d-flex align-items-center " + styles$e["link-view-survey"]
|
|
77835
79373
|
}, React__default.createElement(core$1.Typography, null, "View"), React__default.createElement(ArrowForwardIcon, null))), React__default.createElement(core$1.Grid, {
|
|
77836
|
-
className: "d-flex justify-content-between align-items-center " + styles$
|
|
79374
|
+
className: "d-flex justify-content-between align-items-center " + styles$e["active-survey-card"] + " " + styles$e["survey-index-card"]
|
|
77837
79375
|
}, React__default.createElement(core$1.Grid, {
|
|
77838
79376
|
className: "d-flex flex-column"
|
|
77839
79377
|
}, React__default.createElement(core$1.Typography, {
|
|
77840
|
-
className: "" + styles$
|
|
79378
|
+
className: "" + styles$e["index-card-value"]
|
|
77841
79379
|
}, ((_listTotal$find = listTotal.find(function (r) {
|
|
77842
79380
|
return r.title == "active_surveys";
|
|
77843
79381
|
})) === null || _listTotal$find === void 0 ? void 0 : _listTotal$find.value) || 0), React__default.createElement(core$1.Typography, {
|
|
77844
|
-
className: "" + styles$
|
|
79382
|
+
className: "" + styles$e["index-card-description"]
|
|
77845
79383
|
}, "Active Surveys")), React__default.createElement(core$1.Grid, {
|
|
77846
79384
|
className: "full-height"
|
|
77847
79385
|
}, React__default.createElement("img", {
|
|
77848
79386
|
src: "/images/active-surveys.png",
|
|
77849
79387
|
alt: "total-card"
|
|
77850
79388
|
}))), React__default.createElement(core$1.Grid, {
|
|
77851
|
-
className: "d-flex justify-content-between align-items-center " + styles$
|
|
79389
|
+
className: "d-flex justify-content-between align-items-center " + styles$e["schedule-survey-card"] + " " + styles$e["survey-index-card"]
|
|
77852
79390
|
}, React__default.createElement(core$1.Grid, {
|
|
77853
79391
|
className: "d-flex flex-column"
|
|
77854
79392
|
}, React__default.createElement(core$1.Typography, {
|
|
77855
|
-
className: "" + styles$
|
|
79393
|
+
className: "" + styles$e["index-card-value"]
|
|
77856
79394
|
}, ((_listTotal$find2 = listTotal.find(function (r) {
|
|
77857
79395
|
return r.title == "scheduled_sessions";
|
|
77858
79396
|
})) === null || _listTotal$find2 === void 0 ? void 0 : _listTotal$find2.value) || 0), React__default.createElement(core$1.Typography, {
|
|
77859
|
-
className: "" + styles$
|
|
79397
|
+
className: "" + styles$e["index-card-description"]
|
|
77860
79398
|
}, "Scheduled Session")), React__default.createElement(core$1.Grid, {
|
|
77861
79399
|
className: "full-height"
|
|
77862
79400
|
}, React__default.createElement("img", {
|
|
77863
79401
|
src: "/images/scheduled-session.png",
|
|
77864
79402
|
alt: "total-card"
|
|
77865
79403
|
})))), React__default.createElement(core$1.Grid, {
|
|
77866
|
-
className: styles$
|
|
79404
|
+
className: styles$e["survey-index-right"]
|
|
77867
79405
|
}, React__default.createElement(core$1.Grid, {
|
|
77868
|
-
className: "d-flex align-items-center " + styles$
|
|
79406
|
+
className: "d-flex align-items-center " + styles$e["header-link"]
|
|
77869
79407
|
}, React__default.createElement(core$1.Typography, {
|
|
77870
|
-
className: "" + styles$
|
|
79408
|
+
className: "" + styles$e["index-title"]
|
|
77871
79409
|
}, "Last Surveys"), React__default.createElement(core$1.Grid, {
|
|
77872
79410
|
onClick: function onClick() {
|
|
77873
79411
|
return goToSurveyList();
|
|
77874
79412
|
},
|
|
77875
|
-
className: "d-flex align-items-center " + styles$
|
|
79413
|
+
className: "d-flex align-items-center " + styles$e["link-view-survey"]
|
|
77876
79414
|
}, React__default.createElement(core$1.Typography, null, "See All"), React__default.createElement(ArrowForwardIcon, null))), React__default.createElement(core$1.Grid, {
|
|
77877
|
-
className: styles$
|
|
79415
|
+
className: styles$e["last-survey-index"]
|
|
77878
79416
|
}, listSurvey === null || listSurvey === void 0 ? void 0 : (_listSurvey$items = listSurvey.items) === null || _listSurvey$items === void 0 ? void 0 : _listSurvey$items.map(function (r) {
|
|
77879
79417
|
return React__default.createElement(core$1.Grid, {
|
|
77880
|
-
className: "d-flex align-items-center " + styles$
|
|
79418
|
+
className: "d-flex align-items-center " + styles$e["survey-item"]
|
|
77881
79419
|
}, React__default.createElement(CustomTooltip, {
|
|
77882
79420
|
arrow: true,
|
|
77883
79421
|
title: r.title || ""
|
|
77884
79422
|
}, React__default.createElement(core$1.Typography, {
|
|
77885
|
-
className: "" + styles$
|
|
79423
|
+
className: "" + styles$e["survey-item-title"]
|
|
77886
79424
|
}, r.title)), React__default.createElement(core$1.Typography, {
|
|
77887
|
-
className: "" + styles$
|
|
79425
|
+
className: "" + styles$e["survey-item-date"]
|
|
77888
79426
|
}, React__default.createElement(ConvertTime, {
|
|
77889
79427
|
time: r.createdDate,
|
|
77890
79428
|
line: true
|
|
77891
79429
|
})), React__default.createElement(core$1.Grid, {
|
|
77892
|
-
className: "" + styles$
|
|
79430
|
+
className: "" + styles$e["survey-item-" + r.status]
|
|
77893
79431
|
}, React__default.createElement(core$1.Typography, null, r.status)), React__default.createElement(core$1.Grid, {
|
|
77894
|
-
className: "" + styles$
|
|
79432
|
+
className: "" + styles$e["survey-item-more"]
|
|
77895
79433
|
}, React__default.createElement(reactstrap.Button, {
|
|
77896
79434
|
"aria-describedby": popoverId,
|
|
77897
79435
|
variant: "text",
|
|
@@ -77901,7 +79439,7 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77901
79439
|
return handleClickAction(event, r.id, (_r$studentIds = r.studentIds) === null || _r$studentIds === void 0 ? void 0 : _r$studentIds[0]);
|
|
77902
79440
|
}
|
|
77903
79441
|
}, React__default.createElement(MoreVertIcon, null))));
|
|
77904
|
-
}))))), React__default.createElement(PopoverCustom$
|
|
79442
|
+
}))))), React__default.createElement(PopoverCustom$2, {
|
|
77905
79443
|
id: popoverId,
|
|
77906
79444
|
open: openPopover,
|
|
77907
79445
|
anchorEl: anchorEl,
|
|
@@ -77914,26 +79452,26 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77914
79452
|
vertical: "top",
|
|
77915
79453
|
horizontal: "left"
|
|
77916
79454
|
},
|
|
77917
|
-
className: styles$
|
|
79455
|
+
className: styles$e[classFontSize]
|
|
77918
79456
|
}, React__default.createElement("ul", {
|
|
77919
|
-
className: "" + styles$
|
|
79457
|
+
className: "" + styles$e["action-wrapper"]
|
|
77920
79458
|
}, React__default.createElement("li", {
|
|
77921
79459
|
onClick: function onClick() {
|
|
77922
79460
|
return open(TYPE_SURVEY_OPTION.VIEW_RESPONSE, itemSelectedId);
|
|
77923
79461
|
},
|
|
77924
|
-
className: styles$
|
|
79462
|
+
className: styles$e["action-item"] + " text-nowrap"
|
|
77925
79463
|
}, t("view_responses")), React__default.createElement("li", {
|
|
77926
79464
|
onClick: function onClick() {
|
|
77927
79465
|
return open(TYPE_SURVEY_OPTION.VIEW_PREVIEW, itemSelectedId);
|
|
77928
79466
|
},
|
|
77929
|
-
className: styles$
|
|
79467
|
+
className: styles$e["action-item"] + " text-nowrap"
|
|
77930
79468
|
}, t("preview_survey")), React__default.createElement("li", {
|
|
77931
79469
|
onClick: function onClick() {
|
|
77932
79470
|
return open(TYPE_SURVEY_OPTION.ANONYMOUS, itemSelectedId);
|
|
77933
79471
|
},
|
|
77934
|
-
className: styles$
|
|
79472
|
+
className: styles$e["action-item"] + " text-nowrap"
|
|
77935
79473
|
}, t("anonymous_link")), React__default.createElement("li", {
|
|
77936
|
-
className: styles$
|
|
79474
|
+
className: styles$e["action-item"] + " text-nowrap",
|
|
77937
79475
|
onClick: function onClick() {
|
|
77938
79476
|
return handleDownloadCsvSurvey(itemSelectedId);
|
|
77939
79477
|
}
|
|
@@ -77941,7 +79479,7 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77941
79479
|
onClick: function onClick() {
|
|
77942
79480
|
return open(TYPE_SURVEY_OPTION.DELETE, itemSelectedId);
|
|
77943
79481
|
},
|
|
77944
|
-
className: styles$
|
|
79482
|
+
className: styles$e["action-item"] + " text-nowrap"
|
|
77945
79483
|
}, t("delete")))), React__default.createElement(ModelLinkSurvey, {
|
|
77946
79484
|
open: !!anonymousKey,
|
|
77947
79485
|
onClose: handleCloseModelLink,
|
|
@@ -77952,6 +79490,7 @@ var SurveyPortal = function SurveyPortal() {
|
|
|
77952
79490
|
|
|
77953
79491
|
core.LicenseManager.setLicenseKey(marioCore.LICENSE_AGGRID);
|
|
77954
79492
|
|
|
79493
|
+
exports.AIMario = AIMario;
|
|
77955
79494
|
exports.AdminTraining = AdminTraining;
|
|
77956
79495
|
exports.AssessmentAssignmentContainer = AssessmentAssignmentContainer;
|
|
77957
79496
|
exports.AssessmentList = AssessmentList;
|
|
@@ -77959,6 +79498,7 @@ exports.AssetLog = AssetLog;
|
|
|
77959
79498
|
exports.AssignmentList = AssignmentList;
|
|
77960
79499
|
exports.BadgeList = BadgeList;
|
|
77961
79500
|
exports.CertificateContainer = CertificateContainer;
|
|
79501
|
+
exports.ChatWithAI = ChatWithAI;
|
|
77962
79502
|
exports.ClassList = ClassList;
|
|
77963
79503
|
exports.CompareTeacher = CompareTeacher;
|
|
77964
79504
|
exports.ConferenceRubricDetail = ConferenceRubricDetail;
|
|
@@ -77975,6 +79515,7 @@ exports.HomePage = HomePage;
|
|
|
77975
79515
|
exports.LearningStrategyList = LearningStrategyList;
|
|
77976
79516
|
exports.LearningSupportCategoryList = LearningSupportCategoryList;
|
|
77977
79517
|
exports.MainLayoutAdmin = MainLayoutAdmin;
|
|
79518
|
+
exports.MarioAi = MarioAi;
|
|
77978
79519
|
exports.OneRosterContainer = OneRosterContainer;
|
|
77979
79520
|
exports.PreviewSurveyAdmin = PreviewSurveyAdmin;
|
|
77980
79521
|
exports.QuestionBankContainer = QuestionBankContainer;
|
|
@@ -78008,5 +79549,6 @@ exports.TemplateBuilderPage = TemplateBuilderPage;
|
|
|
78008
79549
|
exports.TemplateContainer = TemplateContainer;
|
|
78009
79550
|
exports.TemplateStartBuild = TemplateStartBuild;
|
|
78010
79551
|
exports.TutorialScreenContainer = TutorialScreenContainer;
|
|
79552
|
+
exports.ViewHistoryPrompt = ViewHistoryPrompt;
|
|
78011
79553
|
exports.WeeklyQuest = WeeklyQuest;
|
|
78012
79554
|
//# sourceMappingURL=index.js.map
|