1"use strict"; 2Object.defineProperty(exports, "__esModule", { value: true }); 3exports.AIPanel = void 0; 4var tslib_1 = require("tslib"); 5var React = require("react"); 6var AppReactUtils_1 = require("../../../app/pics/jsw/utils/AppReactUtils"); 7var aichat_1 = require("./aichat"); 8importCss('/global/pics/css/material-icons.css'); 9importCss('/app/pics/css/mobileApp.css'); 10importCss('/ai/pics/css/ai.css'); 11function AIPanel(props) { 12 var mainElemRef = React.useRef(null); 13 var chatRef = React.useRef(null); 14 var _a = AppReactUtils_1.AppReactUtils.useRefStateWithSessionStorage(false, 'aipanelExpanded'), isExpanded = _a[0], setIsExpaned = _a[1]; 15 React.useEffect(function () { 16 barLoadGoogleFont('Open sans'); 17 window["aipanelFuncs"] = { 18 openChat: function (params) { 19 var _a; 20 (_a = chatRef === null || chatRef === void 0 ? void 0 : chatRef.current) === null || _a === void 0 ? void 0 : _a.openChat(params); 21 } 22 }; 23 return function () { 24 window["aipanelFuncs"] = null; 25 }; 26 }, []); 27 React.useEffect(function () { 28 if ((isExpanded && !$('body').hasClass('aipanelExpanded')) 29 || (!isExpanded && $('body').hasClass('aipanelExpanded'))) { 30 $('body').toggleClass('aipanelExpanded', isExpanded); 31 $(window).resize(); 32 } 33 }, [isExpanded]); 34 function expandClick() { 35 setIsExpaned(!isExpanded); 36 } 37 return (React.createElement("div", { ref: mainElemRef, className: 'aipanel-outer ' + (isExpanded ? 'isExpanded' : '') }, 38 React.createElement("div", { className: 'aipanel-header' }, 39 React.createElement("div", { className: 'aipanel-header-prefix' }, 40 React.createElement("a", tslib_1.__assign({ className: 'app-link-button normalCase inheritColor normalWeight aipanel-expandbtn' }, AppReactUtils_1.AppReactUtils.addClickHandler(expandClick), { title: isExpanded ? ls(4467) : ls(4468) }), 41 React.createElement("i", { className: isExpanded ? 'fa fa-fw fa-angle-right' : 'fa fa-fw fa-angle-left' }))), 42 React.createElement("div", { className: 'aipanel-header-title' }, 43 "EduPage", 44 React.createElement("b", null, "AI"))), 45 React.createElement("div", { className: 'aipanel-chat' }, 46 React.createElement(aichat_1.AiChatMain, { funcRef: chatRef })))); 47} 48exports.AIPanel = AIPanel;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.