"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2125,7502],{77502:(r,e,t)=>{t.r(e),t.d(e,{default:()=>a});var n=t(50245),l=t(29766);function o(){return(o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}let a=(0,n.memo)(function(r){var e=r.children,t=r.math,a=r.block,s=r.errorColor,i=r.renderError,c=r.settings,f=r.as,u=function(r,e){if(null==r)return{};var t,n,l={},o=Object.keys(r);for(n=0;n<o.length;n++)e.indexOf(t=o[n])>=0||(l[t]=r[t]);return l}(r,["children","math","block","errorColor","renderError","settings","as"]),d=null!=e?e:t,h=(0,n.useState)({innerHtml:""}),m=h[0],E=h[1];return(0,n.useEffect)(function(){try{var r=l.default.renderToString(d,o({displayMode:!!a,errorColor:s,throwOnError:!!i},c));E({innerHtml:r})}catch(r){if(!(r instanceof l.default.ParseError||r instanceof TypeError))throw r;E(i?{errorElement:i(r)}:{innerHtml:r.message})}},[a,d,s,i,c]),"errorElement"in m?m.errorElement:n.createElement(f||(a?"div":"span"),Object.assign({},u,{dangerouslySetInnerHTML:{__html:m.innerHtml}}))})},82125:(r,e,t)=>{t.r(e),t.d(e,{AbTexError:()=>s});var n=t(57505),l=t(14731),o=t(25235),a=t(77502);let s=({code:r="",errorMsg:e})=>{let t;return(0,n.jsxs)("div",{className:"flex flex-col w-full","data-cy":o.d.getBlockTexErrorContainer,children:[(0,n.jsx)(a.default,{block:!0,math:r,errorColor:l.wv}),(0,n.jsx)("div",{className:"flex w-full",style:{color:l.wv},"data-cy":o.d.getBlockTexErrorMessage,children:(t=e?.split(":"),t?.length>0?(t.shift(),t.join("")):t[0])})]})}}}]);