@pie-element/extended-text-entry 15.1.2-next.1 → 15.1.2-next.2

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.
@@ -306,10 +306,10 @@ ${n}`}}),s}function pw(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
306
306
  animation: ${lN} 1.4s ease-in-out infinite;
307
307
  `,fN=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return A({root:[`root`,n,`color${K(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${K(n)}`,i&&`circleDisableShrink`]},oN,t)},pN=G(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${K(n.color)}`]]}})(Io(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:uN||{animation:`${cN} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),mN=G(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),hN=G(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${K(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Io(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:dN||{animation:`${lN} 1.4s ease-in-out infinite`}}]}))),gN=G(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Io(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),_N=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=fN(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((sN-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,U.jsx)(pN,{className:k(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,U.jsxs)(mN,{className:m.svg,ownerState:p,viewBox:`${sN/2} ${sN/2} ${sN} ${sN}`,children:[o?(0,U.jsx)(gN,{className:m.track,ownerState:p,cx:sN,cy:sN,r:(sN-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,U.jsx)(hN,{className:m.circle,style:h,ownerState:p,cx:sN,cy:sN,r:(sN-l)/2,fill:`none`,strokeWidth:l})]})})});function vN(e){return Yr(`MuiIconButton`,e)}var yN=Xr(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),bN=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return A({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${K(r)}`,i&&`edge${K(i)}`,`size${K(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},vN,t)},xN=G(iN,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${K(n.color)}`],n.edge&&t[`edge${K(n.edge)}`],t[`size${K(n.size)}`]]}})(Io(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),Io(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${yN.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${yN.loading}`]:{color:`transparent`}}))),SN=G(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),CN=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=Zj(u),h=f??(0,U.jsx)(_N,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=bN(g);return(0,U.jsxs)(xN,{id:d?m:u,className:k(_.root,a),centerRipple:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,U.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,U.jsx)(SN,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),wN=Vj((0,U.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),TN=`pie-toolbar`,EN=Vj((0,U.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),DN=G(CN)({verticalAlign:`top`,width:`28px`,height:`28px`,color:`var(--editable-html-toolbar-check, #00bb00)`,padding:`4px`}),ON=({onClick:e,doneButtonRef:t})=>(0,U.jsx)(DN,{"aria-label":`Done`,buttonRef:t,onClick:e,children:(0,U.jsx)(EN,{})});ON.propTypes={onClick:p.func,doneButtonRef:p.func};var kN=ON,AN=G(`div`,{shouldForwardProp:e=>![`showDone`,`toolbarAlignment`,`isFocused`,`autoWidth`,`isHidden`].includes(e)})(({showDone:e,toolbarAlignment:t,isFocused:n,autoWidth:r,isHidden:i})=>({position:`absolute`,zIndex:10,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:e?`280px`:`265px`,margin:`5px 0 0 0`,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:1,...t===`right`&&{right:0},...r?{width:`auto`}:{width:`100%`},...i&&{visibility:`hidden`}})),jN=G(CN)({width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`}),MN=G(`div`)({display:`flex`});function NN(e){let{children:t,deletable:n,toolbarOpts:r,autoWidth:i,isFocused:a,doneButtonRef:o,onDelete:s,showDone:c,onDone:l,style:u}=e,d=r.minWidth===void 0?{}:{minWidth:r.minWidth};return(0,U.jsxs)(AN,{className:TN,showDone:c,toolbarAlignment:r.alignment,isFocused:r.alwaysVisible||a,autoWidth:i,isHidden:r.isHidden===!0,style:{...d,...u},children:[t,(0,U.jsxs)(MN,{children:[n&&(0,U.jsx)(jN,{"aria-label":`Delete`,onMouseDown:e=>s?.(e),children:(0,U.jsx)(wN,{})}),c&&(0,U.jsx)(kN,{doneButtonRef:o,onClick:l})]})]})}var PN=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s}=o,{respAreaToolbar:c,error:l}=i,u=r(),[d,f]=(0,P.useState)(!1),p=c([n,u],t,()=>{}),m=(0,P.useRef)(null),h;if(l){let e=l(),t=parseInt(o.index,10);h=!!e?.[t]?.[0]}return(0,P.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&f(a):f(a)},[t,n,a]),(0,P.useEffect)(()=>{let e=e=>{!(e.target.closest(`.insert-character-dialog`)||e.target.closest(`[data-toolbar-for]`))&&m.current&&!m.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&f(!1)};return d?document.addEventListener(`mousedown`,e):document.removeEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[d]),(0,U.jsxs)(jb,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline-flex`,minHeight:`55px`,position:`relative`,cursor:`pointer`},children:[(0,U.jsx)(`div`,{...o,style:{display:`inline-flex`,width:`100%`,minHeight:`46px`,height:`46px`,backgroundColor:`#FFF`,border:`1px solid ${h?`red`:`#C0C3CF`}`,boxSizing:`border-box`,borderRadius:`4px`,overflow:`hidden`,padding:`12px 21px`,margin:`0 4px`,minWidth:`178px`,visibility:d?`hidden`:`visible`},onClick:()=>f(!0),dangerouslySetInnerHTML:{__html:s||`<div>&nbsp;</div>`}}),d&&(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(`div`,{ref:m,className:`absolute z-50 bg-white shadow-lg rounded p-2`,style:{zIndex:1},children:(0,U.jsx)(p,{})}),t._tiptapContainerEl&&db.createPortal((0,U.jsx)(NN,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),t._toolbarOpened=!1,t.view.dispatch(e),f(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};PN.propTypes={attributes:p.object,error:p.any,value:p.string,isFocused:p.bool};var FN=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function IN(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function LN(e){return`nodeType`in e}function RN(e){return e?IN(e)?e:LN(e)?e.ownerDocument?.defaultView??window:window:window}function zN(e){let{Document:t}=RN(e);return e instanceof t}function BN(e){return IN(e)?!1:e instanceof RN(e).HTMLElement}function VN(e){return e instanceof RN(e).SVGElement}function HN(e){return e?IN(e)?e.document:LN(e)?zN(e)?e:BN(e)||VN(e)?e.ownerDocument:document:document:document}var UN=FN?P.useLayoutEffect:P.useEffect;function WN(e){let t=(0,P.useRef)(e);return UN(()=>{t.current=e}),(0,P.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function GN(e,t){t===void 0&&(t=[e]);let n=(0,P.useRef)(e);return UN(()=>{n.current!==e&&(n.current=e)},t),n}function KN(e){let t=WN(e),n=(0,P.useRef)(null);return[n,(0,P.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var qN={};function JN(e,t){return(0,P.useMemo)(()=>{if(t)return t;let n=qN[e]==null?0:qN[e]+1;return qN[e]=n,e+`-`+n},[e,t])}function YN(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var XN=YN(1),ZN=YN(-1);function QN(e){return`clientX`in e&&`clientY`in e}function $N(e){if(!e)return!1;let{KeyboardEvent:t}=RN(e.target);return t&&e instanceof t}function eP(e){if(!e)return!1;let{TouchEvent:t}=RN(e.target);return t&&e instanceof t}function tP(e){if(eP(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return QN(e)?{x:e.clientX,y:e.clientY}:null}var nP;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(nP||={});function rP(){}var iP=Object.freeze({x:0,y:0});function aP(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function oP(e,t,n){let r=aP(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var sP={ignoreTransform:!1};function cP(e,t){t===void 0&&(t=sP);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=RN(e).getComputedStyle(e);t&&(n=oP(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function lP(e,t){return t===void 0&&(t=RN(e).getComputedStyle(e)),t.position===`fixed`}function uP(e,t){t===void 0&&(t=RN(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function dP(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(zN(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!BN(i)||VN(i)||n.includes(i))return n;let a=RN(e).getComputedStyle(i);return i!==e&&uP(i,a)&&n.push(i),lP(i,a)?n:r(i.parentNode)}return e?r(e):n}function fP(e){let[t]=dP(e,1);return t??null}var pP;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(pP||={});function mP(e){return!FN||!e?!1:e===document.scrollingElement}function hP(e){let t={x:0,y:0},n=mP(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}function gP(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function _P(e,t){if(t===void 0&&(t=cP),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);fP(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var vP=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function yP(e){let{EventTarget:t}=RN(e);return e instanceof t?e:HN(e)}function bP(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var xP;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(xP||={});function SP(e){e.preventDefault()}function CP(e){e.stopPropagation()}var wP;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(wP||={});var TP={start:[wP.Space,wP.Enter],cancel:[wP.Esc],end:[wP.Space,wP.Enter,wP.Tab]},EP=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case wP.Right:return{...n,x:n.x+25};case wP.Left:return{...n,x:n.x-25};case wP.Down:return{...n,y:n.y+25};case wP.Up:return{...n,y:n.y-25}}},DP=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new vP(HN(t)),this.windowListeners=new vP(RN(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xP.Resize,this.handleCancel),this.windowListeners.add(xP.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xP.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&_P(n),t(iP)}handleKeyDown(e){if($N(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=TP,coordinateGetter:a=EP,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:iP;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=ZN(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=hP(n),p=gP(n),m={x:Math.min(i===wP.Right?p.right-p.width/2:p.right,Math.max(i===wP.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===wP.Down?p.bottom-p.height/2:p.bottom,Math.max(i===wP.Down?p.top:p.top+p.height/2,u.y))},h=i===wP.Right&&!s||i===wP.Left&&!c,g=i===wP.Down&&!l||i===wP.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===wP.Right&&e<=d.x||i===wP.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===wP.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===wP.Down&&e<=d.y||i===wP.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===wP.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,XN(ZN(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};DP.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=TP,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function OP(e){return!!(e&&`distance`in e)}function kP(e){return!!(e&&`delay`in e)}var AP=class{constructor(e,t,n){n===void 0&&(n=yP(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=HN(i),this.documentListeners=new vP(this.document),this.listeners=new vP(n),this.windowListeners=new vP(RN(i)),this.initialCoordinates=tP(r)??iP,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(xP.Resize,this.handleCancel),this.windowListeners.add(xP.DragStart,SP),this.windowListeners.add(xP.VisibilityChange,this.handleCancel),this.windowListeners.add(xP.ContextMenu,SP),this.documentListeners.add(xP.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(kP(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(OP(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(xP.Click,CP,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xP.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=tP(e)??iP,s=ZN(n,o);if(!t&&a){if(OP(a)){if(a.tolerance!=null&&bP(s,a.tolerance))return this.handleCancel();if(bP(s,a.distance))return this.handleStart()}if(kP(a)&&bP(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===wP.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},jP={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},MP=class extends AP{constructor(e){let{event:t}=e,n=HN(t.target);super(e,jP,n)}};MP.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var NP={move:{name:`mousemove`},end:{name:`mouseup`}},PP;(function(e){e[e.RightClick=2]=`RightClick`})(PP||={});var FP=class extends AP{constructor(e){super(e,NP,HN(e.event.target))}};FP.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===PP.RightClick?!1:(r?.({event:n}),!0)}}];var IP={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},LP=class extends AP{constructor(e){super(e,IP)}static setup(){return window.addEventListener(IP.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(IP.move.name,e)};function e(){}}};LP.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var RP;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(RP||={});var zP;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(zP||={}),pP.Backward,pP.Forward,pP.Backward,pP.Forward;var BP;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(BP||={});var VP;(function(e){e.Optimized=`optimized`})(VP||={});function HP(e){let{callback:t,disabled:n}=e,r=WN(t),i=(0,P.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,P.useEffect)(()=>()=>i?.disconnect(),[i]),i}function UP(e,t){return(0,P.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}BP.WhileDragging,VP.Optimized;var WP={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:rP,draggableNodes:new Map,over:null,measureDroppableContainers:rP},GP=(0,P.createContext)(WP),KP=(0,P.createContext)({...iP,scaleX:1,scaleY:1}),qP;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(qP||={});var JP=(0,P.createContext)(null),YP=`button`,XP=`Draggable`;function ZP(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=JN(XP),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,P.useContext)(GP),{role:p=YP,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,P.useContext)(g?KP:JP),[v,y]=KN(),[b,x]=KN(),S=UP(o,t),C=GN(n);return UN(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,P.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===YP?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}var QP=`Droppable`,$P={timeout:25};function eF(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=JN(QP),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,P.useContext)(GP),u=(0,P.useRef)({disabled:n}),d=(0,P.useRef)(!1),f=(0,P.useRef)(null),p=(0,P.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...$P,...i},_=GN(h??r),v=HP({callback:(0,P.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=KN((0,P.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=GN(t);return(0,P.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,P.useEffect)(()=>(s({type:nP.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:nP.UnregisterDroppable,key:a,id:r})),[r]),(0,P.useEffect)(()=>{n!==u.current.disabled&&(s({type:nP.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}var tF=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,nF=({size:e,children:t})=>(e=tF(e),(0,U.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));nF.propTypes={size:p.number,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var rF=({size:e,children:t,sx:n})=>(0,U.jsx)(nF,{size:e,children:(0,U.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});rF.propTypes={size:p.oneOfType([p.string,p.number]),children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,sx:p.object};var iF=({fill:e})=>(0,U.jsx)(`polygon`,{points:`17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7`,fill:e});iF.propTypes={fill:p.string.isRequired};var aF=({fill:e})=>(0,U.jsx)(`polygon`,{transform:`translate(2, 0)`,points:`34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3`,fill:e});aF.propTypes={fill:p.string.isRequired};var oF=({fill:e})=>(0,U.jsx)(`path`,{transform:`translate(1, 0)`,d:`M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z`,fill:e});oF.propTypes={fill:p.string.isRequired};var sF=({fill:e})=>(0,U.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});sF.propTypes={fill:p.string.isRequired};var cF=({fill:e})=>(0,U.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});cF.propTypes={fill:p.string.isRequired};var lF=(e,t)=>{class n extends P.Component{static propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,size:p.oneOfType([p.number,p.string]),fg:p.string,bg:p.string};static defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,size:30,fg:`#4aaf46`,bg:`#f8ffe2`};render(){let{iconSet:n,shape:r,category:i,open:a,size:o,fg:s,bg:c}=this.props,l=n===`check`?(0,U.jsx)(e,{fill:s}):(0,U.jsx)(t,{fill:s}),u=n===`check`?(0,U.jsx)(e,{fill:c}):(0,U.jsx)(t,{fill:c});return a?(0,U.jsx)(rF,{size:o,children:u}):(0,U.jsxs)(rF,{size:o,children:[i===`feedback`?r===`round`?(0,U.jsx)(oF,{fill:c}):(0,U.jsx)(aF,{fill:c}):r===`round`?(0,U.jsx)(sF,{fill:c}):(0,U.jsx)(cF,{fill:c}),l]})}}return n},uF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,U.jsx)(`path`,{d:`M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2
308
308
  c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z`,fill:e}),(0,U.jsx)(`rect`,{x:`21.1`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e}),(0,U.jsx)(`rect`,{x:`12.7`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e})]});uF.propTypes={fill:p.string.isRequired};var dF=({fill:e,x:t=0,y:n=0})=>(0,U.jsx)(`polygon`,{transform:`translate(${t}, ${n})`,points:`19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4`,fill:e});dF.propTypes={fill:p.string.isRequired,x:p.number,y:p.number};var fF=lF(dF,uF);fF.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},fF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#f8ffe2`,size:30};var pF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,U.jsx)(`rect`,{x:`11`,y:`17.3`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)`,width:`16.6`,height:`3.7`,fill:e}),(0,U.jsx)(`rect`,{x:`17.4`,y:`10.7`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)`,width:`3.7`,height:`16.6`,fill:e})]});pF.propTypes={fill:p.string.isRequired};var mF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,U.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,U.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,U.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});mF.propTypes={fill:p.string.isRequired};var hF=lF(pF,mF);hF.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},hF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30};var gF=({fill:e})=>(0,U.jsxs)(`g`,{children:[(0,U.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,U.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});gF.propTypes={fill:p.string.isRequired};var _F=({fill:e})=>(0,U.jsx)(`polygon`,{points:`14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5`,fill:e});_F.propTypes={fill:p.string.isRequired};var vF=({fill:e})=>(0,U.jsxs)(`g`,{children:[(0,U.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,U.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,U.jsx)(`path`,{d:`M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0
309
- C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});vF.propTypes={fill:p.string.isRequired};var yF=class extends P.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(gF,{fill:t})]}),emoji:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),feedback:{check:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),emoji:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),square:{check:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(gF,{fill:t})]}),emoji:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),open:{check:(0,U.jsx)(rF,{children:(0,U.jsx)(gF,{fill:n})}),emoji:(0,U.jsx)(rF,{children:(0,U.jsx)(vF,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};yF.propTypes={iconSet:p.oneOf([`emoji`,`check`,void 0]),shape:p.oneOf([`square`,void 0]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string},yF.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var bF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,U.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,U.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});bF.propTypes={fill:p.string.isRequired};var xF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,U.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,U.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,U.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});xF.propTypes={fill:p.string.isRequired};var SF=lF(bF,xF);SF.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},SF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function CF(e){return typeof e==`string`}function wF(e){return e?.ref||null}var TF=e=>e.scrollTop;function EF(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function DF(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function OF(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function kF(e){return`scale(${e}, ${e**2})`}var AF={entering:{opacity:1,transform:kF(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:kF(.75)},exited:{opacity:0,transform:kF(.75)}},jF={opacity:0,transform:kF(.75),visibility:`hidden`},MF=P.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=WM(),_=P.useRef(),v=Ao(),y=P.useRef(null),b=rM(y,wF(i),t),x=EF(y,l),S=EF(y,(e,t)=>{TF(e);let{duration:n,delay:r,easing:i}=OF({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=EF(y,c),w=EF(y,f),T=EF(y,e=>{let{duration:t,delay:n,easing:r}=OF({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=kF(.75),u&&u(e)}),E=EF(y,e=>{e.style.transition=``,d&&d(e)});return(0,U.jsx)(DM,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=DF(e,o,AF,jF,p,i.props.style);return P.cloneElement(i,{style:r,ref:b,...n})}})});MF&&(MF.muiSupportAuto=!0);function NF(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function PF(e){let t=Gj(e);return t.body===e?qj(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function FF(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function IF(e){return parseFloat(qj(e).getComputedStyle(e).paddingRight)||0}function LF(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function RF(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!LF(e);t&&n&&FF(e,i)})}function zF(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function BF(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(PF(r)){let e=NF(qj(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${IF(r)+e}px`;let t=Gj(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${IF(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Gj(r).body;else{let t=r.parentElement,n=qj(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function VF(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var HF=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&FF(e.modalRef,!1);let r=VF(t);RF(t,e.mount,e.modalRef,r,!0);let i=zF(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=zF(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=BF(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=zF(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&FF(e.modalRef,t),RF(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&FF(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function UF(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var WF=UF;function GF(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var KF=GF,qF=`data-mui-focusable`;function JF(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${qF}]`):null}var YF=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function XF(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function ZF(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function QF(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||ZF(e))}function $F(e){let t=[],n=[];return Array.from(e.querySelectorAll(YF)).forEach((e,r)=>{let i=XF(e);i===-1||!QF(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function eI(){return!0}function tI(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=$F,isEnabled:o=eI,open:s}=e,c=P.useRef(!1),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=P.useRef(null),p=P.useRef(!1),m=P.useRef(null),h=nM(wF(t),m),g=P.useRef(null);P.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),P.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=KF(Gj(m.current)),t=JF(m.current)??m.current;return WF(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),P.useEffect(()=>{if(!s||!m.current)return;let e=Gj(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&KF(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=KF(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(WF(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=KF(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),P.cloneElement(t,{ref:h,onFocus:_}),(0,U.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function nI(e){return typeof e==`function`?e():e}var rI=P.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=P.useState(null),s=nM(P.isValidElement(n)?wF(n):null,t);if(ui(()=>{i||o(nI(r)||document.body)},[r,i]),ui(()=>{if(a&&!i)return Yj(t,a),()=>{Yj(t,null)}},[t,a,i]),i){if(P.isValidElement(n)){let e={ref:s};return P.cloneElement(n,e)}return n}return a&&db.createPortal(n,a)});function iI(e,t,n){return e===void 0||CF(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function aI(e,t,n){return typeof e==`function`?e(t,n):e}function oI(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function sI(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function cI(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=k(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=oI({...i,...r}),s=sI(r),c=sI(i),l=t(o),u=k(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function lI(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=aI(d[e],i),{props:{component:h,...g},internalRef:_}=cI({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=nM(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,iI(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var uI={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},dI={opacity:0,visibility:`hidden`},fI=P.forwardRef(function(e,t){let n=Ao(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=P.useRef(null),y=rM(v,wF(o),t),b=EF(v,d),x=EF(v,(e,t)=>{TF(e);let r=OF({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=EF(v,u),C=EF(v,m),w=EF(v,e=>{let t=OF({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=EF(v,e=>{e.style.transition=``,p&&p(e)});return(0,U.jsx)(DM,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=DF(e,c,uI,dI,h,o.props.style);return P.cloneElement(o,{style:r,ref:y,...n})}})});function pI(e){return Yr(`MuiBackdrop`,e)}Xr(`MuiBackdrop`,[`root`,`invisible`]);var mI=e=>{let{classes:t,invisible:n}=e;return A({root:[`root`,n&&`invisible`]},pI,t)},hI=G(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),gI=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=mI(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=lI(`root`,{elementType:hI,externalForwardedProps:_,className:k(g.root,i),ownerState:h}),[b,x]=lI(`transition`,{elementType:fI,externalForwardedProps:_,ownerState:h});return(0,U.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,U.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function _I(e){return typeof e==`function`?e():e}function vI(e){return e?e.props.hasOwnProperty(`in`):!1}var yI=()=>{},bI=new HF;function xI(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=P.useRef({}),f=P.useRef(null),p=P.useRef(null),m=nM(p,u),[h,g]=P.useState(!l),_=vI(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>Gj(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{bI.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=eM(()=>{let e=_I(t)||y().body;bI.add(b(),e),p.current&&x()}),C=()=>bI.isTopModal(b()),w=eM(e=>{f.current=e,e&&(l&&C()?x():p.current&&FF(p.current,v))}),T=P.useCallback(()=>{bI.remove(b(),v)},[v]);P.useEffect(()=>()=>{T()},[T]),P.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=oI(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:Ij(()=>{g(!1),a&&a()},s?.props.onEnter??yI),onExited:Ij(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??yI)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function SI(e){return Yr(`MuiModal`,e)}Xr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var CI=e=>{let{open:t,exited:n,classes:r}=e;return A({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},SI,r)},wI=G(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Io(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),TI=G(gI,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),EI=P.forwardRef(function(e,t){let n=Lo({name:`MuiModal`,props:e}),{BackdropComponent:r=TI,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,A={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:j,getBackdropProps:M,getTransitionProps:ee,portalRef:N,isTopModal:te,exited:F,hasTransition:I}=xI({...A,rootRef:t}),L={...A,exited:F},ne=CI(L),re={};if(c.props.tabIndex===void 0&&(re.tabIndex=`-1`),I){let{onEnter:e,onExited:t}=ee();re.onEnter=e,re.onExited=t}let ie={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[R,ae]=lI(`root`,{ref:t,elementType:wI,externalForwardedProps:{...ie,...O,component:u},getSlotProps:j,ownerState:L,className:k(o,ne?.root,!L.open&&L.exited&&ne?.hidden)}),[z,B]=lI(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>M({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:k(i?.className,ne?.backdrop),ownerState:L});return!b&&!w&&(!I||F)?null:(0,U.jsx)(rI,{ref:N,container:l,disablePortal:g,children:(0,U.jsxs)(R,{...ae,children:[!y&&r?(0,U.jsx)(z,{...B}):null,(0,U.jsx)(tI,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:te,open:w,children:P.cloneElement(c,re)})]})})});function DI(e){return Yr(`MuiPaper`,e)}Xr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var OI=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return A({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},DI,i)},kI=G(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Io(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),AI=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiPaper`}),r=Ao(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c};return(0,U.jsx)(kI,{as:a,ownerState:u,className:k(OI(u).root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${xi(`#fff`,lo(o))}, ${xi(`#fff`,lo(o))})`}},...l.style}})});function jI(e){return Yr(`MuiPopover`,e)}Xr(`MuiPopover`,[`root`,`paper`]);function MI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function NI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function PI(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function FI(e){return typeof e==`function`?e():e}var II=e=>{let{classes:t}=e;return A({root:[`root`],paper:[`paper`]},jI,t)},LI=G(EI,{name:`MuiPopover`,slot:`Root`})({}),RI=G(AI,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),zI=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=P.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=II(w),E=P.useCallback(()=>{if(s===`anchorPosition`)return o;let e=FI(i),t=(e&&e.nodeType===1?e:Kj(C.current).body).getBoundingClientRect();return{top:t.top+MI(t,a.vertical),left:t.left+NI(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=P.useCallback(e=>({vertical:MI(e,_.vertical),horizontal:NI(e,_.horizontal)}),[_.horizontal,_.vertical]),O=P.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:PI(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Jj(FI(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:PI(n)}},[i,s,E,D,f]),[A,j]=P.useState(p),M=P.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,j(!0)},[O]);P.useEffect(()=>(x&&window.addEventListener(`scroll`,M),()=>window.removeEventListener(`scroll`,M)),[i,x,M]);let ee=()=>{M()},N=()=>{j(!1)};P.useEffect(()=>{p&&M()}),P.useImperativeHandle(r,()=>p?{updatePosition:()=>{M()}}:null,[p,M]),P.useEffect(()=>{if(!p)return;let e=Uj(()=>{M()}),t=Jj(FI(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,M]);let te=y,F={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[I,L]=lI(`transition`,{elementType:MF,externalForwardedProps:F,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),ee()},onExited:t=>{e.onExited?.(t),N()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!I.muiSupportAuto&&(te=void 0);let ne=u||(i?Kj(FI(i)).body:void 0),[re,{slots:ie,slotProps:R,...ae}]=lI(`root`,{ref:t,elementType:LI,externalForwardedProps:{...F,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:aM(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:ne,open:p},ownerState:w,className:k(T.root,l)}),[z,B]=lI(`paper`,{ref:C,className:T.paper,elementType:RI,externalForwardedProps:F,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:A?void 0:{opacity:0}},ownerState:w});return(0,U.jsx)(re,{...ae,...!CF(re)&&{slots:ie,slotProps:R,disableScrollLock:x},children:(0,U.jsx)(I,{...L,timeout:te,children:(0,U.jsx)(z,{...B,children:c})})})}),BI={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},VI={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},HI=s({background:()=>pL,backgroundDark:()=>mL,black:()=>CL,blueGrey100:()=>AL,blueGrey300:()=>jL,blueGrey600:()=>ML,blueGrey900:()=>NL,border:()=>yL,borderDark:()=>xL,borderGray:()=>SL,borderLight:()=>bL,buttonBorder:()=>BL,buttonHoverBg:()=>VL,correct:()=>YI,correctSecondary:()=>XI,correctTertiary:()=>ZI,correctWithIcon:()=>QI,defaults:()=>UI,disabled:()=>qI,disabledSecondary:()=>JI,dropdownBackground:()=>gL,fadedPrimary:()=>cL,focusChecked:()=>EL,focusCheckedBorder:()=>DL,focusUnchecked:()=>OL,focusUncheckedBorder:()=>kL,incorrect:()=>$I,incorrectSecondary:()=>tL,incorrectWithIcon:()=>eL,keyBoardFocusIndicator:()=>zL,keypadButton:()=>PL,keypadButtonHover:()=>LL,keypadButtonOperator:()=>FL,keypadButtonOperatorHover:()=>RL,keypadEmptyPlaceholder:()=>IL,missing:()=>nL,missingWithIcon:()=>rL,primary:()=>iL,primaryDark:()=>oL,primaryLight:()=>aL,primaryText:()=>sL,secondary:()=>lL,secondaryBackground:()=>hL,secondaryDark:()=>dL,secondaryLight:()=>uL,secondaryText:()=>fL,tertiary:()=>_L,tertiaryLight:()=>vL,text:()=>KI,transparent:()=>TL,v:()=>WI,visualElementsColors:()=>HL,white:()=>wL}),UI={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:Ta[500],CORRECT_SECONDARY:Ta[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:Sa[500],INCORRECT_SECONDARY:xa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:xa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:VI[500],PRIMARY_LIGHT:VI[200],PRIMARY_DARK:VI[800],SECONDARY:BI.A400,SECONDARY_LIGHT:BI[200],SECONDARY_DARK:BI[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(UI);var WI=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},GI=WI(`pie`),KI=()=>GI(`text`,UI.TEXT),qI=()=>GI(`disabled`,UI.DISABLED),JI=()=>GI(`disabled-secondary`,UI.DISABLED_SECONDARY),YI=()=>GI(`correct`,UI.CORRECT),XI=()=>GI(`correct-secondary`,UI.CORRECT_SECONDARY),ZI=()=>GI(`correct-tertiary`,UI.CORRECT_TERTIARY),QI=()=>GI(`correct-icon`,UI.CORRECT_WITH_ICON),$I=()=>GI(`incorrect`,UI.INCORRECT),eL=()=>GI(`incorrect-icon`,UI.INCORRECT_WITH_ICON),tL=()=>GI(`incorrect-secondary`,UI.INCORRECT_SECONDARY),nL=()=>GI(`missing`,UI.MISSING),rL=()=>GI(`missing-icon`,UI.MISSING_WITH_ICON),iL=()=>GI(`primary`,UI.PRIMARY),aL=()=>GI(`primary-light`,UI.PRIMARY_LIGHT),oL=()=>GI(`primary-dark`,UI.PRIMARY_DARK),sL=()=>GI(`primary-text`,`text`,UI.TEXT),cL=()=>GI(`faded-primary`,UI.FADED_PRIMARY),lL=()=>GI(`secondary`,UI.SECONDARY),uL=()=>GI(`secondary-light`,UI.SECONDARY_LIGHT),dL=()=>GI(`secondary-dark`,UI.SECONDARY_DARK),fL=()=>GI(`secondary-text`,`text`,UI.TEXT),pL=()=>GI(`background`,UI.BACKGROUND),mL=()=>GI(`background-dark`,UI.BACKGROUND_DARK),hL=()=>GI(`secondary-background`,UI.SECONDARY_BACKGROUND),gL=()=>GI(`dropdown-background`,UI.DROPDOWN_BACKGROUND),_L=()=>GI(`tertiary`,UI.TERTIARY),vL=()=>GI(`tertiary-light`,UI.TERTIARY_LIGHT),yL=()=>GI(`border`,UI.BORDER),bL=()=>GI(`border-light`,UI.BORDER_LIGHT),xL=()=>GI(`border-dark`,UI.BORDER_DARK),SL=()=>GI(`border-gray`,UI.BORDER_GRAY),CL=()=>GI(`black`,UI.BLACK),wL=()=>GI(`white`,UI.WHITE),TL=()=>UI.TRANSPARENT,EL=()=>GI(`focus-checked`,UI.FOCUS_CHECKED),DL=()=>GI(`focus-checked-border`,UI.FOCUS_CHECKED_BORDER),OL=()=>GI(`focus-unchecked`,UI.FOCUS_UNCHECKED),kL=()=>GI(`focus-unchecked-border`,UI.FOCUS_UNCHECKED_BORDER),AL=()=>GI(`blue-grey-100`,UI.BLUE_GREY100),jL=()=>GI(`blue-grey-300`,UI.BLUE_GREY300),ML=()=>GI(`blue-grey-600`,UI.BLUE_GREY600),NL=()=>GI(`blue-grey-900`,UI.BLUE_GREY900),PL=()=>GI(`keypad-button`,UI.KEYPAD_BUTTON),FL=()=>GI(`keypad-button-operator`,UI.KEYPAD_BUTTON_OPERATOR),IL=()=>GI(`keypad-empty-placeholder`,UI.KEYPAD_EMPTY_PLACEHOLDER),LL=()=>GI(`keypad-button-hover`,UI.KEYPAD_BUTTON_HOVER),RL=()=>GI(`keypad-button-operator-hover`,UI.KEYPAD_BUTTON_OPERATOR_HOVER),zL=()=>GI(`keyboard-focus-indicator`,UI.KEY_BOARD_FOCUS_INDICATOR),BL=()=>GI(`button-border`,UI.BUTTON_BORDER),VL=()=>GI(`button-hover-bg`,UI.BUTTON_HOVER_BG),HL={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},UL=G(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),WL=G(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${qI()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${YI()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$I()})`}}),GL=G(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),KL=class extends P.Component{static propTypes={correctness:p.string,feedback:p.string};nodeRef=P.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,U.jsx)(jM,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,U.jsx)(GL,{ref:this.nodeRef,children:(0,U.jsx)(UL,{children:(0,U.jsx)(WL,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,U.jsx)(`div`,{children:(0,U.jsx)(BM,{children:this.renderFeedback()})})}},qL=s({Correct:()=>$L,Incorrect:()=>eR,NothingSubmitted:()=>nR,PartiallyCorrect:()=>tR}),JL=D(`pie-libs:render-ui:response-indicators`),YL=G(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),XL=G(zI)({cursor:`pointer`}),ZL=G(`div`)({padding:`0`,borderRadius:`4px`}),QL=(e,t)=>{class n extends P.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{JL(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,U.jsxs)(YL,{hasFeedback:!!n,children:[(0,U.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,U.jsx)(e,{})}),n&&(0,U.jsx)(XL,{PaperComponent:ZL,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,U.jsx)(KL,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:p.string},n},$L=QL(fF,`correct`),eR=QL(hF,`incorrect`),tR=QL(SF,`partially-correct`),nR=QL(yF,`nothing-submitted`);function rR(e){return Yr(`MuiCollapse`,e)}Xr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var iR=e=>{let{orientation:t,classes:n}=e;return A({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},rR,n)},aR=G(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Io(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),oR=G(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),sR=G(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),cR=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=Qa.standard,TransitionComponent:x=DM,...S}=n,C={...n,orientation:g,collapsedSize:o},w=iR(C),T=Ao(),E=WM(),D=P.useRef(null),O=P.useRef(),A=typeof o==`number`?`${o}px`:o,j=g===`horizontal`,M=j?`width`:`height`,ee=P.useRef(null),N=rM(t,ee),te=()=>D.current?D.current[j?`clientWidth`:`clientHeight`]:0,F=EF(ee,(e,t)=>{D.current&&j&&(D.current.style.position=`absolute`),e.style[M]=A,u&&u(e,t)}),I=EF(ee,(e,t)=>{let n=te();D.current&&j&&(D.current.style.position=``);let{duration:r,easing:i}=OF({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[M]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),L=EF(ee,(e,t)=>{e.style[M]=`auto`,d&&d(e,t)}),ne=EF(ee,e=>{e.style[M]=`${te()}px`,p&&p(e)}),re=EF(ee,m),ie=EF(ee,e=>{let t=te(),{duration:n,easing:r}=OF({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[M]=A,e.style.transitionTimingFunction=r,h&&h(e)}),R=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(ee.current,e)},ae={slots:_,slotProps:v,component:s},[z,B]=lI(`root`,{ref:N,className:k(w.root,a),elementType:aR,externalForwardedProps:ae,ownerState:C,additionalProps:{style:{[j?`minWidth`:`minHeight`]:A,...y}}}),[oe,se]=lI(`wrapper`,{ref:D,className:w.wrapper,elementType:oR,externalForwardedProps:ae,ownerState:C}),[ce,le]=lI(`wrapperInner`,{className:w.wrapperInner,elementType:sR,externalForwardedProps:ae,ownerState:C});return(0,U.jsx)(x,{in:l,onEnter:F,onEntered:L,onEntering:I,onExit:ne,onExited:re,onExiting:ie,addEndListener:R,nodeRef:ee,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,U.jsx)(z,{...B,className:k(B.className,{entered:w.entered,exited:!l&&A===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,U.jsx)(oe,{...se,ownerState:r,children:(0,U.jsx)(ce,{...le,ownerState:r,children:i})})})}})});cR&&(cR.muiSupportAuto=!0);var lR=`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,uR=null;function dR(e){return typeof window>`u`||window.MathJax?.version?Promise.resolve():uR||(uR=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||lR,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),uR)}function fR(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function pR(e={}){return async t=>{if(await dR(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),fR()}}var mR=null;function hR(){return mR||=pR({accessibility:!0,useSingleDollar:!0}),mR}var gR=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;return t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body,await hR()(n),t?n.innerHTML:void 0},_R=e=>e,vR=G(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),yR=G(cR)(({theme:e})=>({paddingTop:e.spacing(2)})),bR=class extends P.Component{static propTypes={className:p.string,children:p.object,labels:p.shape({visible:p.string,hidden:p.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){gR(this.root)}componentDidUpdate(){gR(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,U.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,U.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,U.jsx)(vR,{children:r})}),(0,U.jsx)(yR,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function xR(e){return Yr(`MuiButton`,e)}var SR=Xr(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),CR=P.createContext({}),wR=P.createContext(void 0),TR=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=A({root:[`root`,o&&`loading`,a,`${a}${K(t)}`,`size${K(i)}`,`${a}Size${K(i)}`,`color${K(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${K(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${K(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${K(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},xR,c);return{...c,...l}},ER=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],DR=G(iN,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${K(n.color)}`],t[`size${K(n.size)}`],t[`${n.variant}Size${K(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Io(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${SR.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${SR.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${SR.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${SR.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${SR.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${SR.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${SR.loading}`]:{color:`transparent`}}}]}})),OR=G(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${K(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...ER]})),kR=G(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${K(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...ER]})),AR=G(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),jR=G(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),MR=P.forwardRef(function(e,t){let n=P.useContext(CR),r=P.useContext(wR),i=Lo({props:li(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=Zj(h),T=_??(0,U.jsx)(_N,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=TR(E),O=(b||g&&v===`start`)&&(0,U.jsx)(OR,{className:D.startIcon,ownerState:E,children:b||(0,U.jsx)(jR,{className:D.loadingIconPlaceholder,ownerState:E})}),A=(f||g&&v===`end`)&&(0,U.jsx)(kR,{className:D.endIcon,ownerState:E,children:f||(0,U.jsx)(jR,{className:D.loadingIconPlaceholder,ownerState:E})}),j=r||``,M=typeof g==`boolean`?(0,U.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,U.jsx)(AR,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:ee,...N}=D;return(0,U.jsxs)(DR,{ownerState:E,className:k(n.className,D.root,c,j),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:k(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:N,children:[O,v!==`end`&&M,a,v===`end`&&M,A]})}),NR=Vj((0,U.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),PR=Vj((0,U.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),FR=G(`div`)({display:`flex`,flexDirection:`column`}),IR=G(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),LR=G(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),RR=G(MR)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),zR=e=>{class t extends P.Component{static propTypes={session:p.object,onSessionChange:p.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,U.jsxs)(FR,{children:[(0,U.jsxs)(IR,{children:[(0,U.jsxs)(RR,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,U.jsx)(LR,{children:(0,U.jsx)(PR,{})}),`Undo`]}),(0,U.jsxs)(RR,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,U.jsx)(LR,{children:(0,U.jsx)(NR,{})}),`Start Over`]})]}),(0,U.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},BR=Do({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),VR=G(`div`)({"& table, th, td":{fontSize:`inherit`}}),HR=class extends P.Component{static propTypes={className:p.string,children:p.array,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,U.jsx)(Dr,{injectFirst:!0,children:(0,U.jsxs)(es,{theme:BR,children:[i?.rules?(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,U.jsx)(VR,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}},UR=G(HR)({display:`flex`,flexDirection:`column`,position:`relative`}),WR=class extends P.Component{static propTypes={ariaLabel:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,role:p.string,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,U.jsx)(UR,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},GR=class extends P.Component{static propTypes={tag:p.string,className:p.string,html:p.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,U.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function KR({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var qR=P.createContext(void 0);function JR(){return P.useContext(qR)}function YR(e){return Yr(`MuiFormLabel`,e)}var XR=Xr(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),ZR=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return A({root:[`root`,`color${K(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},YR,t)},QR=G(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Io(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{[`&.${XR.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${XR.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${XR.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),$R=G(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Io(({theme:e})=>({[`&.${XR.error}`]:{color:(e.vars||e).palette.error.main}}))),ez=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=KR({props:n,muiFormControl:JR(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=ZR(m);return(0,U.jsxs)(QR,{as:o,ownerState:m,className:k(h.root,i),ref:t,...f,children:[r,p.required&&(0,U.jsxs)($R,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function tz(e){return Yr(`MuiInputLabel`,e)}Xr(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var nz=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=A({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${K(r)}`,o],asterisk:[s&&`asterisk`]},tz,t);return{...t,...c}},rz=G(ez,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${XR.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Io(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),iz=P.forwardRef(function(e,t){let n=Lo({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=JR(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=KR({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=nz(f);return(0,U.jsx)(rz,{"data-shrink":u,ref:t,className:k(p.root,s),...c,ownerState:f,classes:p})});function az(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function oz(e,t=!1){return e&&(az(e.value)&&e.value!==``||t&&az(e.defaultValue)&&e.defaultValue!==``)}function sz(e){return e.startAdornment}function cz(e){return Yr(`MuiFormControl`,e)}Xr(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var lz=e=>{let{classes:t,margin:n,fullWidth:r}=e;return A({root:[`root`,n!==`none`&&`margin${K(n)}`,r&&`fullWidth`]},cz,t)},uz=G(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${K(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),dz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=lz(_),[y,b]=P.useState(()=>{let e=!1;return r&&P.Children.forEach(r,t=>{if(!Wj(t,[`Input`,`Select`]))return;let n=Wj(t,[`Select`])?t.props.input:t;n&&sz(n.props)&&(e=!0)}),e}),[x,S]=P.useState(()=>{let e=!1;return r&&P.Children.forEach(r,t=>{Wj(t,[`Input`,`Select`])&&(oz(t.props,!0)||oz(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=P.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;P.useRef(!1);let E=P.useCallback(()=>{S(!0)},[]),D=P.useCallback(()=>{S(!1)},[]),O=P.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,U.jsx)(qR.Provider,{value:O,children:(0,U.jsx)(uz,{as:o,ownerState:_,className:k(v.root,i),ref:t,...g,children:r})})}),fz=G(dz)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),pz=G(iz)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),mz=({label:e,className:t,children:n})=>(0,U.jsxs)(fz,{className:t,children:[(0,U.jsx)(pz,{shrink:!0,children:e}),n]});mz.propTypes={label:p.oneOfType([p.string,p.object]).isRequired,className:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var hz=G(`div`)(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:`collapse`},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:`#f6f8fa`,color:e.palette.common.black},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:`#f6f8fa`,color:e.palette.common.black},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:KI()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${KI()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),gz=/\\embed\{newLine\}\[\]/g,_z=`\\newline `,vz=class extends P.Component{static propTypes={prompt:p.string,tagName:p.string,className:p.string,onClick:p.func,defaultClassName:p.string,autoplayAudioEnabled:p.bool,customAudioButton:p.shape({playImage:p.string,pauseImage:p.string})};static defaultProps={onClick:()=>{}};parsedText=e=>{let{customAudioButton:t}=this.props,n=document.createElement(`div`);n.innerHTML=e;let r=n.querySelector(`audio`);if(r){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,r.getAttribute(`src`)),r.removeAttribute(`src`),r.setAttribute(`id`,`pie-prompt-audio-player`),r.appendChild(e),t){r.style.display=`none`;let e=document.createElement(`div`);e.id=`play-audio-button`,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,backgroundImage:`url(${t.pauseImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),r.parentNode.insertBefore(e,r)}}return n.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById(`play-audio-button`),r=document.getElementById(`pie-prompt-audio-player`);if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener(`ended`,a)}).catch(e=>{console.error(`Error playing audio`,e)}),!n||!r||!t)return;let i=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},a=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};n.addEventListener(`click`,i),r.addEventListener(`play`,o),r.addEventListener(`pause`,s),r.addEventListener(`ended`,a),this._handlePlayClick=i,this._handleAudioPlay=o,this._handleAudioPause=s,this._handleAudioEnded=a}removeCustomAudioButtonListeners(){let e=document.getElementById(`play-audio-button`),t=document.querySelector(`audio`);!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=document.getElementById(`preview-prompt`);e&&typeof gR==`function`&&gR(e)}alignImages(){document.querySelectorAll(`#preview-prompt`).forEach(e=>{let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}})}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``}`.trim();return(0,U.jsx)(hz,{as:t||`div`,id:`preview-prompt`,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(gz,_z)}})}},yz=e=>(0,U.jsx)(U.Fragment,{children:P.Children.map(e.children,t=>P.cloneElement(t,{"data-pie-readable":e.false===void 0}))});yz.propTypes={children:p.node,false:p.bool};var bz=e=>(0,U.jsx)(U.Fragment,{children:P.Children.map(e.children,t=>P.cloneElement(t,{"data-pie-purpose":e.purpose}))});bz.propTypes={children:p.node,purpose:p.string};var xz;typeof window<`u`&&(xz=new DOMParser);var Sz=e=>xz.parseFromString(e,`text/html`).body.textContent,Cz=e=>{if(!e)return!1;let t=Sz(e);return!!(t&&t.trim())},wz;typeof window<`u`&&(wz=new DOMParser);var Tz=e=>{if(!e)return!1;let t=wz.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},Ez=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAg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gAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function Dz(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function Oz(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:aI(n,r),{props:s,internalRef:c}=cI({...a,externalSlotProps:o}),l=nM(c,o?.ref,e.additionalProps?.ref);return iI(t,{...s,ref:l},r)}var kz=P.createContext({});function Az(e){return Yr(`MuiList`,e)}Xr(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var jz=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return A({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Az,t)},Mz=G(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Nz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=P.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=jz(d);return(0,U.jsx)(kz.Provider,{value:u,children:(0,U.jsxs)(Mz,{as:a,className:k(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),Pz=NF;function Fz(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Iz(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Lz(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function Rz(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!Lz(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var zz=P.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=P.useRef(null),p=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Xj(()=>{r&&f.current.focus()},[r]),P.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${Pz(Jj(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=KF(Kj(t));if(n===`ArrowDown`)e.preventDefault(),Rz(t,r,c,s,Fz);else if(n===`ArrowUp`)e.preventDefault(),Rz(t,r,c,s,Iz);else if(n===`Home`)e.preventDefault(),Rz(t,null,c,s,Fz);else if(n===`End`)e.preventDefault(),Rz(t,null,c,s,Iz);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&Lz(r,i);i.previousKeyMatched&&(c||Rz(t,r,!1,s,Fz,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=rM(f,t),g=-1;P.Children.forEach(a,(e,t)=>{if(!P.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=P.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),P.cloneElement(e,t)}return e});return(0,U.jsx)(Nz,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function Bz(e){return Yr(`MuiMenu`,e)}Xr(`MuiMenu`,[`root`,`paper`,`list`]);var Vz={vertical:`top`,horizontal:`right`},Hz={vertical:`top`,horizontal:`left`},Uz=e=>{let{classes:t}=e;return A({root:[`root`],paper:[`paper`],list:[`list`]},Bz,t)},Wz=G(zI,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),Gz=G(RI,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Kz=G(zz,{name:`MuiMenu`,slot:`List`})({outline:0}),qz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=Ii(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=Uz(b),S=r&&!o&&l,C=P.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;P.Children.map(i,(e,t)=>{P.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=Oz({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[A,j]=lI(`paper`,{className:x.paper,elementType:Gz,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[M,ee]=lI(`list`,{className:k(x.list,s.className),elementType:Kz,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),N=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,U.jsx)(Wz,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?Vz:Hz,slots:{root:g.root,paper:A,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:j,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...N,onEntering:(...e)=>{w(...e),N?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,U.jsx)(M,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...ee,children:i})})}),Jz=({slotProps:e,...t})=>(0,U.jsx)(qz,{...t,disableScrollLock:!0,hideBackdrop:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,pointerEvents:`none`,...e?.root?.style}},paper:{...e?.paper,style:{pointerEvents:`auto`,...e?.paper?.style}}}}),Yz=s({Collapsible:()=>bR,EnableAudioAutoplayImage:()=>Ez,Feedback:()=>KL,HtmlAndMath:()=>GR,InlineMenu:()=>Jz,InputContainer:()=>mz,PreviewLayout:()=>WR,PreviewPrompt:()=>vz,Purpose:()=>bz,Readable:()=>yz,UiLayout:()=>HR,color:()=>HI,hasMedia:()=>Tz,hasText:()=>Cz,indicators:()=>qL,transformDataHeadings:()=>Dz,withUndoReset:()=>zR}),Xz=Vj((0,U.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),Zz=Vj((0,U.jsx)(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreVert`),Qz=e=>{switch(e){case`down`:return 90;case`up`:return-90;case`left`:return 180;default:return 0}},$z=e=>{let{direction:t,style:n}=e;return(0,U.jsx)(Xz,{style:{transform:`rotate(${Qz(t)}deg)`,...n}})};$z.propTypes={direction:p.string,style:p.object};var eB=({style:e})=>(0,U.jsxs)(`span`,{style:e,children:[(0,U.jsx)(Zz,{style:{margin:`0 -16px`}}),(0,U.jsx)(Zz,{})]});eB.propTypes={style:p.object},G(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`}));var tB=G(`span`)(({theme:e})=>({border:`solid 0px ${e.palette.primary.main}`,"& mjx-frac":{fontSize:`120% !important`}}));function nB({n:e,children:t,isDragging:n,isOver:r,dragItem:i,value:a,selected:o}){let[s,c]=(0,P.useState)(null),l=(0,P.useRef)(null),u=e=>{l.current&&(l.current.contains(e.target)?l.current.classList.add(`selected`):l.current.classList.remove(`selected`))};(0,P.useEffect)(()=>(document.addEventListener(`click`,u),()=>{document.removeEventListener(`click`,u)}),[]),(0,P.useEffect)(()=>{l.current&&typeof gR==`function`&&gR(l.current)},[a?.value,r,i?.value?.value]),(0,P.useEffect)(()=>{if(r&&l.current&&!s){let e=l.current;c({width:e.offsetWidth,height:e.offsetHeight})}else !r&&s&&c(null)},[r,s]);let d=i&&r?i.value.value:a.value||`\xA0`,f=n?`\xA0`:d,p=f!==`\xA0`,m=i&&r,h=o?`2px solid ${oL()}`:m?`1px solid ${UI.BORDER_DARK}`:`1px solid ${UI.BORDER_LIGHT}`;return(0,U.jsxs)(`div`,{ref:l,className:o?`selected`:void 0,style:{display:`inline-flex`,minWidth:`178px`,minHeight:`36px`,background:m?`${UI.BORDER_LIGHT}`:`${UI.WHITE}`,border:h,boxSizing:`border-box`,borderRadius:`3px`,overflow:`hidden`,position:`relative`,padding:`8px 8px 8px 35px`,width:s?s.width:void 0,height:s?s.height:void 0,touchAction:`none`},"data-key":e.index,contentEditable:!1,children:[p&&(0,U.jsx)(eB,{style:{position:`absolute`,top:`6px`,left:`15px`,color:`#9B9B9B`},contentEditable:!1}),(0,U.jsx)(`span`,{dangerouslySetInnerHTML:{__html:f}}),t]})}nB.propTypes={n:p.object,children:p.node,isDragging:p.bool,isOver:p.bool,dragItem:p.object,value:p.object,selected:p.bool};function rB({value:e,disabled:t,instanceId:n,children:r,n:i,onChange:a,removeResponse:o,duplicates:s,pos:c,selected:l}){let{attributes:u,listeners:d,setNodeRef:f,isDragging:p}=ZP({id:`drag-${i.index}`,disabled:t||!e?.value,data:{id:`drag-${i.index}`,value:e,instanceId:n,n:i,pos:c,opts:{duplicates:s},type:`drag-in-the-blank-placed-choice`,fromChoice:!e,onRemove:e=>o(e),onDrop:(e,t)=>{t?.type===`drag-in-the-blank-drop-choice`&&(a(e),!s&&e.fromChoice&&o(e))}}}),{setNodeRef:m,isOver:h,active:g}=eF({id:`drop-${i.index}`,data:{type:`drag-in-the-blank-drop-choice`,accepts:[`drag-in-the-blank-choice`,`drag-in-the-blank-placed-choice`],instanceId:n,value:e,id:`drop-${i.index}`,pos:c,n:i,opts:{duplicates:s},onDrop:(e,t)=>{if(t?.type===`drag-in-the-blank-drop-choice`&&e.value.id!==t.value.id){if(e.type===`drag-in-the-blank-choice`){a(e),!s&&e.fromChoice&&o(e);return}e.type===`drag-in-the-blank-placed-choice`&&(o(t),a(e),setTimeout(()=>o(e),10))}}}}),_=e=>{f(e),m(e)},v=(0,U.jsx)(nB,{n:i,isDragging:p,isOver:h,dragItem:g?.data?.current,value:e,selected:l,children:r}),y=e?(0,U.jsx)(`span`,{ref:_,...u,...d,children:v}):(0,U.jsx)(`span`,{ref:m,children:v});return(0,U.jsx)(tB,{className:k(h&&`over`),children:y})}rB.propTypes={value:p.object,disabled:p.bool,instanceId:p.string,children:p.node,n:p.object.isRequired,onChange:p.func.isRequired,removeResponse:p.func.isRequired,duplicates:p.bool,selected:p.bool};var iB=(e,t,n,r)=>{let{tr:i}=e.state;i.setNodeMarkup(n,void 0,{...t.attrs,...r.value}),i.isDone=!0,e.view.dispatch(i)},aB=(e,t,n)=>{let{tr:r}=e.state;r.setNodeMarkup(n.pos,void 0,w(t.attrs,[`value`,`id`])),r.isDone=!0,e.view.dispatch(r)},oB=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{inTable:s}=o,c=r();return(0,U.jsx)(jb,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline`,whiteSpace:`normal`},children:(0,U.jsx)(`span`,{...o,style:{display:`inline-flex`,minHeight:`50px`,minWidth:`178px`,position:`relative`,margin:s?`10px`:`0 10px`,cursor:`pointer`},children:(0,U.jsx)(rB,{n:o,dragKey:o.id,targetId:`0`,pos:c,value:o,duplicates:i.duplicates,selected:a,onChange:e=>iB(t,n,c,e),removeResponse:e=>aB(t,n,e)})})})};oB.propTypes={attributes:p.object,data:p.object,n:p.object,nodeProps:p.object,opts:p.object};var sB=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s,error:c}=o,l=s||`<div>&nbsp</div>`,u=r(),d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(!1),m=()=>t._holdInlineDropdownToolbarIndex!=null&&String(t._holdInlineDropdownToolbarIndex)===String(n.attrs.index),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)({top:0,left:0}),y=()=>{m()||g(!1)},b=i.respAreaToolbar([n,u],t,y),x=()=>{let{tr:e}=t.state,n=e.doc.nodeAt(u);if(!n)return;let{selection:r}=e;r.from===u&&r.to===u+n.nodeSize||(e.setSelection(Q.create(e.doc,u)),t.view.dispatch(e))},S=()=>{p.current||(i.onToolbarCloseRequest?(p.current=!0,i.onToolbarCloseRequest([n,u],t,()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,y()},()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,g(!0),setTimeout(x,0)})):y())};return(0,P.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&g(!0):h&&S()},[t,n,a]),(0,P.useEffect)(()=>{let e=document.body.getBoundingClientRect(),{from:n}=t.state.selection,r=t.view.coordsAtPos(n);v({top:r.top+Math.abs(e.top)+40,left:r.left});let i=e=>{let n=e.target.closest(`[data-toolbar-for]`);!e.target.closest(`[data-inline-dropdown-toolbar]`)&&(!n||n.dataset.toolbarFor!==f.current?.instanceId)&&!t._toolbarOpened&&d.current&&!d.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&S()};return h?document.addEventListener(`mousedown`,i):document.removeEventListener(`mousedown`,i),()=>document.removeEventListener(`mousedown`,i)},[h]),(0,U.jsxs)(jb,{className:`inline-dropdown`,"data-selected":a,style:{display:`inline-flex`,height:`50px`,cursor:`pointer`},children:[(0,U.jsxs)(`div`,{style:{display:`inline-flex`,minWidth:`178px`,height:`36px`,background:`#FFF`,border:`1px solid #C0C3CF`,boxSizing:`border-box`,borderRadius:`3px`,margin:`0 2px`,position:`relative`,alignItems:`center`},onClick:()=>g(!0),children:[(0,U.jsx)(`div`,{style:{flex:1,overflow:`hidden`,padding:`0 25px 0 8px`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},children:(0,U.jsx)(`span`,{style:{display:`inline-block`,verticalAlign:`middle`},dangerouslySetInnerHTML:{__html:l}})}),(0,U.jsx)($z,{direction:`down`,style:{position:`absolute`,top:`5px`,right:`5px`}})]}),h&&(0,U.jsxs)(P.Fragment,{children:[db.createPortal((0,U.jsx)(`div`,{ref:d,style:{zIndex:1},children:(0,U.jsx)(b,{editorCallback:e=>{f.current=e}})}),document.body),t._tiptapContainerEl&&db.createPortal((0,U.jsx)(NN,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),t._toolbarOpened=!1,delete t._holdInlineDropdownToolbarIndex,t.view.dispatch(e),g(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};sB.propTypes={attributes:p.object,selectedItem:p.oneOfType([p.string,p.object])};var cB=s({greaterThan:()=>dB,greaterThanEqual:()=>pB,lessThan:()=>uB,lessThanEqual:()=>fB}),lB=e=>({...e,category:`comparison`}),uB=lB({name:`Less than`,latex:`<`,command:`\\lt`}),dB=lB({name:`Greater than`,latex:`>`,command:`\\gt`}),fB=lB({name:`Less than or equal`,latex:`\\le`,symbol:`<=`,command:`\\le`,ariaLabel:`less than or equal to`}),pB=lB({name:`Greater than or equal`,symbol:`>=`,command:`\\ge`,latex:`\\ge`}),mB=e=>t=>({...t,category:e}),hB=(e=[])=>{let t=[];T(5,()=>t.push([]));let n=e.length,r=0,i=0;for(;i<n;)t[r++].push(e[i++]),r===5&&(r=0);return t},gB=e=>t=>{let n=y(e),r=n.some(e=>e.latex===t.latex),i=n.some(e=>e.name===t.name);return!r&&!i},_B=(e=[],t=[])=>{t=t.filter(gB(e));let n=[];T(5-e.length,()=>e.push([])),T(5,()=>n.push([]));let r=hB(t);for(let t=0;t<5;t++)n[t]=[...e[t],...r[t]];return n},vB=s({theta:()=>SB,x:()=>bB,y:()=>xB}),yB=mB(`vars`),bB=yB({name:`X`,latex:`x`,write:`x`}),xB=yB({name:`Y`,latex:`y`,write:`y`}),SB=yB({name:`Theta`,latex:`\\theta`,write:`\\theta`}),CB=s({blankOverBlank:()=>TB,xBlankBlank:()=>DB,xOverBlank:()=>EB}),wB=mB(`fractions`),TB=wB({name:`blank/blank`,latex:`\\frac{}{}`,command:`\\frac`,ariaLabel:`fraction`}),EB=wB({latex:`\\frac{x}{ }`,name:`X/blank`,label:`x/[]`,command:`/`,ariaLabel:`x over blank fraction`}),DB=wB({name:`X (blank/blank)`,latex:`x\\frac{}{}`,label:`x([]/[])`,command:`\\frac`,ariaLabel:`mixed number`}),OB=s({nthRoot:()=>NB,squareRoot:()=>MB,squared:()=>AB,xToPowerOfN:()=>jB}),kB=mB(`exponent`),AB=kB({name:`Squared`,latex:`x^2`,write:`^2`}),jB=kB({name:`X to the power of n`,latex:`x^{}`,command:`^`,ariaLabel:`exponent`}),MB=kB({name:`Square root`,latex:`\\sqrt{}`,command:`\\sqrt`}),NB=kB({name:`Nth root`,latex:`\\sqrt[{}]{}`,command:`\\nthroot`}),PB=s({absValue:()=>LB,approx:()=>VB,brackets:()=>zB,nApprox:()=>HB,notEqual:()=>UB,notSimilar:()=>GB,parenthesis:()=>RB,percentage:()=>BB,plusMinus:()=>IB,similar:()=>WB}),FB=mB(`misc`),IB=FB({name:`Plus or Minus`,latex:`\\pm`,write:`\\pm`}),LB=FB({name:`Absolute Value`,latex:`\\abs{}`,symbol:`| |`,command:`|`}),RB=FB({name:`Parenthesis`,latex:`\\left(\\right)`,symbol:`( )`,command:`(`}),zB=FB({name:`Brackets`,latex:`\\left[\\right]`,symbol:`[ ]`,command:`[`}),BB=FB({name:`Percent`,latex:`%`,command:`%`}),VB=FB({latex:`\\approx`,command:`\\approx`,ariaLabel:`Approximately equal to`}),HB=FB({latex:`\\napprox`,command:`\\napprox`,ariaLabel:`Not pproximately equal to`}),UB=FB({latex:`\\neq`,command:`\\neq`,ariaLabel:`Not equals`}),WB=FB({latex:`\\sim`,command:`\\sim`,ariaLabel:`Similar`}),GB=FB({latex:`\\nsim`,command:`\\nsim`,ariaLabel:`Not similar`}),KB=s({eulers:()=>YB,halfInfinity:()=>ZB,infinity:()=>XB,pi:()=>JB}),qB=mB(`constants`),JB=qB({name:`Pi`,label:`π`,latex:`\\pi`,command:`\\pi`,category:`constants`}),YB=qB({name:`Eulers`,label:`e`,latex:`e`,command:`e`,category:`constants`}),XB=qB({name:`Infinity`,label:`\\infty`,latex:`\\infty`,command:`\\infty`,category:`constants`}),ZB=qB({name:`Half Infinity`,label:`\\propto`,latex:`\\propto`,command:`\\propto`,category:`constants`}),QB=s({cos:()=>tV,cot:()=>aV,csc:()=>iV,sec:()=>rV,sin:()=>eV,tan:()=>nV}),$B=mB(`trigonometry`),eV=$B({name:`sine`,label:`sin`,command:`\\sin`,latex:`\\sin`}),tV=$B({name:`cosine`,label:`cos`,command:`\\cos`,latex:`\\cos`}),nV=$B({name:`tanget`,label:`tan`,command:`\\tan`,latex:`\\tan`}),rV=$B({name:`secant`,label:`sec`,command:`\\sec`,latex:`\\sec`}),iV=$B({name:`cosecant`,label:`csc`,command:`\\csc`,latex:`\\csc`}),aV=$B({name:`cotangent`,label:`cot`,command:`\\cot`,latex:`\\cot`}),oV=s({angle:()=>hV,circledDot:()=>xV,congruentTo:()=>wV,degree:()=>SV,doublePrimeArcSecond:()=>DV,leftArrow:()=>OV,leftrightArrow:()=>AV,measureOfAngle:()=>_V,notCongruentTo:()=>TV,notParallel:()=>pV,overArc:()=>gV,overLeftRightArrow:()=>uV,overRightArrow:()=>lV,overline:()=>cV,parallel:()=>fV,parallelogram:()=>bV,perpindicular:()=>mV,primeArcminute:()=>EV,rightArrow:()=>kV,segment:()=>dV,similarTo:()=>CV,square:()=>yV,triangle:()=>vV}),sV=e=>({...e,category:`geometry`}),cV=sV({name:`Line`,latex:`\\overline{}`,command:`\\overline`}),lV=sV({name:`Ray`,latex:`\\overrightarrow{}`,command:`\\overrightarrow`}),uV=sV({name:`Segment`,latex:`\\overleftrightarrow{\\overline{}}`,symbol:`AB`,command:`\\overleftrightarrow`}),dV=sV({name:`Segment`,latex:`\\overleftrightarrow{AB}`,write:`\\overleftrightarrow{AB}`,label:`AB`}),fV=sV({name:`Parallel`,latex:`\\parallel`,command:`\\parallel`}),pV=sV({name:`Not Parallel`,latex:`\\nparallel`,command:`\\nparallel`}),mV=sV({name:`Perpendicular`,latex:`\\perp`,command:`\\perpendicular`}),hV=sV({name:`Angle`,latex:`\\angle`,command:`\\angle`}),gV=sV({name:`Over arc`,latex:`\\overarc{\\overline{}}`,command:`\\overarc`}),_V=sV({name:`Measured Angle`,latex:`\\measuredangle`,command:[`m`,`\\angle`]}),vV=sV({name:`Triangle`,latex:`\\triangle`,command:`\\triangle`}),yV=sV({name:`Square`,latex:`\\square`,command:`\\square`}),bV=sV({name:`Parallelogram`,latex:`\\parallelogram`,command:`\\parallelogram`}),xV=sV({name:`Circled Dot`,latex:`\\odot`,command:`\\odot`}),SV=sV({name:`Degree`,latex:`\\degree`,command:`\\degree`}),CV=sV({name:`Similar`,command:`\\sim`,latex:`\\sim`}),wV=sV({name:`Congruent To`,command:`\\cong`,latex:`\\cong`}),TV=sV({name:`Not Congruent To`,command:`\\ncong`,latex:`\\ncong`}),EV=sV({name:`Prime`,label:`pam`,latex:`'`,write:`'`}),DV=sV({name:`Double Prime`,latex:`''`,write:`''`}),OV=sV({name:`Left Arrow`,latex:`\\leftarrow`,command:`\\leftarrow`}),kV=sV({name:`Right Arrow`,latex:`\\rightarrow`,command:`\\rightarrow`}),AV=sV({name:`Left and Right Arrow`,latex:`\\leftrightarrow`,command:`\\leftrightarrow`}),jV=s({circleDot:()=>MV}),MV=mB(`operators`)({name:`CircleDot`,label:`⋅`,write:`\\cdot`,ariaLabel:`Dot multiplier`}),NV=s({ln:()=>LV,log:()=>FV,logSubscript:()=>IV}),PV=mB(`log`),FV=PV({name:`Log`,label:`log`,command:`\\log`,latex:`\\log`}),IV=PV({name:`log base n`,label:`log s`,latex:`\\log_{}`,command:[`\\log`,`_`]}),LV=PV({name:`natural log`,label:`ln`,command:`\\ln`,latex:`\\ln`}),RV=s({subscript:()=>VV,superscript:()=>BV}),zV=mB(`sub-sup`),BV=zV({name:`Superscript`,latex:`x^{}`,command:`^`}),VV=zV({name:`Subscript`,latex:`x_{}`,command:`_`}),HV=s({mu:()=>KV,sigma:()=>qV,smallSigma:()=>JV,xBar:()=>WV,yBar:()=>GV}),UV=mB(`statistics`),WV=UV({name:`X Bar`,label:`x̄`,latex:`\\overline{x}`,write:`\\overline{x}`}),GV=UV({name:`Y Bar`,latex:`\\overline{y}`,write:`\\overline{y}`}),KV=UV({name:`mu`,label:`mu`,latex:`\\mu`,write:`\\mu`}),qV=UV({name:`Sigma`,ariaLabel:`Uppercase Sigma`,label:`\\Sigma`,latex:`\\Sigma`,write:`\\Sigma`}),JV=UV({name:`sigma`,ariaLabel:`Lowercase Sigma`,label:`\\sigma`,latex:`\\sigma`,write:`\\sigma`}),YV=s({divide:()=>eH,equals:()=>ZV,minus:()=>$V,multiply:()=>tH,plus:()=>QV}),XV=mB(`operators`),ZV=XV({write:`=`,label:`=`}),QV=XV({write:`+`,label:`+`}),$V=XV({write:`−`,label:`−`}),eH=XV({name:`divide`,label:`÷`,command:`\\divide`,otherNotation:`\\div`}),tH=XV({name:`multiply`,label:`×`,command:`\\times`}),nH=s({doubleCellMatrix:()=>aH,singleCellMatrix:()=>iH}),rH=mB(`matrices`),iH=rH({name:`Single Cell Matrix`,label:`[ ]`,write:`\\begin{pmatrix}\\end{pmatrix}`}),aH=rH({name:`Double Cell Matrix`,label:`[ ] [ ] \\\\newline [ ] [ ]`,write:`\\begin{bmatrix}&\\\\&\\end{bmatrix}`}),oH={0:`zero`,1:`one`,2:`two`,3:`three`,4:`four`,5:`five`,6:`six`,7:`seven`,8:`eight`,9:`nine`},sH=T(10,String).map(e=>({name:oH[e],write:e,label:e,category:`digit`})).reduce((e,t)=>(e[t.name]=t,e),{comma:{name:`comma`,label:`,`,write:`,`,category:`digit`},decimalPoint:{name:`decimal-point`,label:`.`,write:`.`,category:`digit`}}),cH=mB(`logic`),lH=cH({name:`Therefore`,label:`∴`,write:`∴`}),uH=cH({name:`Long division`,latex:`\\longdiv{}`,command:`\\longdiv`}),dH=mB(`navigation`),fH=dH({label:`◀`,keystroke:`Left`,ariaLabel:`Move cursor left`}),pH=dH({label:`▶`,keystroke:`Right`,ariaLabel:`Move cursor right`}),mH={label:`⌫`,category:`edit`,keystroke:`Backspace`,ariaLabel:`Delete`},hH=[[TB,BB,bB,AB,MB],[MV,xB,VV,jB,NB],[IB,uB,dB,fB,pB],[JB,SB,RB,zB,LB],[UB,eV,tV,nV,SV]],gH=(()=>{let e=[...hH.map(e=>[...e])];return e[0].push({name:`i`,latex:`i`,write:`i`}),e[1].push(FV),e[2].push(IV),e[3].push(LV),e[4].push(YB),e})(),_H=(()=>{let e=[...hH.map(e=>[...e])];return e[0].push(KV),e[1].push(WV),e[2].push(GV),e[3].push(qV),e[4].push(JV),e})(),vH=[{predicate:e=>e>=3&&e<=5,set:[[uB,dB],[EB,DB],[bB,uH],[AB,jB]]},{predicate:e=>e>=6&&e<=7,set:[[SV,uB,dB],[MV,fB,pB],[bB,xB,AB,jB],[IB,EB,DB,MB],[JB,RB,LB,NB]]},{predicate:e=>e>=8||e===`HS`,set:hH},{predicate:`non-negative-integers`,set:[[sH.seven,sH.eight,sH.nine],[sH.four,sH.five,sH.six],[sH.one,sH.two,sH.three],[sH.zero,{name:``,latex:``,write:``},{name:``,latex:``,write:``}],[fH,pH,mH]]},{predicate:`integers`,set:[[sH.seven,sH.eight,sH.nine],[sH.four,sH.five,sH.six],[sH.one,sH.two,sH.three],[sH.zero,{name:``,latex:``,write:``},$V],[fH,pH,mH]]},{predicate:`decimals`,set:[[sH.seven,sH.eight,sH.nine],[sH.four,sH.five,sH.six],[sH.one,sH.two,sH.three],[sH.zero,sH.decimalPoint,$V],[fH,pH,mH]]},{predicate:`fractions`,set:[[sH.seven,sH.eight,sH.nine],[sH.four,sH.five,sH.six],[sH.one,sH.two,sH.three],[sH.zero,TB,$V],[fH,pH,mH]]},{predicate:`geometry`,set:[[TB,SV,EV,DV,wV,CV],[MV,hV,_V,vV,TV,GB],[eV,tV,nV,JB,MB,NB],[iV,rV,aV,SB,VV,jB],[cV,lV,uV,gV,mV,fV]]},{predicate:`advanced-algebra`,set:gH},{predicate:`statistics`,set:_H},{predicate:`item-authoring`,set:[[eH,TB,uH,ZB,AB,MB,cV,lV,uV,FV],[tH,MV,{name:``,latex:``,write:``},VV,jB,NB,mV,fV,gV,IV],[IB,JB,SB,SV,hV,OV,kV,vV,yV,LV],[UB,LB,JV,KV,lH,qV,AV,eV,tV,nV],[fB,pB,{name:``,latex:``,write:``},{name:``,latex:``,write:``},XB,{name:``,latex:``,write:``},{name:``,latex:``,write:``},iV,rV,aV]]},{predicate:e=>e>=1&&e<=2,set:[]}],yH=e=>{let t=parseInt(e,10);if(e=isNaN(t)?e:t,!e)return[];let n=vH.find(t=>typeof t.predicate==`string`?t.predicate===e:t.predicate(e));if(n)return n.set||[];if(e!==`language`)return vH[2].set},bH=[...Object.values(YV),...Object.values(cB),...Object.values(KB),...Object.values(sH),...Object.values(OB),...Object.values(CB),...Object.values(oV),...Object.values(NV),...Object.values(nH),...Object.values(PB),...Object.values(jV),...Object.values(HV),...Object.values(RV),...Object.values(QB),...Object.values(vB)],xH=e=>(e||[]).map(e=>{let{latex:t}=e,n=(bH||[]).find(e=>t===e.latex||t===e.write||t===e.command||t===e.otherNotation);return t&&n||e}),SH=e=>{let t=e??document;(Array.from(t.querySelectorAll(`span[mathquill-command-id]`))||[]).forEach(e=>{e&&e.innerText===`∥`&&e.className!==`mq-editable-field`&&(e.style.fontSize=`32px`),(e.innerText===`′`||e.innerText===`′′`)&&!e.hasAttribute(`data-prime`)&&e.setAttribute(`data-prime`,`true`)})},{one:CH,two:wH,three:TH,four:EH,five:DH,six:OH,seven:kH,eight:AH,nine:jH,zero:MH,comma:NH,decimalPoint:PH}=sH,FH=[[kH,AH,jH,eH],[EH,DH,OH,tH],[CH,wH,TH,$V],[MH,PH,NH,QV],[fH,pH,mH,ZV]],IH=o(((e,t)=>{(function(e,n){"use strict";typeof t==`object`&&typeof t.exports==`object`?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw Error(`jQuery requires a window with a document`);return n(e)}:n(e)})(typeof window<`u`?window:e,function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,a=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},o=n.push,s=n.indexOf,c={},l=c.toString,u=c.hasOwnProperty,d=u.toString,f=d.call(Object),p={},m=function(e){return typeof e==`function`&&typeof e.nodeType!=`number`&&typeof e.item!=`function`},h=function(e){return e!=null&&e===e.window},g=e.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function v(e,t,n){n||=g;var r,i,a=n.createElement(`script`);if(a.text=e,t)for(r in _)i=t[r]||t.getAttribute&&t.getAttribute(r),i&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function y(e){return e==null?e+``:typeof e==`object`||typeof e==`function`?c[l.call(e)]||`object`:typeof e}var b=`3.7.1`,x=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};S.fn=S.prototype={jquery:b,constructor:S,length:0,toArray:function(){return i.call(this)},get:function(e){return e==null?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:n.sort,splice:n.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,c=arguments.length,l=!1;for(typeof o==`boolean`&&(l=o,o=arguments[s]||{},s++),typeof o!=`object`&&!m(o)&&(o={}),s===c&&(o=this,s--);s<c;s++)if((e=arguments[s])!=null)for(t in e)r=e[t],!(t===`__proto__`||o===r)&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[t],a=i&&!Array.isArray(n)?[]:!i&&!S.isPlainObject(n)?{}:n,i=!1,o[t]=S.extend(l,a,r)):r!==void 0&&(o[t]=r));return o},S.extend({expando:`jQuery`+(b+Math.random()).replace(/\D/g,``),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!e||l.call(e)!==`[object Object]`?!1:(t=r(e),t?(n=u.call(t,`constructor`)&&t.constructor,typeof n==`function`&&d.call(n)===f):!0)},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){v(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(C(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},text:function(e){var t,n=``,r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=S.text(t);return i===1||i===11?e.textContent:i===9?e.documentElement.textContent:i===3||i===4?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return e!=null&&(C(Object(e))?S.merge(n,typeof e==`string`?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){return t==null?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!x.test(t||n&&n.nodeName||`HTML`)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],a=0,o=e.length,s=!n;a<o;a++)r=!t(e[a],a),r!==s&&i.push(e[a]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)i=t(e[o],o,n),i!=null&&s.push(i);else for(o in e)i=t(e[o],o,n),i!=null&&s.push(i);return a(s)},guid:1,support:p}),typeof Symbol==`function`&&(S.fn[Symbol.iterator]=n[Symbol.iterator]),S.each(`Boolean Number String Function Array Date RegExp Object Error Symbol`.split(` `),function(e,t){c[`[object `+t+`]`]=t.toLowerCase()});function C(e){var t=!!e&&`length`in e&&e.length,n=y(e);return m(e)||h(e)?!1:n===`array`||t===0||typeof t==`number`&&t>0&&t-1 in e}function w(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var T=n.pop,E=n.sort,D=n.splice,O=`[\\x20\\t\\r\\n\\f]`,k=RegExp(`^`+O+`+|((?:^|[^\\\\])(?:\\\\.)*)`+O+`+$`,`g`);S.contains=function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&n.nodeType===1&&(e.contains?e.contains(n):e.compareDocumentPosition&&e.compareDocumentPosition(n)&16))};var A=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function j(e,t){return t?e===`\0`?`�`:e.slice(0,-1)+`\\`+e.charCodeAt(e.length-1).toString(16)+` `:`\\`+e}S.escapeSelector=function(e){return(e+``).replace(A,j)};var M=g,ee=o;(function(){var t,r,a,o,c,l=ee,d,f,m,h,g,_=S.expando,v=0,y=0,b=pe(),x=pe(),C=pe(),A=pe(),j=function(e,t){return e===t&&(c=!0),0},N=`checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped`,P=`(?:\\\\[\\da-fA-F]{1,6}`+O+`?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+`,te=`\\[`+O+`*(`+P+`)(?:`+O+`*([*^$|!~]?=)`+O+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+P+`))|)`+O+`*\\]`,F=`:(`+P+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+te+`)*)|.*)\\)|)`,I=RegExp(O+`+`,`g`),L=RegExp(`^`+O+`*,`+O+`*`),ne=RegExp(`^`+O+`*([>+~]|`+O+`)`+O+`*`),re=RegExp(O+`|>`),ie=new RegExp(F),R=RegExp(`^`+P+`$`),ae={ID:RegExp(`^#(`+P+`)`),CLASS:RegExp(`^\\.(`+P+`)`),TAG:RegExp(`^(`+P+`|[*])`),ATTR:RegExp(`^`+te),PSEUDO:RegExp(`^`+F),CHILD:RegExp(`^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(`+O+`*(even|odd|(([+-]|)(\\d*)n|)`+O+`*(?:([+-]|)`+O+`*(\\d+)|))`+O+`*\\)|)`,`i`),bool:RegExp(`^(?:`+N+`)$`,`i`),needsContext:RegExp(`^`+O+`*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(`+O+`*((?:-\\d)?\\d*)`+O+`*\\)|)(?=[^-]|$)`,`i`)},z=/^(?:input|select|textarea|button)$/i,B=/^h\d$/i,oe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,se=/[+~]/,ce=RegExp(`\\\\[\\da-fA-F]{1,6}`+O+`?|\\\\([^\\r\\n\\f])`,`g`),le=function(e,t){var n=`0x`+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320))},ue=function(){be()},de=we(function(e){return e.disabled===!0&&w(e,`fieldset`)},{dir:`parentNode`,next:`legend`});function fe(){try{return d.activeElement}catch{}}try{l.apply(n=i.call(M.childNodes),M.childNodes),n[M.childNodes.length].nodeType}catch{l={apply:function(e,t){ee.apply(e,i.call(t))},call:function(e){ee.apply(e,i.call(arguments,1))}}}function V(e,t,n,r){var i,a,o,s,c,u,f,g=t&&t.ownerDocument,v=t?t.nodeType:9;if(n||=[],typeof e!=`string`||!e||v!==1&&v!==9&&v!==11)return n;if(!r&&(be(t),t||=d,m)){if(v!==11&&(c=oe.exec(e))){if(i=c[1]){if(v===9)if(o=t.getElementById(i)){if(o.id===i)return l.call(n,o),n}else return n;else if(g&&(o=g.getElementById(i))&&V.contains(t,o)&&o.id===i)return l.call(n,o),n}else if(c[2])return l.apply(n,t.getElementsByTagName(e)),n;else if((i=c[3])&&t.getElementsByClassName)return l.apply(n,t.getElementsByClassName(i)),n}if(!A[e+` `]&&(!h||!h.test(e))){if(f=e,g=t,v===1&&(re.test(e)||ne.test(e))){for(g=se.test(e)&&ye(t.parentNode)||t,(g!=t||!p.scope)&&((s=t.getAttribute(`id`))?s=S.escapeSelector(s):t.setAttribute(`id`,s=_)),u=Se(e),a=u.length;a--;)u[a]=(s?`#`+s:`:scope`)+` `+Ce(u[a]);f=u.join(`,`)}try{return l.apply(n,g.querySelectorAll(f)),n}catch{A(e,!0)}finally{s===_&&t.removeAttribute(`id`)}}}return Me(e.replace(k,`$1`),t,n,r)}function pe(){var e=[];function t(n,i){return e.push(n+` `)>r.cacheLength&&delete t[e.shift()],t[n+` `]=i}return t}function me(e){return e[_]=!0,e}function he(e){var t=d.createElement(`fieldset`);try{return!!e(t)}catch{return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ge(e){return function(t){return w(t,`input`)&&t.type===e}}function _e(e){return function(t){return(w(t,`input`)||w(t,`button`))&&t.type===e}}function H(e){return function(t){return`form`in t?t.parentNode&&t.disabled===!1?`label`in t?`label`in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&de(t)===e:t.disabled===e:`label`in t?t.disabled===e:!1}}function ve(e){return me(function(t){return t=+t,me(function(n,r){for(var i,a=e([],n.length,t),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))})})}function ye(e){return e&&e.getElementsByTagName!==void 0&&e}function be(e){var t,n=e?e.ownerDocument||e:M;return n==d||n.nodeType!==9||!n.documentElement?d:(d=n,f=d.documentElement,m=!S.isXMLDoc(d),g=f.matches||f.webkitMatchesSelector||f.msMatchesSelector,f.msMatchesSelector&&M!=d&&(t=d.defaultView)&&t.top!==t&&t.addEventListener(`unload`,ue),p.getById=he(function(e){return f.appendChild(e).id=S.expando,!d.getElementsByName||!d.getElementsByName(S.expando).length}),p.disconnectedMatch=he(function(e){return g.call(e,`*`)}),p.scope=he(function(){return d.querySelectorAll(`:scope`)}),p.cssHas=he(function(){try{return d.querySelector(`:has(*,:jqfake)`),!1}catch{return!0}}),p.getById?(r.filter.ID=function(e){var t=e.replace(ce,le);return function(e){return e.getAttribute(`id`)===t}},r.find.ID=function(e,t){if(t.getElementById!==void 0&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(ce,le);return function(e){var n=e.getAttributeNode!==void 0&&e.getAttributeNode(`id`);return n&&n.value===t}},r.find.ID=function(e,t){if(t.getElementById!==void 0&&m){var n,r,i,a=t.getElementById(e);if(a){if(n=a.getAttributeNode(`id`),n&&n.value===e)return[a];for(i=t.getElementsByName(e),r=0;a=i[r++];)if(n=a.getAttributeNode(`id`),n&&n.value===e)return[a]}return[]}}),r.find.TAG=function(e,t){return t.getElementsByTagName===void 0?t.querySelectorAll(e):t.getElementsByTagName(e)},r.find.CLASS=function(e,t){if(t.getElementsByClassName!==void 0&&m)return t.getElementsByClassName(e)},h=[],he(function(e){var t;f.appendChild(e).innerHTML=`<a id='`+_+`' href='' disabled='disabled'></a><select id='`+_+`-\r\\' disabled='disabled'><option selected=''></option></select>`,e.querySelectorAll(`[selected]`).length||h.push(`\\[`+O+`*(?:value|`+N+`)`),e.querySelectorAll(`[id~=`+_+`-]`).length||h.push(`~=`),e.querySelectorAll(`a#`+_+`+*`).length||h.push(`.#.+[+~]`),e.querySelectorAll(`:checked`).length||h.push(`:checked`),t=d.createElement(`input`),t.setAttribute(`type`,`hidden`),e.appendChild(t).setAttribute(`name`,`D`),f.appendChild(e).disabled=!0,e.querySelectorAll(`:disabled`).length!==2&&h.push(`:enabled`,`:disabled`),t=d.createElement(`input`),t.setAttribute(`name`,``),e.appendChild(t),e.querySelectorAll(`[name='']`).length||h.push(`\\[`+O+`*name`+O+`*=`+O+`*(?:''|"")`)}),p.cssHas||h.push(`:has`),h=h.length&&new RegExp(h.join(`|`)),j=function(e,t){if(e===t)return c=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,n&1||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===d||e.ownerDocument==M&&V.contains(M,e)?-1:t===d||t.ownerDocument==M&&V.contains(M,t)?1:o?s.call(o,e)-s.call(o,t):0:n&4?-1:1)},d)}for(t in V.matches=function(e,t){return V(e,null,null,t)},V.matchesSelector=function(e,t){if(be(e),m&&!A[t+` `]&&(!h||!h.test(t)))try{var n=g.call(e,t);if(n||p.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch{A(t,!0)}return V(t,d,null,[e]).length>0},V.contains=function(e,t){return(e.ownerDocument||e)!=d&&be(e),S.contains(e,t)},V.attr=function(e,t){(e.ownerDocument||e)!=d&&be(e);var n=r.attrHandle[t.toLowerCase()],i=n&&u.call(r.attrHandle,t.toLowerCase())?n(e,t,!m):void 0;return i===void 0?e.getAttribute(t):i},V.error=function(e){throw Error(`Syntax error, unrecognized expression: `+e)},S.uniqueSort=function(e){var t,n=[],r=0,a=0;if(c=!p.sortStable,o=!p.sortStable&&i.call(e,0),E.call(e,j),c){for(;t=e[a++];)t===e[a]&&(r=n.push(a));for(;r--;)D.call(e,n[r],1)}return o=null,e},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(i.apply(this)))},r=S.expr={cacheLength:50,createPseudo:me,match:ae,attrHandle:{},find:{},relative:{">":{dir:`parentNode`,first:!0}," ":{dir:`parentNode`},"+":{dir:`previousSibling`,first:!0},"~":{dir:`previousSibling`}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ce,le),e[3]=(e[3]||e[4]||e[5]||``).replace(ce,le),e[2]===`~=`&&(e[3]=` `+e[3]+` `),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)===`nth`?(e[3]||V.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]===`even`||e[3]===`odd`)),e[5]=+(e[7]+e[8]||e[3]===`odd`)):e[3]&&V.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ae.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||``:n&&ie.test(n)&&(t=Se(n,!0))&&(t=n.indexOf(`)`,n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ce,le).toLowerCase();return e===`*`?function(){return!0}:function(e){return w(e,t)}},CLASS:function(e){var t=b[e+` `];return t||(t=RegExp(`(^|`+O+`)`+e+`(`+O+`|$)`))&&b(e,function(e){return t.test(typeof e.className==`string`&&e.className||e.getAttribute!==void 0&&e.getAttribute(`class`)||``)})},ATTR:function(e,t,n){return function(r){var i=V.attr(r,e);return i==null?t===`!=`:t?(i+=``,t===`=`?i===n:t===`!=`?i!==n:t===`^=`?n&&i.indexOf(n)===0:t===`*=`?n&&i.indexOf(n)>-1:t===`$=`?n&&i.slice(-n.length)===n:t===`~=`?(` `+i.replace(I,` `)+` `).indexOf(n)>-1:t===`|=`?i===n||i.slice(0,n.length+1)===n+`-`:!1):!0}},CHILD:function(e,t,n,r,i){var a=e.slice(0,3)!==`nth`,o=e.slice(-4)!==`last`,s=t===`of-type`;return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,f,p,m=a===o?`previousSibling`:`nextSibling`,h=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!c&&!s,b=!1;if(h){if(a){for(;m;){for(d=t;d=d[m];)if(s?w(d,g):d.nodeType===1)return!1;p=m=e===`only`&&!p&&`nextSibling`}return!0}if(p=[o?h.firstChild:h.lastChild],o&&y){for(u=h[_]||(h[_]={}),l=u[e]||[],f=l[0]===v&&l[1],b=f&&l[2],d=f&&h.childNodes[f];d=++f&&d&&d[m]||(b=f=0)||p.pop();)if(d.nodeType===1&&++b&&d===t){u[e]=[v,f,b];break}}else if(y&&(u=t[_]||(t[_]={}),l=u[e]||[],f=l[0]===v&&l[1],b=f),b===!1)for(;(d=++f&&d&&d[m]||(b=f=0)||p.pop())&&!((s?w(d,g):d.nodeType===1)&&++b&&(y&&(u=d[_]||(d[_]={}),u[e]=[v,b]),d===t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||V.error(`unsupported pseudo: `+e);return i[_]?i(t):i.length>1?(n=[e,e,``,t],r.setFilters.hasOwnProperty(e.toLowerCase())?me(function(e,n){for(var r,a=i(e,t),o=a.length;o--;)r=s.call(e,a[o]),e[r]=!(n[r]=a[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:me(function(e){var t=[],n=[],r=je(e.replace(k,`$1`));return r[_]?me(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:me(function(e){return function(t){return V(e,t).length>0}}),contains:me(function(e){return e=e.replace(ce,le),function(t){return(t.textContent||S.text(t)).indexOf(e)>-1}}),lang:me(function(e){return R.test(e||``)||V.error(`unsupported lang: `+e),e=e.replace(ce,le).toLowerCase(),function(t){var n;do if(n=m?t.lang:t.getAttribute(`xml:lang`)||t.getAttribute(`lang`))return n=n.toLowerCase(),n===e||n.indexOf(e+`-`)===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===fe()&&d.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:H(!1),disabled:H(!0),checked:function(e){return w(e,`input`)&&!!e.checked||w(e,`option`)&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return B.test(e.nodeName)},input:function(e){return z.test(e.nodeName)},button:function(e){return w(e,`input`)&&e.type===`button`||w(e,`button`)},text:function(e){var t;return w(e,`input`)&&e.type===`text`&&((t=e.getAttribute(`type`))==null||t.toLowerCase()===`text`)},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ge(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=_e(t);function xe(){}xe.prototype=r.filters=r.pseudos,r.setFilters=new xe;function Se(e,t){var n,i,a,o,s,c,l,u=x[e+` `];if(u)return t?0:u.slice(0);for(s=e,c=[],l=r.preFilter;s;){for(o in(!n||(i=L.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),c.push(a=[])),n=!1,(i=ne.exec(s))&&(n=i.shift(),a.push({value:n,type:i[0].replace(k,` `)}),s=s.slice(n.length)),r.filter)(i=ae[o].exec(s))&&(!l[o]||(i=l[o](i)))&&(n=i.shift(),a.push({value:n,type:o,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?V.error(e):x(e,c).slice(0)}function Ce(e){for(var t=0,n=e.length,r=``;t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,i=t.next,a=i||r,o=n&&a===`parentNode`,s=y++;return t.first?function(t,n,i){for(;t=t[r];)if(t.nodeType===1||o)return e(t,n,i);return!1}:function(t,n,c){var l,u,d=[v,s];if(c){for(;t=t[r];)if((t.nodeType===1||o)&&e(t,n,c))return!0}else for(;t=t[r];)if(t.nodeType===1||o){if(u=t[_]||(t[_]={}),i&&w(t,i))t=t[r]||t;else if((l=u[a])&&l[0]===v&&l[1]===s)return d[2]=l[2];else if(u[a]=d,d[2]=e(t,n,c))return!0}return!1}}function Te(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ee(e,t,n){for(var r=0,i=t.length;r<i;r++)V(e,t[r],n);return n}function De(e,t,n,r,i){for(var a,o=[],s=0,c=e.length,l=t!=null;s<c;s++)(a=e[s])&&(!n||n(a,r,i))&&(o.push(a),l&&t.push(s));return o}function Oe(e,t,n,r,i,a){return r&&!r[_]&&(r=Oe(r)),i&&!i[_]&&(i=Oe(i,a)),me(function(a,o,c,u){var d,f,p,m,h=[],g=[],_=o.length,v=a||Ee(t||`*`,c.nodeType?[c]:c,[]),y=e&&(a||!t)?De(v,h,e,c,u):v;if(n?(m=i||(a?e:_||r)?[]:o,n(y,m,c,u)):m=y,r)for(d=De(m,g),r(d,[],c,u),f=d.length;f--;)(p=d[f])&&(m[g[f]]=!(y[g[f]]=p));if(a){if(i||e){if(i){for(d=[],f=m.length;f--;)(p=m[f])&&d.push(y[f]=p);i(null,m=[],d,u)}for(f=m.length;f--;)(p=m[f])&&(d=i?s.call(a,p):h[f])>-1&&(a[d]=!(o[d]=p))}}else m=De(m===o?m.splice(_,m.length):m),i?i(null,o,m,u):l.apply(o,m)})}function ke(e){for(var t,n,i,o=e.length,c=r.relative[e[0].type],l=c||r.relative[` `],u=+!!c,d=we(function(e){return e===t},l,!0),f=we(function(e){return s.call(t,e)>-1},l,!0),p=[function(e,n,r){var i=!c&&(r||n!=a)||((t=n).nodeType?d(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[we(Te(p),n)];else{if(n=r.filter[e[u].type].apply(null,e[u].matches),n[_]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Oe(u>1&&Te(p),u>1&&Ce(e.slice(0,u-1).concat({value:e[u-2].type===` `?`*`:``})).replace(k,`$1`),n,u<i&&ke(e.slice(u,i)),i<o&&ke(e=e.slice(i)),i<o&&Ce(e))}p.push(n)}return Te(p)}function Ae(e,t){var n=t.length>0,i=e.length>0,o=function(o,s,c,u,f){var p,h,g,_=0,y=`0`,b=o&&[],x=[],C=a,w=o||i&&r.find.TAG(`*`,f),E=v+=C==null?1:Math.random()||.1,D=w.length;for(f&&(a=s==d||s||f);y!==D&&(p=w[y])!=null;y++){if(i&&p){for(h=0,!s&&p.ownerDocument!=d&&(be(p),c=!m);g=e[h++];)if(g(p,s||d,c)){l.call(u,p);break}f&&(v=E)}n&&((p=!g&&p)&&_--,o&&b.push(p))}if(_+=y,n&&y!==_){for(h=0;g=t[h++];)g(b,x,s,c);if(o){if(_>0)for(;y--;)b[y]||x[y]||(x[y]=T.call(u));x=De(x)}l.apply(u,x),f&&!o&&x.length>0&&_+t.length>1&&S.uniqueSort(u)}return f&&(v=E,a=C),b};return n?me(o):o}function je(e,t){var n,r=[],i=[],a=C[e+` `];if(!a){for(t||=Se(e),n=t.length;n--;)a=ke(t[n]),a[_]?r.push(a):i.push(a);a=C(e,Ae(i,r)),a.selector=e}return a}function Me(e,t,n,i){var a,o,s,c,u,d=typeof e==`function`&&e,f=!i&&Se(e=d.selector||e);if(n||=[],f.length===1){if(o=f[0]=f[0].slice(0),o.length>2&&(s=o[0]).type===`ID`&&t.nodeType===9&&m&&r.relative[o[1].type]){if(t=(r.find.ID(s.matches[0].replace(ce,le),t)||[])[0],t)d&&(t=t.parentNode);else return n;e=e.slice(o.shift().value.length)}for(a=ae.needsContext.test(e)?0:o.length;a--&&(s=o[a],!r.relative[c=s.type]);)if((u=r.find[c])&&(i=u(s.matches[0].replace(ce,le),se.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(a,1),e=i.length&&Ce(o),!e)return l.apply(n,i),n;break}}return(d||je(e,f))(i,t,!m,n,!t||se.test(e)&&ye(t.parentNode)||t),n}p.sortStable=_.split(``).sort(j).join(``)===_,be(),p.sortDetached=he(function(e){return e.compareDocumentPosition(d.createElement(`fieldset`))&1}),S.find=V,S.expr[`:`]=S.expr.pseudos,S.unique=S.uniqueSort,V.compile=je,V.select=Me,V.setDocument=be,V.tokenize=Se,V.escape=S.escapeSelector,V.getText=S.text,V.isXML=S.isXMLDoc,V.selectors=S.expr,V.support=S.support,V.uniqueSort=S.uniqueSort})();var N=function(e,t,n){for(var r=[],i=n!==void 0;(e=e[t])&&e.nodeType!==9;)if(e.nodeType===1){if(i&&S(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n},te=S.expr.match.needsContext,F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return m(t)?S.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):typeof t==`string`?S.filter(t,e,n):S.grep(e,function(e){return s.call(t,e)>-1!==n})}S.filter=function(e,t,n){var r=t[0];return n&&(e=`:not(`+e+`)`),t.length===1&&r.nodeType===1?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return e.nodeType===1}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(typeof e!=`string`)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return r>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,typeof e==`string`&&te.test(e)?S(e):e||[],!1).length}});var L,ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,re=S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n||=L,typeof e==`string`)if(r=e[0]===`<`&&e[e.length-1]===`>`&&e.length>=3?[null,e,null]:ne.exec(e),r&&(r[1]||!t))if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),F.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}else return i=g.getElementById(r[2]),i&&(this[0]=i,this.length=1),this;else if(!t||t.jquery)return(t||n).find(e);else return this.constructor(t).find(e);else if(e.nodeType)return this[0]=e,this.length=1,this;else if(m(e))return n.ready===void 0?e(S):n.ready(e);return S.makeArray(e,this)};re.prototype=S.fn,L=S(g);var ie=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,a=[],o=typeof e!=`string`&&S(e);if(!te.test(e)){for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:n.nodeType===1&&S.find.matchesSelector(n,e))){a.push(n);break}}return this.pushStack(a.length>1?S.uniqueSort(a):a)},index:function(e){return e?typeof e==`string`?s.call(S(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function ae(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}S.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return N(e,`parentNode`)},parentsUntil:function(e,t,n){return N(e,`parentNode`,n)},next:function(e){return ae(e,`nextSibling`)},prev:function(e){return ae(e,`previousSibling`)},nextAll:function(e){return N(e,`nextSibling`)},prevAll:function(e){return N(e,`previousSibling`)},nextUntil:function(e,t,n){return N(e,`nextSibling`,n)},prevUntil:function(e,t,n){return N(e,`previousSibling`,n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return e.contentDocument!=null&&r(e.contentDocument)?e.contentDocument:(w(e,`template`)&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return e.slice(-5)!==`Until`&&(r=n),r&&typeof r==`string`&&(i=S.filter(r,i)),this.length>1&&(R[e]||S.uniqueSort(i),ie.test(e)&&i.reverse()),this.pushStack(i)}});var z=/[^\x20\t\r\n\f]+/g;function B(e){var t={};return S.each(e.match(z)||[],function(e,n){t[n]=!0}),t}S.Callbacks=function(e){e=typeof e==`string`?B(e):S.extend({},e);var t,n,r,i,a=[],o=[],s=-1,c=function(){for(i||=e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:``)},l={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),(function t(n){S.each(n,function(n,r){m(r)?(!e.unique||!l.has(r))&&a.push(r):r&&r.length&&y(r)!==`string`&&t(r)})})(arguments),n&&!t&&c()),this},remove:function(){return S.each(arguments,function(e,t){for(var n;(n=S.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?S.inArray(e,a)>-1:a.length>0},empty:function(){return a&&=[],this},disable:function(){return i=o=[],a=n=``,this},disabled:function(){return!a},lock:function(){return i=o=[],!n&&!t&&(a=n=``),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n||=[],n=[e,n.slice?n.slice():n],o.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function oe(e){return e}function se(e){throw e}function ce(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.extend({Deferred:function(t){var n=[[`notify`,`progress`,S.Callbacks(`memory`),S.Callbacks(`memory`),2],[`resolve`,`done`,S.Callbacks(`once memory`),S.Callbacks(`once memory`),0,`resolved`],[`reject`,`fail`,S.Callbacks(`once memory`),S.Callbacks(`once memory`),1,`rejected`]],r=`pending`,i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(t){S.each(n,function(n,r){var i=m(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+`With`](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var a=0;function o(t,n,r,i){return function(){var s=this,c=arguments,l=function(){var e,l;if(!(t<a)){if(e=r.apply(s,c),e===n.promise())throw TypeError(`Thenable self-resolution`);l=e&&(typeof e==`object`||typeof e==`function`)&&e.then,m(l)?i?l.call(e,o(a,n,oe,i),o(a,n,se,i)):(a++,l.call(e,o(a,n,oe,i),o(a,n,se,i),o(a,n,oe,n.notifyWith))):(r!==oe&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},u=i?l:function(){try{l()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,u.error),t+1>=a&&(r!==se&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?u():(S.Deferred.getErrorHook?u.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(u.error=S.Deferred.getStackHook()),e.setTimeout(u))}}return S.Deferred(function(e){n[0][3].add(o(0,e,m(i)?i:oe,e.notifyWith)),n[1][3].add(o(0,e,m(t)?t:oe)),n[2][3].add(o(0,e,m(r)?r:se))}).promise()},promise:function(e){return e==null?i:S.extend(e,i)}},a={};return S.each(n,function(e,t){var o=t[2],s=t[5];i[t[1]]=o.add,s&&o.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),o.add(t[3].fire),a[t[0]]=function(){return a[t[0]+`With`](this===a?void 0:this,arguments),this},a[t[0]+`With`]=o.fireWith}),i.promise(a),t&&t.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),a=i.call(arguments),o=S.Deferred(),s=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?i.call(arguments):n,--t||o.resolveWith(r,a)}};if(t<=1&&(ce(e,o.done(s(n)).resolve,o.reject,!t),o.state()===`pending`||m(a[n]&&a[n].then)))return o.then();for(;n--;)ce(a[n],s(n),o.reject);return o.promise()}});var le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&le.test(t.name)&&e.console.warn(`jQuery.Deferred exception: `+t.message,t.stack,n)},S.readyException=function(t){e.setTimeout(function(){throw t})};var ue=S.Deferred();S.fn.ready=function(e){return ue.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(e!==!0&&--S.readyWait>0)&&ue.resolveWith(g,[S]))}}),S.ready.then=ue.then;function de(){g.removeEventListener(`DOMContentLoaded`,de),e.removeEventListener(`load`,de),S.ready()}g.readyState===`complete`||g.readyState!==`loading`&&!g.documentElement.doScroll?e.setTimeout(S.ready):(g.addEventListener(`DOMContentLoaded`,de),e.addEventListener(`load`,de));var fe=function(e,t,n,r,i,a,o){var s=0,c=e.length,l=n==null;if(y(n)===`object`)for(s in i=!0,n)fe(e,t,s,n[s],!0,a,o);else if(r!==void 0&&(i=!0,m(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<c;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):c?t(e[0],n):a},V=/^-ms-/,pe=/-([a-z])/g;function me(e,t){return t.toUpperCase()}function he(e){return e.replace(V,`ms-`).replace(pe,me)}var ge=function(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType};function _e(){this.expando=S.expando+ _e.uid++}_e.uid=1,_e.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ge(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if(typeof t==`string`)i[he(t)]=n;else for(r in t)i[he(r)]=t[r];return i},get:function(e,t){return t===void 0?this.cache(e):e[this.expando]&&e[this.expando][he(t)]},access:function(e,t,n){return t===void 0||t&&typeof t==`string`&&n===void 0?this.get(e,t):(this.set(e,t,n),n===void 0?t:n)},remove:function(e,t){var n,r=e[this.expando];if(r!==void 0){if(t!==void 0)for(Array.isArray(t)?t=t.map(he):(t=he(t),t=(t in r)?[t]:t.match(z)||[]),n=t.length;n--;)delete r[t[n]];(t===void 0||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return t!==void 0&&!S.isEmptyObject(t)}};var H=new _e,ve=new _e,ye=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,be=/[A-Z]/g;function xe(e){return e===`true`?!0:e===`false`?!1:e===`null`?null:e===+e+``?+e:ye.test(e)?JSON.parse(e):e}function Se(e,t,n){var r;if(n===void 0&&e.nodeType===1)if(r=`data-`+t.replace(be,`-$&`).toLowerCase(),n=e.getAttribute(r),typeof n==`string`){try{n=xe(n)}catch{}ve.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return ve.hasData(e)||H.hasData(e)},data:function(e,t,n){return ve.access(e,t,n)},removeData:function(e,t){ve.remove(e,t)},_data:function(e,t,n){return H.access(e,t,n)},_removeData:function(e,t){H.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,r,i,a=this[0],o=a&&a.attributes;if(e===void 0){if(this.length&&(i=ve.get(a),a.nodeType===1&&!H.get(a,`hasDataAttrs`))){for(n=o.length;n--;)o[n]&&(r=o[n].name,r.indexOf(`data-`)===0&&(r=he(r.slice(5)),Se(a,r,i[r])));H.set(a,`hasDataAttrs`,!0)}return i}return typeof e==`object`?this.each(function(){ve.set(this,e)}):fe(this,function(t){var n;if(a&&t===void 0)return n=ve.get(a,e),n!==void 0||(n=Se(a,e),n!==void 0)?n:void 0;this.each(function(){ve.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ve.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||`fx`)+`queue`,r=H.get(e,t),n&&(!r||Array.isArray(n)?r=H.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t||=`fx`;var n=S.queue(e,t),r=n.length,i=n.shift(),a=S._queueHooks(e,t);i===`inprogress`&&(i=n.shift(),r--),i&&(t===`fx`&&n.unshift(`inprogress`),delete a.stop,i.call(e,function(){S.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+`queueHooks`;return H.get(e,n)||H.access(e,n,{empty:S.Callbacks(`once memory`).add(function(){H.remove(e,[t+`queue`,n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return typeof e!=`string`&&(t=e,e=`fx`,n--),arguments.length<n?S.queue(this[0],e):t===void 0?this:this.each(function(){var n=S.queue(this,e,t);S._queueHooks(this,e),e===`fx`&&n[0]!==`inprogress`&&S.dequeue(this,e)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||`fx`,[])},promise:function(e,t){var n,r=1,i=S.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for(typeof e!=`string`&&(t=e,e=void 0),e||=`fx`;o--;)n=H.get(a[o],e+`queueHooks`),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ce=`[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)`,we=RegExp(`^(?:([+-])=|)(`+Ce+`)([a-z%]*)$`,`i`),Te=[`Top`,`Right`,`Bottom`,`Left`],Ee=g.documentElement,De=function(e){return S.contains(e.ownerDocument,e)},Oe={composed:!0};Ee.getRootNode&&(De=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(Oe)===e.ownerDocument});var ke=function(e,t){return e=t||e,e.style.display===`none`||e.style.display===``&&De(e)&&S.css(e,`display`)===`none`};function Ae(e,t,n,r){var i,a,o=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,``)},c=s(),l=n&&n[3]||(S.cssNumber[t]?``:`px`),u=e.nodeType&&(S.cssNumber[t]||l!==`px`&&+c)&&we.exec(S.css(e,t));if(u&&u[3]!==l){for(c/=2,l||=u[3],u=+c||1;o--;)S.style(e,t,u+l),(1-a)*(1-(a=s()/c||.5))<=0&&(o=0),u/=a;u*=2,S.style(e,t,u+l),n||=[]}return n&&(u=+u||+c||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=i)),i}var je={};function Me(e){var t,n=e.ownerDocument,r=e.nodeName,i=je[r];return i||(t=n.body.appendChild(n.createElement(r)),i=S.css(t,`display`),t.parentNode.removeChild(t),i===`none`&&(i=`block`),je[r]=i,i)}function Ne(e,t){for(var n,r,i=[],a=0,o=e.length;a<o;a++)r=e[a],r.style&&(n=r.style.display,t?(n===`none`&&(i[a]=H.get(r,`display`)||null,i[a]||(r.style.display=``)),r.style.display===``&&ke(r)&&(i[a]=Me(r))):n!==`none`&&(i[a]=`none`,H.set(r,`display`,n)));for(a=0;a<o;a++)i[a]!=null&&(e[a].style.display=i[a]);return e}S.fn.extend({show:function(){return Ne(this,!0)},hide:function(){return Ne(this)},toggle:function(e){return typeof e==`boolean`?e?this.show():this.hide():this.each(function(){ke(this)?S(this).show():S(this).hide()})}});var Pe=/^(?:checkbox|radio)$/i,Fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ie=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=g.createDocumentFragment().appendChild(g.createElement(`div`)),t=g.createElement(`input`);t.setAttribute(`type`,`radio`),t.setAttribute(`checked`,`checked`),t.setAttribute(`name`,`t`),e.appendChild(t),p.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML=`<textarea>x</textarea>`,p.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,e.innerHTML=`<option></option>`,p.option=!!e.lastChild})();var Le={thead:[1,`<table>`,`</table>`],col:[2,`<table><colgroup>`,`</colgroup></table>`],tr:[2,`<table><tbody>`,`</tbody></table>`],td:[3,`<table><tbody><tr>`,`</tr></tbody></table>`],_default:[0,``,``]};Le.tbody=Le.tfoot=Le.colgroup=Le.caption=Le.thead,Le.th=Le.td,p.option||(Le.optgroup=Le.option=[1,`<select multiple='multiple'>`,`</select>`]);function Re(e,t){var n=e.getElementsByTagName===void 0?e.querySelectorAll===void 0?[]:e.querySelectorAll(t||`*`):e.getElementsByTagName(t||`*`);return t===void 0||t&&w(e,t)?S.merge([e],n):n}function ze(e,t){for(var n=0,r=e.length;n<r;n++)H.set(e[n],`globalEval`,!t||H.get(t[n],`globalEval`))}var Be=/<|&#?\w+;/;function Ve(e,t,n,r,i){for(var a,o,s,c,l,u,d=t.createDocumentFragment(),f=[],p=0,m=e.length;p<m;p++)if(a=e[p],a||a===0)if(y(a)===`object`)S.merge(f,a.nodeType?[a]:a);else if(!Be.test(a))f.push(t.createTextNode(a));else{for(o||=d.appendChild(t.createElement(`div`)),s=(Fe.exec(a)||[``,``])[1].toLowerCase(),c=Le[s]||Le._default,o.innerHTML=c[1]+S.htmlPrefilter(a)+c[2],u=c[0];u--;)o=o.lastChild;S.merge(f,o.childNodes),o=d.firstChild,o.textContent=``}for(d.textContent=``,p=0;a=f[p++];){if(r&&S.inArray(a,r)>-1){i&&i.push(a);continue}if(l=De(a),o=Re(d.appendChild(a),`script`),l&&ze(o),n)for(u=0;a=o[u++];)Ie.test(a.type||``)&&n.push(a)}return d}var He=/^([^.]*)(?:\.(.+)|)/;function Ue(){return!0}function We(){return!1}function Ge(e,t,n,r,i,a){var o,s;if(typeof t==`object`){for(s in typeof n!=`string`&&(r||=n,n=void 0),t)Ge(e,s,n,r,t[s],a);return e}if(r==null&&i==null?(i=n,r=n=void 0):i??(typeof n==`string`?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=We;else if(!i)return e;return a===1&&(o=i,i=function(e){return S().off(e),o.apply(this,arguments)},i.guid=o.guid||=S.guid++),e.each(function(){S.event.add(this,t,i,r,n)})}S.event={global:{},add:function(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g=H.get(e);if(ge(e))for(n.handler&&(a=n,n=a.handler,i=a.selector),i&&S.find.matchesSelector(Ee,i),n.guid||=S.guid++,(c=g.events)||(c=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return S!==void 0&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),t=(t||``).match(z)||[``],l=t.length;l--;)s=He.exec(t[l])||[],p=h=s[1],m=(s[2]||``).split(`.`).sort(),p&&(d=S.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},u=S.extend({type:p,origType:h,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:m.join(`.`)},a),(f=c[p])||(f=c[p]=[],f.delegateCount=0,(!d.setup||d.setup.call(e,r,m,o)===!1)&&e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,u):f.push(u),S.event.global[p]=!0)},remove:function(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g=H.hasData(e)&&H.get(e);if(!(!g||!(c=g.events))){for(t=(t||``).match(z)||[``],l=t.length;l--;){if(s=He.exec(t[l])||[],p=h=s[1],m=(s[2]||``).split(`.`).sort(),!p){for(p in c)S.event.remove(e,p+t[l],n,r,!0);continue}for(d=S.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&RegExp(`(^|\\.)`+m.join(`\\.(?:.*\\.|)`)+`(\\.|$)`),o=a=f.length;a--;)u=f[a],(i||h===u.origType)&&(!n||n.guid===u.guid)&&(!s||s.test(u.namespace))&&(!r||r===u.selector||r===`**`&&u.selector)&&(f.splice(a,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));o&&!f.length&&((!d.teardown||d.teardown.call(e,m,g.handle)===!1)&&S.removeEvent(e,p,g.handle),delete c[p])}S.isEmptyObject(c)&&H.remove(e,`handle events`)}},dispatch:function(e){var t,n,r,i,a,o,s=Array(arguments.length),c=S.event.fix(e),l=(H.get(this,`events`)||Object.create(null))[c.type]||[],u=S.event.special[c.type]||{};for(s[0]=c,t=1;t<arguments.length;t++)s[t]=arguments[t];if(c.delegateTarget=this,!(u.preDispatch&&u.preDispatch.call(this,c)===!1)){for(o=S.event.handlers.call(this,c,l),t=0;(i=o[t++])&&!c.isPropagationStopped();)for(c.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!c.isImmediatePropagationStopped();)(!c.rnamespace||a.namespace===!1||c.rnamespace.test(a.namespace))&&(c.handleObj=a,c.data=a.data,r=((S.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s),r!==void 0&&(c.result=r)===!1&&(c.preventDefault(),c.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,c),c.result}},handlers:function(e,t){var n,r,i,a,o,s=[],c=t.delegateCount,l=e.target;if(c&&l.nodeType&&!(e.type===`click`&&e.button>=1)){for(;l!==this;l=l.parentNode||this)if(l.nodeType===1&&!(e.type===`click`&&l.disabled===!0)){for(a=[],o={},n=0;n<c;n++)r=t[n],i=r.selector+` `,o[i]===void 0&&(o[i]=r.needsContext?S(i,this).index(l)>-1:S.find(i,this,null,[l]).length),o[i]&&a.push(r);a.length&&s.push({elem:l,handlers:a})}}return l=this,c<t.length&&s.push({elem:l,handlers:t.slice(c)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Pe.test(t.type)&&t.click&&w(t,`input`)&&Ke(t,`click`,!0),!1},trigger:function(e){var t=this||e;return Pe.test(t.type)&&t.click&&w(t,`input`)&&Ke(t,`click`),!0},_default:function(e){var t=e.target;return Pe.test(t.type)&&t.click&&w(t,`input`)&&H.get(t,`click`)||w(t,`a`)}},beforeunload:{postDispatch:function(e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}};function Ke(e,t,n){if(!n){H.get(e,t)===void 0&&S.event.add(e,t,Ue);return}H.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,r=H.get(this,t);if(e.isTrigger&1&&this[t]){if(r)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),H.set(this,t,r),this[t](),n=H.get(this,t),H.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(H.set(this,t,S.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ue)}})}S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===void 0&&e.returnValue===!1?Ue:We,this.target=e.target&&e.target.nodeType===3?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:We,isPropagationStopped:We,isImmediatePropagationStopped:We,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ue,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ue,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ue,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:`focusin`,blur:`focusout`},function(e,t){function n(e){if(g.documentMode){var n=H.get(this,`handle`),r=S.event.fix(e);r.type=e.type===`focusin`?`focus`:`blur`,r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else S.event.simulate(t,e.target,S.event.fix(e))}S.event.special[e]={setup:function(){var r;if(Ke(this,e,!0),g.documentMode)r=H.get(this,t),r||this.addEventListener(t,n),H.set(this,t,(r||0)+1);else return!1},trigger:function(){return Ke(this,e),!0},teardown:function(){var e;if(g.documentMode)e=H.get(this,t)-1,e?H.set(this,t,e):(this.removeEventListener(t,n),H.remove(this,t));else return!1},_default:function(t){return H.get(t.target,e)},delegateType:t},S.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,a=H.get(i,t);a||(g.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),H.set(i,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,a=H.get(i,t)-1;a?H.set(i,t,a):(g.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),H.remove(i,t))}}}),S.each({mouseenter:`mouseover`,mouseleave:`mouseout`,pointerenter:`pointerover`,pointerleave:`pointerout`},function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,a=e.handleObj;return(!i||i!==r&&!S.contains(r,i))&&(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),S.fn.extend({on:function(e,t,n,r){return Ge(this,e,t,n,r)},one:function(e,t,n,r){return Ge(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+`.`+r.namespace:r.origType,r.selector,r.handler),this;if(typeof e==`object`){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||typeof t==`function`)&&(n=t,t=void 0),n===!1&&(n=We),this.each(function(){S.event.remove(this,e,n,t)})}});var qe=/<script|<style|<link/i,Je=/checked\s*(?:[^=]|=\s*.checked.)/i,Ye=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Xe(e,t){return w(e,`table`)&&w(t.nodeType===11?t.firstChild:t,`tr`)&&S(e).children(`tbody`)[0]||e}function Ze(e){return e.type=(e.getAttribute(`type`)!==null)+`/`+e.type,e}function Qe(e){return(e.type||``).slice(0,5)===`true/`?e.type=e.type.slice(5):e.removeAttribute(`type`),e}function $e(e,t){var n,r,i,a,o,s,c;if(t.nodeType===1){if(H.hasData(e)&&(a=H.get(e),c=a.events,c))for(i in H.remove(t,`handle events`),c)for(n=0,r=c[i].length;n<r;n++)S.event.add(t,i,c[i][n]);ve.hasData(e)&&(o=ve.access(e),s=S.extend({},o),ve.set(t,s))}}function et(e,t){var n=t.nodeName.toLowerCase();n===`input`&&Pe.test(e.type)?t.checked=e.checked:(n===`input`||n===`textarea`)&&(t.defaultValue=e.defaultValue)}function tt(e,t,n,r){t=a(t);var i,o,s,c,l,u,d=0,f=e.length,h=f-1,g=t[0],_=m(g);if(_||f>1&&typeof g==`string`&&!p.checkClone&&Je.test(g))return e.each(function(i){var a=e.eq(i);_&&(t[0]=g.call(this,i,a.html())),tt(a,t,n,r)});if(f&&(i=Ve(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,i.childNodes.length===1&&(i=o),o||r)){for(s=S.map(Re(i,`script`),Ze),c=s.length;d<f;d++)l=i,d!==h&&(l=S.clone(l,!0,!0),c&&S.merge(s,Re(l,`script`))),n.call(e[d],l,d);if(c)for(u=s[s.length-1].ownerDocument,S.map(s,Qe),d=0;d<c;d++)l=s[d],Ie.test(l.type||``)&&!H.access(l,`globalEval`)&&S.contains(u,l)&&(l.src&&(l.type||``).toLowerCase()!==`module`?S._evalUrl&&!l.noModule&&S._evalUrl(l.src,{nonce:l.nonce||l.getAttribute(`nonce`)},u):v(l.textContent.replace(Ye,``),l,u))}return e}function nt(e,t,n){for(var r,i=t?S.filter(t,e):e,a=0;(r=i[a])!=null;a++)!n&&r.nodeType===1&&S.cleanData(Re(r)),r.parentNode&&(n&&De(r)&&ze(Re(r,`script`)),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,a,o,s=e.cloneNode(!0),c=De(e);if(!p.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!S.isXMLDoc(e))for(o=Re(s),a=Re(e),r=0,i=a.length;r<i;r++)et(a[r],o[r]);if(t)if(n)for(a||=Re(e),o||=Re(s),r=0,i=a.length;r<i;r++)$e(a[r],o[r]);else $e(e,s);return o=Re(s,`script`),o.length>0&&ze(o,!c&&Re(e,`script`)),s},cleanData:function(e){for(var t,n,r,i=S.event.special,a=0;(n=e[a])!==void 0;a++)if(ge(n)){if(t=n[H.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[H.expando]=void 0}n[ve.expando]&&(n[ve.expando]=void 0)}}}),S.fn.extend({detach:function(e){return nt(this,e,!0)},remove:function(e){return nt(this,e)},text:function(e){return fe(this,function(e){return e===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return tt(this,arguments,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&Xe(this,e).appendChild(e)})},prepend:function(){return tt(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Xe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return tt(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return tt(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;(e=this[t])!=null;t++)e.nodeType===1&&(S.cleanData(Re(e,!1)),e.textContent=``);return this},clone:function(e,t){return e??=!1,t??=e,this.map(function(){return S.clone(this,e,t)})},html:function(e){return fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===void 0&&t.nodeType===1)return t.innerHTML;if(typeof e==`string`&&!qe.test(e)&&!Le[(Fe.exec(e)||[``,``])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},t.nodeType===1&&(S.cleanData(Re(t,!1)),t.innerHTML=e);t=0}catch{}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return tt(this,arguments,function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(Re(this)),n&&n.replaceChild(t,this))},e)}}),S.each({appendTo:`append`,prependTo:`prepend`,insertBefore:`before`,insertAfter:`after`,replaceAll:`replaceWith`},function(e,t){S.fn[e]=function(e){for(var n,r=[],i=S(e),a=i.length-1,s=0;s<=a;s++)n=s===a?this:this.clone(!0),S(i[s])[t](n),o.apply(r,n.get());return this.pushStack(r)}});var rt=RegExp(`^(`+Ce+`)(?!px)[a-z%]+$`,`i`),it=/^--/,at=function(t){var n=t.ownerDocument.defaultView;return(!n||!n.opener)&&(n=e),n.getComputedStyle(t)},ot=function(e,t,n){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=a[i];return r},st=new RegExp(Te.join(`|`),`i`);(function(){function t(){if(u){l.style.cssText=`position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0`,u.style.cssText=`position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%`,Ee.appendChild(l).appendChild(u);var t=e.getComputedStyle(u);r=t.top!==`1%`,c=n(t.marginLeft)===12,u.style.right=`60%`,o=n(t.right)===36,i=n(t.width)===36,u.style.position=`absolute`,a=n(u.offsetWidth/3)===12,Ee.removeChild(l),u=null}}function n(e){return Math.round(parseFloat(e))}var r,i,a,o,s,c,l=g.createElement(`div`),u=g.createElement(`div`);u.style&&(u.style.backgroundClip=`content-box`,u.cloneNode(!0).style.backgroundClip=``,p.clearCloneStyle=u.style.backgroundClip===`content-box`,S.extend(p,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),c},scrollboxSize:function(){return t(),a},reliableTrDimensions:function(){var t,n,r,i;return s??(t=g.createElement(`table`),n=g.createElement(`tr`),r=g.createElement(`div`),t.style.cssText=`position:absolute;left:-11111px;border-collapse:separate`,n.style.cssText=`box-sizing:content-box;border:1px solid`,n.style.height=`1px`,r.style.height=`9px`,r.style.display=`block`,Ee.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,Ee.removeChild(t)),s}}))})();function ct(e,t,n){var r,i,a,o,s=it.test(t),c=e.style;return n||=at(e),n&&(o=n.getPropertyValue(t)||n[t],s&&o&&(o=o.replace(k,`$1`)||void 0),o===``&&!De(e)&&(o=S.style(e,t)),!p.pixelBoxStyles()&&rt.test(o)&&st.test(t)&&(r=c.width,i=c.minWidth,a=c.maxWidth,c.minWidth=c.maxWidth=c.width=o,o=n.width,c.width=r,c.minWidth=i,c.maxWidth=a)),o===void 0?o:o+``}function lt(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}var ut=[`Webkit`,`Moz`,`ms`],dt=g.createElement(`div`).style,ft={};function pt(e){for(var t=e[0].toUpperCase()+e.slice(1),n=ut.length;n--;)if(e=ut[n]+t,e in dt)return e}function mt(e){return S.cssProps[e]||ft[e]||(e in dt?e:ft[e]=pt(e)||e)}var ht=/^(none|table(?!-c[ea]).+)/,gt={position:`absolute`,visibility:`hidden`,display:`block`},_t={letterSpacing:`0`,fontWeight:`400`};function vt(e,t,n){var r=we.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||`px`):t}function yt(e,t,n,r,i,a){var o=+(t===`width`),s=0,c=0,l=0;if(n===(r?`border`:`content`))return 0;for(;o<4;o+=2)n===`margin`&&(l+=S.css(e,n+Te[o],!0,i)),r?(n===`content`&&(c-=S.css(e,`padding`+Te[o],!0,i)),n!==`margin`&&(c-=S.css(e,`border`+Te[o]+`Width`,!0,i))):(c+=S.css(e,`padding`+Te[o],!0,i),n===`padding`?s+=S.css(e,`border`+Te[o]+`Width`,!0,i):c+=S.css(e,`border`+Te[o]+`Width`,!0,i));return!r&&a>=0&&(c+=Math.max(0,Math.ceil(e[`offset`+t[0].toUpperCase()+t.slice(1)]-a-c-s-.5))||0),c+l}function bt(e,t,n){var r=at(e),i=(!p.boxSizingReliable()||n)&&S.css(e,`boxSizing`,!1,r)===`border-box`,a=i,o=ct(e,t,r),s=`offset`+t[0].toUpperCase()+t.slice(1);if(rt.test(o)){if(!n)return o;o=`auto`}return(!p.boxSizingReliable()&&i||!p.reliableTrDimensions()&&w(e,`tr`)||o===`auto`||!parseFloat(o)&&S.css(e,`display`,!1,r)===`inline`)&&e.getClientRects().length&&(i=S.css(e,`boxSizing`,!1,r)===`border-box`,a=s in e,a&&(o=e[s])),o=parseFloat(o)||0,o+yt(e,t,n||(i?`border`:`content`),a,r,o)+`px`}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ct(e,`opacity`);return n===``?`1`:n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(!(!e||e.nodeType===3||e.nodeType===8||!e.style)){var i,a,o,s=he(t),c=it.test(t),l=e.style;if(c||(t=mt(s)),o=S.cssHooks[t]||S.cssHooks[s],n!==void 0){if(a=typeof n,a===`string`&&(i=we.exec(n))&&i[1]&&(n=Ae(e,t,i),a=`number`),n==null||n!==n)return;a===`number`&&!c&&(n+=i&&i[3]||(S.cssNumber[s]?``:`px`)),!p.clearCloneStyle&&n===``&&t.indexOf(`background`)===0&&(l[t]=`inherit`),(!o||!(`set`in o)||(n=o.set(e,n,r))!==void 0)&&(c?l.setProperty(t,n):l[t]=n)}else return o&&`get`in o&&(i=o.get(e,!1,r))!==void 0?i:l[t]}},css:function(e,t,n,r){var i,a,o,s=he(t);return it.test(t)||(t=mt(s)),o=S.cssHooks[t]||S.cssHooks[s],o&&`get`in o&&(i=o.get(e,!0,n)),i===void 0&&(i=ct(e,t,r)),i===`normal`&&t in _t&&(i=_t[t]),n===``||n?(a=parseFloat(i),n===!0||isFinite(a)?a||0:i):i}}),S.each([`height`,`width`],function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return ht.test(S.css(e,`display`))&&(!e.getClientRects().length||!e.getBoundingClientRect().width)?ot(e,gt,function(){return bt(e,t,r)}):bt(e,t,r)},set:function(e,n,r){var i,a=at(e),o=!p.scrollboxSize()&&a.position===`absolute`,s=(o||r)&&S.css(e,`boxSizing`,!1,a)===`border-box`,c=r?yt(e,t,r,s,a):0;return s&&o&&(c-=Math.ceil(e[`offset`+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-yt(e,t,`border`,!1,a)-.5)),c&&(i=we.exec(n))&&(i[3]||`px`)!==`px`&&(e.style[t]=n,n=S.css(e,t)),vt(e,n,c)}}}),S.cssHooks.marginLeft=lt(p.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ct(e,`marginLeft`))||e.getBoundingClientRect().left-ot(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+`px`}),S.each({margin:``,padding:``,border:`Width`},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a=typeof n==`string`?n.split(` `):[n];r<4;r++)i[e+Te[r]+t]=a[r]||a[r-2]||a[0];return i}},e!==`margin`&&(S.cssHooks[e+t].set=vt)}),S.fn.extend({css:function(e,t){return fe(this,function(e,t,n){var r,i,a={},o=0;if(Array.isArray(t)){for(r=at(e),i=t.length;o<i;o++)a[t[o]]=S.css(e,t[o],!1,r);return a}return n===void 0?S.css(e,t):S.style(e,t,n)},e,t,arguments.length>1)}});function xt(e,t,n,r,i){return new xt.prototype.init(e,t,n,r,i)}S.Tween=xt,xt.prototype={constructor:xt,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(S.cssNumber[n]?``:`px`)},cur:function(){var e=xt.propHooks[this.prop];return e&&e.get?e.get(this):xt.propHooks._default.get(this)},run:function(e){var t,n=xt.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):xt.propHooks._default.set(this),this}},xt.prototype.init.prototype=xt.prototype,xt.propHooks={_default:{get:function(e){var t;return e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null?e.elem[e.prop]:(t=S.css(e.elem,e.prop,``),!t||t===`auto`?0:t)},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):e.elem.nodeType===1&&(S.cssHooks[e.prop]||e.elem.style[mt(e.prop)]!=null)?S.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},xt.propHooks.scrollTop=xt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:`swing`},S.fx=xt.prototype.init,S.fx.step={};var St,Ct,wt=/^(?:toggle|show|hide)$/,Tt=/queueHooks$/;function Et(){Ct&&(g.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(Et):e.setTimeout(Et,S.fx.interval),S.fx.tick())}function Dt(){return e.setTimeout(function(){St=void 0}),St=Date.now()}function Ot(e,t){var n,r=0,i={height:e};for(t=+!!t;r<4;r+=2-t)n=Te[r],i[`margin`+n]=i[`padding`+n]=e;return t&&(i.opacity=i.width=e),i}function kt(e,t,n){for(var r,i=(Mt.tweeners[t]||[]).concat(Mt.tweeners[`*`]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function At(e,t,n){var r,i,a,o,s,c,l,u,d=`width`in t||`height`in t,f=this,p={},m=e.style,h=e.nodeType&&ke(e),g=H.get(e,`fxshow`);for(r in n.queue||(o=S._queueHooks(e,`fx`),o.unqueued??(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,S.queue(e,`fx`).length||o.empty.fire()})})),t)if(i=t[r],wt.test(i)){if(delete t[r],a||=i===`toggle`,i===(h?`hide`:`show`))if(i===`show`&&g&&g[r]!==void 0)h=!0;else continue;p[r]=g&&g[r]||S.style(e,r)}if(c=!S.isEmptyObject(t),!(!c&&S.isEmptyObject(p)))for(r in d&&e.nodeType===1&&(n.overflow=[m.overflow,m.overflowX,m.overflowY],l=g&&g.display,l??=H.get(e,`display`),u=S.css(e,`display`),u===`none`&&(l?u=l:(Ne([e],!0),l=e.style.display||l,u=S.css(e,`display`),Ne([e]))),(u===`inline`||u===`inline-block`&&l!=null)&&S.css(e,`float`)===`none`&&(c||(f.done(function(){m.display=l}),l??=(u=m.display,u===`none`?``:u)),m.display=`inline-block`)),n.overflow&&(m.overflow=`hidden`,f.always(function(){m.overflow=n.overflow[0],m.overflowX=n.overflow[1],m.overflowY=n.overflow[2]})),c=!1,p)c||(g?`hidden`in g&&(h=g.hidden):g=H.access(e,`fxshow`,{display:l}),a&&(g.hidden=!h),h&&Ne([e],!0),f.done(function(){for(r in h||Ne([e]),H.remove(e,`fxshow`),p)S.style(e,r,p[r])})),c=kt(h?g[r]:0,r,f),r in g||(g[r]=c.start,h&&(c.end=c.start,c.start=0))}function jt(e,t){var n,r,i,a,o;for(n in e)if(r=he(n),i=t[r],a=e[n],Array.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),o=S.cssHooks[r],o&&`expand`in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}function Mt(e,t,n){var r,i,a=0,o=Mt.prefilters.length,s=S.Deferred().always(function(){delete c.elem}),c=function(){if(i)return!1;for(var t=St||Dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),a=0,o=l.tweens.length;a<o;a++)l.tweens[a].run(r);return s.notifyWith(e,[l,r,n]),r<1&&o?n:(o||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:St||Dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=S.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),u=l.props;for(jt(u,l.opts.specialEasing);a<o;a++)if(r=Mt.prefilters[a].call(l,e,u,l.opts),r)return m(r.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return S.map(u,kt,l),m(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(Mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return Ae(n.elem,e,we.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=[`*`]):e=e.match(z);for(var n,r=0,i=e.length;r<i;r++)n=e[r],Mt.tweeners[n]=Mt.tweeners[n]||[],Mt.tweeners[n].unshift(t)},prefilters:[At],prefilter:function(e,t){t?Mt.prefilters.unshift(e):Mt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&typeof e==`object`?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:typeof r.duration!=`number`&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),(r.queue==null||r.queue===!0)&&(r.queue=`fx`),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ke).css(`opacity`,0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=S.isEmptyObject(e),a=S.speed(t,n,r),o=function(){var t=Mt(this,S.extend({},e),a);(i||H.get(this,`finish`))&&t.stop(!0)};return o.finish=o,i||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return typeof e!=`string`&&(n=t,t=e,e=void 0),t&&this.queue(e||`fx`,[]),this.each(function(){var t=!0,i=e!=null&&e+`queueHooks`,a=S.timers,o=H.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&Tt.test(i)&&r(o[i]);for(i=a.length;i--;)a[i].elem===this&&(e==null||a[i].queue===e)&&(a[i].anim.stop(n),t=!1,a.splice(i,1));(t||!n)&&S.dequeue(this,e)})},finish:function(e){return e!==!1&&(e||=`fx`),this.each(function(){var t,n=H.get(this),r=n[e+`queue`],i=n[e+`queueHooks`],a=S.timers,o=r?r.length:0;for(n.finish=!0,S.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),S.each([`toggle`,`show`,`hide`],function(e,t){var n=S.fn[t];S.fn[t]=function(e,r,i){return e==null||typeof e==`boolean`?n.apply(this,arguments):this.animate(Ot(t,!0),e,r,i)}}),S.each({slideDown:Ot(`show`),slideUp:Ot(`hide`),slideToggle:Ot(`toggle`),fadeIn:{opacity:`show`},fadeOut:{opacity:`hide`},fadeToggle:{opacity:`toggle`}},function(e,t){S.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(St=Date.now();t<n.length;t++)e=n[t],!e()&&n[t]===e&&n.splice(t--,1);n.length||S.fx.stop(),St=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){Ct||(Ct=!0,Et())},S.fx.stop=function(){Ct=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(t,n){return t=S.fx&&S.fx.speeds[t]||t,n||=`fx`,this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},(function(){var e=g.createElement(`input`),t=g.createElement(`select`).appendChild(g.createElement(`option`));e.type=`checkbox`,p.checkOn=e.value!==``,p.optSelected=t.selected,e=g.createElement(`input`),e.value=`t`,e.type=`radio`,p.radioValue=e.value===`t`})();var Nt,Pt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return fe(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(!(a===3||a===8||a===2)){if(e.getAttribute===void 0)return S.prop(e,t,n);if((a!==1||!S.isXMLDoc(e))&&(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?Nt:void 0)),n!==void 0){if(n===null){S.removeAttr(e,t);return}return i&&`set`in i&&(r=i.set(e,n,t))!==void 0?r:(e.setAttribute(t,n+``),n)}return i&&`get`in i&&(r=i.get(e,t))!==null?r:(r=S.find.attr(e,t),r??void 0)}},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&t===`radio`&&w(e,`input`)){var n=e.value;return e.setAttribute(`type`,t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(z);if(i&&e.nodeType===1)for(;n=i[r++];)e.removeAttribute(n)}}),Nt={set:function(e,t,n){return t===!1?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Pt[t]||S.find.attr;Pt[t]=function(e,t,r){var i,a,o=t.toLowerCase();return r||(a=Pt[o],Pt[o]=i,i=n(e,t,r)==null?null:o,Pt[o]=a),i}});var Ft=/^(?:input|select|textarea|button)$/i,It=/^(?:a|area)$/i;S.fn.extend({prop:function(e,t){return fe(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(!(a===3||a===8||a===2))return(a!==1||!S.isXMLDoc(e))&&(t=S.propFix[t]||t,i=S.propHooks[t]),n===void 0?i&&`get`in i&&(r=i.get(e,t))!==null?r:e[t]:i&&`set`in i&&(r=i.set(e,n,t))!==void 0?r:e[t]=n},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,`tabindex`);return t?parseInt(t,10):Ft.test(e.nodeName)||It.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:`htmlFor`,class:`className`}}),p.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each([`tabIndex`,`readOnly`,`maxLength`,`cellSpacing`,`cellPadding`,`rowSpan`,`colSpan`,`useMap`,`frameBorder`,`contentEditable`],function(){S.propFix[this.toLowerCase()]=this});function Lt(e){return(e.match(z)||[]).join(` `)}function Rt(e){return e.getAttribute&&e.getAttribute(`class`)||``}function zt(e){return Array.isArray(e)?e:typeof e==`string`&&e.match(z)||[]}S.fn.extend({addClass:function(e){var t,n,r,i,a,o;return m(e)?this.each(function(t){S(this).addClass(e.call(this,t,Rt(this)))}):(t=zt(e),t.length?this.each(function(){if(r=Rt(this),n=this.nodeType===1&&` `+Lt(r)+` `,n){for(a=0;a<t.length;a++)i=t[a],n.indexOf(` `+i+` `)<0&&(n+=i+` `);o=Lt(n),r!==o&&this.setAttribute(`class`,o)}}):this)},removeClass:function(e){var t,n,r,i,a,o;return m(e)?this.each(function(t){S(this).removeClass(e.call(this,t,Rt(this)))}):arguments.length?(t=zt(e),t.length?this.each(function(){if(r=Rt(this),n=this.nodeType===1&&` `+Lt(r)+` `,n){for(a=0;a<t.length;a++)for(i=t[a];n.indexOf(` `+i+` `)>-1;)n=n.replace(` `+i+` `,` `);o=Lt(n),r!==o&&this.setAttribute(`class`,o)}}):this):this.attr(`class`,``)},toggleClass:function(e,t){var n,r,i,a,o=typeof e,s=o===`string`||Array.isArray(e);return m(e)?this.each(function(n){S(this).toggleClass(e.call(this,n,Rt(this),t),t)}):typeof t==`boolean`&&s?t?this.addClass(e):this.removeClass(e):(n=zt(e),this.each(function(){if(s)for(a=S(this),i=0;i<n.length;i++)r=n[i],a.hasClass(r)?a.removeClass(r):a.addClass(r);else (e===void 0||o===`boolean`)&&(r=Rt(this),r&&H.set(this,`__className__`,r),this.setAttribute&&this.setAttribute(`class`,r||e===!1?``:H.get(this,`__className__`)||``))}))},hasClass:function(e){var t,n,r=0;for(t=` `+e+` `;n=this[r++];)if(n.nodeType===1&&(` `+Lt(Rt(n))+` `).indexOf(t)>-1)return!0;return!1}});var Bt=/\r/g;S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each(function(n){var i;this.nodeType===1&&(i=r?e.call(this,n,S(this).val()):e,i==null?i=``:typeof i==`number`?i+=``:Array.isArray(i)&&(i=S.map(i,function(e){return e==null?``:e+``})),t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!t||!(`set`in t)||t.set(this,i,`value`)===void 0)&&(this.value=i))})):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()],t&&`get`in t&&(n=t.get(i,`value`))!==void 0?n:(n=i.value,typeof n==`string`?n.replace(Bt,``):n??``)):void 0}}),S.extend({valHooks:{option:{get:function(e){return S.find.attr(e,`value`)??Lt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,o=e.type===`select-one`,s=o?null:[],c=o?a+1:i.length;for(r=a<0?c:o?a:0;r<c;r++)if(n=i[r],(n.selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!w(n.parentNode,`optgroup`))){if(t=S(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,a=S.makeArray(t),o=i.length;o--;)r=i[o],(r.selected=S.inArray(S.valHooks.option.get(r),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),S.each([`radio`,`checkbox`],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},p.checkOn||(S.valHooks[this].get=function(e){return e.getAttribute(`value`)===null?`on`:e.value})});var Vt=e.location,Ht={guid:Date.now()},Ut=/\?/;S.parseXML=function(t){var n,r;if(!t||typeof t!=`string`)return null;try{n=new e.DOMParser().parseFromString(t,`text/xml`)}catch{}return r=n&&n.getElementsByTagName(`parsererror`)[0],(!n||r)&&S.error(`Invalid XML: `+(r?S.map(r.childNodes,function(e){return e.textContent}).join(`
309
+ C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});vF.propTypes={fill:p.string.isRequired};var yF=class extends P.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(gF,{fill:t})]}),emoji:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),feedback:{check:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),emoji:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),square:{check:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(gF,{fill:t})]}),emoji:(0,U.jsxs)(rF,{children:[(0,U.jsx)(_F,{fill:n}),(0,U.jsx)(vF,{fill:t})]}),open:{check:(0,U.jsx)(rF,{children:(0,U.jsx)(gF,{fill:n})}),emoji:(0,U.jsx)(rF,{children:(0,U.jsx)(vF,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};yF.propTypes={iconSet:p.oneOf([`emoji`,`check`,void 0]),shape:p.oneOf([`square`,void 0]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string},yF.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var bF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,U.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,U.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});bF.propTypes={fill:p.string.isRequired};var xF=({fill:e})=>(0,U.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,U.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,U.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,U.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});xF.propTypes={fill:p.string.isRequired};var SF=lF(bF,xF);SF.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},SF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function CF(e){return typeof e==`string`}function wF(e){return e?.ref||null}var TF=e=>e.scrollTop;function EF(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function DF(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function OF(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function kF(e){return`scale(${e}, ${e**2})`}var AF={entering:{opacity:1,transform:kF(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:kF(.75)},exited:{opacity:0,transform:kF(.75)}},jF={opacity:0,transform:kF(.75),visibility:`hidden`},MF=P.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=WM(),_=P.useRef(),v=Ao(),y=P.useRef(null),b=rM(y,wF(i),t),x=EF(y,l),S=EF(y,(e,t)=>{TF(e);let{duration:n,delay:r,easing:i}=OF({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=EF(y,c),w=EF(y,f),T=EF(y,e=>{let{duration:t,delay:n,easing:r}=OF({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=kF(.75),u&&u(e)}),E=EF(y,e=>{e.style.transition=``,d&&d(e)});return(0,U.jsx)(DM,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=DF(e,o,AF,jF,p,i.props.style);return P.cloneElement(i,{style:r,ref:b,...n})}})});MF&&(MF.muiSupportAuto=!0);function NF(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function PF(e){let t=Gj(e);return t.body===e?qj(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function FF(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function IF(e){return parseFloat(qj(e).getComputedStyle(e).paddingRight)||0}function LF(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function RF(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!LF(e);t&&n&&FF(e,i)})}function zF(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function BF(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(PF(r)){let e=NF(qj(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${IF(r)+e}px`;let t=Gj(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${IF(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Gj(r).body;else{let t=r.parentElement,n=qj(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function VF(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var HF=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&FF(e.modalRef,!1);let r=VF(t);RF(t,e.mount,e.modalRef,r,!0);let i=zF(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=zF(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=BF(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=zF(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&FF(e.modalRef,t),RF(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&FF(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function UF(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var WF=UF;function GF(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var KF=GF,qF=`data-mui-focusable`;function JF(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${qF}]`):null}var YF=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function XF(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function ZF(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function QF(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||ZF(e))}function $F(e){let t=[],n=[];return Array.from(e.querySelectorAll(YF)).forEach((e,r)=>{let i=XF(e);i===-1||!QF(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function eI(){return!0}function tI(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=$F,isEnabled:o=eI,open:s}=e,c=P.useRef(!1),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=P.useRef(null),p=P.useRef(!1),m=P.useRef(null),h=nM(wF(t),m),g=P.useRef(null);P.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),P.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=KF(Gj(m.current)),t=JF(m.current)??m.current;return WF(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),P.useEffect(()=>{if(!s||!m.current)return;let e=Gj(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&KF(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=KF(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(WF(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=KF(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),P.cloneElement(t,{ref:h,onFocus:_}),(0,U.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function nI(e){return typeof e==`function`?e():e}var rI=P.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=P.useState(null),s=nM(P.isValidElement(n)?wF(n):null,t);if(ui(()=>{i||o(nI(r)||document.body)},[r,i]),ui(()=>{if(a&&!i)return Yj(t,a),()=>{Yj(t,null)}},[t,a,i]),i){if(P.isValidElement(n)){let e={ref:s};return P.cloneElement(n,e)}return n}return a&&db.createPortal(n,a)});function iI(e,t,n){return e===void 0||CF(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function aI(e,t,n){return typeof e==`function`?e(t,n):e}function oI(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function sI(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function cI(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=k(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=oI({...i,...r}),s=sI(r),c=sI(i),l=t(o),u=k(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function lI(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=aI(d[e],i),{props:{component:h,...g},internalRef:_}=cI({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=nM(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,iI(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var uI={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},dI={opacity:0,visibility:`hidden`},fI=P.forwardRef(function(e,t){let n=Ao(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=P.useRef(null),y=rM(v,wF(o),t),b=EF(v,d),x=EF(v,(e,t)=>{TF(e);let r=OF({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=EF(v,u),C=EF(v,m),w=EF(v,e=>{let t=OF({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=EF(v,e=>{e.style.transition=``,p&&p(e)});return(0,U.jsx)(DM,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=DF(e,c,uI,dI,h,o.props.style);return P.cloneElement(o,{style:r,ref:y,...n})}})});function pI(e){return Yr(`MuiBackdrop`,e)}Xr(`MuiBackdrop`,[`root`,`invisible`]);var mI=e=>{let{classes:t,invisible:n}=e;return A({root:[`root`,n&&`invisible`]},pI,t)},hI=G(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),gI=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=mI(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=lI(`root`,{elementType:hI,externalForwardedProps:_,className:k(g.root,i),ownerState:h}),[b,x]=lI(`transition`,{elementType:fI,externalForwardedProps:_,ownerState:h});return(0,U.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,U.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function _I(e){return typeof e==`function`?e():e}function vI(e){return e?e.props.hasOwnProperty(`in`):!1}var yI=()=>{},bI=new HF;function xI(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=P.useRef({}),f=P.useRef(null),p=P.useRef(null),m=nM(p,u),[h,g]=P.useState(!l),_=vI(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>Gj(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{bI.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=eM(()=>{let e=_I(t)||y().body;bI.add(b(),e),p.current&&x()}),C=()=>bI.isTopModal(b()),w=eM(e=>{f.current=e,e&&(l&&C()?x():p.current&&FF(p.current,v))}),T=P.useCallback(()=>{bI.remove(b(),v)},[v]);P.useEffect(()=>()=>{T()},[T]),P.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=oI(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:Ij(()=>{g(!1),a&&a()},s?.props.onEnter??yI),onExited:Ij(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??yI)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function SI(e){return Yr(`MuiModal`,e)}Xr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var CI=e=>{let{open:t,exited:n,classes:r}=e;return A({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},SI,r)},wI=G(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Io(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),TI=G(gI,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),EI=P.forwardRef(function(e,t){let n=Lo({name:`MuiModal`,props:e}),{BackdropComponent:r=TI,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,A={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:j,getBackdropProps:M,getTransitionProps:ee,portalRef:N,isTopModal:te,exited:F,hasTransition:I}=xI({...A,rootRef:t}),L={...A,exited:F},ne=CI(L),re={};if(c.props.tabIndex===void 0&&(re.tabIndex=`-1`),I){let{onEnter:e,onExited:t}=ee();re.onEnter=e,re.onExited=t}let ie={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[R,ae]=lI(`root`,{ref:t,elementType:wI,externalForwardedProps:{...ie,...O,component:u},getSlotProps:j,ownerState:L,className:k(o,ne?.root,!L.open&&L.exited&&ne?.hidden)}),[z,B]=lI(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>M({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:k(i?.className,ne?.backdrop),ownerState:L});return!b&&!w&&(!I||F)?null:(0,U.jsx)(rI,{ref:N,container:l,disablePortal:g,children:(0,U.jsxs)(R,{...ae,children:[!y&&r?(0,U.jsx)(z,{...B}):null,(0,U.jsx)(tI,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:te,open:w,children:P.cloneElement(c,re)})]})})});function DI(e){return Yr(`MuiPaper`,e)}Xr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var OI=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return A({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},DI,i)},kI=G(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Io(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),AI=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiPaper`}),r=Ao(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c};return(0,U.jsx)(kI,{as:a,ownerState:u,className:k(OI(u).root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${xi(`#fff`,lo(o))}, ${xi(`#fff`,lo(o))})`}},...l.style}})});function jI(e){return Yr(`MuiPopover`,e)}Xr(`MuiPopover`,[`root`,`paper`]);function MI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function NI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function PI(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function FI(e){return typeof e==`function`?e():e}var II=e=>{let{classes:t}=e;return A({root:[`root`],paper:[`paper`]},jI,t)},LI=G(EI,{name:`MuiPopover`,slot:`Root`})({}),RI=G(AI,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),zI=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=P.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=II(w),E=P.useCallback(()=>{if(s===`anchorPosition`)return o;let e=FI(i),t=(e&&e.nodeType===1?e:Kj(C.current).body).getBoundingClientRect();return{top:t.top+MI(t,a.vertical),left:t.left+NI(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=P.useCallback(e=>({vertical:MI(e,_.vertical),horizontal:NI(e,_.horizontal)}),[_.horizontal,_.vertical]),O=P.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:PI(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Jj(FI(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:PI(n)}},[i,s,E,D,f]),[A,j]=P.useState(p),M=P.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,j(!0)},[O]);P.useEffect(()=>(x&&window.addEventListener(`scroll`,M),()=>window.removeEventListener(`scroll`,M)),[i,x,M]);let ee=()=>{M()},N=()=>{j(!1)};P.useEffect(()=>{p&&M()}),P.useImperativeHandle(r,()=>p?{updatePosition:()=>{M()}}:null,[p,M]),P.useEffect(()=>{if(!p)return;let e=Uj(()=>{M()}),t=Jj(FI(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,M]);let te=y,F={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[I,L]=lI(`transition`,{elementType:MF,externalForwardedProps:F,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),ee()},onExited:t=>{e.onExited?.(t),N()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!I.muiSupportAuto&&(te=void 0);let ne=u||(i?Kj(FI(i)).body:void 0),[re,{slots:ie,slotProps:R,...ae}]=lI(`root`,{ref:t,elementType:LI,externalForwardedProps:{...F,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:aM(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:ne,open:p},ownerState:w,className:k(T.root,l)}),[z,B]=lI(`paper`,{ref:C,className:T.paper,elementType:RI,externalForwardedProps:F,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:A?void 0:{opacity:0}},ownerState:w});return(0,U.jsx)(re,{...ae,...!CF(re)&&{slots:ie,slotProps:R,disableScrollLock:x},children:(0,U.jsx)(I,{...L,timeout:te,children:(0,U.jsx)(z,{...B,children:c})})})}),BI={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},VI={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},HI=s({background:()=>pL,backgroundDark:()=>mL,black:()=>CL,blueGrey100:()=>AL,blueGrey300:()=>jL,blueGrey600:()=>ML,blueGrey900:()=>NL,border:()=>yL,borderDark:()=>xL,borderGray:()=>SL,borderLight:()=>bL,buttonBorder:()=>BL,buttonHoverBg:()=>VL,correct:()=>YI,correctSecondary:()=>XI,correctTertiary:()=>ZI,correctWithIcon:()=>QI,defaults:()=>UI,disabled:()=>qI,disabledSecondary:()=>JI,dropdownBackground:()=>gL,fadedPrimary:()=>cL,focusChecked:()=>EL,focusCheckedBorder:()=>DL,focusUnchecked:()=>OL,focusUncheckedBorder:()=>kL,incorrect:()=>$I,incorrectSecondary:()=>tL,incorrectWithIcon:()=>eL,keyBoardFocusIndicator:()=>zL,keypadButton:()=>PL,keypadButtonHover:()=>LL,keypadButtonOperator:()=>FL,keypadButtonOperatorHover:()=>RL,keypadEmptyPlaceholder:()=>IL,missing:()=>nL,missingWithIcon:()=>rL,primary:()=>iL,primaryDark:()=>oL,primaryLight:()=>aL,primaryText:()=>sL,secondary:()=>lL,secondaryBackground:()=>hL,secondaryDark:()=>dL,secondaryLight:()=>uL,secondaryText:()=>fL,tertiary:()=>_L,tertiaryLight:()=>vL,text:()=>KI,transparent:()=>TL,v:()=>WI,visualElementsColors:()=>HL,white:()=>wL}),UI={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:Ta[500],CORRECT_SECONDARY:Ta[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:Sa[500],INCORRECT_SECONDARY:xa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:xa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:VI[500],PRIMARY_LIGHT:VI[200],PRIMARY_DARK:VI[800],SECONDARY:BI.A400,SECONDARY_LIGHT:BI[200],SECONDARY_DARK:BI[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(UI);var WI=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},GI=WI(`pie`),KI=()=>GI(`text`,UI.TEXT),qI=()=>GI(`disabled`,UI.DISABLED),JI=()=>GI(`disabled-secondary`,UI.DISABLED_SECONDARY),YI=()=>GI(`correct`,UI.CORRECT),XI=()=>GI(`correct-secondary`,UI.CORRECT_SECONDARY),ZI=()=>GI(`correct-tertiary`,UI.CORRECT_TERTIARY),QI=()=>GI(`correct-icon`,UI.CORRECT_WITH_ICON),$I=()=>GI(`incorrect`,UI.INCORRECT),eL=()=>GI(`incorrect-icon`,UI.INCORRECT_WITH_ICON),tL=()=>GI(`incorrect-secondary`,UI.INCORRECT_SECONDARY),nL=()=>GI(`missing`,UI.MISSING),rL=()=>GI(`missing-icon`,UI.MISSING_WITH_ICON),iL=()=>GI(`primary`,UI.PRIMARY),aL=()=>GI(`primary-light`,UI.PRIMARY_LIGHT),oL=()=>GI(`primary-dark`,UI.PRIMARY_DARK),sL=()=>GI(`primary-text`,`text`,UI.TEXT),cL=()=>GI(`faded-primary`,UI.FADED_PRIMARY),lL=()=>GI(`secondary`,UI.SECONDARY),uL=()=>GI(`secondary-light`,UI.SECONDARY_LIGHT),dL=()=>GI(`secondary-dark`,UI.SECONDARY_DARK),fL=()=>GI(`secondary-text`,`text`,UI.TEXT),pL=()=>GI(`background`,UI.BACKGROUND),mL=()=>GI(`background-dark`,UI.BACKGROUND_DARK),hL=()=>GI(`secondary-background`,UI.SECONDARY_BACKGROUND),gL=()=>GI(`dropdown-background`,UI.DROPDOWN_BACKGROUND),_L=()=>GI(`tertiary`,UI.TERTIARY),vL=()=>GI(`tertiary-light`,UI.TERTIARY_LIGHT),yL=()=>GI(`border`,UI.BORDER),bL=()=>GI(`border-light`,UI.BORDER_LIGHT),xL=()=>GI(`border-dark`,UI.BORDER_DARK),SL=()=>GI(`border-gray`,UI.BORDER_GRAY),CL=()=>GI(`black`,UI.BLACK),wL=()=>GI(`white`,UI.WHITE),TL=()=>UI.TRANSPARENT,EL=()=>GI(`focus-checked`,UI.FOCUS_CHECKED),DL=()=>GI(`focus-checked-border`,UI.FOCUS_CHECKED_BORDER),OL=()=>GI(`focus-unchecked`,UI.FOCUS_UNCHECKED),kL=()=>GI(`focus-unchecked-border`,UI.FOCUS_UNCHECKED_BORDER),AL=()=>GI(`blue-grey-100`,UI.BLUE_GREY100),jL=()=>GI(`blue-grey-300`,UI.BLUE_GREY300),ML=()=>GI(`blue-grey-600`,UI.BLUE_GREY600),NL=()=>GI(`blue-grey-900`,UI.BLUE_GREY900),PL=()=>GI(`keypad-button`,UI.KEYPAD_BUTTON),FL=()=>GI(`keypad-button-operator`,UI.KEYPAD_BUTTON_OPERATOR),IL=()=>GI(`keypad-empty-placeholder`,UI.KEYPAD_EMPTY_PLACEHOLDER),LL=()=>GI(`keypad-button-hover`,UI.KEYPAD_BUTTON_HOVER),RL=()=>GI(`keypad-button-operator-hover`,UI.KEYPAD_BUTTON_OPERATOR_HOVER),zL=()=>GI(`keyboard-focus-indicator`,UI.KEY_BOARD_FOCUS_INDICATOR),BL=()=>GI(`button-border`,UI.BUTTON_BORDER),VL=()=>GI(`button-hover-bg`,UI.BUTTON_HOVER_BG),HL={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},UL=G(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),WL=G(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${qI()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${YI()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$I()})`}}),GL=G(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),KL=class extends P.Component{static propTypes={correctness:p.string,feedback:p.string};nodeRef=P.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,U.jsx)(jM,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,U.jsx)(GL,{ref:this.nodeRef,children:(0,U.jsx)(UL,{children:(0,U.jsx)(WL,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,U.jsx)(`div`,{children:(0,U.jsx)(BM,{children:this.renderFeedback()})})}},qL=s({Correct:()=>$L,Incorrect:()=>eR,NothingSubmitted:()=>nR,PartiallyCorrect:()=>tR}),JL=D(`pie-libs:render-ui:response-indicators`),YL=G(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),XL=G(zI)({cursor:`pointer`}),ZL=G(`div`)({padding:`0`,borderRadius:`4px`}),QL=(e,t)=>{class n extends P.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{JL(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,U.jsxs)(YL,{hasFeedback:!!n,children:[(0,U.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,U.jsx)(e,{})}),n&&(0,U.jsx)(XL,{PaperComponent:ZL,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,U.jsx)(KL,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:p.string},n},$L=QL(fF,`correct`),eR=QL(hF,`incorrect`),tR=QL(SF,`partially-correct`),nR=QL(yF,`nothing-submitted`);function rR(e){return Yr(`MuiCollapse`,e)}Xr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var iR=e=>{let{orientation:t,classes:n}=e;return A({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},rR,n)},aR=G(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Io(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),oR=G(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),sR=G(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),cR=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=Qa.standard,TransitionComponent:x=DM,...S}=n,C={...n,orientation:g,collapsedSize:o},w=iR(C),T=Ao(),E=WM(),D=P.useRef(null),O=P.useRef(),A=typeof o==`number`?`${o}px`:o,j=g===`horizontal`,M=j?`width`:`height`,ee=P.useRef(null),N=rM(t,ee),te=()=>D.current?D.current[j?`clientWidth`:`clientHeight`]:0,F=EF(ee,(e,t)=>{D.current&&j&&(D.current.style.position=`absolute`),e.style[M]=A,u&&u(e,t)}),I=EF(ee,(e,t)=>{let n=te();D.current&&j&&(D.current.style.position=``);let{duration:r,easing:i}=OF({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[M]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),L=EF(ee,(e,t)=>{e.style[M]=`auto`,d&&d(e,t)}),ne=EF(ee,e=>{e.style[M]=`${te()}px`,p&&p(e)}),re=EF(ee,m),ie=EF(ee,e=>{let t=te(),{duration:n,easing:r}=OF({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[M]=A,e.style.transitionTimingFunction=r,h&&h(e)}),R=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(ee.current,e)},ae={slots:_,slotProps:v,component:s},[z,B]=lI(`root`,{ref:N,className:k(w.root,a),elementType:aR,externalForwardedProps:ae,ownerState:C,additionalProps:{style:{[j?`minWidth`:`minHeight`]:A,...y}}}),[oe,se]=lI(`wrapper`,{ref:D,className:w.wrapper,elementType:oR,externalForwardedProps:ae,ownerState:C}),[ce,le]=lI(`wrapperInner`,{className:w.wrapperInner,elementType:sR,externalForwardedProps:ae,ownerState:C});return(0,U.jsx)(x,{in:l,onEnter:F,onEntered:L,onEntering:I,onExit:ne,onExited:re,onExiting:ie,addEndListener:R,nodeRef:ee,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,U.jsx)(z,{...B,className:k(B.className,{entered:w.entered,exited:!l&&A===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,U.jsx)(oe,{...se,ownerState:r,children:(0,U.jsx)(ce,{...le,ownerState:r,children:i})})})}})});cR&&(cR.muiSupportAuto=!0);var lR=`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,uR=null;function dR(e){return typeof window>`u`||window.MathJax?.typesetPromise?Promise.resolve():uR||(uR=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||lR,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),uR)}function fR(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function pR(e={}){return async t=>{if(await dR(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),fR()}}var mR=`@pie-lib/math-rendering`,hR=null;function gR(){return hR||=pR({accessibility:!0,useSingleDollar:!0}),hR}function _R(){if(typeof window>`u`)return null;let e=window[mR];return typeof e?.renderMath==`function`?e:null}var vR=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=_R();return r?await r.renderMath?.(n):await gR()(n),t?n.innerHTML:void 0},yR=e=>_R()?.wrapMath?.(e)??e,bR=G(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),xR=G(cR)(({theme:e})=>({paddingTop:e.spacing(2)})),SR=class extends P.Component{static propTypes={className:p.string,children:p.object,labels:p.shape({visible:p.string,hidden:p.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){vR(this.root)}componentDidUpdate(){vR(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,U.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,U.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,U.jsx)(bR,{children:r})}),(0,U.jsx)(xR,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function CR(e){return Yr(`MuiButton`,e)}var wR=Xr(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),TR=P.createContext({}),ER=P.createContext(void 0),DR=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=A({root:[`root`,o&&`loading`,a,`${a}${K(t)}`,`size${K(i)}`,`${a}Size${K(i)}`,`color${K(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${K(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${K(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${K(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},CR,c);return{...c,...l}},OR=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],kR=G(iN,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${K(n.color)}`],t[`size${K(n.size)}`],t[`${n.variant}Size${K(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Io(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${wR.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${wR.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${wR.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${wR.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${wR.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${wR.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${wR.loading}`]:{color:`transparent`}}}]}})),AR=G(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${K(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...OR]})),jR=G(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${K(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...OR]})),MR=G(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),NR=G(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),PR=P.forwardRef(function(e,t){let n=P.useContext(TR),r=P.useContext(ER),i=Lo({props:li(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=Zj(h),T=_??(0,U.jsx)(_N,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=DR(E),O=(b||g&&v===`start`)&&(0,U.jsx)(AR,{className:D.startIcon,ownerState:E,children:b||(0,U.jsx)(NR,{className:D.loadingIconPlaceholder,ownerState:E})}),A=(f||g&&v===`end`)&&(0,U.jsx)(jR,{className:D.endIcon,ownerState:E,children:f||(0,U.jsx)(NR,{className:D.loadingIconPlaceholder,ownerState:E})}),j=r||``,M=typeof g==`boolean`?(0,U.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,U.jsx)(MR,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:ee,...N}=D;return(0,U.jsxs)(kR,{ownerState:E,className:k(n.className,D.root,c,j),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:k(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:N,children:[O,v!==`end`&&M,a,v===`end`&&M,A]})}),FR=Vj((0,U.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),IR=Vj((0,U.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),LR=G(`div`)({display:`flex`,flexDirection:`column`}),RR=G(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),zR=G(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),BR=G(PR)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),VR=e=>{class t extends P.Component{static propTypes={session:p.object,onSessionChange:p.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,U.jsxs)(LR,{children:[(0,U.jsxs)(RR,{children:[(0,U.jsxs)(BR,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,U.jsx)(zR,{children:(0,U.jsx)(IR,{})}),`Undo`]}),(0,U.jsxs)(BR,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,U.jsx)(zR,{children:(0,U.jsx)(FR,{})}),`Start Over`]})]}),(0,U.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},HR=Do({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),UR=G(`div`)({"& table, th, td":{fontSize:`inherit`}}),WR=class extends P.Component{static propTypes={className:p.string,children:p.array,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,U.jsx)(Dr,{injectFirst:!0,children:(0,U.jsxs)(es,{theme:HR,children:[i?.rules?(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,U.jsx)(UR,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}},GR=G(WR)({display:`flex`,flexDirection:`column`,position:`relative`}),KR=class extends P.Component{static propTypes={ariaLabel:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,role:p.string,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,U.jsx)(GR,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},qR=class extends P.Component{static propTypes={tag:p.string,className:p.string,html:p.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,U.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function JR({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var YR=P.createContext(void 0);function XR(){return P.useContext(YR)}function ZR(e){return Yr(`MuiFormLabel`,e)}var QR=Xr(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),$R=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return A({root:[`root`,`color${K(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},ZR,t)},ez=G(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Io(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{[`&.${QR.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${QR.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${QR.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),tz=G(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Io(({theme:e})=>({[`&.${QR.error}`]:{color:(e.vars||e).palette.error.main}}))),nz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=JR({props:n,muiFormControl:XR(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=$R(m);return(0,U.jsxs)(ez,{as:o,ownerState:m,className:k(h.root,i),ref:t,...f,children:[r,p.required&&(0,U.jsxs)(tz,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function rz(e){return Yr(`MuiInputLabel`,e)}Xr(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var iz=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=A({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${K(r)}`,o],asterisk:[s&&`asterisk`]},rz,t);return{...t,...c}},az=G(nz,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${QR.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Io(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),oz=P.forwardRef(function(e,t){let n=Lo({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=XR(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=JR({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=iz(f);return(0,U.jsx)(az,{"data-shrink":u,ref:t,className:k(p.root,s),...c,ownerState:f,classes:p})});function sz(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function cz(e,t=!1){return e&&(sz(e.value)&&e.value!==``||t&&sz(e.defaultValue)&&e.defaultValue!==``)}function lz(e){return e.startAdornment}function uz(e){return Yr(`MuiFormControl`,e)}Xr(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var dz=e=>{let{classes:t,margin:n,fullWidth:r}=e;return A({root:[`root`,n!==`none`&&`margin${K(n)}`,r&&`fullWidth`]},uz,t)},fz=G(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${K(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),pz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=dz(_),[y,b]=P.useState(()=>{let e=!1;return r&&P.Children.forEach(r,t=>{if(!Wj(t,[`Input`,`Select`]))return;let n=Wj(t,[`Select`])?t.props.input:t;n&&lz(n.props)&&(e=!0)}),e}),[x,S]=P.useState(()=>{let e=!1;return r&&P.Children.forEach(r,t=>{Wj(t,[`Input`,`Select`])&&(cz(t.props,!0)||cz(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=P.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;P.useRef(!1);let E=P.useCallback(()=>{S(!0)},[]),D=P.useCallback(()=>{S(!1)},[]),O=P.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,U.jsx)(YR.Provider,{value:O,children:(0,U.jsx)(fz,{as:o,ownerState:_,className:k(v.root,i),ref:t,...g,children:r})})}),mz=G(pz)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),hz=G(oz)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),gz=({label:e,className:t,children:n})=>(0,U.jsxs)(mz,{className:t,children:[(0,U.jsx)(hz,{shrink:!0,children:e}),n]});gz.propTypes={label:p.oneOfType([p.string,p.object]).isRequired,className:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var _z=G(`div`)(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:`collapse`},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:`#f6f8fa`,color:e.palette.common.black},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:`#f6f8fa`,color:e.palette.common.black},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:KI()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${KI()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),vz=/\\embed\{newLine\}\[\]/g,yz=`\\newline `,bz=class extends P.Component{static propTypes={prompt:p.string,tagName:p.string,className:p.string,onClick:p.func,defaultClassName:p.string,autoplayAudioEnabled:p.bool,customAudioButton:p.shape({playImage:p.string,pauseImage:p.string})};static defaultProps={onClick:()=>{}};parsedText=e=>{let{customAudioButton:t}=this.props,n=document.createElement(`div`);n.innerHTML=e;let r=n.querySelector(`audio`);if(r){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,r.getAttribute(`src`)),r.removeAttribute(`src`),r.setAttribute(`id`,`pie-prompt-audio-player`),r.appendChild(e),t){r.style.display=`none`;let e=document.createElement(`div`);e.id=`play-audio-button`,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,backgroundImage:`url(${t.pauseImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),r.parentNode.insertBefore(e,r)}}return n.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById(`play-audio-button`),r=document.getElementById(`pie-prompt-audio-player`);if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener(`ended`,a)}).catch(e=>{console.error(`Error playing audio`,e)}),!n||!r||!t)return;let i=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},a=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};n.addEventListener(`click`,i),r.addEventListener(`play`,o),r.addEventListener(`pause`,s),r.addEventListener(`ended`,a),this._handlePlayClick=i,this._handleAudioPlay=o,this._handleAudioPause=s,this._handleAudioEnded=a}removeCustomAudioButtonListeners(){let e=document.getElementById(`play-audio-button`),t=document.querySelector(`audio`);!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=document.getElementById(`preview-prompt`);e&&typeof vR==`function`&&vR(e)}alignImages(){document.querySelectorAll(`#preview-prompt`).forEach(e=>{let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}})}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``}`.trim();return(0,U.jsx)(_z,{as:t||`div`,id:`preview-prompt`,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(vz,yz)}})}},xz=e=>(0,U.jsx)(U.Fragment,{children:P.Children.map(e.children,t=>P.cloneElement(t,{"data-pie-readable":e.false===void 0}))});xz.propTypes={children:p.node,false:p.bool};var Sz=e=>(0,U.jsx)(U.Fragment,{children:P.Children.map(e.children,t=>P.cloneElement(t,{"data-pie-purpose":e.purpose}))});Sz.propTypes={children:p.node,purpose:p.string};var Cz;typeof window<`u`&&(Cz=new DOMParser);var wz=e=>Cz.parseFromString(e,`text/html`).body.textContent,Tz=e=>{if(!e)return!1;let t=wz(e);return!!(t&&t.trim())},Ez;typeof window<`u`&&(Ez=new DOMParser);var Dz=e=>{if(!e)return!1;let t=Ez.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},Oz=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRT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AAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function kz(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function Az(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:aI(n,r),{props:s,internalRef:c}=cI({...a,externalSlotProps:o}),l=nM(c,o?.ref,e.additionalProps?.ref);return iI(t,{...s,ref:l},r)}var jz=P.createContext({});function Mz(e){return Yr(`MuiList`,e)}Xr(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var Nz=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return A({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},Mz,t)},Pz=G(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Fz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=P.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=Nz(d);return(0,U.jsx)(jz.Provider,{value:u,children:(0,U.jsxs)(Pz,{as:a,className:k(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),Iz=NF;function Lz(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Rz(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function zz(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function Bz(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!zz(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var Vz=P.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=P.useRef(null),p=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Xj(()=>{r&&f.current.focus()},[r]),P.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${Iz(Jj(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=KF(Kj(t));if(n===`ArrowDown`)e.preventDefault(),Bz(t,r,c,s,Lz);else if(n===`ArrowUp`)e.preventDefault(),Bz(t,r,c,s,Rz);else if(n===`Home`)e.preventDefault(),Bz(t,null,c,s,Lz);else if(n===`End`)e.preventDefault(),Bz(t,null,c,s,Rz);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&zz(r,i);i.previousKeyMatched&&(c||Bz(t,r,!1,s,Lz,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=rM(f,t),g=-1;P.Children.forEach(a,(e,t)=>{if(!P.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=P.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),P.cloneElement(e,t)}return e});return(0,U.jsx)(Fz,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function Hz(e){return Yr(`MuiMenu`,e)}Xr(`MuiMenu`,[`root`,`paper`,`list`]);var Uz={vertical:`top`,horizontal:`right`},Wz={vertical:`top`,horizontal:`left`},Gz=e=>{let{classes:t}=e;return A({root:[`root`],paper:[`paper`],list:[`list`]},Hz,t)},Kz=G(zI,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),qz=G(RI,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Jz=G(Vz,{name:`MuiMenu`,slot:`List`})({outline:0}),Yz=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=Ii(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=Gz(b),S=r&&!o&&l,C=P.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;P.Children.map(i,(e,t)=>{P.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=Az({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[A,j]=lI(`paper`,{className:x.paper,elementType:qz,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[M,ee]=lI(`list`,{className:k(x.list,s.className),elementType:Jz,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),N=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,U.jsx)(Kz,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?Uz:Wz,slots:{root:g.root,paper:A,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:j,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...N,onEntering:(...e)=>{w(...e),N?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,U.jsx)(M,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...ee,children:i})})}),Xz=({slotProps:e,...t})=>(0,U.jsx)(Yz,{...t,disableScrollLock:!0,hideBackdrop:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,pointerEvents:`none`,...e?.root?.style}},paper:{...e?.paper,style:{pointerEvents:`auto`,...e?.paper?.style}}}}),Zz=s({Collapsible:()=>SR,EnableAudioAutoplayImage:()=>Oz,Feedback:()=>KL,HtmlAndMath:()=>qR,InlineMenu:()=>Xz,InputContainer:()=>gz,PreviewLayout:()=>KR,PreviewPrompt:()=>bz,Purpose:()=>Sz,Readable:()=>xz,UiLayout:()=>WR,color:()=>HI,hasMedia:()=>Dz,hasText:()=>Tz,indicators:()=>qL,transformDataHeadings:()=>kz,withUndoReset:()=>VR}),Qz=Vj((0,U.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),$z=Vj((0,U.jsx)(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreVert`),eB=e=>{switch(e){case`down`:return 90;case`up`:return-90;case`left`:return 180;default:return 0}},tB=e=>{let{direction:t,style:n}=e;return(0,U.jsx)(Qz,{style:{transform:`rotate(${eB(t)}deg)`,...n}})};tB.propTypes={direction:p.string,style:p.object};var nB=({style:e})=>(0,U.jsxs)(`span`,{style:e,children:[(0,U.jsx)($z,{style:{margin:`0 -16px`}}),(0,U.jsx)($z,{})]});nB.propTypes={style:p.object},G(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`}));var rB=G(`span`)(({theme:e})=>({border:`solid 0px ${e.palette.primary.main}`,"& mjx-frac":{fontSize:`120% !important`}}));function iB({n:e,children:t,isDragging:n,isOver:r,dragItem:i,value:a,selected:o}){let[s,c]=(0,P.useState)(null),l=(0,P.useRef)(null),u=e=>{l.current&&(l.current.contains(e.target)?l.current.classList.add(`selected`):l.current.classList.remove(`selected`))};(0,P.useEffect)(()=>(document.addEventListener(`click`,u),()=>{document.removeEventListener(`click`,u)}),[]),(0,P.useEffect)(()=>{l.current&&typeof vR==`function`&&vR(l.current)},[a?.value,r,i?.value?.value]),(0,P.useEffect)(()=>{if(r&&l.current&&!s){let e=l.current;c({width:e.offsetWidth,height:e.offsetHeight})}else !r&&s&&c(null)},[r,s]);let d=i&&r?i.value.value:a.value||`\xA0`,f=n?`\xA0`:d,p=f!==`\xA0`,m=i&&r,h=o?`2px solid ${oL()}`:m?`1px solid ${UI.BORDER_DARK}`:`1px solid ${UI.BORDER_LIGHT}`;return(0,U.jsxs)(`div`,{ref:l,className:o?`selected`:void 0,style:{display:`inline-flex`,minWidth:`178px`,minHeight:`36px`,background:m?`${UI.BORDER_LIGHT}`:`${UI.WHITE}`,border:h,boxSizing:`border-box`,borderRadius:`3px`,overflow:`hidden`,position:`relative`,padding:`8px 8px 8px 35px`,width:s?s.width:void 0,height:s?s.height:void 0,touchAction:`none`},"data-key":e.index,contentEditable:!1,children:[p&&(0,U.jsx)(nB,{style:{position:`absolute`,top:`6px`,left:`15px`,color:`#9B9B9B`},contentEditable:!1}),(0,U.jsx)(`span`,{dangerouslySetInnerHTML:{__html:f}}),t]})}iB.propTypes={n:p.object,children:p.node,isDragging:p.bool,isOver:p.bool,dragItem:p.object,value:p.object,selected:p.bool};function aB({value:e,disabled:t,instanceId:n,children:r,n:i,onChange:a,removeResponse:o,duplicates:s,pos:c,selected:l}){let{attributes:u,listeners:d,setNodeRef:f,isDragging:p}=ZP({id:`drag-${i.index}`,disabled:t||!e?.value,data:{id:`drag-${i.index}`,value:e,instanceId:n,n:i,pos:c,opts:{duplicates:s},type:`drag-in-the-blank-placed-choice`,fromChoice:!e,onRemove:e=>o(e),onDrop:(e,t)=>{t?.type===`drag-in-the-blank-drop-choice`&&(a(e),!s&&e.fromChoice&&o(e))}}}),{setNodeRef:m,isOver:h,active:g}=eF({id:`drop-${i.index}`,data:{type:`drag-in-the-blank-drop-choice`,accepts:[`drag-in-the-blank-choice`,`drag-in-the-blank-placed-choice`],instanceId:n,value:e,id:`drop-${i.index}`,pos:c,n:i,opts:{duplicates:s},onDrop:(e,t)=>{if(t?.type===`drag-in-the-blank-drop-choice`&&e.value.id!==t.value.id){if(e.type===`drag-in-the-blank-choice`){a(e),!s&&e.fromChoice&&o(e);return}e.type===`drag-in-the-blank-placed-choice`&&(o(t),a(e),setTimeout(()=>o(e),10))}}}}),_=e=>{f(e),m(e)},v=(0,U.jsx)(iB,{n:i,isDragging:p,isOver:h,dragItem:g?.data?.current,value:e,selected:l,children:r}),y=e?(0,U.jsx)(`span`,{ref:_,...u,...d,children:v}):(0,U.jsx)(`span`,{ref:m,children:v});return(0,U.jsx)(rB,{className:k(h&&`over`),children:y})}aB.propTypes={value:p.object,disabled:p.bool,instanceId:p.string,children:p.node,n:p.object.isRequired,onChange:p.func.isRequired,removeResponse:p.func.isRequired,duplicates:p.bool,selected:p.bool};var oB=(e,t,n,r)=>{let{tr:i}=e.state;i.setNodeMarkup(n,void 0,{...t.attrs,...r.value}),i.isDone=!0,e.view.dispatch(i)},sB=(e,t,n)=>{let{tr:r}=e.state;r.setNodeMarkup(n.pos,void 0,w(t.attrs,[`value`,`id`])),r.isDone=!0,e.view.dispatch(r)},cB=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{inTable:s}=o,c=r();return(0,U.jsx)(jb,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline`,whiteSpace:`normal`},children:(0,U.jsx)(`span`,{...o,style:{display:`inline-flex`,minHeight:`50px`,minWidth:`178px`,position:`relative`,margin:s?`10px`:`0 10px`,cursor:`pointer`},children:(0,U.jsx)(aB,{n:o,dragKey:o.id,targetId:`0`,pos:c,value:o,duplicates:i.duplicates,selected:a,onChange:e=>oB(t,n,c,e),removeResponse:e=>sB(t,n,e)})})})};cB.propTypes={attributes:p.object,data:p.object,n:p.object,nodeProps:p.object,opts:p.object};var lB=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s,error:c}=o,l=s||`<div>&nbsp</div>`,u=r(),d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(!1),m=()=>t._holdInlineDropdownToolbarIndex!=null&&String(t._holdInlineDropdownToolbarIndex)===String(n.attrs.index),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)({top:0,left:0}),y=()=>{m()||g(!1)},b=i.respAreaToolbar([n,u],t,y),x=()=>{let{tr:e}=t.state,n=e.doc.nodeAt(u);if(!n)return;let{selection:r}=e;r.from===u&&r.to===u+n.nodeSize||(e.setSelection(Q.create(e.doc,u)),t.view.dispatch(e))},S=()=>{p.current||(i.onToolbarCloseRequest?(p.current=!0,i.onToolbarCloseRequest([n,u],t,()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,y()},()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,g(!0),setTimeout(x,0)})):y())};return(0,P.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&g(!0):h&&S()},[t,n,a]),(0,P.useEffect)(()=>{let e=document.body.getBoundingClientRect(),{from:n}=t.state.selection,r=t.view.coordsAtPos(n);v({top:r.top+Math.abs(e.top)+40,left:r.left});let i=e=>{let n=e.target.closest(`[data-toolbar-for]`);!e.target.closest(`[data-inline-dropdown-toolbar]`)&&(!n||n.dataset.toolbarFor!==f.current?.instanceId)&&!t._toolbarOpened&&d.current&&!d.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&S()};return h?document.addEventListener(`mousedown`,i):document.removeEventListener(`mousedown`,i),()=>document.removeEventListener(`mousedown`,i)},[h]),(0,U.jsxs)(jb,{className:`inline-dropdown`,"data-selected":a,style:{display:`inline-flex`,height:`50px`,cursor:`pointer`},children:[(0,U.jsxs)(`div`,{style:{display:`inline-flex`,minWidth:`178px`,height:`36px`,background:`#FFF`,border:`1px solid #C0C3CF`,boxSizing:`border-box`,borderRadius:`3px`,margin:`0 2px`,position:`relative`,alignItems:`center`},onClick:()=>g(!0),children:[(0,U.jsx)(`div`,{style:{flex:1,overflow:`hidden`,padding:`0 25px 0 8px`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},children:(0,U.jsx)(`span`,{style:{display:`inline-block`,verticalAlign:`middle`},dangerouslySetInnerHTML:{__html:l}})}),(0,U.jsx)(tB,{direction:`down`,style:{position:`absolute`,top:`5px`,right:`5px`}})]}),h&&(0,U.jsxs)(P.Fragment,{children:[db.createPortal((0,U.jsx)(`div`,{ref:d,style:{zIndex:1},children:(0,U.jsx)(b,{editorCallback:e=>{f.current=e}})}),document.body),t._tiptapContainerEl&&db.createPortal((0,U.jsx)(NN,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),t._toolbarOpened=!1,delete t._holdInlineDropdownToolbarIndex,t.view.dispatch(e),g(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};lB.propTypes={attributes:p.object,selectedItem:p.oneOfType([p.string,p.object])};var uB=s({greaterThan:()=>pB,greaterThanEqual:()=>hB,lessThan:()=>fB,lessThanEqual:()=>mB}),dB=e=>({...e,category:`comparison`}),fB=dB({name:`Less than`,latex:`<`,command:`\\lt`}),pB=dB({name:`Greater than`,latex:`>`,command:`\\gt`}),mB=dB({name:`Less than or equal`,latex:`\\le`,symbol:`<=`,command:`\\le`,ariaLabel:`less than or equal to`}),hB=dB({name:`Greater than or equal`,symbol:`>=`,command:`\\ge`,latex:`\\ge`}),gB=e=>t=>({...t,category:e}),_B=(e=[])=>{let t=[];T(5,()=>t.push([]));let n=e.length,r=0,i=0;for(;i<n;)t[r++].push(e[i++]),r===5&&(r=0);return t},vB=e=>t=>{let n=y(e),r=n.some(e=>e.latex===t.latex),i=n.some(e=>e.name===t.name);return!r&&!i},yB=(e=[],t=[])=>{t=t.filter(vB(e));let n=[];T(5-e.length,()=>e.push([])),T(5,()=>n.push([]));let r=_B(t);for(let t=0;t<5;t++)n[t]=[...e[t],...r[t]];return n},bB=s({theta:()=>wB,x:()=>SB,y:()=>CB}),xB=gB(`vars`),SB=xB({name:`X`,latex:`x`,write:`x`}),CB=xB({name:`Y`,latex:`y`,write:`y`}),wB=xB({name:`Theta`,latex:`\\theta`,write:`\\theta`}),TB=s({blankOverBlank:()=>DB,xBlankBlank:()=>kB,xOverBlank:()=>OB}),EB=gB(`fractions`),DB=EB({name:`blank/blank`,latex:`\\frac{}{}`,command:`\\frac`,ariaLabel:`fraction`}),OB=EB({latex:`\\frac{x}{ }`,name:`X/blank`,label:`x/[]`,command:`/`,ariaLabel:`x over blank fraction`}),kB=EB({name:`X (blank/blank)`,latex:`x\\frac{}{}`,label:`x([]/[])`,command:`\\frac`,ariaLabel:`mixed number`}),AB=s({nthRoot:()=>FB,squareRoot:()=>PB,squared:()=>MB,xToPowerOfN:()=>NB}),jB=gB(`exponent`),MB=jB({name:`Squared`,latex:`x^2`,write:`^2`}),NB=jB({name:`X to the power of n`,latex:`x^{}`,command:`^`,ariaLabel:`exponent`}),PB=jB({name:`Square root`,latex:`\\sqrt{}`,command:`\\sqrt`}),FB=jB({name:`Nth root`,latex:`\\sqrt[{}]{}`,command:`\\nthroot`}),IB=s({absValue:()=>zB,approx:()=>UB,brackets:()=>VB,nApprox:()=>WB,notEqual:()=>GB,notSimilar:()=>qB,parenthesis:()=>BB,percentage:()=>HB,plusMinus:()=>RB,similar:()=>KB}),LB=gB(`misc`),RB=LB({name:`Plus or Minus`,latex:`\\pm`,write:`\\pm`}),zB=LB({name:`Absolute Value`,latex:`\\abs{}`,symbol:`| |`,command:`|`}),BB=LB({name:`Parenthesis`,latex:`\\left(\\right)`,symbol:`( )`,command:`(`}),VB=LB({name:`Brackets`,latex:`\\left[\\right]`,symbol:`[ ]`,command:`[`}),HB=LB({name:`Percent`,latex:`%`,command:`%`}),UB=LB({latex:`\\approx`,command:`\\approx`,ariaLabel:`Approximately equal to`}),WB=LB({latex:`\\napprox`,command:`\\napprox`,ariaLabel:`Not pproximately equal to`}),GB=LB({latex:`\\neq`,command:`\\neq`,ariaLabel:`Not equals`}),KB=LB({latex:`\\sim`,command:`\\sim`,ariaLabel:`Similar`}),qB=LB({latex:`\\nsim`,command:`\\nsim`,ariaLabel:`Not similar`}),JB=s({eulers:()=>ZB,halfInfinity:()=>$B,infinity:()=>QB,pi:()=>XB}),YB=gB(`constants`),XB=YB({name:`Pi`,label:`π`,latex:`\\pi`,command:`\\pi`,category:`constants`}),ZB=YB({name:`Eulers`,label:`e`,latex:`e`,command:`e`,category:`constants`}),QB=YB({name:`Infinity`,label:`\\infty`,latex:`\\infty`,command:`\\infty`,category:`constants`}),$B=YB({name:`Half Infinity`,label:`\\propto`,latex:`\\propto`,command:`\\propto`,category:`constants`}),eV=s({cos:()=>rV,cot:()=>sV,csc:()=>oV,sec:()=>aV,sin:()=>nV,tan:()=>iV}),tV=gB(`trigonometry`),nV=tV({name:`sine`,label:`sin`,command:`\\sin`,latex:`\\sin`}),rV=tV({name:`cosine`,label:`cos`,command:`\\cos`,latex:`\\cos`}),iV=tV({name:`tanget`,label:`tan`,command:`\\tan`,latex:`\\tan`}),aV=tV({name:`secant`,label:`sec`,command:`\\sec`,latex:`\\sec`}),oV=tV({name:`cosecant`,label:`csc`,command:`\\csc`,latex:`\\csc`}),sV=tV({name:`cotangent`,label:`cot`,command:`\\cot`,latex:`\\cot`}),cV=s({angle:()=>_V,circledDot:()=>CV,congruentTo:()=>EV,degree:()=>wV,doublePrimeArcSecond:()=>kV,leftArrow:()=>AV,leftrightArrow:()=>MV,measureOfAngle:()=>yV,notCongruentTo:()=>DV,notParallel:()=>hV,overArc:()=>vV,overLeftRightArrow:()=>fV,overRightArrow:()=>dV,overline:()=>uV,parallel:()=>mV,parallelogram:()=>SV,perpindicular:()=>gV,primeArcminute:()=>OV,rightArrow:()=>jV,segment:()=>pV,similarTo:()=>TV,square:()=>xV,triangle:()=>bV}),lV=e=>({...e,category:`geometry`}),uV=lV({name:`Line`,latex:`\\overline{}`,command:`\\overline`}),dV=lV({name:`Ray`,latex:`\\overrightarrow{}`,command:`\\overrightarrow`}),fV=lV({name:`Segment`,latex:`\\overleftrightarrow{\\overline{}}`,symbol:`AB`,command:`\\overleftrightarrow`}),pV=lV({name:`Segment`,latex:`\\overleftrightarrow{AB}`,write:`\\overleftrightarrow{AB}`,label:`AB`}),mV=lV({name:`Parallel`,latex:`\\parallel`,command:`\\parallel`}),hV=lV({name:`Not Parallel`,latex:`\\nparallel`,command:`\\nparallel`}),gV=lV({name:`Perpendicular`,latex:`\\perp`,command:`\\perpendicular`}),_V=lV({name:`Angle`,latex:`\\angle`,command:`\\angle`}),vV=lV({name:`Over arc`,latex:`\\overarc{\\overline{}}`,command:`\\overarc`}),yV=lV({name:`Measured Angle`,latex:`\\measuredangle`,command:[`m`,`\\angle`]}),bV=lV({name:`Triangle`,latex:`\\triangle`,command:`\\triangle`}),xV=lV({name:`Square`,latex:`\\square`,command:`\\square`}),SV=lV({name:`Parallelogram`,latex:`\\parallelogram`,command:`\\parallelogram`}),CV=lV({name:`Circled Dot`,latex:`\\odot`,command:`\\odot`}),wV=lV({name:`Degree`,latex:`\\degree`,command:`\\degree`}),TV=lV({name:`Similar`,command:`\\sim`,latex:`\\sim`}),EV=lV({name:`Congruent To`,command:`\\cong`,latex:`\\cong`}),DV=lV({name:`Not Congruent To`,command:`\\ncong`,latex:`\\ncong`}),OV=lV({name:`Prime`,label:`pam`,latex:`'`,write:`'`}),kV=lV({name:`Double Prime`,latex:`''`,write:`''`}),AV=lV({name:`Left Arrow`,latex:`\\leftarrow`,command:`\\leftarrow`}),jV=lV({name:`Right Arrow`,latex:`\\rightarrow`,command:`\\rightarrow`}),MV=lV({name:`Left and Right Arrow`,latex:`\\leftrightarrow`,command:`\\leftrightarrow`}),NV=s({circleDot:()=>PV}),PV=gB(`operators`)({name:`CircleDot`,label:`⋅`,write:`\\cdot`,ariaLabel:`Dot multiplier`}),FV=s({ln:()=>zV,log:()=>LV,logSubscript:()=>RV}),IV=gB(`log`),LV=IV({name:`Log`,label:`log`,command:`\\log`,latex:`\\log`}),RV=IV({name:`log base n`,label:`log s`,latex:`\\log_{}`,command:[`\\log`,`_`]}),zV=IV({name:`natural log`,label:`ln`,command:`\\ln`,latex:`\\ln`}),BV=s({subscript:()=>UV,superscript:()=>HV}),VV=gB(`sub-sup`),HV=VV({name:`Superscript`,latex:`x^{}`,command:`^`}),UV=VV({name:`Subscript`,latex:`x_{}`,command:`_`}),WV=s({mu:()=>JV,sigma:()=>YV,smallSigma:()=>XV,xBar:()=>KV,yBar:()=>qV}),GV=gB(`statistics`),KV=GV({name:`X Bar`,label:`x̄`,latex:`\\overline{x}`,write:`\\overline{x}`}),qV=GV({name:`Y Bar`,latex:`\\overline{y}`,write:`\\overline{y}`}),JV=GV({name:`mu`,label:`mu`,latex:`\\mu`,write:`\\mu`}),YV=GV({name:`Sigma`,ariaLabel:`Uppercase Sigma`,label:`\\Sigma`,latex:`\\Sigma`,write:`\\Sigma`}),XV=GV({name:`sigma`,ariaLabel:`Lowercase Sigma`,label:`\\sigma`,latex:`\\sigma`,write:`\\sigma`}),ZV=s({divide:()=>nH,equals:()=>$V,minus:()=>tH,multiply:()=>rH,plus:()=>eH}),QV=gB(`operators`),$V=QV({write:`=`,label:`=`}),eH=QV({write:`+`,label:`+`}),tH=QV({write:`−`,label:`−`}),nH=QV({name:`divide`,label:`÷`,command:`\\divide`,otherNotation:`\\div`}),rH=QV({name:`multiply`,label:`×`,command:`\\times`}),iH=s({doubleCellMatrix:()=>sH,singleCellMatrix:()=>oH}),aH=gB(`matrices`),oH=aH({name:`Single Cell Matrix`,label:`[ ]`,write:`\\begin{pmatrix}\\end{pmatrix}`}),sH=aH({name:`Double Cell Matrix`,label:`[ ] [ ] \\\\newline [ ] [ ]`,write:`\\begin{bmatrix}&\\\\&\\end{bmatrix}`}),cH={0:`zero`,1:`one`,2:`two`,3:`three`,4:`four`,5:`five`,6:`six`,7:`seven`,8:`eight`,9:`nine`},lH=T(10,String).map(e=>({name:cH[e],write:e,label:e,category:`digit`})).reduce((e,t)=>(e[t.name]=t,e),{comma:{name:`comma`,label:`,`,write:`,`,category:`digit`},decimalPoint:{name:`decimal-point`,label:`.`,write:`.`,category:`digit`}}),uH=gB(`logic`),dH=uH({name:`Therefore`,label:`∴`,write:`∴`}),fH=uH({name:`Long division`,latex:`\\longdiv{}`,command:`\\longdiv`}),pH=gB(`navigation`),mH=pH({label:`◀`,keystroke:`Left`,ariaLabel:`Move cursor left`}),hH=pH({label:`▶`,keystroke:`Right`,ariaLabel:`Move cursor right`}),gH={label:`⌫`,category:`edit`,keystroke:`Backspace`,ariaLabel:`Delete`},_H=[[DB,HB,SB,MB,PB],[PV,CB,UV,NB,FB],[RB,fB,pB,mB,hB],[XB,wB,BB,VB,zB],[GB,nV,rV,iV,wV]],vH=(()=>{let e=[..._H.map(e=>[...e])];return e[0].push({name:`i`,latex:`i`,write:`i`}),e[1].push(LV),e[2].push(RV),e[3].push(zV),e[4].push(ZB),e})(),yH=(()=>{let e=[..._H.map(e=>[...e])];return e[0].push(JV),e[1].push(KV),e[2].push(qV),e[3].push(YV),e[4].push(XV),e})(),bH=[{predicate:e=>e>=3&&e<=5,set:[[fB,pB],[OB,kB],[SB,fH],[MB,NB]]},{predicate:e=>e>=6&&e<=7,set:[[wV,fB,pB],[PV,mB,hB],[SB,CB,MB,NB],[RB,OB,kB,PB],[XB,BB,zB,FB]]},{predicate:e=>e>=8||e===`HS`,set:_H},{predicate:`non-negative-integers`,set:[[lH.seven,lH.eight,lH.nine],[lH.four,lH.five,lH.six],[lH.one,lH.two,lH.three],[lH.zero,{name:``,latex:``,write:``},{name:``,latex:``,write:``}],[mH,hH,gH]]},{predicate:`integers`,set:[[lH.seven,lH.eight,lH.nine],[lH.four,lH.five,lH.six],[lH.one,lH.two,lH.three],[lH.zero,{name:``,latex:``,write:``},tH],[mH,hH,gH]]},{predicate:`decimals`,set:[[lH.seven,lH.eight,lH.nine],[lH.four,lH.five,lH.six],[lH.one,lH.two,lH.three],[lH.zero,lH.decimalPoint,tH],[mH,hH,gH]]},{predicate:`fractions`,set:[[lH.seven,lH.eight,lH.nine],[lH.four,lH.five,lH.six],[lH.one,lH.two,lH.three],[lH.zero,DB,tH],[mH,hH,gH]]},{predicate:`geometry`,set:[[DB,wV,OV,kV,EV,TV],[PV,_V,yV,bV,DV,qB],[nV,rV,iV,XB,PB,FB],[oV,aV,sV,wB,UV,NB],[uV,dV,fV,vV,gV,mV]]},{predicate:`advanced-algebra`,set:vH},{predicate:`statistics`,set:yH},{predicate:`item-authoring`,set:[[nH,DB,fH,$B,MB,PB,uV,dV,fV,LV],[rH,PV,{name:``,latex:``,write:``},UV,NB,FB,gV,mV,vV,RV],[RB,XB,wB,wV,_V,AV,jV,bV,xV,zV],[GB,zB,XV,JV,dH,YV,MV,nV,rV,iV],[mB,hB,{name:``,latex:``,write:``},{name:``,latex:``,write:``},QB,{name:``,latex:``,write:``},{name:``,latex:``,write:``},oV,aV,sV]]},{predicate:e=>e>=1&&e<=2,set:[]}],xH=e=>{let t=parseInt(e,10);if(e=isNaN(t)?e:t,!e)return[];let n=bH.find(t=>typeof t.predicate==`string`?t.predicate===e:t.predicate(e));if(n)return n.set||[];if(e!==`language`)return bH[2].set},SH=[...Object.values(ZV),...Object.values(uB),...Object.values(JB),...Object.values(lH),...Object.values(AB),...Object.values(TB),...Object.values(cV),...Object.values(FV),...Object.values(iH),...Object.values(IB),...Object.values(NV),...Object.values(WV),...Object.values(BV),...Object.values(eV),...Object.values(bB)],CH=e=>(e||[]).map(e=>{let{latex:t}=e,n=(SH||[]).find(e=>t===e.latex||t===e.write||t===e.command||t===e.otherNotation);return t&&n||e}),wH=e=>{let t=e??document;(Array.from(t.querySelectorAll(`span[mathquill-command-id]`))||[]).forEach(e=>{e&&e.innerText===`∥`&&e.className!==`mq-editable-field`&&(e.style.fontSize=`32px`),(e.innerText===`′`||e.innerText===`′′`)&&!e.hasAttribute(`data-prime`)&&e.setAttribute(`data-prime`,`true`)})},{one:TH,two:EH,three:DH,four:OH,five:kH,six:AH,seven:jH,eight:MH,nine:NH,zero:PH,comma:FH,decimalPoint:IH}=lH,LH=[[jH,MH,NH,nH],[OH,kH,AH,rH],[TH,EH,DH,tH],[PH,IH,FH,eH],[mH,hH,gH,$V]],RH=o(((e,t)=>{(function(e,n){"use strict";typeof t==`object`&&typeof t.exports==`object`?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw Error(`jQuery requires a window with a document`);return n(e)}:n(e)})(typeof window<`u`?window:e,function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,a=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},o=n.push,s=n.indexOf,c={},l=c.toString,u=c.hasOwnProperty,d=u.toString,f=d.call(Object),p={},m=function(e){return typeof e==`function`&&typeof e.nodeType!=`number`&&typeof e.item!=`function`},h=function(e){return e!=null&&e===e.window},g=e.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function v(e,t,n){n||=g;var r,i,a=n.createElement(`script`);if(a.text=e,t)for(r in _)i=t[r]||t.getAttribute&&t.getAttribute(r),i&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function y(e){return e==null?e+``:typeof e==`object`||typeof e==`function`?c[l.call(e)]||`object`:typeof e}var b=`3.7.1`,x=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};S.fn=S.prototype={jquery:b,constructor:S,length:0,toArray:function(){return i.call(this)},get:function(e){return e==null?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:n.sort,splice:n.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,c=arguments.length,l=!1;for(typeof o==`boolean`&&(l=o,o=arguments[s]||{},s++),typeof o!=`object`&&!m(o)&&(o={}),s===c&&(o=this,s--);s<c;s++)if((e=arguments[s])!=null)for(t in e)r=e[t],!(t===`__proto__`||o===r)&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[t],a=i&&!Array.isArray(n)?[]:!i&&!S.isPlainObject(n)?{}:n,i=!1,o[t]=S.extend(l,a,r)):r!==void 0&&(o[t]=r));return o},S.extend({expando:`jQuery`+(b+Math.random()).replace(/\D/g,``),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!e||l.call(e)!==`[object Object]`?!1:(t=r(e),t?(n=u.call(t,`constructor`)&&t.constructor,typeof n==`function`&&d.call(n)===f):!0)},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){v(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(C(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},text:function(e){var t,n=``,r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=S.text(t);return i===1||i===11?e.textContent:i===9?e.documentElement.textContent:i===3||i===4?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return e!=null&&(C(Object(e))?S.merge(n,typeof e==`string`?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){return t==null?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!x.test(t||n&&n.nodeName||`HTML`)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],a=0,o=e.length,s=!n;a<o;a++)r=!t(e[a],a),r!==s&&i.push(e[a]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)i=t(e[o],o,n),i!=null&&s.push(i);else for(o in e)i=t(e[o],o,n),i!=null&&s.push(i);return a(s)},guid:1,support:p}),typeof Symbol==`function`&&(S.fn[Symbol.iterator]=n[Symbol.iterator]),S.each(`Boolean Number String Function Array Date RegExp Object Error Symbol`.split(` `),function(e,t){c[`[object `+t+`]`]=t.toLowerCase()});function C(e){var t=!!e&&`length`in e&&e.length,n=y(e);return m(e)||h(e)?!1:n===`array`||t===0||typeof t==`number`&&t>0&&t-1 in e}function w(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var T=n.pop,E=n.sort,D=n.splice,O=`[\\x20\\t\\r\\n\\f]`,k=RegExp(`^`+O+`+|((?:^|[^\\\\])(?:\\\\.)*)`+O+`+$`,`g`);S.contains=function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&n.nodeType===1&&(e.contains?e.contains(n):e.compareDocumentPosition&&e.compareDocumentPosition(n)&16))};var A=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function j(e,t){return t?e===`\0`?`�`:e.slice(0,-1)+`\\`+e.charCodeAt(e.length-1).toString(16)+` `:`\\`+e}S.escapeSelector=function(e){return(e+``).replace(A,j)};var M=g,ee=o;(function(){var t,r,a,o,c,l=ee,d,f,m,h,g,_=S.expando,v=0,y=0,b=pe(),x=pe(),C=pe(),A=pe(),j=function(e,t){return e===t&&(c=!0),0},N=`checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped`,P=`(?:\\\\[\\da-fA-F]{1,6}`+O+`?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+`,te=`\\[`+O+`*(`+P+`)(?:`+O+`*([*^$|!~]?=)`+O+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+P+`))|)`+O+`*\\]`,F=`:(`+P+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+te+`)*)|.*)\\)|)`,I=RegExp(O+`+`,`g`),L=RegExp(`^`+O+`*,`+O+`*`),ne=RegExp(`^`+O+`*([>+~]|`+O+`)`+O+`*`),re=RegExp(O+`|>`),ie=new RegExp(F),R=RegExp(`^`+P+`$`),ae={ID:RegExp(`^#(`+P+`)`),CLASS:RegExp(`^\\.(`+P+`)`),TAG:RegExp(`^(`+P+`|[*])`),ATTR:RegExp(`^`+te),PSEUDO:RegExp(`^`+F),CHILD:RegExp(`^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(`+O+`*(even|odd|(([+-]|)(\\d*)n|)`+O+`*(?:([+-]|)`+O+`*(\\d+)|))`+O+`*\\)|)`,`i`),bool:RegExp(`^(?:`+N+`)$`,`i`),needsContext:RegExp(`^`+O+`*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(`+O+`*((?:-\\d)?\\d*)`+O+`*\\)|)(?=[^-]|$)`,`i`)},z=/^(?:input|select|textarea|button)$/i,B=/^h\d$/i,oe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,se=/[+~]/,ce=RegExp(`\\\\[\\da-fA-F]{1,6}`+O+`?|\\\\([^\\r\\n\\f])`,`g`),le=function(e,t){var n=`0x`+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320))},ue=function(){be()},de=we(function(e){return e.disabled===!0&&w(e,`fieldset`)},{dir:`parentNode`,next:`legend`});function fe(){try{return d.activeElement}catch{}}try{l.apply(n=i.call(M.childNodes),M.childNodes),n[M.childNodes.length].nodeType}catch{l={apply:function(e,t){ee.apply(e,i.call(t))},call:function(e){ee.apply(e,i.call(arguments,1))}}}function V(e,t,n,r){var i,a,o,s,c,u,f,g=t&&t.ownerDocument,v=t?t.nodeType:9;if(n||=[],typeof e!=`string`||!e||v!==1&&v!==9&&v!==11)return n;if(!r&&(be(t),t||=d,m)){if(v!==11&&(c=oe.exec(e))){if(i=c[1]){if(v===9)if(o=t.getElementById(i)){if(o.id===i)return l.call(n,o),n}else return n;else if(g&&(o=g.getElementById(i))&&V.contains(t,o)&&o.id===i)return l.call(n,o),n}else if(c[2])return l.apply(n,t.getElementsByTagName(e)),n;else if((i=c[3])&&t.getElementsByClassName)return l.apply(n,t.getElementsByClassName(i)),n}if(!A[e+` `]&&(!h||!h.test(e))){if(f=e,g=t,v===1&&(re.test(e)||ne.test(e))){for(g=se.test(e)&&ye(t.parentNode)||t,(g!=t||!p.scope)&&((s=t.getAttribute(`id`))?s=S.escapeSelector(s):t.setAttribute(`id`,s=_)),u=Se(e),a=u.length;a--;)u[a]=(s?`#`+s:`:scope`)+` `+Ce(u[a]);f=u.join(`,`)}try{return l.apply(n,g.querySelectorAll(f)),n}catch{A(e,!0)}finally{s===_&&t.removeAttribute(`id`)}}}return Me(e.replace(k,`$1`),t,n,r)}function pe(){var e=[];function t(n,i){return e.push(n+` `)>r.cacheLength&&delete t[e.shift()],t[n+` `]=i}return t}function me(e){return e[_]=!0,e}function he(e){var t=d.createElement(`fieldset`);try{return!!e(t)}catch{return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ge(e){return function(t){return w(t,`input`)&&t.type===e}}function _e(e){return function(t){return(w(t,`input`)||w(t,`button`))&&t.type===e}}function H(e){return function(t){return`form`in t?t.parentNode&&t.disabled===!1?`label`in t?`label`in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&de(t)===e:t.disabled===e:`label`in t?t.disabled===e:!1}}function ve(e){return me(function(t){return t=+t,me(function(n,r){for(var i,a=e([],n.length,t),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))})})}function ye(e){return e&&e.getElementsByTagName!==void 0&&e}function be(e){var t,n=e?e.ownerDocument||e:M;return n==d||n.nodeType!==9||!n.documentElement?d:(d=n,f=d.documentElement,m=!S.isXMLDoc(d),g=f.matches||f.webkitMatchesSelector||f.msMatchesSelector,f.msMatchesSelector&&M!=d&&(t=d.defaultView)&&t.top!==t&&t.addEventListener(`unload`,ue),p.getById=he(function(e){return f.appendChild(e).id=S.expando,!d.getElementsByName||!d.getElementsByName(S.expando).length}),p.disconnectedMatch=he(function(e){return g.call(e,`*`)}),p.scope=he(function(){return d.querySelectorAll(`:scope`)}),p.cssHas=he(function(){try{return d.querySelector(`:has(*,:jqfake)`),!1}catch{return!0}}),p.getById?(r.filter.ID=function(e){var t=e.replace(ce,le);return function(e){return e.getAttribute(`id`)===t}},r.find.ID=function(e,t){if(t.getElementById!==void 0&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(ce,le);return function(e){var n=e.getAttributeNode!==void 0&&e.getAttributeNode(`id`);return n&&n.value===t}},r.find.ID=function(e,t){if(t.getElementById!==void 0&&m){var n,r,i,a=t.getElementById(e);if(a){if(n=a.getAttributeNode(`id`),n&&n.value===e)return[a];for(i=t.getElementsByName(e),r=0;a=i[r++];)if(n=a.getAttributeNode(`id`),n&&n.value===e)return[a]}return[]}}),r.find.TAG=function(e,t){return t.getElementsByTagName===void 0?t.querySelectorAll(e):t.getElementsByTagName(e)},r.find.CLASS=function(e,t){if(t.getElementsByClassName!==void 0&&m)return t.getElementsByClassName(e)},h=[],he(function(e){var t;f.appendChild(e).innerHTML=`<a id='`+_+`' href='' disabled='disabled'></a><select id='`+_+`-\r\\' disabled='disabled'><option selected=''></option></select>`,e.querySelectorAll(`[selected]`).length||h.push(`\\[`+O+`*(?:value|`+N+`)`),e.querySelectorAll(`[id~=`+_+`-]`).length||h.push(`~=`),e.querySelectorAll(`a#`+_+`+*`).length||h.push(`.#.+[+~]`),e.querySelectorAll(`:checked`).length||h.push(`:checked`),t=d.createElement(`input`),t.setAttribute(`type`,`hidden`),e.appendChild(t).setAttribute(`name`,`D`),f.appendChild(e).disabled=!0,e.querySelectorAll(`:disabled`).length!==2&&h.push(`:enabled`,`:disabled`),t=d.createElement(`input`),t.setAttribute(`name`,``),e.appendChild(t),e.querySelectorAll(`[name='']`).length||h.push(`\\[`+O+`*name`+O+`*=`+O+`*(?:''|"")`)}),p.cssHas||h.push(`:has`),h=h.length&&new RegExp(h.join(`|`)),j=function(e,t){if(e===t)return c=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,n&1||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===d||e.ownerDocument==M&&V.contains(M,e)?-1:t===d||t.ownerDocument==M&&V.contains(M,t)?1:o?s.call(o,e)-s.call(o,t):0:n&4?-1:1)},d)}for(t in V.matches=function(e,t){return V(e,null,null,t)},V.matchesSelector=function(e,t){if(be(e),m&&!A[t+` `]&&(!h||!h.test(t)))try{var n=g.call(e,t);if(n||p.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch{A(t,!0)}return V(t,d,null,[e]).length>0},V.contains=function(e,t){return(e.ownerDocument||e)!=d&&be(e),S.contains(e,t)},V.attr=function(e,t){(e.ownerDocument||e)!=d&&be(e);var n=r.attrHandle[t.toLowerCase()],i=n&&u.call(r.attrHandle,t.toLowerCase())?n(e,t,!m):void 0;return i===void 0?e.getAttribute(t):i},V.error=function(e){throw Error(`Syntax error, unrecognized expression: `+e)},S.uniqueSort=function(e){var t,n=[],r=0,a=0;if(c=!p.sortStable,o=!p.sortStable&&i.call(e,0),E.call(e,j),c){for(;t=e[a++];)t===e[a]&&(r=n.push(a));for(;r--;)D.call(e,n[r],1)}return o=null,e},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(i.apply(this)))},r=S.expr={cacheLength:50,createPseudo:me,match:ae,attrHandle:{},find:{},relative:{">":{dir:`parentNode`,first:!0}," ":{dir:`parentNode`},"+":{dir:`previousSibling`,first:!0},"~":{dir:`previousSibling`}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ce,le),e[3]=(e[3]||e[4]||e[5]||``).replace(ce,le),e[2]===`~=`&&(e[3]=` `+e[3]+` `),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)===`nth`?(e[3]||V.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]===`even`||e[3]===`odd`)),e[5]=+(e[7]+e[8]||e[3]===`odd`)):e[3]&&V.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ae.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||``:n&&ie.test(n)&&(t=Se(n,!0))&&(t=n.indexOf(`)`,n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ce,le).toLowerCase();return e===`*`?function(){return!0}:function(e){return w(e,t)}},CLASS:function(e){var t=b[e+` `];return t||(t=RegExp(`(^|`+O+`)`+e+`(`+O+`|$)`))&&b(e,function(e){return t.test(typeof e.className==`string`&&e.className||e.getAttribute!==void 0&&e.getAttribute(`class`)||``)})},ATTR:function(e,t,n){return function(r){var i=V.attr(r,e);return i==null?t===`!=`:t?(i+=``,t===`=`?i===n:t===`!=`?i!==n:t===`^=`?n&&i.indexOf(n)===0:t===`*=`?n&&i.indexOf(n)>-1:t===`$=`?n&&i.slice(-n.length)===n:t===`~=`?(` `+i.replace(I,` `)+` `).indexOf(n)>-1:t===`|=`?i===n||i.slice(0,n.length+1)===n+`-`:!1):!0}},CHILD:function(e,t,n,r,i){var a=e.slice(0,3)!==`nth`,o=e.slice(-4)!==`last`,s=t===`of-type`;return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,f,p,m=a===o?`previousSibling`:`nextSibling`,h=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!c&&!s,b=!1;if(h){if(a){for(;m;){for(d=t;d=d[m];)if(s?w(d,g):d.nodeType===1)return!1;p=m=e===`only`&&!p&&`nextSibling`}return!0}if(p=[o?h.firstChild:h.lastChild],o&&y){for(u=h[_]||(h[_]={}),l=u[e]||[],f=l[0]===v&&l[1],b=f&&l[2],d=f&&h.childNodes[f];d=++f&&d&&d[m]||(b=f=0)||p.pop();)if(d.nodeType===1&&++b&&d===t){u[e]=[v,f,b];break}}else if(y&&(u=t[_]||(t[_]={}),l=u[e]||[],f=l[0]===v&&l[1],b=f),b===!1)for(;(d=++f&&d&&d[m]||(b=f=0)||p.pop())&&!((s?w(d,g):d.nodeType===1)&&++b&&(y&&(u=d[_]||(d[_]={}),u[e]=[v,b]),d===t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||V.error(`unsupported pseudo: `+e);return i[_]?i(t):i.length>1?(n=[e,e,``,t],r.setFilters.hasOwnProperty(e.toLowerCase())?me(function(e,n){for(var r,a=i(e,t),o=a.length;o--;)r=s.call(e,a[o]),e[r]=!(n[r]=a[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:me(function(e){var t=[],n=[],r=je(e.replace(k,`$1`));return r[_]?me(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:me(function(e){return function(t){return V(e,t).length>0}}),contains:me(function(e){return e=e.replace(ce,le),function(t){return(t.textContent||S.text(t)).indexOf(e)>-1}}),lang:me(function(e){return R.test(e||``)||V.error(`unsupported lang: `+e),e=e.replace(ce,le).toLowerCase(),function(t){var n;do if(n=m?t.lang:t.getAttribute(`xml:lang`)||t.getAttribute(`lang`))return n=n.toLowerCase(),n===e||n.indexOf(e+`-`)===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===fe()&&d.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:H(!1),disabled:H(!0),checked:function(e){return w(e,`input`)&&!!e.checked||w(e,`option`)&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return B.test(e.nodeName)},input:function(e){return z.test(e.nodeName)},button:function(e){return w(e,`input`)&&e.type===`button`||w(e,`button`)},text:function(e){var t;return w(e,`input`)&&e.type===`text`&&((t=e.getAttribute(`type`))==null||t.toLowerCase()===`text`)},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ge(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=_e(t);function xe(){}xe.prototype=r.filters=r.pseudos,r.setFilters=new xe;function Se(e,t){var n,i,a,o,s,c,l,u=x[e+` `];if(u)return t?0:u.slice(0);for(s=e,c=[],l=r.preFilter;s;){for(o in(!n||(i=L.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),c.push(a=[])),n=!1,(i=ne.exec(s))&&(n=i.shift(),a.push({value:n,type:i[0].replace(k,` `)}),s=s.slice(n.length)),r.filter)(i=ae[o].exec(s))&&(!l[o]||(i=l[o](i)))&&(n=i.shift(),a.push({value:n,type:o,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?V.error(e):x(e,c).slice(0)}function Ce(e){for(var t=0,n=e.length,r=``;t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,i=t.next,a=i||r,o=n&&a===`parentNode`,s=y++;return t.first?function(t,n,i){for(;t=t[r];)if(t.nodeType===1||o)return e(t,n,i);return!1}:function(t,n,c){var l,u,d=[v,s];if(c){for(;t=t[r];)if((t.nodeType===1||o)&&e(t,n,c))return!0}else for(;t=t[r];)if(t.nodeType===1||o){if(u=t[_]||(t[_]={}),i&&w(t,i))t=t[r]||t;else if((l=u[a])&&l[0]===v&&l[1]===s)return d[2]=l[2];else if(u[a]=d,d[2]=e(t,n,c))return!0}return!1}}function Te(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ee(e,t,n){for(var r=0,i=t.length;r<i;r++)V(e,t[r],n);return n}function De(e,t,n,r,i){for(var a,o=[],s=0,c=e.length,l=t!=null;s<c;s++)(a=e[s])&&(!n||n(a,r,i))&&(o.push(a),l&&t.push(s));return o}function Oe(e,t,n,r,i,a){return r&&!r[_]&&(r=Oe(r)),i&&!i[_]&&(i=Oe(i,a)),me(function(a,o,c,u){var d,f,p,m,h=[],g=[],_=o.length,v=a||Ee(t||`*`,c.nodeType?[c]:c,[]),y=e&&(a||!t)?De(v,h,e,c,u):v;if(n?(m=i||(a?e:_||r)?[]:o,n(y,m,c,u)):m=y,r)for(d=De(m,g),r(d,[],c,u),f=d.length;f--;)(p=d[f])&&(m[g[f]]=!(y[g[f]]=p));if(a){if(i||e){if(i){for(d=[],f=m.length;f--;)(p=m[f])&&d.push(y[f]=p);i(null,m=[],d,u)}for(f=m.length;f--;)(p=m[f])&&(d=i?s.call(a,p):h[f])>-1&&(a[d]=!(o[d]=p))}}else m=De(m===o?m.splice(_,m.length):m),i?i(null,o,m,u):l.apply(o,m)})}function ke(e){for(var t,n,i,o=e.length,c=r.relative[e[0].type],l=c||r.relative[` `],u=+!!c,d=we(function(e){return e===t},l,!0),f=we(function(e){return s.call(t,e)>-1},l,!0),p=[function(e,n,r){var i=!c&&(r||n!=a)||((t=n).nodeType?d(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[we(Te(p),n)];else{if(n=r.filter[e[u].type].apply(null,e[u].matches),n[_]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Oe(u>1&&Te(p),u>1&&Ce(e.slice(0,u-1).concat({value:e[u-2].type===` `?`*`:``})).replace(k,`$1`),n,u<i&&ke(e.slice(u,i)),i<o&&ke(e=e.slice(i)),i<o&&Ce(e))}p.push(n)}return Te(p)}function Ae(e,t){var n=t.length>0,i=e.length>0,o=function(o,s,c,u,f){var p,h,g,_=0,y=`0`,b=o&&[],x=[],C=a,w=o||i&&r.find.TAG(`*`,f),E=v+=C==null?1:Math.random()||.1,D=w.length;for(f&&(a=s==d||s||f);y!==D&&(p=w[y])!=null;y++){if(i&&p){for(h=0,!s&&p.ownerDocument!=d&&(be(p),c=!m);g=e[h++];)if(g(p,s||d,c)){l.call(u,p);break}f&&(v=E)}n&&((p=!g&&p)&&_--,o&&b.push(p))}if(_+=y,n&&y!==_){for(h=0;g=t[h++];)g(b,x,s,c);if(o){if(_>0)for(;y--;)b[y]||x[y]||(x[y]=T.call(u));x=De(x)}l.apply(u,x),f&&!o&&x.length>0&&_+t.length>1&&S.uniqueSort(u)}return f&&(v=E,a=C),b};return n?me(o):o}function je(e,t){var n,r=[],i=[],a=C[e+` `];if(!a){for(t||=Se(e),n=t.length;n--;)a=ke(t[n]),a[_]?r.push(a):i.push(a);a=C(e,Ae(i,r)),a.selector=e}return a}function Me(e,t,n,i){var a,o,s,c,u,d=typeof e==`function`&&e,f=!i&&Se(e=d.selector||e);if(n||=[],f.length===1){if(o=f[0]=f[0].slice(0),o.length>2&&(s=o[0]).type===`ID`&&t.nodeType===9&&m&&r.relative[o[1].type]){if(t=(r.find.ID(s.matches[0].replace(ce,le),t)||[])[0],t)d&&(t=t.parentNode);else return n;e=e.slice(o.shift().value.length)}for(a=ae.needsContext.test(e)?0:o.length;a--&&(s=o[a],!r.relative[c=s.type]);)if((u=r.find[c])&&(i=u(s.matches[0].replace(ce,le),se.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(a,1),e=i.length&&Ce(o),!e)return l.apply(n,i),n;break}}return(d||je(e,f))(i,t,!m,n,!t||se.test(e)&&ye(t.parentNode)||t),n}p.sortStable=_.split(``).sort(j).join(``)===_,be(),p.sortDetached=he(function(e){return e.compareDocumentPosition(d.createElement(`fieldset`))&1}),S.find=V,S.expr[`:`]=S.expr.pseudos,S.unique=S.uniqueSort,V.compile=je,V.select=Me,V.setDocument=be,V.tokenize=Se,V.escape=S.escapeSelector,V.getText=S.text,V.isXML=S.isXMLDoc,V.selectors=S.expr,V.support=S.support,V.uniqueSort=S.uniqueSort})();var N=function(e,t,n){for(var r=[],i=n!==void 0;(e=e[t])&&e.nodeType!==9;)if(e.nodeType===1){if(i&&S(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n},te=S.expr.match.needsContext,F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return m(t)?S.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):typeof t==`string`?S.filter(t,e,n):S.grep(e,function(e){return s.call(t,e)>-1!==n})}S.filter=function(e,t,n){var r=t[0];return n&&(e=`:not(`+e+`)`),t.length===1&&r.nodeType===1?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return e.nodeType===1}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(typeof e!=`string`)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return r>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,typeof e==`string`&&te.test(e)?S(e):e||[],!1).length}});var L,ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,re=S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n||=L,typeof e==`string`)if(r=e[0]===`<`&&e[e.length-1]===`>`&&e.length>=3?[null,e,null]:ne.exec(e),r&&(r[1]||!t))if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),F.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}else return i=g.getElementById(r[2]),i&&(this[0]=i,this.length=1),this;else if(!t||t.jquery)return(t||n).find(e);else return this.constructor(t).find(e);else if(e.nodeType)return this[0]=e,this.length=1,this;else if(m(e))return n.ready===void 0?e(S):n.ready(e);return S.makeArray(e,this)};re.prototype=S.fn,L=S(g);var ie=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,a=[],o=typeof e!=`string`&&S(e);if(!te.test(e)){for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:n.nodeType===1&&S.find.matchesSelector(n,e))){a.push(n);break}}return this.pushStack(a.length>1?S.uniqueSort(a):a)},index:function(e){return e?typeof e==`string`?s.call(S(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function ae(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}S.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return N(e,`parentNode`)},parentsUntil:function(e,t,n){return N(e,`parentNode`,n)},next:function(e){return ae(e,`nextSibling`)},prev:function(e){return ae(e,`previousSibling`)},nextAll:function(e){return N(e,`nextSibling`)},prevAll:function(e){return N(e,`previousSibling`)},nextUntil:function(e,t,n){return N(e,`nextSibling`,n)},prevUntil:function(e,t,n){return N(e,`previousSibling`,n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return e.contentDocument!=null&&r(e.contentDocument)?e.contentDocument:(w(e,`template`)&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return e.slice(-5)!==`Until`&&(r=n),r&&typeof r==`string`&&(i=S.filter(r,i)),this.length>1&&(R[e]||S.uniqueSort(i),ie.test(e)&&i.reverse()),this.pushStack(i)}});var z=/[^\x20\t\r\n\f]+/g;function B(e){var t={};return S.each(e.match(z)||[],function(e,n){t[n]=!0}),t}S.Callbacks=function(e){e=typeof e==`string`?B(e):S.extend({},e);var t,n,r,i,a=[],o=[],s=-1,c=function(){for(i||=e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:``)},l={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),(function t(n){S.each(n,function(n,r){m(r)?(!e.unique||!l.has(r))&&a.push(r):r&&r.length&&y(r)!==`string`&&t(r)})})(arguments),n&&!t&&c()),this},remove:function(){return S.each(arguments,function(e,t){for(var n;(n=S.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?S.inArray(e,a)>-1:a.length>0},empty:function(){return a&&=[],this},disable:function(){return i=o=[],a=n=``,this},disabled:function(){return!a},lock:function(){return i=o=[],!n&&!t&&(a=n=``),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n||=[],n=[e,n.slice?n.slice():n],o.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function oe(e){return e}function se(e){throw e}function ce(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.extend({Deferred:function(t){var n=[[`notify`,`progress`,S.Callbacks(`memory`),S.Callbacks(`memory`),2],[`resolve`,`done`,S.Callbacks(`once memory`),S.Callbacks(`once memory`),0,`resolved`],[`reject`,`fail`,S.Callbacks(`once memory`),S.Callbacks(`once memory`),1,`rejected`]],r=`pending`,i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(t){S.each(n,function(n,r){var i=m(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+`With`](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var a=0;function o(t,n,r,i){return function(){var s=this,c=arguments,l=function(){var e,l;if(!(t<a)){if(e=r.apply(s,c),e===n.promise())throw TypeError(`Thenable self-resolution`);l=e&&(typeof e==`object`||typeof e==`function`)&&e.then,m(l)?i?l.call(e,o(a,n,oe,i),o(a,n,se,i)):(a++,l.call(e,o(a,n,oe,i),o(a,n,se,i),o(a,n,oe,n.notifyWith))):(r!==oe&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},u=i?l:function(){try{l()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,u.error),t+1>=a&&(r!==se&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?u():(S.Deferred.getErrorHook?u.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(u.error=S.Deferred.getStackHook()),e.setTimeout(u))}}return S.Deferred(function(e){n[0][3].add(o(0,e,m(i)?i:oe,e.notifyWith)),n[1][3].add(o(0,e,m(t)?t:oe)),n[2][3].add(o(0,e,m(r)?r:se))}).promise()},promise:function(e){return e==null?i:S.extend(e,i)}},a={};return S.each(n,function(e,t){var o=t[2],s=t[5];i[t[1]]=o.add,s&&o.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),o.add(t[3].fire),a[t[0]]=function(){return a[t[0]+`With`](this===a?void 0:this,arguments),this},a[t[0]+`With`]=o.fireWith}),i.promise(a),t&&t.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),a=i.call(arguments),o=S.Deferred(),s=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?i.call(arguments):n,--t||o.resolveWith(r,a)}};if(t<=1&&(ce(e,o.done(s(n)).resolve,o.reject,!t),o.state()===`pending`||m(a[n]&&a[n].then)))return o.then();for(;n--;)ce(a[n],s(n),o.reject);return o.promise()}});var le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&le.test(t.name)&&e.console.warn(`jQuery.Deferred exception: `+t.message,t.stack,n)},S.readyException=function(t){e.setTimeout(function(){throw t})};var ue=S.Deferred();S.fn.ready=function(e){return ue.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(e!==!0&&--S.readyWait>0)&&ue.resolveWith(g,[S]))}}),S.ready.then=ue.then;function de(){g.removeEventListener(`DOMContentLoaded`,de),e.removeEventListener(`load`,de),S.ready()}g.readyState===`complete`||g.readyState!==`loading`&&!g.documentElement.doScroll?e.setTimeout(S.ready):(g.addEventListener(`DOMContentLoaded`,de),e.addEventListener(`load`,de));var fe=function(e,t,n,r,i,a,o){var s=0,c=e.length,l=n==null;if(y(n)===`object`)for(s in i=!0,n)fe(e,t,s,n[s],!0,a,o);else if(r!==void 0&&(i=!0,m(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<c;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):c?t(e[0],n):a},V=/^-ms-/,pe=/-([a-z])/g;function me(e,t){return t.toUpperCase()}function he(e){return e.replace(V,`ms-`).replace(pe,me)}var ge=function(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType};function _e(){this.expando=S.expando+ _e.uid++}_e.uid=1,_e.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ge(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if(typeof t==`string`)i[he(t)]=n;else for(r in t)i[he(r)]=t[r];return i},get:function(e,t){return t===void 0?this.cache(e):e[this.expando]&&e[this.expando][he(t)]},access:function(e,t,n){return t===void 0||t&&typeof t==`string`&&n===void 0?this.get(e,t):(this.set(e,t,n),n===void 0?t:n)},remove:function(e,t){var n,r=e[this.expando];if(r!==void 0){if(t!==void 0)for(Array.isArray(t)?t=t.map(he):(t=he(t),t=(t in r)?[t]:t.match(z)||[]),n=t.length;n--;)delete r[t[n]];(t===void 0||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return t!==void 0&&!S.isEmptyObject(t)}};var H=new _e,ve=new _e,ye=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,be=/[A-Z]/g;function xe(e){return e===`true`?!0:e===`false`?!1:e===`null`?null:e===+e+``?+e:ye.test(e)?JSON.parse(e):e}function Se(e,t,n){var r;if(n===void 0&&e.nodeType===1)if(r=`data-`+t.replace(be,`-$&`).toLowerCase(),n=e.getAttribute(r),typeof n==`string`){try{n=xe(n)}catch{}ve.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return ve.hasData(e)||H.hasData(e)},data:function(e,t,n){return ve.access(e,t,n)},removeData:function(e,t){ve.remove(e,t)},_data:function(e,t,n){return H.access(e,t,n)},_removeData:function(e,t){H.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,r,i,a=this[0],o=a&&a.attributes;if(e===void 0){if(this.length&&(i=ve.get(a),a.nodeType===1&&!H.get(a,`hasDataAttrs`))){for(n=o.length;n--;)o[n]&&(r=o[n].name,r.indexOf(`data-`)===0&&(r=he(r.slice(5)),Se(a,r,i[r])));H.set(a,`hasDataAttrs`,!0)}return i}return typeof e==`object`?this.each(function(){ve.set(this,e)}):fe(this,function(t){var n;if(a&&t===void 0)return n=ve.get(a,e),n!==void 0||(n=Se(a,e),n!==void 0)?n:void 0;this.each(function(){ve.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ve.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||`fx`)+`queue`,r=H.get(e,t),n&&(!r||Array.isArray(n)?r=H.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t||=`fx`;var n=S.queue(e,t),r=n.length,i=n.shift(),a=S._queueHooks(e,t);i===`inprogress`&&(i=n.shift(),r--),i&&(t===`fx`&&n.unshift(`inprogress`),delete a.stop,i.call(e,function(){S.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+`queueHooks`;return H.get(e,n)||H.access(e,n,{empty:S.Callbacks(`once memory`).add(function(){H.remove(e,[t+`queue`,n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return typeof e!=`string`&&(t=e,e=`fx`,n--),arguments.length<n?S.queue(this[0],e):t===void 0?this:this.each(function(){var n=S.queue(this,e,t);S._queueHooks(this,e),e===`fx`&&n[0]!==`inprogress`&&S.dequeue(this,e)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||`fx`,[])},promise:function(e,t){var n,r=1,i=S.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for(typeof e!=`string`&&(t=e,e=void 0),e||=`fx`;o--;)n=H.get(a[o],e+`queueHooks`),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ce=`[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)`,we=RegExp(`^(?:([+-])=|)(`+Ce+`)([a-z%]*)$`,`i`),Te=[`Top`,`Right`,`Bottom`,`Left`],Ee=g.documentElement,De=function(e){return S.contains(e.ownerDocument,e)},Oe={composed:!0};Ee.getRootNode&&(De=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(Oe)===e.ownerDocument});var ke=function(e,t){return e=t||e,e.style.display===`none`||e.style.display===``&&De(e)&&S.css(e,`display`)===`none`};function Ae(e,t,n,r){var i,a,o=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,``)},c=s(),l=n&&n[3]||(S.cssNumber[t]?``:`px`),u=e.nodeType&&(S.cssNumber[t]||l!==`px`&&+c)&&we.exec(S.css(e,t));if(u&&u[3]!==l){for(c/=2,l||=u[3],u=+c||1;o--;)S.style(e,t,u+l),(1-a)*(1-(a=s()/c||.5))<=0&&(o=0),u/=a;u*=2,S.style(e,t,u+l),n||=[]}return n&&(u=+u||+c||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=i)),i}var je={};function Me(e){var t,n=e.ownerDocument,r=e.nodeName,i=je[r];return i||(t=n.body.appendChild(n.createElement(r)),i=S.css(t,`display`),t.parentNode.removeChild(t),i===`none`&&(i=`block`),je[r]=i,i)}function Ne(e,t){for(var n,r,i=[],a=0,o=e.length;a<o;a++)r=e[a],r.style&&(n=r.style.display,t?(n===`none`&&(i[a]=H.get(r,`display`)||null,i[a]||(r.style.display=``)),r.style.display===``&&ke(r)&&(i[a]=Me(r))):n!==`none`&&(i[a]=`none`,H.set(r,`display`,n)));for(a=0;a<o;a++)i[a]!=null&&(e[a].style.display=i[a]);return e}S.fn.extend({show:function(){return Ne(this,!0)},hide:function(){return Ne(this)},toggle:function(e){return typeof e==`boolean`?e?this.show():this.hide():this.each(function(){ke(this)?S(this).show():S(this).hide()})}});var Pe=/^(?:checkbox|radio)$/i,Fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ie=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=g.createDocumentFragment().appendChild(g.createElement(`div`)),t=g.createElement(`input`);t.setAttribute(`type`,`radio`),t.setAttribute(`checked`,`checked`),t.setAttribute(`name`,`t`),e.appendChild(t),p.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML=`<textarea>x</textarea>`,p.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,e.innerHTML=`<option></option>`,p.option=!!e.lastChild})();var Le={thead:[1,`<table>`,`</table>`],col:[2,`<table><colgroup>`,`</colgroup></table>`],tr:[2,`<table><tbody>`,`</tbody></table>`],td:[3,`<table><tbody><tr>`,`</tr></tbody></table>`],_default:[0,``,``]};Le.tbody=Le.tfoot=Le.colgroup=Le.caption=Le.thead,Le.th=Le.td,p.option||(Le.optgroup=Le.option=[1,`<select multiple='multiple'>`,`</select>`]);function Re(e,t){var n=e.getElementsByTagName===void 0?e.querySelectorAll===void 0?[]:e.querySelectorAll(t||`*`):e.getElementsByTagName(t||`*`);return t===void 0||t&&w(e,t)?S.merge([e],n):n}function ze(e,t){for(var n=0,r=e.length;n<r;n++)H.set(e[n],`globalEval`,!t||H.get(t[n],`globalEval`))}var Be=/<|&#?\w+;/;function Ve(e,t,n,r,i){for(var a,o,s,c,l,u,d=t.createDocumentFragment(),f=[],p=0,m=e.length;p<m;p++)if(a=e[p],a||a===0)if(y(a)===`object`)S.merge(f,a.nodeType?[a]:a);else if(!Be.test(a))f.push(t.createTextNode(a));else{for(o||=d.appendChild(t.createElement(`div`)),s=(Fe.exec(a)||[``,``])[1].toLowerCase(),c=Le[s]||Le._default,o.innerHTML=c[1]+S.htmlPrefilter(a)+c[2],u=c[0];u--;)o=o.lastChild;S.merge(f,o.childNodes),o=d.firstChild,o.textContent=``}for(d.textContent=``,p=0;a=f[p++];){if(r&&S.inArray(a,r)>-1){i&&i.push(a);continue}if(l=De(a),o=Re(d.appendChild(a),`script`),l&&ze(o),n)for(u=0;a=o[u++];)Ie.test(a.type||``)&&n.push(a)}return d}var He=/^([^.]*)(?:\.(.+)|)/;function Ue(){return!0}function We(){return!1}function Ge(e,t,n,r,i,a){var o,s;if(typeof t==`object`){for(s in typeof n!=`string`&&(r||=n,n=void 0),t)Ge(e,s,n,r,t[s],a);return e}if(r==null&&i==null?(i=n,r=n=void 0):i??(typeof n==`string`?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=We;else if(!i)return e;return a===1&&(o=i,i=function(e){return S().off(e),o.apply(this,arguments)},i.guid=o.guid||=S.guid++),e.each(function(){S.event.add(this,t,i,r,n)})}S.event={global:{},add:function(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g=H.get(e);if(ge(e))for(n.handler&&(a=n,n=a.handler,i=a.selector),i&&S.find.matchesSelector(Ee,i),n.guid||=S.guid++,(c=g.events)||(c=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return S!==void 0&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),t=(t||``).match(z)||[``],l=t.length;l--;)s=He.exec(t[l])||[],p=h=s[1],m=(s[2]||``).split(`.`).sort(),p&&(d=S.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},u=S.extend({type:p,origType:h,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:m.join(`.`)},a),(f=c[p])||(f=c[p]=[],f.delegateCount=0,(!d.setup||d.setup.call(e,r,m,o)===!1)&&e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,u):f.push(u),S.event.global[p]=!0)},remove:function(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g=H.hasData(e)&&H.get(e);if(!(!g||!(c=g.events))){for(t=(t||``).match(z)||[``],l=t.length;l--;){if(s=He.exec(t[l])||[],p=h=s[1],m=(s[2]||``).split(`.`).sort(),!p){for(p in c)S.event.remove(e,p+t[l],n,r,!0);continue}for(d=S.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&RegExp(`(^|\\.)`+m.join(`\\.(?:.*\\.|)`)+`(\\.|$)`),o=a=f.length;a--;)u=f[a],(i||h===u.origType)&&(!n||n.guid===u.guid)&&(!s||s.test(u.namespace))&&(!r||r===u.selector||r===`**`&&u.selector)&&(f.splice(a,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));o&&!f.length&&((!d.teardown||d.teardown.call(e,m,g.handle)===!1)&&S.removeEvent(e,p,g.handle),delete c[p])}S.isEmptyObject(c)&&H.remove(e,`handle events`)}},dispatch:function(e){var t,n,r,i,a,o,s=Array(arguments.length),c=S.event.fix(e),l=(H.get(this,`events`)||Object.create(null))[c.type]||[],u=S.event.special[c.type]||{};for(s[0]=c,t=1;t<arguments.length;t++)s[t]=arguments[t];if(c.delegateTarget=this,!(u.preDispatch&&u.preDispatch.call(this,c)===!1)){for(o=S.event.handlers.call(this,c,l),t=0;(i=o[t++])&&!c.isPropagationStopped();)for(c.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!c.isImmediatePropagationStopped();)(!c.rnamespace||a.namespace===!1||c.rnamespace.test(a.namespace))&&(c.handleObj=a,c.data=a.data,r=((S.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s),r!==void 0&&(c.result=r)===!1&&(c.preventDefault(),c.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,c),c.result}},handlers:function(e,t){var n,r,i,a,o,s=[],c=t.delegateCount,l=e.target;if(c&&l.nodeType&&!(e.type===`click`&&e.button>=1)){for(;l!==this;l=l.parentNode||this)if(l.nodeType===1&&!(e.type===`click`&&l.disabled===!0)){for(a=[],o={},n=0;n<c;n++)r=t[n],i=r.selector+` `,o[i]===void 0&&(o[i]=r.needsContext?S(i,this).index(l)>-1:S.find(i,this,null,[l]).length),o[i]&&a.push(r);a.length&&s.push({elem:l,handlers:a})}}return l=this,c<t.length&&s.push({elem:l,handlers:t.slice(c)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Pe.test(t.type)&&t.click&&w(t,`input`)&&Ke(t,`click`,!0),!1},trigger:function(e){var t=this||e;return Pe.test(t.type)&&t.click&&w(t,`input`)&&Ke(t,`click`),!0},_default:function(e){var t=e.target;return Pe.test(t.type)&&t.click&&w(t,`input`)&&H.get(t,`click`)||w(t,`a`)}},beforeunload:{postDispatch:function(e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}};function Ke(e,t,n){if(!n){H.get(e,t)===void 0&&S.event.add(e,t,Ue);return}H.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,r=H.get(this,t);if(e.isTrigger&1&&this[t]){if(r)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),H.set(this,t,r),this[t](),n=H.get(this,t),H.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(H.set(this,t,S.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ue)}})}S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===void 0&&e.returnValue===!1?Ue:We,this.target=e.target&&e.target.nodeType===3?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:We,isPropagationStopped:We,isImmediatePropagationStopped:We,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ue,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ue,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ue,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:`focusin`,blur:`focusout`},function(e,t){function n(e){if(g.documentMode){var n=H.get(this,`handle`),r=S.event.fix(e);r.type=e.type===`focusin`?`focus`:`blur`,r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else S.event.simulate(t,e.target,S.event.fix(e))}S.event.special[e]={setup:function(){var r;if(Ke(this,e,!0),g.documentMode)r=H.get(this,t),r||this.addEventListener(t,n),H.set(this,t,(r||0)+1);else return!1},trigger:function(){return Ke(this,e),!0},teardown:function(){var e;if(g.documentMode)e=H.get(this,t)-1,e?H.set(this,t,e):(this.removeEventListener(t,n),H.remove(this,t));else return!1},_default:function(t){return H.get(t.target,e)},delegateType:t},S.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,a=H.get(i,t);a||(g.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),H.set(i,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,a=H.get(i,t)-1;a?H.set(i,t,a):(g.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),H.remove(i,t))}}}),S.each({mouseenter:`mouseover`,mouseleave:`mouseout`,pointerenter:`pointerover`,pointerleave:`pointerout`},function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,a=e.handleObj;return(!i||i!==r&&!S.contains(r,i))&&(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),S.fn.extend({on:function(e,t,n,r){return Ge(this,e,t,n,r)},one:function(e,t,n,r){return Ge(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+`.`+r.namespace:r.origType,r.selector,r.handler),this;if(typeof e==`object`){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||typeof t==`function`)&&(n=t,t=void 0),n===!1&&(n=We),this.each(function(){S.event.remove(this,e,n,t)})}});var qe=/<script|<style|<link/i,Je=/checked\s*(?:[^=]|=\s*.checked.)/i,Ye=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Xe(e,t){return w(e,`table`)&&w(t.nodeType===11?t.firstChild:t,`tr`)&&S(e).children(`tbody`)[0]||e}function Ze(e){return e.type=(e.getAttribute(`type`)!==null)+`/`+e.type,e}function Qe(e){return(e.type||``).slice(0,5)===`true/`?e.type=e.type.slice(5):e.removeAttribute(`type`),e}function $e(e,t){var n,r,i,a,o,s,c;if(t.nodeType===1){if(H.hasData(e)&&(a=H.get(e),c=a.events,c))for(i in H.remove(t,`handle events`),c)for(n=0,r=c[i].length;n<r;n++)S.event.add(t,i,c[i][n]);ve.hasData(e)&&(o=ve.access(e),s=S.extend({},o),ve.set(t,s))}}function et(e,t){var n=t.nodeName.toLowerCase();n===`input`&&Pe.test(e.type)?t.checked=e.checked:(n===`input`||n===`textarea`)&&(t.defaultValue=e.defaultValue)}function tt(e,t,n,r){t=a(t);var i,o,s,c,l,u,d=0,f=e.length,h=f-1,g=t[0],_=m(g);if(_||f>1&&typeof g==`string`&&!p.checkClone&&Je.test(g))return e.each(function(i){var a=e.eq(i);_&&(t[0]=g.call(this,i,a.html())),tt(a,t,n,r)});if(f&&(i=Ve(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,i.childNodes.length===1&&(i=o),o||r)){for(s=S.map(Re(i,`script`),Ze),c=s.length;d<f;d++)l=i,d!==h&&(l=S.clone(l,!0,!0),c&&S.merge(s,Re(l,`script`))),n.call(e[d],l,d);if(c)for(u=s[s.length-1].ownerDocument,S.map(s,Qe),d=0;d<c;d++)l=s[d],Ie.test(l.type||``)&&!H.access(l,`globalEval`)&&S.contains(u,l)&&(l.src&&(l.type||``).toLowerCase()!==`module`?S._evalUrl&&!l.noModule&&S._evalUrl(l.src,{nonce:l.nonce||l.getAttribute(`nonce`)},u):v(l.textContent.replace(Ye,``),l,u))}return e}function nt(e,t,n){for(var r,i=t?S.filter(t,e):e,a=0;(r=i[a])!=null;a++)!n&&r.nodeType===1&&S.cleanData(Re(r)),r.parentNode&&(n&&De(r)&&ze(Re(r,`script`)),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,a,o,s=e.cloneNode(!0),c=De(e);if(!p.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!S.isXMLDoc(e))for(o=Re(s),a=Re(e),r=0,i=a.length;r<i;r++)et(a[r],o[r]);if(t)if(n)for(a||=Re(e),o||=Re(s),r=0,i=a.length;r<i;r++)$e(a[r],o[r]);else $e(e,s);return o=Re(s,`script`),o.length>0&&ze(o,!c&&Re(e,`script`)),s},cleanData:function(e){for(var t,n,r,i=S.event.special,a=0;(n=e[a])!==void 0;a++)if(ge(n)){if(t=n[H.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[H.expando]=void 0}n[ve.expando]&&(n[ve.expando]=void 0)}}}),S.fn.extend({detach:function(e){return nt(this,e,!0)},remove:function(e){return nt(this,e)},text:function(e){return fe(this,function(e){return e===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return tt(this,arguments,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&Xe(this,e).appendChild(e)})},prepend:function(){return tt(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Xe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return tt(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return tt(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;(e=this[t])!=null;t++)e.nodeType===1&&(S.cleanData(Re(e,!1)),e.textContent=``);return this},clone:function(e,t){return e??=!1,t??=e,this.map(function(){return S.clone(this,e,t)})},html:function(e){return fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===void 0&&t.nodeType===1)return t.innerHTML;if(typeof e==`string`&&!qe.test(e)&&!Le[(Fe.exec(e)||[``,``])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},t.nodeType===1&&(S.cleanData(Re(t,!1)),t.innerHTML=e);t=0}catch{}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return tt(this,arguments,function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(Re(this)),n&&n.replaceChild(t,this))},e)}}),S.each({appendTo:`append`,prependTo:`prepend`,insertBefore:`before`,insertAfter:`after`,replaceAll:`replaceWith`},function(e,t){S.fn[e]=function(e){for(var n,r=[],i=S(e),a=i.length-1,s=0;s<=a;s++)n=s===a?this:this.clone(!0),S(i[s])[t](n),o.apply(r,n.get());return this.pushStack(r)}});var rt=RegExp(`^(`+Ce+`)(?!px)[a-z%]+$`,`i`),it=/^--/,at=function(t){var n=t.ownerDocument.defaultView;return(!n||!n.opener)&&(n=e),n.getComputedStyle(t)},ot=function(e,t,n){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=a[i];return r},st=new RegExp(Te.join(`|`),`i`);(function(){function t(){if(u){l.style.cssText=`position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0`,u.style.cssText=`position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%`,Ee.appendChild(l).appendChild(u);var t=e.getComputedStyle(u);r=t.top!==`1%`,c=n(t.marginLeft)===12,u.style.right=`60%`,o=n(t.right)===36,i=n(t.width)===36,u.style.position=`absolute`,a=n(u.offsetWidth/3)===12,Ee.removeChild(l),u=null}}function n(e){return Math.round(parseFloat(e))}var r,i,a,o,s,c,l=g.createElement(`div`),u=g.createElement(`div`);u.style&&(u.style.backgroundClip=`content-box`,u.cloneNode(!0).style.backgroundClip=``,p.clearCloneStyle=u.style.backgroundClip===`content-box`,S.extend(p,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),c},scrollboxSize:function(){return t(),a},reliableTrDimensions:function(){var t,n,r,i;return s??(t=g.createElement(`table`),n=g.createElement(`tr`),r=g.createElement(`div`),t.style.cssText=`position:absolute;left:-11111px;border-collapse:separate`,n.style.cssText=`box-sizing:content-box;border:1px solid`,n.style.height=`1px`,r.style.height=`9px`,r.style.display=`block`,Ee.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,Ee.removeChild(t)),s}}))})();function ct(e,t,n){var r,i,a,o,s=it.test(t),c=e.style;return n||=at(e),n&&(o=n.getPropertyValue(t)||n[t],s&&o&&(o=o.replace(k,`$1`)||void 0),o===``&&!De(e)&&(o=S.style(e,t)),!p.pixelBoxStyles()&&rt.test(o)&&st.test(t)&&(r=c.width,i=c.minWidth,a=c.maxWidth,c.minWidth=c.maxWidth=c.width=o,o=n.width,c.width=r,c.minWidth=i,c.maxWidth=a)),o===void 0?o:o+``}function lt(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}var ut=[`Webkit`,`Moz`,`ms`],dt=g.createElement(`div`).style,ft={};function pt(e){for(var t=e[0].toUpperCase()+e.slice(1),n=ut.length;n--;)if(e=ut[n]+t,e in dt)return e}function mt(e){return S.cssProps[e]||ft[e]||(e in dt?e:ft[e]=pt(e)||e)}var ht=/^(none|table(?!-c[ea]).+)/,gt={position:`absolute`,visibility:`hidden`,display:`block`},_t={letterSpacing:`0`,fontWeight:`400`};function vt(e,t,n){var r=we.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||`px`):t}function yt(e,t,n,r,i,a){var o=+(t===`width`),s=0,c=0,l=0;if(n===(r?`border`:`content`))return 0;for(;o<4;o+=2)n===`margin`&&(l+=S.css(e,n+Te[o],!0,i)),r?(n===`content`&&(c-=S.css(e,`padding`+Te[o],!0,i)),n!==`margin`&&(c-=S.css(e,`border`+Te[o]+`Width`,!0,i))):(c+=S.css(e,`padding`+Te[o],!0,i),n===`padding`?s+=S.css(e,`border`+Te[o]+`Width`,!0,i):c+=S.css(e,`border`+Te[o]+`Width`,!0,i));return!r&&a>=0&&(c+=Math.max(0,Math.ceil(e[`offset`+t[0].toUpperCase()+t.slice(1)]-a-c-s-.5))||0),c+l}function bt(e,t,n){var r=at(e),i=(!p.boxSizingReliable()||n)&&S.css(e,`boxSizing`,!1,r)===`border-box`,a=i,o=ct(e,t,r),s=`offset`+t[0].toUpperCase()+t.slice(1);if(rt.test(o)){if(!n)return o;o=`auto`}return(!p.boxSizingReliable()&&i||!p.reliableTrDimensions()&&w(e,`tr`)||o===`auto`||!parseFloat(o)&&S.css(e,`display`,!1,r)===`inline`)&&e.getClientRects().length&&(i=S.css(e,`boxSizing`,!1,r)===`border-box`,a=s in e,a&&(o=e[s])),o=parseFloat(o)||0,o+yt(e,t,n||(i?`border`:`content`),a,r,o)+`px`}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ct(e,`opacity`);return n===``?`1`:n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(!(!e||e.nodeType===3||e.nodeType===8||!e.style)){var i,a,o,s=he(t),c=it.test(t),l=e.style;if(c||(t=mt(s)),o=S.cssHooks[t]||S.cssHooks[s],n!==void 0){if(a=typeof n,a===`string`&&(i=we.exec(n))&&i[1]&&(n=Ae(e,t,i),a=`number`),n==null||n!==n)return;a===`number`&&!c&&(n+=i&&i[3]||(S.cssNumber[s]?``:`px`)),!p.clearCloneStyle&&n===``&&t.indexOf(`background`)===0&&(l[t]=`inherit`),(!o||!(`set`in o)||(n=o.set(e,n,r))!==void 0)&&(c?l.setProperty(t,n):l[t]=n)}else return o&&`get`in o&&(i=o.get(e,!1,r))!==void 0?i:l[t]}},css:function(e,t,n,r){var i,a,o,s=he(t);return it.test(t)||(t=mt(s)),o=S.cssHooks[t]||S.cssHooks[s],o&&`get`in o&&(i=o.get(e,!0,n)),i===void 0&&(i=ct(e,t,r)),i===`normal`&&t in _t&&(i=_t[t]),n===``||n?(a=parseFloat(i),n===!0||isFinite(a)?a||0:i):i}}),S.each([`height`,`width`],function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return ht.test(S.css(e,`display`))&&(!e.getClientRects().length||!e.getBoundingClientRect().width)?ot(e,gt,function(){return bt(e,t,r)}):bt(e,t,r)},set:function(e,n,r){var i,a=at(e),o=!p.scrollboxSize()&&a.position===`absolute`,s=(o||r)&&S.css(e,`boxSizing`,!1,a)===`border-box`,c=r?yt(e,t,r,s,a):0;return s&&o&&(c-=Math.ceil(e[`offset`+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-yt(e,t,`border`,!1,a)-.5)),c&&(i=we.exec(n))&&(i[3]||`px`)!==`px`&&(e.style[t]=n,n=S.css(e,t)),vt(e,n,c)}}}),S.cssHooks.marginLeft=lt(p.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ct(e,`marginLeft`))||e.getBoundingClientRect().left-ot(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+`px`}),S.each({margin:``,padding:``,border:`Width`},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a=typeof n==`string`?n.split(` `):[n];r<4;r++)i[e+Te[r]+t]=a[r]||a[r-2]||a[0];return i}},e!==`margin`&&(S.cssHooks[e+t].set=vt)}),S.fn.extend({css:function(e,t){return fe(this,function(e,t,n){var r,i,a={},o=0;if(Array.isArray(t)){for(r=at(e),i=t.length;o<i;o++)a[t[o]]=S.css(e,t[o],!1,r);return a}return n===void 0?S.css(e,t):S.style(e,t,n)},e,t,arguments.length>1)}});function xt(e,t,n,r,i){return new xt.prototype.init(e,t,n,r,i)}S.Tween=xt,xt.prototype={constructor:xt,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(S.cssNumber[n]?``:`px`)},cur:function(){var e=xt.propHooks[this.prop];return e&&e.get?e.get(this):xt.propHooks._default.get(this)},run:function(e){var t,n=xt.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):xt.propHooks._default.set(this),this}},xt.prototype.init.prototype=xt.prototype,xt.propHooks={_default:{get:function(e){var t;return e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null?e.elem[e.prop]:(t=S.css(e.elem,e.prop,``),!t||t===`auto`?0:t)},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):e.elem.nodeType===1&&(S.cssHooks[e.prop]||e.elem.style[mt(e.prop)]!=null)?S.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},xt.propHooks.scrollTop=xt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:`swing`},S.fx=xt.prototype.init,S.fx.step={};var St,Ct,wt=/^(?:toggle|show|hide)$/,Tt=/queueHooks$/;function Et(){Ct&&(g.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(Et):e.setTimeout(Et,S.fx.interval),S.fx.tick())}function Dt(){return e.setTimeout(function(){St=void 0}),St=Date.now()}function Ot(e,t){var n,r=0,i={height:e};for(t=+!!t;r<4;r+=2-t)n=Te[r],i[`margin`+n]=i[`padding`+n]=e;return t&&(i.opacity=i.width=e),i}function kt(e,t,n){for(var r,i=(Mt.tweeners[t]||[]).concat(Mt.tweeners[`*`]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function At(e,t,n){var r,i,a,o,s,c,l,u,d=`width`in t||`height`in t,f=this,p={},m=e.style,h=e.nodeType&&ke(e),g=H.get(e,`fxshow`);for(r in n.queue||(o=S._queueHooks(e,`fx`),o.unqueued??(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,S.queue(e,`fx`).length||o.empty.fire()})})),t)if(i=t[r],wt.test(i)){if(delete t[r],a||=i===`toggle`,i===(h?`hide`:`show`))if(i===`show`&&g&&g[r]!==void 0)h=!0;else continue;p[r]=g&&g[r]||S.style(e,r)}if(c=!S.isEmptyObject(t),!(!c&&S.isEmptyObject(p)))for(r in d&&e.nodeType===1&&(n.overflow=[m.overflow,m.overflowX,m.overflowY],l=g&&g.display,l??=H.get(e,`display`),u=S.css(e,`display`),u===`none`&&(l?u=l:(Ne([e],!0),l=e.style.display||l,u=S.css(e,`display`),Ne([e]))),(u===`inline`||u===`inline-block`&&l!=null)&&S.css(e,`float`)===`none`&&(c||(f.done(function(){m.display=l}),l??=(u=m.display,u===`none`?``:u)),m.display=`inline-block`)),n.overflow&&(m.overflow=`hidden`,f.always(function(){m.overflow=n.overflow[0],m.overflowX=n.overflow[1],m.overflowY=n.overflow[2]})),c=!1,p)c||(g?`hidden`in g&&(h=g.hidden):g=H.access(e,`fxshow`,{display:l}),a&&(g.hidden=!h),h&&Ne([e],!0),f.done(function(){for(r in h||Ne([e]),H.remove(e,`fxshow`),p)S.style(e,r,p[r])})),c=kt(h?g[r]:0,r,f),r in g||(g[r]=c.start,h&&(c.end=c.start,c.start=0))}function jt(e,t){var n,r,i,a,o;for(n in e)if(r=he(n),i=t[r],a=e[n],Array.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),o=S.cssHooks[r],o&&`expand`in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}function Mt(e,t,n){var r,i,a=0,o=Mt.prefilters.length,s=S.Deferred().always(function(){delete c.elem}),c=function(){if(i)return!1;for(var t=St||Dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),a=0,o=l.tweens.length;a<o;a++)l.tweens[a].run(r);return s.notifyWith(e,[l,r,n]),r<1&&o?n:(o||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:St||Dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=S.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),u=l.props;for(jt(u,l.opts.specialEasing);a<o;a++)if(r=Mt.prefilters[a].call(l,e,u,l.opts),r)return m(r.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return S.map(u,kt,l),m(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(Mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return Ae(n.elem,e,we.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=[`*`]):e=e.match(z);for(var n,r=0,i=e.length;r<i;r++)n=e[r],Mt.tweeners[n]=Mt.tweeners[n]||[],Mt.tweeners[n].unshift(t)},prefilters:[At],prefilter:function(e,t){t?Mt.prefilters.unshift(e):Mt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&typeof e==`object`?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:typeof r.duration!=`number`&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),(r.queue==null||r.queue===!0)&&(r.queue=`fx`),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ke).css(`opacity`,0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=S.isEmptyObject(e),a=S.speed(t,n,r),o=function(){var t=Mt(this,S.extend({},e),a);(i||H.get(this,`finish`))&&t.stop(!0)};return o.finish=o,i||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return typeof e!=`string`&&(n=t,t=e,e=void 0),t&&this.queue(e||`fx`,[]),this.each(function(){var t=!0,i=e!=null&&e+`queueHooks`,a=S.timers,o=H.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&Tt.test(i)&&r(o[i]);for(i=a.length;i--;)a[i].elem===this&&(e==null||a[i].queue===e)&&(a[i].anim.stop(n),t=!1,a.splice(i,1));(t||!n)&&S.dequeue(this,e)})},finish:function(e){return e!==!1&&(e||=`fx`),this.each(function(){var t,n=H.get(this),r=n[e+`queue`],i=n[e+`queueHooks`],a=S.timers,o=r?r.length:0;for(n.finish=!0,S.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),S.each([`toggle`,`show`,`hide`],function(e,t){var n=S.fn[t];S.fn[t]=function(e,r,i){return e==null||typeof e==`boolean`?n.apply(this,arguments):this.animate(Ot(t,!0),e,r,i)}}),S.each({slideDown:Ot(`show`),slideUp:Ot(`hide`),slideToggle:Ot(`toggle`),fadeIn:{opacity:`show`},fadeOut:{opacity:`hide`},fadeToggle:{opacity:`toggle`}},function(e,t){S.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(St=Date.now();t<n.length;t++)e=n[t],!e()&&n[t]===e&&n.splice(t--,1);n.length||S.fx.stop(),St=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){Ct||(Ct=!0,Et())},S.fx.stop=function(){Ct=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(t,n){return t=S.fx&&S.fx.speeds[t]||t,n||=`fx`,this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},(function(){var e=g.createElement(`input`),t=g.createElement(`select`).appendChild(g.createElement(`option`));e.type=`checkbox`,p.checkOn=e.value!==``,p.optSelected=t.selected,e=g.createElement(`input`),e.value=`t`,e.type=`radio`,p.radioValue=e.value===`t`})();var Nt,Pt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return fe(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(!(a===3||a===8||a===2)){if(e.getAttribute===void 0)return S.prop(e,t,n);if((a!==1||!S.isXMLDoc(e))&&(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?Nt:void 0)),n!==void 0){if(n===null){S.removeAttr(e,t);return}return i&&`set`in i&&(r=i.set(e,n,t))!==void 0?r:(e.setAttribute(t,n+``),n)}return i&&`get`in i&&(r=i.get(e,t))!==null?r:(r=S.find.attr(e,t),r??void 0)}},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&t===`radio`&&w(e,`input`)){var n=e.value;return e.setAttribute(`type`,t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(z);if(i&&e.nodeType===1)for(;n=i[r++];)e.removeAttribute(n)}}),Nt={set:function(e,t,n){return t===!1?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Pt[t]||S.find.attr;Pt[t]=function(e,t,r){var i,a,o=t.toLowerCase();return r||(a=Pt[o],Pt[o]=i,i=n(e,t,r)==null?null:o,Pt[o]=a),i}});var Ft=/^(?:input|select|textarea|button)$/i,It=/^(?:a|area)$/i;S.fn.extend({prop:function(e,t){return fe(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(!(a===3||a===8||a===2))return(a!==1||!S.isXMLDoc(e))&&(t=S.propFix[t]||t,i=S.propHooks[t]),n===void 0?i&&`get`in i&&(r=i.get(e,t))!==null?r:e[t]:i&&`set`in i&&(r=i.set(e,n,t))!==void 0?r:e[t]=n},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,`tabindex`);return t?parseInt(t,10):Ft.test(e.nodeName)||It.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:`htmlFor`,class:`className`}}),p.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each([`tabIndex`,`readOnly`,`maxLength`,`cellSpacing`,`cellPadding`,`rowSpan`,`colSpan`,`useMap`,`frameBorder`,`contentEditable`],function(){S.propFix[this.toLowerCase()]=this});function Lt(e){return(e.match(z)||[]).join(` `)}function Rt(e){return e.getAttribute&&e.getAttribute(`class`)||``}function zt(e){return Array.isArray(e)?e:typeof e==`string`&&e.match(z)||[]}S.fn.extend({addClass:function(e){var t,n,r,i,a,o;return m(e)?this.each(function(t){S(this).addClass(e.call(this,t,Rt(this)))}):(t=zt(e),t.length?this.each(function(){if(r=Rt(this),n=this.nodeType===1&&` `+Lt(r)+` `,n){for(a=0;a<t.length;a++)i=t[a],n.indexOf(` `+i+` `)<0&&(n+=i+` `);o=Lt(n),r!==o&&this.setAttribute(`class`,o)}}):this)},removeClass:function(e){var t,n,r,i,a,o;return m(e)?this.each(function(t){S(this).removeClass(e.call(this,t,Rt(this)))}):arguments.length?(t=zt(e),t.length?this.each(function(){if(r=Rt(this),n=this.nodeType===1&&` `+Lt(r)+` `,n){for(a=0;a<t.length;a++)for(i=t[a];n.indexOf(` `+i+` `)>-1;)n=n.replace(` `+i+` `,` `);o=Lt(n),r!==o&&this.setAttribute(`class`,o)}}):this):this.attr(`class`,``)},toggleClass:function(e,t){var n,r,i,a,o=typeof e,s=o===`string`||Array.isArray(e);return m(e)?this.each(function(n){S(this).toggleClass(e.call(this,n,Rt(this),t),t)}):typeof t==`boolean`&&s?t?this.addClass(e):this.removeClass(e):(n=zt(e),this.each(function(){if(s)for(a=S(this),i=0;i<n.length;i++)r=n[i],a.hasClass(r)?a.removeClass(r):a.addClass(r);else (e===void 0||o===`boolean`)&&(r=Rt(this),r&&H.set(this,`__className__`,r),this.setAttribute&&this.setAttribute(`class`,r||e===!1?``:H.get(this,`__className__`)||``))}))},hasClass:function(e){var t,n,r=0;for(t=` `+e+` `;n=this[r++];)if(n.nodeType===1&&(` `+Lt(Rt(n))+` `).indexOf(t)>-1)return!0;return!1}});var Bt=/\r/g;S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each(function(n){var i;this.nodeType===1&&(i=r?e.call(this,n,S(this).val()):e,i==null?i=``:typeof i==`number`?i+=``:Array.isArray(i)&&(i=S.map(i,function(e){return e==null?``:e+``})),t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!t||!(`set`in t)||t.set(this,i,`value`)===void 0)&&(this.value=i))})):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()],t&&`get`in t&&(n=t.get(i,`value`))!==void 0?n:(n=i.value,typeof n==`string`?n.replace(Bt,``):n??``)):void 0}}),S.extend({valHooks:{option:{get:function(e){return S.find.attr(e,`value`)??Lt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,o=e.type===`select-one`,s=o?null:[],c=o?a+1:i.length;for(r=a<0?c:o?a:0;r<c;r++)if(n=i[r],(n.selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!w(n.parentNode,`optgroup`))){if(t=S(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,a=S.makeArray(t),o=i.length;o--;)r=i[o],(r.selected=S.inArray(S.valHooks.option.get(r),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),S.each([`radio`,`checkbox`],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},p.checkOn||(S.valHooks[this].get=function(e){return e.getAttribute(`value`)===null?`on`:e.value})});var Vt=e.location,Ht={guid:Date.now()},Ut=/\?/;S.parseXML=function(t){var n,r;if(!t||typeof t!=`string`)return null;try{n=new e.DOMParser().parseFromString(t,`text/xml`)}catch{}return r=n&&n.getElementsByTagName(`parsererror`)[0],(!n||r)&&S.error(`Invalid XML: `+(r?S.map(r.childNodes,function(e){return e.textContent}).join(`
310
310
  `):t)),n};var Wt=/^(?:focusinfocus|focusoutblur)$/,Gt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(t,n,r,i){var a,o,s,c,l,d,f,p,_=[r||g],v=u.call(t,`type`)?t.type:t,y=u.call(t,`namespace`)?t.namespace.split(`.`):[];if(o=p=s=r||=g,!(r.nodeType===3||r.nodeType===8)&&!Wt.test(v+S.event.triggered)&&(v.indexOf(`.`)>-1&&(y=v.split(`.`),v=y.shift(),y.sort()),l=v.indexOf(`:`)<0&&`on`+v,t=t[S.expando]?t:new S.Event(v,typeof t==`object`&&t),t.isTrigger=i?2:3,t.namespace=y.join(`.`),t.rnamespace=t.namespace?RegExp(`(^|\\.)`+y.join(`\\.(?:.*\\.|)`)+`(\\.|$)`):null,t.result=void 0,t.target||=r,n=n==null?[t]:S.makeArray(n,[t]),f=S.event.special[v]||{},!(!i&&f.trigger&&f.trigger.apply(r,n)===!1))){if(!i&&!f.noBubble&&!h(r)){for(c=f.delegateType||v,Wt.test(c+v)||(o=o.parentNode);o;o=o.parentNode)_.push(o),s=o;s===(r.ownerDocument||g)&&_.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=_[a++])&&!t.isPropagationStopped();)p=o,t.type=a>1?c:f.bindType||v,d=(H.get(o,`events`)||Object.create(null))[t.type]&&H.get(o,`handle`),d&&d.apply(o,n),d=l&&o[l],d&&d.apply&&ge(o)&&(t.result=d.apply(o,n),t.result===!1&&t.preventDefault());return t.type=v,!i&&!t.isDefaultPrevented()&&(!f._default||f._default.apply(_.pop(),n)===!1)&&ge(r)&&l&&m(r[v])&&!h(r)&&(s=r[l],s&&(r[l]=null),S.event.triggered=v,t.isPropagationStopped()&&p.addEventListener(v,Gt),r[v](),t.isPropagationStopped()&&p.removeEventListener(v,Gt),S.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}});var Kt=/\[\]$/,qt=/\r?\n/g,Jt=/^(?:submit|button|image|reset|file)$/i,Yt=/^(?:input|select|textarea|keygen)/i;function Xt(e,t,n,r){var i;if(Array.isArray(t))S.each(t,function(t,i){n||Kt.test(e)?r(e,i):Xt(e+`[`+(typeof i==`object`&&i?t:``)+`]`,i,n,r)});else if(!n&&y(t)===`object`)for(i in t)Xt(e+`[`+i+`]`,t[i],n,r);else r(e,t)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+`=`+encodeURIComponent(n??``)};if(e==null)return``;if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Xt(n,e[n],t,i);return r.join(`&`)},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,`elements`);return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(`:disabled`)&&Yt.test(this.nodeName)&&!Jt.test(e)&&(this.checked||!Pe.test(e))}).map(function(e,t){var n=S(this).val();return n==null?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(qt,`\r
311
311
  `)}}):{name:t.name,value:n.replace(qt,`\r
312
- `)}}).get()}});var Zt=/%20/g,Qt=/#.*$/,$t=/([?&])_=[^&]*/,en=/^(.*?):[ \t]*([^\r\n]*)$/gm,tn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,nn=/^(?:GET|HEAD)$/,rn=/^\/\//,an={},on={},sn=`*/*`,cn=g.createElement(`a`);cn.href=Vt.href;function ln(e){return function(t,n){typeof t!=`string`&&(n=t,t=`*`);var r,i=0,a=t.toLowerCase().match(z)||[];if(m(n))for(;r=a[i++];)r[0]===`+`?(r=r.slice(1)||`*`,(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function un(e,t,n,r){var i={},a=e===on;function o(s){var c;return i[s]=!0,S.each(e[s]||[],function(e,s){var l=s(t,n,r);if(typeof l==`string`&&!a&&!i[l])return t.dataTypes.unshift(l),o(l),!1;if(a)return!(c=l)}),c}return o(t.dataTypes[0])||!i[`*`]&&o(`*`)}function dn(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)t[n]!==void 0&&((i[n]?e:r||={})[n]=t[n]);return r&&S.extend(!0,e,r),e}function fn(e,t,n){for(var r,i,a,o,s=e.contents,c=e.dataTypes;c[0]===`*`;)c.shift(),r===void 0&&(r=e.mimeType||t.getResponseHeader(`Content-Type`));if(r){for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}}if(c[0]in n)a=c[0];else{for(i in n){if(!c[0]||e.converters[i+` `+c[0]]){a=i;break}o||=i}a||=o}if(a)return a!==c[0]&&c.unshift(a),n[a]}function pn(e,t,n,r){var i,a,o,s,c,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=a,a=u.shift(),a){if(a===`*`)a=c;else if(c!==`*`&&c!==a){if(o=l[c+` `+a]||l[`* `+a],!o){for(i in l)if(s=i.split(` `),s[1]===a&&(o=l[c+` `+s[0]]||l[`* `+s[0]],o)){o===!0?o=l[i]:l[i]!==!0&&(a=s[0],u.unshift(s[1]));break}}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:`parsererror`,error:o?e:`No conversion from `+c+` to `+a}}}}return{state:`success`,data:t}}S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Vt.href,type:`GET`,isLocal:tn.test(Vt.protocol),global:!0,processData:!0,async:!0,contentType:`application/x-www-form-urlencoded; charset=UTF-8`,accepts:{"*":sn,text:`text/plain`,html:`text/html`,xml:`application/xml, text/xml`,json:`application/json, text/javascript`},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:`responseXML`,text:`responseText`,json:`responseJSON`},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?dn(dn(e,S.ajaxSettings),t):dn(S.ajaxSettings,e)},ajaxPrefilter:ln(an),ajaxTransport:ln(on),ajax:function(t,n){typeof t==`object`&&(n=t,t=void 0),n||={};var r,i,a,o,s,c,l,u,d,f,p=S.ajaxSetup({},n),m=p.context||p,h=p.context&&(m.nodeType||m.jquery)?S(m):S.event,_=S.Deferred(),v=S.Callbacks(`once memory`),y=p.statusCode||{},b={},x={},C=`canceled`,w={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=en.exec(a);)o[t[1].toLowerCase()+` `]=(o[t[1].toLowerCase()+` `]||[]).concat(t[2]);t=o[e.toLowerCase()+` `]}return t==null?null:t.join(`, `)},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return l??(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return l??(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)w.always(e[w.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),T(0,t),this}};if(_.promise(w),p.url=((t||p.url||Vt.href)+``).replace(rn,Vt.protocol+`//`),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||`*`).toLowerCase().match(z)||[``],p.crossDomain==null){c=g.createElement(`a`);try{c.href=p.url,c.href=c.href,p.crossDomain=cn.protocol+`//`+cn.host!=c.protocol+`//`+c.host}catch{p.crossDomain=!0}}if(p.data&&p.processData&&typeof p.data!=`string`&&(p.data=S.param(p.data,p.traditional)),un(an,p,n,w),l)return w;for(d in u=S.event&&p.global,u&&S.active++===0&&S.event.trigger(`ajaxStart`),p.type=p.type.toUpperCase(),p.hasContent=!nn.test(p.type),i=p.url.replace(Qt,``),p.hasContent?p.data&&p.processData&&(p.contentType||``).indexOf(`application/x-www-form-urlencoded`)===0&&(p.data=p.data.replace(Zt,`+`)):(f=p.url.slice(i.length),p.data&&(p.processData||typeof p.data==`string`)&&(i+=(Ut.test(i)?`&`:`?`)+p.data,delete p.data),p.cache===!1&&(i=i.replace($t,`$1`),f=(Ut.test(i)?`&`:`?`)+`_=`+ Ht.guid+++f),p.url=i+f),p.ifModified&&(S.lastModified[i]&&w.setRequestHeader(`If-Modified-Since`,S.lastModified[i]),S.etag[i]&&w.setRequestHeader(`If-None-Match`,S.etag[i])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader(`Content-Type`,p.contentType),w.setRequestHeader(`Accept`,p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+(p.dataTypes[0]===`*`?``:`, `+sn+`; q=0.01`):p.accepts[`*`]),p.headers)w.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(m,w,p)===!1||l))return w.abort();if(C=`abort`,v.add(p.complete),w.done(p.success),w.fail(p.error),r=un(on,p,n,w),!r)T(-1,`No Transport`);else{if(w.readyState=1,u&&h.trigger(`ajaxSend`,[w,p]),l)return w;p.async&&p.timeout>0&&(s=e.setTimeout(function(){w.abort(`timeout`)},p.timeout));try{l=!1,r.send(b,T)}catch(e){if(l)throw e;T(-1,e)}}function T(t,n,o,c){var d,f,g,b,x,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,a=c||``,w.readyState=t>0?4:0,d=t>=200&&t<300||t===304,o&&(b=fn(p,w,o)),!d&&S.inArray(`script`,p.dataTypes)>-1&&S.inArray(`json`,p.dataTypes)<0&&(p.converters[`text script`]=function(){}),b=pn(p,b,w,d),d?(p.ifModified&&(x=w.getResponseHeader(`Last-Modified`),x&&(S.lastModified[i]=x),x=w.getResponseHeader(`etag`),x&&(S.etag[i]=x)),t===204||p.type===`HEAD`?C=`nocontent`:t===304?C=`notmodified`:(C=b.state,f=b.data,g=b.error,d=!g)):(g=C,(t||!C)&&(C=`error`,t<0&&(t=0))),w.status=t,w.statusText=(n||C)+``,d?_.resolveWith(m,[f,C,w]):_.rejectWith(m,[w,C,g]),w.statusCode(y),y=void 0,u&&h.trigger(d?`ajaxSuccess`:`ajaxError`,[w,p,d?f:g]),v.fireWith(m,[w,C]),u&&(h.trigger(`ajaxComplete`,[w,p]),--S.active||S.event.trigger(`ajaxStop`)))}return w},getJSON:function(e,t,n){return S.get(e,t,n,`json`)},getScript:function(e,t){return S.get(e,void 0,t,`script`)}}),S.each([`get`,`post`],function(e,t){S[t]=function(e,n,r,i){return m(n)&&(i||=r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:r},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){for(var t in e.headers)t.toLowerCase()===`content-type`&&(e.contentType=e.headers[t]||``)}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:`GET`,dataType:`script`,cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e);return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(`body`).each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch{}};var mn={0:200,1223:204},hn=S.ajaxSettings.xhr();p.cors=!!hn&&`withCredentials`in hn,p.ajax=hn=!!hn,S.ajaxTransport(function(t){var n,r;if(p.cors||hn&&!t.crossDomain)return{send:function(i,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),!t.crossDomain&&!i[`X-Requested-With`]&&(i[`X-Requested-With`]=`XMLHttpRequest`),i)s.setRequestHeader(o,i[o]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,e===`abort`?s.abort():e===`error`?typeof s.status==`number`?a(s.status,s.statusText):a(0,`error`):a(mn[s.status]||s.status,s.statusText,(s.responseType||`text`)!==`text`||typeof s.responseText!=`string`?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n(`error`),s.onabort===void 0?s.onreadystatechange=function(){s.readyState===4&&e.setTimeout(function(){n&&r()})}:s.onabort=r,n=n(`abort`);try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:`text/javascript, application/javascript, application/ecmascript, application/x-ecmascript`},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter(`script`,function(e){e.cache===void 0&&(e.cache=!1),e.crossDomain&&(e.type=`GET`)}),S.ajaxTransport(`script`,function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(r,i){t=S(`<script>`).attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on(`load error`,n=function(e){t.remove(),n=null,e&&i(e.type===`error`?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}});var gn=[],_n=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:`callback`,jsonpCallback:function(){var e=gn.pop()||S.expando+`_`+ Ht.guid++;return this[e]=!0,e}}),S.ajaxPrefilter(`json jsonp`,function(t,n,r){var i,a,o,s=t.jsonp!==!1&&(_n.test(t.url)?`url`:typeof t.data==`string`&&(t.contentType||``).indexOf(`application/x-www-form-urlencoded`)===0&&_n.test(t.data)&&`data`);if(s||t.dataTypes[0]===`jsonp`)return i=t.jsonpCallback=m(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(_n,`$1`+i):t.jsonp!==!1&&(t.url+=(Ut.test(t.url)?`&`:`?`)+t.jsonp+`=`+i),t.converters[`script json`]=function(){return o||S.error(i+` was not called`),o[0]},t.dataTypes[0]=`json`,a=e[i],e[i]=function(){o=arguments},r.always(function(){a===void 0?S(e).removeProp(i):e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,gn.push(i)),o&&m(a)&&a(o[0]),o=a=void 0}),`script`}),p.createHTMLDocument=(function(){var e=g.implementation.createHTMLDocument(``).body;return e.innerHTML=`<form></form><form></form>`,e.childNodes.length===2})(),S.parseHTML=function(e,t,n){if(typeof e!=`string`)return[];typeof t==`boolean`&&(n=t,t=!1);var r,i,a;return t||(p.createHTMLDocument?(t=g.implementation.createHTMLDocument(``),r=t.createElement(`base`),r.href=g.location.href,t.head.appendChild(r)):t=g),i=F.exec(e),a=!n&&[],i?[t.createElement(i[1])]:(i=Ve([e],t,a),a&&a.length&&S(a).remove(),S.merge([],i.childNodes))},S.fn.load=function(e,t,n){var r,i,a,o=this,s=e.indexOf(` `);return s>-1&&(r=Lt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&typeof t==`object`&&(i=`POST`),o.length>0&&S.ajax({url:e,type:i||`GET`,dataType:`html`,data:t}).done(function(e){a=arguments,o.html(r?S(`<div>`).append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,a,o,s,c,l,u=S.css(e,`position`),d=S(e),f={};u===`static`&&(e.style.position=`relative`),s=d.offset(),a=S.css(e,`top`),c=S.css(e,`left`),l=(u===`absolute`||u===`fixed`)&&(a+c).indexOf(`auto`)>-1,l?(r=d.position(),o=r.top,i=r.left):(o=parseFloat(a)||0,i=parseFloat(c)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),t.top!=null&&(f.top=t.top-s.top+o),t.left!=null&&(f.left=t.left-s.left+i),`using`in t?t.using.call(e,f):d.css(f)}},S.fn.extend({offset:function(e){if(arguments.length)return e===void 0?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(S.css(r,`position`)===`fixed`)t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&S.css(e,`position`)===`static`;)e=e.parentNode;e&&e!==r&&e.nodeType===1&&(i=S(e).offset(),i.top+=S.css(e,`borderTopWidth`,!0),i.left+=S.css(e,`borderLeftWidth`,!0))}return{top:t.top-i.top-S.css(r,`marginTop`,!0),left:t.left-i.left-S.css(r,`marginLeft`,!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&S.css(e,`position`)===`static`;)e=e.offsetParent;return e||Ee})}}),S.each({scrollLeft:`pageXOffset`,scrollTop:`pageYOffset`},function(e,t){var n=t===`pageYOffset`;S.fn[e]=function(r){return fe(this,function(e,r,i){var a;if(h(e)?a=e:e.nodeType===9&&(a=e.defaultView),i===void 0)return a?a[t]:e[r];a?a.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i},e,r,arguments.length)}}),S.each([`top`,`left`],function(e,t){S.cssHooks[t]=lt(p.pixelPosition,function(e,n){if(n)return n=ct(e,t),rt.test(n)?S(e).position()[t]+`px`:n})}),S.each({Height:`height`,Width:`width`},function(e,t){S.each({padding:`inner`+e,content:t,"":`outer`+e},function(n,r){S.fn[r]=function(i,a){var o=arguments.length&&(n||typeof i!=`boolean`),s=n||(i===!0||a===!0?`margin`:`border`);return fe(this,function(t,n,i){var a;return h(t)?r.indexOf(`outer`)===0?t[`inner`+e]:t.document.documentElement[`client`+e]:t.nodeType===9?(a=t.documentElement,Math.max(t.body[`scroll`+e],a[`scroll`+e],t.body[`offset`+e],a[`offset`+e],a[`client`+e])):i===void 0?S.css(t,n,s):S.style(t,n,i,s)},t,o?i:void 0,o)}})}),S.each([`ajaxStart`,`ajaxStop`,`ajaxComplete`,`ajaxError`,`ajaxSuccess`,`ajaxSend`],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,`**`):this.off(t,e||`**`,n)},hover:function(e,t){return this.on(`mouseenter`,e).on(`mouseleave`,t||e)}}),S.each(`blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu`.split(` `),function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var vn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,a;if(typeof t==`string`&&(n=e[t],t=e,e=n),m(e))return r=i.call(arguments,2),a=function(){return e.apply(t||this,r.concat(i.call(arguments)))},a.guid=e.guid=e.guid||S.guid++,a},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=w,S.isFunction=m,S.isWindow=h,S.camelCase=he,S.type=y,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return(t===`number`||t===`string`)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return e==null?``:(e+``).replace(vn,`$1`)},typeof define==`function`&&define.amd&&define(`jquery`,[],function(){return S});var yn=e.jQuery,bn=e.$;return S.noConflict=function(t){return e.$===S&&(e.$=bn),t&&e.jQuery===S&&(e.jQuery=yn),S},t===void 0&&(e.jQuery=e.$=S),S})})),LH=o(((e,t)=>{var n=IH();typeof window<`u`&&!window.jQuery&&(window.jQuery=n),t.exports=n})),RH=o((()=>{(function(){function e(){}function t(e){var t=e.length-1;return function(){var n=h.call(arguments,0,t),r=h.call(arguments,t);return e.apply(this,n.concat([r]))}}function n(e){return t(function(t,n){return typeof t!=`function`&&(t=g(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function r(e){var t=h.call(arguments,1);return function(){return e.apply(this,t)}}function i(e,t){if(!t)throw Error(`prayer failed: `+e)}function a(e){i(`a direction was passed`,e===v||e===y)}function o(e,t,n){i(`a parent is always present`,e),i(`leftward is properly set up`,function(){return t?t[y]===n&&t.parent===e:e.ends[v]===n}()),i(`rightward is properly set up`,function(){return n?n[v]===t&&n.parent===e:e.ends[y]===t}())}function s(){window.console&&console.warn(`You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:
312
+ `)}}).get()}});var Zt=/%20/g,Qt=/#.*$/,$t=/([?&])_=[^&]*/,en=/^(.*?):[ \t]*([^\r\n]*)$/gm,tn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,nn=/^(?:GET|HEAD)$/,rn=/^\/\//,an={},on={},sn=`*/*`,cn=g.createElement(`a`);cn.href=Vt.href;function ln(e){return function(t,n){typeof t!=`string`&&(n=t,t=`*`);var r,i=0,a=t.toLowerCase().match(z)||[];if(m(n))for(;r=a[i++];)r[0]===`+`?(r=r.slice(1)||`*`,(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function un(e,t,n,r){var i={},a=e===on;function o(s){var c;return i[s]=!0,S.each(e[s]||[],function(e,s){var l=s(t,n,r);if(typeof l==`string`&&!a&&!i[l])return t.dataTypes.unshift(l),o(l),!1;if(a)return!(c=l)}),c}return o(t.dataTypes[0])||!i[`*`]&&o(`*`)}function dn(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)t[n]!==void 0&&((i[n]?e:r||={})[n]=t[n]);return r&&S.extend(!0,e,r),e}function fn(e,t,n){for(var r,i,a,o,s=e.contents,c=e.dataTypes;c[0]===`*`;)c.shift(),r===void 0&&(r=e.mimeType||t.getResponseHeader(`Content-Type`));if(r){for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}}if(c[0]in n)a=c[0];else{for(i in n){if(!c[0]||e.converters[i+` `+c[0]]){a=i;break}o||=i}a||=o}if(a)return a!==c[0]&&c.unshift(a),n[a]}function pn(e,t,n,r){var i,a,o,s,c,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=a,a=u.shift(),a){if(a===`*`)a=c;else if(c!==`*`&&c!==a){if(o=l[c+` `+a]||l[`* `+a],!o){for(i in l)if(s=i.split(` `),s[1]===a&&(o=l[c+` `+s[0]]||l[`* `+s[0]],o)){o===!0?o=l[i]:l[i]!==!0&&(a=s[0],u.unshift(s[1]));break}}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:`parsererror`,error:o?e:`No conversion from `+c+` to `+a}}}}return{state:`success`,data:t}}S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Vt.href,type:`GET`,isLocal:tn.test(Vt.protocol),global:!0,processData:!0,async:!0,contentType:`application/x-www-form-urlencoded; charset=UTF-8`,accepts:{"*":sn,text:`text/plain`,html:`text/html`,xml:`application/xml, text/xml`,json:`application/json, text/javascript`},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:`responseXML`,text:`responseText`,json:`responseJSON`},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?dn(dn(e,S.ajaxSettings),t):dn(S.ajaxSettings,e)},ajaxPrefilter:ln(an),ajaxTransport:ln(on),ajax:function(t,n){typeof t==`object`&&(n=t,t=void 0),n||={};var r,i,a,o,s,c,l,u,d,f,p=S.ajaxSetup({},n),m=p.context||p,h=p.context&&(m.nodeType||m.jquery)?S(m):S.event,_=S.Deferred(),v=S.Callbacks(`once memory`),y=p.statusCode||{},b={},x={},C=`canceled`,w={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=en.exec(a);)o[t[1].toLowerCase()+` `]=(o[t[1].toLowerCase()+` `]||[]).concat(t[2]);t=o[e.toLowerCase()+` `]}return t==null?null:t.join(`, `)},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return l??(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return l??(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)w.always(e[w.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),T(0,t),this}};if(_.promise(w),p.url=((t||p.url||Vt.href)+``).replace(rn,Vt.protocol+`//`),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||`*`).toLowerCase().match(z)||[``],p.crossDomain==null){c=g.createElement(`a`);try{c.href=p.url,c.href=c.href,p.crossDomain=cn.protocol+`//`+cn.host!=c.protocol+`//`+c.host}catch{p.crossDomain=!0}}if(p.data&&p.processData&&typeof p.data!=`string`&&(p.data=S.param(p.data,p.traditional)),un(an,p,n,w),l)return w;for(d in u=S.event&&p.global,u&&S.active++===0&&S.event.trigger(`ajaxStart`),p.type=p.type.toUpperCase(),p.hasContent=!nn.test(p.type),i=p.url.replace(Qt,``),p.hasContent?p.data&&p.processData&&(p.contentType||``).indexOf(`application/x-www-form-urlencoded`)===0&&(p.data=p.data.replace(Zt,`+`)):(f=p.url.slice(i.length),p.data&&(p.processData||typeof p.data==`string`)&&(i+=(Ut.test(i)?`&`:`?`)+p.data,delete p.data),p.cache===!1&&(i=i.replace($t,`$1`),f=(Ut.test(i)?`&`:`?`)+`_=`+ Ht.guid+++f),p.url=i+f),p.ifModified&&(S.lastModified[i]&&w.setRequestHeader(`If-Modified-Since`,S.lastModified[i]),S.etag[i]&&w.setRequestHeader(`If-None-Match`,S.etag[i])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader(`Content-Type`,p.contentType),w.setRequestHeader(`Accept`,p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+(p.dataTypes[0]===`*`?``:`, `+sn+`; q=0.01`):p.accepts[`*`]),p.headers)w.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(m,w,p)===!1||l))return w.abort();if(C=`abort`,v.add(p.complete),w.done(p.success),w.fail(p.error),r=un(on,p,n,w),!r)T(-1,`No Transport`);else{if(w.readyState=1,u&&h.trigger(`ajaxSend`,[w,p]),l)return w;p.async&&p.timeout>0&&(s=e.setTimeout(function(){w.abort(`timeout`)},p.timeout));try{l=!1,r.send(b,T)}catch(e){if(l)throw e;T(-1,e)}}function T(t,n,o,c){var d,f,g,b,x,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,a=c||``,w.readyState=t>0?4:0,d=t>=200&&t<300||t===304,o&&(b=fn(p,w,o)),!d&&S.inArray(`script`,p.dataTypes)>-1&&S.inArray(`json`,p.dataTypes)<0&&(p.converters[`text script`]=function(){}),b=pn(p,b,w,d),d?(p.ifModified&&(x=w.getResponseHeader(`Last-Modified`),x&&(S.lastModified[i]=x),x=w.getResponseHeader(`etag`),x&&(S.etag[i]=x)),t===204||p.type===`HEAD`?C=`nocontent`:t===304?C=`notmodified`:(C=b.state,f=b.data,g=b.error,d=!g)):(g=C,(t||!C)&&(C=`error`,t<0&&(t=0))),w.status=t,w.statusText=(n||C)+``,d?_.resolveWith(m,[f,C,w]):_.rejectWith(m,[w,C,g]),w.statusCode(y),y=void 0,u&&h.trigger(d?`ajaxSuccess`:`ajaxError`,[w,p,d?f:g]),v.fireWith(m,[w,C]),u&&(h.trigger(`ajaxComplete`,[w,p]),--S.active||S.event.trigger(`ajaxStop`)))}return w},getJSON:function(e,t,n){return S.get(e,t,n,`json`)},getScript:function(e,t){return S.get(e,void 0,t,`script`)}}),S.each([`get`,`post`],function(e,t){S[t]=function(e,n,r,i){return m(n)&&(i||=r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:r},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){for(var t in e.headers)t.toLowerCase()===`content-type`&&(e.contentType=e.headers[t]||``)}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:`GET`,dataType:`script`,cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e);return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(`body`).each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch{}};var mn={0:200,1223:204},hn=S.ajaxSettings.xhr();p.cors=!!hn&&`withCredentials`in hn,p.ajax=hn=!!hn,S.ajaxTransport(function(t){var n,r;if(p.cors||hn&&!t.crossDomain)return{send:function(i,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),!t.crossDomain&&!i[`X-Requested-With`]&&(i[`X-Requested-With`]=`XMLHttpRequest`),i)s.setRequestHeader(o,i[o]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,e===`abort`?s.abort():e===`error`?typeof s.status==`number`?a(s.status,s.statusText):a(0,`error`):a(mn[s.status]||s.status,s.statusText,(s.responseType||`text`)!==`text`||typeof s.responseText!=`string`?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n(`error`),s.onabort===void 0?s.onreadystatechange=function(){s.readyState===4&&e.setTimeout(function(){n&&r()})}:s.onabort=r,n=n(`abort`);try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:`text/javascript, application/javascript, application/ecmascript, application/x-ecmascript`},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter(`script`,function(e){e.cache===void 0&&(e.cache=!1),e.crossDomain&&(e.type=`GET`)}),S.ajaxTransport(`script`,function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(r,i){t=S(`<script>`).attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on(`load error`,n=function(e){t.remove(),n=null,e&&i(e.type===`error`?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}});var gn=[],_n=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:`callback`,jsonpCallback:function(){var e=gn.pop()||S.expando+`_`+ Ht.guid++;return this[e]=!0,e}}),S.ajaxPrefilter(`json jsonp`,function(t,n,r){var i,a,o,s=t.jsonp!==!1&&(_n.test(t.url)?`url`:typeof t.data==`string`&&(t.contentType||``).indexOf(`application/x-www-form-urlencoded`)===0&&_n.test(t.data)&&`data`);if(s||t.dataTypes[0]===`jsonp`)return i=t.jsonpCallback=m(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(_n,`$1`+i):t.jsonp!==!1&&(t.url+=(Ut.test(t.url)?`&`:`?`)+t.jsonp+`=`+i),t.converters[`script json`]=function(){return o||S.error(i+` was not called`),o[0]},t.dataTypes[0]=`json`,a=e[i],e[i]=function(){o=arguments},r.always(function(){a===void 0?S(e).removeProp(i):e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,gn.push(i)),o&&m(a)&&a(o[0]),o=a=void 0}),`script`}),p.createHTMLDocument=(function(){var e=g.implementation.createHTMLDocument(``).body;return e.innerHTML=`<form></form><form></form>`,e.childNodes.length===2})(),S.parseHTML=function(e,t,n){if(typeof e!=`string`)return[];typeof t==`boolean`&&(n=t,t=!1);var r,i,a;return t||(p.createHTMLDocument?(t=g.implementation.createHTMLDocument(``),r=t.createElement(`base`),r.href=g.location.href,t.head.appendChild(r)):t=g),i=F.exec(e),a=!n&&[],i?[t.createElement(i[1])]:(i=Ve([e],t,a),a&&a.length&&S(a).remove(),S.merge([],i.childNodes))},S.fn.load=function(e,t,n){var r,i,a,o=this,s=e.indexOf(` `);return s>-1&&(r=Lt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&typeof t==`object`&&(i=`POST`),o.length>0&&S.ajax({url:e,type:i||`GET`,dataType:`html`,data:t}).done(function(e){a=arguments,o.html(r?S(`<div>`).append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,a,o,s,c,l,u=S.css(e,`position`),d=S(e),f={};u===`static`&&(e.style.position=`relative`),s=d.offset(),a=S.css(e,`top`),c=S.css(e,`left`),l=(u===`absolute`||u===`fixed`)&&(a+c).indexOf(`auto`)>-1,l?(r=d.position(),o=r.top,i=r.left):(o=parseFloat(a)||0,i=parseFloat(c)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),t.top!=null&&(f.top=t.top-s.top+o),t.left!=null&&(f.left=t.left-s.left+i),`using`in t?t.using.call(e,f):d.css(f)}},S.fn.extend({offset:function(e){if(arguments.length)return e===void 0?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(S.css(r,`position`)===`fixed`)t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&S.css(e,`position`)===`static`;)e=e.parentNode;e&&e!==r&&e.nodeType===1&&(i=S(e).offset(),i.top+=S.css(e,`borderTopWidth`,!0),i.left+=S.css(e,`borderLeftWidth`,!0))}return{top:t.top-i.top-S.css(r,`marginTop`,!0),left:t.left-i.left-S.css(r,`marginLeft`,!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&S.css(e,`position`)===`static`;)e=e.offsetParent;return e||Ee})}}),S.each({scrollLeft:`pageXOffset`,scrollTop:`pageYOffset`},function(e,t){var n=t===`pageYOffset`;S.fn[e]=function(r){return fe(this,function(e,r,i){var a;if(h(e)?a=e:e.nodeType===9&&(a=e.defaultView),i===void 0)return a?a[t]:e[r];a?a.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i},e,r,arguments.length)}}),S.each([`top`,`left`],function(e,t){S.cssHooks[t]=lt(p.pixelPosition,function(e,n){if(n)return n=ct(e,t),rt.test(n)?S(e).position()[t]+`px`:n})}),S.each({Height:`height`,Width:`width`},function(e,t){S.each({padding:`inner`+e,content:t,"":`outer`+e},function(n,r){S.fn[r]=function(i,a){var o=arguments.length&&(n||typeof i!=`boolean`),s=n||(i===!0||a===!0?`margin`:`border`);return fe(this,function(t,n,i){var a;return h(t)?r.indexOf(`outer`)===0?t[`inner`+e]:t.document.documentElement[`client`+e]:t.nodeType===9?(a=t.documentElement,Math.max(t.body[`scroll`+e],a[`scroll`+e],t.body[`offset`+e],a[`offset`+e],a[`client`+e])):i===void 0?S.css(t,n,s):S.style(t,n,i,s)},t,o?i:void 0,o)}})}),S.each([`ajaxStart`,`ajaxStop`,`ajaxComplete`,`ajaxError`,`ajaxSuccess`,`ajaxSend`],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,`**`):this.off(t,e||`**`,n)},hover:function(e,t){return this.on(`mouseenter`,e).on(`mouseleave`,t||e)}}),S.each(`blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu`.split(` `),function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var vn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,a;if(typeof t==`string`&&(n=e[t],t=e,e=n),m(e))return r=i.call(arguments,2),a=function(){return e.apply(t||this,r.concat(i.call(arguments)))},a.guid=e.guid=e.guid||S.guid++,a},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=w,S.isFunction=m,S.isWindow=h,S.camelCase=he,S.type=y,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return(t===`number`||t===`string`)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return e==null?``:(e+``).replace(vn,`$1`)},typeof define==`function`&&define.amd&&define(`jquery`,[],function(){return S});var yn=e.jQuery,bn=e.$;return S.noConflict=function(t){return e.$===S&&(e.$=bn),t&&e.jQuery===S&&(e.jQuery=yn),S},t===void 0&&(e.jQuery=e.$=S),S})})),zH=o(((e,t)=>{var n=RH();typeof window<`u`&&!window.jQuery&&(window.jQuery=n),t.exports=n})),BH=o((()=>{(function(){function e(){}function t(e){var t=e.length-1;return function(){var n=h.call(arguments,0,t),r=h.call(arguments,t);return e.apply(this,n.concat([r]))}}function n(e){return t(function(t,n){return typeof t!=`function`&&(t=g(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function r(e){var t=h.call(arguments,1);return function(){return e.apply(this,t)}}function i(e,t){if(!t)throw Error(`prayer failed: `+e)}function a(e){i(`a direction was passed`,e===v||e===y)}function o(e,t,n){i(`a parent is always present`,e),i(`leftward is properly set up`,function(){return t?t[y]===n&&t.parent===e:e.ends[v]===n}()),i(`rightward is properly set up`,function(){return n?n[v]===t&&n.parent===e:e.ends[y]===t}())}function s(){window.console&&console.warn(`You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:
313
313
 
314
314
  MathQuill = MathQuill.getInterface(1);
315
315
  // now MathQuill.MathField() works like it used to
@@ -323,9 +323,9 @@ See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
323
323
  See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
324
324
  https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)},s(),c},c.getInterface=l,P=l.MIN=1,te=l.MAX=2,c.noConflict=function(){return window.MathQuill=F,c},F=window.MathQuill,window.MathQuill=c,I=_(function(e,t,n){function r(e,t){throw e=e?`'`+e+`'`:`EOF`,`Parse Error: `+t+` at `+e}var a,o,s;e.init=function(e){this._=e},e.parse=function(e){function t(e,t){return t}return this.skip(s)._(``+e,t,r)},e.or=function(e){i(`or is passed a parser`,e instanceof n);var t=this;return n(function(n,r,i){function a(t){return e._(n,r,i)}return t._(n,r,a)})},e.then=function(e){var t=this;return n(function(r,a,o){function s(t,r){var s=e instanceof n?e:e(r);return i(`a parser is returned`,s instanceof n),s._(t,a,o)}return t._(r,s,o)})},e.many=function(){var e=this;return n(function(t,n,r){function i(e,n){return t=e,o.push(n),!0}function a(){return!1}for(var o=[];e._(t,i,a););return n(t,o)})},e.times=function(e,t){arguments.length<2&&(t=e);var r=this;return n(function(n,i,a){function o(e,t){return d.push(t),n=e,!0}function s(e,t){return l=t,n=e,!1}function c(e,t){return!1}var l,u,d=[],f=!0;for(u=0;u<e;u+=1)if(!(f=r._(n,o,s)))return a(n,l);for(;u<t&&f;u+=1)f=r._(n,o,c);return i(n,d)})},e.result=function(e){return this.then(o(e))},e.atMost=function(e){return this.times(0,e)},e.atLeast=function(e){var t=this;return t.times(e).then(function(e){return t.many().map(function(t){return e.concat(t)})})},e.map=function(e){return this.then(function(t){return o(e(t))})},e.skip=function(e){return this.then(function(t){return e.result(t)})},this.string=function(e){var t=e.length,r=`expected '`+e+`'`;return n(function(n,i,a){var o=n.slice(0,t);return o===e?i(n.slice(t),o):a(n,r)})},a=this.regex=function(e){i(`regexp parser is anchored`,e.toString().charAt(1)===`^`);var t=`expected `+e;return n(function(n,r,i){var a,o=e.exec(n);return o?(a=o[0],r(n.slice(a.length),a)):i(n,t)})},o=n.succeed=function(e){return n(function(t,n){return n(t,e)})},n.fail=function(e){return n(function(t,n,r){return r(t,e)})},n.letter=a(/^[a-z]/i),n.letters=a(/^[a-z]*/i),n.digit=a(/^[0-9]/),n.digits=a(/^[0-9]*/),n.whitespace=a(/^\s+/),n.optWhitespace=a(/^\s*/),n.any=n(function(e,t,n){return e?t(e.slice(1),e.charAt(0)):n(e,`expected any character`)}),n.all=n(function(e,t,n){return t(``,e)}),s=n.eof=n(function(e,t,n){return e?n(e,`expected EOF`):t(e,e)})}),L=function(){function t(e){var t,r=e.which||e.keyCode,i=n[r],a=[];return e.ctrlKey&&a.push(`Ctrl`),e.originalEvent&&e.originalEvent.metaKey&&a.push(`Meta`),e.altKey&&a.push(`Alt`),e.shiftKey&&a.push(`Shift`),t=i||String.fromCharCode(r),a.length||i?(a.push(t),a.join(`-`)):t}var n={8:`Backspace`,9:`Tab`,10:`Enter`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Esc`,32:`Spacebar`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,45:`Insert`,46:`Del`,144:`NumLock`};return function(n,r){function i(e){S=e,clearTimeout(g),g=setTimeout(e)}function a(t){i(function(n){S=e,clearTimeout(g),t(n)})}function o(t){S(),S=e,clearTimeout(g),b.val(t),t&&b[0]&&b[0].select&&b[0].select(),_=!!t}function s(){var e=b[0];return`selectionStart`in e&&e.selectionStart!==e.selectionEnd}function c(){r.keystroke(t(v),v)}function l(e){v=e,y=null,_&&a(function(e){e&&e.type===`focusout`||!b[0]||!b[0].select||b[0].select()}),c()}function u(e){v&&y&&c(),y=e,i(f)}function d(e){v&&!y&&i(f)}function f(){if(!s()){var e=b.val();e.length===1?(b.val(``),r.typedText(e)):e&&b[0]&&b[0].select&&b[0].select()}}function p(){v=y=null}function m(e){b.focus(),i(h)}function h(){var e=b.val();b.val(``),e&&r.paste(e)}var g,_,v=null,y=null,b=nt(n),x=nt(r.container||b),S=e;return x.bind(`keydown keypress input keyup focusout paste`,function(e){S(e)}),_=!1,x.bind({keydown:l,keypress:u,keyup:d,focusout:p,cut:function(){a(function(){r.cut()})},copy:function(){a(function(){r.copy()})},paste:m}),{select:o}}}(),k.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),k.open(function(e){e.focusBlurEvents=function(){function e(){clearTimeout(n),a.selection&&a.selection.jQ.addClass(`mq-blur`),t()}function t(){a.hide().parent.blur(),r.container.removeClass(`mq-focused`),b(window).unbind(`blur`,e)}var n,r=this,i=r.root,a=r.cursor;r.textarea.focus(function(){r.blurred=!1,clearTimeout(n),r.container.addClass(`mq-focused`),a.parent||a.insAtRightEnd(i),a.selection?(a.selection.jQ.removeClass(`mq-blur`),r.selectionChanged()):a.show()}).blur(function(){r.blurred=!0,n=setTimeout(function(){i.postOrder(`intentionalBlur`),a.clearSelection().endSelection(),t()}),b(window).bind(`blur`,e)}),r.blurred=!0,a.hide().parent.blur()}}),k.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),S.open(function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case`Ctrl-Shift-Backspace`:case`Ctrl-Backspace`:n.ctrlDeleteDir(v);break;case`Shift-Backspace`:case`Backspace`:n.backspace();break;case`Esc`:case`Tab`:n.escapeDir(y,e,t);return;case`Shift-Tab`:case`Shift-Esc`:n.escapeDir(v,e,t);return;case`End`:n.notify(`move`).cursor.insAtRightEnd(r.parent);break;case`Ctrl-End`:n.notify(`move`).cursor.insAtRightEnd(n.root);break;case`Shift-End`:for(;r[y];)n.selectRight();break;case`Ctrl-Shift-End`:for(;r[y]||r.parent!==n.root;)n.selectRight();break;case`Home`:n.notify(`move`).cursor.insAtLeftEnd(r.parent);break;case`Ctrl-Home`:n.notify(`move`).cursor.insAtLeftEnd(n.root);break;case`Shift-Home`:for(;r[v];)n.selectLeft();break;case`Ctrl-Shift-Home`:for(;r[v]||r.parent!==n.root;)n.selectLeft();break;case`Left`:n.moveLeft();break;case`Shift-Left`:n.selectLeft();break;case`Ctrl-Left`:break;case`Right`:n.moveRight();break;case`Shift-Right`:n.selectRight();break;case`Ctrl-Right`:break;case`Up`:n.moveUp();break;case`Down`:n.moveDown();break;case`Shift-Up`:if(r[v])for(;r[v];)n.selectLeft();else n.selectLeft();case`Shift-Down`:if(r[y])for(;r[y];)n.selectRight();else n.selectRight();case`Ctrl-Up`:case`Ctrl-Down`:break;case`Ctrl-Shift-Del`:case`Ctrl-Del`:n.ctrlDeleteDir(y);break;case`Shift-Del`:case`Del`:n.deleteForward();break;case`Meta-A`:case`Ctrl-A`:for(n.notify(`move`).cursor.insAtRightEnd(n.root);r[v];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){i(`overridden or never called on this node`)}}),k.open(function(e){function t(e,t){var n=e.notify(`upDown`).cursor,r=t+`Into`,i=t+`OutOf`;return n[y][r]?n.insAtLeftEnd(n[y][r]):n[v][r]?n.insAtRightEnd(n[v][r]):n.parent.bubble(function(e){var t=e[i];if(t&&(typeof t==`function`&&(t=e[i](n)),t instanceof S&&n.jumpUpDown(e,t),!0!==t))return!1}),e}this.onNotify(function(e){e!==`move`&&e!==`upDown`||this.show().clearSelection()}),e.escapeDir=function(e,t,n){a(e);var r=this.cursor;if(r.parent!==this.root&&n.preventDefault(),r.parent!==this.root)return r.parent.moveOutOf(e,r),this.notify(`move`)},M.leftRightIntoCmdGoes=function(e){if(e&&e!==`up`&&e!==`down`)throw`"up" or "down" required for leftRightIntoCmdGoes option, got "`+e+`"`;return e},e.moveDir=function(e){a(e);var t=this.cursor,n=t.options.leftRightIntoCmdGoes;return t.selection?t.insDirOf(e,t.selection.ends[e]):t[e]?t[e].moveTowards(e,t,n):t.parent.moveOutOf(e,t,n),this.notify(`move`)},e.moveLeft=function(){return this.moveDir(v)},e.moveRight=function(){return this.moveDir(y)},e.moveUp=function(){return t(this,`up`)},e.moveDown=function(){return t(this,`down`)},this.onNotify(function(e){e!==`upDown`&&(this.upDownCache={})}),this.onNotify(function(e){e===`edit`&&this.show().deleteSelection()}),e.deleteDir=function(e){var t,n;return a(e),t=this.cursor,n=t.selection,this.notify(`edit`),n||(t[e]?t[e].deleteTowards(e,t):t.parent.deleteOutOf(e,t)),t[v].siblingDeleted&&t[v].siblingDeleted(t.options,y),t[y].siblingDeleted&&t[y].siblingDeleted(t.options,v),t.parent.bubble(`reflow`),this},e.ctrlDeleteDir=function(e){a(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===v?C(t.parent.ends[v],t[v]).remove():C(t[y],t.parent.ends[y]).remove(),t.insAtDirEnd(e,t.parent),t[v].siblingDeleted&&t[v].siblingDeleted(t.options,y),t[y].siblingDeleted&&t[y].siblingDeleted(t.options,v),t.parent.bubble(`reflow`),this)},e.backspace=function(){return this.deleteDir(v)},e.deleteForward=function(){return this.deleteDir(y)},this.onNotify(function(e){e!==`select`&&this.endSelection()}),e.selectDir=function(e){var t,n=this.notify(`select`).cursor,r=n.selection;a(e),n.anticursor||n.startSelection(),t=n[e],t?r&&r.ends[e]===t&&n.anticursor[-e]!==t?t.unselectInto(e,n):t.selectTowards(e,n):n.parent.selectOutOf(e,n),n.clearSelection(),n.select()||n.show()},e.selectLeft=function(){return this.selectDir(v)},e.selectRight=function(){return this.selectDir(y)}}),ne=/[\\]{2,}/gm,re=function(){function e(e){var t=oe();return e.adopt(t,0,0),t}function t(e){var t,n=e[0]||oe();for(t=1;t<e.length;t+=1)e[t].children().adopt(n,n.ends[y],0);return n}var n=I.string,r=I.regex,i=I.letter,a=I.any,o=I.optWhitespace,s=I.succeed,c=I.fail,l=i.map(function(e){return pe(e)}),u=r(/^[^${}\\_^]/).map(function(e){return z(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return E[e]&&E[e]().parser()||c(`unknown compound command: `+e)}),f=r(/^[^\\a-eg-zA-Z]/).or(n(`\\`).then(r(/^begin\{.?matrix\}/).or(r(/^[a-z]+/i)).or(r(/^\s+/).result(` `)).or(a))).then(function(e){e=e.replace(/^begin\{(.?matrix)\}$/,`$1`);var t=w[e];return t?t(e).parser():c(`unknown command: \\`+e)}),p=d.or(f).or(l).or(u),m=n(`{`).then(function(){return g}).skip(n(`}`)),h=o.then(m.or(p.map(e))),g=h.many().map(t).skip(o),_=n(`[`).then(h.then(function(e){return e.join(`latex`)===`]`?c():s(e)}).many().map(t).skip(o)).skip(n(`]`)),v=g;return v.block=h,v.optBlock=_,v}(),k.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return re.parse(e).postOrder(`finalizeTree`,j.p).join(`latex`).trim()},M.maxDepth=function(e){return typeof e==`number`?e:void 0},e.writeLatex=function(e){var t,n=this.notify(`edit`).cursor,r=I.all,i=I.eof,a=re.skip(i).or(r.result(!1)).parse(e);return a&&!a.isEmpty()&&a.prepareInsertionAt(n)&&(a.children().adopt(n.parent,n[v],n[y]),t=a.jQize(),t.insertBefore(n.jQ),n[v]=a.ends[y],a.finalizeInsert(n.options,n),a.ends[y][y].siblingCreated&&a.ends[y][y].siblingCreated(n.options,v),a.ends[v][v].siblingCreated&&a.ends[v][v].siblingCreated(n.options,y),n.parent.bubble(`reflow`)),this},e.renderLatexMath=function(e){var t,n,r,i,a,o,s;e&&e.replace&&(e=e.replace(ne,`\\`)),t=this.root,n=this.cursor,n.options,r=t.jQ,i=I.all,a=I.eof,o=re.skip(a).or(i.result(!1)).parse(e),t.eachChild(`postOrder`,`dispose`),t.ends[v]=t.ends[y]=0,o&&o.prepareInsertionAt(n)?(o.children().adopt(t,0,0),s=o.join(`html`),r.html(s),t.jQize(r.children()),t.finalizeInsert(n.options)):r.empty(),delete n.selection,n.insAtRightEnd(t)},e.renderLatexText=function(e){var t,n,r,i,a,o,s,c,l,u,d=this.root,f=this.cursor;if(d.jQ.children().slice(1).remove(),d.eachChild(`postOrder`,`dispose`),d.ends[v]=d.ends[y]=0,delete f.selection,f.show().insAtRightEnd(d),t=I.regex,n=I.string,r=I.eof,i=I.all,a=n(`$`).then(re).skip(n(`$`).or(r)).map(function(e){var t,n=ue(f);return n.createBlocks(),t=n.ends[v],e.children().adopt(t,0,0),n}),o=n(`\\$`).result(`$`),s=o.or(t(/^[^$]/)).map(z),c=a.or(s).many(),l=c.skip(r).or(i.result(!1)).parse(e)){for(u=0;u<l.length;u+=1)l[u].adopt(d,d.ends[y],0);d.jQize().appendTo(d.jQ),d.finalizeInsert(f.options)}}}),k.open(function(t){j.p.ignoreNextMousedown=e,t.delegateMouseEvents=function(){var t=this.root.jQ;this.container.bind(`mousedown.mathquill`,function(n){function r(e){c.anticursor||c.startSelection(),s.seek(b(e.target),e.pageX,e.pageY).cursor.select(),e.target&&b(e.target.ownerDocument).unbind(`mousemove`,i)}function i(e){return delete e.target,r(e)}function a(e){c.selection||s.editable||l.detach(),o.unbind(`mousemove`,r),b(e.target.ownerDocument).unbind(`mousemove`,i).unbind(`mouseup`,a)}var o=b(n.target).closest(`.mq-root-block`),s=S.byId[o.attr(it)||t.attr(it)].controller,c=s.cursor,l=(c.blink,s.textareaSpan),u=s.textarea;if(n.preventDefault(),n.target.unselectable=!0,!c.options.ignoreNextMousedown(n)){if(c.options.ignoreNextMousedown=e,l.parent().length===0)return!1;s.blurred&&(s.editable||o.prepend(l),document.body.focus(),u.focus()),n.preventDefault(),n.target.unselectable=!0,c.show(),s.seek(b(n.target),n.pageX,n.pageY).cursor.startSelection(),o.mousemove(r),b(n.target.ownerDocument).mousemove(i).mouseup(a)}})}}),k.open(function(e){e.seek=function(e,t,n){var r,a,o,s=this.notify(`select`).cursor;return e&&((r=e.attr(it)||e.attr(rt))||(a=e.parent(),r=a.attr(it)||a.attr(rt))),o=r?S.byId[r]:this.root,i(`nodeId is the id of some Node that exists`,o),s.clearSelection().show(),o.seek(t,s),this.scrollHoriz(),this}}),k.open(function(e){e.scrollHoriz=function(){var e,t,n,r,i,a=this.cursor,o=a.selection,s=this.root.jQ[0].getBoundingClientRect();if(o)if(n=o.jQ[0].getBoundingClientRect(),r=n.left-(s.left+20),i=n.right-(s.right-20),o.ends[v]===a[y])if(r<0)t=r;else{if(!(i>0))return;t=n.left-i<s.left+20?r:i}else if(i>0)t=i;else{if(!(r<0))return;t=n.right-r>s.right-20?i:r}else if((e=a.jQ[0].getBoundingClientRect().left)>s.right-20)t=e-(s.right-20);else{if(!(e<s.left+20))return;t=e-(s.left+20)}this.root.jQ.stop&&typeof this.root.jQ.stop==`function`&&this.root.jQ.stop().animate({scrollLeft:`+=`+t},100)}}),k.open(function(e){j.p.substituteTextarea=function(){return b(`<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />`)[0]},e.createTextarea=function(){var e,t=this.textareaSpan=b(`<span class="mq-textarea"></span>`),n=this.options.substituteTextarea();if(!n.nodeType)throw`substituteTextarea() must return a DOM element, got `+n;n=this.textarea=b(n).appendTo(t),e=this,e.cursor.selectionChanged=function(){e.selectionChanged()}},e.selectionChanged=function(){var e=this;Ee(e.container[0]),e.textareaSelectionTimeout===void 0&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=void 0;var e=``;this.cursor.selection&&(e=this.cursor.selection.join(`latex`),this.options.statelessClipboard&&(e=`$`+e+`$`)),this.selectFn(e)},e.staticMathTextareaEvents=function(){function e(){i.detach(),t.blurred=!0}var t=this,n=(t.root,t.cursor),r=t.textarea,i=t.textareaSpan;this.container.prepend(nt(`<span class="mq-selectable">`).text(`$`+t.exportLatex()+`$`)),t.blurred=!0,r.bind(`cut paste`,!1).bind(`copy`,function(){t.setTextareaSelection()}).focus(function(){t.blurred=!1}).blur(function(){n.selection&&n.selection.clear(),setTimeout(e)}),t.selectFn=function(e){r.val(e),e&&r.select()}},j.p.substituteKeyboardEvents=L,e.editablesTextareaEvents=function(){var e=this,t=e.textarea,n=e.textareaSpan,r=this.options.substituteKeyboardEvents(t,this);this.selectFn=function(e){r.select(e)},this.container.prepend(n),this.focusBlurEvents()},e.typedText=function(e){if(e===`
325
325
  `)return this.handle(`enter`);var t=this.notify().cursor;t.parent.write(t,e),this.scrollHoriz()},e.cut=function(){var e=this,t=e.cursor;t.selection&&setTimeout(function(){e.notify(`edit`),t.parent.bubble(`reflow`)})},e.copy=function(){this.setTextareaSelection()},e.paste=function(e){this.options.statelessClipboard&&(e=e.slice(0,1)===`$`&&e.slice(-1)===`$`?e.slice(1,-1):`\\text{`+e+`}`),this.writeLatex(e).cursor.show()}}),ie=_(S,function(e,t){e.finalizeInsert=function(e,t){var n=this;n.postOrder(`finalizeTree`,e),n.postOrder(`contactWeld`,t),n.postOrder(`blur`),n.postOrder(`reflow`),n[y].siblingCreated&&n[y].siblingCreated(e,v),n[v].siblingCreated&&n[v].siblingCreated(e,y),n.bubble(`reflow`)},e.prepareInsertionAt=function(e){var t,n=e.options.maxDepth;if(n!==void 0){if((t=e.depth())>n)return!1;this.removeNodesDeeperThan(n-t)}return!0},e.removeNodesDeeperThan=function(e){for(var t,n=0,r=[[this,n]];r.length;)t=r.shift(),t[0].children().each(function(i){var a=+(i instanceof oe);n=t[1]+a,n<=e?r.push([i,n]):(a?i.children():i).remove()})}}),R=_(ie,function(e,t){e.init=function(e,n,r){var i=this;t.init.call(i),i.ctrlSeq||=e,n&&(i.htmlTemplate=n),r&&(i.textTemplate=r)},e.replaces=function(e){e.disown(),this.replacedFragment=e},e.isEmpty=function(){return this.foldChildren(!0,function(e,t){return e&&t.isEmpty()})},e.parser=function(){var e=re.block,t=this;return e.times(t.numBlocks()).map(function(e){t.blocks=e;for(var n=0;n<e.length;n+=1)e[n].adopt(t,t.ends[y],0);return t})},e.createLeftOf=function(e){var n=this,r=n.replacedFragment;n.createBlocks(),t.createLeftOf.call(n,e),r&&(r.adopt(n.ends[v],0,0),r.jQ.appendTo(n.ends[v].jQ),n.placeCursor(e),n.prepareInsertionAt(e)),n.finalizeInsert(e.options),n.placeCursor(e)},e.createBlocks=function(){var e,t,n=this,r=n.numBlocks(),i=n.blocks=Array(r);for(e=0;e<r;e+=1)t=i[e]=oe(),t.adopt(n,n.ends[y],0)},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[v],function(e,t){return e.isEmpty()?e:t}))},e.moveTowards=function(e,t,n){var r=n&&this[n+`Into`];t.insAtDirEnd(-e,r||this.ends[-e])},e.deleteTowards=function(e,t){this.isEmpty()?t[e]=this.remove()[e]:this.moveTowards(e,t,null)},e.selectTowards=function(e,t){t[-e]=this,t[e]=this[e]},e.selectChildren=function(){return O(this,this)},e.unselectInto=function(e,t){t.insAtDirEnd(-e,t.anticursor.ancestors[this.id])},e.seek=function(e,t){function n(e){var t={};return t[v]=e.jQ.offset().left,t[y]=t[v]+e.jQ.outerWidth(),t}var r,i=this,a=n(i);return e<a[v]?t.insLeftOf(i):e>a[y]?t.insRightOf(i):(r=a[v],void i.eachChild(function(o){var s=n(o);return e<s[v]?(e-r<s[v]-e?o[v]?t.insAtRightEnd(o[v]):t.insLeftOf(i):t.insAtLeftEnd(o),!1):e>s[y]?void(o[y]?r=s[y]:a[y]-e<e-s[y]?t.insRightOf(i):t.insAtRightEnd(o)):(o.seek(e,t),!1)}))},e.numBlocks=function(){var e=this.htmlTemplate.match(/&\d+/g);return e?e.length:0},e.html=function(){var e,t,n,r=this,a=r.blocks,o=` mathquill-command-id=`+r.id,s=r.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);for(i(`no unmatched angle brackets`,s.join(``)===this.htmlTemplate),e=0,t=s[0];t;e+=1,t=s[e])if(t.slice(-2)===`/>`)s[e]=t.slice(0,-2)+o+`/>`;else if(t.charAt(0)===`<`){i(`not an unmatched top-level close tag`,t.charAt(1)!==`/`),s[e]=t.slice(0,-1)+o+`>`,n=1;do e+=1,t=s[e],i(`no missing close tags`,t),t.slice(0,2)===`</`?--n:t.charAt(0)===`<`&&t.slice(-2)!==`/>`&&(n+=1);while(n>0)}return s.join(``).replace(/>&(\d+)/g,function(e,t){return` mathquill-block-id=`+a[t].id+`>`+a[t].join(`html`)})},e.latex=function(){return this.foldChildren(this.ctrlSeq,function(e,t){return e+`{`+(t.latex()||` `)+`}`})},e.textTemplate=[``],e.text=function(){var e=this,t=0;return e.foldChildren(e.textTemplate[t],function(n,r){t+=1;var i=r.text();return n&&e.textTemplate[t]===`(`&&i[0]===`(`&&i.slice(-1)===`)`?n+i.slice(1,-1)+e.textTemplate[t]:n+i+(e.textTemplate[t]||``)})}}),ae=_(R,function(t,n){t.init=function(e,t,r){r||=e&&e.length>1?e.slice(1):e,n.init.call(this,e,t,[r])},t.parser=function(){return I.succeed(this)},t.numBlocks=function(){return 0},t.replaces=function(e){e.remove()},t.createBlocks=e,t.moveTowards=function(e,t){t.jQ.insDirOf(e,this.jQ),t[-e]=this,t[e]=this[e]},t.deleteTowards=function(e,t){t[e]=this.remove()[e]},t.seek=function(e,t){e-this.jQ.offset().left<this.jQ.outerWidth()/2?t.insLeftOf(this):t.insRightOf(this)},t.latex=function(){return this.ctrlSeq},t.text=function(){return this.textTemplate},t.placeCursor=e,t.isEmpty=function(){return!0}}),z=_(ae,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),B=_(ae,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),oe=_(ie,function(e,t){e.join=function(e){return this.foldChildren(``,function(t,n){return t+n[e]()})},e.html=function(){return this.join(`html`)},e.latex=function(){return this.join(`latex`)},e.text=function(){return this.ends[v]===this.ends[y]&&this.ends[v]!==0?this.ends[v].text():this.join(`text`)},e.keystroke=function(e,n,r){return!r.options.spaceBehavesLikeTab||e!==`Spacebar`&&e!==`Shift-Spacebar`?t.keystroke.apply(this,arguments):(n.preventDefault(),void r.escapeDir(e===`Shift-Spacebar`?v:y,e,n))},e.moveOutOf=function(e,t,n){n&&this.parent[n+`Into`]||!this[e]?t.insDirOf(e,this.parent):t.insAtDirEnd(-e,this[e])},e.selectOutOf=function(e,t){t.insDirOf(e,this.parent)},e.deleteOutOf=function(e,t){t.unwrapGramp()},e.seek=function(e,t){var n=this.ends[y];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[v].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[v];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?pe(e):/^\d$/.test(e)?fe(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?w[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?w[`×`](e):(n=T[e]||w[e])?n(e):z(e)},e.write=function(e,t){var n;if(e.tooDeep())return!1;n=this.chToCmd(t,e.options),e.selection&&n.replaces(e.replaceSelection()),e.isTooDeep()||n.createLeftOf(e.show())},e.focus=function(){return this.jQ.addClass(`mq-hasCursor`),this.jQ.removeClass(`mq-empty`),this},e.blur=function(){return this.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.jQ.addClass(`mq-empty`),this}}),j.p.mouseEvents=!0,A.StaticMath=function(e){return _(e.AbstractMathQuill,function(t,n){this.RootBlock=oe,t.__mathquillify=function(e,t){return this.config(e),n.__mathquillify.call(this,`mq-math-mode`),this.__options.mouseEvents&&(this.__controller.delegateMouseEvents(),this.__controller.staticMathTextareaEvents()),this},t.init=function(){n.init.apply(this,arguments),this.__controller.root.postOrder(`registerInnerField`,this.innerFields=[],e.MathField)},t.latex=function(){var t=n.latex.apply(this,arguments);return arguments.length>0&&this.__controller.root.postOrder(`registerInnerField`,this.innerFields=[],e.MathField),t}})},se=_(oe,u),A.MathField=function(t){return _(t.EditableField,function(t,n){this.RootBlock=se,t.__mathquillify=function(t,r){return this.config(t),r>1&&(this.__controller.root.reflow=e),n.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})},ce=_(S,function(e,t){function n(e){var t,n;return e.jQ[0].normalize(),t=e.jQ.contents().filter(function(e,t){return t.nodeType===3})[0],t||={data:``},i(`only node in TextBlock span is Text node`,t.nodeType===3),n=le(t.data),n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof C?this.replacedText=e.remove().jQ.text():typeof e==`string`&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[v]&&this.ends[v].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){var n,r=this;if(t.createLeftOf.call(this,e),r[y].siblingCreated&&r[y].siblingCreated(e.options,v),r[v].siblingCreated&&r[v].siblingCreated(e.options,y),r.bubble(`reflow`),e.insAtRightEnd(r),r.replacedText)for(n=0;n<r.replacedText.length;n+=1)r.write(e,r.replacedText.charAt(n))},e.parser=function(){var e=this,t=I.string,n=I.regex;return I.optWhitespace.then(t(`{`)).then(n(/^[^}]*/)).skip(t(`}`)).map(function(t){return t.length===0?C():(le(t).adopt(e,0,0),e)})},e.textContents=function(){return this.foldChildren(``,function(e,t){return e+t.text})},e.text=function(){return`"`+this.textContents()+`"`},e.latex=function(){var e=this.textContents();return e.length===0?``:`\\text{`+e.replace(/\\/g,`\\backslash `).replace(/[{}]/g,`\\$&`)+`}`},e.html=function(){return`<span class="mq-text-mode" mathquill-command-id=`+this.id+`>`+this.textContents()+`</span>`},e.moveTowards=function(e,t){t.insAtDirEnd(-e,this)},e.moveOutOf=function(e,t){t.insDirOf(e,this)},e.unselectInto=e.moveTowards,e.selectTowards=R.prototype.selectTowards,e.deleteTowards=R.prototype.deleteTowards,e.selectOutOf=function(e,t){t.insDirOf(e,this)},e.deleteOutOf=function(e,t){this.isEmpty()&&t.insRightOf(this)},e.write=function(e,n){var r,i;e.show().deleteSelection(),n===`$`?this.isEmpty()?(e.insRightOf(this),z(`\\$`,`$`).createLeftOf(e)):e[y]?e[v]?(r=ce(),i=this.ends[v],i.disown().jQ.detach(),i.adopt(r,0,0),e.insLeftOf(this),t.createLeftOf.call(r,e)):e.insLeftOf(this):e.insRightOf(this):e[v]?(e[v].appendText(n),this.bubble(`reflow`)):le(n).createLeftOf(e)},e.seek=function(e,t){var r,i,a,o,s,c,l,u;for(t.hide(),r=n(this),i=this.jQ.width()/this.text.length,a=Math.round((e-this.jQ.offset().left)/i),a<=0?t.insAtLeftEnd(this):a>=r.text.length?t.insAtRightEnd(this):t.insLeftOf(r.splitRight(a)),o=e-t.show().offset().left,s=o&&o<0?v:y,c=s;t[s]&&o*c>0;)t[s].moveTowards(s,t),c=o,o=e-t.offset().left;s*o<-s*c&&t[-s].moveTowards(-s,t),t.anticursor?t.anticursor.parent===this&&(l=t[v]&&t[v].text.length,this.anticursorPosition===l?t.anticursor=x.copy(t):(this.anticursorPosition<l?(u=t[v].splitRight(this.anticursorPosition),t[v]=u):u=t[y].splitRight(this.anticursorPosition-l),t.anticursor=x(this,u[v],u))):this.anticursorPosition=t[v]&&t[v].text.length},e.blur=function(e){oe.prototype.blur.call(this),e&&(this.textContents()===``?(this.remove(),e[v]===this?e[v]=this[v]:e[y]===this&&(e[y]=this[y])):n(this))},e.focus=oe.prototype.focus}),le=_(S,function(e,t){function n(e,t){return t.charAt(e===v?0:-1+t.length)}e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=b(e)},e.jQize=function(){return this.jQadd(document.createTextNode(this.text))},e.appendText=function(e){this.text+=e,this.dom.appendData(e)},e.prependText=function(e){this.text=e+this.text,this.dom.insertData(0,e)},e.insTextAtDirEnd=function(e,t){a(t),t===y?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=le(this.text.slice(e)).adopt(this.parent,this,this[y]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t},e.moveTowards=function(e,t){var r,i;return a(e),r=n(-e,this.text),i=this[-e],i?i.insTextAtDirEnd(r,e):le(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?e===y?(this.dom.deleteData(0,1),this.text=this.text.slice(1)):(this.dom.deleteData(-1+this.text.length,1),this.text=this.text.slice(0,-1)):(this.remove(),this.jQ.remove(),t[e]=this[e])},e.selectTowards=function(e,t){var r,i,o,s;return a(e),r=t.anticursor,i=n(-e,this.text),r[e]===this?(o=le(i).createDir(e,t),r[e]=o,t.insDirOf(e,o)):(s=this[-e],s?s.insTextAtDirEnd(i,e):(o=le(i).createDir(-e,t),o.jQ.insDirOf(-e,t.selection.jQ)),this.text.length===1&&r[-e]===this&&(r[-e]=this[-e])),this.deleteTowards(e,t)}}),w.text=w.textnormal=w.textrm=w.textup=w.textmd=ce,w.em=w.italic=w.italics=w.emph=w.textit=w.textsl=d(`\\textit`,`i`,`class="mq-text-mode"`),w.strong=w.bold=w.textbf=d(`\\textbf`,`b`,`class="mq-text-mode"`),w.sf=w.textsf=d(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),w.tt=w.texttt=d(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),w.textsc=d(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),w.uppercase=d(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),w.lowercase=d(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`),ue=_(R,function(e,t){e.init=function(e){t.init.call(this,`$`),this.cursor=e},e.htmlTemplate=`<span class="mq-math-mode">&0</span>`,e.createBlocks=function(){t.createBlocks.call(this),this.ends[v].cursor=this.cursor,this.ends[v].write=function(e,t){t===`$`?this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),z(`\\$`,`$`).createLeftOf(e.show())):e[y]?e[v]?oe.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):oe.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[v].latex()+`$`}}),de=_(se,function(e,t){e.keystroke=function(e){if(e!==`Spacebar`&&e!==`Shift-Spacebar`)return t.keystroke.apply(this,arguments)},e.write=function(e,t){if(e.show().deleteSelection(),t===`$`)ue(e).createLeftOf(e);else{var n;t===`<`?n=`&lt;`:t===`>`&&(n=`&gt;`),z(t,n).createLeftOf(e)}}}),A.TextField=function(e){return _(e.EditableField,function(e,t){this.RootBlock=de,e.__mathquillify=function(){return t.__mathquillify.call(this,`mq-editable-field mq-text-mode`)},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexText(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()}})},T[`\\`]=_(R,function(e,t){e.ctrlSeq=`\\`,e.replaces=function(e){this._replacedFragment=e.disown(),this.isEmpty=function(){return!1}},e.htmlTemplate=`<span class="mq-latex-command-input mq-non-leaf">\\<span>&0</span></span>`,e.textTemplate=[`\\`],e.createBlocks=function(){t.createBlocks.call(this),this.ends[v].focus=function(){return this.parent.jQ.addClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.removeClass(`mq-empty`),this},this.ends[v].blur=function(){return this.parent.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.addClass(`mq-empty`),this},this.ends[v].write=function(e,t){e.show().deleteSelection(),t.match(/[a-z]/i)?z(t).createLeftOf(e):(this.parent.renderCommand(e),t===`\\`&&this.isEmpty()||e.parent.write(e,t))},this.ends[v].keystroke=function(e,n,r){return e===`Tab`||e===`Enter`||e===`Spacebar`?(this.parent.renderCommand(r.cursor),void n.preventDefault()):t.keystroke.apply(this,arguments)}},e.createLeftOf=function(e){if(t.createLeftOf.call(this,e),this._replacedFragment){var n=this.jQ[0];this.jQ=this._replacedFragment.jQ.addClass(`mq-blur`).bind(`mousedown mousemove`,function(e){return b(e.target=n).trigger(e),!1}).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return`\\`+this.ends[v].latex()+` `},e.renderCommand=function(e){var t,n;this.jQ=this.jQ.last(),this.remove(),this[y]?e.insLeftOf(this[y]):e.insAtRightEnd(this.parent),t=this.ends[v].latex(),t||=` `,n=w[t],n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):(n=ce(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),w[`∉`]=w.notin=r(B,`\\notin `,`&#8713;`),w[`≅`]=w.cong=r(B,`\\cong `,`&#8773;`),w[`≡`]=w.equiv=r(B,`\\equiv `,`&#8801;`),w[`⊕`]=w.oplus=r(B,`\\oplus `,`&#8853;`),w[`⊗`]=w.otimes=r(B,`\\otimes `,`&#8855;`),w[`≠`]=w.ne=w.neq=r(B,`\\ne `,`&ne;`),w[`≇`]=w.ncong=r(B,`\\ncong `,`&ncong;`),w[`∗`]=w.ast=w.star=w.loast=w.lowast=r(B,`\\ast `,`&lowast;`),w.therefor=w.therefore=r(B,`\\therefore `,`&there4;`),w.cuz=w.because=r(B,`\\because `,`&#8757;`),w.prop=w.propto=r(B,`\\propto `,`&prop;`),w[`≈`]=w.asymp=w.approx=r(B,`\\approx `,`&asymp;`),w[`≉`]=w.nasymp=w.napprox=r(B,`\\napprox `,`&nap;`),w.isin=w.in=r(B,`\\in `,`&isin;`),w.ni=w.contains=r(B,`\\ni `,`&ni;`),w.notni=w.niton=w.notcontains=w.doesnotcontain=E[`\\not\\ni`]=r(B,`\\not\\ni `,`&#8716;`),w.sub=w.subset=r(B,`\\subset `,`&sub;`),w.sup=w.supset=w.superset=r(B,`\\supset `,`&sup;`),w.nsub=w.notsub=w.nsubset=w.notsubset=E[`\\not\\subset`]=r(B,`\\not\\subset `,`&#8836;`),w.nsup=w.notsup=w.nsupset=w.notsupset=w.nsuperset=w.notsuperset=E[`\\not\\supset`]=r(B,`\\not\\supset `,`&#8837;`),w.sube=w.subeq=w.subsete=w.subseteq=r(B,`\\subseteq `,`&sube;`),w.supe=w.supeq=w.supsete=w.supseteq=w.supersete=w.superseteq=r(B,`\\supseteq `,`&supe;`),w.nsube=w.nsubeq=w.notsube=w.notsubeq=w.nsubsete=w.nsubseteq=w.notsubsete=w.notsubseteq=E[`\\not\\subseteq`]=r(B,`\\not\\subseteq `,`&#8840;`),w.nsupe=w.nsupeq=w.notsupe=w.notsupeq=w.nsupsete=w.nsupseteq=w.notsupsete=w.notsupseteq=w.nsupersete=w.nsuperseteq=w.notsupersete=w.notsuperseteq=E[`\\not\\supseteq`]=r(B,`\\not\\supseteq `,`&#8841;`),w.N=w.naturals=w.Naturals=r(z,`\\mathbb{N}`,`&#8469;`),w.P=w.primes=w.Primes=w.projective=w.Projective=w.probability=w.Probability=r(z,`\\mathbb{P}`,`&#8473;`),w.Z=w.integers=w.Integers=r(z,`\\mathbb{Z}`,`&#8484;`),w.Q=w.rationals=w.Rationals=r(z,`\\mathbb{Q}`,`&#8474;`),w.R=w.reals=w.Reals=r(z,`\\mathbb{R}`,`&#8477;`),w.C=w.complex=w.Complex=w.complexes=w.Complexes=w.complexplane=w.Complexplane=w.ComplexPlane=r(z,`\\mathbb{C}`,`&#8450;`),w.H=w.Hamiltonian=w.quaternions=w.Quaternions=r(z,`\\mathbb{H}`,`&#8461;`),w.quad=w.emsp=r(z,`\\quad `,` `),w.qquad=r(z,`\\qquad `,` `),w.diamond=r(z,`\\diamond `,`&#9671;`),w.bigtriangleup=r(z,`\\bigtriangleup `,`&#9651;`),w.ominus=r(z,`\\ominus `,`&#8854;`),w.uplus=r(z,`\\uplus `,`&#8846;`),w.bigtriangledown=r(z,`\\bigtriangledown `,`&#9661;`),w.sqcap=r(z,`\\sqcap `,`&#8851;`),w.triangleleft=r(z,`\\triangleleft `,`&#8882;`),w.sqcup=r(z,`\\sqcup `,`&#8852;`),w.triangleright=r(z,`\\triangleright `,`&#8883;`),w.odot=w.circledot=r(z,`\\odot `,`&#8857;`),w.bigcirc=r(z,`\\bigcirc `,`&#9711;`),w.dagger=r(z,`\\dagger `,`&#0134;`),w.ddagger=r(z,`\\ddagger `,`&#135;`),w.wr=r(z,`\\wr `,`&#8768;`),w.amalg=r(z,`\\amalg `,`&#8720;`),w.models=r(z,`\\models `,`&#8872;`),w.prec=r(z,`\\prec `,`&#8826;`),w.succ=r(z,`\\succ `,`&#8827;`),w.preceq=r(z,`\\preceq `,`&#8828;`),w.succeq=r(z,`\\succeq `,`&#8829;`),w.simeq=r(z,`\\simeq `,`&#8771;`),w.mid=r(z,`\\mid `,`&#8739;`),w.ll=r(z,`\\ll `,`&#8810;`),w.gg=r(z,`\\gg `,`&#8811;`),w.parallel=r(z,`\\parallel `,`&#8741;`),w.nparallel=r(z,`\\nparallel `,`&#8742;`),w.bowtie=r(z,`\\bowtie `,`&#8904;`),w.sqsubset=r(z,`\\sqsubset `,`&#8847;`),w.sqsupset=r(z,`\\sqsupset `,`&#8848;`),w.smile=r(z,`\\smile `,`&#8995;`),w.sqsubseteq=r(z,`\\sqsubseteq `,`&#8849;`),w.sqsupseteq=r(z,`\\sqsupseteq `,`&#8850;`),w.doteq=r(z,`\\doteq `,`&#8784;`),w.frown=r(z,`\\frown `,`&#8994;`),w.vdash=r(z,`\\vdash `,`&#8870;`),w.dashv=r(z,`\\dashv `,`&#8867;`),w.nless=r(z,`\\nless `,`&#8814;`),w.ngtr=r(z,`\\ngtr `,`&#8815;`),w.longleftarrow=r(z,`\\longleftarrow `,`&#8592;`),w.longrightarrow=r(z,`\\longrightarrow `,`&#8594;`),w.Longleftarrow=r(z,`\\Longleftarrow `,`&#8656;`),w.Longrightarrow=r(z,`\\Longrightarrow `,`&#8658;`),w.longleftrightarrow=r(z,`\\longleftrightarrow `,`&#8596;`),w.updownarrow=r(z,`\\updownarrow `,`&#8597;`),w.Longleftrightarrow=r(z,`\\Longleftrightarrow `,`&#8660;`),w.Updownarrow=r(z,`\\Updownarrow `,`&#8661;`),w.mapsto=r(z,`\\mapsto `,`&#8614;`),w.nearrow=r(z,`\\nearrow `,`&#8599;`),w.hookleftarrow=r(z,`\\hookleftarrow `,`&#8617;`),w.hookrightarrow=r(z,`\\hookrightarrow `,`&#8618;`),w.searrow=r(z,`\\searrow `,`&#8600;`),w.leftharpoonup=r(z,`\\leftharpoonup `,`&#8636;`),w.rightharpoonup=r(z,`\\rightharpoonup `,`&#8640;`),w.swarrow=r(z,`\\swarrow `,`&#8601;`),w.leftharpoondown=r(z,`\\leftharpoondown `,`&#8637;`),w.rightharpoondown=r(z,`\\rightharpoondown `,`&#8641;`),w.nwarrow=r(z,`\\nwarrow `,`&#8598;`),w.ldots=r(z,`\\ldots `,`&#8230;`),w.cdots=r(z,`\\cdots `,`&#8943;`),w.vdots=r(z,`\\vdots `,`&#8942;`),w.ddots=r(z,`\\ddots `,`&#8945;`),w.surd=r(z,`\\surd `,`&#8730;`),w.triangle=r(z,`\\triangle `,`&#9651;`),w.ell=r(z,`\\ell `,`&#8467;`),w.top=r(z,`\\top `,`&#8868;`),w.flat=r(z,`\\flat `,`&#9837;`),w.natural=r(z,`\\natural `,`&#9838;`),w.sharp=r(z,`\\sharp `,`&#9839;`),w.wp=r(z,`\\wp `,`&#8472;`),w.bot=r(z,`\\bot `,`&#8869;`),w.clubsuit=r(z,`\\clubsuit `,`&#9827;`),w.diamondsuit=r(z,`\\diamondsuit `,`&#9826;`),w.heartsuit=r(z,`\\heartsuit `,`&#9825;`),w.spadesuit=r(z,`\\spadesuit `,`&#9824;`),w.circledot=r(z,`\\circledot `,`&#8857;`),w.middot=r(z,`\\middot `,`&middot;`),w.dottedsquare=r(z,`\\dottedsquare `,`&#11034;`),w.square=r(z,`\\square `,`&#11036;`),w.rectangle=r(z,`\\rectangle `,`&#9647;`),w.oint=r(z,`\\oint `,`&#8750;`),w.bigcap=r(z,`\\bigcap `,`&#8745;`),w.bigcup=r(z,`\\bigcup `,`&#8746;`),w.bigsqcup=r(z,`\\bigsqcup `,`&#8852;`),w.bigvee=r(z,`\\bigvee `,`&#8744;`),w.bigwedge=r(z,`\\bigwedge `,`&#8743;`),w.bigodot=r(z,`\\bigodot `,`&#8857;`),w.bigotimes=r(z,`\\bigotimes `,`&#8855;`),w.bigoplus=r(z,`\\bigoplus `,`&#8853;`),w.biguplus=r(z,`\\biguplus `,`&#8846;`),w.lfloor=r(z,`\\lfloor `,`&#8970;`),w.rfloor=r(z,`\\rfloor `,`&#8971;`),w.lceil=r(z,`\\lceil `,`&#8968;`),w.rceil=r(z,`\\rceil `,`&#8969;`),w.opencurlybrace=w.lbrace=r(z,`\\lbrace `,`{`),w.closecurlybrace=w.rbrace=r(z,`\\rbrace `,`}`),w.lbrack=r(z,`[`),w.rbrack=r(z,`]`),w.mug=r(z,`\\mug `,`µg`),w.mus=r(z,`\\mus `,`µs`),w.mum=r(z,`\\mum `,`µm`),w.muL=r(z,`\\muL `,`µL`),w.slash=r(z,`/`),w.vert=r(z,`|`),w.perp=w.perpendicular=r(z,`\\perp `,`&perp;`),w.nabla=w.del=r(z,`\\nabla `,`&nabla;`),w.hbar=r(z,`\\hbar `,`&#8463;`),w.AA=w.Angstrom=w.angstrom=r(z,`\\text\\AA `,`&#8491;`),w.ring=w.circ=w.circle=r(z,`\\circ `,`&#8728;`),w.bull=w.bullet=r(z,`\\bullet `,`&bull;`),w.setminus=w.smallsetminus=r(z,`\\setminus `,`&#8726;`),w.not=w[`¬`]=w.neg=r(z,`\\neg `,`&not;`),w[`…`]=w.dots=w.ellip=w.hellip=w.ellipsis=w.hellipsis=r(z,`\\dots `,`&hellip;`),w.converges=w.darr=w.dnarr=w.dnarrow=w.downarrow=r(z,`\\downarrow `,`&darr;`),w.dArr=w.dnArr=w.dnArrow=w.Downarrow=r(z,`\\Downarrow `,`&dArr;`),w.diverges=w.uarr=w.uparrow=r(z,`\\uparrow `,`&uarr;`),w.uArr=w.Uparrow=r(z,`\\Uparrow `,`&uArr;`),w.to=r(B,`\\to `,`&rarr;`),w.rarr=w.rightarrow=r(z,`\\rightarrow `,`&rarr;`),w.implies=r(B,`\\Rightarrow `,`&rArr;`),w.rArr=w.Rightarrow=r(z,`\\Rightarrow `,`&rArr;`),w.gets=r(B,`\\gets `,`&larr;`),w.larr=w.leftarrow=r(z,`\\leftarrow `,`&larr;`),w.impliedby=r(B,`\\Leftarrow `,`&lArr;`),w.lArr=w.Leftarrow=r(z,`\\Leftarrow `,`&lArr;`),w.harr=w.lrarr=w.leftrightarrow=r(z,`\\leftrightarrow `,`&harr;`),w.iff=r(B,`\\Leftrightarrow `,`&hArr;`),w.hArr=w.lrArr=w.Leftrightarrow=r(z,`\\Leftrightarrow `,`&hArr;`),w.Re=w.Real=w.real=r(z,`\\Re `,`&real;`),w.Im=w.imag=w.image=w.imagin=w.imaginary=w.Imaginary=r(z,`\\Im `,`&image;`),w.part=w.partial=r(z,`\\partial `,`&part;`),w.infty=w.infin=w.infinity=r(z,`\\infty `,`&infin;`),w.pounds=r(z,`\\pounds `,`&pound;`),w.alef=w.alefsym=w.aleph=w.alephsym=r(z,`\\aleph `,`&alefsym;`),w.xist=w.xists=w.exist=w.exists=r(z,`\\exists `,`&exist;`),w.nexists=w.nexist=r(z,`\\nexists `,`&#8708;`),w.and=w.land=w.wedge=r(B,`\\wedge `,`&and;`),w.or=w.lor=w.vee=r(B,`\\vee `,`&or;`),w.o=w.O=w.empty=w.emptyset=w.oslash=w.Oslash=w.nothing=w.varnothing=r(B,`\\varnothing `,`&empty;`),w.cup=w.union=r(B,`\\cup `,`&cup;`),w.cap=w.intersect=w.intersection=r(B,`\\cap `,`&cap;`),w.deg=w.degree=r(z,`\\degree `,`&deg;`),w.ang=w.angle=r(z,`\\angle `,`&ang;`),w.measuredangle=r(z,`\\measuredangle `,`m&ang;`),fe=_(z,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[v]instanceof V&&!1!==e[v].isItalic||e[v]instanceof Ve&&e[v][v]instanceof V&&!1!==e[v][v].isItalic)?(w._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),V=_(ae,function(e,t){e.init=function(e,n){t.init.call(this,e,`<var>`+(n||e)+`</var>`)},e.text=function(){var e=this.ctrlSeq;return this.isPartOfOperator?e[0]==`\\`?e=e.slice(1,e.length):e[e.length-1]==` `&&(e=e.slice(0,-1)):(!this[v]||this[v]instanceof V||this[v]instanceof B||this[v].ctrlSeq===`\\ `||(e=`*`+e),!this[y]||this[y]instanceof B||this[y]instanceof Ve||(e+=`*`)),e}}),j.p.autoCommands={_maxLength:0},M.autoCommands=function(e){var t,n,r,i,a;if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){if(a=t[i],a.length<2)throw`autocommand "`+a+`" not minimum length of 2`;if(w[a]===_e)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=ot(r,a.length)}return n._maxLength=r,n},pe=_(V,function(e,t){function n(e){return!e||e instanceof B||e instanceof Ue}e.init=function(e){return t.init.call(this,this.letter=e)},e.createLeftOf=function(e){var n,r,i,a,o;if(t.createLeftOf.apply(this,arguments),n=e.options.autoCommands,r=n._maxLength,r>0){for(i=``,a=this,o=0;a instanceof pe&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[v],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(o=1,a=this;o<i.length;o+=1,a=a[v]);return C(a,this).remove(),e[v]=a[v],w[i](i).createLeftOf(e)}i=i.slice(1)}}},e.italicize=function(e){return this.isItalic=e,this.isPartOfOperator=!e,this.jQ.toggleClass(`mq-operator-name`,!e),this},e.finalizeTree=e.siblingDeleted=e.siblingCreated=function(e,t){t!==v&&this[y]instanceof pe||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t,r,i,a,o,s,c,l,u,d,f,p,m=e.autoOperatorNames;if(m._maxLength!==0){for(t=this.letter,r=this[v];r instanceof pe;r=r[v])t=r.letter+t;for(i=this[y];i instanceof pe;i=i[y])t+=i.letter;C(r[y]||this.parent.ends[v],i[v]||this.parent.ends[y]).each(function(e){e.italicize(!0).jQ.removeClass(`mq-first mq-last mq-followed-by-supsub`),e.ctrlSeq=e.letter});t:for(a=0,o=r[y]||this.parent.ends[v];a<t.length;a+=1,o=o[y])for(s=at(m._maxLength,t.length-a);s>0;--s)if(c=t.slice(a,a+s),m.hasOwnProperty(c)){for(l=0,u=o;l<s;l+=1,u=u[y])u.italicize(!1),d=u;f=me.hasOwnProperty(c),o.ctrlSeq=(f?`\\`:`\\operatorname{`)+o.ctrlSeq,d.ctrlSeq+=f?` `:`}`,ge.hasOwnProperty(c)&&d[v][v][v].jQ.addClass(`mq-last`),n(o[v])||o.jQ.addClass(`mq-first`),n(d[y])||(d[y]instanceof Ve?(p=d[y],(p.siblingCreated=p.siblingDeleted=function(){p.jQ.toggleClass(`mq-after-operator-name`,!(p[y]instanceof Ye))})()):d.jQ.toggleClass(`mq-last`,!(d[y]instanceof Ye))),a+=s-1,o=d;continue t}}}}),me={},he=j.p.autoOperatorNames={_maxLength:9},ge={limsup:1,liminf:1,projlim:1,injlim:1},function(){var e,t,n,r,i=`arg deg det dim exp gcd hom inf ker lg ln log max min sup limsup liminf injlim projlim Pr`.split(` `);for(e=0;e<i.length;e+=1)me[i[e]]=he[i[e]]=1;for(t=`sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth`.split(` `),e=0;e<t.length;e+=1)me[t[e]]=1;for(n=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),e=0;e<n.length;e+=1)he[n[e]]=he[`arc`+n[e]]=he[n[e]+`h`]=he[`ar`+n[e]+`h`]=he[`arc`+n[e]+`h`]=1;for(r=`gcf hcf lcm proj span`.split(` `),e=0;e<r.length;e+=1)he[r[e]]=1}(),M.autoOperatorNames=function(e){var t,n,r,i,a;if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){if(a=t[i],a.length<2)throw`"`+a+`" not minimum length of 2`;n[a]=1,r=ot(r,a.length)}return n._maxLength=r,n},_e=_(ae,function(e,t){e.init=function(e){this.ctrlSeq=e},e.createLeftOf=function(e){var t,n=this.ctrlSeq;for(t=0;t<n.length;t+=1)pe(n.charAt(t)).createLeftOf(e)},e.parser=function(){var e,t=this.ctrlSeq,n=oe();for(e=0;e<t.length;e+=1)pe(t.charAt(e)).adopt(n,n.ends[y],0);return I.succeed(n.children())}}),he)he.hasOwnProperty(H)&&(w[H]=_e);for(je in w.operatorname=_(R,function(t){t.createLeftOf=e,t.numBlocks=function(){return 1},t.parser=function(){return re.block.map(function(e){return e.children()})}}),w.f=_(pe,function(e,t){e.init=function(){ae.p.init.call(this,this.letter=`f`,`<var class="mq-f">f</var>`)},e.italicize=function(e){return this.jQ.html(`f`).toggleClass(`mq-f`,e),t.italicize.apply(this,arguments)}}),w[` `]=w.space=r(z,`\\ `,`&nbsp;`),w[`'`]=w.prime=r(z,`'`,`&prime;`),w[`″`]=w.dprime=r(z,`″`,`&Prime;`),w[`"`]=w.doublePrime=r(z,`"`,`&Prime;`),w.backslash=r(z,`\\backslash `,`\\`),T[`\\`]||=w.backslash,w.$=r(z,`\\$`,`$`),ve=_(ae,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}}),w[`@`]=ve,w[`&`]=r(ve,`\\&`,`&amp;`),w[`%`]=r(ve,`\\%`,`%`),w.alpha=w.beta=w.gamma=w.delta=w.zeta=w.eta=w.theta=w.iota=w.kappa=w.mu=w.nu=w.xi=w.rho=w.sigma=w.tau=w.chi=w.psi=w.omega=_(V,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),w.phi=r(V,`\\phi `,`&#981;`),w.phiv=w.varphi=r(V,`\\varphi `,`&phi;`),w.epsilon=r(V,`\\epsilon `,`&#1013;`),w.epsiv=w.varepsilon=r(V,`\\varepsilon `,`&epsilon;`),w.piv=w.varpi=r(V,`\\varpi `,`&piv;`),w.sigmaf=w.sigmav=w.varsigma=r(V,`\\varsigma `,`&sigmaf;`),w.thetav=w.vartheta=w.thetasym=r(V,`\\vartheta `,`&thetasym;`),w.upsilon=w.upsi=r(V,`\\upsilon `,`&upsilon;`),w.gammad=w.Gammad=w.digamma=r(V,`\\digamma `,`&#989;`),w.kappav=w.varkappa=r(V,`\\varkappa `,`&#1008;`),w.rhov=w.varrho=r(V,`\\varrho `,`&#1009;`),w.pi=w.π=r(ve,`\\pi `,`&pi;`),w.lambda=r(ve,`\\lambda `,`&lambda;`),w.Upsilon=w.Upsi=w.upsih=w.Upsih=r(ae,`\\Upsilon `,`<var style="font-family: serif">&upsih;</var>`),w.Gamma=w.Delta=w.Theta=w.Lambda=w.Xi=w.Pi=w.Sigma=w.Phi=w.Psi=w.Omega=_(z,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),w.forall=w[`∀`]=r(z,`\\forall `,`&#8704;`),ye=_(R,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=re.parse(this.latex);t.children().adopt(e.parent,e[v],e[y]),e[v]=t.ends[y],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[y][y].siblingCreated&&t.ends[y][y].siblingCreated(e.options,v),t.ends[v][v].siblingCreated&&t.ends[v][v].siblingCreated(e.options,y),e.parent.bubble(`reflow`)},e.parser=function(){var e=re.parse(this.latex).children();return I.succeed(e)}}),w[`¹`]=r(ye,`^1`),w[`²`]=r(ye,`^2`),w[`³`]=r(ye,`^3`),w[`¼`]=r(ye,`\\frac14`),w[`½`]=r(ye,`\\frac12`),w[`¾`]=r(ye,`\\frac34`),be=_(B,function(e){e.init=z.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){function n(e){return e[v]?e[v]instanceof B||/^[,;:\(\[]$/.test(e[v].ctrlSeq)?``:`mq-binary-operator`:e.parent&&e.parent.parent&&e.parent.parent.isStyleBlock()?n(e.parent.parent):``}if(t!==y)return this.jQ[0].className=n(this),this}}),w[`+`]=r(be,`+`,`+`),w[`–`]=w[`-`]=r(be,`-`,`&minus;`),w[`±`]=w.pm=w.plusmn=w.plusminus=r(be,`\\pm `,`&plusmn;`),w.mp=w.mnplus=w.minusplus=r(be,`\\mp `,`&#8723;`),T[`*`]=w.sdot=w.cdot=r(B,`\\cdot `,`&middot;`,`*`),xe=_(B,function(e,t){e.init=function(e,n){this.data=e,this.strict=n;var r=n?`Strict`:``;t.init.call(this,e[`ctrlSeq`+r],e[`html`+r],e[`text`+r])},e.swap=function(e){this.strict=e;var t=e?`Strict`:``;this.ctrlSeq=this.data[`ctrlSeq`+t],this.jQ.html(this.data[`html`+t]),this.textTemplate=[this.data[`text`+t]]},e.deleteTowards=function(e,n){if(e===v&&!this.strict)return this.swap(!0),void this.bubble(`reflow`);t.deleteTowards.apply(this,arguments)}}),Se={ctrlSeq:`\\le `,html:`&le;`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`&lt;`,textStrict:`<`},Ce={ctrlSeq:`\\ge `,html:`&ge;`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`&gt;`,textStrict:`>`},w[`<`]=w.lt=r(xe,Se,!0),w[`>`]=w.gt=r(xe,Ce,!0),w[`≤`]=w.le=w.leq=r(xe,Se,!1),w[`≥`]=w.ge=w.geq=r(xe,Ce,!1),we=_(B,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[v]instanceof xe&&e[v].strict)return e[v].swap(!1),void e[v].bubble(`reflow`);t.createLeftOf.apply(this,arguments)}}),w[`=`]=we,w[`×`]=w.times=r(B,`\\times `,`&times;`,`[x]`),w[`÷`]=w.div=w.divide=w.divides=r(B,`\\div `,`&divide;`,`[/]`),T[`~`]=w.sim=r(B,`\\sim `,`~`,`~`),T[`≁`]=w.nsim=r(B,`\\nsim `,`≁`,`≁`),w.complement=w[`∁`]=r(z,`\\complement `,`&#8705;`),w.nexists=w[`∄`]=r(z,`\\nexists `,`&#8708;`),w.sphericalangle=w[`∢`]=r(z,`\\sphericalangle `,`&#8738;`),w.iint=w[`∬`]=r(z,`\\iint `,`&#8748;`),w.iiint=w[`∭`]=r(z,`\\iiint `,`&#8749;`),w.oiint=w[`∯`]=r(z,`\\oiint `,`&#8751;`),w.oiiint=w[`∰`]=r(z,`\\oiiint `,`&#8752;`),w.backsim=w[`∽`]=r(z,`\\backsim `,`&#8765;`),w.backsimeq=w[`⋍`]=r(z,`\\backsimeq `,`&#8909;`),w.eqsim=w[`≂`]=r(z,`\\eqsim `,`&#8770;`),w.ncong=w[`≇`]=r(z,`\\ncong `,`&#8775;`),w.approxeq=w[`≊`]=r(z,`\\approxeq `,`&#8778;`),w.bumpeq=w[`≏`]=r(z,`\\bumpeq `,`&#8783;`),w.Bumpeq=w[`≎`]=r(z,`\\Bumpeq `,`&#8782;`),w.doteqdot=w[`≑`]=r(z,`\\doteqdot `,`&#8785;`),w.fallingdotseq=w[`≒`]=r(z,`\\fallingdotseq `,`&#8786;`),w.risingdotseq=w[`≓`]=r(z,`\\risingdotseq `,`&#8787;`),w.eqcirc=w[`≖`]=r(z,`\\eqcirc `,`&#8790;`),w.circeq=w[`≗`]=r(z,`\\circeq `,`&#8791;`),w.triangleq=w[`≜`]=r(z,`\\triangleq `,`&#8796;`),w.leqq=w[`≦`]=r(z,`\\leqq `,`&#8806;`),w.geqq=w[`≧`]=r(z,`\\geqq `,`&#8807;`),w.lneqq=w[`≨`]=r(z,`\\lneqq `,`&#8808;`),w.gneqq=w[`≩`]=r(z,`\\gneqq `,`&#8809;`),w.between=w[`≬`]=r(z,`\\between `,`&#8812;`),w.nleq=w[`≰`]=r(z,`\\nleq `,`&#8816;`),w.ngeq=w[`≱`]=r(z,`\\ngeq `,`&#8817;`),w.lesssim=w[`≲`]=r(z,`\\lesssim `,`&#8818;`),w.gtrsim=w[`≳`]=r(z,`\\gtrsim `,`&#8819;`),w.lessgtr=w[`≶`]=r(z,`\\lessgtr `,`&#8822;`),w.gtrless=w[`≷`]=r(z,`\\gtrless `,`&#8823;`),w.preccurlyeq=w[`≼`]=r(z,`\\preccurlyeq `,`&#8828;`),w.succcurlyeq=w[`≽`]=r(z,`\\succcurlyeq `,`&#8829;`),w.precsim=w[`≾`]=r(z,`\\precsim `,`&#8830;`),w.succsim=w[`≿`]=r(z,`\\succsim `,`&#8831;`),w.nprec=w[`⊀`]=r(z,`\\nprec `,`&#8832;`),w.nsucc=w[`⊁`]=r(z,`\\nsucc `,`&#8833;`),w.subsetneq=w[`⊊`]=r(z,`\\subsetneq `,`&#8842;`),w.supsetneq=w[`⊋`]=r(z,`\\supsetneq `,`&#8843;`),w.vDash=w[`⊨`]=r(z,`\\vDash `,`&#8872;`),w.Vdash=w[`⊩`]=r(z,`\\Vdash `,`&#8873;`),w.Vvdash=w[`⊪`]=r(z,`\\Vvdash `,`&#8874;`),w.VDash=w[`⊫`]=r(z,`\\VDash `,`&#8875;`),w.nvdash=w[`⊬`]=r(z,`\\nvdash `,`&#8876;`),w.nvDash=w[`⊭`]=r(z,`\\nvDash `,`&#8877;`),w.nVdash=w[`⊮`]=r(z,`\\nVdash `,`&#8878;`),w.nVDash=w[`⊯`]=r(z,`\\nVDash `,`&#8879;`),w.vartriangleleft=w[`⊲`]=r(z,`\\vartriangleleft `,`&#8882;`),w.vartriangleright=w[`⊳`]=r(z,`\\vartriangleright `,`&#8883;`),w.trianglelefteq=w[`⊴`]=r(z,`\\trianglelefteq `,`&#8884;`),w.trianglerighteq=w[`⊵`]=r(z,`\\trianglerighteq `,`&#8885;`),w.multimap=w[`⊸`]=r(z,`\\multimap `,`&#8888;`),w.Subset=w[`⋐`]=r(z,`\\Subset `,`&#8912;`),w.Supset=w[`⋑`]=r(z,`\\Supset `,`&#8913;`),w.Cap=w[`⋒`]=r(z,`\\Cap `,`&#8914;`),w.Cup=w[`⋓`]=r(z,`\\Cup `,`&#8915;`),w.pitchfork=w[`⋔`]=r(z,`\\pitchfork `,`&#8916;`),w.lessdot=w[`⋖`]=r(z,`\\lessdot `,`&#8918;`),w.gtrdot=w[`⋗`]=r(z,`\\gtrdot `,`&#8919;`),w.lll=w[`⋘`]=r(z,`\\lll `,`&#8920;`),w.ggg=w[`⋙`]=r(z,`\\ggg `,`&#8921;`),w.lesseqgtr=w[`⋚`]=r(z,`\\lesseqgtr `,`&#8922;`),w.gtreqless=w[`⋛`]=r(z,`\\gtreqless `,`&#8923;`),w.curlyeqprec=w[`⋞`]=r(z,`\\curlyeqprec `,`&#8926;`),w.curlyeqsucc=w[`⋟`]=r(z,`\\curlyeqsucc `,`&#8927;`),w.nsim=w[`≁`]=r(z,`\\nsim `,`&#8769;`),w.lnsim=w[`⋦`]=r(z,`\\lnsim `,`&#8934;`),w.gnsim=w[`⋧`]=r(z,`\\gnsim `,`&#8935;`),w.precnsim=w[`⋨`]=r(z,`\\precnsim `,`&#8936;`),w.succnsim=w[`⋩`]=r(z,`\\succnsim `,`&#8937;`),w.ntriangleleft=w[`⋪`]=r(z,`\\ntriangleleft `,`&#8938;`),w.ntriangleright=w[`⋫`]=r(z,`\\ntriangleright `,`&#8939;`),w.ntrianglelefteq=w[`⋬`]=r(z,`\\ntrianglelefteq `,`&#8940;`),w.ntrianglerighteq=w[`⋭`]=r(z,`\\ntrianglerighteq `,`&#8941;`),w.blacksquare=w[`∎`]=r(z,`\\blacksquare `,`&#8718;`),w.colon=w[`∶`]=r(z,`\\colon `,`&#8758;`),w.llcorner=w[`∟`]=r(z,`\\llcorner `,`&#8735;`),w.dotplus=w[`∔`]=r(B,`\\dotplus `,`&#8724;`),w.nmid=w[`∤`]=r(B,`
326
- mid `,`&#8740;`),w.intercal=w[`⊺`]=r(B,`\\intercal `,`&#8890;`),w.veebar=w[`⊻`]=r(B,`\\veebar `,`&#8891;`),w.barwedge=w[`⊼`]=r(B,`\\barwedge `,`&#8892;`),w.ltimes=w[`⋉`]=r(B,`\\ltimes `,`&#8905;`),w.rtimes=w[`⋊`]=r(B,`\\rtimes `,`&#8906;`),w.leftthreetimes=w[`⋋`]=r(B,`\\leftthreetimes `,`&#8907;`),w.rightthreetimes=w[`⋌`]=r(B,`\\rightthreetimes `,`&#8908;`),w.curlyvee=w[`⋎`]=r(B,`\\curlyvee `,`&#8910;`),w.curlywedge=w[`⋏`]=r(B,`\\curlywedge `,`&#8911;`),w.circledcirc=w[`⊚`]=r(B,`\\circledcirc `,`&#8858;`),w.circledast=w[`⊛`]=r(B,`\\circledast `,`&#8859;`),w.circleddash=w[`⊝`]=r(B,`\\circleddash `,`&#8861;`),w.boxplus=w[`⊞`]=r(B,`\\boxplus `,`&#8862;`),w.boxminus=w[`⊟`]=r(B,`\\boxminus `,`&#8863;`),w.boxtimes=w[`⊠`]=r(B,`\\boxtimes `,`&#8864;`),w.boxdot=w[`⊡`]=r(B,`\\boxdot `,`&#8865;`),w[`∂`]=w.partial,w[`∃`]=w.exists,w[`∅`]=w.varnothing,w[`∆`]=w.triangle,w[`∇`]=w.nabla,w[`∈`]=w.in,w[`∊`]=w.in,w[`∋`]=w.ni,w[`∌`]=w.notni,w[`∍`]=w.ni,w[`∐`]=w.amalg,w[`−`]=w[`-`],w[`∓`]=w.mp,w[`∖`]=w.setminus,w[`∘`]=w.circ,w[`∙`]=w.bullet,w[`∝`]=w.propto,w[`∞`]=w.infty,w[`∠`]=w.angle,w[`∡`]=w.measuredangle,w[`∣`]=w.divides,w[`∥`]=w.parallel,w[`∦`]=w.nparallel,w[`∧`]=w.wedge,w[`∨`]=w.vee,w[`∩`]=w.cap,w[`∪`]=w.cup,w[`∮`]=w.oint,w[`∴`]=w.therefore,w[`∵`]=w.because,w[`∼`]=w.sim,w[`≀`]=w.wr,w[`≃`]=w.simeq,w[`≍`]=w.asymp,w[`≐`]=w.doteq,w[`≪`]=w.ll,w[`≫`]=w.gg,w[`≺`]=w.prec,w[`≻`]=w.succ,w[`⊂`]=w.subset,w[`⊃`]=w.supset,w[`⊆`]=w.subseteq,w[`⊇`]=w.supseteq,w[`⊈`]=w.nsubseteq,w[`⊉`]=w.nsupseteq,w[`⊏`]=w.sqsubset,w[`⊐`]=w.sqsupset,w[`⊓`]=w.sqcap,w[`⊔`]=w.sqcup,w[`⊖`]=w.ominus,w[`⊘`]=w.oslash,w[`⊙`]=w.odot,w[`⊢`]=w.vdash,w[`⊣`]=w.dashv,w[`⊤`]=w.top,w[`⊥`]=w.bot,w[`⊧`]=w.models,w[`⋀`]=w.wedge,w[`⋁`]=w.vee,w[`⋂`]=w.cap,w[`⋃`]=w.cup,w[`⋄`]=w.diamond,w[`⋅`]=w.cdot,w[`⋆`]=w.star,w[`⋈`]=w.bowtie,w[`⋮`]=w.vdots,w[`⋯`]=w.cdots,w[`⋱`]=w.ddots,Ee=e,De=document.createElement(`div`),Oe=De.style,ke={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},ke)if(je in Oe){Ae=je;break}for(tt in Ae?Te=function(e,t,n){e.css(Ae,`scale(`+t+`,`+n+`)`)}:`filter`in Oe?(Ee=function(e){e.className=e.className},Te=function(e,t,n){function r(){e.css(`marginRight`,(i.width()-1)*(t-1)/t+`px`)}var i,a;t/=1+(n-1)/2,e.css(`fontSize`,n+`em`),e.hasClass(`mq-matrixed-container`)||e.addClass(`mq-matrixed-container`).wrapInner(`<span class="mq-matrixed"></span>`),i=e.children().css(`filter`,`progid:DXImageTransform.Microsoft.Matrix(M11=`+t+`,SizingMethod='auto expand')`),r(),a=setInterval(r),b(window).load(function(){clearTimeout(a),r()})}):Te=function(e,t,n){e.css(`fontSize`,n+`em`)},Me=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),Ne=_(R,function(e,t){e.init=function(e,n,r){this.args=arguments,this.htmlTemplate=`<`+n+` `+r+`><`+n+` class="mq-xarrow-over">&0</`+n+`><`+n+` class="mq-xarrow-under"></`+n+`></`+n+`>`,t.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`(`,`)`]},e.parser=function(){var e=this;return re.optBlock.then(function(t){return re.block.map(function(n){var r=Pe.apply(null,e.args);return r.blocks=[t,n],t.adopt(r,0,0),n.adopt(r,t,0),r})}).or(t.parser.call(this))}}),Pe=_(Ne,function(e,t){e.init=function(e,t,n){this.htmlTemplate=`<`+t+` `+n+`><`+t+` class="mq-xarrow-over">&1</`+t+`><`+t+` class="mq-xarrow-under">&0</`+t+`></`+t+`>`,R.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[v].latex()+`]{`+this.ends[y].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[v].upOutOf=this.ends[y],this.upInto=this.ends[y].downOutOf=this.ends[v]}}),Fe=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return _(R,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`<span class="mq-empty-box">&0</span></`+i+`></`+i+`>`)}})},Ie=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`><span class="mq-longdiv-curve-border">)</span><span class="mq-longdiv-inner"><span class="mq-empty">&0</span></`+n+`></span>`)}}),Le=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-row"><p>`+r+`</p><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td><td class="mq-empty"></td><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),Re=_(R,function(e,t){e.init=function(e){t.init.call(this,e,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),ze=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-col"><p>`+r+`</p></span><span class="matrix-edit-content-col"><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),Be=function(e,t){return _(ae,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})},w.mathrm=r(Me,`\\mathrm`,`span`,`class="mq-roman mq-font"`),w.mathit=r(Me,`\\mathit`,`i`,`class="mq-font"`),w.mathbf=r(Me,`\\mathbf`,`b`,`class="mq-font"`),w.mathsf=r(Me,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),w.mathtt=r(Me,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),w.underline=r(Me,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),w.overline=w.bar=r(Fe(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),w.longdiv=r(Ie,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),w.overrightarrow=r(Fe(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),w.overleftarrow=r(Fe(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),w.xleftarrow=r(Ne,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),w.xrightarrow=r(Ne,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),w.overleftrightarrow=r(Me,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),w.overarc=r(Me,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),w.dot=_(R,function(e,t){e.init=function(){t.init.call(this,`\\dot`,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),w.addmatrixrow=r(Le,`\\addmatrixrow`,`span`,`+`),w.addmatrixcol=r(ze,`\\addmatrixcol`,`span`,`+`),w.ngtr=w[`≯`]=r(Be(`mq-ngtr`,`&#8815;`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),w.nless=w[`≮`]=r(Be(`mq-nless`,`&#8814;`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),w.dot=r(Re,`\\dot`),w.parallelogram=r(Be(`mq-parallelogram`,`&#9649;`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),w.textcolor=_(R,function(e,t){e.setColor=function(e){this.color=e,this.htmlTemplate=`<span class="mq-textcolor" style="color:`+e+`">&0</span>`},e.latex=function(){return`\\textcolor{`+this.color+`}{`+this.blocks[0].latex()+`}`},e.parser=function(){var e=this,n=I.optWhitespace,r=I.string,i=I.regex;return n.then(r(`{`)).then(i(/^[#\w\s.,()%-]*/)).skip(r(`}`)).then(function(n){return e.setColor(n),t.parser.call(e)})},e.isStyleBlock=function(){return!0}}),w.class=_(R,function(e,t){e.parser=function(){var e=this,n=I.string,r=I.regex;return I.optWhitespace.then(n(`{`)).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n(`}`)).then(function(n){return e.cls=n||``,e.htmlTemplate=`<span class="mq-class `+n+`">&0</span>`,t.parser.call(e)})},e.latex=function(){return`\\class{`+this.cls+`}{`+this.blocks[0].latex()+`}`},e.isStyleBlock=function(){return!0}}),Ve=_(R,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(this.replacedFragment||e[v]||!e.options.supSubsRequireOperand)return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){var t,n,r,i,a,o;for(t=v;t;t=t===v&&y)if(this[t]instanceof Ve){for(n=`sub`;n;n=n===`sub`&&`sup`)r=this[n],i=this[t][n],r&&(i?r.isEmpty()?o=x(i,0,i.ends[v]):(r.jQ.children().insAtDirEnd(-t,i.jQ),a=r.children().disown(),o=x(i,a.ends[y],i.ends[v]),t===v?a.adopt(i,i.ends[y],0):a.adopt(i,0,i.ends[v])):this[t].addBlock(r.disown()),this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r));this.remove(),e&&e[v]===this&&(t===y&&o?o[v]?e.insRightOf(o[v]):e.insAtLeftEnd(o.parent):e.insRightOf(this[t]));break}},j.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[v].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if(t===`_`)return;var n=this.chToCmd(t,e.options);return n instanceof ae?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[v]&&!e[y]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),oe.p.write.apply(this,arguments)}},e.moveTowards=function(e,n,r){n.options.autoSubscriptNumerals&&!this.sup?n.insDirOf(e,this):t.moveTowards.apply(this,arguments)},e.deleteTowards=function(e,n){if(n.options.autoSubscriptNumerals&&this.sub){var r=this.sub.ends[-e];r instanceof ae?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(v,n.insAtLeftEnd(this.sub)),this.sup&&n.insDirOf(-e,this))}else t.deleteTowards.apply(this,arguments)},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+`{`+(n||` `)+`}`:``}return e(`_`,this.sub)+e(`^`,this.sup)},e.addBlock=function(e){this.supsub===`sub`?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=b(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(it,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=b(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(it,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">&#8203;</span>`));for(var t=0;t<2;t+=1)(function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+`Into`],e[n][r+`OutOf`]=f,delete e[n].deleteOutOf,t===`sub`&&b(e.jQ.addClass(`mq-sup-only`)[0].lastChild).remove(),this.remove()}})(this,`sub sup`.split(` `)[t],`sup sub`.split(` `)[t],`down up`.split(` `)[t])},e.reflow=function(){var e,t,n,r,i,a=this.jQ,o=a.prev();o.length&&(e=a.children(`.mq-sup`),e.length&&(t=parseInt(e.css(`font-size`)),n=e.offset().top+e.height(),r=n-o.offset().top-.7*t,i=parseInt(e.css(`margin-bottom`)),e.css(`margin-bottom`,i+r)))}}),w.subscript=w._=_(Ve,function(e,t){e.supsub=`sub`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&0</span></span><span style="display:inline-block;width:0">&#8203;</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[v],this.sub.upOutOf=f,t.finalizeTree.call(this)}}),w.superscript=w.supscript=w[`^`]=_(Ve,function(e,t){e.supsub=`sup`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`^`],e.finalizeTree=function(){this.upInto=this.sup=this.ends[y],this.sup.downOutOf=f,t.finalizeTree.call(this)}}),He=_(R,function(e,t){e.parser=function(){var e,t=I.string,n=I.optWhitespace,r=I.succeed,i=re.block,a=this,o=a.blocks=[oe(),oe()];for(e=0;e<o.length;e+=1)o[e].adopt(a,a.ends[y],0);return n.then(t(`_`).or(t(`^`))).then(function(e){var t=o[e===`_`?0:1];return i.then(function(e){return e.children().adopt(t,t.ends[y],0),r(a)})}).many().result(a)},e.finalizeTree=function(){this.downInto=this.ends[v],this.upInto=this.ends[y],this.ends[v].upOutOf=this.ends[y],this.ends[y].downOutOf=this.ends[v]}}),Ue=_(He,function(e,t){e.init=function(e,t){var n=`<span class="mq-large-operator mq-non-leaf"><span class="mq-to"><span>&1</span></span><big>`+t+`</big><span class="mq-from"><span>&0</span></span></span>`;ae.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[v].latex())+`^`+e(this.ends[y].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(pe(`n`).createLeftOf(e),we().createLeftOf(e))}}),w[`∑`]=w.sum=w.summation=r(Ue,`\\sum `,`&sum;`),w[`∏`]=w.prod=w.product=r(Ue,`\\prod `,`&prod;`),w.coprod=w.coproduct=r(Ue,`\\coprod `,`&#8720;`),w[`∫`]=w.int=w.integral=_(Ue,function(e,t){e.init=function(){ae.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>&int;</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">&#8203</span></span></span>`)},e.createLeftOf=R.p.createLeftOf}),w.lim=w.limit=_(He,function(e,t){e.init=function(){ae.prototype.init.call(this,`\\lim `,`<span class="mq-lim mq-non-leaf"><span class="mq-un-italicized">lim</span><span class="mq-approaches"><span>&0</span></span></span>`)},e.latex=function(){return this.ctrlSeq+`_`+function(e){return e.length===1?e:`{`+(e||` `)+`}`}(this.ends[v].latex())}}),We=w.frac=w.dfrac=w.cfrac=w.fraction=_(R,function(e,t){e.ctrlSeq=`\\frac`,e.htmlTemplate=`<span class="mq-fraction mq-non-leaf"><span class="mq-numerator"><span class="mq-empty-box">&0</span></span><span class="mq-denominator"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0">&#8203;</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[y].upOutOf=this.ends[v],this.downInto=this.ends[v].downOutOf=this.ends[y]}}),Ge=w.over=T[`/`]=_(We,function(t,n){t.createLeftOf=function(t){if(!this.replacedFragment){for(var r=t[v];r&&!(r instanceof B||r instanceof(w.text||e)||r instanceof Ue||r.ctrlSeq===`\\ `||/^[,;:]$/.test(r.ctrlSeq));)r=r[v];r instanceof Ue&&r[y]instanceof Ve&&(r=r[y],r[y]instanceof Ve&&r[y].ctrlSeq!=r.ctrlSeq&&(r=r[y])),r===t[v]||t.isTooDeep(1)||(this.replaces(C(r[y]||t.parent.ends[v],t[v])),t[v]=r)}n.createLeftOf.call(this,t)}}),w.underset=_(R,function(e,t){e.ctrlSeq=`\\underset`,e.htmlTemplate=`<span class="mq-underset mq-overunder mq-non-leaf"><span class="mq-over">&1</span><span class="mq-under">&0</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[v].upOutOf=this.ends[y],this.upInto=this.ends[y].downOutOf=this.ends[v]}}),w.overset=_(R,function(e,t){e.ctrlSeq=`\\overset`,e.htmlTemplate=`<span class="mq-overset mq-overunder mq-non-leaf"><span class="mq-over">&0</span><span class="mq-under">&1</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[y].upOutOf=this.ends[v],this.upInto=this.ends[v].downOutOf=this.ends[y]}}),Ke=w.sqrt=w[`√`]=_(R,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">&radic;</span><span class="mq-non-leaf mq-sqrt-stem"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt(`,`)`],e.parser=function(){return re.optBlock.then(function(e){return re.block.map(function(t){var n=qe();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[y].jQ.parent();Te(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}}),w.hat=_(R,function(e,t){e.ctrlSeq=`\\hat`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-hat-prefix">^</span><span class="mq-hat-stem">&0</span></span>`,e.textTemplate=[`hat(`,`)`]}),qe=w.nthroot=_(Ke,function(e,t){e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">&0</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">&radic;</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&1</span></span></span>`,e.textTemplate=[`sqrt[`,`](`,`)`],e.latex=function(){return`\\sqrt[`+this.ends[v].latex()+`]{`+this.ends[y].latex()+`}`}}),Je=_(R,function(e,t){e.init=function(e,n,r){var i=`<span class="mq-non-leaf"><span class="mq-diacritic-above">`+n+`</span><span class="mq-diacritic-stem">&0</span></span>`;t.init.call(this,e,i,r)}}),w.vec=r(Je,`\\vec`,`&rarr;`,[`vec(`,`)`]),w.tilde=r(Je,`\\tilde`,`~`,[`tilde(`,`)`]),w.lrncuberoot=_(Ke,function(e,t){e.ctrlSeq=`\\lrncuberoot`,e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">3</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">&radic;</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt[3](`,`)`],e.latex=function(){return`\\sqrt[3]{`+this.ends[v].latex()+`}`}}),w.abs=_(R,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),w.lrnplaceholder=_(R,function(e,t){e.ctrlSeq=`\\lrnplaceholder`,e.htmlTemplate=`<span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[``],e.latex=function(){return this.ends[v].latex()}}),w.lrnexponent=_(R,function(e,t){e.ctrSeq=`\\lrnexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&1</span></span></span></span>`,e.textTemplate=[``,`**`],e.latex=function(){var e=this.ends[y].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[v].latex()+`^`+e}}),w.lrnsquaredexponent=_(R,function(e,t){e.ctrSeq=`\\lrnsquaredexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">2</span></span></span></span>`,e.textTemplate=[``,`**2`],e.latex=function(){return this.ends[v].latex()+`^2`}}),w.lrnsubscript=_(R,function(e,t){e.ctrSeq=`\\lrnsubscript`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0">&nbsp;</span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[v].latex()+`_`+this.ends[y].latex()}}),Ye=_(_(R,p),function(t,n){t.init=function(e,t,r,i,a){n.init.call(this,`\\left`+i,void 0,[t,r]),this.side=e,this.sides={},this.sides[v]={ch:t,ctrlSeq:i},this.sides[y]={ch:r,ctrlSeq:a}},t.numBlocks=function(){return 1},t.html=function(){return this.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-paren`+(this.side===y?` mq-ghost`:``)+`">`+this.sides[v].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===v?` mq-ghost`:``)+`">`+this.sides[y].ch+`</span></span>`,n.html.call(this)},t.latex=function(){return`\\left`+this.sides[v].ctrlSeq+this.ends[v].latex()+`\\right`+this.sides[y].ctrlSeq},t.matchBrack=function(e,t,n){return n instanceof Ye&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||Xe[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[v].ch]===n.sides[y].ch)&&n},t.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===v?0:1).removeClass(`mq-ghost`).html(this.sides[this.side].ch)},t.createLeftOf=function(e){var t,r,i;this.replacedFragment||(t=e.options,r=this.sides[v].ch===`|`?this.matchBrack(t,y,e[y])||this.matchBrack(t,v,e[v])||this.matchBrack(t,0,e.parent.parent):this.matchBrack(t,-this.side,e[-this.side])||this.matchBrack(t,-this.side,e.parent.parent)),r?(i=this.side=-r.side,this.closeOpposing(r),r===e.parent.parent&&e[i]&&C(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble(`reflow`)):(r=this,i=r.side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(C(e[-i],e.parent.ends[-i],i)),e[-i]=0),n.createLeftOf.call(r,e)),i===v?e.insAtLeftEnd(r.ends[v]):e.insRightOf(r)},t.placeCursor=e,t.unwrap=function(){this.ends[v].children().disown().adopt(this.parent,this,this[y]).jQ.insertAfter(this.jQ),this.remove()},t.deleteSide=function(e,t,n){var r,i,a,o=this.parent,s=this[e],c=o.ends[e];if(e===this.side)return this.unwrap(),void(s?n.insDirOf(-e,s):n.insAtDirEnd(e,o));if(r=n.options,i=!this.side,this.side=-e,this.matchBrack(r,e,this.ends[v].ends[this.side]))this.closeOpposing(this.ends[v].ends[this.side]),a=this.ends[v].ends[e],this.unwrap(),a.siblingCreated&&a.siblingCreated(n.options,e),s?n.insDirOf(-e,s):n.insAtDirEnd(e,o);else{if(this.matchBrack(r,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else{if(t&&i)return this.unwrap(),void(s?n.insDirOf(-e,s):n.insAtDirEnd(e,o));this.sides[e]={ch:Xe[this.sides[this.side].ch],ctrlSeq:Xe[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===v?0:1).addClass(`mq-ghost`).html(this.sides[e].ch)}s?(a=this.ends[v].ends[e],C(s,c,-e).disown().withDirAdopt(-e,this.ends[v],a,0).jQ.insAtDirEnd(e,this.ends[v].jQ.removeClass(`mq-empty`)),a.siblingCreated&&a.siblingCreated(n.options,e),n.insDirOf(-e,s)):t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[v])}},t.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},t.finalizeTree=function(){this.ends[v].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===v)).removeClass(`mq-ghost`),this.side=0}},t.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),Xe={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"&lang;":`&rang;`,"&rang;":`&lang;`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `},m(`(`),m(`[`),m(`{`,`\\{`),w.langle=r(Ye,v,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),w.rangle=r(Ye,y,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),T[`|`]=r(Ye,v,`|`,`|`,`|`,`|`),w.lVert=r(Ye,v,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),w.rVert=r(Ye,y,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),w.left=_(R,function(e){e.parser=function(){var e=I.regex,t=I.string,n=(I.succeed,I.optWhitespace);return n.then(e(/^(?:[([|]|\\\{|\\langle(?![a-zA-Z])|\\lVert(?![a-zA-Z]))/)).then(function(r){var i=r.charAt(0)===`\\`?r.slice(1):r;return r==`\\langle`&&(i=`&lang;`,r+=` `),r==`\\lVert`&&(i=`&#8741;`,r+=` `),re.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t,n=e.charAt(0)===`\\`?e.slice(1):e;return e==`\\rangle`&&(n=`&rang;`,e+=` `),e==`\\rVert`&&(n=`&#8741;`,e+=` `),t=Ye(0,i,n,r,e),t.blocks=[a],a.adopt(t,0,0),t})})})}}),w.right=_(R,function(e){e.parser=function(){return I.fail(`unmatched \\right`)}}),Ze=w.binom=w.binomial=_(_(R,p),function(e,t){e.ctrlSeq=`\\binom`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-paren mq-scaled">(</span><span class="mq-non-leaf"><span class="mq-array mq-non-leaf"><span>&0</span><span>&1</span></span></span><span class="mq-paren mq-scaled">)</span></span>`,e.textTemplate=[`choose(`,`,`,`)`]}),w.choose=_(Ze,function(e){e.createLeftOf=Ge.prototype.createLeftOf}),w.editable=w.MathQuillMathField=_(R,function(e,t){e.ctrlSeq=`\\MathQuillMathField`,e.htmlTemplate=`<span class="mq-editable-field"><span class="mq-root-block">&0</span></span>`,e.parser=function(){var e=this,n=I.string,r=I.regex,i=I.succeed;return n(`[`).then(r(/^[a-z][a-z0-9]*/i)).skip(n(`]`)).map(function(t){e.name=t}).or(i()).then(t.parser.call(e))},e.finalizeTree=function(e){var t=k(this.ends[v],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),u(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[v].controller))},e.latex=function(){return this.ends[v].latex()},e.text=function(){return this.ends[v].text()}}),Qe=w.embed=_(ae,function(e,t){e.setOptions=function(e){function t(){return``}return this.text=e.text||t,this.htmlTemplate=e.htmlString||``,this.latex=e.latex||t,this},e.parser=function(){var e=this,t=I.string,n=I.regex,r=I.succeed;return t(`{`).then(n(/^[a-z][a-z0-9]*/i)).skip(t(`}`)).then(function(i){return t(`[`).then(n(/^[-\w\s]*/)).skip(t(`]`)).or(r()).map(function(t){return e.setOptions(N[i](t))})})}}),w.MathQuillResponseContainer=_(R,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainer`,e.htmlTemplate=`<span class="lrn-mq-response-container"><marker class="lrn-qe-keyboard-i-response"></marker><content>Response</content></span>`,e.latex=function(){return`\\MathQuillResponseContainer`},e.text=function(){return this.ends[v].text()}}),w.MathQuillResponseContainerIcon=_(R,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainerIcon`,e.htmlTemplate=`<span class="lrn-mq-response-container-icon"><span class="lrn-qe-keyboard-i-response"></span></span>`,e.latex=function(){return`\\MathQuillResponseContainerIcon`},e.text=function(){return this.ends[v].text()}}),$e=w.matrix=_(R,function(e,t){var n=_(oe,function(e,t){e.init=function(e,n){return this.column=e,this.row=n,t.init.call(this)},e.keystroke=function(e,n,r){switch(e){case`Shift-Spacebar`:return n.preventDefault(),this.parent.insertColumn(this);case`Shift-Enter`:return this.parent.insertRow(this)}return t.keystroke.apply(this,arguments)},e.deleteOutOf=function(e,n){var r=this,i=arguments;this.parent.backspace(this,e,n,function(){return t.deleteOutOf.apply(r,i)})}}),r={column:`&`,row:`\\\\`};e.parentheses={left:null,right:null},e.maximum={rows:5,columns:5},e.defaults={rows:2,columns:2},e.ctrlSeq=`\\matrix`,e.createBlocks=function(){var e,t,r=this,i=r.blocks=[],a=0;this.htmlTemplate.replace(/&\d+/g,function(o,s){var c=r.htmlTemplate.substring(0,s).match(/<tr[^>]*>/gi).length-1;t=e===c?t+1:0,i[a]=n(t,c),i[a].adopt(r,r.ends[y],0),e=c,a++})},e.reflow=function(){var e=this.jQ.children(`table`),t=e.outerHeight()/+e.css(`fontSize`).slice(0,-2),n=this.jQ.children(`.mq-paren`);n.length&&Te(n,at(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e,t,n,i=this.getMatrixName(),a=`\\begin{`+i+`}`;for(n=0;n<this.blocks.length;n++)e=this.blocks[n].row,t!==void 0&&(a+=t===e?r.column:r.row),t=e,a+=this.blocks[n].latex();return a+=`\\end{`+i+`}`},e.createLeftOf=function(n){this.cursor=n;var r=Math.min(this.defaults.rows,this.maximum.rows),i=Math.min(this.defaults.columns,this.maximum.columns);this.defaultHtmlTemplate=this.defaultHtmlTemplate||this.generateHtmlTemplate(r,i),e.htmlTemplate=this.defaultHtmlTemplate,t.createLeftOf.call(this,n)},e.getMatrixName=function(){return this.ctrlSeq.replace(`\\`,``)},e.generateHtmlTemplate=function(e,t){function n(e){return e?`<span class="mq-paren mq-scaled">`+e+`</span>`:``}var r,i,a,o=`<span class="mq-matrix mq-non-leaf">`+n(this.parentheses.left);for(o+=`<table class="mq-non-leaf">`,e=Math.min(e,this.maximum.rows),t=Math.min(t,this.maximum.columns),r=0,i=0;i<e;i++){for(o+=`<tr>`,a=0;a<t;a++)o+=`<td>&`+r+`</td>`,r++;o+=`</tr>`}return o+=`</table>`,o+=n(this.parentheses.right)+`</span>`},e.htmlTemplate=e.generateHtmlTemplate(1,1),e.parser=function(){var e=I.regex,t=this,i=this.getMatrixName(),a=RegExp(`^(.*?)\\\\end{`+i+`}`),o=RegExp(`\\\\end{`+i+`}`);return e(a).then(function(e){var i,a,s,c,l=e.replace(o,``),u=[],d=l.split(r.row),f=Math.min(d.length,t.maximum.rows),p=0;for(a=0;a<f;a++)i=d[a].split(r.column),p=Math.max(p,i.length);for(p=Math.min(p,t.maximum.columns),a=0;a<f;a++)for(i=d[a].split(r.column),e=0;e<p;e++)s=n(e,a),c=re.parse(i[e]||` `),c.children().adopt(s,s.ends[y],0),u.push(s);for(t.htmlTemplate=t.generateHtmlTemplate(f,p),t.blocks=u,a=0;a<u.length;a+=1)u[a].adopt(t,t.ends[y],0);return I.succeed(t)})},e.finalizeTree=function(){var e=this.jQ.find(`table`);e.length&&(this.relink(),e.removeClass(function(e,t){var n=t.match(/mq-rows-\d+/g);return n&&n.join(` `)||``}),e.addClass(`mq-rows-`+e.find(`tr`).length))},e.relink=function(){var e=this.jQ.find(`td`),t=S.byId[e.first().attr(it)],n=S.byId[e.last().attr(it)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n,a,o,s=S.byId[b(this).attr(it)],c=e.eq(t+1),l=b(this).closest(`tr`).next(`tr`),u=b(this).closest(`tr`).index(),d=b(this).index();c.length&&(a=S.byId[c.attr(it)],s[y]=a,a[v]=s),n=l.length?l.find(`td`).eq(d):r.find(`td`).eq(d+1),n.length&&(o=S.byId[n.attr(it)],s.downOutOf=o,o.upOutOf=s),s.column=d,s.row=u,i.push(s)}),this.ends[v]=t,this.ends[y]=n,t&&t[v]&&delete t[v],n&&n[y]&&delete n[y],this.blocks=i},e.deleteCell=function(e){function t(){return S.byId[b(this).attr(it)].isEmpty()}var n,r=e.jQ.closest(`tr`),i=e.jQ.index(),a=r.index(),o=r.find(`td`).not(e.jQ),s=this.jQ.find(`tr`).not(r).map(function(){return b(this).find(`td`)[i]}),c=this.jQ.find(`td`).length===1;return o.filter(t).length===o.length&&s.length&&(o.remove(),e.jQ.remove(),r.remove(),this.finalizeTree()),s.filter(t).length===s.length&&o.length&&(s.remove(),e.jQ.remove(),this.finalizeTree()),c||(a=Math.min(a,this.jQ.find(`tr`).length-1),i=Math.min(i,this.jQ.find(`tr`).eq(a).find(`td`).length-1),n=S.byId[this.jQ.find(`tr`).eq(a).find(`td`).eq(i).attr(it)]),n},e.addRow=function(e){var t,r,i,a,o;if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(t=e.find(`td`).length,r=b(`<tr></tr>`),o=0;o<t;o++)i=n(),i.parent=this,i.jQ=b(`<td class="mq-empty">`).attr(it,i.id),r.append(i.jQ),a||=i;return r.insertAfter(e),a}},e.addColumn=function(e){var t,r,i,a,o;if(!(e.closest(`tr`).find(`td`).length>=this.maximum.columns))return t=e.index(),r=e.closest(`tr`).index(),i=this,o=[],this.jQ.find(`tr`).each(function(){a=n(),a.parent=i,a.jQ=b(`<td class="mq-empty">`).attr(it,a.id),a.jQ.insertAfter(b(this).find(`td`).eq(t)),o.push(a)}),o[r]},e.insertColumn=function(e){newBlock=this.addColumn(e.jQ),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.insertRow=function(e){newBlock=this.addRow(e.jQ.closest(`tr`)),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.backspace=function(e,t,n,r){if(e.isEmpty()){var i=this.deleteCell(e);i?n.insAtRightEnd(i):(r(),this.finalizeTree()),this.bubble(`edited`)}}}),w.pmatrix=_($e,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),w.bmatrix=_($e,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),w.Bmatrix=_($e,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),w.vmatrix=_($e,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),w.Vmatrix=_($e,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}}),et=l(1),et)(function(e,t){typeof t==`function`?(c[e]=function(){return s(),t.apply(this,arguments)},c[e].prototype=t.prototype):c[e]=t})(tt,et[tt])})()})),zH=o((()=>{})),BH=o(((e,t)=>{LH(),RH(),zH(),t.exports=window.MathQuill})),VH={fontFamily:`MJXZERO, MJXTEX !important`,"-webkit-font-smoothing":`antialiased !important`,"& .mq-math-mode > span > var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode span var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode .mq-nonSymbola":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode > span > var.mq-operator-name":{fontFamily:`MJXZERO, MJXTEX !important`}},HH={"& .mq-longdiv-inner":{marginTop:`-1px`,marginLeft:`5px !important;`,"& > .mq-empty":{padding:`0 !important`,marginLeft:`0px !important`,marginTop:`2px`}},"& .mq-math-mode .mq-longdiv":{display:`inline-flex !important`}},UH={"& .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`0.5em !important`,paddingRight:`0.15em`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-supsub ":{fontSize:`70.7%`},"& .mq-math-mode .mq-supsub.mq-sup-only":{verticalAlign:`-0.1em !important`,"& .mq-sup":{marginBottom:`0px !important`}},"& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only":{verticalAlign:`0.4em !important`},"& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group":{verticalAlign:`0.4em !important`}},WH={"& *":{...VH,...HH,"& .mq-math-mode .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-math-mode .mq-sqrt-stem":{marginTop:`-5px`,paddingTop:`4px`},"& .mq-math-mode .mq-paren":{verticalAlign:`middle !important`},"& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty":{padding:`0 !important`},"& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ":{padding:`0 !important`}}},GH={commonMqFontStyles:VH,longdivStyles:HH,supsubStyles:UH,commonMqKeyboardStyles:WH},KH=e=>e.ariaLabel||e.name||e.label||e.latex||`keypad action`,qH=e=>(T(5-e.length,()=>e.push([])),E.apply(null,e)),JH=D(`pie-lib:math-inline:keypad:a11y`),YH=G(`div`)(()=>({...WH,width:`100%`,display:`grid`,gridTemplateRows:`repeat(5, minmax(40px, 60px))`,gridAutoFlow:`column`,border:`1px solid ${bL()}`,"&.character":{textTransform:`initial !important`,gridTemplateRows:`repeat(5, minmax(40px, 50px)) !important`},"&.language":{gridTemplateRows:`repeat(4, minmax(40px, 50px)) !important`,"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}}));G(`div`)(({operator:e})=>({flex:e?`0 0 auto`:`1 1 0`,display:`grid`,gridAutoFlow:`column`,gridTemplateRows:`repeat(5, minmax(44px, 56px))`,gridAutoColumns:`minmax(72px, 1fr)`,backgroundColor:e?jL():AL()}));var XH=G(MR,{shouldForwardProp:e=>e!==`operator`})(({operator:e})=>({minWidth:`auto`,borderRadius:0,color:KI(),backgroundColor:e?jL():AL(),textTransform:`none`,fontSize:`1.6rem`,lineHeight:1,"&:hover":{backgroundColor:e?ML():jL()},"&:focus-visible":{outline:`3px solid ${DL()}`,outlineOffset:-3,zIndex:2}})),ZH=G(CN,{shouldForwardProp:e=>e!==`operator`})(({operator:e})=>({minWidth:`auto`,borderRadius:0,color:KI(),backgroundColor:e?jL():AL(),"&:hover":{backgroundColor:e?ML():jL()},"&:focus-visible":{outline:`3px solid ${DL()}`,outlineOffset:-3,zIndex:2},"& .icon":{height:`30px`}})),QH=G(`span`)(()=>({pointerEvents:`none`,color:KI(),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minHeight:40,minWidth:34,"& .MathJax":{fontSize:`1.45rem`,lineHeight:1.1},"& mjx-container":{overflow:`visible !important`,lineHeight:1.1},"& .tpl-root":{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:4,fontSize:`1.5rem`,lineHeight:1,minHeight:34,fontFamily:`"Times New Roman", Times, serif`,textTransform:`none`},"& .mq-keycap":{fontFamily:`"STIX Two Text", MJXZERO, MJXTEX, "Times New Roman", Times, serif`,fontStyle:`normal`},"& .mq-keycap var":{fontFamily:`"STIX Two Text", MJXZERO, MJXTEX-I, "Times New Roman", Times, serif`,fontStyle:`italic`},"& .mq-keycap .mq-operator-name":{fontFamily:`"STIX Two Text", MJXZERO, MJXTEX, "Times New Roman", Times, serif`,fontStyle:`normal`},"& .tpl-fraction":{display:`inline-grid`,gridTemplateRows:`auto 1px auto`,justifyItems:`center`,alignItems:`center`,minWidth:22},"& .tpl-frac-line":{width:`1.05em`,borderTop:`2px solid ${KI()}`,margin:`2px 0`},"& .tpl-mixed-fraction":{display:`inline-flex`,alignItems:`center`,gap:3},"& .tpl-frac-cell":{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minHeight:`0.55em`},"& .tpl-placeholder":{display:`inline-block`,width:`0.42em`,height:`0.76em`,backgroundColor:uL()},"& .tpl-longdiv":{display:`inline-flex`,alignItems:`center`,gap:3},"& .tpl-longdiv-radicand":{display:`inline-flex`,alignItems:`center`,borderTop:`2px solid ${KI()}`,paddingTop:`0.15em`,minWidth:`0.8em`,justifyContent:`center`},"& .tpl-sup":{display:`inline-flex`,alignItems:`flex-start`},"& .tpl-sup .tpl-placeholder":{width:`0.3em`,height:`0.5em`,marginLeft:`0.05em`,transform:`translateY(-0.35em)`},"& .tpl-sub":{display:`inline-flex`,alignItems:`flex-end`},"& .tpl-sub .tpl-placeholder":{width:`0.3em`,height:`0.5em`,marginLeft:`0.05em`,transform:`translateY(0.3em)`},"& .tpl-root-radical":{display:`inline-flex`,alignItems:`flex-start`},"& .tpl-root-sign":{fontSize:`1.15em`,lineHeight:1},"& .tpl-radicand":{borderTop:`2px solid ${KI()}`,padding:`0.05em 0 0 0.08em`,marginLeft:`0.03em`},"& .tpl-over":{display:`inline-grid`,justifyItems:`center`,gap:2},"& .tpl-over-line":{display:`block`,width:`1em`,borderTop:`2px solid ${KI()}`},"& .tpl-over-arrow":{display:`block`,fontSize:`0.65em`,lineHeight:1},"& .tpl-over-arc":{display:`block`,fontSize:`0.8em`,lineHeight:1,transform:`translateY(0.1em)`}})),$H=G(MR,{shouldForwardProp:e=>e!==`operator`})(({operator:e})=>({minWidth:`auto`,borderRadius:0,padding:`6px`,overflow:`visible`,textTransform:`none`,color:KI(),backgroundColor:e?jL():AL(),"&:hover":{backgroundColor:e?ML():jL()},"&:focus-visible":{outline:`3px solid ${DL()}`,outlineOffset:-3,zIndex:2}})),eU={"\\theta":`θ`,"\\pi":`π`,"\\infty":`∞`,"\\propto":`∝`,"\\sin":`sin`,"\\cos":`cos`,"\\tan":`tan`,"\\sec":`sec`,"\\csc":`csc`,"\\cot":`cot`,"\\log":`log`,"\\ln":`ln`,"\\pm":`±`,"\\approx":`≈`,"\\napprox":`≉`,"\\neq":`≠`,"\\sim":`∼`,"\\nsim":`≁`,"\\mu":`μ`,"\\Sigma":`Σ`,"\\sigma":`σ`,"\\parallel":`∥`,"\\nparallel":`∦`,"\\perp":`⟂`,"\\angle":`∠`,"\\measuredangle":`∡`,"\\triangle":`△`,"\\square":`□`,"\\parallelogram":`▱`,"\\odot":`⊙`,"\\degree":`°`,"\\cong":`≅`,"\\ncong":`≇`,"\\leftarrow":`←`,"\\rightarrow":`→`,"\\leftrightarrow":`↔`,"\\le":`≤`,"\\ge":`≥`},tU=new Set([`\\sin`,`\\cos`,`\\tan`,`\\sec`,`\\csc`,`\\cot`,`\\log`,`\\ln`]),nU=new Set([`x`,`y`,`i`,`e`,`AB`]),rU=(e=``)=>nU.has(e)?(0,U.jsx)(`var`,{children:e}):(0,U.jsx)(`span`,{children:e}),iU=(e=``)=>{if(tU.has(e))return(0,U.jsx)(`var`,{className:`mq-operator-name`,children:e.replace(/^\\/,``)});let t=eU[e];return t?nU.has(t)?(0,U.jsx)(`var`,{children:t}):(0,U.jsx)(`span`,{children:t}):rU(e.replace(/^\\/,``).replace(/\\(left|right)/g,``).replace(/[{}\\]/g,``).replace(/\s+/g,` `).trim())},aU=({short:e=!1})=>(0,U.jsx)(`span`,{className:`tpl-placeholder`,style:e?{width:`0.3em`,height:`0.55em`}:void 0}),oU=({body:e,marker:t})=>(0,U.jsxs)(`span`,{className:`tpl-root tpl-over mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`span`,{className:t,children:t===`tpl-over-line`?``:t===`tpl-over-arrow`?`↔`:`◠`}),(0,U.jsx)(`span`,{children:e})]}),sU=({definition:e})=>{let t=e.key?.latex||``;switch(e.visualType){case`fractionTemplate`:return t===`\\frac{x}{ }`?(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:(0,U.jsxs)(`span`,{className:`tpl-fraction`,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(`span`,{className:`tpl-frac-line`}),(0,U.jsx)(aU,{})]})}):(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:(0,U.jsxs)(`span`,{className:`tpl-fraction`,children:[(0,U.jsx)(aU,{}),(0,U.jsx)(`span`,{className:`tpl-frac-line`}),(0,U.jsx)(aU,{})]})});case`mixedFractionTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-mixed-fraction mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsxs)(`span`,{className:`tpl-fraction`,style:{minWidth:`0.9em`},children:[(0,U.jsx)(`span`,{className:`tpl-frac-cell`,children:(0,U.jsx)(aU,{short:!0})}),(0,U.jsx)(`span`,{className:`tpl-frac-line`}),(0,U.jsx)(`span`,{className:`tpl-frac-cell`,children:(0,U.jsx)(aU,{short:!0})})]})]});case`squaredTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sup mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(`span`,{style:{fontSize:`0.7em`,transform:`translateY(-0.25em)`},children:`2`})]});case`longdivTemplate`:return(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:(0,U.jsxs)(`span`,{className:`tpl-longdiv`,children:[(0,U.jsx)(`span`,{children:`)`}),(0,U.jsx)(`span`,{className:`tpl-longdiv-radicand`,children:(0,U.jsx)(aU,{})})]})});case`supTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sup mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(aU,{short:!0})]});case`subTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sub mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(aU,{short:!0})]});case`sqrtTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-root-radical mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`span`,{className:`tpl-root-sign`,children:`√`}),(0,U.jsx)(`span`,{className:`tpl-radicand`,children:(0,U.jsx)(aU,{})})]});case`nthRootTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-root-radical mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`span`,{style:{fontSize:`0.55em`,transform:`translate(0.15em,-0.2em)`},children:(0,U.jsx)(aU,{short:!0})}),(0,U.jsx)(`span`,{className:`tpl-root-sign`,children:`√`}),(0,U.jsx)(`span`,{className:`tpl-radicand`,children:(0,U.jsx)(aU,{})})]});case`parenTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:[`(`,(0,U.jsx)(aU,{}),`)`]});case`bracketTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:[`[`,(0,U.jsx)(aU,{}),`]`]});case`absTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:[`|`,(0,U.jsx)(aU,{}),`|`]});case`logSubTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sub mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{className:`mq-operator-name`,children:`log`}),(0,U.jsx)(aU,{short:!0})]});case`overlineTemplate`:return(0,U.jsx)(oU,{body:t.includes(`y`)?(0,U.jsx)(`var`,{children:`y`}):t.includes(`x`)?(0,U.jsx)(`var`,{children:`x`}):(0,U.jsx)(aU,{}),marker:`tpl-over-line`});case`overArrowTemplate`:return(0,U.jsx)(oU,{body:(0,U.jsx)(aU,{}),marker:`tpl-over-arrow`});case`overBiArrowTemplate`:return(0,U.jsx)(oU,{body:t.includes(`AB`)?(0,U.jsx)(`var`,{children:`AB`}):(0,U.jsx)(aU,{}),marker:`tpl-over-arrow`});case`overArcTemplate`:return(0,U.jsx)(oU,{body:(0,U.jsx)(aU,{}),marker:`tpl-over-arc`});case`symbolText`:return(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:iU(t)});default:return(0,U.jsx)(`span`,{className:`tpl-root`,"aria-hidden":!0,children:e.key?.label||e.key?.write||e.key?.name})}},cU=e=>e&&e.name===``&&e.latex===``&&e.write===``,lU=(e=``)=>e.replace(/\$\$/g,``).replace(/^\$|\$$/g,``).trim(),uU=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},dU=class extends P.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,baseSet:p.array,additionalKeys:p.array,layoutForKeyPad:p.object,onPress:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,setKeypadInteraction:p.func,mode:p.oneOfType([p.string,p.number]),onRequestClose:p.func};static defaultProps={baseSet:FH,noDecimal:!1};constructor(e){super(e),this.keypadRef=P.createRef(),this.buttonRefs=[],this.state={activeIndex:0}}componentDidMount(){let e=this.keypadRef?.current,t=e?.closest(`.main-container`),n=e?.closest(`.pie-toolbar`);if(this.props.controlledKeypadMode&&t&&n){let e=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=e.top+e.height-(r.top+r.height);i<0&&t&&(t.style.height=`${e.height+e.top-i}px`)}e&&(e.addEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.addEventListener(`mousedown`,this.handleKeypadInteraction,!0))}componentWillUnmount(){let e=this.keypadRef?.current;if(this.props.controlledKeypadMode&&e){let t=e.closest(`.main-container`);t&&(t.style.height=`unset`)}e&&(e.removeEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.removeEventListener(`mousedown`,this.handleKeypadInteraction,!0))}handleKeypadInteraction=()=>{this.props.setKeypadInteraction&&this.props.setKeypadInteraction(!0)};keyIsNotAllowed=e=>{let{noDecimal:t}=this.props;return(e.write===`.`&&e.label===`.`||e.write===`,`&&e.label===`,`)&&t};flowKeys=(e,t)=>y([...qH([...(e||[]).map(e=>[...e])]),...qH([...(t||[]).map(e=>[...e])])]);toRenderModel=()=>{let{baseSet:e,additionalKeys:t,mode:n}=this.props;return([`non-negative-integers`,`integers`,`decimals`,`fractions`,`item-authoring`,`language`].includes(n)?this.flowKeys([],t||[]):this.flowKeys(e,t||[])).filter(e=>e&&!cU(e)).map(e=>e.latex?{...e,latex:lU(e.latex),write:typeof e.write==`string`?lU(e.write):e.write,label:typeof e.label==`string`?lU(e.label):e.label}:e).map((e,t)=>({id:`${e.label||e.latex||e.name||e.command||`key`}-${t}`,ariaLabel:KH(e),key:e}))};pressKey=e=>{!e||this.keyIsNotAllowed(e.key)||(JH(`[pressKey]`,e.id),this.props.onPress(e.key))};moveFocus=e=>{let t=Math.max(0,Math.min(e,this.buttonRefs.length-1));this.setState({activeIndex:t},()=>{let e=this.buttonRefs[t];e&&!e.disabled&&e.focus()})};onButtonKeyDown=(e,t)=>{if(e.key===`ArrowRight`||e.key===`ArrowDown`){e.preventDefault(),this.moveFocus(t+1);return}if(e.key===`ArrowLeft`||e.key===`ArrowUp`){e.preventDefault(),this.moveFocus(t-1);return}if(e.key===`Home`){e.preventDefault(),this.moveFocus(0);return}if(e.key===`End`){e.preventDefault(),this.moveFocus(this.buttonRefs.length-1);return}e.key===`Escape`&&this.props.onRequestClose&&(e.preventDefault(),this.props.onRequestClose())};renderKey=(e,t)=>{let n=e.key,r=n.category===`operators`,i=this.keyIsNotAllowed(n),a={key:`${e.id}-${t}`,onClick:()=>this.pressKey(e),onKeyDown:e=>this.onButtonKeyDown(e,t),onFocus:()=>this.setState({activeIndex:t}),tabIndex:this.state.activeIndex===t?0:-1,disabled:i,"aria-label":e.ariaLabel||KH(n),...n.actions||{},...n.extraProps||{}};if(n.icon){let e=n.icon?n.icon:`div`;return(0,U.jsx)(ZH,{...a,operator:r,children:(0,U.jsx)(e,{className:`icon`,"aria-hidden":`true`})})}return n.latex?(0,U.jsx)($H,{...a,operator:r,children:(0,U.jsx)(QH,{children:(0,U.jsx)(sU,{definition:e})})}):(0,U.jsx)(XH,{...a,operator:r,children:n.label||n.write||n.name})};render(){let{className:e,onFocus:t,layoutForKeyPad:n}=this.props;this.buttonRefs=[];let r=this.toRenderModel(),i=r.length%5?1:0,a={gridTemplateColumns:`repeat(${Math.floor(r.length/5)+i}, minmax(min-content, 150px))`,...uU(n)},o=0,s=e=>{let t=o++,n=this.renderKey(e,t);return P.cloneElement(n,{ref:e=>{this.buttonRefs[t]=e}})};return(0,U.jsx)(YH,{ref:this.keypadRef,className:[e,this.props.mode].filter(Boolean).join(` `),style:a,onFocus:t,role:`grid`,"aria-label":`Math keypad`,children:r.map(e=>s(e))})}},fU=e=>{if(e.command)return{value:e.command,type:`command`};if(e.write)return{value:e.write};if(e.keystroke)return{type:`cursor`,value:e.keystroke}},pU=class extends P.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,mode:p.oneOfType([p.string,p.number]),layoutForKeyPad:p.object,onClick:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,additionalKeys:p.array,setKeypadInteraction:p.func,onRequestClose:p.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(fU(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s,onRequestClose:c}=this.props,l=xH(a);return(0,U.jsx)(dU,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:_B(yH(e),l),onPress:this.keypadPress,mode:e,setKeypadInteraction:s,onRequestClose:c})}},mU=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},hU=l(BH(),1),gU;typeof window<`u`&&(gU=hU.default.getInterface(2),gU&&gU.registerEmbed&&mU(gU));var _U=D(`math-input:mq:input`),vU=G(`span`)({}),yU=class extends P.Component{static propTypes={className:p.string,onClick:p.func,onChange:p.func,latex:p.string,onFocus:p.func,onBlur:p.func};componentDidMount(){if(!gU)throw Error(`MQ is not defined - but component has mounted?`);this.mathField=gU.MathField(this.input,{handlers:{edit:this.onInputEdit.bind(this)}}),this.updateLatex()}componentDidUpdate(){this.updateLatex()}updateLatex(){if(!this.mathField)return;let{latex:e}=this.props;e!=null&&this.mathField.latex(e)}clear(){return this.mathField.latex(``),``}blur(){_U(`blur mathfield`),this.mathField.blur()}focus(){_U(`focus mathfield...`),this.mathField.focus()}command(e){return _U(`command: `,e),Array.isArray(e)?e.forEach(e=>{this.mathField.cmd(e)}):this.mathField.cmd(e),this.mathField.focus(),this.mathField.latex()}keystroke(e){return this.mathField.keystroke(e),this.mathField.focus(),this.mathField.latex()}write(e){return _U(`write: `,e),this.mathField.write(e),this.mathField.focus(),this.mathField.latex()}onInputEdit=()=>{_U(`[onInputEdit] ...`);let{onChange:e}=this.props;this.mathField&&e&&e(this.mathField.latex())};refresh=()=>{this.blur(),this.focus()};onKeyPress=e=>{e.charCode===13&&e.preventDefault()};onClick=e=>{let{onClick:t}=this.props;this.refresh(),t&&t(e)};shouldComponentUpdate(e){return _U(`next: `,e.latex),_U(`current: `,this.mathField.latex()),e.latex!==this.mathField.latex()}render(){let{onFocus:e,onBlur:t,className:n}=this.props;return(0,U.jsx)(vU,{className:n,onKeyDown:this.onKeyPress,onClick:this.onClick,onFocus:e,onBlur:t,ref:e=>this.input=e})}},bU;typeof window<`u`&&(bU=hU.default.getInterface(2));var xU=D(`pie-lib:math-input:mq:static`),SU=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,CU=/ /g;function wU(e=``){return e.replace(CU,``)}function TU(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var EU=class extends P.Component{static propTypes={latex:p.string.isRequired,onFocus:p.func,onBlur:p.func,className:p.string,getFieldName:p.func,onSubFieldChange:p.func,onSubFieldFocus:p.func,setInput:p.func};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=P.createRef()}componentDidMount(){this.update(),SH(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),SH()}componentWillUnmount(){this.removeLiveRegion(),this.removeEventListeners()}createLiveRegion=()=>{this.liveRegion=document.createElement(`div`),this.liveRegion.style.position=`absolute`,this.liveRegion.style.width=`1px`,this.liveRegion.style.height=`1px`,this.liveRegion.style.marginTop=`-1px`,this.liveRegion.style.clip=`rect(1px, 1px, 1px, 1px)`,this.liveRegion.style.overflow=`hidden`,this.liveRegion.setAttribute(`aria-live`,`polite`),this.liveRegion.setAttribute(`aria-atomic`,`true`),document.body.appendChild(this.liveRegion)};addEventListeners=()=>{let e=this.inputRef.current;e&&(e.addEventListener(`keydown`,this.handleKeyDown),e.addEventListener(`click`,this.handleMathKeyboardClick))};removeEventListeners=()=>{let e=this.inputRef.current;e&&(e.removeEventListener(`keydown`,this.handleKeyDown),e.removeEventListener(`click`,this.handleMathKeyboardClick))};removeLiveRegion=()=>{this.liveRegion&&=(document.body.removeChild(this.liveRegion),null)};handleKeyDown=e=>{(e?.key===`Backspace`||e?.key===`Delete`)&&this.setState({isDeleteKeyPressed:!0}),this.setState({inputSource:`keyboard`})};handleMathKeyboardClick=()=>{this.setState({inputSource:`mathKeyboard`})};onInputEdit=e=>{if(!this.mathField)return;let t=this.props.getFieldName(e,this.mathField.innerFields);this.props.onSubFieldChange&&this.props.onSubFieldChange(t,e.latex()),this.announceLatexConversion(e.latex())};announceLatexConversion=e=>{if(!this.state){console.error(`State is not initialized`);return}let{previousLatex:t,inputSource:n,isDeleteKeyPressed:r}=this.state,i=`Converted to math symbol`;if(n===`keyboard`&&!r)if(TU(e)>TU(t))this.announceMessage(i);else try{this.mathField.parseLatex(t),this.mathField.parseLatex(e),e==t&&this.announceMessage(i)}catch(e){console.warn(`Error parsing latex:`,e.message),console.warn(e)}this.setState({previousLatex:e,isDeleteKeyPressed:!1})};announceMessage=e=>{this.setState({previousLatex:``}),this.liveRegion&&(this.liveRegion.textContent=e,setTimeout(()=>{this.liveRegion.textContent=``},500))};update=()=>{if(!bU)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=bU.StaticMath(this.inputRef?.current,{handlers:{edit:this.onInputEdit.bind(this)}});try{this.mathField.parseLatex(this.props.latex),this.mathField.latex(this.props.latex)}catch{this.mathField.latex(`\\MathQuillMathField[r1]{}`)}};blur=()=>{xU(`blur mathfield`),this.mathField.blur()};focus=()=>{xU(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=wU(this.mathField.parseLatex(e.latex)),n=(e.latex.match(SU)||[]).length,r=t!==wU(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return xU(`[shouldComponentUpdate] `,r),r}catch(e){return console.warn(`Error parsing latex:`,e.message,`skip update`),console.warn(e),!1}}onFocus=e=>{try{let t=e.target.parentElement.nextSibling,n=parseInt(t.getAttribute(`mathquill-block-id`),10);n||=(t=t.parentElement,parseInt(t.getAttribute(`mathquill-block-id`),10));let r=this.mathField.innerFields.find(e=>e.id===n);if(r){let e=this.props.getFieldName(r,this.mathField.innerFields);this.props.setInput&&this.props.setInput(r),this.props.onSubFieldFocus(e,r)}}catch(e){console.error(`error finding root block`,e.message)}};render(){let{onBlur:e,className:t}=this.props;return(0,U.jsx)(`span`,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},DU=G(`span`)(()=>({display:`inline-flex`,border:`1px solid #C0C3CF`,margin:`1px 5px`,cursor:`pointer`,alignItems:`center`,justifyContent:`center`,minWidth:`50px`,minHeight:`36px`,height:`fit-content`})),OU=G(`div`)(({theme:e})=>({background:e.palette.grey.A100,color:e.palette.grey.A700,display:`inline-flex`,borderRight:`2px solid #C0C3CF`,boxSizing:`border-box`,overflow:`hidden`,fontSize:`12px`,minHeight:`36px`,height:`100%`,alignItems:`center`,fontFamily:`Symbola, Times New Roman, serif`,padding:`0 2px`})),kU=G(`div`)(()=>({flex:8,color:`var(--pie-text, black)`,padding:`4px !important`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`var(--pie-background, rgba(255, 255, 255, 0))`,"& > .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-overarrow.mq-arrow-both":{marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`}})),AU=e=>{let{node:t,options:n,selected:r}=e,{attrs:i}=t,{value:a,index:o}=i,s=`R ${parseInt(o)+1}`;return(0,U.jsx)(jb,{className:`math-templated`,"data-selected":r,style:{display:`inline-flex`,minHeight:`36px`,minWidth:`50px`,cursor:`pointer`},children:(0,U.jsxs)(DU,{...i,children:[(0,U.jsx)(OU,{children:s}),(0,U.jsx)(kU,{children:(0,U.jsx)(EU,{latex:a})})]})})};AU.propTypes={attributes:p.object,value:p.string,keyToDisplay:p.string};var jU={},MU=e=>String(e||``).replace(/-/g,`_`),NU=e=>e&&e.attrs&&e.attrs.index!=null?String(e.attrs.index):null,PU=(e,t)=>{let n=[];return e.descendants((e,r)=>{if(e.type&&e.type.name===t){let t=NU(e);t!=null&&n.push({index:t,pos:r,node:e})}return!0}),n},FU=(e,t)=>{let n=0;return e.descendants(e=>(e.type&&e.type.name===t&&(n+=1),!0)),n},IU=({schema:e,typeName:t,index:n})=>{let r=e.nodes[t];return r?r.create({index:String(n),id:String(n),value:``}):null},LU=(e,t)=>{let n=e.resolve(Math.min(t,e.content.size));return Z.near(n,1)},RU=Pv.create({name:`responseArea`,addOptions(){return{maxResponseAreas:null,error:null,options:null,respAreaToolbar:null,onHandleAreaChange:null}},addProseMirrorPlugins(){if(!this.options.type)return[];let e=MU(this.options.type);return[new cu({key:new du(`response-area-watcher:${e}`),view:t=>(jU[e]===void 0&&(jU[e]=0,t.state.doc.descendants(t=>{if(t.type&&t.type.name===e){let n=NU(t);if(n!=null){let t=parseInt(n,10);!Number.isNaN(t)&&t>jU[e]&&(jU[e]=t)}}return!0})),{update:(t,n)=>{let r=t.state;if(n.doc.eq(r.doc))return;let i=PU(r.doc,e),a=PU(n.doc,e);if(this.options.toolbar&&(this.options.toolbar.disabled=i.length>=this.options.maxResponseAreas),a.length>i.length){let e=new Set(i.map(e=>e.index)),t=a.filter(t=>!e.has(t.index));t.length&&typeof this.options.onHandleAreaChange==`function`&&this.options.onHandleAreaChange(t)}}})})]},addCommands(){return{insertResponseArea:e=>({tr:t,state:n,dispatch:r,commands:i})=>{let a=MU(e);if(FU(n.doc,a)>=this.options.maxResponseAreas)return!1;jU[a]===void 0&&(jU[a]=0);let o=jU[a]+1;jU[a]+=1;let s=IU({schema:n.schema,typeName:a,index:o});if(!s)return!1;let{selection:c}=n,l=c.from,u=e=>{try{return t.insert(e,s),e}catch{return null}},d=u(l);if(d??=u(t.doc.content.size),d==null)return!1;if([`math_templated`,`inline_dropdown`,`explicit_constructed_response`].includes(a))t.setSelection(Q.create(t.doc,d));else{let e=d+s.nodeSize;t.setSelection(LU(t.doc,e))}return r&&(i.focus(),r(t)),!0},refreshResponseArea:()=>({tr:e,state:t,commands:n,dispatch:r})=>{let{selection:i}=t,a=i.$from.nodeAfter,o=i.from;return e.setNodeMarkup(o,void 0,{...a?.attrs,updated:`${Date.now()}`}),e.setSelection(Q.create(e.doc,o)),r&&(n.focus(),r(e)),!0}}}}),zU=uy.create({name:`explicit_constructed_response`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="explicit_constructed_response"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`explicit_constructed_response`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return zb(e=>(0,U.jsx)(PN,{...e,options:this.options}))}}),BU=uy.create({name:`math_templated`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="math_templated"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`math_templated`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return zb(e=>(0,U.jsx)(AU,{...e,options:this.options}))}}),VU=uy.create({name:`drag_in_the_blank`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},id:{default:null},value:{default:``},inTable:{default:null},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="drag_in_the_blank"]`,getAttrs:e=>({index:e.dataset.index,id:e.dataset.id,value:e.dataset.value,inTable:e.dataset.inTable})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`drag_in_the_blank`,"data-index":e.index,"data-id":e.id,"data-value":e.value,"data-in-table":e.inTable}]},addNodeView(){return zb(e=>(0,U.jsx)(oB,{...e,options:this.options}))}}),HU=uy.create({name:`inline_dropdown`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="inline_dropdown"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`inline_dropdown`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return zb(e=>(0,U.jsx)(sB,{...e,options:this.options}))}}),UU=Xr(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),WU=Xr(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),GU=Xr(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function KU(e){return Yr(`MuiMenuItem`,e)}var qU=Xr(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function JU(e){return Yr(`MuiNativeSelect`,e)}var YU=Xr(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),XU=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return A({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${K(n)}`,a&&`iconOpen`,r&&`disabled`]},JU,t)},ZU=G(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${YU.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),QU=G(ZU,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:No,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${YU.multiple}`]:t.multiple}]}})({}),$U=G(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${YU.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),eW=G($U,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${K(n.variant)}`],n.open&&t.iconOpen]}})({}),tW=P.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=XU(l);return(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(QU,{ownerState:l,className:k(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,U.jsx)(eW,{as:a,ownerState:l,className:u.icon})]})});function nW(e){return Yr(`MuiSelect`,e)}var rW=Xr(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function iW(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function aW(e){return e==null||typeof e==`string`&&!e.trim()}function oW(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var sW=P.createContext(null);function cW(){return P.useContext(sW)}var lW=sW.Provider,uW,dW=G(ZU,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${rW.select}`]:t.select},{[`&.${rW.select}`]:t[n.variant]},{[`&.${rW.error}`]:t.error},{[`&.${rW.multiple}`]:t.multiple}]}})({[`&.${rW.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),fW=G($U,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${K(n.variant)}`],n.open&&t.iconOpen]}})({}),pW=G(`input`,{shouldForwardProp:e=>Mo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),mW=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return A({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${K(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},nW,t)},hW=P.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:A,SelectDisplayProps:M={},tabIndex:ee,type:N,value:te,variant:F=`standard`,...I}=e,[L,ne]=$j({controlled:te,default:l,name:`Select`}),[re,ie]=$j({controlled:E,default:c,name:`Select`}),R=P.useRef(null),ae=P.useRef(null),[z,B]=P.useState(null),{current:oe}=P.useRef(E!=null),[se,ce]=P.useState(),[le,ue]=P.useState(null),de=rM(t,m),fe=P.useCallback(e=>{ae.current=e,e&&B(e)},[]),V=z?.parentNode;P.useImperativeHandle(de,()=>({focus:()=>{ae.current.focus()},node:R.current,value:L}),[L]);let pe=z!==null&&re;P.useEffect(()=>{if(!pe||!V||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ce(V.clientWidth)});return e.observe(V),()=>{e.disconnect()}},[pe,V,a]),P.useEffect(()=>{c&&re&&z&&!oe&&(ce(a?null:V.clientWidth),ae.current.focus())},[z,a]),P.useEffect(()=>{i&&ae.current.focus()},[i]),P.useEffect(()=>{if(!h)return;let e=Kj(ae.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&ae.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let me=(e,t)=>{e?(ue(iW(t)),T&&T(t)):(ue(null),x&&x(t)),oe||(ce(a?null:V.clientWidth),ie(e))},he=e=>{w?.(e),e.button===0&&(e.preventDefault(),ae.current.focus(),me(!0,e))},ge=e=>{me(!1,e)},_e=P.Children.toArray(o),H=e=>{let t=_e.find(t=>t.props.value===e.target.value);t!==void 0&&(ne(t.props.value),b&&b(e,t))},ve=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(L)?L.slice():[];let t=L.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),L!==n&&(ne(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||me(!1,t)}},ye=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),me(!0,e)),C?.(e))},be=e=>{!pe&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:L,name:v}}),y(e))};delete I[`aria-invalid`];let xe,Se,Ce=[],we=!1;(oz({value:L})||d)&&(O?xe=O(L):we=!0);let Te=_e.map(e=>{if(!P.isValidElement(e))return null;let t;if(_){if(!Array.isArray(L))throw Error(j(2));t=L.some(t=>oW(t,e.props.value)),t&&we&&Ce.push(e.props.children)}else t=oW(L,e.props.value),t&&we&&(Se=e.props.children);return P.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:ve(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});we&&(xe=_?Ce.length===0?null:Ce.reduce((e,t,n)=>(e.push(t),n<Ce.length-1&&e.push(`, `),e),[]):Se);let Ee=se;!a&&oe&&z&&(Ee=V.clientWidth);let De;De=ee===void 0?u?null:0:ee;let Oe=M.id||(v?`mui-component-select-${v}`:void 0),ke={...e,variant:F,value:L,open:pe,error:f},Ae=mW(ke),je={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(ke):g.slotProps?.paper},Me={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(ke):g.slotProps?.list},Ne=Wi();return(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(dW,{as:`div`,ref:fe,tabIndex:De,role:`combobox`,"aria-controls":pe?Ne:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":pe?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Oe].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":A?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:ye,onMouseDown:u||D?null:he,onBlur:be,onFocus:S,...M,ownerState:ke,className:k(M.className,Ae.select,s),id:Oe,children:aW(xe)?uW||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):xe}),(0,U.jsx)(pW,{"aria-invalid":f,value:Array.isArray(L)?L.join(`,`):L,name:v,ref:R,"aria-hidden":!0,onChange:H,tabIndex:-1,disabled:u,className:Ae.nativeInput,autoFocus:i,required:A,...I,ownerState:ke}),(0,U.jsx)(fW,{as:p,className:Ae.icon,ownerState:ke}),(0,U.jsx)(lW,{value:le,children:(0,U.jsx)(qz,{id:`menu-${v||``}`,anchorEl:V,open:pe,onClose:ge,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Ne,...Me},paper:{...je,style:{minWidth:Ee,...je==null?null:je.style}}},children:Te})})]})}),gW=Vj((0,U.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function _W(e){return parseInt(e,10)||0}var vW={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function yW(e){for(let t in e)return!1;return!0}function bW(e){return yW(e)||e.outerHeightStyle===0&&!e.overflowing}var xW=P.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=P.useRef(o!=null),l=P.useRef(null),u=nM(t,l),d=P.useRef(null),f=P.useRef(null),p=P.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=qj(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
327
- `&&(n.value+=` `);let o=a.boxSizing,s=_W(a.paddingBottom)+_W(a.paddingTop),c=_W(a.borderBottomWidth)+_W(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=eM(()=>{let e=l.current,t=p();if(!e||!t||bW(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=P.useCallback(()=>{let e=l.current,t=p();if(!e||!t||bW(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=P.useRef(-1);return ui(()=>{let e=Hj(h),t=l?.current;if(!t)return;let n=qj(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),ui(()=>{h()}),(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
328
- `),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,U.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...vW.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function SW(e){return Yr(`MuiInputBase`,e)}var CW=Xr(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),wW,TW=`mui-auto-fill`,EW=`mui-auto-fill-cancel`,DW=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${K(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},OW=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},kW=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return A({root:[`root`,`color${K(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${K(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},SW,t)},AW=G(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:DW})(Io(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${CW.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),jW=G(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:OW})(Io(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${CW.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${CW.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:EW,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:TW}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),MW=Po({[`@keyframes ${TW}`]:{from:{animationName:TW}},[`@keyframes ${EW}`]:{from:{animationName:EW}}}),NW=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:A,onKeyUp:M,placeholder:ee,readOnly:N,renderSuffix:te,rows:F,size:I,slotProps:L={},slots:ne={},startAdornment:re,type:ie=`text`,value:R,...ae}=n,z=v.value==null?R:v.value,{current:B}=P.useRef(z!=null),oe=P.useRef(),se=P.useCallback(e=>{},[]),ce=rM(oe,y,v.ref,se),[le,ue]=P.useState(!1),de=JR(),fe=KR({props:n,muiFormControl:de,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});fe.focused=de?de.focused:le,P.useEffect(()=>{!de&&d&&le&&(ue(!1),T&&T())},[de,d,le,T]);let V=de&&de.onFilled,pe=de&&de.onEmpty,me=P.useCallback(e=>{oz(e)?V&&V():pe&&pe()},[V,pe]);Xj(()=>{B&&me({value:z})},[z,me,B]),Xj(()=>{if(!a)return;let e=oe.current;if(!e)return;let t=Kj(e),n=KF(t),r=n==null||n===t.body||n===t.documentElement;e===n?de&&de.onFocus?de.onFocus():ue(!0):r&&e.focus()},[a]);let he=e=>{O&&O(e),v.onFocus&&v.onFocus(e),de&&de.onFocus?de.onFocus(e):ue(!0)},ge=e=>{T&&T(e),v.onBlur&&v.onBlur(e),de&&de.onBlur?de.onBlur(e):ue(!1)},_e=(e,...t)=>{if(!B){let t=e.target||oe.current;if(t==null)throw Error(j(1));me({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};P.useEffect(()=>{me(oe.current)},[]);let H=e=>{oe.current&&e.currentTarget===e.target&&oe.current.focus(),D&&D(e)},ve=_,ye=v;C&&ve===`input`&&(ye=F?{type:void 0,minRows:F,maxRows:F,...ye}:{type:void 0,maxRows:x,minRows:S,...ye},ve=xW);let be=e=>{me(e.animationName===EW?oe.current:{value:`x`})};P.useEffect(()=>{de&&de.setAdornedStart(!!re)},[de,re]);let xe={...n,color:fe.color||`primary`,disabled:fe.disabled,endAdornment:p,error:fe.error,focused:fe.focused,formControl:de,fullWidth:h,hiddenLabel:fe.hiddenLabel,multiline:C,size:fe.size,startAdornment:re,type:ie},Se=kW(xe),Ce=ne.root||c.Root||AW,we=L.root||l.root||{},Te=ne.input||c.Input||jW;return ye={...ye,...L.input??l.input},(0,U.jsxs)(P.Fragment,{children:[!f&&typeof MW==`function`&&(wW||=(0,U.jsx)(MW,{})),(0,U.jsxs)(Ce,{...we,ref:t,onClick:H,...ae,...!CF(Ce)&&{ownerState:{...xe,...we.ownerState}},className:k(Se.root,we.className,o,N&&`MuiInputBase-readOnly`),children:[re,(0,U.jsx)(qR.Provider,{value:null,children:(0,U.jsx)(Te,{"aria-invalid":fe.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:fe.disabled,id:g,onAnimationStart:be,name:w,placeholder:ee,readOnly:N,required:fe.required,rows:F,value:z,onKeyDown:A,onKeyUp:M,type:ie,...ye,...!CF(Te)&&{as:ve,ownerState:{...xe,...ye.ownerState}},ref:ce,className:k(Se.input,ye.className,N&&`MuiInputBase-readOnly`),onBlur:ge,onChange:_e,onFocus:he})}),p,te?te({...fe,startAdornment:re}):null]})]})});function PW(e){return Yr(`MuiInput`,e)}var FW={...CW,...Xr(`MuiInput`,[`root`,`underline`,`input`])},IW=e=>{let{classes:t,disableUnderline:n}=e,r=A({root:[`root`,!n&&`underline`],input:[`input`]},PW,t);return{...t,...r}},LW=G(AW,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...DW(e,t),!n.disableUnderline&&t.underline]}})(Io(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${FW.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${FW.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${FW.disabled}, .${FW.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${FW.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),RW=G(jW,{name:`MuiInput`,slot:`Input`,overridesResolver:OW})({}),zW=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=IW(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?L(l??a,m):m;return(0,U.jsx)(NW,{slots:{root:u.root??i.Root??LW,input:u.input??i.Input??RW},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});zW.muiName=`Input`;function BW(e){return Yr(`MuiFilledInput`,e)}var VW={...CW,...Xr(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},HW=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=A({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${K(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},BW,t);return{...t,...c}},UW=G(AW,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...DW(e,t),!n.disableUnderline&&t.underline]}})(Io(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${VW.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${VW.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${VW.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${VW.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${VW.disabled}, .${VW.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${VW.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),WW=G(jW,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:OW})(Io(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),GW=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=HW(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?L(g,u??a):g;return(0,U.jsx)(NW,{slots:{root:d.root??i.Root??UW,input:d.input??i.Input??WW},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});GW.muiName=`Input`;var KW,qW=G(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:No})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),JW=G(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:No})(Io(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function YW(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,U.jsx)(qW,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,U.jsx)(JW,{ownerState:c,children:s?(0,U.jsx)(`span`,{children:i}):KW||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`})})})}function XW(e){return Yr(`MuiOutlinedInput`,e)}var ZW={...CW,...Xr(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])},QW=e=>{let{classes:t}=e,n=A({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},XW,t);return{...t,...n}},$W=G(AW,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:DW})(Io(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ZW.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ZW.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ZW.focused} .${ZW.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{[`&.${ZW.focused} .${ZW.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ZW.error} .${ZW.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ZW.disabled} .${ZW.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),eG=G(YW,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Io(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),tG=G(jW,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:OW})(Io(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),nG=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=QW(n),m=JR(),h=KR({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??$W,v=l.input??r.Input??tG,[y,b]=lI(`notchedOutline`,{elementType:eG,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,U.jsxs)(P.Fragment,{children:[o,` `,`*`]}):o}});return(0,U.jsx)(NW,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,U.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});nG.muiName=`Input`;var rG=e=>{let{classes:t}=e,n=A({root:[`root`]},nW,t);return{...t,...n}},iG={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>No(e)&&e!==`variant`},aG=G(zW,iG)(``),oG=G(nG,iG)(``),sG=G(GW,iG)(``),cG=P.forwardRef(function(e,t){let n=Lo({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=gW,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?tW:hW,E=KR({props:n,muiFormControl:JR(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},A=rG(O),{root:j,...M}=A,ee=d||{standard:(0,U.jsx)(aG,{ownerState:O}),outlined:(0,U.jsx)(oG,{label:p,ownerState:O}),filled:(0,U.jsx)(sG,{ownerState:O})}[D],N=rM(t,wF(ee));return(0,U.jsx)(P.Fragment,{children:P.cloneElement(ee,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?L(M,f.classes):M,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:N,className:k(ee.props.className,o,A.root),...!d&&{variant:D},...w})})});cG.muiName=`Select`;function lG(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var uG=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},dG=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=A({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},KU,o);return{...o,...s}},fG=G(iN,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:uG})(Io(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${qU.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${qU.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${qU.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${qU.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${qU.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${UU.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${UU.inset}`]:{marginLeft:52},[`& .${GU.root}`]:{marginTop:0,marginBottom:0},[`& .${GU.inset}`]:{paddingLeft:36},[`& .${WU.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${WU.root} svg`]:{fontSize:`1.25rem`}}}]}))),pG=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=cW(),m=P.useContext(kz),h=P.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=P.useRef(null);Xj(()=>{r&&g.current&&lG(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=dG(n),y=rM(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,U.jsx)(kz.Provider,{value:h,children:(0,U.jsx)(fG,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:k(v.focusVisible,c),className:k(v.root,d),...f,ownerState:_,classes:x})})}),mG=()=>{document.querySelectorAll(`.mq-supsub.mq-sup-only`).forEach(e=>{let t=e.previousElementSibling;t&&t.classList.contains(`mq-non-leaf`)&&t.querySelector(`.mq-fraction`)?e.classList.add(`mq-after-fraction-group`):e.classList.remove(`mq-after-fraction-group`)})},{commonMqFontStyles:hG,commonMqKeyboardStyles:gG,longdivStyles:_G,supsubStyles:vG}=GH,yG=D(`@pie-lib:math-toolbar:editor-and-pad`),bG=/\.|,/g,xG=G(`div`)(({theme:e})=>({zIndex:9,position:`relative`,textAlign:`center`,width:`auto`,"& > .mq-math-mode":{border:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`dotted 1px ${e.palette.primary.main}`,borderRadius:`0px`},"& .mq-overarrow-inner":{border:`none !important`,paddingTop:`0 !important`},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.8px`,marginTop:`0px`,minWidth:`1.23em`},"& .mq-parallelogram":{lineHeight:.85}})),SG=G(`div`)(({theme:e,hide:t})=>({display:t?`none`:`flex`,alignItems:`center`,"& .mq-editable-field .mq-cursor":{top:`-4px`},"& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection":{paddingTop:`18px`},"& .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& .mq-math-mode .mq-overline .mq-overline-inner":{paddingTop:`0.4em !important`},"& .mq-overarrow.mq-arrow-both":{minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.45em`,left:`-1px`},"&:after":{position:`absolute !important`,top:`0px !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& *":{...hG,...vG,..._G,"& .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-root-block":{paddingTop:`10px`},"& .mq-scaled .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`4px !important`,paddingTop:`6px !important`,paddingLeft:`6px !important`},"& .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`}},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),CG=G(dz)({flex:`initial`,width:`25%`,minWidth:`100px`,marginLeft:`15px`,marginTop:`5px`,marginBottom:`5px`,marginRight:`5px`,"& label":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& div":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}),wG=G(iz)(()=>({backgroundColor:`transparent`})),TG=G(`div`)(({theme:e,error:t})=>({minWidth:`500px`,maxWidth:`900px`,minHeight:`30px`,width:`100%`,display:`flex`,marginTop:e.spacing(1),marginBottom:e.spacing(1),...t&&{border:`2px solid red`},"& .mq-sqrt-prefix .mq-scaled":{verticalAlign:`middle !important`}})),EG=G(yU)(({controlledKeypadMode:e})=>({maxWidth:e?`400px`:`500px`,color:KI(),backgroundColor:pL(),padding:`2px`})),DG=G(MR)({position:`absolute`,right:`12px`,border:`1px solid lightgrey`,color:KI()}),OG=G(`hr`)(({theme:e})=>({padding:0,margin:0,height:`1px`,border:`none`,borderBottom:`solid 1px ${e.palette.primary.main}`})),kG=G(pU)(({mode:e})=>({...gG,...e===`language`&&{"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),AG=e=>{if(!e)return;let{type:t,value:n}=e;return t===`command`||t===`cursor`?e:t===`answer`?{type:`answer`,...e}:n===`clear`?{type:`clear`}:{type:`write`,value:n}},jG=class extends P.Component{static propTypes={classNames:p.object,keypadMode:p.oneOfType([p.string,p.number]),autoFocus:p.bool,allowAnswerBlock:p.bool,showKeypad:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,error:p.string,noDecimal:p.bool,hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,maxResponseAreas:p.number,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onFocus:p.func,onBlur:p.func,onChange:p.func.isRequired,setKeypadInteraction:p.func};constructor(e){super(e),this.state={equationEditor:`item-authoring`,addDisabled:!1}}componentDidMount(){this.input&&this.props.autoFocus&&this.input.focus()}onClick=e=>{let{noDecimal:t,noLatexHandling:n,onChange:r}=this.props,i=AG(e);if(yG(`mathChange: `,i),n){r(i.value);return}t&&(i.value===`.`||i.value===`,`)||i&&(i.type===`clear`?(yG(`call clear...`),this.input.clear()):i.type===`command`?this.input.command(i.value):i.type===`cursor`?this.input.keystroke(i.value):i.type===`answer`?this.input.write(`%response%`):this.input.write(i.value))};updateDisable=e=>{let{maxResponseAreas:t}=this.props;if(t){let n=this.checkResponseAreasNumber(t,e);this.setState({addDisabled:n})}};onAnswerBlockClick=()=>{this.props.onAnswerBlockAdd(),this.onClick({type:`answer`}),this.updateDisable(!0)};onEditorChange=e=>{let{onChange:t,noDecimal:n}=this.props;if(SH(),mG(),this.updateDisable(!0),n&&(e.indexOf(`.`)!==-1||e.indexOf(`,`)!==-1)&&this.input){this.input.clear(),this.input.write(e.replace(bG,``));return}let r=e.match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.input&&r&&r?.length){try{this.input.mathField.__controller.cursor.insLeftOf(this.input.mathField.__controller.cursor.parent[-1].parent),this.input.mathField.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}return}t(e)};shouldComponentUpdate(e,t){let n=this.input.mathField.latex()!==e.latex;return yG(`[shouldComponentUpdate] `,`inputIsDifferent: `,n),!C(this.props.error,e.error)||!n&&this.props.keypadMode!==e.keypadMode||!n&&this.props.noDecimal!==e.noDecimal||!n&&this.state.equationEditor!==t.equationEditor?!0:!n&&this.props.controlledKeypad?this.props.showKeypad!==e.showKeypad:n}onEditorTypeChange=e=>{this.setState({equationEditor:e.target.value})};checkResponseAreasNumber=(e,t)=>{let{latex:n}=this.input&&this.input.props||{};if(n){let r=(n.match(/answerBlock/g)||[]).length;return t?r===e-1:r===e}return!1};render(){let{classNames:e,keypadMode:t,allowAnswerBlock:n,additionalKeys:r,controlledKeypad:i,controlledKeypadMode:a,showKeypad:o,setKeypadInteraction:s,noDecimal:c,hideInput:l,layoutForKeyPad:u,latex:d,onFocus:f,onBlur:p,error:m}=this.props,h=!i||i&&o,{addDisabled:g}=this.state;return yG(`[render]`,d),(0,U.jsxs)(xG,{className:e.mathToolbar,children:[(0,U.jsxs)(SG,{hide:l,children:[a&&(0,U.jsxs)(CG,{variant:`standard`,children:[(0,U.jsx)(wG,{id:`equation-editor-label`,children:`Equation Editor`}),(0,U.jsxs)(cG,{labelId:`equation-editor-label`,id:`equation-editor-select`,name:`equationEditor`,label:`Equation Editor`,onChange:this.onEditorTypeChange,value:this.state.equationEditor,MenuProps:{transitionDuration:{enter:225,exit:195}},children:[(0,U.jsx)(pG,{value:`non-negative-integers`,children:`Numeric - Non-Negative Integers`}),(0,U.jsx)(pG,{value:`integers`,children:`Numeric - Integers`}),(0,U.jsx)(pG,{value:`decimals`,children:`Numeric - Decimals`}),(0,U.jsx)(pG,{value:`fractions`,children:`Numeric - Fractions`}),(0,U.jsx)(pG,{value:1,children:`Grade 1 - 2`}),(0,U.jsx)(pG,{value:3,children:`Grade 3 - 5`}),(0,U.jsx)(pG,{value:6,children:`Grade 6 - 7`}),(0,U.jsx)(pG,{value:8,children:`Grade 8 - HS`}),(0,U.jsx)(pG,{value:`geometry`,children:`Geometry`}),(0,U.jsx)(pG,{value:`advanced-algebra`,children:`Advanced Algebra`}),(0,U.jsx)(pG,{value:`statistics`,children:`Statistics`}),(0,U.jsx)(pG,{value:`item-authoring`,children:`Item Authoring`})]})]}),(0,U.jsx)(TG,{error:m,children:(0,U.jsx)(EG,{onFocus:()=>{f&&f(),this.updateDisable(!1)},onBlur:e=>{this.updateDisable(!1),p&&p(e)},className:e&&e.editor||``,controlledKeypadMode:a,ref:e=>this.input=e,latex:d,onChange:this.onEditorChange})})]}),n&&(0,U.jsx)(DG,{type:`primary`,style:{bottom:h?`320px`:`20px`},onClick:this.onAnswerBlockClick,disabled:g,children:`+ Response Area`}),(0,U.jsx)(OG,{}),h&&(0,U.jsx)(kG,{mode:a?this.state.equationEditor:t,controlledKeypadMode:a,layoutForKeyPad:u,additionalKeys:r,onClick:this.onClick,noDecimal:c,setKeypadInteraction:s})]})}},MG=G(CN)(({theme:e,hideBackground:t})=>({verticalAlign:`top`,width:`28px`,height:`28px`,color:`#00bb00`,...t&&{backgroundColor:e.palette.common.white,"&:hover":{backgroundColor:e.palette.grey[200]}},"& .MuiIconButton-label":{position:`absolute`,top:`2px`}})),NG=({onClick:e,hideBackground:t})=>(0,U.jsx)(MG,{"aria-label":`Done`,onClick:e,hideBackground:t,size:`large`,children:(0,U.jsx)(EN,{})});NG.propTypes={onClick:p.func,hideBackground:p.bool};var PG=NG,{commonMqFontStyles:FG,longdivStyles:IG,supsubStyles:LG}=GH,RG=D(`@pie-lib:math-toolbar:math-preview`),zG=G(`div`)(({theme:e,isSelected:t})=>({display:`inline-flex`,alignItems:`center`,position:`relative`,"& *":FG,...LG,...IG,"& > .mq-math-mode":{border:t?`solid 0px lightgrey`:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`solid 1px black`,borderRadius:`0px`},"& > .mq-math-mode .mq-root-block":{paddingTop:`7px !important`},"& > .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& > .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& > .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& > .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty":{paddingTop:`6px !important`,paddingLeft:`4px !important`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`0 !important`},"& > .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& > .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-editable-field .mq-cursor":{marginTop:`-15px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.5px`,marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},...t&&{border:`solid 1px ${e.palette.primary.main}`}})),BG=G(`span`)({position:`absolute`,bottom:0,left:0,right:0,top:0}),VG=class extends P.Component{static propTypes={latex:p.string,isSelected:p.bool,onFocus:p.func,onBlur:p.func};componentDidMount(){mG()}componentDidUpdate(e){this.props.latex!==e.latex&&mG()}render(){let{isSelected:e,onFocus:t,onBlur:n,latex:r}=this.props;return RG(`[render] latex: `,r),(0,U.jsxs)(zG,{isSelected:e,children:[` `,(0,U.jsx)(BG,{}),(0,U.jsx)(EU,{latex:r,onFocus:t,onBlur:n})]})}},HG=G(`div`)({display:`flex`,width:`100%`,zIndex:8,alignItems:`center`}),UG=class extends P.Component{static propTypes={autoFocus:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,keypadMode:p.oneOfType([p.string,p.number]),classNames:p.object,error:p.string,maxResponseAreas:p.number,showKeypad:p.bool,noDecimal:p.bool,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onChange:p.func,onDone:p.func.isRequired,onFocus:p.func,onBlur:p.func,hideDoneButton:p.bool,keyPadCharacterRef:p.func,setKeypadInteraction:p.func};static defaultProps={classNames:{},keypadMode:`item-authoring`,autoFocus:!1,allowAnswerBlock:!1,controlledKeypad:!1,controlledKeypadMode:!1,noDecimal:!1,showKeypad:!0,additionalKeys:[],onChange:()=>{},onAnswerBlockAdd:()=>{},onFocus:()=>{},hideDoneButton:!1};constructor(e){super(e),this.state={latex:e.latex}}done=()=>{this.props.onDone(this.state.latex)};UNSAFE_componentWillReceiveProps(e){this.setState({latex:e.latex})}onChange=e=>{this.setState({latex:e}),this.props.onChange(e)};render(){let{latex:e}=this.state,{classNames:t,autoFocus:n,allowAnswerBlock:r,onAnswerBlockAdd:i,controlledKeypad:a,controlledKeypadMode:o,keypadMode:s,noDecimal:c,additionalKeys:l,showKeypad:u,onFocus:d,onBlur:f,hideDoneButton:p,error:m,keyPadCharacterRef:h,setKeypadInteraction:g,maxResponseAreas:_}=this.props;return(0,U.jsx)(WG,{autoFocus:n,classNames:t,onAnswerBlockAdd:i,allowAnswerBlock:r,latex:e,additionalKeys:l,noDecimal:c,keypadMode:s,keyPadCharacterRef:h,setKeypadInteraction:g,onChange:this.onChange,onDone:this.done,onFocus:d,onBlur:f,showKeypad:u,controlledKeypad:a,controlledKeypadMode:o,hideDoneButton:p,error:m,maxResponseAreas:_})}},WG=class extends P.Component{static propTypes={classNames:p.object,latex:p.string.isRequired,keypadMode:p.oneOfType([p.string,p.number]),hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,onChange:p.func.isRequired,onDone:p.func.isRequired,onBlur:p.func,onAnswerBlockAdd:p.func,additionalKeys:p.array,onFocus:p.func,autoFocus:p.bool,noDecimal:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,showKeypad:p.bool,hideDoneButton:p.bool,hideDoneButtonBackground:p.bool,error:p.any,maxResponseAreas:p.number,keyPadCharacterRef:p.object,setKeypadInteraction:p.func};static defaultProps={classNames:{},hideDoneButtonBackground:!1};render(){let{classNames:e,autoFocus:t,allowAnswerBlock:n,onAnswerBlockAdd:r,controlledKeypad:i,controlledKeypadMode:a,additionalKeys:o,showKeypad:s,keypadMode:c,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,keyPadCharacterRef:p,setKeypadInteraction:m,latex:h,onChange:g,onDone:_,onFocus:v,onBlur:y,hideDoneButton:b,hideDoneButtonBackground:x,error:S,maxResponseAreas:C}=this.props;return(0,U.jsxs)(HG,{className:e&&e.toolbar||``,ref:p,children:[(0,U.jsx)(`div`,{}),(0,U.jsx)(jG,{autoFocus:t,keypadMode:c,classNames:e||{},controlledKeypad:i,controlledKeypadMode:a,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,showKeypad:s,additionalKeys:o,allowAnswerBlock:n,onAnswerBlockAdd:r,latex:h,onChange:g,onFocus:v,onBlur:y,error:S,maxResponseAreas:C,setKeypadInteraction:m}),(!i||i&&s)&&!b&&(0,U.jsx)(PG,{hideBackground:x,onClick:_})]})}},GG=new du(`ensureTextAfterMath`),KG=(e=[])=>e.map(e=>({name:e,latex:e,write:e,label:e})),qG=e=>new cu({key:GG,appendTransaction:(t,n,r)=>{if(!t.some(e=>e.docChanged))return null;let i=r.tr,a=!1;return r.doc.descendants((t,n)=>{if(t.type.name===e){let e=n+t.nodeSize,o=r.doc.nodeAt(e);(!o||o.type.name!==`text`)&&(i.insert(e,r.schema.text(`​`)),a=!0)}}),a?i:null}}),JG=new cu({key:new du(`zeroWidthSpaceHandling`),props:{handleKeyDown(e,t){let{state:n,dispatch:r}=e,{selection:i,doc:a}=n,{from:o,empty:s}=i;if(s&&t.key===`Backspace`&&o>0&&a.textBetween(o-1,o,``,``)===`​`)return r(n.tr.delete(o-2,o)),!0;if(s&&t.key===`ArrowLeft`&&o>0&&a.textBetween(o-1,o,``,``)===`​`){let e=o-1,t=n.doc.resolve(e-1),i=t.nodeAfter||t.nodeBefore;if(i){let t=e-i.nodeSize,a=n.doc.resolve(t);return r(n.tr.setSelection(Q.create(n.doc,a.pos))),!0}else return r(n.tr.setSelection(Z.create(n.doc,o-2))),!0}return!1}}}),YG=uy.create({name:`math`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{latex:{default:``},wrapper:{default:null},html:{default:null}}},addProseMirrorPlugins(){return[qG(this.name),JG]},parseHTML(){return[{tag:`span[data-latex]`,getAttrs:e=>({latex:e.getAttribute(`data-raw`)||e.textContent})},{tag:`span[data-type="mathml"]`,getAttrs:e=>({html:e.innerHTML})}]},addCommands(){return{insertMath:(e=``)=>({tr:t,editor:n,dispatch:r})=>{let{state:i}=n.view,a=i.schema.nodes.math.create({latex:e}),{selection:o}=i,s=o.$from.pos;if(t.insert(s,a),a?.type?.name===this.name){let e=Q.create(t.doc,o.$from.pos);t.setSelection(e)}return r(t),!0}}},renderHTML({HTMLAttributes:e}){return e.html?[`span`,{"data-type":`mathml`,dangerouslySetInnerHTML:{__html:e.html}}]:[`span`,{"data-latex":``,"data-raw":e.latex},_R(e.latex,e.wrapper)]},addNodeView(){return zb(e=>(0,U.jsx)(XG,{...e,options:this.options}))}}),XG=e=>{let{node:t,updateAttributes:n,editor:r,selected:i,options:a}=e,[o,s]=(0,P.useState)(i),c=(0,P.useRef)(null),[l,u]=(0,P.useState)({top:0,left:0}),{math:d={}}=a||{},{keypadMode:f,controlledKeypadMode:p=!0,customKeys:m=[],keyPadCharacterRef:h,setKeypadInteraction:g}=d,_=t.attrs.latex||``,v=e=>{n({latex:e})},y=e=>{n({latex:e}),s(!1),r._toolbarOpened=!1;let{selection:t,tr:i,doc:a}=r.state,o=Z.create(a,t.from+1);i.setSelection(o),r.view.dispatch(i),r.commands.focus()};return(0,P.useEffect)(()=>{i&&s(!0)},[i]),(0,P.useEffect)(()=>{r._toolbarOpened=!!o},[o]),(0,P.useEffect)(()=>{let{from:e}=r.state.selection;u({top:40,left:r.view.coordsAtPos(e).left});let n=e=>{let n=e?.target,r=(document.querySelectorAll?.(`[id^="equation-editor-select"][id*="listbox"], [aria-labelledby="equation-editor-label"][role="listbox"]`)||[]).length>0,i=!!(n?.id&&n.id.includes(`equation-editor-select`))||!!n?.closest?.(`[id*="equation-editor-select"]`),a=!!n?.closest?.(`.math-node`);c.current&&!c.current.contains(n)&&!n?.closest?.(`[data-inline-node]`)&&!r&&!i&&!a&&(s(!1),y(t.attrs.latex))};return o?document.addEventListener(`click`,n):document.removeEventListener(`click`,n),()=>document.removeEventListener(`click`,n)},[r,o]),(0,U.jsxs)(jb,{className:`math-node`,style:{display:`inline-flex`,cursor:`pointer`,margin:`0 4px`},"data-selected":i,children:[(0,U.jsx)(`div`,{onClick:()=>s(!0),contentEditable:!1,children:(0,U.jsx)(VG,{latex:_})}),o&&db.createPortal((0,U.jsx)(`div`,{ref:c,"data-toolbar-for":r.instanceId,style:{position:`absolute`,top:`${l.top}px`,left:`${l.left}px`,zIndex:20,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`},children:(0,U.jsx)(UG,{latex:_,autoFocus:!0,onChange:v,onDone:y,keypadMode:f,controlledKeypadMode:p,additionalKeys:KG(m),keyPadCharacterRef:h,setKeypadInteraction:g})}),r?._tiptapContainerEl||document.body)]})};function ZG(e){return Yr(`MuiLinearProgress`,e)}Xr(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var QG=4,$G=lr`
326
+ mid `,`&#8740;`),w.intercal=w[`⊺`]=r(B,`\\intercal `,`&#8890;`),w.veebar=w[`⊻`]=r(B,`\\veebar `,`&#8891;`),w.barwedge=w[`⊼`]=r(B,`\\barwedge `,`&#8892;`),w.ltimes=w[`⋉`]=r(B,`\\ltimes `,`&#8905;`),w.rtimes=w[`⋊`]=r(B,`\\rtimes `,`&#8906;`),w.leftthreetimes=w[`⋋`]=r(B,`\\leftthreetimes `,`&#8907;`),w.rightthreetimes=w[`⋌`]=r(B,`\\rightthreetimes `,`&#8908;`),w.curlyvee=w[`⋎`]=r(B,`\\curlyvee `,`&#8910;`),w.curlywedge=w[`⋏`]=r(B,`\\curlywedge `,`&#8911;`),w.circledcirc=w[`⊚`]=r(B,`\\circledcirc `,`&#8858;`),w.circledast=w[`⊛`]=r(B,`\\circledast `,`&#8859;`),w.circleddash=w[`⊝`]=r(B,`\\circleddash `,`&#8861;`),w.boxplus=w[`⊞`]=r(B,`\\boxplus `,`&#8862;`),w.boxminus=w[`⊟`]=r(B,`\\boxminus `,`&#8863;`),w.boxtimes=w[`⊠`]=r(B,`\\boxtimes `,`&#8864;`),w.boxdot=w[`⊡`]=r(B,`\\boxdot `,`&#8865;`),w[`∂`]=w.partial,w[`∃`]=w.exists,w[`∅`]=w.varnothing,w[`∆`]=w.triangle,w[`∇`]=w.nabla,w[`∈`]=w.in,w[`∊`]=w.in,w[`∋`]=w.ni,w[`∌`]=w.notni,w[`∍`]=w.ni,w[`∐`]=w.amalg,w[`−`]=w[`-`],w[`∓`]=w.mp,w[`∖`]=w.setminus,w[`∘`]=w.circ,w[`∙`]=w.bullet,w[`∝`]=w.propto,w[`∞`]=w.infty,w[`∠`]=w.angle,w[`∡`]=w.measuredangle,w[`∣`]=w.divides,w[`∥`]=w.parallel,w[`∦`]=w.nparallel,w[`∧`]=w.wedge,w[`∨`]=w.vee,w[`∩`]=w.cap,w[`∪`]=w.cup,w[`∮`]=w.oint,w[`∴`]=w.therefore,w[`∵`]=w.because,w[`∼`]=w.sim,w[`≀`]=w.wr,w[`≃`]=w.simeq,w[`≍`]=w.asymp,w[`≐`]=w.doteq,w[`≪`]=w.ll,w[`≫`]=w.gg,w[`≺`]=w.prec,w[`≻`]=w.succ,w[`⊂`]=w.subset,w[`⊃`]=w.supset,w[`⊆`]=w.subseteq,w[`⊇`]=w.supseteq,w[`⊈`]=w.nsubseteq,w[`⊉`]=w.nsupseteq,w[`⊏`]=w.sqsubset,w[`⊐`]=w.sqsupset,w[`⊓`]=w.sqcap,w[`⊔`]=w.sqcup,w[`⊖`]=w.ominus,w[`⊘`]=w.oslash,w[`⊙`]=w.odot,w[`⊢`]=w.vdash,w[`⊣`]=w.dashv,w[`⊤`]=w.top,w[`⊥`]=w.bot,w[`⊧`]=w.models,w[`⋀`]=w.wedge,w[`⋁`]=w.vee,w[`⋂`]=w.cap,w[`⋃`]=w.cup,w[`⋄`]=w.diamond,w[`⋅`]=w.cdot,w[`⋆`]=w.star,w[`⋈`]=w.bowtie,w[`⋮`]=w.vdots,w[`⋯`]=w.cdots,w[`⋱`]=w.ddots,Ee=e,De=document.createElement(`div`),Oe=De.style,ke={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},ke)if(je in Oe){Ae=je;break}for(tt in Ae?Te=function(e,t,n){e.css(Ae,`scale(`+t+`,`+n+`)`)}:`filter`in Oe?(Ee=function(e){e.className=e.className},Te=function(e,t,n){function r(){e.css(`marginRight`,(i.width()-1)*(t-1)/t+`px`)}var i,a;t/=1+(n-1)/2,e.css(`fontSize`,n+`em`),e.hasClass(`mq-matrixed-container`)||e.addClass(`mq-matrixed-container`).wrapInner(`<span class="mq-matrixed"></span>`),i=e.children().css(`filter`,`progid:DXImageTransform.Microsoft.Matrix(M11=`+t+`,SizingMethod='auto expand')`),r(),a=setInterval(r),b(window).load(function(){clearTimeout(a),r()})}):Te=function(e,t,n){e.css(`fontSize`,n+`em`)},Me=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),Ne=_(R,function(e,t){e.init=function(e,n,r){this.args=arguments,this.htmlTemplate=`<`+n+` `+r+`><`+n+` class="mq-xarrow-over">&0</`+n+`><`+n+` class="mq-xarrow-under"></`+n+`></`+n+`>`,t.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`(`,`)`]},e.parser=function(){var e=this;return re.optBlock.then(function(t){return re.block.map(function(n){var r=Pe.apply(null,e.args);return r.blocks=[t,n],t.adopt(r,0,0),n.adopt(r,t,0),r})}).or(t.parser.call(this))}}),Pe=_(Ne,function(e,t){e.init=function(e,t,n){this.htmlTemplate=`<`+t+` `+n+`><`+t+` class="mq-xarrow-over">&1</`+t+`><`+t+` class="mq-xarrow-under">&0</`+t+`></`+t+`>`,R.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[v].latex()+`]{`+this.ends[y].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[v].upOutOf=this.ends[y],this.upInto=this.ends[y].downOutOf=this.ends[v]}}),Fe=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return _(R,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`<span class="mq-empty-box">&0</span></`+i+`></`+i+`>`)}})},Ie=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`><span class="mq-longdiv-curve-border">)</span><span class="mq-longdiv-inner"><span class="mq-empty">&0</span></`+n+`></span>`)}}),Le=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-row"><p>`+r+`</p><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td><td class="mq-empty"></td><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),Re=_(R,function(e,t){e.init=function(e){t.init.call(this,e,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),ze=_(R,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-col"><p>`+r+`</p></span><span class="matrix-edit-content-col"><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),Be=function(e,t){return _(ae,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})},w.mathrm=r(Me,`\\mathrm`,`span`,`class="mq-roman mq-font"`),w.mathit=r(Me,`\\mathit`,`i`,`class="mq-font"`),w.mathbf=r(Me,`\\mathbf`,`b`,`class="mq-font"`),w.mathsf=r(Me,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),w.mathtt=r(Me,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),w.underline=r(Me,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),w.overline=w.bar=r(Fe(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),w.longdiv=r(Ie,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),w.overrightarrow=r(Fe(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),w.overleftarrow=r(Fe(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),w.xleftarrow=r(Ne,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),w.xrightarrow=r(Ne,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),w.overleftrightarrow=r(Me,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),w.overarc=r(Me,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),w.dot=_(R,function(e,t){e.init=function(){t.init.call(this,`\\dot`,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),w.addmatrixrow=r(Le,`\\addmatrixrow`,`span`,`+`),w.addmatrixcol=r(ze,`\\addmatrixcol`,`span`,`+`),w.ngtr=w[`≯`]=r(Be(`mq-ngtr`,`&#8815;`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),w.nless=w[`≮`]=r(Be(`mq-nless`,`&#8814;`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),w.dot=r(Re,`\\dot`),w.parallelogram=r(Be(`mq-parallelogram`,`&#9649;`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),w.textcolor=_(R,function(e,t){e.setColor=function(e){this.color=e,this.htmlTemplate=`<span class="mq-textcolor" style="color:`+e+`">&0</span>`},e.latex=function(){return`\\textcolor{`+this.color+`}{`+this.blocks[0].latex()+`}`},e.parser=function(){var e=this,n=I.optWhitespace,r=I.string,i=I.regex;return n.then(r(`{`)).then(i(/^[#\w\s.,()%-]*/)).skip(r(`}`)).then(function(n){return e.setColor(n),t.parser.call(e)})},e.isStyleBlock=function(){return!0}}),w.class=_(R,function(e,t){e.parser=function(){var e=this,n=I.string,r=I.regex;return I.optWhitespace.then(n(`{`)).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n(`}`)).then(function(n){return e.cls=n||``,e.htmlTemplate=`<span class="mq-class `+n+`">&0</span>`,t.parser.call(e)})},e.latex=function(){return`\\class{`+this.cls+`}{`+this.blocks[0].latex()+`}`},e.isStyleBlock=function(){return!0}}),Ve=_(R,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(this.replacedFragment||e[v]||!e.options.supSubsRequireOperand)return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){var t,n,r,i,a,o;for(t=v;t;t=t===v&&y)if(this[t]instanceof Ve){for(n=`sub`;n;n=n===`sub`&&`sup`)r=this[n],i=this[t][n],r&&(i?r.isEmpty()?o=x(i,0,i.ends[v]):(r.jQ.children().insAtDirEnd(-t,i.jQ),a=r.children().disown(),o=x(i,a.ends[y],i.ends[v]),t===v?a.adopt(i,i.ends[y],0):a.adopt(i,0,i.ends[v])):this[t].addBlock(r.disown()),this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r));this.remove(),e&&e[v]===this&&(t===y&&o?o[v]?e.insRightOf(o[v]):e.insAtLeftEnd(o.parent):e.insRightOf(this[t]));break}},j.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[v].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if(t===`_`)return;var n=this.chToCmd(t,e.options);return n instanceof ae?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[v]&&!e[y]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),oe.p.write.apply(this,arguments)}},e.moveTowards=function(e,n,r){n.options.autoSubscriptNumerals&&!this.sup?n.insDirOf(e,this):t.moveTowards.apply(this,arguments)},e.deleteTowards=function(e,n){if(n.options.autoSubscriptNumerals&&this.sub){var r=this.sub.ends[-e];r instanceof ae?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(v,n.insAtLeftEnd(this.sub)),this.sup&&n.insDirOf(-e,this))}else t.deleteTowards.apply(this,arguments)},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+`{`+(n||` `)+`}`:``}return e(`_`,this.sub)+e(`^`,this.sup)},e.addBlock=function(e){this.supsub===`sub`?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=b(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(it,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=b(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(it,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">&#8203;</span>`));for(var t=0;t<2;t+=1)(function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+`Into`],e[n][r+`OutOf`]=f,delete e[n].deleteOutOf,t===`sub`&&b(e.jQ.addClass(`mq-sup-only`)[0].lastChild).remove(),this.remove()}})(this,`sub sup`.split(` `)[t],`sup sub`.split(` `)[t],`down up`.split(` `)[t])},e.reflow=function(){var e,t,n,r,i,a=this.jQ,o=a.prev();o.length&&(e=a.children(`.mq-sup`),e.length&&(t=parseInt(e.css(`font-size`)),n=e.offset().top+e.height(),r=n-o.offset().top-.7*t,i=parseInt(e.css(`margin-bottom`)),e.css(`margin-bottom`,i+r)))}}),w.subscript=w._=_(Ve,function(e,t){e.supsub=`sub`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&0</span></span><span style="display:inline-block;width:0">&#8203;</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[v],this.sub.upOutOf=f,t.finalizeTree.call(this)}}),w.superscript=w.supscript=w[`^`]=_(Ve,function(e,t){e.supsub=`sup`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`^`],e.finalizeTree=function(){this.upInto=this.sup=this.ends[y],this.sup.downOutOf=f,t.finalizeTree.call(this)}}),He=_(R,function(e,t){e.parser=function(){var e,t=I.string,n=I.optWhitespace,r=I.succeed,i=re.block,a=this,o=a.blocks=[oe(),oe()];for(e=0;e<o.length;e+=1)o[e].adopt(a,a.ends[y],0);return n.then(t(`_`).or(t(`^`))).then(function(e){var t=o[e===`_`?0:1];return i.then(function(e){return e.children().adopt(t,t.ends[y],0),r(a)})}).many().result(a)},e.finalizeTree=function(){this.downInto=this.ends[v],this.upInto=this.ends[y],this.ends[v].upOutOf=this.ends[y],this.ends[y].downOutOf=this.ends[v]}}),Ue=_(He,function(e,t){e.init=function(e,t){var n=`<span class="mq-large-operator mq-non-leaf"><span class="mq-to"><span>&1</span></span><big>`+t+`</big><span class="mq-from"><span>&0</span></span></span>`;ae.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[v].latex())+`^`+e(this.ends[y].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(pe(`n`).createLeftOf(e),we().createLeftOf(e))}}),w[`∑`]=w.sum=w.summation=r(Ue,`\\sum `,`&sum;`),w[`∏`]=w.prod=w.product=r(Ue,`\\prod `,`&prod;`),w.coprod=w.coproduct=r(Ue,`\\coprod `,`&#8720;`),w[`∫`]=w.int=w.integral=_(Ue,function(e,t){e.init=function(){ae.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>&int;</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">&#8203</span></span></span>`)},e.createLeftOf=R.p.createLeftOf}),w.lim=w.limit=_(He,function(e,t){e.init=function(){ae.prototype.init.call(this,`\\lim `,`<span class="mq-lim mq-non-leaf"><span class="mq-un-italicized">lim</span><span class="mq-approaches"><span>&0</span></span></span>`)},e.latex=function(){return this.ctrlSeq+`_`+function(e){return e.length===1?e:`{`+(e||` `)+`}`}(this.ends[v].latex())}}),We=w.frac=w.dfrac=w.cfrac=w.fraction=_(R,function(e,t){e.ctrlSeq=`\\frac`,e.htmlTemplate=`<span class="mq-fraction mq-non-leaf"><span class="mq-numerator"><span class="mq-empty-box">&0</span></span><span class="mq-denominator"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0">&#8203;</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[y].upOutOf=this.ends[v],this.downInto=this.ends[v].downOutOf=this.ends[y]}}),Ge=w.over=T[`/`]=_(We,function(t,n){t.createLeftOf=function(t){if(!this.replacedFragment){for(var r=t[v];r&&!(r instanceof B||r instanceof(w.text||e)||r instanceof Ue||r.ctrlSeq===`\\ `||/^[,;:]$/.test(r.ctrlSeq));)r=r[v];r instanceof Ue&&r[y]instanceof Ve&&(r=r[y],r[y]instanceof Ve&&r[y].ctrlSeq!=r.ctrlSeq&&(r=r[y])),r===t[v]||t.isTooDeep(1)||(this.replaces(C(r[y]||t.parent.ends[v],t[v])),t[v]=r)}n.createLeftOf.call(this,t)}}),w.underset=_(R,function(e,t){e.ctrlSeq=`\\underset`,e.htmlTemplate=`<span class="mq-underset mq-overunder mq-non-leaf"><span class="mq-over">&1</span><span class="mq-under">&0</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[v].upOutOf=this.ends[y],this.upInto=this.ends[y].downOutOf=this.ends[v]}}),w.overset=_(R,function(e,t){e.ctrlSeq=`\\overset`,e.htmlTemplate=`<span class="mq-overset mq-overunder mq-non-leaf"><span class="mq-over">&0</span><span class="mq-under">&1</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[y].upOutOf=this.ends[v],this.upInto=this.ends[v].downOutOf=this.ends[y]}}),Ke=w.sqrt=w[`√`]=_(R,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">&radic;</span><span class="mq-non-leaf mq-sqrt-stem"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt(`,`)`],e.parser=function(){return re.optBlock.then(function(e){return re.block.map(function(t){var n=qe();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[y].jQ.parent();Te(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}}),w.hat=_(R,function(e,t){e.ctrlSeq=`\\hat`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-hat-prefix">^</span><span class="mq-hat-stem">&0</span></span>`,e.textTemplate=[`hat(`,`)`]}),qe=w.nthroot=_(Ke,function(e,t){e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">&0</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">&radic;</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&1</span></span></span>`,e.textTemplate=[`sqrt[`,`](`,`)`],e.latex=function(){return`\\sqrt[`+this.ends[v].latex()+`]{`+this.ends[y].latex()+`}`}}),Je=_(R,function(e,t){e.init=function(e,n,r){var i=`<span class="mq-non-leaf"><span class="mq-diacritic-above">`+n+`</span><span class="mq-diacritic-stem">&0</span></span>`;t.init.call(this,e,i,r)}}),w.vec=r(Je,`\\vec`,`&rarr;`,[`vec(`,`)`]),w.tilde=r(Je,`\\tilde`,`~`,[`tilde(`,`)`]),w.lrncuberoot=_(Ke,function(e,t){e.ctrlSeq=`\\lrncuberoot`,e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">3</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">&radic;</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt[3](`,`)`],e.latex=function(){return`\\sqrt[3]{`+this.ends[v].latex()+`}`}}),w.abs=_(R,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),w.lrnplaceholder=_(R,function(e,t){e.ctrlSeq=`\\lrnplaceholder`,e.htmlTemplate=`<span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[``],e.latex=function(){return this.ends[v].latex()}}),w.lrnexponent=_(R,function(e,t){e.ctrSeq=`\\lrnexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&1</span></span></span></span>`,e.textTemplate=[``,`**`],e.latex=function(){var e=this.ends[y].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[v].latex()+`^`+e}}),w.lrnsquaredexponent=_(R,function(e,t){e.ctrSeq=`\\lrnsquaredexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">2</span></span></span></span>`,e.textTemplate=[``,`**2`],e.latex=function(){return this.ends[v].latex()+`^2`}}),w.lrnsubscript=_(R,function(e,t){e.ctrSeq=`\\lrnsubscript`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0">&nbsp;</span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[v].latex()+`_`+this.ends[y].latex()}}),Ye=_(_(R,p),function(t,n){t.init=function(e,t,r,i,a){n.init.call(this,`\\left`+i,void 0,[t,r]),this.side=e,this.sides={},this.sides[v]={ch:t,ctrlSeq:i},this.sides[y]={ch:r,ctrlSeq:a}},t.numBlocks=function(){return 1},t.html=function(){return this.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-paren`+(this.side===y?` mq-ghost`:``)+`">`+this.sides[v].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===v?` mq-ghost`:``)+`">`+this.sides[y].ch+`</span></span>`,n.html.call(this)},t.latex=function(){return`\\left`+this.sides[v].ctrlSeq+this.ends[v].latex()+`\\right`+this.sides[y].ctrlSeq},t.matchBrack=function(e,t,n){return n instanceof Ye&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||Xe[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[v].ch]===n.sides[y].ch)&&n},t.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===v?0:1).removeClass(`mq-ghost`).html(this.sides[this.side].ch)},t.createLeftOf=function(e){var t,r,i;this.replacedFragment||(t=e.options,r=this.sides[v].ch===`|`?this.matchBrack(t,y,e[y])||this.matchBrack(t,v,e[v])||this.matchBrack(t,0,e.parent.parent):this.matchBrack(t,-this.side,e[-this.side])||this.matchBrack(t,-this.side,e.parent.parent)),r?(i=this.side=-r.side,this.closeOpposing(r),r===e.parent.parent&&e[i]&&C(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble(`reflow`)):(r=this,i=r.side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(C(e[-i],e.parent.ends[-i],i)),e[-i]=0),n.createLeftOf.call(r,e)),i===v?e.insAtLeftEnd(r.ends[v]):e.insRightOf(r)},t.placeCursor=e,t.unwrap=function(){this.ends[v].children().disown().adopt(this.parent,this,this[y]).jQ.insertAfter(this.jQ),this.remove()},t.deleteSide=function(e,t,n){var r,i,a,o=this.parent,s=this[e],c=o.ends[e];if(e===this.side)return this.unwrap(),void(s?n.insDirOf(-e,s):n.insAtDirEnd(e,o));if(r=n.options,i=!this.side,this.side=-e,this.matchBrack(r,e,this.ends[v].ends[this.side]))this.closeOpposing(this.ends[v].ends[this.side]),a=this.ends[v].ends[e],this.unwrap(),a.siblingCreated&&a.siblingCreated(n.options,e),s?n.insDirOf(-e,s):n.insAtDirEnd(e,o);else{if(this.matchBrack(r,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else{if(t&&i)return this.unwrap(),void(s?n.insDirOf(-e,s):n.insAtDirEnd(e,o));this.sides[e]={ch:Xe[this.sides[this.side].ch],ctrlSeq:Xe[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===v?0:1).addClass(`mq-ghost`).html(this.sides[e].ch)}s?(a=this.ends[v].ends[e],C(s,c,-e).disown().withDirAdopt(-e,this.ends[v],a,0).jQ.insAtDirEnd(e,this.ends[v].jQ.removeClass(`mq-empty`)),a.siblingCreated&&a.siblingCreated(n.options,e),n.insDirOf(-e,s)):t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[v])}},t.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},t.finalizeTree=function(){this.ends[v].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===v)).removeClass(`mq-ghost`),this.side=0}},t.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),Xe={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"&lang;":`&rang;`,"&rang;":`&lang;`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `},m(`(`),m(`[`),m(`{`,`\\{`),w.langle=r(Ye,v,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),w.rangle=r(Ye,y,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),T[`|`]=r(Ye,v,`|`,`|`,`|`,`|`),w.lVert=r(Ye,v,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),w.rVert=r(Ye,y,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),w.left=_(R,function(e){e.parser=function(){var e=I.regex,t=I.string,n=(I.succeed,I.optWhitespace);return n.then(e(/^(?:[([|]|\\\{|\\langle(?![a-zA-Z])|\\lVert(?![a-zA-Z]))/)).then(function(r){var i=r.charAt(0)===`\\`?r.slice(1):r;return r==`\\langle`&&(i=`&lang;`,r+=` `),r==`\\lVert`&&(i=`&#8741;`,r+=` `),re.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t,n=e.charAt(0)===`\\`?e.slice(1):e;return e==`\\rangle`&&(n=`&rang;`,e+=` `),e==`\\rVert`&&(n=`&#8741;`,e+=` `),t=Ye(0,i,n,r,e),t.blocks=[a],a.adopt(t,0,0),t})})})}}),w.right=_(R,function(e){e.parser=function(){return I.fail(`unmatched \\right`)}}),Ze=w.binom=w.binomial=_(_(R,p),function(e,t){e.ctrlSeq=`\\binom`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-paren mq-scaled">(</span><span class="mq-non-leaf"><span class="mq-array mq-non-leaf"><span>&0</span><span>&1</span></span></span><span class="mq-paren mq-scaled">)</span></span>`,e.textTemplate=[`choose(`,`,`,`)`]}),w.choose=_(Ze,function(e){e.createLeftOf=Ge.prototype.createLeftOf}),w.editable=w.MathQuillMathField=_(R,function(e,t){e.ctrlSeq=`\\MathQuillMathField`,e.htmlTemplate=`<span class="mq-editable-field"><span class="mq-root-block">&0</span></span>`,e.parser=function(){var e=this,n=I.string,r=I.regex,i=I.succeed;return n(`[`).then(r(/^[a-z][a-z0-9]*/i)).skip(n(`]`)).map(function(t){e.name=t}).or(i()).then(t.parser.call(e))},e.finalizeTree=function(e){var t=k(this.ends[v],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),u(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[v].controller))},e.latex=function(){return this.ends[v].latex()},e.text=function(){return this.ends[v].text()}}),Qe=w.embed=_(ae,function(e,t){e.setOptions=function(e){function t(){return``}return this.text=e.text||t,this.htmlTemplate=e.htmlString||``,this.latex=e.latex||t,this},e.parser=function(){var e=this,t=I.string,n=I.regex,r=I.succeed;return t(`{`).then(n(/^[a-z][a-z0-9]*/i)).skip(t(`}`)).then(function(i){return t(`[`).then(n(/^[-\w\s]*/)).skip(t(`]`)).or(r()).map(function(t){return e.setOptions(N[i](t))})})}}),w.MathQuillResponseContainer=_(R,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainer`,e.htmlTemplate=`<span class="lrn-mq-response-container"><marker class="lrn-qe-keyboard-i-response"></marker><content>Response</content></span>`,e.latex=function(){return`\\MathQuillResponseContainer`},e.text=function(){return this.ends[v].text()}}),w.MathQuillResponseContainerIcon=_(R,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainerIcon`,e.htmlTemplate=`<span class="lrn-mq-response-container-icon"><span class="lrn-qe-keyboard-i-response"></span></span>`,e.latex=function(){return`\\MathQuillResponseContainerIcon`},e.text=function(){return this.ends[v].text()}}),$e=w.matrix=_(R,function(e,t){var n=_(oe,function(e,t){e.init=function(e,n){return this.column=e,this.row=n,t.init.call(this)},e.keystroke=function(e,n,r){switch(e){case`Shift-Spacebar`:return n.preventDefault(),this.parent.insertColumn(this);case`Shift-Enter`:return this.parent.insertRow(this)}return t.keystroke.apply(this,arguments)},e.deleteOutOf=function(e,n){var r=this,i=arguments;this.parent.backspace(this,e,n,function(){return t.deleteOutOf.apply(r,i)})}}),r={column:`&`,row:`\\\\`};e.parentheses={left:null,right:null},e.maximum={rows:5,columns:5},e.defaults={rows:2,columns:2},e.ctrlSeq=`\\matrix`,e.createBlocks=function(){var e,t,r=this,i=r.blocks=[],a=0;this.htmlTemplate.replace(/&\d+/g,function(o,s){var c=r.htmlTemplate.substring(0,s).match(/<tr[^>]*>/gi).length-1;t=e===c?t+1:0,i[a]=n(t,c),i[a].adopt(r,r.ends[y],0),e=c,a++})},e.reflow=function(){var e=this.jQ.children(`table`),t=e.outerHeight()/+e.css(`fontSize`).slice(0,-2),n=this.jQ.children(`.mq-paren`);n.length&&Te(n,at(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e,t,n,i=this.getMatrixName(),a=`\\begin{`+i+`}`;for(n=0;n<this.blocks.length;n++)e=this.blocks[n].row,t!==void 0&&(a+=t===e?r.column:r.row),t=e,a+=this.blocks[n].latex();return a+=`\\end{`+i+`}`},e.createLeftOf=function(n){this.cursor=n;var r=Math.min(this.defaults.rows,this.maximum.rows),i=Math.min(this.defaults.columns,this.maximum.columns);this.defaultHtmlTemplate=this.defaultHtmlTemplate||this.generateHtmlTemplate(r,i),e.htmlTemplate=this.defaultHtmlTemplate,t.createLeftOf.call(this,n)},e.getMatrixName=function(){return this.ctrlSeq.replace(`\\`,``)},e.generateHtmlTemplate=function(e,t){function n(e){return e?`<span class="mq-paren mq-scaled">`+e+`</span>`:``}var r,i,a,o=`<span class="mq-matrix mq-non-leaf">`+n(this.parentheses.left);for(o+=`<table class="mq-non-leaf">`,e=Math.min(e,this.maximum.rows),t=Math.min(t,this.maximum.columns),r=0,i=0;i<e;i++){for(o+=`<tr>`,a=0;a<t;a++)o+=`<td>&`+r+`</td>`,r++;o+=`</tr>`}return o+=`</table>`,o+=n(this.parentheses.right)+`</span>`},e.htmlTemplate=e.generateHtmlTemplate(1,1),e.parser=function(){var e=I.regex,t=this,i=this.getMatrixName(),a=RegExp(`^(.*?)\\\\end{`+i+`}`),o=RegExp(`\\\\end{`+i+`}`);return e(a).then(function(e){var i,a,s,c,l=e.replace(o,``),u=[],d=l.split(r.row),f=Math.min(d.length,t.maximum.rows),p=0;for(a=0;a<f;a++)i=d[a].split(r.column),p=Math.max(p,i.length);for(p=Math.min(p,t.maximum.columns),a=0;a<f;a++)for(i=d[a].split(r.column),e=0;e<p;e++)s=n(e,a),c=re.parse(i[e]||` `),c.children().adopt(s,s.ends[y],0),u.push(s);for(t.htmlTemplate=t.generateHtmlTemplate(f,p),t.blocks=u,a=0;a<u.length;a+=1)u[a].adopt(t,t.ends[y],0);return I.succeed(t)})},e.finalizeTree=function(){var e=this.jQ.find(`table`);e.length&&(this.relink(),e.removeClass(function(e,t){var n=t.match(/mq-rows-\d+/g);return n&&n.join(` `)||``}),e.addClass(`mq-rows-`+e.find(`tr`).length))},e.relink=function(){var e=this.jQ.find(`td`),t=S.byId[e.first().attr(it)],n=S.byId[e.last().attr(it)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n,a,o,s=S.byId[b(this).attr(it)],c=e.eq(t+1),l=b(this).closest(`tr`).next(`tr`),u=b(this).closest(`tr`).index(),d=b(this).index();c.length&&(a=S.byId[c.attr(it)],s[y]=a,a[v]=s),n=l.length?l.find(`td`).eq(d):r.find(`td`).eq(d+1),n.length&&(o=S.byId[n.attr(it)],s.downOutOf=o,o.upOutOf=s),s.column=d,s.row=u,i.push(s)}),this.ends[v]=t,this.ends[y]=n,t&&t[v]&&delete t[v],n&&n[y]&&delete n[y],this.blocks=i},e.deleteCell=function(e){function t(){return S.byId[b(this).attr(it)].isEmpty()}var n,r=e.jQ.closest(`tr`),i=e.jQ.index(),a=r.index(),o=r.find(`td`).not(e.jQ),s=this.jQ.find(`tr`).not(r).map(function(){return b(this).find(`td`)[i]}),c=this.jQ.find(`td`).length===1;return o.filter(t).length===o.length&&s.length&&(o.remove(),e.jQ.remove(),r.remove(),this.finalizeTree()),s.filter(t).length===s.length&&o.length&&(s.remove(),e.jQ.remove(),this.finalizeTree()),c||(a=Math.min(a,this.jQ.find(`tr`).length-1),i=Math.min(i,this.jQ.find(`tr`).eq(a).find(`td`).length-1),n=S.byId[this.jQ.find(`tr`).eq(a).find(`td`).eq(i).attr(it)]),n},e.addRow=function(e){var t,r,i,a,o;if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(t=e.find(`td`).length,r=b(`<tr></tr>`),o=0;o<t;o++)i=n(),i.parent=this,i.jQ=b(`<td class="mq-empty">`).attr(it,i.id),r.append(i.jQ),a||=i;return r.insertAfter(e),a}},e.addColumn=function(e){var t,r,i,a,o;if(!(e.closest(`tr`).find(`td`).length>=this.maximum.columns))return t=e.index(),r=e.closest(`tr`).index(),i=this,o=[],this.jQ.find(`tr`).each(function(){a=n(),a.parent=i,a.jQ=b(`<td class="mq-empty">`).attr(it,a.id),a.jQ.insertAfter(b(this).find(`td`).eq(t)),o.push(a)}),o[r]},e.insertColumn=function(e){newBlock=this.addColumn(e.jQ),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.insertRow=function(e){newBlock=this.addRow(e.jQ.closest(`tr`)),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.backspace=function(e,t,n,r){if(e.isEmpty()){var i=this.deleteCell(e);i?n.insAtRightEnd(i):(r(),this.finalizeTree()),this.bubble(`edited`)}}}),w.pmatrix=_($e,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),w.bmatrix=_($e,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),w.Bmatrix=_($e,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),w.vmatrix=_($e,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),w.Vmatrix=_($e,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}}),et=l(1),et)(function(e,t){typeof t==`function`?(c[e]=function(){return s(),t.apply(this,arguments)},c[e].prototype=t.prototype):c[e]=t})(tt,et[tt])})()})),VH=o((()=>{})),HH=o(((e,t)=>{zH(),BH(),VH(),t.exports=window.MathQuill})),UH={fontFamily:`MJXZERO, MJXTEX !important`,"-webkit-font-smoothing":`antialiased !important`,"& .mq-math-mode > span > var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode span var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode .mq-nonSymbola":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode > span > var.mq-operator-name":{fontFamily:`MJXZERO, MJXTEX !important`}},WH={"& .mq-longdiv-inner":{marginTop:`-1px`,marginLeft:`5px !important;`,"& > .mq-empty":{padding:`0 !important`,marginLeft:`0px !important`,marginTop:`2px`}},"& .mq-math-mode .mq-longdiv":{display:`inline-flex !important`}},GH={"& .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`0.5em !important`,paddingRight:`0.15em`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-supsub ":{fontSize:`70.7%`},"& .mq-math-mode .mq-supsub.mq-sup-only":{verticalAlign:`-0.1em !important`,"& .mq-sup":{marginBottom:`0px !important`}},"& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only":{verticalAlign:`0.4em !important`},"& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group":{verticalAlign:`0.4em !important`}},KH={"& *":{...UH,...WH,"& .mq-math-mode .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-math-mode .mq-sqrt-stem":{marginTop:`-5px`,paddingTop:`4px`},"& .mq-math-mode .mq-paren":{verticalAlign:`middle !important`},"& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty":{padding:`0 !important`},"& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ":{padding:`0 !important`}}},qH={commonMqFontStyles:UH,longdivStyles:WH,supsubStyles:GH,commonMqKeyboardStyles:KH},JH=e=>e.ariaLabel||e.name||e.label||e.latex||`keypad action`,YH=e=>(T(5-e.length,()=>e.push([])),E.apply(null,e)),XH=D(`pie-lib:math-inline:keypad:a11y`),ZH=G(`div`)(()=>({...KH,width:`100%`,display:`grid`,gridTemplateRows:`repeat(5, minmax(40px, 60px))`,gridAutoFlow:`column`,border:`1px solid ${bL()}`,"&.character":{textTransform:`initial !important`,gridTemplateRows:`repeat(5, minmax(40px, 50px)) !important`},"&.language":{gridTemplateRows:`repeat(4, minmax(40px, 50px)) !important`,"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}}));G(`div`)(({operator:e})=>({flex:e?`0 0 auto`:`1 1 0`,display:`grid`,gridAutoFlow:`column`,gridTemplateRows:`repeat(5, minmax(44px, 56px))`,gridAutoColumns:`minmax(72px, 1fr)`,backgroundColor:e?jL():AL()}));var QH=G(PR,{shouldForwardProp:e=>e!==`operator`})(({operator:e})=>({minWidth:`auto`,borderRadius:0,color:KI(),backgroundColor:e?jL():AL(),textTransform:`none`,fontSize:`1.6rem`,lineHeight:1,"&:hover":{backgroundColor:e?ML():jL()},"&:focus-visible":{outline:`3px solid ${DL()}`,outlineOffset:-3,zIndex:2}})),$H=G(CN,{shouldForwardProp:e=>e!==`operator`})(({operator:e})=>({minWidth:`auto`,borderRadius:0,color:KI(),backgroundColor:e?jL():AL(),"&:hover":{backgroundColor:e?ML():jL()},"&:focus-visible":{outline:`3px solid ${DL()}`,outlineOffset:-3,zIndex:2},"& .icon":{height:`30px`}})),eU=G(`span`)(()=>({pointerEvents:`none`,color:KI(),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minHeight:40,minWidth:34,"& .MathJax":{fontSize:`1.45rem`,lineHeight:1.1},"& mjx-container":{overflow:`visible !important`,lineHeight:1.1},"& .tpl-root":{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:4,fontSize:`1.5rem`,lineHeight:1,minHeight:34,fontFamily:`"Times New Roman", Times, serif`,textTransform:`none`},"& .mq-keycap":{fontFamily:`"STIX Two Text", MJXZERO, MJXTEX, "Times New Roman", Times, serif`,fontStyle:`normal`},"& .mq-keycap var":{fontFamily:`"STIX Two Text", MJXZERO, MJXTEX-I, "Times New Roman", Times, serif`,fontStyle:`italic`},"& .mq-keycap .mq-operator-name":{fontFamily:`"STIX Two Text", MJXZERO, MJXTEX, "Times New Roman", Times, serif`,fontStyle:`normal`},"& .tpl-fraction":{display:`inline-grid`,gridTemplateRows:`auto 1px auto`,justifyItems:`center`,alignItems:`center`,minWidth:22},"& .tpl-frac-line":{width:`1.05em`,borderTop:`2px solid ${KI()}`,margin:`2px 0`},"& .tpl-mixed-fraction":{display:`inline-flex`,alignItems:`center`,gap:3},"& .tpl-frac-cell":{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minHeight:`0.55em`},"& .tpl-placeholder":{display:`inline-block`,width:`0.42em`,height:`0.76em`,backgroundColor:uL()},"& .tpl-longdiv":{display:`inline-flex`,alignItems:`center`,gap:3},"& .tpl-longdiv-radicand":{display:`inline-flex`,alignItems:`center`,borderTop:`2px solid ${KI()}`,paddingTop:`0.15em`,minWidth:`0.8em`,justifyContent:`center`},"& .tpl-sup":{display:`inline-flex`,alignItems:`flex-start`},"& .tpl-sup .tpl-placeholder":{width:`0.3em`,height:`0.5em`,marginLeft:`0.05em`,transform:`translateY(-0.35em)`},"& .tpl-sub":{display:`inline-flex`,alignItems:`flex-end`},"& .tpl-sub .tpl-placeholder":{width:`0.3em`,height:`0.5em`,marginLeft:`0.05em`,transform:`translateY(0.3em)`},"& .tpl-root-radical":{display:`inline-flex`,alignItems:`flex-start`},"& .tpl-root-sign":{fontSize:`1.15em`,lineHeight:1},"& .tpl-radicand":{borderTop:`2px solid ${KI()}`,padding:`0.05em 0 0 0.08em`,marginLeft:`0.03em`},"& .tpl-over":{display:`inline-grid`,justifyItems:`center`,gap:2},"& .tpl-over-line":{display:`block`,width:`1em`,borderTop:`2px solid ${KI()}`},"& .tpl-over-arrow":{display:`block`,fontSize:`0.65em`,lineHeight:1},"& .tpl-over-arc":{display:`block`,fontSize:`0.8em`,lineHeight:1,transform:`translateY(0.1em)`}})),tU=G(PR,{shouldForwardProp:e=>e!==`operator`})(({operator:e})=>({minWidth:`auto`,borderRadius:0,padding:`6px`,overflow:`visible`,textTransform:`none`,color:KI(),backgroundColor:e?jL():AL(),"&:hover":{backgroundColor:e?ML():jL()},"&:focus-visible":{outline:`3px solid ${DL()}`,outlineOffset:-3,zIndex:2}})),nU={"\\theta":`θ`,"\\pi":`π`,"\\infty":`∞`,"\\propto":`∝`,"\\sin":`sin`,"\\cos":`cos`,"\\tan":`tan`,"\\sec":`sec`,"\\csc":`csc`,"\\cot":`cot`,"\\log":`log`,"\\ln":`ln`,"\\pm":`±`,"\\approx":`≈`,"\\napprox":`≉`,"\\neq":`≠`,"\\sim":`∼`,"\\nsim":`≁`,"\\mu":`μ`,"\\Sigma":`Σ`,"\\sigma":`σ`,"\\parallel":`∥`,"\\nparallel":`∦`,"\\perp":`⟂`,"\\angle":`∠`,"\\measuredangle":`∡`,"\\triangle":`△`,"\\square":`□`,"\\parallelogram":`▱`,"\\odot":`⊙`,"\\degree":`°`,"\\cong":`≅`,"\\ncong":`≇`,"\\leftarrow":`←`,"\\rightarrow":`→`,"\\leftrightarrow":`↔`,"\\le":`≤`,"\\ge":`≥`},rU=new Set([`\\sin`,`\\cos`,`\\tan`,`\\sec`,`\\csc`,`\\cot`,`\\log`,`\\ln`]),iU=new Set([`x`,`y`,`i`,`e`,`AB`]),aU=(e=``)=>iU.has(e)?(0,U.jsx)(`var`,{children:e}):(0,U.jsx)(`span`,{children:e}),oU=(e=``)=>{if(rU.has(e))return(0,U.jsx)(`var`,{className:`mq-operator-name`,children:e.replace(/^\\/,``)});let t=nU[e];return t?iU.has(t)?(0,U.jsx)(`var`,{children:t}):(0,U.jsx)(`span`,{children:t}):aU(e.replace(/^\\/,``).replace(/\\(left|right)/g,``).replace(/[{}\\]/g,``).replace(/\s+/g,` `).trim())},sU=({short:e=!1})=>(0,U.jsx)(`span`,{className:`tpl-placeholder`,style:e?{width:`0.3em`,height:`0.55em`}:void 0}),cU=({body:e,marker:t})=>(0,U.jsxs)(`span`,{className:`tpl-root tpl-over mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`span`,{className:t,children:t===`tpl-over-line`?``:t===`tpl-over-arrow`?`↔`:`◠`}),(0,U.jsx)(`span`,{children:e})]}),lU=({definition:e})=>{let t=e.key?.latex||``;switch(e.visualType){case`fractionTemplate`:return t===`\\frac{x}{ }`?(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:(0,U.jsxs)(`span`,{className:`tpl-fraction`,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(`span`,{className:`tpl-frac-line`}),(0,U.jsx)(sU,{})]})}):(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:(0,U.jsxs)(`span`,{className:`tpl-fraction`,children:[(0,U.jsx)(sU,{}),(0,U.jsx)(`span`,{className:`tpl-frac-line`}),(0,U.jsx)(sU,{})]})});case`mixedFractionTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-mixed-fraction mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsxs)(`span`,{className:`tpl-fraction`,style:{minWidth:`0.9em`},children:[(0,U.jsx)(`span`,{className:`tpl-frac-cell`,children:(0,U.jsx)(sU,{short:!0})}),(0,U.jsx)(`span`,{className:`tpl-frac-line`}),(0,U.jsx)(`span`,{className:`tpl-frac-cell`,children:(0,U.jsx)(sU,{short:!0})})]})]});case`squaredTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sup mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(`span`,{style:{fontSize:`0.7em`,transform:`translateY(-0.25em)`},children:`2`})]});case`longdivTemplate`:return(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:(0,U.jsxs)(`span`,{className:`tpl-longdiv`,children:[(0,U.jsx)(`span`,{children:`)`}),(0,U.jsx)(`span`,{className:`tpl-longdiv-radicand`,children:(0,U.jsx)(sU,{})})]})});case`supTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sup mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(sU,{short:!0})]});case`subTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sub mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{children:`x`}),(0,U.jsx)(sU,{short:!0})]});case`sqrtTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-root-radical mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`span`,{className:`tpl-root-sign`,children:`√`}),(0,U.jsx)(`span`,{className:`tpl-radicand`,children:(0,U.jsx)(sU,{})})]});case`nthRootTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-root-radical mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`span`,{style:{fontSize:`0.55em`,transform:`translate(0.15em,-0.2em)`},children:(0,U.jsx)(sU,{short:!0})}),(0,U.jsx)(`span`,{className:`tpl-root-sign`,children:`√`}),(0,U.jsx)(`span`,{className:`tpl-radicand`,children:(0,U.jsx)(sU,{})})]});case`parenTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:[`(`,(0,U.jsx)(sU,{}),`)`]});case`bracketTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:[`[`,(0,U.jsx)(sU,{}),`]`]});case`absTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:[`|`,(0,U.jsx)(sU,{}),`|`]});case`logSubTemplate`:return(0,U.jsxs)(`span`,{className:`tpl-root tpl-sub mq-keycap`,"aria-hidden":!0,children:[(0,U.jsx)(`var`,{className:`mq-operator-name`,children:`log`}),(0,U.jsx)(sU,{short:!0})]});case`overlineTemplate`:return(0,U.jsx)(cU,{body:t.includes(`y`)?(0,U.jsx)(`var`,{children:`y`}):t.includes(`x`)?(0,U.jsx)(`var`,{children:`x`}):(0,U.jsx)(sU,{}),marker:`tpl-over-line`});case`overArrowTemplate`:return(0,U.jsx)(cU,{body:(0,U.jsx)(sU,{}),marker:`tpl-over-arrow`});case`overBiArrowTemplate`:return(0,U.jsx)(cU,{body:t.includes(`AB`)?(0,U.jsx)(`var`,{children:`AB`}):(0,U.jsx)(sU,{}),marker:`tpl-over-arrow`});case`overArcTemplate`:return(0,U.jsx)(cU,{body:(0,U.jsx)(sU,{}),marker:`tpl-over-arc`});case`symbolText`:return(0,U.jsx)(`span`,{className:`tpl-root mq-keycap`,"aria-hidden":!0,children:oU(t)});default:return(0,U.jsx)(`span`,{className:`tpl-root`,"aria-hidden":!0,children:e.key?.label||e.key?.write||e.key?.name})}},uU=e=>e&&e.name===``&&e.latex===``&&e.write===``,dU=(e=``)=>e.replace(/\$\$/g,``).replace(/^\$|\$$/g,``).trim(),fU=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},pU=class extends P.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,baseSet:p.array,additionalKeys:p.array,layoutForKeyPad:p.object,onPress:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,setKeypadInteraction:p.func,mode:p.oneOfType([p.string,p.number]),onRequestClose:p.func};static defaultProps={baseSet:LH,noDecimal:!1};constructor(e){super(e),this.keypadRef=P.createRef(),this.buttonRefs=[],this.state={activeIndex:0}}componentDidMount(){let e=this.keypadRef?.current,t=e?.closest(`.main-container`),n=e?.closest(`.pie-toolbar`);if(this.props.controlledKeypadMode&&t&&n){let e=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=e.top+e.height-(r.top+r.height);i<0&&t&&(t.style.height=`${e.height+e.top-i}px`)}e&&(e.addEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.addEventListener(`mousedown`,this.handleKeypadInteraction,!0))}componentWillUnmount(){let e=this.keypadRef?.current;if(this.props.controlledKeypadMode&&e){let t=e.closest(`.main-container`);t&&(t.style.height=`unset`)}e&&(e.removeEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.removeEventListener(`mousedown`,this.handleKeypadInteraction,!0))}handleKeypadInteraction=()=>{this.props.setKeypadInteraction&&this.props.setKeypadInteraction(!0)};keyIsNotAllowed=e=>{let{noDecimal:t}=this.props;return(e.write===`.`&&e.label===`.`||e.write===`,`&&e.label===`,`)&&t};flowKeys=(e,t)=>y([...YH([...(e||[]).map(e=>[...e])]),...YH([...(t||[]).map(e=>[...e])])]);toRenderModel=()=>{let{baseSet:e,additionalKeys:t,mode:n}=this.props;return([`non-negative-integers`,`integers`,`decimals`,`fractions`,`item-authoring`,`language`].includes(n)?this.flowKeys([],t||[]):this.flowKeys(e,t||[])).filter(e=>e&&!uU(e)).map(e=>e.latex?{...e,latex:dU(e.latex),write:typeof e.write==`string`?dU(e.write):e.write,label:typeof e.label==`string`?dU(e.label):e.label}:e).map((e,t)=>({id:`${e.label||e.latex||e.name||e.command||`key`}-${t}`,ariaLabel:JH(e),key:e}))};pressKey=e=>{!e||this.keyIsNotAllowed(e.key)||(XH(`[pressKey]`,e.id),this.props.onPress(e.key))};moveFocus=e=>{let t=Math.max(0,Math.min(e,this.buttonRefs.length-1));this.setState({activeIndex:t},()=>{let e=this.buttonRefs[t];e&&!e.disabled&&e.focus()})};onButtonKeyDown=(e,t)=>{if(e.key===`ArrowRight`||e.key===`ArrowDown`){e.preventDefault(),this.moveFocus(t+1);return}if(e.key===`ArrowLeft`||e.key===`ArrowUp`){e.preventDefault(),this.moveFocus(t-1);return}if(e.key===`Home`){e.preventDefault(),this.moveFocus(0);return}if(e.key===`End`){e.preventDefault(),this.moveFocus(this.buttonRefs.length-1);return}e.key===`Escape`&&this.props.onRequestClose&&(e.preventDefault(),this.props.onRequestClose())};renderKey=(e,t)=>{let n=e.key,r=n.category===`operators`,i=this.keyIsNotAllowed(n),a={key:`${e.id}-${t}`,onClick:()=>this.pressKey(e),onKeyDown:e=>this.onButtonKeyDown(e,t),onFocus:()=>this.setState({activeIndex:t}),tabIndex:this.state.activeIndex===t?0:-1,disabled:i,"aria-label":e.ariaLabel||JH(n),...n.actions||{},...n.extraProps||{}};if(n.icon){let e=n.icon?n.icon:`div`;return(0,U.jsx)($H,{...a,operator:r,children:(0,U.jsx)(e,{className:`icon`,"aria-hidden":`true`})})}return n.latex?(0,U.jsx)(tU,{...a,operator:r,children:(0,U.jsx)(eU,{children:(0,U.jsx)(lU,{definition:e})})}):(0,U.jsx)(QH,{...a,operator:r,children:n.label||n.write||n.name})};render(){let{className:e,onFocus:t,layoutForKeyPad:n}=this.props;this.buttonRefs=[];let r=this.toRenderModel(),i=r.length%5?1:0,a={gridTemplateColumns:`repeat(${Math.floor(r.length/5)+i}, minmax(min-content, 150px))`,...fU(n)},o=0,s=e=>{let t=o++,n=this.renderKey(e,t);return P.cloneElement(n,{ref:e=>{this.buttonRefs[t]=e}})};return(0,U.jsx)(ZH,{ref:this.keypadRef,className:[e,this.props.mode].filter(Boolean).join(` `),style:a,onFocus:t,role:`grid`,"aria-label":`Math keypad`,children:r.map(e=>s(e))})}},mU=e=>{if(e.command)return{value:e.command,type:`command`};if(e.write)return{value:e.write};if(e.keystroke)return{type:`cursor`,value:e.keystroke}},hU=class extends P.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,mode:p.oneOfType([p.string,p.number]),layoutForKeyPad:p.object,onClick:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,additionalKeys:p.array,setKeypadInteraction:p.func,onRequestClose:p.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(mU(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s,onRequestClose:c}=this.props,l=CH(a);return(0,U.jsx)(pU,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:yB(xH(e),l),onPress:this.keypadPress,mode:e,setKeypadInteraction:s,onRequestClose:c})}},gU=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},_U=l(HH(),1),vU;typeof window<`u`&&(vU=_U.default.getInterface(2),vU&&vU.registerEmbed&&gU(vU));var yU=D(`math-input:mq:input`),bU=G(`span`)({}),xU=class extends P.Component{static propTypes={className:p.string,onClick:p.func,onChange:p.func,latex:p.string,onFocus:p.func,onBlur:p.func};componentDidMount(){if(!vU)throw Error(`MQ is not defined - but component has mounted?`);this.mathField=vU.MathField(this.input,{handlers:{edit:this.onInputEdit.bind(this)}}),this.updateLatex()}componentDidUpdate(){this.updateLatex()}updateLatex(){if(!this.mathField)return;let{latex:e}=this.props;e!=null&&this.mathField.latex(e)}clear(){return this.mathField.latex(``),``}blur(){yU(`blur mathfield`),this.mathField.blur()}focus(){yU(`focus mathfield...`),this.mathField.focus()}command(e){return yU(`command: `,e),Array.isArray(e)?e.forEach(e=>{this.mathField.cmd(e)}):this.mathField.cmd(e),this.mathField.focus(),this.mathField.latex()}keystroke(e){return this.mathField.keystroke(e),this.mathField.focus(),this.mathField.latex()}write(e){return yU(`write: `,e),this.mathField.write(e),this.mathField.focus(),this.mathField.latex()}onInputEdit=()=>{yU(`[onInputEdit] ...`);let{onChange:e}=this.props;this.mathField&&e&&e(this.mathField.latex())};refresh=()=>{this.blur(),this.focus()};onKeyPress=e=>{e.charCode===13&&e.preventDefault()};onClick=e=>{let{onClick:t}=this.props;this.refresh(),t&&t(e)};shouldComponentUpdate(e){return yU(`next: `,e.latex),yU(`current: `,this.mathField.latex()),e.latex!==this.mathField.latex()}render(){let{onFocus:e,onBlur:t,className:n}=this.props;return(0,U.jsx)(bU,{className:n,onKeyDown:this.onKeyPress,onClick:this.onClick,onFocus:e,onBlur:t,ref:e=>this.input=e})}},SU;typeof window<`u`&&(SU=_U.default.getInterface(2));var CU=D(`pie-lib:math-input:mq:static`),wU=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,TU=/ /g;function EU(e=``){return e.replace(TU,``)}function DU(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var OU=class extends P.Component{static propTypes={latex:p.string.isRequired,onFocus:p.func,onBlur:p.func,className:p.string,getFieldName:p.func,onSubFieldChange:p.func,onSubFieldFocus:p.func,setInput:p.func};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=P.createRef()}componentDidMount(){this.update(),wH(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),wH()}componentWillUnmount(){this.removeLiveRegion(),this.removeEventListeners()}createLiveRegion=()=>{this.liveRegion=document.createElement(`div`),this.liveRegion.style.position=`absolute`,this.liveRegion.style.width=`1px`,this.liveRegion.style.height=`1px`,this.liveRegion.style.marginTop=`-1px`,this.liveRegion.style.clip=`rect(1px, 1px, 1px, 1px)`,this.liveRegion.style.overflow=`hidden`,this.liveRegion.setAttribute(`aria-live`,`polite`),this.liveRegion.setAttribute(`aria-atomic`,`true`),document.body.appendChild(this.liveRegion)};addEventListeners=()=>{let e=this.inputRef.current;e&&(e.addEventListener(`keydown`,this.handleKeyDown),e.addEventListener(`click`,this.handleMathKeyboardClick))};removeEventListeners=()=>{let e=this.inputRef.current;e&&(e.removeEventListener(`keydown`,this.handleKeyDown),e.removeEventListener(`click`,this.handleMathKeyboardClick))};removeLiveRegion=()=>{this.liveRegion&&=(document.body.removeChild(this.liveRegion),null)};handleKeyDown=e=>{(e?.key===`Backspace`||e?.key===`Delete`)&&this.setState({isDeleteKeyPressed:!0}),this.setState({inputSource:`keyboard`})};handleMathKeyboardClick=()=>{this.setState({inputSource:`mathKeyboard`})};onInputEdit=e=>{if(!this.mathField)return;let t=this.props.getFieldName(e,this.mathField.innerFields);this.props.onSubFieldChange&&this.props.onSubFieldChange(t,e.latex()),this.announceLatexConversion(e.latex())};announceLatexConversion=e=>{if(!this.state){console.error(`State is not initialized`);return}let{previousLatex:t,inputSource:n,isDeleteKeyPressed:r}=this.state,i=`Converted to math symbol`;if(n===`keyboard`&&!r)if(DU(e)>DU(t))this.announceMessage(i);else try{this.mathField.parseLatex(t),this.mathField.parseLatex(e),e==t&&this.announceMessage(i)}catch(e){console.warn(`Error parsing latex:`,e.message),console.warn(e)}this.setState({previousLatex:e,isDeleteKeyPressed:!1})};announceMessage=e=>{this.setState({previousLatex:``}),this.liveRegion&&(this.liveRegion.textContent=e,setTimeout(()=>{this.liveRegion.textContent=``},500))};update=()=>{if(!SU)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=SU.StaticMath(this.inputRef?.current,{handlers:{edit:this.onInputEdit.bind(this)}});try{this.mathField.parseLatex(this.props.latex),this.mathField.latex(this.props.latex)}catch{this.mathField.latex(`\\MathQuillMathField[r1]{}`)}};blur=()=>{CU(`blur mathfield`),this.mathField.blur()};focus=()=>{CU(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=EU(this.mathField.parseLatex(e.latex)),n=(e.latex.match(wU)||[]).length,r=t!==EU(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return CU(`[shouldComponentUpdate] `,r),r}catch(e){return console.warn(`Error parsing latex:`,e.message,`skip update`),console.warn(e),!1}}onFocus=e=>{try{let t=e.target.parentElement.nextSibling,n=parseInt(t.getAttribute(`mathquill-block-id`),10);n||=(t=t.parentElement,parseInt(t.getAttribute(`mathquill-block-id`),10));let r=this.mathField.innerFields.find(e=>e.id===n);if(r){let e=this.props.getFieldName(r,this.mathField.innerFields);this.props.setInput&&this.props.setInput(r),this.props.onSubFieldFocus(e,r)}}catch(e){console.error(`error finding root block`,e.message)}};render(){let{onBlur:e,className:t}=this.props;return(0,U.jsx)(`span`,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},kU=G(`span`)(()=>({display:`inline-flex`,border:`1px solid #C0C3CF`,margin:`1px 5px`,cursor:`pointer`,alignItems:`center`,justifyContent:`center`,minWidth:`50px`,minHeight:`36px`,height:`fit-content`})),AU=G(`div`)(({theme:e})=>({background:e.palette.grey.A100,color:e.palette.grey.A700,display:`inline-flex`,borderRight:`2px solid #C0C3CF`,boxSizing:`border-box`,overflow:`hidden`,fontSize:`12px`,minHeight:`36px`,height:`100%`,alignItems:`center`,fontFamily:`Symbola, Times New Roman, serif`,padding:`0 2px`})),jU=G(`div`)(()=>({flex:8,color:`var(--pie-text, black)`,padding:`4px !important`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`var(--pie-background, rgba(255, 255, 255, 0))`,"& > .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-overarrow.mq-arrow-both":{marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`}})),MU=e=>{let{node:t,options:n,selected:r}=e,{attrs:i}=t,{value:a,index:o}=i,s=`R ${parseInt(o)+1}`;return(0,U.jsx)(jb,{className:`math-templated`,"data-selected":r,style:{display:`inline-flex`,minHeight:`36px`,minWidth:`50px`,cursor:`pointer`},children:(0,U.jsxs)(kU,{...i,children:[(0,U.jsx)(AU,{children:s}),(0,U.jsx)(jU,{children:(0,U.jsx)(OU,{latex:a})})]})})};MU.propTypes={attributes:p.object,value:p.string,keyToDisplay:p.string};var NU={},PU=e=>String(e||``).replace(/-/g,`_`),FU=e=>e&&e.attrs&&e.attrs.index!=null?String(e.attrs.index):null,IU=(e,t)=>{let n=[];return e.descendants((e,r)=>{if(e.type&&e.type.name===t){let t=FU(e);t!=null&&n.push({index:t,pos:r,node:e})}return!0}),n},LU=(e,t)=>{let n=0;return e.descendants(e=>(e.type&&e.type.name===t&&(n+=1),!0)),n},RU=({schema:e,typeName:t,index:n})=>{let r=e.nodes[t];return r?r.create({index:String(n),id:String(n),value:``}):null},zU=(e,t)=>{let n=e.resolve(Math.min(t,e.content.size));return Z.near(n,1)},BU=Pv.create({name:`responseArea`,addOptions(){return{maxResponseAreas:null,error:null,options:null,respAreaToolbar:null,onHandleAreaChange:null}},addProseMirrorPlugins(){if(!this.options.type)return[];let e=PU(this.options.type);return[new cu({key:new du(`response-area-watcher:${e}`),view:t=>(NU[e]===void 0&&(NU[e]=0,t.state.doc.descendants(t=>{if(t.type&&t.type.name===e){let n=FU(t);if(n!=null){let t=parseInt(n,10);!Number.isNaN(t)&&t>NU[e]&&(NU[e]=t)}}return!0})),{update:(t,n)=>{let r=t.state;if(n.doc.eq(r.doc))return;let i=IU(r.doc,e),a=IU(n.doc,e);if(this.options.toolbar&&(this.options.toolbar.disabled=i.length>=this.options.maxResponseAreas),a.length>i.length){let e=new Set(i.map(e=>e.index)),t=a.filter(t=>!e.has(t.index));t.length&&typeof this.options.onHandleAreaChange==`function`&&this.options.onHandleAreaChange(t)}}})})]},addCommands(){return{insertResponseArea:e=>({tr:t,state:n,dispatch:r,commands:i})=>{let a=PU(e);if(LU(n.doc,a)>=this.options.maxResponseAreas)return!1;NU[a]===void 0&&(NU[a]=0);let o=NU[a]+1;NU[a]+=1;let s=RU({schema:n.schema,typeName:a,index:o});if(!s)return!1;let{selection:c}=n,l=c.from,u=e=>{try{return t.insert(e,s),e}catch{return null}},d=u(l);if(d??=u(t.doc.content.size),d==null)return!1;if([`math_templated`,`inline_dropdown`,`explicit_constructed_response`].includes(a))t.setSelection(Q.create(t.doc,d));else{let e=d+s.nodeSize;t.setSelection(zU(t.doc,e))}return r&&(i.focus(),r(t)),!0},refreshResponseArea:()=>({tr:e,state:t,commands:n,dispatch:r})=>{let{selection:i}=t,a=i.$from.nodeAfter,o=i.from;return e.setNodeMarkup(o,void 0,{...a?.attrs,updated:`${Date.now()}`}),e.setSelection(Q.create(e.doc,o)),r&&(n.focus(),r(e)),!0}}}}),VU=uy.create({name:`explicit_constructed_response`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="explicit_constructed_response"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`explicit_constructed_response`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return zb(e=>(0,U.jsx)(PN,{...e,options:this.options}))}}),HU=uy.create({name:`math_templated`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="math_templated"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`math_templated`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return zb(e=>(0,U.jsx)(MU,{...e,options:this.options}))}}),UU=uy.create({name:`drag_in_the_blank`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},id:{default:null},value:{default:``},inTable:{default:null},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="drag_in_the_blank"]`,getAttrs:e=>({index:e.dataset.index,id:e.dataset.id,value:e.dataset.value,inTable:e.dataset.inTable})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`drag_in_the_blank`,"data-index":e.index,"data-id":e.id,"data-value":e.value,"data-in-table":e.inTable}]},addNodeView(){return zb(e=>(0,U.jsx)(cB,{...e,options:this.options}))}}),WU=uy.create({name:`inline_dropdown`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="inline_dropdown"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`inline_dropdown`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return zb(e=>(0,U.jsx)(lB,{...e,options:this.options}))}}),GU=Xr(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),KU=Xr(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),qU=Xr(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function JU(e){return Yr(`MuiMenuItem`,e)}var YU=Xr(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function XU(e){return Yr(`MuiNativeSelect`,e)}var ZU=Xr(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),QU=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return A({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${K(n)}`,a&&`iconOpen`,r&&`disabled`]},XU,t)},$U=G(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${ZU.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),eW=G($U,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:No,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${ZU.multiple}`]:t.multiple}]}})({}),tW=G(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${ZU.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),nW=G(tW,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${K(n.variant)}`],n.open&&t.iconOpen]}})({}),rW=P.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=QU(l);return(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(eW,{ownerState:l,className:k(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,U.jsx)(nW,{as:a,ownerState:l,className:u.icon})]})});function iW(e){return Yr(`MuiSelect`,e)}var aW=Xr(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function oW(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function sW(e){return e==null||typeof e==`string`&&!e.trim()}function cW(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var lW=P.createContext(null);function uW(){return P.useContext(lW)}var dW=lW.Provider,fW,pW=G($U,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${aW.select}`]:t.select},{[`&.${aW.select}`]:t[n.variant]},{[`&.${aW.error}`]:t.error},{[`&.${aW.multiple}`]:t.multiple}]}})({[`&.${aW.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),mW=G(tW,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${K(n.variant)}`],n.open&&t.iconOpen]}})({}),hW=G(`input`,{shouldForwardProp:e=>Mo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),gW=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return A({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${K(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},iW,t)},_W=P.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:A,SelectDisplayProps:M={},tabIndex:ee,type:N,value:te,variant:F=`standard`,...I}=e,[L,ne]=$j({controlled:te,default:l,name:`Select`}),[re,ie]=$j({controlled:E,default:c,name:`Select`}),R=P.useRef(null),ae=P.useRef(null),[z,B]=P.useState(null),{current:oe}=P.useRef(E!=null),[se,ce]=P.useState(),[le,ue]=P.useState(null),de=rM(t,m),fe=P.useCallback(e=>{ae.current=e,e&&B(e)},[]),V=z?.parentNode;P.useImperativeHandle(de,()=>({focus:()=>{ae.current.focus()},node:R.current,value:L}),[L]);let pe=z!==null&&re;P.useEffect(()=>{if(!pe||!V||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ce(V.clientWidth)});return e.observe(V),()=>{e.disconnect()}},[pe,V,a]),P.useEffect(()=>{c&&re&&z&&!oe&&(ce(a?null:V.clientWidth),ae.current.focus())},[z,a]),P.useEffect(()=>{i&&ae.current.focus()},[i]),P.useEffect(()=>{if(!h)return;let e=Kj(ae.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&ae.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let me=(e,t)=>{e?(ue(oW(t)),T&&T(t)):(ue(null),x&&x(t)),oe||(ce(a?null:V.clientWidth),ie(e))},he=e=>{w?.(e),e.button===0&&(e.preventDefault(),ae.current.focus(),me(!0,e))},ge=e=>{me(!1,e)},_e=P.Children.toArray(o),H=e=>{let t=_e.find(t=>t.props.value===e.target.value);t!==void 0&&(ne(t.props.value),b&&b(e,t))},ve=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(L)?L.slice():[];let t=L.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),L!==n&&(ne(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||me(!1,t)}},ye=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),me(!0,e)),C?.(e))},be=e=>{!pe&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:L,name:v}}),y(e))};delete I[`aria-invalid`];let xe,Se,Ce=[],we=!1;(cz({value:L})||d)&&(O?xe=O(L):we=!0);let Te=_e.map(e=>{if(!P.isValidElement(e))return null;let t;if(_){if(!Array.isArray(L))throw Error(j(2));t=L.some(t=>cW(t,e.props.value)),t&&we&&Ce.push(e.props.children)}else t=cW(L,e.props.value),t&&we&&(Se=e.props.children);return P.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:ve(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});we&&(xe=_?Ce.length===0?null:Ce.reduce((e,t,n)=>(e.push(t),n<Ce.length-1&&e.push(`, `),e),[]):Se);let Ee=se;!a&&oe&&z&&(Ee=V.clientWidth);let De;De=ee===void 0?u?null:0:ee;let Oe=M.id||(v?`mui-component-select-${v}`:void 0),ke={...e,variant:F,value:L,open:pe,error:f},Ae=gW(ke),je={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(ke):g.slotProps?.paper},Me={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(ke):g.slotProps?.list},Ne=Wi();return(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(pW,{as:`div`,ref:fe,tabIndex:De,role:`combobox`,"aria-controls":pe?Ne:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":pe?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Oe].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":A?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:ye,onMouseDown:u||D?null:he,onBlur:be,onFocus:S,...M,ownerState:ke,className:k(M.className,Ae.select,s),id:Oe,children:sW(xe)?fW||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):xe}),(0,U.jsx)(hW,{"aria-invalid":f,value:Array.isArray(L)?L.join(`,`):L,name:v,ref:R,"aria-hidden":!0,onChange:H,tabIndex:-1,disabled:u,className:Ae.nativeInput,autoFocus:i,required:A,...I,ownerState:ke}),(0,U.jsx)(mW,{as:p,className:Ae.icon,ownerState:ke}),(0,U.jsx)(dW,{value:le,children:(0,U.jsx)(Yz,{id:`menu-${v||``}`,anchorEl:V,open:pe,onClose:ge,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Ne,...Me},paper:{...je,style:{minWidth:Ee,...je==null?null:je.style}}},children:Te})})]})}),vW=Vj((0,U.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function yW(e){return parseInt(e,10)||0}var bW={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function xW(e){for(let t in e)return!1;return!0}function SW(e){return xW(e)||e.outerHeightStyle===0&&!e.overflowing}var CW=P.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=P.useRef(o!=null),l=P.useRef(null),u=nM(t,l),d=P.useRef(null),f=P.useRef(null),p=P.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=qj(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
327
+ `&&(n.value+=` `);let o=a.boxSizing,s=yW(a.paddingBottom)+yW(a.paddingTop),c=yW(a.borderBottomWidth)+yW(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=eM(()=>{let e=l.current,t=p();if(!e||!t||SW(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=P.useCallback(()=>{let e=l.current,t=p();if(!e||!t||SW(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=P.useRef(-1);return ui(()=>{let e=Hj(h),t=l?.current;if(!t)return;let n=qj(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),ui(()=>{h()}),(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
328
+ `),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,U.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...bW.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function wW(e){return Yr(`MuiInputBase`,e)}var TW=Xr(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),EW,DW=`mui-auto-fill`,OW=`mui-auto-fill-cancel`,kW=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${K(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},AW=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},jW=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return A({root:[`root`,`color${K(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${K(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},wW,t)},MW=G(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:kW})(Io(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${TW.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),NW=G(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:AW})(Io(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${TW.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${TW.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:OW,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:DW}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),PW=Po({[`@keyframes ${DW}`]:{from:{animationName:DW}},[`@keyframes ${OW}`]:{from:{animationName:OW}}}),FW=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:A,onKeyUp:M,placeholder:ee,readOnly:N,renderSuffix:te,rows:F,size:I,slotProps:L={},slots:ne={},startAdornment:re,type:ie=`text`,value:R,...ae}=n,z=v.value==null?R:v.value,{current:B}=P.useRef(z!=null),oe=P.useRef(),se=P.useCallback(e=>{},[]),ce=rM(oe,y,v.ref,se),[le,ue]=P.useState(!1),de=XR(),fe=JR({props:n,muiFormControl:de,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});fe.focused=de?de.focused:le,P.useEffect(()=>{!de&&d&&le&&(ue(!1),T&&T())},[de,d,le,T]);let V=de&&de.onFilled,pe=de&&de.onEmpty,me=P.useCallback(e=>{cz(e)?V&&V():pe&&pe()},[V,pe]);Xj(()=>{B&&me({value:z})},[z,me,B]),Xj(()=>{if(!a)return;let e=oe.current;if(!e)return;let t=Kj(e),n=KF(t),r=n==null||n===t.body||n===t.documentElement;e===n?de&&de.onFocus?de.onFocus():ue(!0):r&&e.focus()},[a]);let he=e=>{O&&O(e),v.onFocus&&v.onFocus(e),de&&de.onFocus?de.onFocus(e):ue(!0)},ge=e=>{T&&T(e),v.onBlur&&v.onBlur(e),de&&de.onBlur?de.onBlur(e):ue(!1)},_e=(e,...t)=>{if(!B){let t=e.target||oe.current;if(t==null)throw Error(j(1));me({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};P.useEffect(()=>{me(oe.current)},[]);let H=e=>{oe.current&&e.currentTarget===e.target&&oe.current.focus(),D&&D(e)},ve=_,ye=v;C&&ve===`input`&&(ye=F?{type:void 0,minRows:F,maxRows:F,...ye}:{type:void 0,maxRows:x,minRows:S,...ye},ve=CW);let be=e=>{me(e.animationName===OW?oe.current:{value:`x`})};P.useEffect(()=>{de&&de.setAdornedStart(!!re)},[de,re]);let xe={...n,color:fe.color||`primary`,disabled:fe.disabled,endAdornment:p,error:fe.error,focused:fe.focused,formControl:de,fullWidth:h,hiddenLabel:fe.hiddenLabel,multiline:C,size:fe.size,startAdornment:re,type:ie},Se=jW(xe),Ce=ne.root||c.Root||MW,we=L.root||l.root||{},Te=ne.input||c.Input||NW;return ye={...ye,...L.input??l.input},(0,U.jsxs)(P.Fragment,{children:[!f&&typeof PW==`function`&&(EW||=(0,U.jsx)(PW,{})),(0,U.jsxs)(Ce,{...we,ref:t,onClick:H,...ae,...!CF(Ce)&&{ownerState:{...xe,...we.ownerState}},className:k(Se.root,we.className,o,N&&`MuiInputBase-readOnly`),children:[re,(0,U.jsx)(YR.Provider,{value:null,children:(0,U.jsx)(Te,{"aria-invalid":fe.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:fe.disabled,id:g,onAnimationStart:be,name:w,placeholder:ee,readOnly:N,required:fe.required,rows:F,value:z,onKeyDown:A,onKeyUp:M,type:ie,...ye,...!CF(Te)&&{as:ve,ownerState:{...xe,...ye.ownerState}},ref:ce,className:k(Se.input,ye.className,N&&`MuiInputBase-readOnly`),onBlur:ge,onChange:_e,onFocus:he})}),p,te?te({...fe,startAdornment:re}):null]})]})});function IW(e){return Yr(`MuiInput`,e)}var LW={...TW,...Xr(`MuiInput`,[`root`,`underline`,`input`])},RW=e=>{let{classes:t,disableUnderline:n}=e,r=A({root:[`root`,!n&&`underline`],input:[`input`]},IW,t);return{...t,...r}},zW=G(MW,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...kW(e,t),!n.disableUnderline&&t.underline]}})(Io(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${LW.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${LW.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${LW.disabled}, .${LW.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${LW.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),BW=G(NW,{name:`MuiInput`,slot:`Input`,overridesResolver:AW})({}),VW=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=RW(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?L(l??a,m):m;return(0,U.jsx)(FW,{slots:{root:u.root??i.Root??zW,input:u.input??i.Input??BW},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});VW.muiName=`Input`;function HW(e){return Yr(`MuiFilledInput`,e)}var UW={...TW,...Xr(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},WW=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=A({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${K(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},HW,t);return{...t,...c}},GW=G(MW,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...kW(e,t),!n.disableUnderline&&t.underline]}})(Io(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${UW.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${UW.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${UW.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${UW.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${UW.disabled}, .${UW.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${UW.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),KW=G(NW,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:AW})(Io(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),qW=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=WW(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?L(g,u??a):g;return(0,U.jsx)(FW,{slots:{root:d.root??i.Root??GW,input:d.input??i.Input??KW},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});qW.muiName=`Input`;var JW,YW=G(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:No})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),XW=G(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:No})(Io(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function ZW(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,U.jsx)(YW,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,U.jsx)(XW,{ownerState:c,children:s?(0,U.jsx)(`span`,{children:i}):JW||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`})})})}function QW(e){return Yr(`MuiOutlinedInput`,e)}var $W={...TW,...Xr(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])},eG=e=>{let{classes:t}=e,n=A({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},QW,t);return{...t,...n}},tG=G(MW,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:kW})(Io(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${$W.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${$W.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${$W.focused} .${$W.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{[`&.${$W.focused} .${$W.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${$W.error} .${$W.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${$W.disabled} .${$W.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),nG=G(ZW,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Io(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),rG=G(NW,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:AW})(Io(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),iG=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=eG(n),m=XR(),h=JR({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??tG,v=l.input??r.Input??rG,[y,b]=lI(`notchedOutline`,{elementType:nG,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,U.jsxs)(P.Fragment,{children:[o,` `,`*`]}):o}});return(0,U.jsx)(FW,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,U.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});iG.muiName=`Input`;var aG=e=>{let{classes:t}=e,n=A({root:[`root`]},iW,t);return{...t,...n}},oG={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>No(e)&&e!==`variant`},sG=G(VW,oG)(``),cG=G(iG,oG)(``),lG=G(qW,oG)(``),uG=P.forwardRef(function(e,t){let n=Lo({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=vW,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?rW:_W,E=JR({props:n,muiFormControl:XR(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},A=aG(O),{root:j,...M}=A,ee=d||{standard:(0,U.jsx)(sG,{ownerState:O}),outlined:(0,U.jsx)(cG,{label:p,ownerState:O}),filled:(0,U.jsx)(lG,{ownerState:O})}[D],N=rM(t,wF(ee));return(0,U.jsx)(P.Fragment,{children:P.cloneElement(ee,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?L(M,f.classes):M,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:N,className:k(ee.props.className,o,A.root),...!d&&{variant:D},...w})})});uG.muiName=`Select`;function dG(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var fG=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},pG=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=A({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},JU,o);return{...o,...s}},mG=G(iN,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:fG})(Io(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${YU.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${YU.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${YU.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${YU.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${YU.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${GU.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${GU.inset}`]:{marginLeft:52},[`& .${qU.root}`]:{marginTop:0,marginBottom:0},[`& .${qU.inset}`]:{paddingLeft:36},[`& .${KU.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${KU.root} svg`]:{fontSize:`1.25rem`}}}]}))),hG=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=uW(),m=P.useContext(jz),h=P.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=P.useRef(null);Xj(()=>{r&&g.current&&dG(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=pG(n),y=rM(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,U.jsx)(jz.Provider,{value:h,children:(0,U.jsx)(mG,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:k(v.focusVisible,c),className:k(v.root,d),...f,ownerState:_,classes:x})})}),gG=()=>{document.querySelectorAll(`.mq-supsub.mq-sup-only`).forEach(e=>{let t=e.previousElementSibling;t&&t.classList.contains(`mq-non-leaf`)&&t.querySelector(`.mq-fraction`)?e.classList.add(`mq-after-fraction-group`):e.classList.remove(`mq-after-fraction-group`)})},{commonMqFontStyles:_G,commonMqKeyboardStyles:vG,longdivStyles:yG,supsubStyles:bG}=qH,xG=D(`@pie-lib:math-toolbar:editor-and-pad`),SG=/\.|,/g,CG=G(`div`)(({theme:e})=>({zIndex:9,position:`relative`,textAlign:`center`,width:`auto`,"& > .mq-math-mode":{border:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`dotted 1px ${e.palette.primary.main}`,borderRadius:`0px`},"& .mq-overarrow-inner":{border:`none !important`,paddingTop:`0 !important`},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.8px`,marginTop:`0px`,minWidth:`1.23em`},"& .mq-parallelogram":{lineHeight:.85}})),wG=G(`div`)(({theme:e,hide:t})=>({display:t?`none`:`flex`,alignItems:`center`,"& .mq-editable-field .mq-cursor":{top:`-4px`},"& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection":{paddingTop:`18px`},"& .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& .mq-math-mode .mq-overline .mq-overline-inner":{paddingTop:`0.4em !important`},"& .mq-overarrow.mq-arrow-both":{minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.45em`,left:`-1px`},"&:after":{position:`absolute !important`,top:`0px !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& *":{..._G,...bG,...yG,"& .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-root-block":{paddingTop:`10px`},"& .mq-scaled .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`4px !important`,paddingTop:`6px !important`,paddingLeft:`6px !important`},"& .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`}},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),TG=G(pz)({flex:`initial`,width:`25%`,minWidth:`100px`,marginLeft:`15px`,marginTop:`5px`,marginBottom:`5px`,marginRight:`5px`,"& label":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& div":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}),EG=G(oz)(()=>({backgroundColor:`transparent`})),DG=G(`div`)(({theme:e,error:t})=>({minWidth:`500px`,maxWidth:`900px`,minHeight:`30px`,width:`100%`,display:`flex`,marginTop:e.spacing(1),marginBottom:e.spacing(1),...t&&{border:`2px solid red`},"& .mq-sqrt-prefix .mq-scaled":{verticalAlign:`middle !important`}})),OG=G(xU)(({controlledKeypadMode:e})=>({maxWidth:e?`400px`:`500px`,color:KI(),backgroundColor:pL(),padding:`2px`})),kG=G(PR)({position:`absolute`,right:`12px`,border:`1px solid lightgrey`,color:KI()}),AG=G(`hr`)(({theme:e})=>({padding:0,margin:0,height:`1px`,border:`none`,borderBottom:`solid 1px ${e.palette.primary.main}`})),jG=G(hU)(({mode:e})=>({...vG,...e===`language`&&{"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),MG=e=>{if(!e)return;let{type:t,value:n}=e;return t===`command`||t===`cursor`?e:t===`answer`?{type:`answer`,...e}:n===`clear`?{type:`clear`}:{type:`write`,value:n}},NG=class extends P.Component{static propTypes={classNames:p.object,keypadMode:p.oneOfType([p.string,p.number]),autoFocus:p.bool,allowAnswerBlock:p.bool,showKeypad:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,error:p.string,noDecimal:p.bool,hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,maxResponseAreas:p.number,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onFocus:p.func,onBlur:p.func,onChange:p.func.isRequired,setKeypadInteraction:p.func};constructor(e){super(e),this.state={equationEditor:`item-authoring`,addDisabled:!1}}componentDidMount(){this.input&&this.props.autoFocus&&this.input.focus()}onClick=e=>{let{noDecimal:t,noLatexHandling:n,onChange:r}=this.props,i=MG(e);if(xG(`mathChange: `,i),n){r(i.value);return}t&&(i.value===`.`||i.value===`,`)||i&&(i.type===`clear`?(xG(`call clear...`),this.input.clear()):i.type===`command`?this.input.command(i.value):i.type===`cursor`?this.input.keystroke(i.value):i.type===`answer`?this.input.write(`%response%`):this.input.write(i.value))};updateDisable=e=>{let{maxResponseAreas:t}=this.props;if(t){let n=this.checkResponseAreasNumber(t,e);this.setState({addDisabled:n})}};onAnswerBlockClick=()=>{this.props.onAnswerBlockAdd(),this.onClick({type:`answer`}),this.updateDisable(!0)};onEditorChange=e=>{let{onChange:t,noDecimal:n}=this.props;if(wH(),gG(),this.updateDisable(!0),n&&(e.indexOf(`.`)!==-1||e.indexOf(`,`)!==-1)&&this.input){this.input.clear(),this.input.write(e.replace(SG,``));return}let r=e.match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.input&&r&&r?.length){try{this.input.mathField.__controller.cursor.insLeftOf(this.input.mathField.__controller.cursor.parent[-1].parent),this.input.mathField.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}return}t(e)};shouldComponentUpdate(e,t){let n=this.input.mathField.latex()!==e.latex;return xG(`[shouldComponentUpdate] `,`inputIsDifferent: `,n),!C(this.props.error,e.error)||!n&&this.props.keypadMode!==e.keypadMode||!n&&this.props.noDecimal!==e.noDecimal||!n&&this.state.equationEditor!==t.equationEditor?!0:!n&&this.props.controlledKeypad?this.props.showKeypad!==e.showKeypad:n}onEditorTypeChange=e=>{this.setState({equationEditor:e.target.value})};checkResponseAreasNumber=(e,t)=>{let{latex:n}=this.input&&this.input.props||{};if(n){let r=(n.match(/answerBlock/g)||[]).length;return t?r===e-1:r===e}return!1};render(){let{classNames:e,keypadMode:t,allowAnswerBlock:n,additionalKeys:r,controlledKeypad:i,controlledKeypadMode:a,showKeypad:o,setKeypadInteraction:s,noDecimal:c,hideInput:l,layoutForKeyPad:u,latex:d,onFocus:f,onBlur:p,error:m}=this.props,h=!i||i&&o,{addDisabled:g}=this.state;return xG(`[render]`,d),(0,U.jsxs)(CG,{className:e.mathToolbar,children:[(0,U.jsxs)(wG,{hide:l,children:[a&&(0,U.jsxs)(TG,{variant:`standard`,children:[(0,U.jsx)(EG,{id:`equation-editor-label`,children:`Equation Editor`}),(0,U.jsxs)(uG,{labelId:`equation-editor-label`,id:`equation-editor-select`,name:`equationEditor`,label:`Equation Editor`,onChange:this.onEditorTypeChange,value:this.state.equationEditor,MenuProps:{transitionDuration:{enter:225,exit:195}},children:[(0,U.jsx)(hG,{value:`non-negative-integers`,children:`Numeric - Non-Negative Integers`}),(0,U.jsx)(hG,{value:`integers`,children:`Numeric - Integers`}),(0,U.jsx)(hG,{value:`decimals`,children:`Numeric - Decimals`}),(0,U.jsx)(hG,{value:`fractions`,children:`Numeric - Fractions`}),(0,U.jsx)(hG,{value:1,children:`Grade 1 - 2`}),(0,U.jsx)(hG,{value:3,children:`Grade 3 - 5`}),(0,U.jsx)(hG,{value:6,children:`Grade 6 - 7`}),(0,U.jsx)(hG,{value:8,children:`Grade 8 - HS`}),(0,U.jsx)(hG,{value:`geometry`,children:`Geometry`}),(0,U.jsx)(hG,{value:`advanced-algebra`,children:`Advanced Algebra`}),(0,U.jsx)(hG,{value:`statistics`,children:`Statistics`}),(0,U.jsx)(hG,{value:`item-authoring`,children:`Item Authoring`})]})]}),(0,U.jsx)(DG,{error:m,children:(0,U.jsx)(OG,{onFocus:()=>{f&&f(),this.updateDisable(!1)},onBlur:e=>{this.updateDisable(!1),p&&p(e)},className:e&&e.editor||``,controlledKeypadMode:a,ref:e=>this.input=e,latex:d,onChange:this.onEditorChange})})]}),n&&(0,U.jsx)(kG,{type:`primary`,style:{bottom:h?`320px`:`20px`},onClick:this.onAnswerBlockClick,disabled:g,children:`+ Response Area`}),(0,U.jsx)(AG,{}),h&&(0,U.jsx)(jG,{mode:a?this.state.equationEditor:t,controlledKeypadMode:a,layoutForKeyPad:u,additionalKeys:r,onClick:this.onClick,noDecimal:c,setKeypadInteraction:s})]})}},PG=G(CN)(({theme:e,hideBackground:t})=>({verticalAlign:`top`,width:`28px`,height:`28px`,color:`#00bb00`,...t&&{backgroundColor:e.palette.common.white,"&:hover":{backgroundColor:e.palette.grey[200]}},"& .MuiIconButton-label":{position:`absolute`,top:`2px`}})),FG=({onClick:e,hideBackground:t})=>(0,U.jsx)(PG,{"aria-label":`Done`,onClick:e,hideBackground:t,size:`large`,children:(0,U.jsx)(EN,{})});FG.propTypes={onClick:p.func,hideBackground:p.bool};var IG=FG,{commonMqFontStyles:LG,longdivStyles:RG,supsubStyles:zG}=qH,BG=D(`@pie-lib:math-toolbar:math-preview`),VG=G(`div`)(({theme:e,isSelected:t})=>({display:`inline-flex`,alignItems:`center`,position:`relative`,"& *":LG,...zG,...RG,"& > .mq-math-mode":{border:t?`solid 0px lightgrey`:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`solid 1px black`,borderRadius:`0px`},"& > .mq-math-mode .mq-root-block":{paddingTop:`7px !important`},"& > .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& > .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& > .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& > .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty":{paddingTop:`6px !important`,paddingLeft:`4px !important`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`0 !important`},"& > .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& > .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-editable-field .mq-cursor":{marginTop:`-15px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.5px`,marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},...t&&{border:`solid 1px ${e.palette.primary.main}`}})),HG=G(`span`)({position:`absolute`,bottom:0,left:0,right:0,top:0}),UG=class extends P.Component{static propTypes={latex:p.string,isSelected:p.bool,onFocus:p.func,onBlur:p.func};componentDidMount(){gG()}componentDidUpdate(e){this.props.latex!==e.latex&&gG()}render(){let{isSelected:e,onFocus:t,onBlur:n,latex:r}=this.props;return BG(`[render] latex: `,r),(0,U.jsxs)(VG,{isSelected:e,children:[` `,(0,U.jsx)(HG,{}),(0,U.jsx)(OU,{latex:r,onFocus:t,onBlur:n})]})}},WG=G(`div`)({display:`flex`,width:`100%`,zIndex:8,alignItems:`center`}),GG=class extends P.Component{static propTypes={autoFocus:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,keypadMode:p.oneOfType([p.string,p.number]),classNames:p.object,error:p.string,maxResponseAreas:p.number,showKeypad:p.bool,noDecimal:p.bool,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onChange:p.func,onDone:p.func.isRequired,onFocus:p.func,onBlur:p.func,hideDoneButton:p.bool,keyPadCharacterRef:p.func,setKeypadInteraction:p.func};static defaultProps={classNames:{},keypadMode:`item-authoring`,autoFocus:!1,allowAnswerBlock:!1,controlledKeypad:!1,controlledKeypadMode:!1,noDecimal:!1,showKeypad:!0,additionalKeys:[],onChange:()=>{},onAnswerBlockAdd:()=>{},onFocus:()=>{},hideDoneButton:!1};constructor(e){super(e),this.state={latex:e.latex}}done=()=>{this.props.onDone(this.state.latex)};UNSAFE_componentWillReceiveProps(e){this.setState({latex:e.latex})}onChange=e=>{this.setState({latex:e}),this.props.onChange(e)};render(){let{latex:e}=this.state,{classNames:t,autoFocus:n,allowAnswerBlock:r,onAnswerBlockAdd:i,controlledKeypad:a,controlledKeypadMode:o,keypadMode:s,noDecimal:c,additionalKeys:l,showKeypad:u,onFocus:d,onBlur:f,hideDoneButton:p,error:m,keyPadCharacterRef:h,setKeypadInteraction:g,maxResponseAreas:_}=this.props;return(0,U.jsx)(KG,{autoFocus:n,classNames:t,onAnswerBlockAdd:i,allowAnswerBlock:r,latex:e,additionalKeys:l,noDecimal:c,keypadMode:s,keyPadCharacterRef:h,setKeypadInteraction:g,onChange:this.onChange,onDone:this.done,onFocus:d,onBlur:f,showKeypad:u,controlledKeypad:a,controlledKeypadMode:o,hideDoneButton:p,error:m,maxResponseAreas:_})}},KG=class extends P.Component{static propTypes={classNames:p.object,latex:p.string.isRequired,keypadMode:p.oneOfType([p.string,p.number]),hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,onChange:p.func.isRequired,onDone:p.func.isRequired,onBlur:p.func,onAnswerBlockAdd:p.func,additionalKeys:p.array,onFocus:p.func,autoFocus:p.bool,noDecimal:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,showKeypad:p.bool,hideDoneButton:p.bool,hideDoneButtonBackground:p.bool,error:p.any,maxResponseAreas:p.number,keyPadCharacterRef:p.object,setKeypadInteraction:p.func};static defaultProps={classNames:{},hideDoneButtonBackground:!1};render(){let{classNames:e,autoFocus:t,allowAnswerBlock:n,onAnswerBlockAdd:r,controlledKeypad:i,controlledKeypadMode:a,additionalKeys:o,showKeypad:s,keypadMode:c,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,keyPadCharacterRef:p,setKeypadInteraction:m,latex:h,onChange:g,onDone:_,onFocus:v,onBlur:y,hideDoneButton:b,hideDoneButtonBackground:x,error:S,maxResponseAreas:C}=this.props;return(0,U.jsxs)(WG,{className:e&&e.toolbar||``,ref:p,children:[(0,U.jsx)(`div`,{}),(0,U.jsx)(NG,{autoFocus:t,keypadMode:c,classNames:e||{},controlledKeypad:i,controlledKeypadMode:a,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,showKeypad:s,additionalKeys:o,allowAnswerBlock:n,onAnswerBlockAdd:r,latex:h,onChange:g,onFocus:v,onBlur:y,error:S,maxResponseAreas:C,setKeypadInteraction:m}),(!i||i&&s)&&!b&&(0,U.jsx)(IG,{hideBackground:x,onClick:_})]})}},qG=new du(`ensureTextAfterMath`),JG=(e=[])=>e.map(e=>({name:e,latex:e,write:e,label:e})),YG=e=>new cu({key:qG,appendTransaction:(t,n,r)=>{if(!t.some(e=>e.docChanged))return null;let i=r.tr,a=!1;return r.doc.descendants((t,n)=>{if(t.type.name===e){let e=n+t.nodeSize,o=r.doc.nodeAt(e);(!o||o.type.name!==`text`)&&(i.insert(e,r.schema.text(`​`)),a=!0)}}),a?i:null}}),XG=new cu({key:new du(`zeroWidthSpaceHandling`),props:{handleKeyDown(e,t){let{state:n,dispatch:r}=e,{selection:i,doc:a}=n,{from:o,empty:s}=i;if(s&&t.key===`Backspace`&&o>0&&a.textBetween(o-1,o,``,``)===`​`)return r(n.tr.delete(o-2,o)),!0;if(s&&t.key===`ArrowLeft`&&o>0&&a.textBetween(o-1,o,``,``)===`​`){let e=o-1,t=n.doc.resolve(e-1),i=t.nodeAfter||t.nodeBefore;if(i){let t=e-i.nodeSize,a=n.doc.resolve(t);return r(n.tr.setSelection(Q.create(n.doc,a.pos))),!0}else return r(n.tr.setSelection(Z.create(n.doc,o-2))),!0}return!1}}}),ZG=uy.create({name:`math`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{latex:{default:``},wrapper:{default:null},html:{default:null}}},addProseMirrorPlugins(){return[YG(this.name),XG]},parseHTML(){return[{tag:`span[data-latex]`,getAttrs:e=>({latex:e.getAttribute(`data-raw`)||e.textContent})},{tag:`span[data-type="mathml"]`,getAttrs:e=>({html:e.innerHTML})}]},addCommands(){return{insertMath:(e=``)=>({tr:t,editor:n,dispatch:r})=>{let{state:i}=n.view,a=i.schema.nodes.math.create({latex:e}),{selection:o}=i,s=o.$from.pos;if(t.insert(s,a),a?.type?.name===this.name){let e=Q.create(t.doc,o.$from.pos);t.setSelection(e)}return r(t),!0}}},renderHTML({HTMLAttributes:e}){return e.html?[`span`,{"data-type":`mathml`,dangerouslySetInnerHTML:{__html:e.html}}]:[`span`,{"data-latex":``,"data-raw":e.latex},yR(e.latex,e.wrapper)]},addNodeView(){return zb(e=>(0,U.jsx)(QG,{...e,options:this.options}))}}),QG=e=>{let{node:t,updateAttributes:n,editor:r,selected:i,options:a}=e,[o,s]=(0,P.useState)(i),c=(0,P.useRef)(null),[l,u]=(0,P.useState)({top:0,left:0}),{math:d={}}=a||{},{keypadMode:f,controlledKeypadMode:p=!0,customKeys:m=[],keyPadCharacterRef:h,setKeypadInteraction:g}=d,_=t.attrs.latex||``,v=e=>{n({latex:e})},y=e=>{n({latex:e}),s(!1),r._toolbarOpened=!1;let{selection:t,tr:i,doc:a}=r.state,o=Z.create(a,t.from+1);i.setSelection(o),r.view.dispatch(i),r.commands.focus()};return(0,P.useEffect)(()=>{i&&s(!0)},[i]),(0,P.useEffect)(()=>{r._toolbarOpened=!!o},[o]),(0,P.useEffect)(()=>{let{from:e}=r.state.selection;u({top:40,left:r.view.coordsAtPos(e).left});let n=e=>{let n=e?.target,r=(document.querySelectorAll?.(`[id^="equation-editor-select"][id*="listbox"], [aria-labelledby="equation-editor-label"][role="listbox"]`)||[]).length>0,i=!!(n?.id&&n.id.includes(`equation-editor-select`))||!!n?.closest?.(`[id*="equation-editor-select"]`),a=!!n?.closest?.(`.math-node`);c.current&&!c.current.contains(n)&&!n?.closest?.(`[data-inline-node]`)&&!r&&!i&&!a&&(s(!1),y(t.attrs.latex))};return o?document.addEventListener(`click`,n):document.removeEventListener(`click`,n),()=>document.removeEventListener(`click`,n)},[r,o]),(0,U.jsxs)(jb,{className:`math-node`,style:{display:`inline-flex`,cursor:`pointer`,margin:`0 4px`},"data-selected":i,children:[(0,U.jsx)(`div`,{onClick:()=>s(!0),contentEditable:!1,children:(0,U.jsx)(UG,{latex:_})}),o&&db.createPortal((0,U.jsx)(`div`,{ref:c,"data-toolbar-for":r.instanceId,style:{position:`absolute`,top:`${l.top}px`,left:`${l.left}px`,zIndex:20,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`},children:(0,U.jsx)(GG,{latex:_,autoFocus:!0,onChange:v,onDone:y,keypadMode:f,controlledKeypadMode:p,additionalKeys:JG(m),keyPadCharacterRef:h,setKeypadInteraction:g})}),r?._tiptapContainerEl||document.body)]})};function $G(e){return Yr(`MuiLinearProgress`,e)}Xr(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var eK=4,tK=lr`
329
329
  0% {
330
330
  left: -35%;
331
331
  right: 100%;
@@ -340,9 +340,9 @@ mid `,`&#8740;`),w.intercal=w[`⊺`]=r(B,`\\intercal `,`&#8890;`),w.veebar=w[`
340
340
  left: 100%;
341
341
  right: -90%;
342
342
  }
343
- `,eK=typeof $G==`string`?null:cr`
344
- animation: ${$G} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
345
- `,tK=lr`
343
+ `,nK=typeof tK==`string`?null:cr`
344
+ animation: ${tK} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
345
+ `,rK=lr`
346
346
  0% {
347
347
  left: -200%;
348
348
  right: 100%;
@@ -357,9 +357,9 @@ mid `,`&#8740;`),w.intercal=w[`⊺`]=r(B,`\\intercal `,`&#8890;`),w.veebar=w[`
357
357
  left: 107%;
358
358
  right: -8%;
359
359
  }
360
- `,nK=typeof tK==`string`?null:cr`
361
- animation: ${tK} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
362
- `,rK=lr`
360
+ `,iK=typeof rK==`string`?null:cr`
361
+ animation: ${rK} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
362
+ `,aK=lr`
363
363
  0% {
364
364
  opacity: 1;
365
365
  background-position: 0 -23px;
@@ -374,20 +374,20 @@ mid `,`&#8740;`),w.intercal=w[`⊺`]=r(B,`\\intercal `,`&#8890;`),w.veebar=w[`
374
374
  opacity: 1;
375
375
  background-position: -200px -23px;
376
376
  }
377
- `,iK=typeof rK==`string`?null:cr`
378
- animation: ${rK} 3s infinite linear;
379
- `,aK=e=>{let{classes:t,variant:n,color:r}=e;return A({root:[`root`,`color${K(r)}`,n],dashed:[`dashed`,`dashedColor${K(r)}`],bar1:[`bar`,`bar1`,`barColor${K(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${K(r)}`,n===`buffer`&&`color${K(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},ZG,t)},oK=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),sK=G(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${K(n.color)}`],t[n.variant]]}})(Io(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{backgroundColor:oK(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),cK=G(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${K(n.color)}`]]}})(Io(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>{let n=oK(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),iK||{animation:`${rK} 3s infinite linear`}),lK=G(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${K(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(Io(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${QG}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${QG}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:eK||{animation:`${$G} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),uK=G(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${K(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(Io(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:oK(e,t),transition:`transform .${QG}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:nK||{animation:`${tK} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),dK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,value:a,valueBuffer:o,variant:s=`indeterminate`,...c}=n,l={...n,color:i,variant:s},u=aK(l),d=Ii(),f={},p={bar1:{},bar2:{}};if((s===`determinate`||s===`buffer`)&&a!==void 0){f[`aria-valuenow`]=Math.round(a),f[`aria-valuemin`]=0,f[`aria-valuemax`]=100;let e=a-100;d&&(e=-e),p.bar1.transform=`translateX(${e}%)`}if(s===`buffer`&&o!==void 0){let e=(o||0)-100;d&&(e=-e),p.bar2.transform=`translateX(${e}%)`}return(0,U.jsxs)(sK,{className:k(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,U.jsx)(cK,{className:u.dashed,ownerState:l}):null,(0,U.jsx)(lK,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,U.jsx)(uK,{className:u.bar2,ownerState:l,style:p.bar2})]})}),fK=D(`@pie-lib:editable-html:image:insert-image-handler`),pK=class{constructor(e,t,n,r=!1){this.editor=e,this.nodeInfo=t,this.node=t[0],this.nodePos=t[1],this.onFinish=n,this.isPasted=r,this.chosenFile=null}cancel(){fK(`insert cancelled`);try{this.deleteNode(),this.onFinish(!1)}catch{}finally{this.editor._insertingImage=!1}}updateNode(e){let{state:t,view:n}=this.editor,{tr:r}=t,i=t.doc.nodeAt(this.nodePos);if(i){let t=r.setNodeMarkup(this.nodePos,void 0,{...i.attrs,...e});n.dispatch(t)}}deleteNode(){let{state:e,view:t}=this.editor,{tr:n}=e,r=n.delete(this.nodePos,this.nodePos+this.node.nodeSize);t.dispatch(r)}done(e,t){fK(`done: err:`,e),e?(console.log(e),this.onFinish(!1)):(this.updateNode({loaded:!0,src:t,percent:100}),this.onFinish(!0)),this.editor._insertingImage=!1}fileChosen(e){if(!e)return;this.chosenFile=e,this.editor._insertingImage=!1,fK(`[fileChosen] file: `,e);let t=new FileReader;t.onload=()=>{let e=t.result;this.updateNode({src:e})},t.readAsDataURL(e)}progress(e,t,n){fK(`progress: `,e,t,n),this.updateNode({percent:e})}getChosenFile(){return this.chosenFile}};function mK(e){return Yr(`MuiDialogContent`,e)}Xr(`MuiDialogContent`,[`root`,`dividers`]);function hK(e){return Yr(`MuiDialogTitle`,e)}var gK=Xr(`MuiDialogTitle`,[`root`]),_K=e=>{let{classes:t,dividers:n}=e;return A({root:[`root`,n&&`dividers`]},mK,t)},vK=G(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Io(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${gK.root} + &`]:{paddingTop:0}}}]}))),yK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i};return(0,U.jsx)(vK,{className:k(_K(o).root,r),ownerState:o,ref:t,...a})}),bK=Vj((0,U.jsx)(`path`,{d:`M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z`}),`ArrowBackIos`);function xK(e){return Yr(`MuiFormHelperText`,e)}var SK=Xr(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),CK,wK=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return A({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${K(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},xK,t)},TK=G(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${K(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Io(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${SK.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${SK.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),EK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,m=KR({props:n,muiFormControl:JR(),states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};return delete h.ownerState,(0,U.jsx)(TK,{as:a,className:k(wK(h).root,i),ref:t,...p,ownerState:h,children:r===` `?CK||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):r})});function DK(e){return Yr(`MuiTextField`,e)}Xr(`MuiTextField`,[`root`]);var OK={standard:zW,filled:GW,outlined:nG},kK=e=>{let{classes:t}=e;return A({root:[`root`]},DK,t)},AK=G(dz,{name:`MuiTextField`,slot:`Root`})({}),jK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:h,inputProps:g,InputProps:_,inputRef:v,label:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onFocus:E,placeholder:D,required:O=!1,rows:A,select:j=!1,SelectProps:M,slots:ee={},slotProps:N={},type:P,value:te,variant:F=`outlined`,...I}=n,L={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:S,required:O,select:j,variant:F},ne=kK(L),re=Wi(m),ie=p&&re?`${re}-helper-text`:void 0,R=y&&re?`${re}-label`:void 0,ae=OK[F],z={slots:ee,slotProps:{input:_,inputLabel:h,htmlInput:g,formHelperText:d,select:M,...N}},B={},oe=z.slotProps.inputLabel;F===`outlined`&&(oe&&oe.shrink!==void 0&&(B.notched=oe.shrink),B.label=y),j&&((!M||!M.native)&&(B.id=void 0),B[`aria-describedby`]=void 0);let[se,ce]=lI(`root`,{elementType:AK,shouldForwardComponentProp:!0,externalForwardedProps:{...z,...I},ownerState:L,className:k(ne.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:F}}),[le,ue]=lI(`input`,{elementType:ae,externalForwardedProps:z,additionalProps:B,ownerState:L}),[de,fe]=lI(`inputLabel`,{elementType:iz,externalForwardedProps:z,ownerState:L}),[V,pe]=lI(`htmlInput`,{elementType:`input`,externalForwardedProps:z,ownerState:L}),[me,he]=lI(`formHelperText`,{elementType:EK,externalForwardedProps:z,ownerState:L}),[ge,_e]=lI(`select`,{elementType:cG,externalForwardedProps:z,ownerState:L}),H=(0,U.jsx)(le,{"aria-describedby":ie,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:S,name:C,rows:A,maxRows:b,minRows:x,type:P,value:te,id:re,inputRef:v,onBlur:w,onChange:T,onFocus:E,placeholder:D,inputProps:pe,slots:{input:ee.htmlInput?V:void 0},...ue});return(0,U.jsxs)(se,{...ce,children:[y!=null&&y!==``&&(0,U.jsx)(de,{htmlFor:re,id:R,...fe,children:y}),j?(0,U.jsx)(ge,{"aria-describedby":ie,id:re,labelId:R,value:te,input:H,..._e,children:a}):H,p&&(0,U.jsx)(me,{id:ie,...he,children:p})]})});function MK(e){return Yr(`MuiDialogActions`,e)}Xr(`MuiDialogActions`,[`root`,`spacing`]);var NK=e=>{let{classes:t,disableSpacing:n}=e;return A({root:[`root`,!n&&`spacing`]},MK,t)},PK=G(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),FK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i};return(0,U.jsx)(PK,{className:k(NK(o).root,r),ownerState:o,ref:t,...a})});function IK(e){return Yr(`MuiDialog`,e)}var LK=Xr(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),RK=P.createContext({}),zK=G(gI,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),BK=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return A({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${K(n)}`],paper:[`paper`,`paperScroll${K(n)}`,`paperWidth${K(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},IK,t)},VK=G(EI,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),HK=G(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${K(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),UK=G(AI,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${K(n.scroll)}`],t[`paperWidth${K(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Io(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${LK.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${LK.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0,[`&.${LK.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),WK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialog`}),r=Ao(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,BackdropComponent:c,BackdropProps:l,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:m=!1,maxWidth:h=`sm`,onClick:g,onClose:_,open:v,PaperComponent:y=AI,PaperProps:b={},role:x=`dialog`,scroll:S=`paper`,slots:C={},slotProps:w={},TransitionComponent:T=fI,transitionDuration:E=i,TransitionProps:D,...O}=n,A={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:S},j=BK(A),M=P.useRef(),ee=e=>{M.current=e.target===e.currentTarget},N=e=>{g&&g(e),M.current&&(M.current=null,_&&_(e,`backdropClick`))},te=Wi(o),F=P.useMemo(()=>({titleId:te}),[te]),I={slots:{transition:T,...C},slotProps:{transition:D,paper:b,backdrop:l,...w}},[L,ne]=lI(`root`,{elementType:VK,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:A,className:k(j.root,d),ref:t}),[re,ie]=lI(`backdrop`,{elementType:zK,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:A,className:j.backdrop}),[R,ae]=lI(`paper`,{elementType:UK,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:A,className:j.paper,additionalProps:{elevation:24,role:x,"aria-describedby":a,"aria-labelledby":te,"aria-modal":s,tabIndex:-1,[qF]:``}}),[z,B]=lI(`container`,{elementType:HK,externalForwardedProps:I,ownerState:A,className:j.container}),[oe,se]=lI(`transition`,{elementType:fI,externalForwardedProps:I,ownerState:A,additionalProps:{appear:!0,in:v,timeout:E,role:`presentation`}});return(0,U.jsx)(L,{closeAfterTransition:!0,slots:{backdrop:re},slotProps:{backdrop:{transitionDuration:E,as:c,...ie}},disableEscapeKeyDown:f,onClose:_,open:v,onClick:N,...ne,...O,children:(0,U.jsx)(oe,{...se,children:(0,U.jsx)(z,{onMouseDown:ee,...B,children:(0,U.jsx)(R,{as:y,...ae,children:(0,U.jsx)(RK.Provider,{value:F,children:u})})})})})}),GK=class extends P.Component{static propTypes={onDone:p.func.isRequired,alt:p.string};constructor(e){super(e);let{alt:t}=e;this.state={value:t}}closeDialog=()=>{document.querySelectorAll(`#text-dialog`).forEach(function(e){return e.remove()})};onDone=()=>{let{onDone:e}=this.props,{value:t}=this.state;e(t),this.closeDialog()};handleOverflow=()=>{document.body.style.removeProperty(`overflow`)};render(){let{value:e}=this.state;return(0,U.jsxs)(WK,{open:!0,disablePortal:!0,onClose:this.closeDialog,id:`text-dialog`,hideBackdrop:!0,disableScrollLock:!0,onEntered:this.handleOverflow,children:[(0,U.jsx)(yK,{children:(0,U.jsxs)(`div`,{style:{display:`flex`},children:[(0,U.jsx)(bK,{style:{paddingTop:`6px`}}),(0,U.jsx)(jK,{multiline:!0,placeholder:`Enter an Alt Text description of this image`,helperText:`Users with visual limitations rely on Alt Text, since screen readers cannot otherwise describe the contents of an image.`,value:e,onChange:e=>this.setState({value:e.target.value}),FormHelperTextProps:{style:{fontSize:14}}})]})}),(0,U.jsx)(FK,{children:(0,U.jsx)(MR,{onClick:this.onDone,children:`Done`})})]})}},KK=G(`button`,{shouldForwardProp:e=>![`active`,`disabled`,`extraStyles`].includes(e)})(({theme:e,active:t,disabled:n})=>({color:t?`black`:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:n?`not-allowed`:`pointer`,"&:hover":{color:n?`grey`:`black`},"&:focus":{outline:`2px solid ${e.palette.grey[700]}`},...n&&{opacity:.7}})),qK=D(`pie-elements:editable-html:raw-button`);(class extends P.Component{static propTypes={onClick:p.func.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool,disabled:p.bool,extraStyles:p.object};constructor(e){super(e)}onClick=e=>{qK(`[onClick]`),e.preventDefault();let{onClick:t}=this.props;t(e)};onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){qK(`[onKeyDown]`),e.preventDefault();let{onClick:t}=this.props;t(e)}};render(){let{active:e,children:t,disabled:n,extraStyles:r,ariaLabel:i}=this.props;return(0,U.jsx)(KK,{style:r,active:e,disabled:n,onMouseDown:this.onClick,onKeyDown:this.onKeyDown,"aria-label":i,"aria-pressed":e,tabIndex:0,children:t})}});var JK=class extends P.Component{static propTypes={onToggle:p.func.isRequired,mark:p.string,label:p.string.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool};constructor(e){super(e)}onToggle=e=>{e.preventDefault(),this.props.onToggle(this.props.mark)};onKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.props.onToggle(this.props.mark))};render(){let{children:e,active:t,label:n}=this.props;return(0,U.jsx)(KK,{active:t,onMouseDown:this.onToggle,"aria-pressed":t,onKeyDown:this.onKeyDown,"aria-label":n,tabIndex:0,children:e})}},YK=D(`@pie-lib:editable-html:plugins:image:image-toolbar`),XK=G(`div`)(({theme:e})=>({paddingLeft:e.spacing.unit,display:`flex`,alignItems:`center`})),ZK=G(`span`,{shouldForwardProp:e=>![`disabled`,`hasAlignmentButtons`].includes(e)})(({disabled:e,hasAlignmentButtons:t})=>({...e&&{opacity:.5},...t&&{borderLeft:`1px solid grey`,paddingLeft:8,marginLeft:4}})),QK=({alignment:e,active:t,onClick:n})=>(0,U.jsx)(JK,{active:t,onToggle:()=>n(e),label:e,children:e});QK.propTypes={alignment:p.string.isRequired,active:p.bool.isRequired,onClick:p.func.isRequired};var $K=class extends P.Component{static propTypes={onChange:p.func.isRequired,alignment:p.string,alt:p.string,imageLoaded:p.bool,disableImageAlignmentButtons:p.bool};onAltTextDone=e=>{YK(`[onAltTextDone]: alt:`,e),this.props.onChange({alt:e},!0)};onAlignmentClick=e=>{YK(`[onAlignmentClick]: alignment:`,e),this.props.onChange({alignment:e})};renderDialog=()=>{let{alt:e}=this.props,t=document.createElement(`div`),n=(0,U.jsx)(GK,{alt:e,onDone:this.onAltTextDone});db.render(n,t),document.body.appendChild(t)};render(){let{alignment:e,imageLoaded:t,disableImageAlignmentButtons:n}=this.props;return(0,U.jsxs)(XK,{children:[!n&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(QK,{alignment:`left`,active:e===`left`,onClick:this.onAlignmentClick}),(0,U.jsx)(QK,{alignment:`center`,active:e===`center`,onClick:this.onAlignmentClick}),(0,U.jsx)(QK,{alignment:`right`,active:e===`right`,onClick:this.onAlignmentClick})]}),(0,U.jsx)(ZK,{disabled:!t,hasAlignmentButtons:!n,onMouseDown:e=>t&&this.renderDialog(e),children:`Alt text`})]})}},eq=G(dK,{shouldForwardProp:e=>e!==`hideProgress`})(({hideProgress:e})=>({position:`absolute`,left:`0`,width:`fit-content`,top:`0%`,transition:`opacity 200ms linear`,...e&&{opacity:0}})),tq=G(`div`,{shouldForwardProp:e=>![`active`,`loading`,`pendingDelete`].includes(e)})(({loading:e,pendingDelete:t})=>({position:`relative`,display:`flex`,transition:`opacity 200ms linear`,...e&&{opacity:.3},...t&&{opacity:.3}})),nq=G(`div`)(({theme:e})=>({position:`relative`,width:`fit-content`,display:`flex`,alignItems:`center`,"&&:hover > .resize":{display:`block`}})),rq=G(`img`,{shouldForwardProp:e=>e!==`active`})(({theme:e,active:t})=>({border:t?`solid 1px ${e.palette.primary.main}`:`solid 1px transparent`})),iq=G(`div`)(({theme:e})=>({backgroundColor:e.palette.primary.main,cursor:`col-resize`,height:`35px`,width:`5px`,borderRadius:8,marginLeft:`5px`,marginRight:`10px`,display:`none`})),aq=e=>e?`${e}px`:`calc(20px)`;function oq(e){let{node:t,editor:n,attributes:r,onFocus:i,getPos:a,selected:o,options:s,maxImageWidth:c=700,maxImageHeight:l=900}=e,{alt:u}=t.attrs,d=a(),f=n.state.selection.from,p=n.state.selection.to,m=(0,P.useMemo)(()=>f+t.nodeSize===p,[f,p,t.nodeSize]),[h,g]=(0,P.useState)(!1),_=(0,P.useRef)(t),v=(0,P.useRef)(null),y=(0,P.useRef)(null),b=(0,P.useRef)(null),x=(0,P.useCallback)(e=>{let t=e/v.current.naturalWidth*4;return parseInt(t.toFixed(0)*25,10)},[]),S=(0,P.useCallback)(()=>{let e=_.current.attrs.nodeKey,t=null;return n.state.doc.descendants((n,r)=>{if(t!==null)return!1;if(n.type.name===`imageUploadNode`&&n.attrs.nodeKey===e)return t=r,!1}),t},[n]),w=(0,P.useCallback)(e=>{let t=S();if(t===null)return;let r=n.state.doc.nodeAt(t);r&&n.view.dispatch(n.state.tr.setNodeMarkup(t,void 0,{...r.attrs,...e}))},[n,S]),T=(0,P.useCallback)(()=>{if(!t.attrs.width||!v.current)return;let e=x(t.attrs.width);t.attrs.resizePercent!==e&&w({resizePercent:e})},[t.attrs.width,t.attrs.resizePercent,x,w]);(0,P.useEffect)(()=>{_.current={...t,pos:d}},[t,d]),(0,P.useEffect)(()=>{o?m&&(!String(t.attrs?.src??``).trim()&&s.imageHandling?.insertImageRequested&&s.imageHandling.insertImageRequested(n,[t,d],e=>new pK(n,[t,d],e)),g(o)):g(o)},[m,o]),(0,P.useEffect)(()=>{T();let e=y.current;return e&&e.addEventListener(`mousedown`,j,!1),()=>{e&&e.removeEventListener(`mousedown`,j,!1)}},[]),(0,P.useEffect)(()=>{T()});let E=(0,P.useCallback)(()=>{let e=v.current;if(e&&(!e.style.width||e.style.width===`calc(20px)`)){let n=Math.min(e.naturalWidth,c),r=Math.min(e.naturalHeight,l);e.style.width=`${n}px`,e.style.height=`${r}px`;let i={width:n,height:r};C(i,{width:t.attrs.width,height:t.attrs.height})||w(i)}},[t.attrs.width,t.attrs.height,c,l,w]),D=(e,t,n=!0,r)=>{if(n){let n=e.width/e.height;return r===`height`?{width:t.height*n,height:t.height}:{width:t.width,height:t.width/n}}return t},O=(0,P.useCallback)(e=>{let t=v.current;if(!t)return;let n=e.target.getBoundingClientRect(),r=D({width:t.naturalWidth,height:t.naturalHeight},{width:e.clientX-n.left,height:e.clientY-n.top});r.width>50&&r.height>50&&r.width<=700&&r.height<=900&&(t.style.width=`${r.width}px`,t.style.height=`${r.height}px`,w({width:r.width,height:r.height}))},[n,w]),k=(0,P.useCallback)(e=>{w(e)},[n,w]),A=(0,P.useCallback)(()=>{window.removeEventListener(`mousemove`,O),window.removeEventListener(`mouseup`,A)},[O]),j=(0,P.useCallback)(()=>{window.addEventListener(`mousemove`,O),window.addEventListener(`mouseup`,A)},[O,A]),M={width:aq(t.attrs.width),height:aq(t.attrs.height),objectFit:`contain`},ee={left:`flex-start`,center:`center`,right:`flex-end`}[t.attrs.alignment]||`flex-start`;return(0,U.jsxs)(jb,{children:[(0,U.jsxs)(tq,{onFocus:i,loading:!t.attrs.loaded,pendingDelete:t.attrs.deleteStatus===`pending`,style:{justifyContent:ee},children:[(0,U.jsx)(eq,{mode:`determinate`,value:t.attrs.percent||0,hideProgress:t.attrs.loaded}),(0,U.jsxs)(nq,{onDragStart:e=>e.preventDefault(),children:[(0,U.jsx)(rq,{...r,active:o&&t.attrs.loaded,draggable:!1,ref:v,src:t.attrs.src,style:M,onLoad:E,alt:t.attrs.alt}),(0,U.jsx)(iq,{ref:y,className:`resize`})]})]}),h&&n._tiptapContainerEl&&db.createPortal((0,U.jsx)(`div`,{ref:b,style:{zIndex:20,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,width:`100%`},children:(0,U.jsx)(NN,{showDone:!0,deletable:!0,toolbarOpts:s.toolbarOpts||{},onDelete:()=>{let e=S();e!==null&&(s.imageHandling?.onDelete?.(_.current),n.view.dispatch(n.state.tr.delete(e,e+n.state.doc.nodeAt(e).nodeSize)),g(!1),n.commands.focus())},onDone:()=>{g(!1),s.imageHandling?.onDone?.(n),n.commands.focus(`end`)},children:(0,U.jsx)($K,{disableImageAlignmentButtons:s.imageHandling?.disableImageAlignmentButtons,alt:t.attrs.alt,imageLoaded:t.attrs.loaded,alignment:t.attrs.alignment||`left`,onChange:k})})}),n._tiptapContainerEl)]})}oq.propTypes={node:p.object.isRequired,editor:p.object.isRequired,attributes:p.object,onFocus:p.func,maxImageWidth:p.number,maxImageHeight:p.number};var sq=uy.create({name:`imageUploadNode`,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return{nodeKey:{default:null},loaded:{default:!1},deleteStatus:{default:null},alignment:{default:null},percent:{default:null},width:{default:null},height:{default:null},src:{default:null},alt:{default:null}}},parseHTML(){return[{tag:`img[data-type="image-upload-node"]`}]},renderHTML({HTMLAttributes:e}){return[`img`,m_(e,{"data-type":`image-upload-node`})]},addNodeView(){return zb(e=>(0,U.jsx)(oq,{...e,options:this.options}))},addCommands(){return{setImageUploadNode:()=>({commands:e})=>e.insertContent({type:this.name,attrs:{nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})}},addProseMirrorPlugins(){let e=this.editor;return[new cu({props:{handlePaste(t,n){let r=Array.from(n.clipboardData?.items||[]).find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!r)return!1;let i=r.getAsFile();if(!i)return!1;let a=new FileReader;return a.onload=()=>{let t=a.result;typeof t==`string`&&e.commands.insertContent({type:`imageUploadNode`,attrs:{src:t,loaded:!0,nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})},a.readAsDataURL(i),!0}}})]}});function cq(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function lq(e,t,n,r={},i=()=>{}){let{ease:a=cq,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var uq={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function dq(e){let{onChange:t,...n}=e,r=P.useRef(),i=P.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Xj(()=>{let e=Uj(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Jj(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),P.useEffect(()=>{a(),t(r.current)},[t]),(0,U.jsx)(`div`,{style:uq,...n,ref:i})}var fq=Vj((0,U.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),pq=Vj((0,U.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function mq(e){return Yr(`MuiTabScrollButton`,e)}var hq=Xr(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),gq=e=>{let{classes:t,orientation:n,disabled:r}=e;return A({root:[`root`,n,r&&`disabled`]},mq,t)},_q=G(iN,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${hq.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),vq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Ii(),d={isRtl:u,...n},f=gq(d),p=i.StartScrollButtonIcon??fq,m=i.EndScrollButtonIcon??pq,h=Oz({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=Oz({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,U.jsx)(_q,{component:`div`,className:k(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...l,style:{...l.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:o===`left`?(0,U.jsx)(p,{...h}):(0,U.jsx)(m,{...g})})});function yq(e){return Yr(`MuiTabs`,e)}var bq=Xr(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),xq=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Sq=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Cq=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||i.getAttribute(`aria-disabled`)===`true`;if(!i.hasAttribute(`tabindex`)||t)i=n(e,i);else{i.focus();return}}},wq=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return A({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,`flexContainer`,t&&`flexContainerVertical`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},yq,c)},Tq=G(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${bq.scrollButtons}`]:t.scrollButtons},{[`& .${bq.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Io(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${bq.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Eq=G(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),Dq=G(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Oq=G(`span`,{name:`MuiTabs`,slot:`Indicator`})(Io(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,transition:e.transitions.create(),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),kq=G(dq)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Aq={},jq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTabs`}),r=Ao(),i=Ii(),{"aria-label":a,"aria-labelledby":o,action:s,centered:c=!1,children:l,className:u,component:d=`div`,allowScrollButtonsMobile:f=!1,indicatorColor:p=`primary`,onChange:m,orientation:h=`horizontal`,ScrollButtonComponent:g,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:S={},textColor:C=`primary`,value:w,variant:T=`standard`,visibleScrollbar:E=!1,...D}=n,O=T===`scrollable`,A=h===`vertical`,j=A?`scrollTop`:`scrollLeft`,M=A?`top`:`left`,ee=A?`bottom`:`right`,N=A?`clientHeight`:`clientWidth`,te=A?`height`:`width`,F={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:A,scrollButtons:_,textColor:C,variant:T,visibleScrollbar:E,fixed:!O,hideScrollbar:O&&!E,scrollableX:O&&!A,scrollableY:O&&A,centered:c&&!O,scrollButtonsHideMobile:!f},I=wq(F),L=Oz({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:F}),ne=Oz({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:F}),[re,ie]=P.useState(!1),[R,ae]=P.useState(Aq),[z,B]=P.useState(!1),[oe,se]=P.useState(!1),[ce,le]=P.useState(!1),[ue,de]=P.useState({overflow:`hidden`,scrollbarWidth:0}),fe=new Map,V=P.useRef(null),pe=P.useRef(null),me={slots:y,slotProps:{indicator:x,scrollButtons:S,...b}},he=()=>{let e=V.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&w!==!1){let e=pe.current.children;if(e.length>0){let t=e[fe.get(w)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ge=tM(()=>{let{tabsMeta:e,tabMeta:t}=he(),n=0,r;A?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[te]:t?t[te]:0};if(typeof R[r]!=`number`||typeof R[te]!=`number`)ae(a);else{let e=Math.abs(R[r]-a[r]),t=Math.abs(R[te]-a[te]);(e>=1||t>=1)&&ae(a)}}),_e=(e,{animation:t=!0}={})=>{t?lq(j,V.current,e,{duration:r.transitions.duration.standard}):V.current[j]=e},H=e=>{let t=V.current[j];A?t+=e:t+=e*(i?-1:1),_e(t)},ve=()=>{let e=V.current[N],t=0,n=Array.from(pe.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[N]>e){r===0&&(t=e);break}t+=i[N]}return t},ye=()=>{H(-1*ve())},be=()=>{H(ve())},[xe,{onChange:Se,...Ce}]=lI(`scrollbar`,{className:k(I.scrollableX,I.hideScrollbar),elementType:kq,shouldForwardComponentProp:!0,externalForwardedProps:me,ownerState:F}),we=P.useCallback(e=>{Se?.(e),de({overflow:null,scrollbarWidth:e})},[Se]),[Te,Ee]=lI(`scrollButtons`,{className:k(I.scrollButtons,S.className),elementType:vq,externalForwardedProps:me,ownerState:F,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:y.startScrollButtonIcon||y.StartScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon||y.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:L,endScrollButtonIcon:ne}}}),De=()=>{let e={};e.scrollbarSizeListener=O?(0,U.jsx)(xe,{...Ce,onChange:we}):null;let t=O&&(_===`auto`&&(z||oe)||_===!0);return e.scrollButtonStart=t?(0,U.jsx)(Te,{direction:i?`right`:`left`,onClick:ye,disabled:!z,...Ee}):null,e.scrollButtonEnd=t?(0,U.jsx)(Te,{direction:i?`left`:`right`,onClick:be,disabled:!oe,...Ee}):null,e},Oe=tM(e=>{let{tabsMeta:t,tabMeta:n}=he();!n||!t||(n[M]<t[M]?_e(t[j]+(n[M]-t[M]),{animation:e}):n[ee]>t[ee]&&_e(t[j]+(n[ee]-t[ee]),{animation:e}))}),ke=tM(()=>{O&&_!==!1&&le(!ce)});P.useEffect(()=>{let e=Uj(()=>{V.current&&ge()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),ke()},r=Jj(V.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(pe.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(pe.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[ge,ke]),P.useEffect(()=>{let e=Array.from(pe.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&O&&_!==!1){let n=e[0],r=e[t-1],i={root:V.current,threshold:.99},a=new IntersectionObserver(e=>{B(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{se(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[O,_,ce,l?.length]),P.useEffect(()=>{ie(!0)},[]),P.useEffect(()=>{ge()}),P.useEffect(()=>{Oe(Aq!==R)},[Oe,R]),P.useImperativeHandle(s,()=>({updateIndicator:ge,updateScrollButtons:ke}),[ge,ke]);let[Ae,je]=lI(`indicator`,{className:k(I.indicator,x.className),elementType:Oq,externalForwardedProps:me,ownerState:F,additionalProps:{style:R}}),Me=(0,U.jsx)(Ae,{...je}),Ne=0,Pe=P.Children.map(l,e=>{if(!P.isValidElement(e))return null;let t=e.props.value===void 0?Ne:e.props.value;fe.set(t,Ne);let n=t===w;return Ne+=1,P.cloneElement(e,{fullWidth:T===`fullWidth`,indicator:n&&!re&&Me,selected:n,selectionFollowsFocus:v,onChange:m,textColor:C,value:t,...Ne===1&&w===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),Fe=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=pe.current,n=KF(Kj(t));if(n?.getAttribute(`role`)!==`tab`)return;let r=h===`horizontal`?`ArrowLeft`:`ArrowUp`,a=h===`horizontal`?`ArrowRight`:`ArrowDown`;switch(h===`horizontal`&&i&&(r=`ArrowRight`,a=`ArrowLeft`),e.key){case r:e.preventDefault(),Cq(t,n,Sq);break;case a:e.preventDefault(),Cq(t,n,xq);break;case`Home`:e.preventDefault(),Cq(t,null,xq);break;case`End`:e.preventDefault(),Cq(t,null,Sq);break;default:break}},Ie=De(),[Le,Re]=lI(`root`,{ref:t,className:k(I.root,u),elementType:Tq,externalForwardedProps:{...me,...D,component:d},ownerState:F}),[ze,Be]=lI(`scroller`,{ref:V,className:I.scroller,elementType:Eq,externalForwardedProps:me,ownerState:F,additionalProps:{style:{overflow:ue.overflow,[A?`margin${i?`Left`:`Right`}`:`marginBottom`]:E?void 0:-ue.scrollbarWidth}}}),[Ve,He]=lI(`list`,{ref:pe,className:k(I.list,I.flexContainer),elementType:Dq,externalForwardedProps:me,ownerState:F,getSlotProps:e=>({...e,onKeyDown:t=>{Fe(t),e.onKeyDown?.(t)}})});return(0,U.jsxs)(Le,{...Re,children:[Ie.scrollButtonStart,Ie.scrollbarSizeListener,(0,U.jsxs)(ze,{...Be,children:[(0,U.jsx)(Ve,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...He,children:Pe}),re&&Me]}),Ie.scrollButtonEnd]})});function Mq(e){return Yr(`MuiTab`,e)}var Nq=Xr(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),Pq=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return A({root:[`root`,a&&o&&`labelIcon`,`textColor${K(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},Mq,t)},Fq=G(iN,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${K(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Nq.iconWrapper}`]:t.iconWrapper},{[`& .${Nq.icon}`]:t.icon}]}})(Io(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${Nq.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${Nq.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${Nq.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${Nq.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${Nq.selected}`]:{opacity:1},[`&.${Nq.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${Nq.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Nq.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${Nq.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Nq.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Iq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},x=Pq(b),S=s&&u&&P.isValidElement(s)?P.cloneElement(s,{className:k(x.icon,s.props.className)}):s;return(0,U.jsxs)(Fq,{focusRipple:!a,className:k(x.root,r),ref:t,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},ownerState:b,tabIndex:m?0:-1,...y,children:[c===`top`||c===`start`?(0,U.jsxs)(P.Fragment,{children:[S,u]}):(0,U.jsxs)(P.Fragment,{children:[u,S]}),l]})}),Lq=e=>{let{classes:t}=e;return A({root:[`root`]},hK,t)},Rq=G(qo,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),zq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=Lq(o),{titleId:c=i}=P.useContext(RK);return(0,U.jsx)(Rq,{component:`h2`,className:k(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function Bq(e){return Yr(`MuiDialogContentText`,e)}Xr(`MuiDialogContentText`,[`root`]);var Vq=e=>{let{classes:t}=e,n=A({root:[`root`]},Bq,t);return{...t,...n}},Hq=G(qo,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiDialogContentText`,slot:`Root`})({}),Uq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogContentText`}),{children:r,className:i,...a}=n,o=Vq(a);return(0,U.jsx)(Hq,{component:`p`,variant:`body1`,color:`textSecondary`,ref:t,ownerState:a,className:k(o.root,i),...n,classes:o})}),Wq=D(`@pie-lib:editable-html:plugins:media:dialog`),Gq=e=>{if(!e)return!1;let t=/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return e.match(t)?e.match(t)[1]:!1},Kq=e=>e&&/(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(e),qq=e=>e&&/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)/.test(e),Jq=e=>{if(!e)return!1;let t=/^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;return e.match(t)&&e.match(t)[2]},Yq=e=>new Promise(t=>{try{fetch(`https://soundcloud.com/oembed?format=json&url=${e}`).then(e=>e.json()).then(e=>{let n=document.createElement(`div`);n.innerHTML=e.html,t(n.querySelector(`iframe`).src)}).catch(e=>{t(``),Wq(e)})}catch{t(``)}}),Xq={video:`Video`,audio:`Audio`},Zq={uploadFile:`upload-file`,insertUrl:`insert-url`},Qq=G(WK)(({theme:e})=>({"& .MuiDialog-paper":{minWidth:`500px`}})),$q=G(yK)(({theme:e})=>({padding:0})),eJ=G(`div`)(({theme:e})=>({display:`flex`,flexDirection:`space-between`})),tJ=G(`div`)(({theme:e})=>({marginTop:e.spacing(1.5)})),nJ=G(`input`)(({theme:e})=>({})),rJ=G(qo)(({theme:e})=>({marginTop:e.spacing(1.5),color:e.palette.error.main})),iJ=G(CN)(({theme:e})=>({marginLeft:e.spacing(1.5)})),aJ=class extends P.Component{static propTypes={open:p.bool,edit:p.bool,disablePortal:p.bool,handleClose:p.func,uploadSoundSupport:p.shape({add:p.func,delete:p.func}),type:p.string,src:p.string,url:p.string,urlToUse:p.string,starts:p.number,ends:p.number,height:p.number,width:p.number};constructor(e){super(e);let{ends:t,height:n,src:r,starts:i,type:a,uploadSoundSupport:o,url:s,urlToUse:c,width:l}=e,u=o?.add&&o?.delete&&a!==`video`&&!r;this.state={ends:t||0,url:s,urlToUse:c,formattedUrl:r,height:n||315,invalid:!1,starts:i||0,width:l||560,tabValue:u?Zq.uploadFile:Zq.insertUrl,fileUpload:{error:null,loading:!1,scheduled:!1,url:``,mimeType:``}}}componentDidMount(){this.props.url&&this.urlChange({target:{value:this.props.url}})}formatUrl=()=>{let{url:e,urlToUse:t,starts:n,ends:r}=this.state,i=Gq(e),a=Kq(e),o=t;if((i||a)&&t){let e=[],s,c;switch(!0){case a:s=`t`,c=`#`;break;case i:s=`start`,c=`?`;break;default:s=`start`,c=`?`}n&&e.push(`${s}=${n}`),r&&e.push(`end=${r}`),o=`${t}${e.length?c:``}${e.join(`&`)}`}this.setState({formattedUrl:null,updating:!0},()=>this.setState({formattedUrl:o,updating:!1}))};handleStateChange=e=>this.setState(e,this.formatUrl);checkAudio=e=>{Jq(e)&&Yq(e).then(t=>{this.handleStateChange({urlToUse:t,invalid:!t,url:e})}).catch(Wq)};checkVideo=e=>{if(Gq(e)){let t=`https://youtube.com/embed/${e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)[2]}`;Wq(`is youtube`),this.handleStateChange({urlToUse:t,url:e,invalid:!1})}if(Kq(e)){let t=`https://player.vimeo.com/video/${e.replace(/.*vimeo.com\/(.*)/g,`$1`)}`;Wq(`is vimeo`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}if(qq(e)){let t=`https://drive.google.com/file/d/${e.replace(/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)\/.*/,`$1`)}/preview`;Wq(`is google drive`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}};urlChange=e=>{let{value:t}=e.target||{},{type:n}=this.props;if(n&&n===`audio`){this.checkAudio(t);return}else if(n&&n===`video`){this.checkVideo(t);return}this.handleStateChange({urlToUse:null,url:null,invalid:!0})};changeHandler=e=>t=>this.handleStateChange({[e]:t.target.value});handleDone=e=>{let{handleClose:t}=this.props,{tabValue:n,fileUpload:r}=this.state,i=n===Zq.insertUrl;if(!e){r.url&&this.handleRemoveFile(),t(e);return}if(i){let{ends:n,height:r,url:i,urlToUse:a,formattedUrl:o,starts:s,width:c}=this.state;t(e,{tag:`iframe`,ends:n,height:r,starts:s,width:c,url:i,urlToUse:a,src:o});return}if(!r.loading){t(e,{tag:`audio`,src:r.url});return}this.setState({fileUpload:{...r,scheduled:!0}})};handleUploadFile=async e=>{e.preventDefault(),this.setState({fileUpload:{...this.state.fileUpload,error:null,loading:!0}});let t=e.target.files[0],n=new FileReader;n.onload=()=>{let e=n.result;this.setState({fileUpload:{...this.state.fileUpload,url:e,mimeType:t.type}})},n.readAsDataURL(t),this.props.uploadSoundSupport.add({fileChosen:t,done:(e,t)=>{if(Wq(`done: err:`,e),e){console.log(e),this.setState({fileUpload:{...this.state.fileUpload,scheduled:!1,loading:!1,error:e}});return}let{fileUpload:n}=this.state,r=n&&n.scheduled?this.handleDone.bind(this,!0):void 0;this.setState({fileUpload:{...n,scheduled:!1,loading:!1,url:t}},r)}})};handleRemoveFile=async()=>{this.props.uploadSoundSupport.delete(this.state.fileUpload.url,e=>{e&&(console.log(e),this.setState({fileUpload:{...this.state.fileUpload,error:e}}))}),this.setState({fileUpload:{...this.state.fileUpload,loading:!1,url:``,mimeType:``}})};render(){let{open:e,disablePortal:t,type:n,edit:r,uploadSoundSupport:i}=this.props,{ends:a,height:o,invalid:s,starts:c,width:l,url:u,mimeType:d,formattedUrl:f,updating:p,tabValue:m,fileUpload:h}=this.state,g=Gq(u),_=m===Zq.insertUrl,v=m===Zq.uploadFile,y=_?s||u==null:!h.url||h.scheduled,b=i?.add&&i?.delete&&n!==`video`;return(0,U.jsxs)(Qq,{disablePortal:t,open:e,onClose:()=>this.handleDone(!1),"aria-labelledby":`form-dialog-title`,children:[(0,U.jsxs)(zq,{id:`form-dialog-title`,children:[`Insert `,Xq[n]]}),(0,U.jsx)(yK,{children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(eJ,{children:(0,U.jsxs)(jq,{indicatorColor:`primary`,value:m,onChange:(e,t)=>{this.setState({tabValue:t})},children:[b?(0,U.jsx)(Iq,{value:Zq.uploadFile,label:`Upload file`}):null,(0,U.jsx)(Iq,{value:Zq.insertUrl,label:n===`video`?`Insert YouTube, Vimeo, or Google Drive URL`:`Insert SoundCloud URL`})]})}),_&&(0,U.jsxs)(`div`,{children:[(0,U.jsx)(jK,{autoFocus:!0,error:s,helperText:s?`Invalid URL`:``,margin:`dense`,id:`name`,label:`URL`,placeholder:`Paste URL of ${n}...`,type:`text`,onChange:this.urlChange,value:u,fullWidth:!0}),n===`video`&&(0,U.jsxs)($q,{children:[(0,U.jsx)(Uq,{children:`Video Properties`}),(0,U.jsx)(jK,{autoFocus:!0,margin:`dense`,id:`width`,label:`Width`,type:`number`,placeholder:`Width`,value:l,onChange:this.changeHandler(`width`)}),(0,U.jsx)(jK,{autoFocus:!0,margin:`dense`,id:`height`,label:`Height`,type:`number`,placeholder:`Height`,value:o,onChange:this.changeHandler(`height`)})]}),f&&(0,U.jsx)(`iframe`,{width:l,height:o,src:f,frameBorder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowFullScreen:!0}),n===`video`&&(f||p)&&!s&&(0,U.jsx)(P.Fragment,{children:(0,U.jsxs)($q,{children:[(0,U.jsx)(jK,{autoFocus:!0,margin:`dense`,id:`starts`,label:`Starts`,type:`number`,placeholder:`Starts`,value:c,onChange:this.changeHandler(`starts`)}),g&&(0,U.jsx)(jK,{autoFocus:!0,margin:`dense`,id:`ends`,label:`Ends`,type:`number`,placeholder:`Ends`,value:a,onChange:this.changeHandler(`ends`)})]})})]}),v&&(0,U.jsx)(tJ,{children:(0,U.jsxs)(`div`,{children:[h.url?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(eJ,{children:[(0,U.jsx)(`audio`,{controls:`controls`,controlsList:`nodownload`,children:(0,U.jsx)(`source`,{type:d,src:h.url})}),(0,U.jsx)(iJ,{"aria-label":`delete`,onClick:this.handleRemoveFile,children:(0,U.jsx)(wN,{})})]}),!h.scheduled&&h.loading?(0,U.jsx)(qo,{variant:`subheading`,children:`Loading...`}):null,h.scheduled?(0,U.jsx)(qo,{variant:`subheading`,children:`Waiting for Upload to finish, then inserting item...`}):null]}):h.loading?null:(0,U.jsx)(nJ,{accept:`audio/*`,onChange:this.handleUploadFile,type:`file`}),!!h.error&&(0,U.jsx)(rJ,{variant:`caption`,children:h.error})]})})]})}),(0,U.jsxs)(FK,{children:[(0,U.jsx)(MR,{onClick:()=>this.handleDone(!1),color:`primary`,children:`Cancel`}),(0,U.jsx)(MR,{disabled:y,onClick:()=>this.handleDone(!0),color:`primary`,children:r?`Update`:`Insert`})]})]})}},oJ=G(`span`)(({theme:e})=>({position:`relative`,bottom:`5px`,left:0,width:`100%`,background:e.palette.common.white,display:`inline-flex`,padding:`5px`,boxShadow:`0px 4px 4px rgba(0, 0, 0, 0.25)`})),sJ=G(`span`)(({theme:e})=>({cursor:`pointer`,flex:3,border:`solid ${e.palette.common.black}`,textAlign:`right`,borderWidth:`0 2px 0 0`,marginRight:`5px`,paddingRight:`5px`})),cJ=G(`span`)({cursor:`pointer`}),lJ=class extends P.Component{static propTypes={onEdit:p.func,hideEdit:p.bool,onRemove:p.func};render(){let{hideEdit:e,onEdit:t,onRemove:n}=this.props;return(0,U.jsxs)(oJ,{children:[e?null:(0,U.jsx)(sJ,{onClick:t,children:`Edit Settings`}),(0,U.jsx)(cJ,{onClick:n,children:`Remove`})]})}},uJ=uy.create({name:`media`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{type:{default:`video`},src:{default:null},width:{default:null},height:{default:null},title:{default:null},starts:{default:null},ends:{default:null},editing:{default:!1},tag:{default:`iframe`},url:{default:null}}},parseHTML(){return[{tag:`iframe[data-type="video"]`,getAttrs:e=>({type:`video`,tag:`iframe`,src:e.getAttribute(`src`),width:e.getAttribute(`width`),height:e.getAttribute(`height`),title:e.dataset.title,starts:e.dataset.starts,ends:e.dataset.ends,url:e.dataset.url})},{tag:`audio`,getAttrs:e=>({type:`audio`,tag:`audio`,src:e.querySelector(`source`)?.getAttribute(`src`)})}]},renderHTML({HTMLAttributes:e}){let{tag:t,src:n,width:r,height:i}=e;return t===`audio`?[`audio`,{controls:`controls`,controlsList:`nodownload`},[`source`,{src:n,type:`audio/mp3`}]]:[`iframe`,m_({"data-type":`video`,frameborder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowfullscreen:``,src:n},r?{width:r}:{},i?{height:i}:{})]},addCommands(){return{insertMedia:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateMedia:e=>({commands:t})=>t.updateAttributes(this.name,e)}},addNodeView(){return zb(e=>(0,U.jsx)(pJ,{...e,options:this.options}))}}),dJ=()=>{document.querySelectorAll(`.insert-media-dialog`).forEach(e=>e.remove())},fJ=e=>{let t=document.createElement(`div`),{type:n,callback:r,options:i,...a}=e,o=document.body.style.overflow;dJ(),t.className=`insert-media-dialog`,document.body.style.overflow=`hidden`;let s=(e,n)=>{r(e,n),t.remove(),document.body.style.overflow=o},c=(0,U.jsx)(aJ,{...a,uploadSoundSupport:i.uploadSoundSupport,type:n,disablePortal:!0,open:!0,handleClose:s});db.render(c,t),document.body.appendChild(t)};function pJ({editor:e,node:t,updateAttributes:n,deleteNode:r,options:i}){let{type:a,src:o,width:s,height:c,tag:l}=t.attrs;return(0,P.useEffect)(()=>{o||fJ({...t.attrs,options:i,edit:!0,callback:(t,i)=>{t?n(i):r(),e.chain().focus().run()}})},[]),(0,U.jsxs)(jb,{"data-type":a,style:{width:s,height:c},children:[l===`audio`?(0,U.jsx)(`audio`,{controls:!0,controlsList:`nodownload`,children:(0,U.jsx)(`source`,{type:`audio/mp3`,src:o})}):(0,U.jsx)(`iframe`,{src:o,allowFullScreen:!0,frameBorder:`0`,width:s,height:c}),(0,U.jsx)(lJ,{onEdit:()=>{fJ({...t.attrs,options:i,edit:!0,callback:(t,r)=>{t&&n(r),e.chain().focus().run()}})},onRemove:r})]})}function mJ(e){return Yr(`MuiListItem`,e)}Xr(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var hJ=Xr(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function gJ(e){return Yr(`MuiListItemSecondaryAction`,e)}Xr(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var _J=e=>{let{disableGutters:t,classes:n}=e;return A({root:[`root`,t&&`disableGutters`]},gJ,n)},vJ=G(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),yJ=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=P.useContext(kz),o={...n,disableGutters:a.disableGutters};return(0,U.jsx)(vJ,{className:k(_J(o).root,r),ownerState:o,ref:t,...i})});yJ.muiName=`ListItemSecondaryAction`;var bJ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},xJ=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return A({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},mJ,n)},SJ=G(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:bJ})(Io(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${hJ.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),CJ=G(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),wJ=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o,components:s={},componentsProps:c={},ContainerComponent:l=`li`,ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:m=!1,divider:h=!1,secondaryAction:g,slotProps:_={},slots:v={},...y}=n,b=P.useContext(kz),x=P.useMemo(()=>({dense:f||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,f,p]),S=P.useRef(null),C=P.Children.toArray(i),w=C.length&&Wj(C[C.length-1],[`ListItemSecondaryAction`]),T={...n,alignItems:r,dense:x.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:w},E=xJ(T),D=rM(S,t),[O,A]=lI(`secondaryAction`,{elementType:yJ,externalForwardedProps:{slots:v,slotProps:_},ownerState:T,className:E.secondaryAction}),j=v.root||s.Root||SJ,M=_.root||c.root||{},ee={className:k(E.root,M.className,a),...y},N=o||`li`;return w?(N=!ee.component&&!o?`div`:N,l===`li`&&(N===`li`?N=`div`:ee.component===`li`&&(ee.component=`div`)),(0,U.jsx)(kz.Provider,{value:x,children:(0,U.jsxs)(CJ,{as:l,className:k(E.container,u),ref:D,ownerState:T,...d,children:[(0,U.jsx)(j,{...M,...!CF(j)&&{as:N,ownerState:{...T,...M.ownerState}},...ee,children:C}),C.pop()]})})):(0,U.jsx)(kz.Provider,{value:x,children:(0,U.jsxs)(j,{...M,as:N,ref:D,...!CF(j)&&{ownerState:{...T,...M.ownerState}},...ee,children:[C,g&&(0,U.jsx)(O,{...A,children:g})]})})}),TJ=()=>{document.querySelectorAll(`.insert-css-dialog`).forEach(e=>e.remove())},EJ=({editor:e,callback:t,opts:n,selectedText:r,parentNode:i})=>{let a=e.options.element,o=document.createElement(`div`),{selection:s}=e.state;TJ(),o.className=`insert-css-dialog`;let c=!1,l=e=>{if(c){let t=o.contains(e.target)||void 0,n=a.contains(e.target);t||n||u()}else c=!0},u=()=>{t(void 0,!0),o.remove(),document.body.removeEventListener(`click`,l)},d=e=>{t(e,!0),o.remove(),document.body.removeEventListener(`click`,l)},f=i?.attrs.class,p=e=>{let t=`<span class="${e}">${r}</span>`;if(i){let e=`span`;i?.object===`inline`&&(e=`span`),i?.object===`block`&&(e=`div`),t=`<${e} class="${f}">${i.text.slice(0,s.$anchor.textOffset)}${t}${i.text.slice(s.$head.textOffset)}</${e}>`}return t},m=(0,U.jsxs)(`div`,{style:{background:`white`,height:500,padding:20,overflow:`hidden`,display:`flex`,flexFlow:`column`},children:[(0,U.jsx)(`h2`,{children:`Please choose a css class`}),f&&(0,U.jsxs)(`div`,{children:[`The current parent has this class `,f]}),(0,U.jsx)(Nz,{component:`nav`,style:{overflow:`scroll`},children:n.names.map((e,t)=>(0,U.jsxs)(wJ,{button:!0,onClick:()=>d(e),children:[(0,U.jsx)(`div`,{style:{marginRight:20},children:e}),(0,U.jsx)(`div`,{dangerouslySetInnerHTML:{__html:p(e)}})]},`rule-${t}`))})]});db.render(m,o,()=>{let t=e.view.nodeDOM(e.state.selection.from)?.parentNode;if(t){let e=a.parentElement.parentElement.parentElement.getBoundingClientRect(),n=t.getBoundingClientRect();a.parentElement.parentElement.parentElement.appendChild(o),o.style.maxWidth=`500px`,o.style.position=`absolute`,o.style.top=0,o.style.zIndex=99999;let r=`${n.left+Math.abs(e.left)+t.offsetWidth+10}px`,i=`${n.x}px`;o.style.left=r;let s=o.offsetWidth;o.style.left=`unset`,o.style.right=i;let c=o.offsetWidth;o.style.left=`unset`,o.style.right=`unset`,s>=c?o.style.left=r:o.style.right=i,document.body.addEventListener(`click`,l)}})},DJ=Ev.create({name:`cssmark`,addOptions(){return{classes:[]}},addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}},parseHTML(){return[{tag:`span[class]`,getAttrs:e=>{let t=e.getAttribute(`class`)||``,n=this.options.classes.find(e=>t.includes(e));return n?{class:n}:!1}}]},renderHTML({HTMLAttributes:e}){return[`span`,m_(e),0]},addCommands(){return{setCSSClass:e=>({commands:t})=>t.setMark(this.name,{class:e}),unsetCSSClass:()=>({commands:e})=>e.unsetMark(this.name),openCSSClassDialog:()=>({editor:e})=>{EJ({editor:e,selectedText:e.state.doc.textBetween(e.state.selection.from,e.state.selection.to),parentNode:e.state.selection.$from.nodeAfter,opts:this.options.extraCSSRules,callback:t=>{t&&e.chain().focus().setCSSClass(t).run()}})}}}}),OJ=Object.defineProperty,kJ=(e,t)=>{for(var n in t)OJ(e,n,{get:t[n],enumerable:!0})},AJ=`listItem`,jJ=`textStyle`,MJ=/^\s*([-+*])\s$/,NJ=uy.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,m_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
380
- `):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(AJ,this.editor.getAttributes(jJ)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Zv({find:MJ,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Zv({find:MJ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(jJ),editor:this.editor})),[e]}});function PJ(e){let t=e.tokens?.[0];return!!(e.text&&e.tokens?.length===1&&t?.type===`list`&&t.ordered&&t.raw===e.text)}function FJ(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:`text`,raw:e,text:e}])}var IJ=uy.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,m_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(PJ(e))return{type:`listItem`,content:[{type:`paragraph`,content:FJ(e.text||``,t)}]};if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>cy(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});kJ({},{findListItemPos:()=>LJ,getNextListDepth:()=>RJ,handleBackspace:()=>HJ,handleDelete:()=>GJ,hasListBefore:()=>zJ,hasListItemAfter:()=>KJ,hasListItemBefore:()=>BJ,listItemHasSubList:()=>VJ,nextListIsDeeper:()=>UJ,nextListIsHigher:()=>WJ});var LJ=(e,t)=>{let{$from:n}=t.selection,r=Qh(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},RJ=(e,t)=>{let n=LJ(e,t);if(!n)return!1;let[,r]=M_(t,e,n.$pos.pos+4);return r},zJ=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},BJ=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},VJ=(e,t,n)=>{if(!n)return!1;let r=Qh(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},HJ=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Rg(e.state,t)&&zJ(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!Rg(e.state,t)||!z_(e.state))return!1;let r=LJ(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=VJ(t,e.state,i);return BJ(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},UJ=(e,t)=>{let n=RJ(e,t),r=LJ(e,t);return!r||!n?!1:n>r.depth},WJ=(e,t)=>{let n=RJ(e,t),r=LJ(e,t);return!r||!n?!1:n<r.depth},GJ=(e,t)=>{if(!Rg(e.state,t)||!R_(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:UJ(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():WJ(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},KJ=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},qJ=Pv.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&GJ(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&GJ(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&HJ(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&HJ(e,n,r)&&(t=!0)}),t}}}}),JJ=/^(\s*)(\d+)\.\s+(.*)$/,YJ=/^\s/;function XJ(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function ZJ(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r){n.push(e);return}if(e.trim()===``){r=!0,n.push(e);return}if(t.length>0&&XJ(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function QJ(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(JJ);if(!a)break;let[,o,s,c]=a,l=o.length,u=[c],d=n+1,f=[i],p=!1;for(;d<e.length;){let t=e[d];if(t.match(JJ))break;if(t.trim()===``)f.push(t),u.push(``),p=!0,d+=1;else if(t.match(YJ))f.push(t),u.push(t.slice(l+2)),d+=1;else{if(p)break;f.push(t),u.push(t),d+=1}}t.push({indent:l,number:parseInt(s,10),content:u.join(`
377
+ `,oK=typeof aK==`string`?null:cr`
378
+ animation: ${aK} 3s infinite linear;
379
+ `,sK=e=>{let{classes:t,variant:n,color:r}=e;return A({root:[`root`,`color${K(r)}`,n],dashed:[`dashed`,`dashedColor${K(r)}`],bar1:[`bar`,`bar1`,`barColor${K(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${K(r)}`,n===`buffer`&&`color${K(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},$G,t)},cK=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),lK=G(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${K(n.color)}`],t[n.variant]]}})(Io(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{backgroundColor:cK(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),uK=G(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${K(n.color)}`]]}})(Io(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>{let n=cK(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),oK||{animation:`${aK} 3s infinite linear`}),dK=G(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${K(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(Io(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${eK}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${eK}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:nK||{animation:`${tK} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),fK=G(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${K(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(Io(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(Bo()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:cK(e,t),transition:`transform .${eK}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:iK||{animation:`${rK} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),pK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,value:a,valueBuffer:o,variant:s=`indeterminate`,...c}=n,l={...n,color:i,variant:s},u=sK(l),d=Ii(),f={},p={bar1:{},bar2:{}};if((s===`determinate`||s===`buffer`)&&a!==void 0){f[`aria-valuenow`]=Math.round(a),f[`aria-valuemin`]=0,f[`aria-valuemax`]=100;let e=a-100;d&&(e=-e),p.bar1.transform=`translateX(${e}%)`}if(s===`buffer`&&o!==void 0){let e=(o||0)-100;d&&(e=-e),p.bar2.transform=`translateX(${e}%)`}return(0,U.jsxs)(lK,{className:k(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,U.jsx)(uK,{className:u.dashed,ownerState:l}):null,(0,U.jsx)(dK,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,U.jsx)(fK,{className:u.bar2,ownerState:l,style:p.bar2})]})}),mK=D(`@pie-lib:editable-html:image:insert-image-handler`),hK=class{constructor(e,t,n,r=!1){this.editor=e,this.nodeInfo=t,this.node=t[0],this.nodePos=t[1],this.onFinish=n,this.isPasted=r,this.chosenFile=null}cancel(){mK(`insert cancelled`);try{this.deleteNode(),this.onFinish(!1)}catch{}finally{this.editor._insertingImage=!1}}updateNode(e){let{state:t,view:n}=this.editor,{tr:r}=t,i=t.doc.nodeAt(this.nodePos);if(i){let t=r.setNodeMarkup(this.nodePos,void 0,{...i.attrs,...e});n.dispatch(t)}}deleteNode(){let{state:e,view:t}=this.editor,{tr:n}=e,r=n.delete(this.nodePos,this.nodePos+this.node.nodeSize);t.dispatch(r)}done(e,t){mK(`done: err:`,e),e?(console.log(e),this.onFinish(!1)):(this.updateNode({loaded:!0,src:t,percent:100}),this.onFinish(!0)),this.editor._insertingImage=!1}fileChosen(e){if(!e)return;this.chosenFile=e,this.editor._insertingImage=!1,mK(`[fileChosen] file: `,e);let t=new FileReader;t.onload=()=>{let e=t.result;this.updateNode({src:e})},t.readAsDataURL(e)}progress(e,t,n){mK(`progress: `,e,t,n),this.updateNode({percent:e})}getChosenFile(){return this.chosenFile}};function gK(e){return Yr(`MuiDialogContent`,e)}Xr(`MuiDialogContent`,[`root`,`dividers`]);function _K(e){return Yr(`MuiDialogTitle`,e)}var vK=Xr(`MuiDialogTitle`,[`root`]),yK=e=>{let{classes:t,dividers:n}=e;return A({root:[`root`,n&&`dividers`]},gK,t)},bK=G(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Io(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${vK.root} + &`]:{paddingTop:0}}}]}))),xK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i};return(0,U.jsx)(bK,{className:k(yK(o).root,r),ownerState:o,ref:t,...a})}),SK=Vj((0,U.jsx)(`path`,{d:`M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z`}),`ArrowBackIos`);function CK(e){return Yr(`MuiFormHelperText`,e)}var wK=Xr(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),TK,EK=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return A({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${K(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},CK,t)},DK=G(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${K(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Io(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${wK.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${wK.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),OK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,m=JR({props:n,muiFormControl:XR(),states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};return delete h.ownerState,(0,U.jsx)(DK,{as:a,className:k(EK(h).root,i),ref:t,...p,ownerState:h,children:r===` `?TK||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:`​`}):r})});function kK(e){return Yr(`MuiTextField`,e)}Xr(`MuiTextField`,[`root`]);var AK={standard:VW,filled:qW,outlined:iG},jK=e=>{let{classes:t}=e;return A({root:[`root`]},kK,t)},MK=G(pz,{name:`MuiTextField`,slot:`Root`})({}),NK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:h,inputProps:g,InputProps:_,inputRef:v,label:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onFocus:E,placeholder:D,required:O=!1,rows:A,select:j=!1,SelectProps:M,slots:ee={},slotProps:N={},type:P,value:te,variant:F=`outlined`,...I}=n,L={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:S,required:O,select:j,variant:F},ne=jK(L),re=Wi(m),ie=p&&re?`${re}-helper-text`:void 0,R=y&&re?`${re}-label`:void 0,ae=AK[F],z={slots:ee,slotProps:{input:_,inputLabel:h,htmlInput:g,formHelperText:d,select:M,...N}},B={},oe=z.slotProps.inputLabel;F===`outlined`&&(oe&&oe.shrink!==void 0&&(B.notched=oe.shrink),B.label=y),j&&((!M||!M.native)&&(B.id=void 0),B[`aria-describedby`]=void 0);let[se,ce]=lI(`root`,{elementType:MK,shouldForwardComponentProp:!0,externalForwardedProps:{...z,...I},ownerState:L,className:k(ne.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:F}}),[le,ue]=lI(`input`,{elementType:ae,externalForwardedProps:z,additionalProps:B,ownerState:L}),[de,fe]=lI(`inputLabel`,{elementType:oz,externalForwardedProps:z,ownerState:L}),[V,pe]=lI(`htmlInput`,{elementType:`input`,externalForwardedProps:z,ownerState:L}),[me,he]=lI(`formHelperText`,{elementType:OK,externalForwardedProps:z,ownerState:L}),[ge,_e]=lI(`select`,{elementType:uG,externalForwardedProps:z,ownerState:L}),H=(0,U.jsx)(le,{"aria-describedby":ie,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:S,name:C,rows:A,maxRows:b,minRows:x,type:P,value:te,id:re,inputRef:v,onBlur:w,onChange:T,onFocus:E,placeholder:D,inputProps:pe,slots:{input:ee.htmlInput?V:void 0},...ue});return(0,U.jsxs)(se,{...ce,children:[y!=null&&y!==``&&(0,U.jsx)(de,{htmlFor:re,id:R,...fe,children:y}),j?(0,U.jsx)(ge,{"aria-describedby":ie,id:re,labelId:R,value:te,input:H,..._e,children:a}):H,p&&(0,U.jsx)(me,{id:ie,...he,children:p})]})});function PK(e){return Yr(`MuiDialogActions`,e)}Xr(`MuiDialogActions`,[`root`,`spacing`]);var FK=e=>{let{classes:t,disableSpacing:n}=e;return A({root:[`root`,!n&&`spacing`]},PK,t)},IK=G(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),LK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i};return(0,U.jsx)(IK,{className:k(FK(o).root,r),ownerState:o,ref:t,...a})});function RK(e){return Yr(`MuiDialog`,e)}var zK=Xr(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),BK=P.createContext({}),VK=G(gI,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),HK=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return A({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${K(n)}`],paper:[`paper`,`paperScroll${K(n)}`,`paperWidth${K(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},RK,t)},UK=G(EI,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),WK=G(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${K(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),GK=G(AI,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${K(n.scroll)}`],t[`paperWidth${K(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Io(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${zK.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${zK.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0,[`&.${zK.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),KK=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialog`}),r=Ao(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,BackdropComponent:c,BackdropProps:l,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:m=!1,maxWidth:h=`sm`,onClick:g,onClose:_,open:v,PaperComponent:y=AI,PaperProps:b={},role:x=`dialog`,scroll:S=`paper`,slots:C={},slotProps:w={},TransitionComponent:T=fI,transitionDuration:E=i,TransitionProps:D,...O}=n,A={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:S},j=HK(A),M=P.useRef(),ee=e=>{M.current=e.target===e.currentTarget},N=e=>{g&&g(e),M.current&&(M.current=null,_&&_(e,`backdropClick`))},te=Wi(o),F=P.useMemo(()=>({titleId:te}),[te]),I={slots:{transition:T,...C},slotProps:{transition:D,paper:b,backdrop:l,...w}},[L,ne]=lI(`root`,{elementType:UK,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:A,className:k(j.root,d),ref:t}),[re,ie]=lI(`backdrop`,{elementType:VK,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:A,className:j.backdrop}),[R,ae]=lI(`paper`,{elementType:GK,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:A,className:j.paper,additionalProps:{elevation:24,role:x,"aria-describedby":a,"aria-labelledby":te,"aria-modal":s,tabIndex:-1,[qF]:``}}),[z,B]=lI(`container`,{elementType:WK,externalForwardedProps:I,ownerState:A,className:j.container}),[oe,se]=lI(`transition`,{elementType:fI,externalForwardedProps:I,ownerState:A,additionalProps:{appear:!0,in:v,timeout:E,role:`presentation`}});return(0,U.jsx)(L,{closeAfterTransition:!0,slots:{backdrop:re},slotProps:{backdrop:{transitionDuration:E,as:c,...ie}},disableEscapeKeyDown:f,onClose:_,open:v,onClick:N,...ne,...O,children:(0,U.jsx)(oe,{...se,children:(0,U.jsx)(z,{onMouseDown:ee,...B,children:(0,U.jsx)(R,{as:y,...ae,children:(0,U.jsx)(BK.Provider,{value:F,children:u})})})})})}),qK=class extends P.Component{static propTypes={onDone:p.func.isRequired,alt:p.string};constructor(e){super(e);let{alt:t}=e;this.state={value:t}}closeDialog=()=>{document.querySelectorAll(`#text-dialog`).forEach(function(e){return e.remove()})};onDone=()=>{let{onDone:e}=this.props,{value:t}=this.state;e(t),this.closeDialog()};handleOverflow=()=>{document.body.style.removeProperty(`overflow`)};render(){let{value:e}=this.state;return(0,U.jsxs)(KK,{open:!0,disablePortal:!0,onClose:this.closeDialog,id:`text-dialog`,hideBackdrop:!0,disableScrollLock:!0,onEntered:this.handleOverflow,children:[(0,U.jsx)(xK,{children:(0,U.jsxs)(`div`,{style:{display:`flex`},children:[(0,U.jsx)(SK,{style:{paddingTop:`6px`}}),(0,U.jsx)(NK,{multiline:!0,placeholder:`Enter an Alt Text description of this image`,helperText:`Users with visual limitations rely on Alt Text, since screen readers cannot otherwise describe the contents of an image.`,value:e,onChange:e=>this.setState({value:e.target.value}),FormHelperTextProps:{style:{fontSize:14}}})]})}),(0,U.jsx)(LK,{children:(0,U.jsx)(PR,{onClick:this.onDone,children:`Done`})})]})}},JK=G(`button`,{shouldForwardProp:e=>![`active`,`disabled`,`extraStyles`].includes(e)})(({theme:e,active:t,disabled:n})=>({color:t?`black`:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:n?`not-allowed`:`pointer`,"&:hover":{color:n?`grey`:`black`},"&:focus":{outline:`2px solid ${e.palette.grey[700]}`},...n&&{opacity:.7}})),YK=D(`pie-elements:editable-html:raw-button`);(class extends P.Component{static propTypes={onClick:p.func.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool,disabled:p.bool,extraStyles:p.object};constructor(e){super(e)}onClick=e=>{YK(`[onClick]`),e.preventDefault();let{onClick:t}=this.props;t(e)};onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){YK(`[onKeyDown]`),e.preventDefault();let{onClick:t}=this.props;t(e)}};render(){let{active:e,children:t,disabled:n,extraStyles:r,ariaLabel:i}=this.props;return(0,U.jsx)(JK,{style:r,active:e,disabled:n,onMouseDown:this.onClick,onKeyDown:this.onKeyDown,"aria-label":i,"aria-pressed":e,tabIndex:0,children:t})}});var XK=class extends P.Component{static propTypes={onToggle:p.func.isRequired,mark:p.string,label:p.string.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool};constructor(e){super(e)}onToggle=e=>{e.preventDefault(),this.props.onToggle(this.props.mark)};onKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.props.onToggle(this.props.mark))};render(){let{children:e,active:t,label:n}=this.props;return(0,U.jsx)(JK,{active:t,onMouseDown:this.onToggle,"aria-pressed":t,onKeyDown:this.onKeyDown,"aria-label":n,tabIndex:0,children:e})}},ZK=D(`@pie-lib:editable-html:plugins:image:image-toolbar`),QK=G(`div`)(({theme:e})=>({paddingLeft:e.spacing.unit,display:`flex`,alignItems:`center`})),$K=G(`span`,{shouldForwardProp:e=>![`disabled`,`hasAlignmentButtons`].includes(e)})(({disabled:e,hasAlignmentButtons:t})=>({...e&&{opacity:.5},...t&&{borderLeft:`1px solid grey`,paddingLeft:8,marginLeft:4}})),eq=({alignment:e,active:t,onClick:n})=>(0,U.jsx)(XK,{active:t,onToggle:()=>n(e),label:e,children:e});eq.propTypes={alignment:p.string.isRequired,active:p.bool.isRequired,onClick:p.func.isRequired};var tq=class extends P.Component{static propTypes={onChange:p.func.isRequired,alignment:p.string,alt:p.string,imageLoaded:p.bool,disableImageAlignmentButtons:p.bool};onAltTextDone=e=>{ZK(`[onAltTextDone]: alt:`,e),this.props.onChange({alt:e},!0)};onAlignmentClick=e=>{ZK(`[onAlignmentClick]: alignment:`,e),this.props.onChange({alignment:e})};renderDialog=()=>{let{alt:e}=this.props,t=document.createElement(`div`),n=(0,U.jsx)(qK,{alt:e,onDone:this.onAltTextDone});db.render(n,t),document.body.appendChild(t)};render(){let{alignment:e,imageLoaded:t,disableImageAlignmentButtons:n}=this.props;return(0,U.jsxs)(QK,{children:[!n&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(eq,{alignment:`left`,active:e===`left`,onClick:this.onAlignmentClick}),(0,U.jsx)(eq,{alignment:`center`,active:e===`center`,onClick:this.onAlignmentClick}),(0,U.jsx)(eq,{alignment:`right`,active:e===`right`,onClick:this.onAlignmentClick})]}),(0,U.jsx)($K,{disabled:!t,hasAlignmentButtons:!n,onMouseDown:e=>t&&this.renderDialog(e),children:`Alt text`})]})}},nq=G(pK,{shouldForwardProp:e=>e!==`hideProgress`})(({hideProgress:e})=>({position:`absolute`,left:`0`,width:`fit-content`,top:`0%`,transition:`opacity 200ms linear`,...e&&{opacity:0}})),rq=G(`div`,{shouldForwardProp:e=>![`active`,`loading`,`pendingDelete`].includes(e)})(({loading:e,pendingDelete:t})=>({position:`relative`,display:`flex`,transition:`opacity 200ms linear`,...e&&{opacity:.3},...t&&{opacity:.3}})),iq=G(`div`)(({theme:e})=>({position:`relative`,width:`fit-content`,display:`flex`,alignItems:`center`,"&&:hover > .resize":{display:`block`}})),aq=G(`img`,{shouldForwardProp:e=>e!==`active`})(({theme:e,active:t})=>({border:t?`solid 1px ${e.palette.primary.main}`:`solid 1px transparent`})),oq=G(`div`)(({theme:e})=>({backgroundColor:e.palette.primary.main,cursor:`col-resize`,height:`35px`,width:`5px`,borderRadius:8,marginLeft:`5px`,marginRight:`10px`,display:`none`})),sq=e=>e?`${e}px`:`calc(20px)`;function cq(e){let{node:t,editor:n,attributes:r,onFocus:i,getPos:a,selected:o,options:s,maxImageWidth:c=700,maxImageHeight:l=900}=e,{alt:u}=t.attrs,d=a(),f=n.state.selection.from,p=n.state.selection.to,m=(0,P.useMemo)(()=>f+t.nodeSize===p,[f,p,t.nodeSize]),[h,g]=(0,P.useState)(!1),_=(0,P.useRef)(t),v=(0,P.useRef)(null),y=(0,P.useRef)(null),b=(0,P.useRef)(null),x=(0,P.useCallback)(e=>{let t=e/v.current.naturalWidth*4;return parseInt(t.toFixed(0)*25,10)},[]),S=(0,P.useCallback)(()=>{let e=_.current.attrs.nodeKey,t=null;return n.state.doc.descendants((n,r)=>{if(t!==null)return!1;if(n.type.name===`imageUploadNode`&&n.attrs.nodeKey===e)return t=r,!1}),t},[n]),w=(0,P.useCallback)(e=>{let t=S();if(t===null)return;let r=n.state.doc.nodeAt(t);r&&n.view.dispatch(n.state.tr.setNodeMarkup(t,void 0,{...r.attrs,...e}))},[n,S]),T=(0,P.useCallback)(()=>{if(!t.attrs.width||!v.current)return;let e=x(t.attrs.width);t.attrs.resizePercent!==e&&w({resizePercent:e})},[t.attrs.width,t.attrs.resizePercent,x,w]);(0,P.useEffect)(()=>{_.current={...t,pos:d}},[t,d]),(0,P.useEffect)(()=>{o?m&&(!String(t.attrs?.src??``).trim()&&s.imageHandling?.insertImageRequested&&s.imageHandling.insertImageRequested(n,[t,d],e=>new hK(n,[t,d],e)),g(o)):g(o)},[m,o]),(0,P.useEffect)(()=>{T();let e=y.current;return e&&e.addEventListener(`mousedown`,j,!1),()=>{e&&e.removeEventListener(`mousedown`,j,!1)}},[]),(0,P.useEffect)(()=>{T()});let E=(0,P.useCallback)(()=>{let e=v.current;if(e&&(!e.style.width||e.style.width===`calc(20px)`)){let n=Math.min(e.naturalWidth,c),r=Math.min(e.naturalHeight,l);e.style.width=`${n}px`,e.style.height=`${r}px`;let i={width:n,height:r};C(i,{width:t.attrs.width,height:t.attrs.height})||w(i)}},[t.attrs.width,t.attrs.height,c,l,w]),D=(e,t,n=!0,r)=>{if(n){let n=e.width/e.height;return r===`height`?{width:t.height*n,height:t.height}:{width:t.width,height:t.width/n}}return t},O=(0,P.useCallback)(e=>{let t=v.current;if(!t)return;let n=e.target.getBoundingClientRect(),r=D({width:t.naturalWidth,height:t.naturalHeight},{width:e.clientX-n.left,height:e.clientY-n.top});r.width>50&&r.height>50&&r.width<=700&&r.height<=900&&(t.style.width=`${r.width}px`,t.style.height=`${r.height}px`,w({width:r.width,height:r.height}))},[n,w]),k=(0,P.useCallback)(e=>{w(e)},[n,w]),A=(0,P.useCallback)(()=>{window.removeEventListener(`mousemove`,O),window.removeEventListener(`mouseup`,A)},[O]),j=(0,P.useCallback)(()=>{window.addEventListener(`mousemove`,O),window.addEventListener(`mouseup`,A)},[O,A]),M={width:sq(t.attrs.width),height:sq(t.attrs.height),objectFit:`contain`},ee={left:`flex-start`,center:`center`,right:`flex-end`}[t.attrs.alignment]||`flex-start`;return(0,U.jsxs)(jb,{children:[(0,U.jsxs)(rq,{onFocus:i,loading:!t.attrs.loaded,pendingDelete:t.attrs.deleteStatus===`pending`,style:{justifyContent:ee},children:[(0,U.jsx)(nq,{mode:`determinate`,value:t.attrs.percent||0,hideProgress:t.attrs.loaded}),(0,U.jsxs)(iq,{onDragStart:e=>e.preventDefault(),children:[(0,U.jsx)(aq,{...r,active:o&&t.attrs.loaded,draggable:!1,ref:v,src:t.attrs.src,style:M,onLoad:E,alt:t.attrs.alt}),(0,U.jsx)(oq,{ref:y,className:`resize`})]})]}),h&&n._tiptapContainerEl&&db.createPortal((0,U.jsx)(`div`,{ref:b,style:{zIndex:20,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,width:`100%`},children:(0,U.jsx)(NN,{showDone:!0,deletable:!0,toolbarOpts:s.toolbarOpts||{},onDelete:()=>{let e=S();e!==null&&(s.imageHandling?.onDelete?.(_.current),n.view.dispatch(n.state.tr.delete(e,e+n.state.doc.nodeAt(e).nodeSize)),g(!1),n.commands.focus())},onDone:()=>{g(!1),s.imageHandling?.onDone?.(n),n.commands.focus(`end`)},children:(0,U.jsx)(tq,{disableImageAlignmentButtons:s.imageHandling?.disableImageAlignmentButtons,alt:t.attrs.alt,imageLoaded:t.attrs.loaded,alignment:t.attrs.alignment||`left`,onChange:k})})}),n._tiptapContainerEl)]})}cq.propTypes={node:p.object.isRequired,editor:p.object.isRequired,attributes:p.object,onFocus:p.func,maxImageWidth:p.number,maxImageHeight:p.number};var lq=uy.create({name:`imageUploadNode`,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return{nodeKey:{default:null},loaded:{default:!1},deleteStatus:{default:null},alignment:{default:null},percent:{default:null},width:{default:null},height:{default:null},src:{default:null},alt:{default:null}}},parseHTML(){return[{tag:`img[data-type="image-upload-node"]`}]},renderHTML({HTMLAttributes:e}){return[`img`,m_(e,{"data-type":`image-upload-node`})]},addNodeView(){return zb(e=>(0,U.jsx)(cq,{...e,options:this.options}))},addCommands(){return{setImageUploadNode:()=>({commands:e})=>e.insertContent({type:this.name,attrs:{nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})}},addProseMirrorPlugins(){let e=this.editor;return[new cu({props:{handlePaste(t,n){let r=Array.from(n.clipboardData?.items||[]).find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!r)return!1;let i=r.getAsFile();if(!i)return!1;let a=new FileReader;return a.onload=()=>{let t=a.result;typeof t==`string`&&e.commands.insertContent({type:`imageUploadNode`,attrs:{src:t,loaded:!0,nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})},a.readAsDataURL(i),!0}}})]}});function uq(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function dq(e,t,n,r={},i=()=>{}){let{ease:a=uq,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var fq={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function pq(e){let{onChange:t,...n}=e,r=P.useRef(),i=P.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Xj(()=>{let e=Uj(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Jj(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),P.useEffect(()=>{a(),t(r.current)},[t]),(0,U.jsx)(`div`,{style:fq,...n,ref:i})}var mq=Vj((0,U.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),hq=Vj((0,U.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function gq(e){return Yr(`MuiTabScrollButton`,e)}var _q=Xr(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),vq=e=>{let{classes:t,orientation:n,disabled:r}=e;return A({root:[`root`,n,r&&`disabled`]},gq,t)},yq=G(iN,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${_q.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),bq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Ii(),d={isRtl:u,...n},f=vq(d),p=i.StartScrollButtonIcon??mq,m=i.EndScrollButtonIcon??hq,h=Az({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=Az({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,U.jsx)(yq,{component:`div`,className:k(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...l,style:{...l.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:o===`left`?(0,U.jsx)(p,{...h}):(0,U.jsx)(m,{...g})})});function xq(e){return Yr(`MuiTabs`,e)}var Sq=Xr(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Cq=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,wq=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Tq=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||i.getAttribute(`aria-disabled`)===`true`;if(!i.hasAttribute(`tabindex`)||t)i=n(e,i);else{i.focus();return}}},Eq=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return A({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,`flexContainer`,t&&`flexContainerVertical`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},xq,c)},Dq=G(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Sq.scrollButtons}`]:t.scrollButtons},{[`& .${Sq.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Io(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Sq.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Oq=G(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),kq=G(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Aq=G(`span`,{name:`MuiTabs`,slot:`Indicator`})(Io(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,transition:e.transitions.create(),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),jq=G(pq)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Mq={},Nq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTabs`}),r=Ao(),i=Ii(),{"aria-label":a,"aria-labelledby":o,action:s,centered:c=!1,children:l,className:u,component:d=`div`,allowScrollButtonsMobile:f=!1,indicatorColor:p=`primary`,onChange:m,orientation:h=`horizontal`,ScrollButtonComponent:g,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:S={},textColor:C=`primary`,value:w,variant:T=`standard`,visibleScrollbar:E=!1,...D}=n,O=T===`scrollable`,A=h===`vertical`,j=A?`scrollTop`:`scrollLeft`,M=A?`top`:`left`,ee=A?`bottom`:`right`,N=A?`clientHeight`:`clientWidth`,te=A?`height`:`width`,F={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:A,scrollButtons:_,textColor:C,variant:T,visibleScrollbar:E,fixed:!O,hideScrollbar:O&&!E,scrollableX:O&&!A,scrollableY:O&&A,centered:c&&!O,scrollButtonsHideMobile:!f},I=Eq(F),L=Az({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:F}),ne=Az({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:F}),[re,ie]=P.useState(!1),[R,ae]=P.useState(Mq),[z,B]=P.useState(!1),[oe,se]=P.useState(!1),[ce,le]=P.useState(!1),[ue,de]=P.useState({overflow:`hidden`,scrollbarWidth:0}),fe=new Map,V=P.useRef(null),pe=P.useRef(null),me={slots:y,slotProps:{indicator:x,scrollButtons:S,...b}},he=()=>{let e=V.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&w!==!1){let e=pe.current.children;if(e.length>0){let t=e[fe.get(w)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ge=tM(()=>{let{tabsMeta:e,tabMeta:t}=he(),n=0,r;A?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[te]:t?t[te]:0};if(typeof R[r]!=`number`||typeof R[te]!=`number`)ae(a);else{let e=Math.abs(R[r]-a[r]),t=Math.abs(R[te]-a[te]);(e>=1||t>=1)&&ae(a)}}),_e=(e,{animation:t=!0}={})=>{t?dq(j,V.current,e,{duration:r.transitions.duration.standard}):V.current[j]=e},H=e=>{let t=V.current[j];A?t+=e:t+=e*(i?-1:1),_e(t)},ve=()=>{let e=V.current[N],t=0,n=Array.from(pe.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[N]>e){r===0&&(t=e);break}t+=i[N]}return t},ye=()=>{H(-1*ve())},be=()=>{H(ve())},[xe,{onChange:Se,...Ce}]=lI(`scrollbar`,{className:k(I.scrollableX,I.hideScrollbar),elementType:jq,shouldForwardComponentProp:!0,externalForwardedProps:me,ownerState:F}),we=P.useCallback(e=>{Se?.(e),de({overflow:null,scrollbarWidth:e})},[Se]),[Te,Ee]=lI(`scrollButtons`,{className:k(I.scrollButtons,S.className),elementType:bq,externalForwardedProps:me,ownerState:F,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:y.startScrollButtonIcon||y.StartScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon||y.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:L,endScrollButtonIcon:ne}}}),De=()=>{let e={};e.scrollbarSizeListener=O?(0,U.jsx)(xe,{...Ce,onChange:we}):null;let t=O&&(_===`auto`&&(z||oe)||_===!0);return e.scrollButtonStart=t?(0,U.jsx)(Te,{direction:i?`right`:`left`,onClick:ye,disabled:!z,...Ee}):null,e.scrollButtonEnd=t?(0,U.jsx)(Te,{direction:i?`left`:`right`,onClick:be,disabled:!oe,...Ee}):null,e},Oe=tM(e=>{let{tabsMeta:t,tabMeta:n}=he();!n||!t||(n[M]<t[M]?_e(t[j]+(n[M]-t[M]),{animation:e}):n[ee]>t[ee]&&_e(t[j]+(n[ee]-t[ee]),{animation:e}))}),ke=tM(()=>{O&&_!==!1&&le(!ce)});P.useEffect(()=>{let e=Uj(()=>{V.current&&ge()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),ke()},r=Jj(V.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(pe.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(pe.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[ge,ke]),P.useEffect(()=>{let e=Array.from(pe.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&O&&_!==!1){let n=e[0],r=e[t-1],i={root:V.current,threshold:.99},a=new IntersectionObserver(e=>{B(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{se(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[O,_,ce,l?.length]),P.useEffect(()=>{ie(!0)},[]),P.useEffect(()=>{ge()}),P.useEffect(()=>{Oe(Mq!==R)},[Oe,R]),P.useImperativeHandle(s,()=>({updateIndicator:ge,updateScrollButtons:ke}),[ge,ke]);let[Ae,je]=lI(`indicator`,{className:k(I.indicator,x.className),elementType:Aq,externalForwardedProps:me,ownerState:F,additionalProps:{style:R}}),Me=(0,U.jsx)(Ae,{...je}),Ne=0,Pe=P.Children.map(l,e=>{if(!P.isValidElement(e))return null;let t=e.props.value===void 0?Ne:e.props.value;fe.set(t,Ne);let n=t===w;return Ne+=1,P.cloneElement(e,{fullWidth:T===`fullWidth`,indicator:n&&!re&&Me,selected:n,selectionFollowsFocus:v,onChange:m,textColor:C,value:t,...Ne===1&&w===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),Fe=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=pe.current,n=KF(Kj(t));if(n?.getAttribute(`role`)!==`tab`)return;let r=h===`horizontal`?`ArrowLeft`:`ArrowUp`,a=h===`horizontal`?`ArrowRight`:`ArrowDown`;switch(h===`horizontal`&&i&&(r=`ArrowRight`,a=`ArrowLeft`),e.key){case r:e.preventDefault(),Tq(t,n,wq);break;case a:e.preventDefault(),Tq(t,n,Cq);break;case`Home`:e.preventDefault(),Tq(t,null,Cq);break;case`End`:e.preventDefault(),Tq(t,null,wq);break;default:break}},Ie=De(),[Le,Re]=lI(`root`,{ref:t,className:k(I.root,u),elementType:Dq,externalForwardedProps:{...me,...D,component:d},ownerState:F}),[ze,Be]=lI(`scroller`,{ref:V,className:I.scroller,elementType:Oq,externalForwardedProps:me,ownerState:F,additionalProps:{style:{overflow:ue.overflow,[A?`margin${i?`Left`:`Right`}`:`marginBottom`]:E?void 0:-ue.scrollbarWidth}}}),[Ve,He]=lI(`list`,{ref:pe,className:k(I.list,I.flexContainer),elementType:kq,externalForwardedProps:me,ownerState:F,getSlotProps:e=>({...e,onKeyDown:t=>{Fe(t),e.onKeyDown?.(t)}})});return(0,U.jsxs)(Le,{...Re,children:[Ie.scrollButtonStart,Ie.scrollbarSizeListener,(0,U.jsxs)(ze,{...Be,children:[(0,U.jsx)(Ve,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...He,children:Pe}),re&&Me]}),Ie.scrollButtonEnd]})});function Pq(e){return Yr(`MuiTab`,e)}var Fq=Xr(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),Iq=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return A({root:[`root`,a&&o&&`labelIcon`,`textColor${K(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},Pq,t)},Lq=G(iN,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${K(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Fq.iconWrapper}`]:t.iconWrapper},{[`& .${Fq.icon}`]:t.icon}]}})(Io(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${Fq.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${Fq.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${Fq.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${Fq.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${Fq.selected}`]:{opacity:1},[`&.${Fq.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${Fq.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Fq.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${Fq.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Fq.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Rq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},x=Iq(b),S=s&&u&&P.isValidElement(s)?P.cloneElement(s,{className:k(x.icon,s.props.className)}):s;return(0,U.jsxs)(Lq,{focusRipple:!a,className:k(x.root,r),ref:t,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},ownerState:b,tabIndex:m?0:-1,...y,children:[c===`top`||c===`start`?(0,U.jsxs)(P.Fragment,{children:[S,u]}):(0,U.jsxs)(P.Fragment,{children:[u,S]}),l]})}),zq=e=>{let{classes:t}=e;return A({root:[`root`]},_K,t)},Bq=G(qo,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),Vq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=zq(o),{titleId:c=i}=P.useContext(BK);return(0,U.jsx)(Bq,{component:`h2`,className:k(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function Hq(e){return Yr(`MuiDialogContentText`,e)}Xr(`MuiDialogContentText`,[`root`]);var Uq=e=>{let{classes:t}=e,n=A({root:[`root`]},Hq,t);return{...t,...n}},Wq=G(qo,{shouldForwardProp:e=>No(e)||e===`classes`,name:`MuiDialogContentText`,slot:`Root`})({}),Gq=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiDialogContentText`}),{children:r,className:i,...a}=n,o=Uq(a);return(0,U.jsx)(Wq,{component:`p`,variant:`body1`,color:`textSecondary`,ref:t,ownerState:a,className:k(o.root,i),...n,classes:o})}),Kq=D(`@pie-lib:editable-html:plugins:media:dialog`),qq=e=>{if(!e)return!1;let t=/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return e.match(t)?e.match(t)[1]:!1},Jq=e=>e&&/(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(e),Yq=e=>e&&/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)/.test(e),Xq=e=>{if(!e)return!1;let t=/^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;return e.match(t)&&e.match(t)[2]},Zq=e=>new Promise(t=>{try{fetch(`https://soundcloud.com/oembed?format=json&url=${e}`).then(e=>e.json()).then(e=>{let n=document.createElement(`div`);n.innerHTML=e.html,t(n.querySelector(`iframe`).src)}).catch(e=>{t(``),Kq(e)})}catch{t(``)}}),Qq={video:`Video`,audio:`Audio`},$q={uploadFile:`upload-file`,insertUrl:`insert-url`},eJ=G(KK)(({theme:e})=>({"& .MuiDialog-paper":{minWidth:`500px`}})),tJ=G(xK)(({theme:e})=>({padding:0})),nJ=G(`div`)(({theme:e})=>({display:`flex`,flexDirection:`space-between`})),rJ=G(`div`)(({theme:e})=>({marginTop:e.spacing(1.5)})),iJ=G(`input`)(({theme:e})=>({})),aJ=G(qo)(({theme:e})=>({marginTop:e.spacing(1.5),color:e.palette.error.main})),oJ=G(CN)(({theme:e})=>({marginLeft:e.spacing(1.5)})),sJ=class extends P.Component{static propTypes={open:p.bool,edit:p.bool,disablePortal:p.bool,handleClose:p.func,uploadSoundSupport:p.shape({add:p.func,delete:p.func}),type:p.string,src:p.string,url:p.string,urlToUse:p.string,starts:p.number,ends:p.number,height:p.number,width:p.number};constructor(e){super(e);let{ends:t,height:n,src:r,starts:i,type:a,uploadSoundSupport:o,url:s,urlToUse:c,width:l}=e,u=o?.add&&o?.delete&&a!==`video`&&!r;this.state={ends:t||0,url:s,urlToUse:c,formattedUrl:r,height:n||315,invalid:!1,starts:i||0,width:l||560,tabValue:u?$q.uploadFile:$q.insertUrl,fileUpload:{error:null,loading:!1,scheduled:!1,url:``,mimeType:``}}}componentDidMount(){this.props.url&&this.urlChange({target:{value:this.props.url}})}formatUrl=()=>{let{url:e,urlToUse:t,starts:n,ends:r}=this.state,i=qq(e),a=Jq(e),o=t;if((i||a)&&t){let e=[],s,c;switch(!0){case a:s=`t`,c=`#`;break;case i:s=`start`,c=`?`;break;default:s=`start`,c=`?`}n&&e.push(`${s}=${n}`),r&&e.push(`end=${r}`),o=`${t}${e.length?c:``}${e.join(`&`)}`}this.setState({formattedUrl:null,updating:!0},()=>this.setState({formattedUrl:o,updating:!1}))};handleStateChange=e=>this.setState(e,this.formatUrl);checkAudio=e=>{Xq(e)&&Zq(e).then(t=>{this.handleStateChange({urlToUse:t,invalid:!t,url:e})}).catch(Kq)};checkVideo=e=>{if(qq(e)){let t=`https://youtube.com/embed/${e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)[2]}`;Kq(`is youtube`),this.handleStateChange({urlToUse:t,url:e,invalid:!1})}if(Jq(e)){let t=`https://player.vimeo.com/video/${e.replace(/.*vimeo.com\/(.*)/g,`$1`)}`;Kq(`is vimeo`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}if(Yq(e)){let t=`https://drive.google.com/file/d/${e.replace(/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)\/.*/,`$1`)}/preview`;Kq(`is google drive`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}};urlChange=e=>{let{value:t}=e.target||{},{type:n}=this.props;if(n&&n===`audio`){this.checkAudio(t);return}else if(n&&n===`video`){this.checkVideo(t);return}this.handleStateChange({urlToUse:null,url:null,invalid:!0})};changeHandler=e=>t=>this.handleStateChange({[e]:t.target.value});handleDone=e=>{let{handleClose:t}=this.props,{tabValue:n,fileUpload:r}=this.state,i=n===$q.insertUrl;if(!e){r.url&&this.handleRemoveFile(),t(e);return}if(i){let{ends:n,height:r,url:i,urlToUse:a,formattedUrl:o,starts:s,width:c}=this.state;t(e,{tag:`iframe`,ends:n,height:r,starts:s,width:c,url:i,urlToUse:a,src:o});return}if(!r.loading){t(e,{tag:`audio`,src:r.url});return}this.setState({fileUpload:{...r,scheduled:!0}})};handleUploadFile=async e=>{e.preventDefault(),this.setState({fileUpload:{...this.state.fileUpload,error:null,loading:!0}});let t=e.target.files[0],n=new FileReader;n.onload=()=>{let e=n.result;this.setState({fileUpload:{...this.state.fileUpload,url:e,mimeType:t.type}})},n.readAsDataURL(t),this.props.uploadSoundSupport.add({fileChosen:t,done:(e,t)=>{if(Kq(`done: err:`,e),e){console.log(e),this.setState({fileUpload:{...this.state.fileUpload,scheduled:!1,loading:!1,error:e}});return}let{fileUpload:n}=this.state,r=n&&n.scheduled?this.handleDone.bind(this,!0):void 0;this.setState({fileUpload:{...n,scheduled:!1,loading:!1,url:t}},r)}})};handleRemoveFile=async()=>{this.props.uploadSoundSupport.delete(this.state.fileUpload.url,e=>{e&&(console.log(e),this.setState({fileUpload:{...this.state.fileUpload,error:e}}))}),this.setState({fileUpload:{...this.state.fileUpload,loading:!1,url:``,mimeType:``}})};render(){let{open:e,disablePortal:t,type:n,edit:r,uploadSoundSupport:i}=this.props,{ends:a,height:o,invalid:s,starts:c,width:l,url:u,mimeType:d,formattedUrl:f,updating:p,tabValue:m,fileUpload:h}=this.state,g=qq(u),_=m===$q.insertUrl,v=m===$q.uploadFile,y=_?s||u==null:!h.url||h.scheduled,b=i?.add&&i?.delete&&n!==`video`;return(0,U.jsxs)(eJ,{disablePortal:t,open:e,onClose:()=>this.handleDone(!1),"aria-labelledby":`form-dialog-title`,children:[(0,U.jsxs)(Vq,{id:`form-dialog-title`,children:[`Insert `,Qq[n]]}),(0,U.jsx)(xK,{children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(nJ,{children:(0,U.jsxs)(Nq,{indicatorColor:`primary`,value:m,onChange:(e,t)=>{this.setState({tabValue:t})},children:[b?(0,U.jsx)(Rq,{value:$q.uploadFile,label:`Upload file`}):null,(0,U.jsx)(Rq,{value:$q.insertUrl,label:n===`video`?`Insert YouTube, Vimeo, or Google Drive URL`:`Insert SoundCloud URL`})]})}),_&&(0,U.jsxs)(`div`,{children:[(0,U.jsx)(NK,{autoFocus:!0,error:s,helperText:s?`Invalid URL`:``,margin:`dense`,id:`name`,label:`URL`,placeholder:`Paste URL of ${n}...`,type:`text`,onChange:this.urlChange,value:u,fullWidth:!0}),n===`video`&&(0,U.jsxs)(tJ,{children:[(0,U.jsx)(Gq,{children:`Video Properties`}),(0,U.jsx)(NK,{autoFocus:!0,margin:`dense`,id:`width`,label:`Width`,type:`number`,placeholder:`Width`,value:l,onChange:this.changeHandler(`width`)}),(0,U.jsx)(NK,{autoFocus:!0,margin:`dense`,id:`height`,label:`Height`,type:`number`,placeholder:`Height`,value:o,onChange:this.changeHandler(`height`)})]}),f&&(0,U.jsx)(`iframe`,{width:l,height:o,src:f,frameBorder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowFullScreen:!0}),n===`video`&&(f||p)&&!s&&(0,U.jsx)(P.Fragment,{children:(0,U.jsxs)(tJ,{children:[(0,U.jsx)(NK,{autoFocus:!0,margin:`dense`,id:`starts`,label:`Starts`,type:`number`,placeholder:`Starts`,value:c,onChange:this.changeHandler(`starts`)}),g&&(0,U.jsx)(NK,{autoFocus:!0,margin:`dense`,id:`ends`,label:`Ends`,type:`number`,placeholder:`Ends`,value:a,onChange:this.changeHandler(`ends`)})]})})]}),v&&(0,U.jsx)(rJ,{children:(0,U.jsxs)(`div`,{children:[h.url?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(nJ,{children:[(0,U.jsx)(`audio`,{controls:`controls`,controlsList:`nodownload`,children:(0,U.jsx)(`source`,{type:d,src:h.url})}),(0,U.jsx)(oJ,{"aria-label":`delete`,onClick:this.handleRemoveFile,children:(0,U.jsx)(wN,{})})]}),!h.scheduled&&h.loading?(0,U.jsx)(qo,{variant:`subheading`,children:`Loading...`}):null,h.scheduled?(0,U.jsx)(qo,{variant:`subheading`,children:`Waiting for Upload to finish, then inserting item...`}):null]}):h.loading?null:(0,U.jsx)(iJ,{accept:`audio/*`,onChange:this.handleUploadFile,type:`file`}),!!h.error&&(0,U.jsx)(aJ,{variant:`caption`,children:h.error})]})})]})}),(0,U.jsxs)(LK,{children:[(0,U.jsx)(PR,{onClick:()=>this.handleDone(!1),color:`primary`,children:`Cancel`}),(0,U.jsx)(PR,{disabled:y,onClick:()=>this.handleDone(!0),color:`primary`,children:r?`Update`:`Insert`})]})]})}},cJ=G(`span`)(({theme:e})=>({position:`relative`,bottom:`5px`,left:0,width:`100%`,background:e.palette.common.white,display:`inline-flex`,padding:`5px`,boxShadow:`0px 4px 4px rgba(0, 0, 0, 0.25)`})),lJ=G(`span`)(({theme:e})=>({cursor:`pointer`,flex:3,border:`solid ${e.palette.common.black}`,textAlign:`right`,borderWidth:`0 2px 0 0`,marginRight:`5px`,paddingRight:`5px`})),uJ=G(`span`)({cursor:`pointer`}),dJ=class extends P.Component{static propTypes={onEdit:p.func,hideEdit:p.bool,onRemove:p.func};render(){let{hideEdit:e,onEdit:t,onRemove:n}=this.props;return(0,U.jsxs)(cJ,{children:[e?null:(0,U.jsx)(lJ,{onClick:t,children:`Edit Settings`}),(0,U.jsx)(uJ,{onClick:n,children:`Remove`})]})}},fJ=uy.create({name:`media`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{type:{default:`video`},src:{default:null},width:{default:null},height:{default:null},title:{default:null},starts:{default:null},ends:{default:null},editing:{default:!1},tag:{default:`iframe`},url:{default:null}}},parseHTML(){return[{tag:`iframe[data-type="video"]`,getAttrs:e=>({type:`video`,tag:`iframe`,src:e.getAttribute(`src`),width:e.getAttribute(`width`),height:e.getAttribute(`height`),title:e.dataset.title,starts:e.dataset.starts,ends:e.dataset.ends,url:e.dataset.url})},{tag:`audio`,getAttrs:e=>({type:`audio`,tag:`audio`,src:e.querySelector(`source`)?.getAttribute(`src`)})}]},renderHTML({HTMLAttributes:e}){let{tag:t,src:n,width:r,height:i}=e;return t===`audio`?[`audio`,{controls:`controls`,controlsList:`nodownload`},[`source`,{src:n,type:`audio/mp3`}]]:[`iframe`,m_({"data-type":`video`,frameborder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowfullscreen:``,src:n},r?{width:r}:{},i?{height:i}:{})]},addCommands(){return{insertMedia:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateMedia:e=>({commands:t})=>t.updateAttributes(this.name,e)}},addNodeView(){return zb(e=>(0,U.jsx)(hJ,{...e,options:this.options}))}}),pJ=()=>{document.querySelectorAll(`.insert-media-dialog`).forEach(e=>e.remove())},mJ=e=>{let t=document.createElement(`div`),{type:n,callback:r,options:i,...a}=e,o=document.body.style.overflow;pJ(),t.className=`insert-media-dialog`,document.body.style.overflow=`hidden`;let s=(e,n)=>{r(e,n),t.remove(),document.body.style.overflow=o},c=(0,U.jsx)(sJ,{...a,uploadSoundSupport:i.uploadSoundSupport,type:n,disablePortal:!0,open:!0,handleClose:s});db.render(c,t),document.body.appendChild(t)};function hJ({editor:e,node:t,updateAttributes:n,deleteNode:r,options:i}){let{type:a,src:o,width:s,height:c,tag:l}=t.attrs;return(0,P.useEffect)(()=>{o||mJ({...t.attrs,options:i,edit:!0,callback:(t,i)=>{t?n(i):r(),e.chain().focus().run()}})},[]),(0,U.jsxs)(jb,{"data-type":a,style:{width:s,height:c},children:[l===`audio`?(0,U.jsx)(`audio`,{controls:!0,controlsList:`nodownload`,children:(0,U.jsx)(`source`,{type:`audio/mp3`,src:o})}):(0,U.jsx)(`iframe`,{src:o,allowFullScreen:!0,frameBorder:`0`,width:s,height:c}),(0,U.jsx)(dJ,{onEdit:()=>{mJ({...t.attrs,options:i,edit:!0,callback:(t,r)=>{t&&n(r),e.chain().focus().run()}})},onRemove:r})]})}function gJ(e){return Yr(`MuiListItem`,e)}Xr(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var _J=Xr(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function vJ(e){return Yr(`MuiListItemSecondaryAction`,e)}Xr(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var yJ=e=>{let{disableGutters:t,classes:n}=e;return A({root:[`root`,t&&`disableGutters`]},vJ,n)},bJ=G(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),xJ=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=P.useContext(jz),o={...n,disableGutters:a.disableGutters};return(0,U.jsx)(bJ,{className:k(yJ(o).root,r),ownerState:o,ref:t,...i})});xJ.muiName=`ListItemSecondaryAction`;var SJ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},CJ=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return A({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},gJ,n)},wJ=G(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:SJ})(Io(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${_J.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),TJ=G(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),EJ=P.forwardRef(function(e,t){let n=Lo({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o,components:s={},componentsProps:c={},ContainerComponent:l=`li`,ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:m=!1,divider:h=!1,secondaryAction:g,slotProps:_={},slots:v={},...y}=n,b=P.useContext(jz),x=P.useMemo(()=>({dense:f||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,f,p]),S=P.useRef(null),C=P.Children.toArray(i),w=C.length&&Wj(C[C.length-1],[`ListItemSecondaryAction`]),T={...n,alignItems:r,dense:x.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:w},E=CJ(T),D=rM(S,t),[O,A]=lI(`secondaryAction`,{elementType:xJ,externalForwardedProps:{slots:v,slotProps:_},ownerState:T,className:E.secondaryAction}),j=v.root||s.Root||wJ,M=_.root||c.root||{},ee={className:k(E.root,M.className,a),...y},N=o||`li`;return w?(N=!ee.component&&!o?`div`:N,l===`li`&&(N===`li`?N=`div`:ee.component===`li`&&(ee.component=`div`)),(0,U.jsx)(jz.Provider,{value:x,children:(0,U.jsxs)(TJ,{as:l,className:k(E.container,u),ref:D,ownerState:T,...d,children:[(0,U.jsx)(j,{...M,...!CF(j)&&{as:N,ownerState:{...T,...M.ownerState}},...ee,children:C}),C.pop()]})})):(0,U.jsx)(jz.Provider,{value:x,children:(0,U.jsxs)(j,{...M,as:N,ref:D,...!CF(j)&&{ownerState:{...T,...M.ownerState}},...ee,children:[C,g&&(0,U.jsx)(O,{...A,children:g})]})})}),DJ=()=>{document.querySelectorAll(`.insert-css-dialog`).forEach(e=>e.remove())},OJ=({editor:e,callback:t,opts:n,selectedText:r,parentNode:i})=>{let a=e.options.element,o=document.createElement(`div`),{selection:s}=e.state;DJ(),o.className=`insert-css-dialog`;let c=!1,l=e=>{if(c){let t=o.contains(e.target)||void 0,n=a.contains(e.target);t||n||u()}else c=!0},u=()=>{t(void 0,!0),o.remove(),document.body.removeEventListener(`click`,l)},d=e=>{t(e,!0),o.remove(),document.body.removeEventListener(`click`,l)},f=i?.attrs.class,p=e=>{let t=`<span class="${e}">${r}</span>`;if(i){let e=`span`;i?.object===`inline`&&(e=`span`),i?.object===`block`&&(e=`div`),t=`<${e} class="${f}">${i.text.slice(0,s.$anchor.textOffset)}${t}${i.text.slice(s.$head.textOffset)}</${e}>`}return t},m=(0,U.jsxs)(`div`,{style:{background:`white`,height:500,padding:20,overflow:`hidden`,display:`flex`,flexFlow:`column`},children:[(0,U.jsx)(`h2`,{children:`Please choose a css class`}),f&&(0,U.jsxs)(`div`,{children:[`The current parent has this class `,f]}),(0,U.jsx)(Fz,{component:`nav`,style:{overflow:`scroll`},children:n.names.map((e,t)=>(0,U.jsxs)(EJ,{button:!0,onClick:()=>d(e),children:[(0,U.jsx)(`div`,{style:{marginRight:20},children:e}),(0,U.jsx)(`div`,{dangerouslySetInnerHTML:{__html:p(e)}})]},`rule-${t}`))})]});db.render(m,o,()=>{let t=e.view.nodeDOM(e.state.selection.from)?.parentNode;if(t){let e=a.parentElement.parentElement.parentElement.getBoundingClientRect(),n=t.getBoundingClientRect();a.parentElement.parentElement.parentElement.appendChild(o),o.style.maxWidth=`500px`,o.style.position=`absolute`,o.style.top=0,o.style.zIndex=99999;let r=`${n.left+Math.abs(e.left)+t.offsetWidth+10}px`,i=`${n.x}px`;o.style.left=r;let s=o.offsetWidth;o.style.left=`unset`,o.style.right=i;let c=o.offsetWidth;o.style.left=`unset`,o.style.right=`unset`,s>=c?o.style.left=r:o.style.right=i,document.body.addEventListener(`click`,l)}})},kJ=Ev.create({name:`cssmark`,addOptions(){return{classes:[]}},addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}},parseHTML(){return[{tag:`span[class]`,getAttrs:e=>{let t=e.getAttribute(`class`)||``,n=this.options.classes.find(e=>t.includes(e));return n?{class:n}:!1}}]},renderHTML({HTMLAttributes:e}){return[`span`,m_(e),0]},addCommands(){return{setCSSClass:e=>({commands:t})=>t.setMark(this.name,{class:e}),unsetCSSClass:()=>({commands:e})=>e.unsetMark(this.name),openCSSClassDialog:()=>({editor:e})=>{OJ({editor:e,selectedText:e.state.doc.textBetween(e.state.selection.from,e.state.selection.to),parentNode:e.state.selection.$from.nodeAfter,opts:this.options.extraCSSRules,callback:t=>{t&&e.chain().focus().setCSSClass(t).run()}})}}}}),AJ=Object.defineProperty,jJ=(e,t)=>{for(var n in t)AJ(e,n,{get:t[n],enumerable:!0})},MJ=`listItem`,NJ=`textStyle`,PJ=/^\s*([-+*])\s$/,FJ=uy.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,m_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
380
+ `):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(MJ,this.editor.getAttributes(NJ)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Zv({find:PJ,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Zv({find:PJ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(NJ),editor:this.editor})),[e]}});function IJ(e){let t=e.tokens?.[0];return!!(e.text&&e.tokens?.length===1&&t?.type===`list`&&t.ordered&&t.raw===e.text)}function LJ(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:`text`,raw:e,text:e}])}var RJ=uy.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,m_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(IJ(e))return{type:`listItem`,content:[{type:`paragraph`,content:LJ(e.text||``,t)}]};if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>cy(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});jJ({},{findListItemPos:()=>zJ,getNextListDepth:()=>BJ,handleBackspace:()=>WJ,handleDelete:()=>qJ,hasListBefore:()=>VJ,hasListItemAfter:()=>JJ,hasListItemBefore:()=>HJ,listItemHasSubList:()=>UJ,nextListIsDeeper:()=>GJ,nextListIsHigher:()=>KJ});var zJ=(e,t)=>{let{$from:n}=t.selection,r=Qh(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},BJ=(e,t)=>{let n=zJ(e,t);if(!n)return!1;let[,r]=M_(t,e,n.$pos.pos+4);return r},VJ=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},HJ=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},UJ=(e,t,n)=>{if(!n)return!1;let r=Qh(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},WJ=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Rg(e.state,t)&&VJ(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!Rg(e.state,t)||!z_(e.state))return!1;let r=zJ(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=UJ(t,e.state,i);return HJ(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},GJ=(e,t)=>{let n=BJ(e,t),r=zJ(e,t);return!r||!n?!1:n>r.depth},KJ=(e,t)=>{let n=BJ(e,t),r=zJ(e,t);return!r||!n?!1:n<r.depth},qJ=(e,t)=>{if(!Rg(e.state,t)||!R_(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:GJ(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():KJ(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},JJ=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},YJ=Pv.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&qJ(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&qJ(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&WJ(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&WJ(e,n,r)&&(t=!0)}),t}}}}),XJ=/^(\s*)(\d+)\.\s+(.*)$/,ZJ=/^\s/;function QJ(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function $J(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r){n.push(e);return}if(e.trim()===``){r=!0,n.push(e);return}if(t.length>0&&QJ(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function eY(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(XJ);if(!a)break;let[,o,s,c]=a,l=o.length,u=[c],d=n+1,f=[i],p=!1;for(;d<e.length;){let t=e[d];if(t.match(XJ))break;if(t.trim()===``)f.push(t),u.push(``),p=!0,d+=1;else if(t.match(ZJ))f.push(t),u.push(t.slice(l+2)),d+=1;else{if(p)break;f.push(t),u.push(t),d+=1}}t.push({indent:l,number:parseInt(s,10),content:u.join(`
381
381
  `).trim(),contentLines:u,raw:f.join(`
382
- `)}),r=d,n=d}return[t,r]}function $J(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let{paragraphLines:o,blockLines:s}=ZJ(a.contentLines),c=o.join(`
382
+ `)}),r=d,n=d}return[t,r]}function tY(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let{paragraphLines:o,blockLines:s}=$J(a.contentLines),c=o.join(`
383
383
  `).trim(),l=[];c&&l.push({type:`paragraph`,raw:c,tokens:n.inlineTokens(c)});let u=s.join(`
384
- `).trim();if(u){let e=n.blockTokens(u);l.push(...e)}let d=i+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let e=$J(f,Math.min(...f.map(e=>e.indent)),n);l.push({type:`list`,ordered:!0,start:f[0].number,items:e,raw:f.map(e=>e.raw).join(`
385
- `)})}r.push({type:`list_item`,raw:a.raw,tokens:l}),i=d}else i+=1}return r}function eY(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var tY=`listItem`,nY=`textStyle`,rY=/^(\d+)\.\s$/,iY=uy.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>e.getAttribute(`type`)}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?[`ol`,m_(this.options.HTMLAttributes,n),0]:[`ol`,m_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.items?eY(e.items,t):[];return n===1?{type:`orderedList`,content:r}:{type:`orderedList`,attrs:{start:n},content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
384
+ `).trim();if(u){let e=n.blockTokens(u);l.push(...e)}let d=i+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let e=tY(f,Math.min(...f.map(e=>e.indent)),n);l.push({type:`list`,ordered:!0,start:f[0].number,items:e,raw:f.map(e=>e.raw).join(`
385
+ `)})}r.push({type:`list_item`,raw:a.raw,tokens:l}),i=d}else i+=1}return r}function nY(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var rY=`listItem`,iY=`textStyle`,aY=/^(\d+)\.\s$/,oY=uy.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>e.getAttribute(`type`)}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?[`ol`,m_(this.options.HTMLAttributes,n),0]:[`ol`,m_(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.items?nY(e.items,t):[];return n===1?{type:`orderedList`,content:r}:{type:`orderedList`,attrs:{start:n},content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
386
386
  `):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
387
- `),[i,a]=QJ(r);if(i.length===0)return;let o=$J(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
388
- `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(tY,this.editor.getAttributes(nY)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Zv({find:rY,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Zv({find:rY,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(nY)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),aY=/^\s*(\[([( |x])?\])\s$/,oY=uy.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,m_(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>cy(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=h_(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Zv({find:aY,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),sY=uy.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,m_(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
389
- `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=sy(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=sy(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Pv.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(NJ.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(IJ.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(qJ.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(iY.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(oY.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(sY.configure(this.options.taskList)),e}});var cY=IJ.extend({content:`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`}),lY=uy.create({name:`headingParagraph`,group:`block`,content:`inline*`,defining:!0,addAttributes(){return{"data-heading":{default:`heading1`,parseHTML:e=>e.getAttribute(`data-heading`),renderHTML:e=>({"data-heading":e[`data-heading`]})}}},parseHTML(){return[{tag:`p[data-heading]`}]},renderHTML({HTMLAttributes:e}){return[`p`,m_(e),0]},addCommands(){return{toggleHeadingParagraph:()=>({commands:e,editor:t})=>t.isActive(`headingParagraph`)?e.setNode(`paragraph`):e.setNode(`headingParagraph`,{"data-heading":`heading1`})}}}),uY=e=>{if(!e)return;let t=/^calc\((.*)\)$/;if(typeof e==`string`){if(e.endsWith(`%`))return;if(e.endsWith(`px`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`ch`)||e.endsWith(`em`)||e.match(t))return e;let n=parseInt(e,10);return Number.isNaN(n)?n:`${n}px`}if(typeof e==`number`)return`${e}px`},dY=Vj((0,U.jsx)(`path`,{d:`M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5`}),`FormatBold`),fY=Vj((0,U.jsx)(`path`,{d:`M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z`}),`FormatItalic`),pY=Vj((0,U.jsx)(`path`,{d:`M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z`}),`FormatStrikethrough`),mY=Vj((0,U.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),hY=Vj((0,U.jsx)(`path`,{d:`M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z`}),`GridOn`),gY=Vj((0,U.jsx)(`path`,{d:`M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z`}),`FormatListBulleted`),_Y=Vj((0,U.jsx)(`path`,{d:`M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z`}),`FormatListNumbered`),vY=Vj((0,U.jsx)(`path`,{d:`M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z`}),`FormatUnderlined`),yY=Vj((0,U.jsx)(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),bY=Vj((0,U.jsx)(`path`,{d:`M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z`}),`Image`),xY=Vj((0,U.jsx)(`path`,{d:`M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z`}),`Redo`),SY=Vj((0,U.jsx)(`path`,{d:`M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z`}),`FormatQuote`),CY=Vj((0,U.jsx)(`path`,{d:`M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3zM8 17H6v-2h2zm0-4H6v-2h2zm0-4H6V7h2zm10 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V7h2z`}),`Theaters`),wY=Vj((0,U.jsx)(`path`,{d:`M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77`}),`VolumeUp`),TY=Vj((0,U.jsx)(`path`,{d:`M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z`}),`BorderAll`),EY=G(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`})),DY=()=>(0,U.jsx)(EY,{children:`+ Response Area`}),OY={characters:[[`á`,`é`,`í`,`ó`,`ú`],[`Á`,`É`,`Í`,`Ó`,`Ú`],[`—`,`«`,`»`,`ñ`,`ü`],[`-`,`¿`,`¡`,`Ñ`,`Ü`]]},kY={hasPreview:!0,characters:[[{unicode:`U+00A2`,description:`CENT SIGN`,write:`¢`,label:`¢`},{unicode:`U+00BF`,description:`INVERTED QUESTION MARK`,write:`¿`,label:`¿`},{unicode:`U+00B4`,description:`ACUTE ACCENT`,write:`´`,label:`´`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E1`,description:`LATIN SMALL LETTER A WITH ACUTE`,write:`á`,label:`á`},{unicode:`U+00E9`,description:`LATIN SMALL LETTER E WITH ACUTE`,write:`é`,label:`é`},{unicode:`U+00ED`,description:`LATIN SMALL LETTER I WITH ACUTE`,write:`í`,label:`í`},{unicode:`U+00F3`,description:`LATIN SMALL LETTER O WITH ACUTE`,write:`ó`,label:`ó`},{unicode:`U+00FA`,description:`LATIN SMALL LETTER U WITH ACUTE`,write:`ú`,label:`ú`},{unicode:`U+00F1`,description:`LATIN SMALL LETTER N WITH TILDE`,write:`ñ`,label:`ñ`}],[{unicode:`U+20AC`,description:`EURO SIGN`,write:`€`,label:`€`},{unicode:`U+00A1`,description:`INVERTED EXCLAMATION MARK`,write:`¡`,label:`¡`},{unicode:`U+00C1`,description:`LATIN CAPITAL LETTER A WITH ACUTE`,write:`Á`,label:`Á`},{unicode:`U+00C9`,description:`LATIN CAPITAL LETTER E WITH ACUTE`,write:`É`,label:`É`},{unicode:`U+00CD`,description:`LATIN CAPITAL LETTER I WITH ACUTE`,write:`Í`,label:`Í`},{unicode:`U+00D3`,description:`LATIN CAPITAL LETTER O WITH ACUTE`,write:`Ó`,label:`Ó`},{unicode:`U+00DA`,description:`LATIN CAPITAL LETTER U WITH ACUTE`,write:`Ú`,label:`Ú`},{unicode:`U+00D1`,description:`LATIN CAPITAL LETTER N WITH TILDE`,write:`Ñ`,label:`Ñ`}],[{unicode:`U+00A3`,description:`POUND SIGN`,write:`£`,label:`£`},{unicode:`U+00AB`,description:`LEFT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`«`,label:`«`},{unicode:`U+005E`,description:`CIRCUMFLEX ACCENT`,write:`^`,label:`^`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E2`,description:`LATIN SMALL LETTER A WITH CIRCUMFLEX`,write:`â`,label:`â`},{unicode:`U+00EA`,description:`LATIN SMALL LETTER E WITH CIRCUMFLEX`,write:`ê`,label:`ê`},{unicode:`U+00EE`,description:`LATIN SMALL LETTER I WITH CIRCUMFLEX`,write:`î`,label:`î`},{unicode:`U+00F4`,description:`LATIN SMALL LETTER O WITH CIRCUMFLEX`,write:`ô`,label:`ô`},{unicode:`U+00FB`,description:`LATIN SMALL LETTER U WITH CIRCUMFLEX`,write:`û`,label:`û`},{unicode:`U+00E7`,description:`LATIN SMALL LETTER C WITH CEDILLA`,write:`ç`,label:`ç`}],[{unicode:`U+00A5`,description:`YEN SIGN`,write:`¥`,label:`¥`},{unicode:`U+00BB`,description:`RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`»`,label:`»`},{unicode:`U+00C2`,description:`LATIN CAPITAL LETTER A WITH CIRCUMFLEX`,write:`Â`,label:`Â`},{unicode:`U+00CA`,description:`LATIN CAPITAL LETTER E WITH CIRCUMFLEX`,write:`Ê`,label:`Ê`},{unicode:`U+00CE`,description:`LATIN CAPITAL LETTER I WITH CIRCUMFLEX`,write:`Î`,label:`Î`},{unicode:`U+00D4`,description:`LATIN CAPITAL LETTER O WITH CIRCUMFLEX`,write:`Ô`,label:`Ô`},{unicode:`U+00DB`,description:`LATIN CAPITAL LETTER U WITH CIRCUMFLEX`,write:`Û`,label:`Û`},{unicode:`U+00C7`,description:`LATIN CAPITAL LETTER C WITH CEDILLA`,write:`Ç`,label:`Ç`}],[{unicode:`U+200A`,description:`HAIR SPACE`,write:String.fromCodePoint(`0x200A`),label:`&hairsp;`},{unicode:`U+00A7`,description:`SECTION SIGN`,write:`§`,label:`§`},{unicode:`U+00A8`,description:`DIAERESIS`,write:`¨`,label:`¨`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E4`,description:`LATIN SMALL LETTER A WITH DIAERESIS`,write:`ä`,label:`ä`},{unicode:`U+00EB`,description:`LATIN SMALL LETTER E WITH DIAERESIS`,write:`ë`,label:`ë`},{unicode:`U+00EF`,description:`LATIN SMALL LETTER I WITH DIAERESIS`,write:`ï`,label:`ï`},{unicode:`U+00F6`,description:`LATIN SMALL LETTER O WITH DIAERESIS`,write:`ö`,label:`ö`},{unicode:`U+00FC`,description:`LATIN SMALL LETTER U WITH DIAERESIS`,write:`ü`,label:`ü`},{unicode:`U+00DF`,description:`LATIN SMALL LETTER SHARP S`,write:`ß`,label:`ß`}],[{unicode:`U+2009`,description:`THIN SPACE`,write:String.fromCodePoint(`0x2009`),label:`&thinsp;`},{unicode:`U+2026`,description:`HORIZONTAL ELLIPSIS`,write:`…`,label:`…`},{unicode:`U+00C4`,description:`LATIN CAPITAL LETTER A WITH DIAERESIS`,write:`Ä`,label:`Ä`},{unicode:`U+00CB`,description:`LATIN CAPITAL LETTER E WITH DIAERESIS`,write:`Ë`,label:`Ë`},{unicode:`U+00CF`,description:`LATIN CAPITAL LETTER I WITH DIAERESIS`,write:`Ï`,label:`Ï`},{unicode:`U+00D6`,description:`LATIN CAPITAL LETTER O WITH DIAERESIS`,write:`Ö`,label:`Ö`},{unicode:`U+00DC`,description:`LATIN CAPITAL LETTER U WITH DIAERESIS`,write:`Ü`,label:`Ü`},{unicode:`U+2212`,description:`MINUS SIGN`,write:`−`,label:`−`}],[{unicode:`U+00A0`,description:`NO-BREAK SPACE`,write:String.fromCodePoint(`0x00A0`),label:`&nbsp;`},{unicode:`U+2022`,description:`BULLET`,write:`•`,label:`•`},{unicode:`U+0060`,description:`GRAVE ACCENT`,write:"`",label:"`",extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E0`,description:`LATIN SMALL LETTER A WITH GRAVE`,write:`à`,label:`à`},{unicode:`U+00E8`,description:`LATIN SMALL LETTER E WITH GRAVE`,write:`è`,label:`è`},{unicode:`U+00EC`,description:`LATIN SMALL LETTER I WITH GRAVE`,write:`ì`,label:`ì`},{unicode:`U+00F2`,description:`LATIN SMALL LETTER O WITH GRAVE`,write:`ò`,label:`ò`},{unicode:`U+00F9`,description:`LATIN SMALL LETTER U WITH GRAVE`,write:`ù`,label:`ù`},{unicode:`U+2013`,description:`EN DASH`,write:`–`,label:`–`}],[{unicode:`U+2003`,description:`EM SPACE`,write:String.fromCodePoint(`0x2003`),label:`&emsp;`},{unicode:`U+25E6`,description:`WHITE BULLET`,write:`◦`,label:`◦`},{unicode:`U+00C0`,description:`LATIN CAPITAL LETTER A WITH GRAVE`,write:`À`,label:`À`},{unicode:`U+00C8`,description:`LATIN CAPITAL LETTER E WITH GRAVE`,write:`È`,label:`È`},{unicode:`U+00CC`,description:`LATIN CAPITAL LETTER I WITH GRAVE`,write:`Ì`,label:`Ì`},{unicode:`U+00D2`,description:`LATIN CAPITAL LETTER O WITH GRAVE`,write:`Ò`,label:`Ò`},{unicode:`U+00D9`,description:`LATIN CAPITAL LETTER U WITH GRAVE`,write:`Ù`,label:`Ù`},{unicode:`U+2014`,description:`EM DASH`,write:`—`,label:`—`}]]},AY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),jY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),MY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z`,fill:`currentColor`})}),NY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),PY=({editor:e,onChange:t})=>{let[n,r]=(0,P.useState)(!1),i;switch(!0){case e.isActive({textAlign:`right`}):i=(0,U.jsx)(jY,{});break;case e.isActive({textAlign:`center`}):i=(0,U.jsx)(MY,{});break;case e.isActive({textAlign:`justify`}):i=(0,U.jsx)(NY,{});break;default:i=(0,U.jsx)(AY,{});break}let a=t=>{let n=t.currentTarget?.getAttribute(`value`);n&&e.commands.setTextAlign(n),r(!1)};return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!n)},children:[i,(0,U.jsx)(`span`,{style:{marginLeft:`5px`,fontSize:`8px`},children:`▼`})]}),(0,U.jsx)(cR,{in:n,timeout:`auto`,unmountOnExit:!0,style:{position:`absolute`},children:(0,U.jsxs)(Nz,{component:`div`,disablePadding:!0,style:{background:`#fff`,display:`flex`,flexDirection:`row`,padding:0},children:[(0,U.jsx)(wJ,{button:!0,type:`submit`,value:`left`,"aria-label":`Align text left`,onClick:a,children:(0,U.jsx)(AY,{})}),(0,U.jsx)(wJ,{button:!0,type:`submit`,value:`center`,"aria-label":`Align text center`,onClick:a,children:(0,U.jsx)(MY,{})}),(0,U.jsx)(wJ,{button:!0,type:`submit`,value:`right`,"aria-label":`Align text right`,onClick:a,children:(0,U.jsx)(jY,{})}),(0,U.jsx)(wJ,{button:!0,type:`submit`,value:`justify`,"aria-label":`Justify text`,onClick:a,children:(0,U.jsx)(NY,{})})]})})]})},FY=G(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans, Arial, sans-serif`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,whiteSpace:`nowrap`})),IY=()=>(0,U.jsx)(FY,{children:`CSS`}),LY=G(`path`)({fill:`grey`,"&:hover":{fill:`black`}}),RY=e=>t=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:(0,U.jsx)(e,{...t})}),zY=RY(e=>(0,U.jsx)(LY,{...e,d:`M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z`})),BY=RY(e=>(0,U.jsx)(LY,{...e,d:`M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z`})),VY=RY(e=>(0,U.jsx)(LY,{...e,d:`M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z`})),HY=RY(e=>(0,U.jsx)(LY,{...e,d:`M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z`})),UY=RY(e=>(0,U.jsx)(LY,{...e,d:`M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z`})),WY=`bottom`,GY=`right`,KY=`left`,qY=`auto`,JY=[`top`,WY,GY,KY],YY=`start`,XY=`clippingParents`,ZY=`viewport`,QY=`popper`,$Y=`reference`,eX=JY.reduce(function(e,t){return e.concat([t+`-`+YY,t+`-end`])},[]),tX=[].concat(JY,[qY]).reduce(function(e,t){return e.concat([t,t+`-`+YY,t+`-end`])},[]),nX=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function rX(e){return e?(e.nodeName||``).toLowerCase():null}function iX(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function aX(e){return e instanceof iX(e).Element||e instanceof Element}function oX(e){return e instanceof iX(e).HTMLElement||e instanceof HTMLElement}function sX(e){return typeof ShadowRoot>`u`?!1:e instanceof iX(e).ShadowRoot||e instanceof ShadowRoot}function cX(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!oX(i)||!rX(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function lX(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!oX(r)||!rX(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var uX={name:`applyStyles`,enabled:!0,phase:`write`,fn:cX,effect:lX,requires:[`computeStyles`]};function dX(e){return e.split(`-`)[0]}var fX=Math.max,pX=Math.min,mX=Math.round;function hX(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function gX(){return!/^((?!chrome|android).)*safari/i.test(hX())}function _X(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&oX(e)&&(i=e.offsetWidth>0&&mX(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&mX(r.height)/e.offsetHeight||1);var o=(aX(e)?iX(e):window).visualViewport,s=!gX()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function vX(e){var t=_X(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function yX(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&sX(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bX(e){return iX(e).getComputedStyle(e)}function xX(e){return[`table`,`td`,`th`].indexOf(rX(e))>=0}function SX(e){return((aX(e)?e.ownerDocument:e.document)||window.document).documentElement}function CX(e){return rX(e)===`html`?e:e.assignedSlot||e.parentNode||(sX(e)?e.host:null)||SX(e)}function wX(e){return!oX(e)||bX(e).position===`fixed`?null:e.offsetParent}function TX(e){var t=/firefox/i.test(hX());if(/Trident/i.test(hX())&&oX(e)&&bX(e).position===`fixed`)return null;var n=CX(e);for(sX(n)&&(n=n.host);oX(n)&&[`html`,`body`].indexOf(rX(n))<0;){var r=bX(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function EX(e){for(var t=iX(e),n=wX(e);n&&xX(n)&&bX(n).position===`static`;)n=wX(n);return n&&(rX(n)===`html`||rX(n)===`body`&&bX(n).position===`static`)?t:n||TX(e)||t}function DX(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function OX(e,t,n){return fX(e,pX(t,n))}function kX(e,t,n){var r=OX(e,t,n);return r>n?n:r}function AX(){return{top:0,right:0,bottom:0,left:0}}function jX(e){return Object.assign({},AX(),e)}function MX(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var NX=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,jX(typeof e==`number`?MX(e,JY):e)};function PX(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=dX(n.placement),c=DX(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=NX(i.padding,n),d=vX(a),f=c===`y`?`top`:KY,p=c===`y`?WY:GY,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=EX(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=OX(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function FX(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||yX(t.elements.popper,r)&&(t.elements.arrow=r))}var IX={name:`arrow`,enabled:!0,phase:`main`,fn:PX,effect:FX,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function LX(e){return e.split(`-`)[1]}var RX={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function zX(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:mX(n*i)/i||0,y:mX(r*i)/i||0}}function BX(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=KY,b=`top`,x=window;if(l){var S=EX(n),C=`clientHeight`,w=`clientWidth`;if(S===iX(n)&&(S=SX(n),bX(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=WY;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=GY;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&RX),O=u===!0?zX({x:p,y:h},iX(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function VX(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:dX(t.placement),variation:LX(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,BX(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,BX(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var HX={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:VX,data:{}},UX={passive:!0};function WX(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=iX(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,UX)}),s&&c.addEventListener(`resize`,n.update,UX),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,UX)}),s&&c.removeEventListener(`resize`,n.update,UX)}}var GX={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:WX,data:{}},KX={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function qX(e){return e.replace(/left|right|bottom|top/g,function(e){return KX[e]})}var JX={start:`end`,end:`start`};function YX(e){return e.replace(/start|end/g,function(e){return JX[e]})}function XX(e){var t=iX(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ZX(e){return _X(SX(e)).left+XX(e).scrollLeft}function QX(e,t){var n=iX(e),r=SX(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=gX();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+ZX(e),y:c}}function $X(e){var t=SX(e),n=XX(e),r=e.ownerDocument?.body,i=fX(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=fX(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+ZX(e),s=-n.scrollTop;return bX(r||t).direction===`rtl`&&(o+=fX(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function eZ(e){var t=bX(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function tZ(e){return[`html`,`body`,`#document`].indexOf(rX(e))>=0?e.ownerDocument.body:oX(e)&&eZ(e)?e:tZ(CX(e))}function nZ(e,t){t===void 0&&(t=[]);var n=tZ(e),r=n===e.ownerDocument?.body,i=iX(n),a=r?[i].concat(i.visualViewport||[],eZ(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(nZ(CX(a)))}function rZ(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function iZ(e,t){var n=_X(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function aZ(e,t,n){return t===`viewport`?rZ(QX(e,n)):aX(t)?iZ(t,n):rZ($X(SX(e)))}function oZ(e){var t=nZ(CX(e)),n=[`absolute`,`fixed`].indexOf(bX(e).position)>=0&&oX(e)?EX(e):e;return aX(n)?t.filter(function(e){return aX(e)&&yX(e,n)&&rX(e)!==`body`}):[]}function sZ(e,t,n,r){var i=t===`clippingParents`?oZ(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=aZ(e,n,r);return t.top=fX(i.top,t.top),t.right=pX(i.right,t.right),t.bottom=pX(i.bottom,t.bottom),t.left=fX(i.left,t.left),t},aZ(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function cZ(e){var t=e.reference,n=e.element,r=e.placement,i=r?dX(r):null,a=r?LX(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case WY:c={x:o,y:t.y+t.height};break;case GY:c={x:t.x+t.width,y:s};break;case KY:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?DX(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case YY:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function lZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?XY:s,l=n.rootBoundary,u=l===void 0?ZY:l,d=n.elementContext,f=d===void 0?QY:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=jX(typeof g==`number`?MX(g,JY):g),v=f===`popper`?$Y:QY,y=e.rects.popper,b=e.elements[m?v:f],x=sZ(aX(b)?b:b.contextElement||SX(e.elements.popper),c,u,o),S=_X(e.elements.reference),C=cZ({reference:S,element:y,strategy:`absolute`,placement:i}),w=rZ(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function uZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?tX:c,u=LX(r),d=u?s?eX:eX.filter(function(e){return LX(e)===u}):JY,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=lZ(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[dX(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function dZ(e){if(dX(e)===`auto`)return[];var t=qX(e);return[YX(e),t,YX(t)]}function fZ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,_=dX(g)===g,v=c||(_||!m?[qX(g)]:dZ(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(dX(n)===`auto`?uZ(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=dX(E),O=LX(E)===YY,k=[`top`,WY].indexOf(D)>=0,A=k?`width`:`height`,j=lZ(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?GY:KY:O?WY:`top`;b[A]>x[A]&&(M=qX(M));var ee=qX(M),N=[];if(a&&N.push(j[D]<=0),s&&N.push(j[M]<=0,j[ee]<=0),N.every(function(e){return e})){w=E,C=!1;break}S.set(E,N)}if(C)for(var P=m?3:1,te=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},F=P;F>0&&te(F)!==`break`;F--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var pZ={name:`flip`,enabled:!0,phase:`main`,fn:fZ,requiresIfExists:[`offset`],data:{_skip:!1}};function mZ(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function hZ(e){return[`top`,GY,WY,KY].some(function(t){return e[t]>=0})}function gZ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=lZ(t,{elementContext:`reference`}),s=lZ(t,{altBoundary:!0}),c=mZ(o,r),l=mZ(s,i,a),u=hZ(c),d=hZ(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var _Z={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:gZ};function vZ(e,t,n){var r=dX(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function yZ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=tX.reduce(function(e,n){return e[n]=vZ(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var bZ={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:yZ};function xZ(e){var t=e.state,n=e.name;t.modifiersData[n]=cZ({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var SZ={name:`popperOffsets`,enabled:!0,phase:`read`,fn:xZ,data:{}};function CZ(e){return e===`x`?`y`:`x`}function wZ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=lZ(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=dX(t.placement),v=LX(t.placement),y=!v,b=DX(_),x=CZ(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:KY,A=b===`y`?WY:GY,j=b===`y`?`height`:`width`,M=S[b],ee=M+g[k],N=M-g[A],P=p?-w[j]/2:0,te=v===`start`?C[j]:w[j],F=v===`start`?-w[j]:-C[j],I=t.elements.arrow,L=p&&I?vX(I):{width:0,height:0},ne=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:AX(),re=ne[k],ie=ne[A],R=OX(0,C[j],L[j]),ae=y?C[j]/2-P-R-re-E.mainAxis:te-R-re-E.mainAxis,z=y?-C[j]/2+P+R+ie+E.mainAxis:F+R+ie+E.mainAxis,B=t.elements.arrow&&EX(t.elements.arrow),oe=B?b===`y`?B.clientTop||0:B.clientLeft||0:0,se=D?.[b]??0,ce=M+ae-se-oe,le=M+z-se,ue=OX(p?pX(ee,ce):ee,M,p?fX(N,le):N);S[b]=ue,O[b]=ue-M}if(s){var de=b===`x`?`top`:KY,fe=b===`x`?WY:GY,V=S[x],pe=x===`y`?`height`:`width`,me=V+g[de],he=V-g[fe],ge=[`top`,KY].indexOf(_)!==-1,_e=D?.[x]??0,H=ge?me:V-C[pe]-w[pe]-_e+E.altAxis,ve=ge?V+C[pe]+w[pe]-_e-E.altAxis:he,ye=p&&ge?kX(H,V,ve):OX(p?H:me,V,p?ve:he);S[x]=ye,O[x]=ye-V}t.modifiersData[r]=O}}var TZ={name:`preventOverflow`,enabled:!0,phase:`main`,fn:wZ,requiresIfExists:[`offset`]};function EZ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function DZ(e){return e===iX(e)||!oX(e)?XX(e):EZ(e)}function OZ(e){var t=e.getBoundingClientRect(),n=mX(t.width)/e.offsetWidth||1,r=mX(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kZ(e,t,n){n===void 0&&(n=!1);var r=oX(t),i=oX(t)&&OZ(t),a=SX(t),o=_X(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((rX(t)!==`body`||eZ(a))&&(s=DZ(t)),oX(t)?(c=_X(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=ZX(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function AZ(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function jZ(e){var t=AZ(e);return nX.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function MZ(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function NZ(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var PZ={placement:`bottom`,modifiers:[],strategy:`absolute`};function FZ(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function IZ(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?PZ:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},PZ,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:aX(e)?nZ(e):e.contextElement?nZ(e.contextElement):[],popper:nZ(t)};var s=jZ(NZ([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(FZ(t,n)){i.rects={reference:kZ(t,EX(n),i.options.strategy===`fixed`),popper:vX(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:MZ(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!FZ(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var LZ=IZ({defaultModifiers:[GX,SZ,HX,uX,bZ,pZ,TZ,IX,_Z]});function RZ(e){return Yr(`MuiPopper`,e)}Xr(`MuiPopper`,[`root`]);function zZ(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function BZ(e){return typeof e==`function`?e():e}function VZ(e){return e.nodeType!==void 0}var HZ=e=>{let{classes:t}=e;return A({root:[`root`]},RZ,t)},UZ={},WZ=P.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=P.useRef(null),_=nM(g,t),v=P.useRef(null),y=nM(v,u),b=P.useRef(y);ui(()=>{b.current=y},[y]),P.useImperativeHandle(u,()=>v.current,[]);let x=zZ(c,i),[S,C]=P.useState(x),[w,T]=P.useState(BZ(n));P.useEffect(()=>{v.current&&v.current.forceUpdate()}),P.useEffect(()=>{n&&T(BZ(n))},[n]),ui(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=LZ(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let E={placement:S};p!==null&&(E.TransitionProps=p);let D=HZ(e),O=f.root??`div`;return(0,U.jsx)(O,{...Oz({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(E):r})}),GZ=G(P.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=UZ,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=P.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=BZ(n);S=e&&VZ(e)?Gj(e).body:Gj(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,U.jsx)(rI,{disablePortal:o,container:S,children:(0,U.jsx)(WZ,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),KZ=G(P.forwardRef(function(e,t){let n=Ii(),{anchorEl:r,component:i,components:a,componentsProps:o,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,slots:g,slotProps:_,...v}=Lo({props:e,name:`MuiPopper`}),y=g?.root??a?.Root,b={anchorEl:r,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,...v};return(0,U.jsx)(GZ,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})}))({background:`#fff`,padding:`10px`,pointerEvents:`none`,zIndex:99999}),qZ=G(qo)({fontSize:50,textAlign:`center`}),JZ=({children:e,...t})=>(0,U.jsx)(KZ,{id:`mouse-over-popover`,open:!0,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableRestoreFocus:!0,disableAutoFocus:!0,...t,children:(0,U.jsx)(qZ,{children:e})}),YZ=({letter:e})=>(0,U.jsx)(`div`,{style:{fontSize:`24px`,lineHeight:`24px`},children:e});YZ.propTypes={letter:p.string};function XZ({editor:e,opts:t,onClose:n}){if(!t?.characters?.length)return null;let r=(0,P.useRef)(null),i=(0,P.useRef)(n),[a,o]=(0,P.useState)({top:0,left:0}),[s,c]=(0,P.useState)(null);i.current=n;let l=(0,P.useMemo)(()=>{if(!t)return OY;switch(!0){case t.language===`spanish`:return OY;case t.language===`special`:return kY;default:return t}},[t]),u=(0,P.useMemo)(()=>l.characters.reduce((e,t)=>(t.length>=e.columns&&(e.columns=t.length),e),{rows:l.characters.length,columns:0}),[l]),d=()=>c(null);(0,P.useEffect)(()=>()=>{d()},[]),(0,P.useEffect)(()=>{if(!e)return;let t=e.options.element.getBoundingClientRect(),n=document.body.getBoundingClientRect(),{from:a}=e.state.selection,s=e.view.coordsAtPos(a),c=t.top+Math.abs(n.top)+t.height+60;t.y>r.current.offsetHeight&&(c=c-(r.current.offsetHeight+t.height)-80),o({top:c,left:s.left});let l=e.view.dom,u=e=>{r.current&&!r.current.contains(e.target)&&!l.contains(e.target)&&i.current()},d=setTimeout(()=>{document.addEventListener(`click`,u)});return()=>{clearTimeout(d),document.removeEventListener(`click`,u)}},[e]);let f=(e,t)=>c({anchorEl:e.currentTarget,el:t});return(0,U.jsxs)(U.Fragment,{children:[db.createPortal((0,U.jsx)(`div`,{ref:r,className:`insert-character-dialog`,"data-toolbar-for":e.instanceId,style:{visibility:a.top===0&&a.left===0?`hidden`:`initial`,position:`absolute`,top:`${a.top}px`,left:`${a.left}px`,maxWidth:`500px`,zIndex:99},children:(0,U.jsx)(`div`,{children:(0,U.jsx)(WG,{keyPadCharacterRef:t.keyPadCharacterRef,setKeypadInteraction:t.setKeypadInteraction,autoFocus:!0,noDecimal:!0,hideInput:!0,noLatexHandling:!0,hideDoneButtonBackground:!0,layoutForKeyPad:u,additionalKeys:l.characters.reduce((e,t)=>(e=[...e,...t.map(e=>({name:b(e,`name`)||e,write:b(e,`write`)||e,label:b(e,`label`)||e,category:`character`,extraClass:`character`,extraProps:{...e.extraProps||{},style:{...(e.extraProps||{}).style,border:`1px solid #000`}},...l.hasPreview?{actions:{onMouseEnter:t=>f(t,e),onMouseLeave:d}}:{}}))],e),[]),keypadMode:`language`,onChange:t=>{typeof t==`string`&&e.chain().focus().insertContent(t).run()},onDone:n})})}),document.body),s&&db.createPortal((0,U.jsxs)(JZ,{onClose:d,anchorEl:s.anchorEl,children:[(0,U.jsx)(`div`,{children:s.el.label}),(0,U.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.description}),(0,U.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.unicode})]}),document.body)]})}XZ.propTypes={editor:p.object,opts:p.object,onClose:p.func.isRequired};var ZZ=()=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,children:(0,U.jsx)(`path`,{d:`M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z`,fill:`currentColor`})}),QZ=()=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,children:(0,U.jsx)(`path`,{d:`M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z`,fill:`currentColor`})}),$Z=()=>(0,U.jsx)(`svg`,{width:`30`,height:`28`,viewBox:`0 0 30 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`20px`,height:`18px`},children:(0,U.jsx)(`path`,{d:`M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z`,fill:`currentColor`})});function eQ({editor:e,classes:t,activePlugins:n,toolbarOpts:r,responseAreaProps:i,onChange:a,autoWidthToolbar:o}){let[s,c]=(0,P.useState)(!1),l=r??{},u=Sb({editor:e,selector:e=>{let{selection:t}=e.editor?.state||{},n;if(!e.editor?.commandManager)return{};t instanceof Q&&(n=t.node);let r=e.editor?.isActive(`math`)||e.editor?.isActive(`explicit_constructed_response`)||e.editor?.isActive(`imageUploadNode`)||e.editor?.isActive(`drag_in_the_blank`),i=t&&t.empty===!1&&e.editor.isActive(`table`);return{currentNode:n,hideDefaultToolbar:r,hasTextSelectionInTable:i,isFocused:e.editor?.isFocused,isBold:e.editor.isActive(`bold`)??!1,canBold:e.editor.can().chain().toggleBold().run()??!1,isTable:e.editor.isActive(`table`)??!1,tableHasBorder:e.editor.getAttributes(`table`)?.border===`1`,canTable:e.editor.can().chain().insertTable().run()??!1,isItalic:e.editor.isActive(`italic`)??!1,canItalic:e.editor.can().chain().toggleItalic().run()??!1,isStrike:e.editor.isActive(`strike`)??!1,canStrike:e.editor.can().chain().toggleStrike().run()??!1,isCode:e.editor.isActive(`code`)??!1,canCode:e.editor.can().chain().toggleCode().run()??!1,canClearMarks:e.editor.can().chain().unsetAllMarks().run()??!1,isUnderline:e.editor.isActive(`underline`)??!1,isSubScript:e.editor.isActive(`subscript`)??!1,isSuperScript:e.editor.isActive(`superscript`)??!1,isParagraph:e.editor.isActive(`paragraph`)??!1,isHeading1:e.editor.isActive(`heading`,{level:1})??!1,isHeading2:e.editor.isActive(`heading`,{level:2})??!1,isHeading3:e.editor.isActive(`heading`,{level:3})??!1,isHeadingParagraph:e.editor.isActive(`headingParagraph`)??!1,isHeading4:e.editor.isActive(`heading`,{level:4})??!1,isHeading5:e.editor.isActive(`heading`,{level:5})??!1,isHeading6:e.editor.isActive(`heading`,{level:6})??!1,isBulletList:e.editor.isActive(`bulletList`)??!1,isOrderedList:e.editor.isActive(`orderedList`)??!1,isCodeBlock:e.editor.isActive(`codeBlock`)??!1,isBlockquote:e.editor.isActive(`blockquote`)??!1,canUndo:e.editor.can().chain().undo().run()??!1,canRedo:e.editor.can().chain().redo().run()??!1}}}),d=!!o,f=k(t.toolbar,TN,{[t.toolbarWithNoDone]:!0,[t.toolbarTop]:l.position===`top`,[t.toolbarRight]:l.alignment===`right`,[t.focused]:l.alwaysVisible||u.isFocused&&!e._toolbarOpened&&!u.hideDefaultToolbar,[t.autoWidth]:d,[t.fullWidth]:!d,[t.hidden]:l.isHidden===!0}),p=l.minWidth===void 0?{}:{minWidth:l.minWidth},m=e=>{e.preventDefault()},h=(0,P.useMemo)(()=>[{icon:(0,U.jsx)(hY,{}),onClick:e=>e.chain().focus().insertTable({rows:2,cols:2,withHeaderRow:!1}).run(),hidden:e=>!n?.includes(`table`)||e.isTable,isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(zY,{}),onClick:e=>e.chain().focus().addRowAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(BY,{}),onClick:e=>e.chain().focus().deleteRow().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(VY,{}),onClick:e=>e.chain().focus().addColumnAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(HY,{}),onClick:e=>e.chain().focus().deleteColumn().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(UY,{}),onClick:e=>e.chain().focus().deleteTable().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(TY,{}),onClick:e=>{let t=e.getAttributes(`table`),n={...t,border:t.border===`0`?`1`:`0`};e.commands.updateAttributes(`table`,n)},hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.tableHasBorder,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(dY,{}),onClick:e=>e.chain().focus().toggleBold().run(),hidden:()=>!n?.includes(`bold`),isActive:e=>e.isBold,isDisabled:e=>!e.canBold},{icon:(0,U.jsx)(fY,{}),onClick:e=>e.chain().focus().toggleItalic().run(),hidden:()=>!n?.includes(`italic`),isActive:e=>e.isItalic,isDisabled:e=>!e.canItalic},{icon:(0,U.jsx)(pY,{}),onClick:e=>e.chain().focus().toggleStrike().run(),hidden:()=>!n?.includes(`strikethrough`),isActive:e=>e.isStrike,isDisabled:e=>!e.canStrike},{icon:(0,U.jsx)(mY,{}),onClick:e=>e.chain().focus().toggleCode().run(),hidden:()=>!n?.includes(`code`),isActive:e=>e.isCode,isDisabled:e=>!e.canCode},{icon:(0,U.jsx)(vY,{}),onClick:e=>e.chain().focus().toggleUnderline().run(),hidden:()=>!n?.includes(`underline`),isActive:e=>e.isUnderline},{icon:(0,U.jsx)(QZ,{}),onClick:e=>e.chain().focus().toggleSubscript().run(),hidden:()=>!n?.includes(`subscript`),isActive:e=>e.isSubScript},{icon:(0,U.jsx)(ZZ,{}),onClick:e=>e.chain().focus().toggleSuperscript().run(),hidden:()=>!n?.includes(`superscript`),isActive:e=>e.isSuperScript},{icon:(0,U.jsx)(bY,{}),hidden:()=>!n?.includes(`image`),onClick:e=>e.chain().focus().setImageUploadNode().run()},{icon:(0,U.jsx)(CY,{}),hidden:()=>!n?.includes(`video`),onClick:e=>e.chain().focus().insertMedia({type:`video`}).run()},{icon:(0,U.jsx)(wY,{}),hidden:()=>!n?.includes(`audio`),onClick:e=>e.chain().focus().insertMedia({type:`audio`,tag:`audio`}).run()},{icon:(0,U.jsx)(IY,{}),hidden:()=>!n?.includes(`css`),onClick:e=>e.commands.openCSSClassDialog()},{icon:(0,U.jsx)(SY,{}),hidden:()=>!n?.includes(`blockquote`),onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isBlockquote},{icon:(0,U.jsx)($Z,{}),hidden:()=>!n?.includes(`h3`),onClick:e=>e.chain().focus().toggleHeadingParagraph().run(),isActive:e=>e.isHeadingParagraph},{icon:(0,U.jsx)(yY,{}),hidden:()=>!n?.includes(`math`),onClick:e=>e.chain().focus().insertMath(``).run()},{icon:(0,U.jsx)(YZ,{letter:`ñ`}),hidden:()=>!n?.includes(`languageCharacters`),onClick:()=>c(OY)},{icon:(0,U.jsx)(YZ,{letter:`€`}),hidden:()=>n?.filter(e=>e===`languageCharacters`).length!==2,onClick:()=>c(kY)},{icon:(0,U.jsx)(PY,{editor:e}),hidden:()=>!n?.includes(`text-align`),onClick:()=>{}},{icon:(0,U.jsx)(gY,{}),hidden:()=>!n?.includes(`bulleted-list`),onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isBulletList},{icon:(0,U.jsx)(_Y,{}),hidden:()=>!n?.includes(`numbered-list`),onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isOrderedList},{icon:(0,U.jsx)(PR,{}),hidden:()=>!n?.includes(`undo`),onClick:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.canUndo},{icon:(0,U.jsx)(xY,{}),hidden:()=>!n?.includes(`redo`),onClick:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.canRedo}],[n,e]),g=u.hideDefaultToolbar&&u.currentNode?.type?.name===`drag_in_the_blank`;return(0,U.jsxs)(`div`,{className:f,style:{...p},onMouseDown:m,children:[g&&(0,U.jsx)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:(0,U.jsx)(`div`,{className:t.buttonsContainer,children:(0,U.jsx)(`button`,{type:`button`,className:t.button,onClick:t=>{t.preventDefault(),e.chain().focus().deleteSelection().run(),a?.(e.getHTML())},"aria-label":`Delete response area`,children:(0,U.jsx)(wN,{})})})}),!u.hideDefaultToolbar&&(0,U.jsxs)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:[(0,U.jsx)(`div`,{className:t.buttonsContainer,children:h.filter(e=>!e.hidden?.(u)).map((n,r)=>{let i=n.isDisabled?.(u),a=n.isActive?.(u);return(0,U.jsx)(`button`,{disabled:i,onClick:t=>{t.preventDefault(),n.onClick(e)},className:k(t.button,{[t.active]:a}),children:n.icon},r)})}),n?.includes(`responseArea`)&&(0,U.jsx)(`button`,{onClick:()=>{e.chain().focus().insertResponseArea(i.type).run()},className:t.button,children:(0,U.jsx)(DY,{})}),l.showDone&&(0,U.jsx)(kN,{onClick:()=>{a?.(e.getHTML()),e.commands.blur()}})]}),s&&(0,U.jsx)(XZ,{editor:e,opts:{...s,renderPopOver:(e,t)=>console.log(`Show popover`,t),closePopOver:()=>console.log(`Close popover`)},onClose:()=>c(!1)})]})}var tQ=e=>{Ao();let t={defaultToolbar:`defaultToolbar`,buttonsContainer:`buttonsContainer`,button:`button`,active:`active`,disabled:`disabled`,isActive:`isActive`,toolbar:`toolbar`,toolbarWithNoDone:`toolbarWithNoDone`,toolbarTop:`toolbarTop`,toolbarRight:`toolbarRight`,fullWidth:`fullWidth`,hidden:`hidden`,autoWidth:`autoWidth`,focused:`focused`,iconRoot:`iconRoot`,label:`label`,shared:`shared`};return(0,U.jsx)(nQ,{children:(0,U.jsx)(eQ,{...e,classes:t})})},nQ=G(`div`)(({theme:e})=>({"& .defaultToolbar":{display:`flex`,width:`100%`,justifyContent:`space-between`},"& .buttonsContainer":{alignItems:`center`,display:`flex`,width:`100%`},"& .button":{color:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:`pointer`,"&:hover":{color:`black`},"&:focus":{outline:`2px solid ${e.palette.grey[700]}`}},"& .active":{color:`black`},"& .disabled":{opacity:.7,cursor:`not-allowed`,"& :hover":{color:`grey`}},"& .isActive":{background:`var(--purple)`,color:`var(--white)`},"& .toolbar":{position:`absolute`,zIndex:20,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:`280px`,margin:`5px 0 0 0`,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:0,pointerEvents:`none`},"& .toolbarWithNoDone":{minWidth:`265px`},"& .toolbarTop":{top:`-45px`},"& .toolbarRight":{right:0},"& .fullWidth":{width:`100%`},"& .hidden":{visibility:`hidden`},"& .autoWidth":{width:`auto`},"& .focused":{opacity:1,pointerEvents:`auto`},"& .iconRoot":{width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`},"& .label":{color:`var(--editable-html-toolbar-check, #00bb00)`},"& .shared":{display:`flex`}})),rQ=G(`div`,{shouldForwardProp:e=>![`noBorder`,`error`].includes(e)})(({theme:e,noBorder:t,error:n})=>({position:`relative`,padding:`0px`,border:t?`none`:`1px solid #ccc`,borderRadius:`4px`,cursor:`text`,'& [data-slate-editor="true"]':{wordBreak:`break-word`,overflow:`visible`,maxHeight:`500px`,padding:`5px`},"&:first-child":{marginTop:0},"& ul, & ol":{padding:`0 1rem`,margin:`1.25rem 1rem 1.25rem 0.4rem`},"& ul li p, & ol li p":{marginTop:`0.25em`,marginBottom:`0.25em`},"& h1, & h2, & h3, & h4, & h5, & h6":{lineHeight:1.1,marginTop:`2.5rem`,textWrap:`pretty`},"& h1, & h2":{marginTop:`3.5rem`,marginBottom:`1.5rem`},"& h1":{fontSize:`1.4rem`},"& h2":{fontSize:`1.2rem`},"& h3":{fontSize:`1.1rem`},"& h4, & h5, & h6":{fontSize:`1rem`},"& code":{backgroundColor:`var(--purple-light)`,borderRadius:`0.4rem`,color:`var(--black)`,fontSize:`0.85rem`,padding:`0.25em 0.3em`},"& pre":{background:`var(--black)`,borderRadius:`0.5rem`,color:`var(--white)`,fontFamily:`'JetBrainsMono', monospace`,margin:`1.5rem 0`,padding:`0.75rem 1rem`,"& code":{background:`none`,color:`inherit`,fontSize:`0.8rem`,padding:0}},"& blockquote":{background:`#f9f9f9`,borderLeft:`5px solid #ccc`,margin:`1.5em 10px`,padding:`.5em 10px`},"& p":{margin:`0`},"& table":{tableLayout:`fixed`,width:`100%`,borderCollapse:`collapse`,color:KI(),backgroundColor:pL()},'& table:not([border="1"]) tr':{borderTop:`1px solid #dfe2e5`},"& td, th":{padding:`.6em 1em`,textAlign:`center`},'& table:not([border="1"]) td, th':{border:`1px solid #dfe2e5`},...n&&{border:`2px solid ${e.palette.error.main} !important`}})),iQ=G(`div`,{shouldForwardProp:e=>![`disableScrollbar`,`highlightShape`].includes(e)})(({theme:e,disableScrollbar:t,highlightShape:n})=>({position:`relative`,padding:`0px`,overflowY:`auto`,color:KI(),backgroundColor:n?e.palette.action.selected:pL(),...t&&{"&::-webkit-scrollbar":{display:`none`},scrollbarWidth:`none`,"-ms-overflow-style":`none`}})),aQ=G(`div`,{shouldForwardProp:e=>e!==`noPadding`})(({noPadding:e})=>({padding:e?0:`10px 8px`}));function oQ(e){let[t,n]=(0,P.useState)(null),r=(0,P.useRef)(null),{editor:i,disabled:a,children:o,disableScrollbar:s,activePlugins:c,toolbarOpts:l,responseAreaProps:u,autoFocus:d,minWidth:f,width:p,maxWidth:m,minHeight:h,height:g,maxHeight:_,highlightShape:v,ref:y}=e;(0,P.useEffect)(()=>{i&&r.current&&(i._tiptapContainerEl=r.current)},[i,r.current]),(0,P.useEffect)(()=>{i&&d&&Promise.resolve().then(()=>{i.commands.focus(`end`)})},[i,d]),(0,P.useEffect)(()=>{if(e.adjustWidthForLimit){let t=document.createElement(`p`);t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`W`.repeat(e.charactersLimit),r.current.appendChild(t),n(`${t.offsetWidth+27}px`),t.remove()}},[e.adjustWidthForLimit,e.charactersLimit]);let b=(0,P.useMemo)(()=>({width:uY(t||p),minWidth:uY(f),maxWidth:uY(m),height:uY(g),minHeight:uY(h),maxHeight:uY(_)}),[t,f,p,m,h,g,_]);return(0,U.jsxs)(rQ,{noBorder:l&&l.noBorder,error:l&&l.error,className:e.className,style:{width:b.width,minWidth:b.minWidth,maxWidth:b.maxWidth},ref:r,children:[(0,U.jsx)(iQ,{disableScrollbar:s,highlightShape:v,children:(0,U.jsx)(aQ,{noPadding:l&&l.noPadding,children:o})}),i&&(0,U.jsx)(tQ,{editor:i,responseAreaProps:u,toolbarOpts:l,activePlugins:c,onChange:e.onChange,autoWidthToolbar:e.autoWidthToolbar})]})}var sQ=D(`@pie-lib:editable-html:plugins`),cQ=[`bold`,`html`,`extraCSSRules`,`italic`,`underline`,`strikethrough`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`blockquote`,`h3`,`table`,`video`,`audio`,`responseArea`,`redo`,`undo`,`superscript`,`subscript`],lQ={"text-align":`textAlign`,"bulleted-list":`ul_list`,"numbered-list":`ol_list`},uQ=cQ.filter(e=>![`responseArea`,`h3`,`blockquote`].includes(e)),dQ=(e,t,n)=>{sQ(`[buildPlugins] opts: `,n),e||=uQ;let r=(t,n=!0)=>e.includes(t)&&n&&t,i=n.image&&n.image.delete,a=n.math,o=n.responseArea&&n.responseArea.type,s=!x(n.extraCSSRules),c=n?.languageCharacters||[];return _([r(`table`),r(`bold`),r(`italic`),r(`strikethrough`),r(`underline`),r(`superscript`),r(`subscript`),r(`image`,!!i),r(`video`),r(`audio`),r(`math`,!!a),...c.map(e=>r(`languageCharacters`,e)),r(`text-align`),r(`blockquote`),r(`h3`),r(`bulleted-list`),r(`numbered-list`),r(`undo`),r(`redo`),r(`responseArea`,!!o),r(`css`,!!s),r(`html`,!!n.html)])},fQ={position:`bottom`,alignment:`left`,alwaysVisible:!1,showDone:!0,doneOn:`blur`},pQ=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`table`,`video`,`audio`,`responseArea`,`superscript`,`subscript`,`css`,`h3`,`undo`,`redo`],mQ={"--white":`#fff`,"--black":`#2e2b29`,"--black-contrast":`#110f0e`,"--gray-1":`rgba(61, 37, 20, .05)`,"--gray-2":`rgba(61, 37, 20, .08)`,"--gray-3":`rgba(61, 37, 20, .12)`,"--gray-4":`rgba(53, 38, 28, .3)`,"--gray-5":`rgba(28, 25, 23, .6)`,"--green":`#22c55e`,"--purple":`#6a00f5`,"--purple-contrast":`#5800cc`,"--purple-light":`rgba(88, 5, 255, .05)`,"--yellow-contrast":`#facc15`,"--yellow":`rgba(250, 204, 21, .4)`,"--yellow-light":`#fffae5`,"--red":`#ff5c33`,"--red-light":`#ffebe5`,"--shadow":`0px 12px 33px 0px rgba(0, 0, 0, .06),
390
- 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)`},hQ=e=>{let{showParagraphs:t,separateParagraphs:n}=e.pluginProps||{},[r,i]=(0,P.useState)([]),[a,o]=(0,P.useState)(!1),{toolbarOpts:s}=e,c=(0,P.useCallback)(e=>{i(t=>{let n=t.filter(t=>t.pos!==e);return n.length===0&&o(!1),n})},[i]),l={...fQ,...s},u=(0,P.useMemo)(()=>{let{customPlugins:t,...n}=e.pluginProps||{};t||=[];let r=(e.activePlugins||pQ)?.filter(e=>{let t=n[lQ[e]||e]||{};return!t||!t.disabled});return dQ(r,t,{math:{},textAlign:e.textAlign,html:{},extraCSSRules:e.extraCSSRules||{},image:{...e.imageSupport},toolbar:{},table:{},responseArea:{type:e.responseAreaProps?.type},languageCharacters:e.languageCharactersProps,keyPadCharacterRef:{},setKeypadInteraction:{},media:{}})},[e]),d=Db({extensions:[yk.configure({types:[`heading`,`paragraph`,`div`,`headingParagraph`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`td`,`th`],alignments:[`left`,`right`,`center`,`justify`]}),ek,tk.configure({limit:e.charactersLimit||1e6}),WO.configure({trailingNode:{node:`paragraph`,notAfter:[`paragraph`,`div`]}}),cY,Nj,lY,Pj,Fj,Sk.configure({placeholder:e.placeholder,showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!0}),kj,pj,Mj,jj,RU.configure(e.responseAreaProps),zU.configure(e.responseAreaProps),VU.configure(e.responseAreaProps),HU.configure(e.responseAreaProps),BU.configure(e.responseAreaProps),YG.configure({toolbarOpts:l,math:e.pluginProps?.math||{}}),vk,_k,xk,sq.configure({toolbarOpts:l,imageHandling:{disableImageAlignmentButtons:e.disableImageAlignmentButtons,onDone:t=>e.onDone?.(t.getHTML()),onDelete:e.imageSupport&&e.imageSupport.delete&&(t=>{let{src:n}=t.attrs;e.imageSupport.delete(n,e=>{c(t.pos)})}),insertImageRequested:e.imageSupport&&((t,n,r)=>{let[o,s]=n,l=n=>{let r;a&&n&&(r=e.onChange),c(s),r?.(t.getHTML())};t._insertingImage=!0,i(e=>[...e,o]),(()=>{let n=r(l),i=v(()=>{let e=()=>window.removeEventListener(`focus`,i);if(!t._insertingImage){e();return}c(s),t._insertingImage=!1,e()},500);window.addEventListener(`focus`,i),e.imageSupport.add(n)})()}),maxImageWidth:e.maxImageWidth,maxImageHeight:e.maxImageHeight},limit:3}),uJ.configure({uploadSoundSupport:e.uploadSoundSupport}),DJ.configure({extraCSSRules:e.extraCSSRules})],immediatelyRender:!1,editorProps:{handleKeyDown(t,n){return e.onKeyDown?e.onKeyDown(n):!1}},editable:!e.disabled,content:Tk(e.markup),onUpdate:({editor:t,transaction:n})=>{n.isDone&&e.onChange?.(t.getHTML())},onBlur:({editor:t})=>{if(t._insertingImage||t._toolbarOpened||t.isActive(`inline_dropdown`)||t.isActive(`explicit_constructed_response`)||!t.schema)return;let n=t.getHTML();e.markup!==n&&e.onChange?.(n),l.doneOn===`blur`&&e.onDone?.(n)}},[e.charactersLimit]);(0,P.useEffect)(()=>{e.editorRef&&e.editorRef(d)},[e.editorRef,d]),(0,P.useEffect)(()=>{d?.setEditable(!e.disabled)},[e.disabled,d]),(0,P.useEffect)(()=>{if(!d)return;let t=Tk(e.markup);t!==d.getHTML()&&d.commands.setContent(t,!1)},[e.markup,d]),(0,P.useEffect)(()=>{Object.entries(mQ).forEach(([e,t])=>{document.documentElement.style.setProperty(e,t)})},[]);let f=Sb({editor:d,selector:e=>({isFocused:e.editor?.isFocused})}),p=(0,P.useMemo)(()=>{let{minWidth:t,width:n,maxWidth:r,minHeight:i,height:a,maxHeight:o}=e;return{width:uY(n),minWidth:uY(t),maxWidth:uY(r),height:uY(a),minHeight:uY(i),maxHeight:uY(o)}},[e]);return(0,U.jsx)(oQ,{...e,activePlugins:u,toolbarOpts:l,editorState:f,editor:d,children:d&&(0,U.jsx)(gQ,{style:{minHeight:p.minHeight,height:p.height,maxHeight:p.maxHeight},showParagraph:t&&!t.disabled,separateParagraph:n&&!n.disabled,editor:d})})},gQ=G(yb,{shouldForwardProp:e=>![`showParagraph`,`separateParagraph`].includes(e)})(({showParagraph:e,separateParagraph:t})=>({display:`flex`,outline:`none !important`,"& .ProseMirror":{flex:1,padding:`5px`,maxHeight:`500px`,outline:`none !important`,position:`initial`,"& > p, & > div":{margin:`0`},"& p.is-editor-empty, & div.is-editor-empty":{position:`relative`},"& p.is-editor-empty::before, & div.is-editor-empty::before":{content:`attr(data-placeholder)`,position:`absolute`,left:0,top:0,color:`#9CA3AF`,pointerEvents:`none`,whiteSpace:`pre-wrap`},...e&&{"& > p:has(+ p)::after, & > div:has(+ div)::after":{display:`block`,content:`"¶"`,fontSize:`1em`,color:`#146EB3`}},...t&&{"& > p:has(+ p)":{marginBottom:`1em`}}}})),_Q=hQ,vQ=(e,t,n)=>{let r=n||[],i=r.reduce((e,t)=>e+t.textContent.length,0),a=!0;if(i>t)return!1;for(e&&=(e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&r.push(e),e.firstChild);e&&a;)a=vQ(e,t,r),e=e.nextSibling;return r},yQ=(e,t,n)=>{let r=vQ(n,t),i=[],a=0;return r.forEach(n=>{let r=a+n.textContent.length;[e,t].forEach(e=>{a<=e&&e<r&&i.push({node:n,offset:e-a})}),a=r}),i},bQ=e=>{let{commonAncestorContainer:t,startContainer:n,endContainer:r,startOffset:i,endOffset:a}=e,o=[],s=!1,c=!1,l=``,u=e=>{let{nodeValue:t,childNodes:d}=e;e===n&&e===r?(t&&(l+=t.substring(i,a)),s=c=!0):e===n?(t&&(l+=t.substring(i)),s=!0):e===r?(t&&(l+=t.substring(0,a)),c=!0):e&&e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&t&&s&&!c&&(l+=t,o.push(e)),d.forEach(e=>{if(!c)u(e);else return})};return u(t),[o,l]},xQ=e=>{let t=document.createElement(`SPAN`);return e.surroundContents(t),t},SQ=e=>{if(e.startContainer===e.endContainer)return[xQ(e)];let[t]=bQ(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);let r=xQ(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);let a=xQ(i);return[r,...t.map(e=>{let t=document.createElement(`SPAN`);return e.parentNode.insertBefore(t,e),t.appendChild(e),t}),a]},CQ=(e,t)=>{let n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);let[,r]=bQ(n),[,i]=bQ(e),a=r.length;return{quote:i,start:a,end:a+i.length}},wQ=(e,t)=>{(e||[]).forEach(e=>{let t=e.parentNode,n=e.childNodes,r=n.length;if(r>0)for(let i=0;i<r;i++)t.insertBefore(n[0],e);else t.insertBefore(document.createTextNode(e.textContent),e);t.removeChild(e)}),t.normalize()},TQ=()=>{document.getSelection?(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange())):window.getSelection?window.getSelection().removeAllRanges?(window.getSelection().removeAllRanges(),window.getSelection().addRange(document.createRange())):window.getSelection().empty&&window.getSelection().empty():document.selection&&document.selection.empty()},EQ=e=>e.length>=20||e.search(/\n|\r|\r\n/)!==-1,DQ=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),OQ=e=>document.querySelector(`[data-ann-id='${e}']`),kQ=G(zI)(({theme:e,annotationType:t})=>({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginLeft:`16px`,"&::before":{position:`absolute`,right:`100%`,top:`13px`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderRightColor:e.palette.grey[100]},...t===`negative`&&{"&::before":{borderRightColor:`rgb(255, 204, 238) !important`}},...t===`positive`&&{"&::before":{borderRightColor:`rgb(153, 255, 153) !important`}}}})),AQ=G(`div`)(({theme:e,annotationType:t})=>({width:`200px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:`#ffffff`,border:`4px solid ${e.palette.grey[100]}`,...t===`negative`&&{borderColor:`rgb(255, 204, 238) !important`},...t===`positive`&&{borderColor:`rgb(153, 255, 153) !important`}})),jQ=G(`div`)(({theme:e})=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${e.palette.grey[100]}`})),MQ=G(`div`)(({theme:e,variant:t,annotationType:n})=>({flexGrow:1,width:`28%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,"&:not(:nth-child(3n))":{borderRight:`1px solid ${e.palette.grey[100]}`},"&:hover":{backgroundColor:e.palette.grey[100]},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}},...t===`typeChange`&&n===`negative`&&{"&:hover":{backgroundColor:`rgb(153, 255, 153) !important`}},...t===`typeChange`&&n===`positive`&&{"&:hover":{backgroundColor:`rgb(255, 204, 238) !important`}}})),NQ=class extends P.Component{static propTypes={anchorEl:p.object,open:p.bool,offset:p.number,value:p.string,type:p.string,onClose:p.func,onDelete:p.func,onSave:p.func,onTypeChange:p.func};constructor(e){super(e),this.state={value:e.value}}UNSAFE_componentWillReceiveProps(e){let{value:t}=e,{value:n}=this.props;t!==n&&this.setState({value:t})}onValueChange=e=>this.setState({value:e.target.value});handleSave=()=>{let{value:e,onSave:t,onClose:n,onDelete:r}=this.props,{value:i}=this.state;i===``&&r(),e!==i&&t(e,i),this.setState({value:``}),n()};handleTypeChange=()=>{let{onTypeChange:e,onDelete:t}=this.props,{value:n}=this.state;n===``?t():e(n),this.setState({value:``})};render(){let{anchorEl:e,offset:t,onDelete:n,open:r,type:i}=this.props,{value:a}=this.state;return(0,U.jsx)(kQ,{anchorEl:e,elevation:2,open:r,onClose:this.handleSave,annotationType:i,style:{marginTop:`${t}px`,transition:`margin-top 2s ease-out`},transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`left`},children:(0,U.jsxs)(AQ,{annotationType:i,children:[(0,U.jsx)(jK,{id:`annotation-editor`,style:{padding:`2px 5px`,width:`95%`},autoFocus:!0,multiline:!0,rows:1,maxRows:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),(0,U.jsxs)(jQ,{children:[(0,U.jsx)(MQ,{onClick:n,children:`Delete`}),(0,U.jsx)(MQ,{variant:`typeChange`,annotationType:i,onClick:this.handleTypeChange,children:i===`negative`?`Green`:`Pink`}),(0,U.jsx)(MQ,{onClick:this.handleSave,children:`Save`})]})]})})}},PQ=G(zI)({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginTop:`-16px`,"&::after":{position:`absolute`,left:`calc(50% - 7px)`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderTopColor:`black`}}}),FQ=G(`div`)(({theme:e})=>({width:`300px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:e.palette.common.white,border:`2px solid ${e.palette.grey[100]}`})),IQ=G(`div`)({display:`flex`,flexWrap:`wrap`}),LQ=G(`div`)(({theme:e})=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${e.palette.grey[100]}`})),RQ=G(`div`)(({theme:e,variant:t})=>({width:`22%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,borderBottom:`1px solid ${e.palette.grey[100]}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${e.palette.grey[100]}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:e.palette.grey[100]},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}}})),zQ=class extends P.Component{static propTypes={anchorEl:p.object,open:p.bool,annotations:p.array,isNewAnnotation:p.bool,onClose:p.func,onDelete:p.func,onEdit:p.func,onWrite:p.func,onAnnotate:p.func};render(){let{anchorEl:e,annotations:t,isNewAnnotation:n,onAnnotate:r,onClose:i,onEdit:a,onDelete:o,onWrite:s,open:c}=this.props;return(0,U.jsx)(PQ,{anchorEl:e,open:c,onClose:i,elevation:5,transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`center`},transformOrigin:{vertical:`bottom`,horizontal:`center`},children:(0,U.jsxs)(FQ,{children:[(0,U.jsx)(IQ,{children:t.map((e,t)=>(0,U.jsx)(RQ,{variant:e.type,onClick:()=>r(e),children:e.label},`annotation-${t}`))}),(0,U.jsxs)(LQ,{children:[(0,U.jsx)(RQ,{onClick:i,children:`Cancel`}),(0,U.jsx)(RQ,{style:{pointerEvents:`none`}}),n?(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(RQ,{variant:`positive`,onClick:()=>s(`positive`),children:`Write`}),(0,U.jsx)(RQ,{variant:`negative`,onClick:()=>s(`negative`),children:`Write`})]}):(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(RQ,{onClick:o,children:`Delete`}),(0,U.jsx)(RQ,{onClick:a,children:`Edit`})]})]})]})})}};function BQ(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function VQ(e,t){return!e||BQ(e)?e:BQ(e.default)?e.default:t&&BQ(e[t])?e[t]:t&&BQ(e[t]?.default)?e[t].default:e}var HQ=VQ(mz,`InputContainer`)||VQ(GQ.InputContainer,`InputContainer`),UQ=Yz,WQ=UQ.default,GQ=WQ&&typeof WQ==`object`?WQ:UQ,KQ=G(`div`)({padding:`10px 120px 10px 16px`,backgroundColor:`rgba(0, 0, 0, 0.06)`,border:`1px solid #ccc`,borderRadius:`4px`,overflowY:`scroll`,lineHeight:`36px`,whiteSpace:`pre-wrap`,overflowWrap:`break-word`,"& p":{margin:0},"& span[data-latex]":{userSelect:`none`,"-webkit-user-select":`none`,"-moz-user-select":`none`,"-ms-user-select":`none`}}),qQ=G(`div`)({width:`230px`}),JQ=G(`div`)({position:`relative`,overflowX:`hidden`,display:`flex`}),YQ=G(HQ)(({theme:e})=>({paddingTop:e.spacing(2),marginBottom:e.spacing(2),marginTop:e.spacing(2),width:`100%`})),XQ=`
387
+ `),[i,a]=eY(r);if(i.length===0)return;let o=tY(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
388
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(rY,this.editor.getAttributes(iY)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Zv({find:aY,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Zv({find:aY,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(iY)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),sY=/^\s*(\[([( |x])?\])\s$/,cY=uy.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,m_(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>cy(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=h_(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Zv({find:sY,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),lY=uy.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,m_(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
389
+ `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=sy(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=sy(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Pv.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(FJ.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(RJ.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(YJ.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(oY.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(cY.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(lY.configure(this.options.taskList)),e}});var uY=RJ.extend({content:`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`}),dY=uy.create({name:`headingParagraph`,group:`block`,content:`inline*`,defining:!0,addAttributes(){return{"data-heading":{default:`heading1`,parseHTML:e=>e.getAttribute(`data-heading`),renderHTML:e=>({"data-heading":e[`data-heading`]})}}},parseHTML(){return[{tag:`p[data-heading]`}]},renderHTML({HTMLAttributes:e}){return[`p`,m_(e),0]},addCommands(){return{toggleHeadingParagraph:()=>({commands:e,editor:t})=>t.isActive(`headingParagraph`)?e.setNode(`paragraph`):e.setNode(`headingParagraph`,{"data-heading":`heading1`})}}}),fY=e=>{if(!e)return;let t=/^calc\((.*)\)$/;if(typeof e==`string`){if(e.endsWith(`%`))return;if(e.endsWith(`px`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`ch`)||e.endsWith(`em`)||e.match(t))return e;let n=parseInt(e,10);return Number.isNaN(n)?n:`${n}px`}if(typeof e==`number`)return`${e}px`},pY=Vj((0,U.jsx)(`path`,{d:`M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5`}),`FormatBold`),mY=Vj((0,U.jsx)(`path`,{d:`M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z`}),`FormatItalic`),hY=Vj((0,U.jsx)(`path`,{d:`M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z`}),`FormatStrikethrough`),gY=Vj((0,U.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),_Y=Vj((0,U.jsx)(`path`,{d:`M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z`}),`GridOn`),vY=Vj((0,U.jsx)(`path`,{d:`M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z`}),`FormatListBulleted`),yY=Vj((0,U.jsx)(`path`,{d:`M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z`}),`FormatListNumbered`),bY=Vj((0,U.jsx)(`path`,{d:`M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z`}),`FormatUnderlined`),xY=Vj((0,U.jsx)(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),SY=Vj((0,U.jsx)(`path`,{d:`M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z`}),`Image`),CY=Vj((0,U.jsx)(`path`,{d:`M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z`}),`Redo`),wY=Vj((0,U.jsx)(`path`,{d:`M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z`}),`FormatQuote`),TY=Vj((0,U.jsx)(`path`,{d:`M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3zM8 17H6v-2h2zm0-4H6v-2h2zm0-4H6V7h2zm10 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V7h2z`}),`Theaters`),EY=Vj((0,U.jsx)(`path`,{d:`M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77`}),`VolumeUp`),DY=Vj((0,U.jsx)(`path`,{d:`M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z`}),`BorderAll`),OY=G(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`})),kY=()=>(0,U.jsx)(OY,{children:`+ Response Area`}),AY={characters:[[`á`,`é`,`í`,`ó`,`ú`],[`Á`,`É`,`Í`,`Ó`,`Ú`],[`—`,`«`,`»`,`ñ`,`ü`],[`-`,`¿`,`¡`,`Ñ`,`Ü`]]},jY={hasPreview:!0,characters:[[{unicode:`U+00A2`,description:`CENT SIGN`,write:`¢`,label:`¢`},{unicode:`U+00BF`,description:`INVERTED QUESTION MARK`,write:`¿`,label:`¿`},{unicode:`U+00B4`,description:`ACUTE ACCENT`,write:`´`,label:`´`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E1`,description:`LATIN SMALL LETTER A WITH ACUTE`,write:`á`,label:`á`},{unicode:`U+00E9`,description:`LATIN SMALL LETTER E WITH ACUTE`,write:`é`,label:`é`},{unicode:`U+00ED`,description:`LATIN SMALL LETTER I WITH ACUTE`,write:`í`,label:`í`},{unicode:`U+00F3`,description:`LATIN SMALL LETTER O WITH ACUTE`,write:`ó`,label:`ó`},{unicode:`U+00FA`,description:`LATIN SMALL LETTER U WITH ACUTE`,write:`ú`,label:`ú`},{unicode:`U+00F1`,description:`LATIN SMALL LETTER N WITH TILDE`,write:`ñ`,label:`ñ`}],[{unicode:`U+20AC`,description:`EURO SIGN`,write:`€`,label:`€`},{unicode:`U+00A1`,description:`INVERTED EXCLAMATION MARK`,write:`¡`,label:`¡`},{unicode:`U+00C1`,description:`LATIN CAPITAL LETTER A WITH ACUTE`,write:`Á`,label:`Á`},{unicode:`U+00C9`,description:`LATIN CAPITAL LETTER E WITH ACUTE`,write:`É`,label:`É`},{unicode:`U+00CD`,description:`LATIN CAPITAL LETTER I WITH ACUTE`,write:`Í`,label:`Í`},{unicode:`U+00D3`,description:`LATIN CAPITAL LETTER O WITH ACUTE`,write:`Ó`,label:`Ó`},{unicode:`U+00DA`,description:`LATIN CAPITAL LETTER U WITH ACUTE`,write:`Ú`,label:`Ú`},{unicode:`U+00D1`,description:`LATIN CAPITAL LETTER N WITH TILDE`,write:`Ñ`,label:`Ñ`}],[{unicode:`U+00A3`,description:`POUND SIGN`,write:`£`,label:`£`},{unicode:`U+00AB`,description:`LEFT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`«`,label:`«`},{unicode:`U+005E`,description:`CIRCUMFLEX ACCENT`,write:`^`,label:`^`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E2`,description:`LATIN SMALL LETTER A WITH CIRCUMFLEX`,write:`â`,label:`â`},{unicode:`U+00EA`,description:`LATIN SMALL LETTER E WITH CIRCUMFLEX`,write:`ê`,label:`ê`},{unicode:`U+00EE`,description:`LATIN SMALL LETTER I WITH CIRCUMFLEX`,write:`î`,label:`î`},{unicode:`U+00F4`,description:`LATIN SMALL LETTER O WITH CIRCUMFLEX`,write:`ô`,label:`ô`},{unicode:`U+00FB`,description:`LATIN SMALL LETTER U WITH CIRCUMFLEX`,write:`û`,label:`û`},{unicode:`U+00E7`,description:`LATIN SMALL LETTER C WITH CEDILLA`,write:`ç`,label:`ç`}],[{unicode:`U+00A5`,description:`YEN SIGN`,write:`¥`,label:`¥`},{unicode:`U+00BB`,description:`RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`»`,label:`»`},{unicode:`U+00C2`,description:`LATIN CAPITAL LETTER A WITH CIRCUMFLEX`,write:`Â`,label:`Â`},{unicode:`U+00CA`,description:`LATIN CAPITAL LETTER E WITH CIRCUMFLEX`,write:`Ê`,label:`Ê`},{unicode:`U+00CE`,description:`LATIN CAPITAL LETTER I WITH CIRCUMFLEX`,write:`Î`,label:`Î`},{unicode:`U+00D4`,description:`LATIN CAPITAL LETTER O WITH CIRCUMFLEX`,write:`Ô`,label:`Ô`},{unicode:`U+00DB`,description:`LATIN CAPITAL LETTER U WITH CIRCUMFLEX`,write:`Û`,label:`Û`},{unicode:`U+00C7`,description:`LATIN CAPITAL LETTER C WITH CEDILLA`,write:`Ç`,label:`Ç`}],[{unicode:`U+200A`,description:`HAIR SPACE`,write:String.fromCodePoint(`0x200A`),label:`&hairsp;`},{unicode:`U+00A7`,description:`SECTION SIGN`,write:`§`,label:`§`},{unicode:`U+00A8`,description:`DIAERESIS`,write:`¨`,label:`¨`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E4`,description:`LATIN SMALL LETTER A WITH DIAERESIS`,write:`ä`,label:`ä`},{unicode:`U+00EB`,description:`LATIN SMALL LETTER E WITH DIAERESIS`,write:`ë`,label:`ë`},{unicode:`U+00EF`,description:`LATIN SMALL LETTER I WITH DIAERESIS`,write:`ï`,label:`ï`},{unicode:`U+00F6`,description:`LATIN SMALL LETTER O WITH DIAERESIS`,write:`ö`,label:`ö`},{unicode:`U+00FC`,description:`LATIN SMALL LETTER U WITH DIAERESIS`,write:`ü`,label:`ü`},{unicode:`U+00DF`,description:`LATIN SMALL LETTER SHARP S`,write:`ß`,label:`ß`}],[{unicode:`U+2009`,description:`THIN SPACE`,write:String.fromCodePoint(`0x2009`),label:`&thinsp;`},{unicode:`U+2026`,description:`HORIZONTAL ELLIPSIS`,write:`…`,label:`…`},{unicode:`U+00C4`,description:`LATIN CAPITAL LETTER A WITH DIAERESIS`,write:`Ä`,label:`Ä`},{unicode:`U+00CB`,description:`LATIN CAPITAL LETTER E WITH DIAERESIS`,write:`Ë`,label:`Ë`},{unicode:`U+00CF`,description:`LATIN CAPITAL LETTER I WITH DIAERESIS`,write:`Ï`,label:`Ï`},{unicode:`U+00D6`,description:`LATIN CAPITAL LETTER O WITH DIAERESIS`,write:`Ö`,label:`Ö`},{unicode:`U+00DC`,description:`LATIN CAPITAL LETTER U WITH DIAERESIS`,write:`Ü`,label:`Ü`},{unicode:`U+2212`,description:`MINUS SIGN`,write:`−`,label:`−`}],[{unicode:`U+00A0`,description:`NO-BREAK SPACE`,write:String.fromCodePoint(`0x00A0`),label:`&nbsp;`},{unicode:`U+2022`,description:`BULLET`,write:`•`,label:`•`},{unicode:`U+0060`,description:`GRAVE ACCENT`,write:"`",label:"`",extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E0`,description:`LATIN SMALL LETTER A WITH GRAVE`,write:`à`,label:`à`},{unicode:`U+00E8`,description:`LATIN SMALL LETTER E WITH GRAVE`,write:`è`,label:`è`},{unicode:`U+00EC`,description:`LATIN SMALL LETTER I WITH GRAVE`,write:`ì`,label:`ì`},{unicode:`U+00F2`,description:`LATIN SMALL LETTER O WITH GRAVE`,write:`ò`,label:`ò`},{unicode:`U+00F9`,description:`LATIN SMALL LETTER U WITH GRAVE`,write:`ù`,label:`ù`},{unicode:`U+2013`,description:`EN DASH`,write:`–`,label:`–`}],[{unicode:`U+2003`,description:`EM SPACE`,write:String.fromCodePoint(`0x2003`),label:`&emsp;`},{unicode:`U+25E6`,description:`WHITE BULLET`,write:`◦`,label:`◦`},{unicode:`U+00C0`,description:`LATIN CAPITAL LETTER A WITH GRAVE`,write:`À`,label:`À`},{unicode:`U+00C8`,description:`LATIN CAPITAL LETTER E WITH GRAVE`,write:`È`,label:`È`},{unicode:`U+00CC`,description:`LATIN CAPITAL LETTER I WITH GRAVE`,write:`Ì`,label:`Ì`},{unicode:`U+00D2`,description:`LATIN CAPITAL LETTER O WITH GRAVE`,write:`Ò`,label:`Ò`},{unicode:`U+00D9`,description:`LATIN CAPITAL LETTER U WITH GRAVE`,write:`Ù`,label:`Ù`},{unicode:`U+2014`,description:`EM DASH`,write:`—`,label:`—`}]]},MY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),NY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),PY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z`,fill:`currentColor`})}),FY=()=>(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),IY=({editor:e,onChange:t})=>{let[n,r]=(0,P.useState)(!1),i;switch(!0){case e.isActive({textAlign:`right`}):i=(0,U.jsx)(NY,{});break;case e.isActive({textAlign:`center`}):i=(0,U.jsx)(PY,{});break;case e.isActive({textAlign:`justify`}):i=(0,U.jsx)(FY,{});break;default:i=(0,U.jsx)(MY,{});break}let a=t=>{let n=t.currentTarget?.getAttribute(`value`);n&&e.commands.setTextAlign(n),r(!1)};return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!n)},children:[i,(0,U.jsx)(`span`,{style:{marginLeft:`5px`,fontSize:`8px`},children:`▼`})]}),(0,U.jsx)(cR,{in:n,timeout:`auto`,unmountOnExit:!0,style:{position:`absolute`},children:(0,U.jsxs)(Fz,{component:`div`,disablePadding:!0,style:{background:`#fff`,display:`flex`,flexDirection:`row`,padding:0},children:[(0,U.jsx)(EJ,{button:!0,type:`submit`,value:`left`,"aria-label":`Align text left`,onClick:a,children:(0,U.jsx)(MY,{})}),(0,U.jsx)(EJ,{button:!0,type:`submit`,value:`center`,"aria-label":`Align text center`,onClick:a,children:(0,U.jsx)(PY,{})}),(0,U.jsx)(EJ,{button:!0,type:`submit`,value:`right`,"aria-label":`Align text right`,onClick:a,children:(0,U.jsx)(NY,{})}),(0,U.jsx)(EJ,{button:!0,type:`submit`,value:`justify`,"aria-label":`Justify text`,onClick:a,children:(0,U.jsx)(FY,{})})]})})]})},LY=G(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans, Arial, sans-serif`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,whiteSpace:`nowrap`})),RY=()=>(0,U.jsx)(LY,{children:`CSS`}),zY=G(`path`)({fill:`grey`,"&:hover":{fill:`black`}}),BY=e=>t=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:(0,U.jsx)(e,{...t})}),VY=BY(e=>(0,U.jsx)(zY,{...e,d:`M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z`})),HY=BY(e=>(0,U.jsx)(zY,{...e,d:`M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z`})),UY=BY(e=>(0,U.jsx)(zY,{...e,d:`M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z`})),WY=BY(e=>(0,U.jsx)(zY,{...e,d:`M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z`})),GY=BY(e=>(0,U.jsx)(zY,{...e,d:`M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z`})),KY=`bottom`,qY=`right`,JY=`left`,YY=`auto`,XY=[`top`,KY,qY,JY],ZY=`start`,QY=`clippingParents`,$Y=`viewport`,eX=`popper`,tX=`reference`,nX=XY.reduce(function(e,t){return e.concat([t+`-`+ZY,t+`-end`])},[]),rX=[].concat(XY,[YY]).reduce(function(e,t){return e.concat([t,t+`-`+ZY,t+`-end`])},[]),iX=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function aX(e){return e?(e.nodeName||``).toLowerCase():null}function oX(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sX(e){return e instanceof oX(e).Element||e instanceof Element}function cX(e){return e instanceof oX(e).HTMLElement||e instanceof HTMLElement}function lX(e){return typeof ShadowRoot>`u`?!1:e instanceof oX(e).ShadowRoot||e instanceof ShadowRoot}function uX(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!cX(i)||!aX(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function dX(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!cX(r)||!aX(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var fX={name:`applyStyles`,enabled:!0,phase:`write`,fn:uX,effect:dX,requires:[`computeStyles`]};function pX(e){return e.split(`-`)[0]}var mX=Math.max,hX=Math.min,gX=Math.round;function _X(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function vX(){return!/^((?!chrome|android).)*safari/i.test(_X())}function yX(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&cX(e)&&(i=e.offsetWidth>0&&gX(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&gX(r.height)/e.offsetHeight||1);var o=(sX(e)?oX(e):window).visualViewport,s=!vX()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function bX(e){var t=yX(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function xX(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&lX(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function SX(e){return oX(e).getComputedStyle(e)}function CX(e){return[`table`,`td`,`th`].indexOf(aX(e))>=0}function wX(e){return((sX(e)?e.ownerDocument:e.document)||window.document).documentElement}function TX(e){return aX(e)===`html`?e:e.assignedSlot||e.parentNode||(lX(e)?e.host:null)||wX(e)}function EX(e){return!cX(e)||SX(e).position===`fixed`?null:e.offsetParent}function DX(e){var t=/firefox/i.test(_X());if(/Trident/i.test(_X())&&cX(e)&&SX(e).position===`fixed`)return null;var n=TX(e);for(lX(n)&&(n=n.host);cX(n)&&[`html`,`body`].indexOf(aX(n))<0;){var r=SX(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function OX(e){for(var t=oX(e),n=EX(e);n&&CX(n)&&SX(n).position===`static`;)n=EX(n);return n&&(aX(n)===`html`||aX(n)===`body`&&SX(n).position===`static`)?t:n||DX(e)||t}function kX(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function AX(e,t,n){return mX(e,hX(t,n))}function jX(e,t,n){var r=AX(e,t,n);return r>n?n:r}function MX(){return{top:0,right:0,bottom:0,left:0}}function NX(e){return Object.assign({},MX(),e)}function PX(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var FX=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,NX(typeof e==`number`?PX(e,XY):e)};function IX(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=pX(n.placement),c=kX(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=FX(i.padding,n),d=bX(a),f=c===`y`?`top`:JY,p=c===`y`?KY:qY,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=OX(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=AX(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function LX(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||xX(t.elements.popper,r)&&(t.elements.arrow=r))}var RX={name:`arrow`,enabled:!0,phase:`main`,fn:IX,effect:LX,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function zX(e){return e.split(`-`)[1]}var BX={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function VX(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:gX(n*i)/i||0,y:gX(r*i)/i||0}}function HX(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=JY,b=`top`,x=window;if(l){var S=OX(n),C=`clientHeight`,w=`clientWidth`;if(S===oX(n)&&(S=wX(n),SX(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=KY;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=qY;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&BX),O=u===!0?VX({x:p,y:h},oX(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function UX(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:pX(t.placement),variation:zX(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,HX(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,HX(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var WX={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:UX,data:{}},GX={passive:!0};function KX(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=oX(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,GX)}),s&&c.addEventListener(`resize`,n.update,GX),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,GX)}),s&&c.removeEventListener(`resize`,n.update,GX)}}var qX={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:KX,data:{}},JX={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function YX(e){return e.replace(/left|right|bottom|top/g,function(e){return JX[e]})}var XX={start:`end`,end:`start`};function ZX(e){return e.replace(/start|end/g,function(e){return XX[e]})}function QX(e){var t=oX(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function $X(e){return yX(wX(e)).left+QX(e).scrollLeft}function eZ(e,t){var n=oX(e),r=wX(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=vX();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+$X(e),y:c}}function tZ(e){var t=wX(e),n=QX(e),r=e.ownerDocument?.body,i=mX(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=mX(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+$X(e),s=-n.scrollTop;return SX(r||t).direction===`rtl`&&(o+=mX(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function nZ(e){var t=SX(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function rZ(e){return[`html`,`body`,`#document`].indexOf(aX(e))>=0?e.ownerDocument.body:cX(e)&&nZ(e)?e:rZ(TX(e))}function iZ(e,t){t===void 0&&(t=[]);var n=rZ(e),r=n===e.ownerDocument?.body,i=oX(n),a=r?[i].concat(i.visualViewport||[],nZ(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(iZ(TX(a)))}function aZ(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oZ(e,t){var n=yX(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sZ(e,t,n){return t===`viewport`?aZ(eZ(e,n)):sX(t)?oZ(t,n):aZ(tZ(wX(e)))}function cZ(e){var t=iZ(TX(e)),n=[`absolute`,`fixed`].indexOf(SX(e).position)>=0&&cX(e)?OX(e):e;return sX(n)?t.filter(function(e){return sX(e)&&xX(e,n)&&aX(e)!==`body`}):[]}function lZ(e,t,n,r){var i=t===`clippingParents`?cZ(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=sZ(e,n,r);return t.top=mX(i.top,t.top),t.right=hX(i.right,t.right),t.bottom=hX(i.bottom,t.bottom),t.left=mX(i.left,t.left),t},sZ(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function uZ(e){var t=e.reference,n=e.element,r=e.placement,i=r?pX(r):null,a=r?zX(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case KY:c={x:o,y:t.y+t.height};break;case qY:c={x:t.x+t.width,y:s};break;case JY:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?kX(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case ZY:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function dZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?QY:s,l=n.rootBoundary,u=l===void 0?$Y:l,d=n.elementContext,f=d===void 0?eX:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=NX(typeof g==`number`?PX(g,XY):g),v=f===`popper`?tX:eX,y=e.rects.popper,b=e.elements[m?v:f],x=lZ(sX(b)?b:b.contextElement||wX(e.elements.popper),c,u,o),S=yX(e.elements.reference),C=uZ({reference:S,element:y,strategy:`absolute`,placement:i}),w=aZ(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function fZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?rX:c,u=zX(r),d=u?s?nX:nX.filter(function(e){return zX(e)===u}):XY,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=dZ(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[pX(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function pZ(e){if(pX(e)===`auto`)return[];var t=YX(e);return[ZX(e),t,ZX(t)]}function mZ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,_=pX(g)===g,v=c||(_||!m?[YX(g)]:pZ(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(pX(n)===`auto`?fZ(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=pX(E),O=zX(E)===ZY,k=[`top`,KY].indexOf(D)>=0,A=k?`width`:`height`,j=dZ(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?qY:JY:O?KY:`top`;b[A]>x[A]&&(M=YX(M));var ee=YX(M),N=[];if(a&&N.push(j[D]<=0),s&&N.push(j[M]<=0,j[ee]<=0),N.every(function(e){return e})){w=E,C=!1;break}S.set(E,N)}if(C)for(var P=m?3:1,te=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},F=P;F>0&&te(F)!==`break`;F--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var hZ={name:`flip`,enabled:!0,phase:`main`,fn:mZ,requiresIfExists:[`offset`],data:{_skip:!1}};function gZ(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _Z(e){return[`top`,qY,KY,JY].some(function(t){return e[t]>=0})}function vZ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=dZ(t,{elementContext:`reference`}),s=dZ(t,{altBoundary:!0}),c=gZ(o,r),l=gZ(s,i,a),u=_Z(c),d=_Z(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var yZ={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:vZ};function bZ(e,t,n){var r=pX(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function xZ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=rX.reduce(function(e,n){return e[n]=bZ(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var SZ={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:xZ};function CZ(e){var t=e.state,n=e.name;t.modifiersData[n]=uZ({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var wZ={name:`popperOffsets`,enabled:!0,phase:`read`,fn:CZ,data:{}};function TZ(e){return e===`x`?`y`:`x`}function EZ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=dZ(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=pX(t.placement),v=zX(t.placement),y=!v,b=kX(_),x=TZ(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:JY,A=b===`y`?KY:qY,j=b===`y`?`height`:`width`,M=S[b],ee=M+g[k],N=M-g[A],P=p?-w[j]/2:0,te=v===`start`?C[j]:w[j],F=v===`start`?-w[j]:-C[j],I=t.elements.arrow,L=p&&I?bX(I):{width:0,height:0},ne=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:MX(),re=ne[k],ie=ne[A],R=AX(0,C[j],L[j]),ae=y?C[j]/2-P-R-re-E.mainAxis:te-R-re-E.mainAxis,z=y?-C[j]/2+P+R+ie+E.mainAxis:F+R+ie+E.mainAxis,B=t.elements.arrow&&OX(t.elements.arrow),oe=B?b===`y`?B.clientTop||0:B.clientLeft||0:0,se=D?.[b]??0,ce=M+ae-se-oe,le=M+z-se,ue=AX(p?hX(ee,ce):ee,M,p?mX(N,le):N);S[b]=ue,O[b]=ue-M}if(s){var de=b===`x`?`top`:JY,fe=b===`x`?KY:qY,V=S[x],pe=x===`y`?`height`:`width`,me=V+g[de],he=V-g[fe],ge=[`top`,JY].indexOf(_)!==-1,_e=D?.[x]??0,H=ge?me:V-C[pe]-w[pe]-_e+E.altAxis,ve=ge?V+C[pe]+w[pe]-_e-E.altAxis:he,ye=p&&ge?jX(H,V,ve):AX(p?H:me,V,p?ve:he);S[x]=ye,O[x]=ye-V}t.modifiersData[r]=O}}var DZ={name:`preventOverflow`,enabled:!0,phase:`main`,fn:EZ,requiresIfExists:[`offset`]};function OZ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kZ(e){return e===oX(e)||!cX(e)?QX(e):OZ(e)}function AZ(e){var t=e.getBoundingClientRect(),n=gX(t.width)/e.offsetWidth||1,r=gX(t.height)/e.offsetHeight||1;return n!==1||r!==1}function jZ(e,t,n){n===void 0&&(n=!1);var r=cX(t),i=cX(t)&&AZ(t),a=wX(t),o=yX(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((aX(t)!==`body`||nZ(a))&&(s=kZ(t)),cX(t)?(c=yX(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=$X(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function MZ(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function NZ(e){var t=MZ(e);return iX.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function PZ(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function FZ(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var IZ={placement:`bottom`,modifiers:[],strategy:`absolute`};function LZ(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function RZ(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?IZ:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},IZ,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:sX(e)?iZ(e):e.contextElement?iZ(e.contextElement):[],popper:iZ(t)};var s=NZ(FZ([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(LZ(t,n)){i.rects={reference:jZ(t,OX(n),i.options.strategy===`fixed`),popper:bX(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:PZ(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!LZ(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var zZ=RZ({defaultModifiers:[qX,wZ,WX,fX,SZ,hZ,DZ,RX,yZ]});function BZ(e){return Yr(`MuiPopper`,e)}Xr(`MuiPopper`,[`root`]);function VZ(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function HZ(e){return typeof e==`function`?e():e}function UZ(e){return e.nodeType!==void 0}var WZ=e=>{let{classes:t}=e;return A({root:[`root`]},BZ,t)},GZ={},KZ=P.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=P.useRef(null),_=nM(g,t),v=P.useRef(null),y=nM(v,u),b=P.useRef(y);ui(()=>{b.current=y},[y]),P.useImperativeHandle(u,()=>v.current,[]);let x=VZ(c,i),[S,C]=P.useState(x),[w,T]=P.useState(HZ(n));P.useEffect(()=>{v.current&&v.current.forceUpdate()}),P.useEffect(()=>{n&&T(HZ(n))},[n]),ui(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=zZ(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let E={placement:S};p!==null&&(E.TransitionProps=p);let D=WZ(e),O=f.root??`div`;return(0,U.jsx)(O,{...Az({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(E):r})}),qZ=G(P.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=GZ,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=P.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=HZ(n);S=e&&UZ(e)?Gj(e).body:Gj(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,U.jsx)(rI,{disablePortal:o,container:S,children:(0,U.jsx)(KZ,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),JZ=G(P.forwardRef(function(e,t){let n=Ii(),{anchorEl:r,component:i,components:a,componentsProps:o,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,slots:g,slotProps:_,...v}=Lo({props:e,name:`MuiPopper`}),y=g?.root??a?.Root,b={anchorEl:r,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,...v};return(0,U.jsx)(qZ,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})}))({background:`#fff`,padding:`10px`,pointerEvents:`none`,zIndex:99999}),YZ=G(qo)({fontSize:50,textAlign:`center`}),XZ=({children:e,...t})=>(0,U.jsx)(JZ,{id:`mouse-over-popover`,open:!0,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableRestoreFocus:!0,disableAutoFocus:!0,...t,children:(0,U.jsx)(YZ,{children:e})}),ZZ=({letter:e})=>(0,U.jsx)(`div`,{style:{fontSize:`24px`,lineHeight:`24px`},children:e});ZZ.propTypes={letter:p.string};function QZ({editor:e,opts:t,onClose:n}){if(!t?.characters?.length)return null;let r=(0,P.useRef)(null),i=(0,P.useRef)(n),[a,o]=(0,P.useState)({top:0,left:0}),[s,c]=(0,P.useState)(null);i.current=n;let l=(0,P.useMemo)(()=>{if(!t)return AY;switch(!0){case t.language===`spanish`:return AY;case t.language===`special`:return jY;default:return t}},[t]),u=(0,P.useMemo)(()=>l.characters.reduce((e,t)=>(t.length>=e.columns&&(e.columns=t.length),e),{rows:l.characters.length,columns:0}),[l]),d=()=>c(null);(0,P.useEffect)(()=>()=>{d()},[]),(0,P.useEffect)(()=>{if(!e)return;let t=e.options.element.getBoundingClientRect(),n=document.body.getBoundingClientRect(),{from:a}=e.state.selection,s=e.view.coordsAtPos(a),c=t.top+Math.abs(n.top)+t.height+60;t.y>r.current.offsetHeight&&(c=c-(r.current.offsetHeight+t.height)-80),o({top:c,left:s.left});let l=e.view.dom,u=e=>{r.current&&!r.current.contains(e.target)&&!l.contains(e.target)&&i.current()},d=setTimeout(()=>{document.addEventListener(`click`,u)});return()=>{clearTimeout(d),document.removeEventListener(`click`,u)}},[e]);let f=(e,t)=>c({anchorEl:e.currentTarget,el:t});return(0,U.jsxs)(U.Fragment,{children:[db.createPortal((0,U.jsx)(`div`,{ref:r,className:`insert-character-dialog`,"data-toolbar-for":e.instanceId,style:{visibility:a.top===0&&a.left===0?`hidden`:`initial`,position:`absolute`,top:`${a.top}px`,left:`${a.left}px`,maxWidth:`500px`,zIndex:99},children:(0,U.jsx)(`div`,{children:(0,U.jsx)(KG,{keyPadCharacterRef:t.keyPadCharacterRef,setKeypadInteraction:t.setKeypadInteraction,autoFocus:!0,noDecimal:!0,hideInput:!0,noLatexHandling:!0,hideDoneButtonBackground:!0,layoutForKeyPad:u,additionalKeys:l.characters.reduce((e,t)=>(e=[...e,...t.map(e=>({name:b(e,`name`)||e,write:b(e,`write`)||e,label:b(e,`label`)||e,category:`character`,extraClass:`character`,extraProps:{...e.extraProps||{},style:{...(e.extraProps||{}).style,border:`1px solid #000`}},...l.hasPreview?{actions:{onMouseEnter:t=>f(t,e),onMouseLeave:d}}:{}}))],e),[]),keypadMode:`language`,onChange:t=>{typeof t==`string`&&e.chain().focus().insertContent(t).run()},onDone:n})})}),document.body),s&&db.createPortal((0,U.jsxs)(XZ,{onClose:d,anchorEl:s.anchorEl,children:[(0,U.jsx)(`div`,{children:s.el.label}),(0,U.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.description}),(0,U.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.unicode})]}),document.body)]})}QZ.propTypes={editor:p.object,opts:p.object,onClose:p.func.isRequired};var $Z=()=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,children:(0,U.jsx)(`path`,{d:`M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z`,fill:`currentColor`})}),eQ=()=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,children:(0,U.jsx)(`path`,{d:`M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z`,fill:`currentColor`})}),tQ=()=>(0,U.jsx)(`svg`,{width:`30`,height:`28`,viewBox:`0 0 30 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`20px`,height:`18px`},children:(0,U.jsx)(`path`,{d:`M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z`,fill:`currentColor`})});function nQ({editor:e,classes:t,activePlugins:n,toolbarOpts:r,responseAreaProps:i,onChange:a,autoWidthToolbar:o}){let[s,c]=(0,P.useState)(!1),l=r??{},u=Sb({editor:e,selector:e=>{let{selection:t}=e.editor?.state||{},n;if(!e.editor?.commandManager)return{};t instanceof Q&&(n=t.node);let r=e.editor?.isActive(`math`)||e.editor?.isActive(`explicit_constructed_response`)||e.editor?.isActive(`imageUploadNode`)||e.editor?.isActive(`drag_in_the_blank`),i=t&&t.empty===!1&&e.editor.isActive(`table`);return{currentNode:n,hideDefaultToolbar:r,hasTextSelectionInTable:i,isFocused:e.editor?.isFocused,isBold:e.editor.isActive(`bold`)??!1,canBold:e.editor.can().chain().toggleBold().run()??!1,isTable:e.editor.isActive(`table`)??!1,tableHasBorder:e.editor.getAttributes(`table`)?.border===`1`,canTable:e.editor.can().chain().insertTable().run()??!1,isItalic:e.editor.isActive(`italic`)??!1,canItalic:e.editor.can().chain().toggleItalic().run()??!1,isStrike:e.editor.isActive(`strike`)??!1,canStrike:e.editor.can().chain().toggleStrike().run()??!1,isCode:e.editor.isActive(`code`)??!1,canCode:e.editor.can().chain().toggleCode().run()??!1,canClearMarks:e.editor.can().chain().unsetAllMarks().run()??!1,isUnderline:e.editor.isActive(`underline`)??!1,isSubScript:e.editor.isActive(`subscript`)??!1,isSuperScript:e.editor.isActive(`superscript`)??!1,isParagraph:e.editor.isActive(`paragraph`)??!1,isHeading1:e.editor.isActive(`heading`,{level:1})??!1,isHeading2:e.editor.isActive(`heading`,{level:2})??!1,isHeading3:e.editor.isActive(`heading`,{level:3})??!1,isHeadingParagraph:e.editor.isActive(`headingParagraph`)??!1,isHeading4:e.editor.isActive(`heading`,{level:4})??!1,isHeading5:e.editor.isActive(`heading`,{level:5})??!1,isHeading6:e.editor.isActive(`heading`,{level:6})??!1,isBulletList:e.editor.isActive(`bulletList`)??!1,isOrderedList:e.editor.isActive(`orderedList`)??!1,isCodeBlock:e.editor.isActive(`codeBlock`)??!1,isBlockquote:e.editor.isActive(`blockquote`)??!1,canUndo:e.editor.can().chain().undo().run()??!1,canRedo:e.editor.can().chain().redo().run()??!1}}}),d=!!o,f=k(t.toolbar,TN,{[t.toolbarWithNoDone]:!0,[t.toolbarTop]:l.position===`top`,[t.toolbarRight]:l.alignment===`right`,[t.focused]:l.alwaysVisible||u.isFocused&&!e._toolbarOpened&&!u.hideDefaultToolbar,[t.autoWidth]:d,[t.fullWidth]:!d,[t.hidden]:l.isHidden===!0}),p=l.minWidth===void 0?{}:{minWidth:l.minWidth},m=e=>{e.preventDefault()},h=(0,P.useMemo)(()=>[{icon:(0,U.jsx)(_Y,{}),onClick:e=>e.chain().focus().insertTable({rows:2,cols:2,withHeaderRow:!1}).run(),hidden:e=>!n?.includes(`table`)||e.isTable,isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(VY,{}),onClick:e=>e.chain().focus().addRowAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(HY,{}),onClick:e=>e.chain().focus().deleteRow().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(UY,{}),onClick:e=>e.chain().focus().addColumnAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(WY,{}),onClick:e=>e.chain().focus().deleteColumn().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(GY,{}),onClick:e=>e.chain().focus().deleteTable().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(DY,{}),onClick:e=>{let t=e.getAttributes(`table`),n={...t,border:t.border===`0`?`1`:`0`};e.commands.updateAttributes(`table`,n)},hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.tableHasBorder,isDisabled:e=>!e.canTable},{icon:(0,U.jsx)(pY,{}),onClick:e=>e.chain().focus().toggleBold().run(),hidden:()=>!n?.includes(`bold`),isActive:e=>e.isBold,isDisabled:e=>!e.canBold},{icon:(0,U.jsx)(mY,{}),onClick:e=>e.chain().focus().toggleItalic().run(),hidden:()=>!n?.includes(`italic`),isActive:e=>e.isItalic,isDisabled:e=>!e.canItalic},{icon:(0,U.jsx)(hY,{}),onClick:e=>e.chain().focus().toggleStrike().run(),hidden:()=>!n?.includes(`strikethrough`),isActive:e=>e.isStrike,isDisabled:e=>!e.canStrike},{icon:(0,U.jsx)(gY,{}),onClick:e=>e.chain().focus().toggleCode().run(),hidden:()=>!n?.includes(`code`),isActive:e=>e.isCode,isDisabled:e=>!e.canCode},{icon:(0,U.jsx)(bY,{}),onClick:e=>e.chain().focus().toggleUnderline().run(),hidden:()=>!n?.includes(`underline`),isActive:e=>e.isUnderline},{icon:(0,U.jsx)(eQ,{}),onClick:e=>e.chain().focus().toggleSubscript().run(),hidden:()=>!n?.includes(`subscript`),isActive:e=>e.isSubScript},{icon:(0,U.jsx)($Z,{}),onClick:e=>e.chain().focus().toggleSuperscript().run(),hidden:()=>!n?.includes(`superscript`),isActive:e=>e.isSuperScript},{icon:(0,U.jsx)(SY,{}),hidden:()=>!n?.includes(`image`),onClick:e=>e.chain().focus().setImageUploadNode().run()},{icon:(0,U.jsx)(TY,{}),hidden:()=>!n?.includes(`video`),onClick:e=>e.chain().focus().insertMedia({type:`video`}).run()},{icon:(0,U.jsx)(EY,{}),hidden:()=>!n?.includes(`audio`),onClick:e=>e.chain().focus().insertMedia({type:`audio`,tag:`audio`}).run()},{icon:(0,U.jsx)(RY,{}),hidden:()=>!n?.includes(`css`),onClick:e=>e.commands.openCSSClassDialog()},{icon:(0,U.jsx)(wY,{}),hidden:()=>!n?.includes(`blockquote`),onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isBlockquote},{icon:(0,U.jsx)(tQ,{}),hidden:()=>!n?.includes(`h3`),onClick:e=>e.chain().focus().toggleHeadingParagraph().run(),isActive:e=>e.isHeadingParagraph},{icon:(0,U.jsx)(xY,{}),hidden:()=>!n?.includes(`math`),onClick:e=>e.chain().focus().insertMath(``).run()},{icon:(0,U.jsx)(ZZ,{letter:`ñ`}),hidden:()=>!n?.includes(`languageCharacters`),onClick:()=>c(AY)},{icon:(0,U.jsx)(ZZ,{letter:`€`}),hidden:()=>n?.filter(e=>e===`languageCharacters`).length!==2,onClick:()=>c(jY)},{icon:(0,U.jsx)(IY,{editor:e}),hidden:()=>!n?.includes(`text-align`),onClick:()=>{}},{icon:(0,U.jsx)(vY,{}),hidden:()=>!n?.includes(`bulleted-list`),onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isBulletList},{icon:(0,U.jsx)(yY,{}),hidden:()=>!n?.includes(`numbered-list`),onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isOrderedList},{icon:(0,U.jsx)(IR,{}),hidden:()=>!n?.includes(`undo`),onClick:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.canUndo},{icon:(0,U.jsx)(CY,{}),hidden:()=>!n?.includes(`redo`),onClick:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.canRedo}],[n,e]),g=u.hideDefaultToolbar&&u.currentNode?.type?.name===`drag_in_the_blank`;return(0,U.jsxs)(`div`,{className:f,style:{...p},onMouseDown:m,children:[g&&(0,U.jsx)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:(0,U.jsx)(`div`,{className:t.buttonsContainer,children:(0,U.jsx)(`button`,{type:`button`,className:t.button,onClick:t=>{t.preventDefault(),e.chain().focus().deleteSelection().run(),a?.(e.getHTML())},"aria-label":`Delete response area`,children:(0,U.jsx)(wN,{})})})}),!u.hideDefaultToolbar&&(0,U.jsxs)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:[(0,U.jsx)(`div`,{className:t.buttonsContainer,children:h.filter(e=>!e.hidden?.(u)).map((n,r)=>{let i=n.isDisabled?.(u),a=n.isActive?.(u);return(0,U.jsx)(`button`,{disabled:i,onClick:t=>{t.preventDefault(),n.onClick(e)},className:k(t.button,{[t.active]:a}),children:n.icon},r)})}),n?.includes(`responseArea`)&&(0,U.jsx)(`button`,{onClick:()=>{e.chain().focus().insertResponseArea(i.type).run()},className:t.button,children:(0,U.jsx)(kY,{})}),l.showDone&&(0,U.jsx)(kN,{onClick:()=>{a?.(e.getHTML()),e.commands.blur()}})]}),s&&(0,U.jsx)(QZ,{editor:e,opts:{...s,renderPopOver:(e,t)=>console.log(`Show popover`,t),closePopOver:()=>console.log(`Close popover`)},onClose:()=>c(!1)})]})}var rQ=e=>{Ao();let t={defaultToolbar:`defaultToolbar`,buttonsContainer:`buttonsContainer`,button:`button`,active:`active`,disabled:`disabled`,isActive:`isActive`,toolbar:`toolbar`,toolbarWithNoDone:`toolbarWithNoDone`,toolbarTop:`toolbarTop`,toolbarRight:`toolbarRight`,fullWidth:`fullWidth`,hidden:`hidden`,autoWidth:`autoWidth`,focused:`focused`,iconRoot:`iconRoot`,label:`label`,shared:`shared`};return(0,U.jsx)(iQ,{children:(0,U.jsx)(nQ,{...e,classes:t})})},iQ=G(`div`)(({theme:e})=>({"& .defaultToolbar":{display:`flex`,width:`100%`,justifyContent:`space-between`},"& .buttonsContainer":{alignItems:`center`,display:`flex`,width:`100%`},"& .button":{color:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:`pointer`,"&:hover":{color:`black`},"&:focus":{outline:`2px solid ${e.palette.grey[700]}`}},"& .active":{color:`black`},"& .disabled":{opacity:.7,cursor:`not-allowed`,"& :hover":{color:`grey`}},"& .isActive":{background:`var(--purple)`,color:`var(--white)`},"& .toolbar":{position:`absolute`,zIndex:20,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:`280px`,margin:`5px 0 0 0`,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:0,pointerEvents:`none`},"& .toolbarWithNoDone":{minWidth:`265px`},"& .toolbarTop":{top:`-45px`},"& .toolbarRight":{right:0},"& .fullWidth":{width:`100%`},"& .hidden":{visibility:`hidden`},"& .autoWidth":{width:`auto`},"& .focused":{opacity:1,pointerEvents:`auto`},"& .iconRoot":{width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`},"& .label":{color:`var(--editable-html-toolbar-check, #00bb00)`},"& .shared":{display:`flex`}})),aQ=G(`div`,{shouldForwardProp:e=>![`noBorder`,`error`].includes(e)})(({theme:e,noBorder:t,error:n})=>({position:`relative`,padding:`0px`,border:t?`none`:`1px solid #ccc`,borderRadius:`4px`,cursor:`text`,'& [data-slate-editor="true"]':{wordBreak:`break-word`,overflow:`visible`,maxHeight:`500px`,padding:`5px`},"&:first-child":{marginTop:0},"& ul, & ol":{padding:`0 1rem`,margin:`1.25rem 1rem 1.25rem 0.4rem`},"& ul li p, & ol li p":{marginTop:`0.25em`,marginBottom:`0.25em`},"& h1, & h2, & h3, & h4, & h5, & h6":{lineHeight:1.1,marginTop:`2.5rem`,textWrap:`pretty`},"& h1, & h2":{marginTop:`3.5rem`,marginBottom:`1.5rem`},"& h1":{fontSize:`1.4rem`},"& h2":{fontSize:`1.2rem`},"& h3":{fontSize:`1.1rem`},"& h4, & h5, & h6":{fontSize:`1rem`},"& code":{backgroundColor:`var(--purple-light)`,borderRadius:`0.4rem`,color:`var(--black)`,fontSize:`0.85rem`,padding:`0.25em 0.3em`},"& pre":{background:`var(--black)`,borderRadius:`0.5rem`,color:`var(--white)`,fontFamily:`'JetBrainsMono', monospace`,margin:`1.5rem 0`,padding:`0.75rem 1rem`,"& code":{background:`none`,color:`inherit`,fontSize:`0.8rem`,padding:0}},"& blockquote":{background:`#f9f9f9`,borderLeft:`5px solid #ccc`,margin:`1.5em 10px`,padding:`.5em 10px`},"& p":{margin:`0`},"& table":{tableLayout:`fixed`,width:`100%`,borderCollapse:`collapse`,color:KI(),backgroundColor:pL()},'& table:not([border="1"]) tr':{borderTop:`1px solid #dfe2e5`},"& td, th":{padding:`.6em 1em`,textAlign:`center`},'& table:not([border="1"]) td, th':{border:`1px solid #dfe2e5`},...n&&{border:`2px solid ${e.palette.error.main} !important`}})),oQ=G(`div`,{shouldForwardProp:e=>![`disableScrollbar`,`highlightShape`].includes(e)})(({theme:e,disableScrollbar:t,highlightShape:n})=>({position:`relative`,padding:`0px`,overflowY:`auto`,color:KI(),backgroundColor:n?e.palette.action.selected:pL(),...t&&{"&::-webkit-scrollbar":{display:`none`},scrollbarWidth:`none`,"-ms-overflow-style":`none`}})),sQ=G(`div`,{shouldForwardProp:e=>e!==`noPadding`})(({noPadding:e})=>({padding:e?0:`10px 8px`}));function cQ(e){let[t,n]=(0,P.useState)(null),r=(0,P.useRef)(null),{editor:i,disabled:a,children:o,disableScrollbar:s,activePlugins:c,toolbarOpts:l,responseAreaProps:u,autoFocus:d,minWidth:f,width:p,maxWidth:m,minHeight:h,height:g,maxHeight:_,highlightShape:v,ref:y}=e;(0,P.useEffect)(()=>{i&&r.current&&(i._tiptapContainerEl=r.current)},[i,r.current]),(0,P.useEffect)(()=>{i&&d&&Promise.resolve().then(()=>{i.commands.focus(`end`)})},[i,d]),(0,P.useEffect)(()=>{if(e.adjustWidthForLimit){let t=document.createElement(`p`);t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`W`.repeat(e.charactersLimit),r.current.appendChild(t),n(`${t.offsetWidth+27}px`),t.remove()}},[e.adjustWidthForLimit,e.charactersLimit]);let b=(0,P.useMemo)(()=>({width:fY(t||p),minWidth:fY(f),maxWidth:fY(m),height:fY(g),minHeight:fY(h),maxHeight:fY(_)}),[t,f,p,m,h,g,_]);return(0,U.jsxs)(aQ,{noBorder:l&&l.noBorder,error:l&&l.error,className:e.className,style:{width:b.width,minWidth:b.minWidth,maxWidth:b.maxWidth},ref:r,children:[(0,U.jsx)(oQ,{disableScrollbar:s,highlightShape:v,children:(0,U.jsx)(sQ,{noPadding:l&&l.noPadding,children:o})}),i&&(0,U.jsx)(rQ,{editor:i,responseAreaProps:u,toolbarOpts:l,activePlugins:c,onChange:e.onChange,autoWidthToolbar:e.autoWidthToolbar})]})}var lQ=D(`@pie-lib:editable-html:plugins`),uQ=[`bold`,`html`,`extraCSSRules`,`italic`,`underline`,`strikethrough`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`blockquote`,`h3`,`table`,`video`,`audio`,`responseArea`,`redo`,`undo`,`superscript`,`subscript`],dQ={"text-align":`textAlign`,"bulleted-list":`ul_list`,"numbered-list":`ol_list`},fQ=uQ.filter(e=>![`responseArea`,`h3`,`blockquote`].includes(e)),pQ=(e,t,n)=>{lQ(`[buildPlugins] opts: `,n),e||=fQ;let r=(t,n=!0)=>e.includes(t)&&n&&t,i=n.image&&n.image.delete,a=n.math,o=n.responseArea&&n.responseArea.type,s=!x(n.extraCSSRules),c=n?.languageCharacters||[];return _([r(`table`),r(`bold`),r(`italic`),r(`strikethrough`),r(`underline`),r(`superscript`),r(`subscript`),r(`image`,!!i),r(`video`),r(`audio`),r(`math`,!!a),...c.map(e=>r(`languageCharacters`,e)),r(`text-align`),r(`blockquote`),r(`h3`),r(`bulleted-list`),r(`numbered-list`),r(`undo`),r(`redo`),r(`responseArea`,!!o),r(`css`,!!s),r(`html`,!!n.html)])},mQ={position:`bottom`,alignment:`left`,alwaysVisible:!1,showDone:!0,doneOn:`blur`},hQ=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`table`,`video`,`audio`,`responseArea`,`superscript`,`subscript`,`css`,`h3`,`undo`,`redo`],gQ={"--white":`#fff`,"--black":`#2e2b29`,"--black-contrast":`#110f0e`,"--gray-1":`rgba(61, 37, 20, .05)`,"--gray-2":`rgba(61, 37, 20, .08)`,"--gray-3":`rgba(61, 37, 20, .12)`,"--gray-4":`rgba(53, 38, 28, .3)`,"--gray-5":`rgba(28, 25, 23, .6)`,"--green":`#22c55e`,"--purple":`#6a00f5`,"--purple-contrast":`#5800cc`,"--purple-light":`rgba(88, 5, 255, .05)`,"--yellow-contrast":`#facc15`,"--yellow":`rgba(250, 204, 21, .4)`,"--yellow-light":`#fffae5`,"--red":`#ff5c33`,"--red-light":`#ffebe5`,"--shadow":`0px 12px 33px 0px rgba(0, 0, 0, .06),
390
+ 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)`},_Q=e=>{let{showParagraphs:t,separateParagraphs:n}=e.pluginProps||{},[r,i]=(0,P.useState)([]),[a,o]=(0,P.useState)(!1),{toolbarOpts:s}=e,c=(0,P.useCallback)(e=>{i(t=>{let n=t.filter(t=>t.pos!==e);return n.length===0&&o(!1),n})},[i]),l={...mQ,...s},u=(0,P.useMemo)(()=>{let{customPlugins:t,...n}=e.pluginProps||{};t||=[];let r=(e.activePlugins||hQ)?.filter(e=>{let t=n[dQ[e]||e]||{};return!t||!t.disabled});return pQ(r,t,{math:{},textAlign:e.textAlign,html:{},extraCSSRules:e.extraCSSRules||{},image:{...e.imageSupport},toolbar:{},table:{},responseArea:{type:e.responseAreaProps?.type},languageCharacters:e.languageCharactersProps,keyPadCharacterRef:{},setKeypadInteraction:{},media:{}})},[e]),d=Db({extensions:[yk.configure({types:[`heading`,`paragraph`,`div`,`headingParagraph`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`td`,`th`],alignments:[`left`,`right`,`center`,`justify`]}),ek,tk.configure({limit:e.charactersLimit||1e6}),WO.configure({trailingNode:{node:`paragraph`,notAfter:[`paragraph`,`div`]}}),uY,Nj,dY,Pj,Fj,Sk.configure({placeholder:e.placeholder,showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!0}),kj,pj,Mj,jj,BU.configure(e.responseAreaProps),VU.configure(e.responseAreaProps),UU.configure(e.responseAreaProps),WU.configure(e.responseAreaProps),HU.configure(e.responseAreaProps),ZG.configure({toolbarOpts:l,math:e.pluginProps?.math||{}}),vk,_k,xk,lq.configure({toolbarOpts:l,imageHandling:{disableImageAlignmentButtons:e.disableImageAlignmentButtons,onDone:t=>e.onDone?.(t.getHTML()),onDelete:e.imageSupport&&e.imageSupport.delete&&(t=>{let{src:n}=t.attrs;e.imageSupport.delete(n,e=>{c(t.pos)})}),insertImageRequested:e.imageSupport&&((t,n,r)=>{let[o,s]=n,l=n=>{let r;a&&n&&(r=e.onChange),c(s),r?.(t.getHTML())};t._insertingImage=!0,i(e=>[...e,o]),(()=>{let n=r(l),i=v(()=>{let e=()=>window.removeEventListener(`focus`,i);if(!t._insertingImage){e();return}c(s),t._insertingImage=!1,e()},500);window.addEventListener(`focus`,i),e.imageSupport.add(n)})()}),maxImageWidth:e.maxImageWidth,maxImageHeight:e.maxImageHeight},limit:3}),fJ.configure({uploadSoundSupport:e.uploadSoundSupport}),kJ.configure({extraCSSRules:e.extraCSSRules})],immediatelyRender:!1,editorProps:{handleKeyDown(t,n){return e.onKeyDown?e.onKeyDown(n):!1}},editable:!e.disabled,content:Tk(e.markup),onUpdate:({editor:t,transaction:n})=>{n.isDone&&e.onChange?.(t.getHTML())},onBlur:({editor:t})=>{if(t._insertingImage||t._toolbarOpened||t.isActive(`inline_dropdown`)||t.isActive(`explicit_constructed_response`)||!t.schema)return;let n=t.getHTML();e.markup!==n&&e.onChange?.(n),l.doneOn===`blur`&&e.onDone?.(n)}},[e.charactersLimit]);(0,P.useEffect)(()=>{e.editorRef&&e.editorRef(d)},[e.editorRef,d]),(0,P.useEffect)(()=>{d?.setEditable(!e.disabled)},[e.disabled,d]),(0,P.useEffect)(()=>{if(!d)return;let t=Tk(e.markup);t!==d.getHTML()&&d.commands.setContent(t,!1)},[e.markup,d]),(0,P.useEffect)(()=>{Object.entries(gQ).forEach(([e,t])=>{document.documentElement.style.setProperty(e,t)})},[]);let f=Sb({editor:d,selector:e=>({isFocused:e.editor?.isFocused})}),p=(0,P.useMemo)(()=>{let{minWidth:t,width:n,maxWidth:r,minHeight:i,height:a,maxHeight:o}=e;return{width:fY(n),minWidth:fY(t),maxWidth:fY(r),height:fY(a),minHeight:fY(i),maxHeight:fY(o)}},[e]);return(0,U.jsx)(cQ,{...e,activePlugins:u,toolbarOpts:l,editorState:f,editor:d,children:d&&(0,U.jsx)(vQ,{style:{minHeight:p.minHeight,height:p.height,maxHeight:p.maxHeight},showParagraph:t&&!t.disabled,separateParagraph:n&&!n.disabled,editor:d})})},vQ=G(yb,{shouldForwardProp:e=>![`showParagraph`,`separateParagraph`].includes(e)})(({showParagraph:e,separateParagraph:t})=>({display:`flex`,outline:`none !important`,"& .ProseMirror":{flex:1,padding:`5px`,maxHeight:`500px`,outline:`none !important`,position:`initial`,"& > p, & > div":{margin:`0`},"& p.is-editor-empty, & div.is-editor-empty":{position:`relative`},"& p.is-editor-empty::before, & div.is-editor-empty::before":{content:`attr(data-placeholder)`,position:`absolute`,left:0,top:0,color:`#9CA3AF`,pointerEvents:`none`,whiteSpace:`pre-wrap`},...e&&{"& > p:has(+ p)::after, & > div:has(+ div)::after":{display:`block`,content:`"¶"`,fontSize:`1em`,color:`#146EB3`}},...t&&{"& > p:has(+ p)":{marginBottom:`1em`}}}})),yQ=_Q,bQ=(e,t,n)=>{let r=n||[],i=r.reduce((e,t)=>e+t.textContent.length,0),a=!0;if(i>t)return!1;for(e&&=(e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&r.push(e),e.firstChild);e&&a;)a=bQ(e,t,r),e=e.nextSibling;return r},xQ=(e,t,n)=>{let r=bQ(n,t),i=[],a=0;return r.forEach(n=>{let r=a+n.textContent.length;[e,t].forEach(e=>{a<=e&&e<r&&i.push({node:n,offset:e-a})}),a=r}),i},SQ=e=>{let{commonAncestorContainer:t,startContainer:n,endContainer:r,startOffset:i,endOffset:a}=e,o=[],s=!1,c=!1,l=``,u=e=>{let{nodeValue:t,childNodes:d}=e;e===n&&e===r?(t&&(l+=t.substring(i,a)),s=c=!0):e===n?(t&&(l+=t.substring(i)),s=!0):e===r?(t&&(l+=t.substring(0,a)),c=!0):e&&e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&t&&s&&!c&&(l+=t,o.push(e)),d.forEach(e=>{if(!c)u(e);else return})};return u(t),[o,l]},CQ=e=>{let t=document.createElement(`SPAN`);return e.surroundContents(t),t},wQ=e=>{if(e.startContainer===e.endContainer)return[CQ(e)];let[t]=SQ(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);let r=CQ(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);let a=CQ(i);return[r,...t.map(e=>{let t=document.createElement(`SPAN`);return e.parentNode.insertBefore(t,e),t.appendChild(e),t}),a]},TQ=(e,t)=>{let n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);let[,r]=SQ(n),[,i]=SQ(e),a=r.length;return{quote:i,start:a,end:a+i.length}},EQ=(e,t)=>{(e||[]).forEach(e=>{let t=e.parentNode,n=e.childNodes,r=n.length;if(r>0)for(let i=0;i<r;i++)t.insertBefore(n[0],e);else t.insertBefore(document.createTextNode(e.textContent),e);t.removeChild(e)}),t.normalize()},DQ=()=>{document.getSelection?(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange())):window.getSelection?window.getSelection().removeAllRanges?(window.getSelection().removeAllRanges(),window.getSelection().addRange(document.createRange())):window.getSelection().empty&&window.getSelection().empty():document.selection&&document.selection.empty()},OQ=e=>e.length>=20||e.search(/\n|\r|\r\n/)!==-1,kQ=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),AQ=e=>document.querySelector(`[data-ann-id='${e}']`),jQ=G(zI)(({theme:e,annotationType:t})=>({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginLeft:`16px`,"&::before":{position:`absolute`,right:`100%`,top:`13px`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderRightColor:e.palette.grey[100]},...t===`negative`&&{"&::before":{borderRightColor:`rgb(255, 204, 238) !important`}},...t===`positive`&&{"&::before":{borderRightColor:`rgb(153, 255, 153) !important`}}}})),MQ=G(`div`)(({theme:e,annotationType:t})=>({width:`200px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:`#ffffff`,border:`4px solid ${e.palette.grey[100]}`,...t===`negative`&&{borderColor:`rgb(255, 204, 238) !important`},...t===`positive`&&{borderColor:`rgb(153, 255, 153) !important`}})),NQ=G(`div`)(({theme:e})=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${e.palette.grey[100]}`})),PQ=G(`div`)(({theme:e,variant:t,annotationType:n})=>({flexGrow:1,width:`28%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,"&:not(:nth-child(3n))":{borderRight:`1px solid ${e.palette.grey[100]}`},"&:hover":{backgroundColor:e.palette.grey[100]},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}},...t===`typeChange`&&n===`negative`&&{"&:hover":{backgroundColor:`rgb(153, 255, 153) !important`}},...t===`typeChange`&&n===`positive`&&{"&:hover":{backgroundColor:`rgb(255, 204, 238) !important`}}})),FQ=class extends P.Component{static propTypes={anchorEl:p.object,open:p.bool,offset:p.number,value:p.string,type:p.string,onClose:p.func,onDelete:p.func,onSave:p.func,onTypeChange:p.func};constructor(e){super(e),this.state={value:e.value}}UNSAFE_componentWillReceiveProps(e){let{value:t}=e,{value:n}=this.props;t!==n&&this.setState({value:t})}onValueChange=e=>this.setState({value:e.target.value});handleSave=()=>{let{value:e,onSave:t,onClose:n,onDelete:r}=this.props,{value:i}=this.state;i===``&&r(),e!==i&&t(e,i),this.setState({value:``}),n()};handleTypeChange=()=>{let{onTypeChange:e,onDelete:t}=this.props,{value:n}=this.state;n===``?t():e(n),this.setState({value:``})};render(){let{anchorEl:e,offset:t,onDelete:n,open:r,type:i}=this.props,{value:a}=this.state;return(0,U.jsx)(jQ,{anchorEl:e,elevation:2,open:r,onClose:this.handleSave,annotationType:i,style:{marginTop:`${t}px`,transition:`margin-top 2s ease-out`},transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`left`},children:(0,U.jsxs)(MQ,{annotationType:i,children:[(0,U.jsx)(NK,{id:`annotation-editor`,style:{padding:`2px 5px`,width:`95%`},autoFocus:!0,multiline:!0,rows:1,maxRows:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),(0,U.jsxs)(NQ,{children:[(0,U.jsx)(PQ,{onClick:n,children:`Delete`}),(0,U.jsx)(PQ,{variant:`typeChange`,annotationType:i,onClick:this.handleTypeChange,children:i===`negative`?`Green`:`Pink`}),(0,U.jsx)(PQ,{onClick:this.handleSave,children:`Save`})]})]})})}},IQ=G(zI)({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginTop:`-16px`,"&::after":{position:`absolute`,left:`calc(50% - 7px)`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderTopColor:`black`}}}),LQ=G(`div`)(({theme:e})=>({width:`300px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:e.palette.common.white,border:`2px solid ${e.palette.grey[100]}`})),RQ=G(`div`)({display:`flex`,flexWrap:`wrap`}),zQ=G(`div`)(({theme:e})=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${e.palette.grey[100]}`})),BQ=G(`div`)(({theme:e,variant:t})=>({width:`22%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,borderBottom:`1px solid ${e.palette.grey[100]}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${e.palette.grey[100]}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:e.palette.grey[100]},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}}})),VQ=class extends P.Component{static propTypes={anchorEl:p.object,open:p.bool,annotations:p.array,isNewAnnotation:p.bool,onClose:p.func,onDelete:p.func,onEdit:p.func,onWrite:p.func,onAnnotate:p.func};render(){let{anchorEl:e,annotations:t,isNewAnnotation:n,onAnnotate:r,onClose:i,onEdit:a,onDelete:o,onWrite:s,open:c}=this.props;return(0,U.jsx)(IQ,{anchorEl:e,open:c,onClose:i,elevation:5,transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`center`},transformOrigin:{vertical:`bottom`,horizontal:`center`},children:(0,U.jsxs)(LQ,{children:[(0,U.jsx)(RQ,{children:t.map((e,t)=>(0,U.jsx)(BQ,{variant:e.type,onClick:()=>r(e),children:e.label},`annotation-${t}`))}),(0,U.jsxs)(zQ,{children:[(0,U.jsx)(BQ,{onClick:i,children:`Cancel`}),(0,U.jsx)(BQ,{style:{pointerEvents:`none`}}),n?(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(BQ,{variant:`positive`,onClick:()=>s(`positive`),children:`Write`}),(0,U.jsx)(BQ,{variant:`negative`,onClick:()=>s(`negative`),children:`Write`})]}):(0,U.jsxs)(P.Fragment,{children:[(0,U.jsx)(BQ,{onClick:o,children:`Delete`}),(0,U.jsx)(BQ,{onClick:a,children:`Edit`})]})]})]})})}};function HQ(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function UQ(e,t){return!e||HQ(e)?e:HQ(e.default)?e.default:t&&HQ(e[t])?e[t]:t&&HQ(e[t]?.default)?e[t].default:e}var WQ=UQ(gz,`InputContainer`)||UQ(qQ.InputContainer,`InputContainer`),GQ=Zz,KQ=GQ.default,qQ=KQ&&typeof KQ==`object`?KQ:GQ,JQ=G(`div`)({padding:`10px 120px 10px 16px`,backgroundColor:`rgba(0, 0, 0, 0.06)`,border:`1px solid #ccc`,borderRadius:`4px`,overflowY:`scroll`,lineHeight:`36px`,whiteSpace:`pre-wrap`,overflowWrap:`break-word`,"& p":{margin:0},"& span[data-latex]":{userSelect:`none`,"-webkit-user-select":`none`,"-moz-user-select":`none`,"-ms-user-select":`none`}}),YQ=G(`div`)({width:`230px`}),XQ=G(`div`)({position:`relative`,overflowX:`hidden`,display:`flex`}),ZQ=G(WQ)(({theme:e})=>({paddingTop:e.spacing(2),marginBottom:e.spacing(2),marginTop:e.spacing(2),width:`100%`})),QQ=`
391
391
  .sideAnnotation:before {
392
392
  position: absolute;
393
393
  right: var(--before-right, 100%);
@@ -400,4 +400,4 @@ mid `,`&#8740;`),w.intercal=w[`⊺`]=r(B,`\\intercal `,`&#8890;`),w.veebar=w[`
400
400
  border-width: var(--before-border-width, 7px);
401
401
  border-right-color: var(--before-border-color, rgb(153, 255, 153));
402
402
  }
403
- `;if(!document.getElementById(`annotation-editor-styles`)){let e=document.createElement(`style`);e.id=`annotation-editor-styles`,e.textContent=XQ,document.head.appendChild(e)}var ZQ=class extends P.Component{static propTypes={text:p.string,comment:p.string,annotations:p.array,predefinedAnnotations:p.array,onChange:p.func.isRequired,onCommentChange:p.func.isRequired,width:p.number,height:p.number,maxHeight:p.string,disabled:p.bool,disabledMath:p.bool,customKeys:p.array,keypadMode:p.string};constructor(e){super(e),this.state={anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotation:null,annotationIndex:null}}componentDidMount(){let{annotations:e,text:t}=this.props;t&&e.forEach(e=>{let[t,n]=yQ(e.start,e.end,this.textRef);if(t&&n){let r=document.createRange();r.setStart(t.node,t.offset),r.setEnd(n.node,n.offset);let i=SQ(r);this.createDOMAnnotation(i,e)}}),this.textRef&&(this.adjustAnnotationsPosition(),this.textRef.addEventListener(`scroll`,this.adjustAnnotationsPosition))}adjustAnnotationsPosition=()=>{if(this.textRef&&this.labelsRef){let e=this.textRef.offsetLeft+this.textRef.offsetWidth+8;Array.from(this.labelsRef.children).forEach(t=>{let n=DQ(t.dataset.annId),r=(n[0].offsetTop?n[0].offsetTop:n[0].offsetParent.offsetTop)-this.textRef.scrollTop-6;t.style.top=`${r}px`,t.style.left=`${e}px`})}};handleClick=e=>{let{annotations:t}=this.props,{selectionDetails:n}=this.state;if(n)return;let{id:r,annId:i}=e.target.dataset,a=r||i,o=DQ(a),s=OQ(a),c=t.findIndex(e=>e.id===a),l=s.hasAttribute(`data-freeform`);l&&(s.style.zIndex=`10`),this.setState({anchorEl:o[0],openedMenu:!!r||!!i&&!l,openedEditor:!!i&&l,selectedElems:o,labelElem:s,annotationIndex:c,annotation:t[c],selectionDetails:null})};handleHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=DQ(r),a=OQ(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=`20`,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.7)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.55)`)}),o?(a.style.zIndex=`20`,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(128, 255, 128)`,a.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 179, 230)`,a.style.setProperty(`--before-border-color`,`rgb(255, 179, 230)`))):(a.style.zIndex=`20`,a.classList.contains(`positive`)?a.style.color=`rgb(0, 77, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(153, 0, 102)`))};handleCancelHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=DQ(r),a=OQ(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=``,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`)}),o?(a.style.zIndex=``,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(153, 255, 153)`,a.style.removeProperty(`--before-border-color`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 204, 238)`,a.style.removeProperty(`--before-border-color`))):(a.style.zIndex=``,a.classList.contains(`positive`)?a.style.color=`rgb(0, 128, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(204, 0, 136)`))};handleClose=e=>{let{selectedElems:t,labelElem:n}=this.state;t.length&&!t[0].hasAttribute(`data-id`)&&wQ(t,this.textRef),n&&(n.style.zIndex=``),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),TQ()};handleSelection=e=>{let t=window.getSelection();if(e.detail>2){TQ();return}if(t&&t.rangeCount>0){let e=t.getRangeAt(0),n=e.toString(),r=this.textRef.contains(e.commonAncestorContainer);if(!t.isCollapsed&&n!==``&&r){let t=CQ(e,this.textRef),n=SQ(e);this.setState({anchorEl:n[0],openedMenu:!0,selectedElems:n,selectionDetails:t})}}};deleteAnnotation=()=>{let{annotations:e,onChange:t}=this.props,{selectedElems:n,labelElem:r,annotationIndex:i,annotation:a}=this.state;(EQ(a.label)?this.labelsRef:n[0]).removeChild(r),wQ(n,this.textRef),e.splice(i,1),t(e),this.handleClose()};createDOMAnnotation=(e,t)=>{let{disabled:n}=this.props,{id:r,label:i,type:a}=t;(e||[]).forEach(e=>{e.dataset.id=r,e.className=`annotation ${a}`,e.style.position=`relative`,e.style.cursor=`pointer`,a===`positive`?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:a===`negative`&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`),e.onclick=!n&&this.handleClick,e.onmouseover=this.handleHover,e.onmouseout=this.handleCancelHover});let o=e&&e[0]||{},s=document.createElement(`SPAN`);if(s.dataset.annId=r,s.innerHTML=i,s.onclick=!n&&this.handleClick,s.onmouseover=this.handleHover,s.onmouseout=this.handleCancelHover,EQ(i)){let e=(o.offsetTop?o.offsetTop:o.offsetParent.offsetTop)-this.textRef.scrollTop,t=this.textRef.offsetLeft+this.textRef.offsetWidth+8;s.dataset.freeform=!0,s.className=`sideAnnotation ${a}`,s.style.position=`absolute`,s.style.padding=`4px`,s.style.borderRadius=`4px`,s.style.marginLeft=`8px`,s.style.width=`180px`,s.style.whiteSpace=`pre-wrap`,s.style.wordBreak=`break-word`,s.style.border=`2px solid #ffffff`,s.style.fontSize=`14px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.top=`${e}px`,s.style.left=`${t}px`,a===`negative`?s.style.backgroundColor=`rgb(255, 204, 238)`:a===`positive`&&(s.style.backgroundColor=`rgb(153, 255, 153)`),s.style.setProperty(`--before-border-width`,`7px`),s.style.setProperty(`--before-top`,`5px`),s.style.setProperty(`--before-right`,`100%`),a===`negative`?s.style.setProperty(`--before-border-color`,`rgb(255, 204, 238)`):a===`positive`&&s.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`),this.labelsRef.appendChild(s)}else s.className=`annotationLabel ${a}`,s.style.backgroundColor=`rgb(242, 242, 242)`,s.style.padding=`2px`,s.style.position=`absolute`,s.style.userSelect=`none`,s.style.whiteSpace=`nowrap`,s.style.top=`-10px`,s.style.left=`-2px`,s.style.fontSize=`12px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.lineHeight=`6px`,s.style.webkitUserSelect=`none`,s.style.mozUserSelect=`none`,s.style.msUserSelect=`none`,a===`positive`?s.style.color=`rgb(0, 128, 0)`:a===`negative`&&(s.style.color=`rgb(204, 0, 136)`),o.appendChild(s)};createNewAnnotation=(e,t)=>{let{selectedElems:n,selectionDetails:r}=this.state,i={id:[r.start,r.end,new Date().getTime()].join(`-`),label:e,type:t,...r};return this.createDOMAnnotation(n,i),i};handleMenuClick=e=>{let{annotations:t,onChange:n}=this.props,{annotation:r,annotationIndex:i}=this.state,{type:a,text:o}=e;if(r){let e={...r,label:o,type:a},{type:n,label:s}=r;this.updateLabel(s,e,a!==n&&n),t.splice(i,1,e)}else{let e=this.createNewAnnotation(o,a);t.push(e)}n(t),this.handleClose()};editAnnotation=()=>{this.setState({openedMenu:!1,openedEditor:!0})};addAnnotation=e=>{let{annotations:t,onChange:n}=this.props,r=this.createNewAnnotation(``,e),i=OQ(r.id);t.push(r),this.setState({openedMenu:!1,openedEditor:!0,annotationIndex:t.length-1,annotation:r,labelElem:i}),n(t)};updateLabel=(e,t,n)=>{let{selectedElems:r,labelElem:i}=this.state,{label:a,type:o}=t;EQ(a)&&EQ(e)||!EQ(a)&&!EQ(e)?(i.innerHTML=a,n&&(i.classList.remove(n),i.classList.add(o),r.forEach(e=>{e.classList.remove(n),e.classList.add(o)}))):EQ(a)&&!EQ(e)?(r[0].removeChild(i),this.createDOMAnnotation(r,t)):!EQ(a)&&EQ(e)&&(this.labelsRef.removeChild(i),this.createDOMAnnotation(r,t))};changeAnnotationType=e=>{let{annotations:t,onChange:n}=this.props,{annotationIndex:r,selectedElems:i}=this.state,{type:a,label:o}=t[r],s=a===`positive`?`negative`:`positive`,c={...t[r],type:s,label:e};i.forEach(e=>{e.classList.remove(a),e.classList.add(s)}),this.updateLabel(o,c,a),t.splice(r,1,c),n(t),this.handleClose()};updateAnnotation=(e,t)=>{let{annotations:n,onChange:r}=this.props,{annotationIndex:i}=this.state,a={...n[i],label:t};this.updateLabel(e,a),n.splice(i,1,a),r(n)};componentWillUnmount(){this.textRef.removeEventListener(`scroll`,this.adjustAnnotationsPosition)}render(){let{comment:e,customKeys:t,disabled:n,disabledMath:r,keypadMode:i,height:a,width:o,maxHeight:s,onCommentChange:c,predefinedAnnotations:l,text:u}=this.props,{anchorEl:d,annotation:f,openedMenu:p,openedEditor:m,selectionDetails:h}=this.state,g=d&&(d.offsetTop?d.offsetTop:d.offsetParent.offsetTop),_=this.textRef&&g?g-this.textRef.scrollTop-8:0;return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(JQ,{children:[(0,U.jsx)(KQ,{style:{width:o-34,minHeight:a,maxHeight:s},ref:e=>this.textRef=e,onMouseDown:n?()=>{}:TQ,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:u}}),(0,U.jsx)(qQ,{ref:e=>this.labelsRef=e})]}),(0,U.jsx)(YQ,{label:`Comment`,children:(0,U.jsx)(_Q,{className:`prompt`,markup:e||``,onChange:c,width:o&&(o+104).toString(),disabled:n,pluginProps:{math:{disabled:r,customKeys:t,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0}}})}),(0,U.jsx)(zQ,{anchorEl:d,open:p&&!n,annotations:l,isNewAnnotation:!!h,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),(0,U.jsx)(NQ,{anchorEl:this.textRef,open:m&&!n,offset:_,value:f&&f.label||``,type:f&&f.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType})]})}};function QQ(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function $Q(e,t){return!e||QQ(e)?e:QQ(e.default)?e.default:t&&QQ(e[t])?e[t]:t&&QQ(e[t]?.default)?e[t].default:e}var e$=$Q(HR,`UiLayout`)||$Q(o$.UiLayout,`UiLayout`),t$=$Q(vz,`PreviewPrompt`)||$Q(o$.PreviewPrompt,`PreviewPrompt`),n$=$Q(bR,`Collapsible`)||$Q(o$.Collapsible,`Collapsible`),r$=$Q(KL,`Feedback`)||$Q(o$.Feedback,`Feedback`),i$=Yz,a$=i$.default,o$=a$&&typeof a$==`object`?a$:i$,s$=D(`@pie-ui:extended-text-entry`),c$=G(e$)({backgroundColor:pL(),color:KI()}),l$=G(qo)(({theme:e})=>({width:`100%`,color:KI(),marginBottom:e.spacing(2),fontSize:`inherit`})),u$=G(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),d$=G(_Q)(({theme:e})=>({marginBottom:e.spacing(2),borderRadius:`4px`})),f$=G(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),p$=class extends P.Component{static propTypes={onValueChange:p.func.isRequired,onAnnotationsChange:p.func.isRequired,onCommentChange:p.func.isRequired,model:p.object,session:p.shape({value:p.string,annotations:p.array,comment:p.string}).isRequired};changeSessionValue=v(this.props.onValueChange,1500);changeSessionComment=v(this.props.onCommentChange,1500);render(){let{model:e,session:t,onAnnotationsChange:n}=this.props,{animationsDisabled:r,annotatorMode:i,customKeys:a,dimensions:o,disabled:s,disabledAnnotator:c,equationEditor:l,extraCSSRules:u,feedback:d,mathInput:f,playersToolbarPosition:p,predefinedAnnotations:m,prompt:h,spanishInput:g,specialInput:_,spellCheckEnabled:v,teacherInstructions:y}=e,{annotations:b,comment:x,value:S}=t,{width:C,height:w}=o||{},T=`40vh`,E={position:p===`top`?`top`:`bottom`};s$(`[render] disabled? `,s);let D=(0,U.jsx)(t$,{defaultClassName:`teacher-instructions`,prompt:y}),O=[];return g&&O.push({language:`spanish`}),_&&O.push({language:`special`}),(0,U.jsxs)(c$,{extraCSSRules:u,ref:e=>{this.containerRef=e},children:[(0,U.jsx)(f$,{children:`Constructed Response Question`}),y&&(0,U.jsx)(u$,{children:r?D:(0,U.jsx)(n$,{labels:{hidden:`Show Teacher Instructions`,visible:`Hide Teacher Instructions`},children:D})}),h&&(0,U.jsx)(l$,{component:`span`,children:(0,U.jsx)(t$,{defaultClassName:`prompt`,prompt:e.prompt})}),i?(0,U.jsx)(ZQ,{text:S||``,annotations:b||[],comment:x||``,predefinedAnnotations:m||[],onChange:n,onCommentChange:this.changeSessionComment,width:C,height:w,maxHeight:T,disabled:c,disabledMath:!f,customKeys:a,keypadMode:l}):(0,U.jsx)(d$,{className:`response-area-editor`,onChange:this.changeSessionValue,markup:S||``,maxWidth:C&&C.toString(),minWidth:`100px`,minHeight:w&&w.toString(),maxHeight:T,disabled:s,highlightShape:!0,toolbarOpts:E,spellCheck:v,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!f,customKeys:this.props.model.customKeys,keypadMode:this.props.model.equationEditor,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},table:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0},separateParagraphs:{disabled:!1},ul_list:{disabled:!0},ol_list:{disabled:!0}},languageCharactersProps:O}),d&&(0,U.jsx)(r$,{correctness:`correct`,feedback:d})]})}},m$=o((e=>{var t=is();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),h$=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},g$=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},_$=m$(),v$=D(`@pie-elements:extended-text-entry`),y$=new DOMParser;function b$(e){if(typeof e==`string`)try{return y$.parseFromString(e,`text/html`).body.textContent}catch{return v$(`tried to parse as dom and failed`,e),e}}function x$(e){let t=b$(e);return t!==void 0&&t.length>0}var S$=class extends HTMLElement{constructor(){super(),this._model=null,this._session=null,this._root=null}setLangAttribute(){let e=this._model&&typeof this._model.language?this._model.language:``,t=e?e.slice(0,2):`en`;this.setAttribute(`lang`,t)}set model(e){this._model=e,this.dispatchEvent(new h$(this.tagName.toLowerCase(),!1,!!this._model)),this.render()}set session(e){this._session=e,this.render()}get session(){return this._session}valueChange(e){this._session.value=e,this.dispatchEvent(new g$(this.tagName.toLowerCase(),x$(e))),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new g$(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this.dispatchEvent(new g$(this.tagName.toLowerCase(),x$(e))),this.render()}connectedCallback(){this.setAttribute(`aria-label`,`Written Response Question`),this.setAttribute(`role`,`region`),this.render()}render(){if(this._model&&this._session){let e=P.createElement(p$,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),this._root||=(0,_$.createRoot)(this),this._root.render(e),queueMicrotask(()=>{gR(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}};return typeof window<`u`&&!customElements.get(`extended-text-entry-element`)&&customElements.define(`extended-text-entry-element`,S$),S$})();
403
+ `;if(!document.getElementById(`annotation-editor-styles`)){let e=document.createElement(`style`);e.id=`annotation-editor-styles`,e.textContent=QQ,document.head.appendChild(e)}var $Q=class extends P.Component{static propTypes={text:p.string,comment:p.string,annotations:p.array,predefinedAnnotations:p.array,onChange:p.func.isRequired,onCommentChange:p.func.isRequired,width:p.number,height:p.number,maxHeight:p.string,disabled:p.bool,disabledMath:p.bool,customKeys:p.array,keypadMode:p.string};constructor(e){super(e),this.state={anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotation:null,annotationIndex:null}}componentDidMount(){let{annotations:e,text:t}=this.props;t&&e.forEach(e=>{let[t,n]=xQ(e.start,e.end,this.textRef);if(t&&n){let r=document.createRange();r.setStart(t.node,t.offset),r.setEnd(n.node,n.offset);let i=wQ(r);this.createDOMAnnotation(i,e)}}),this.textRef&&(this.adjustAnnotationsPosition(),this.textRef.addEventListener(`scroll`,this.adjustAnnotationsPosition))}adjustAnnotationsPosition=()=>{if(this.textRef&&this.labelsRef){let e=this.textRef.offsetLeft+this.textRef.offsetWidth+8;Array.from(this.labelsRef.children).forEach(t=>{let n=kQ(t.dataset.annId),r=(n[0].offsetTop?n[0].offsetTop:n[0].offsetParent.offsetTop)-this.textRef.scrollTop-6;t.style.top=`${r}px`,t.style.left=`${e}px`})}};handleClick=e=>{let{annotations:t}=this.props,{selectionDetails:n}=this.state;if(n)return;let{id:r,annId:i}=e.target.dataset,a=r||i,o=kQ(a),s=AQ(a),c=t.findIndex(e=>e.id===a),l=s.hasAttribute(`data-freeform`);l&&(s.style.zIndex=`10`),this.setState({anchorEl:o[0],openedMenu:!!r||!!i&&!l,openedEditor:!!i&&l,selectedElems:o,labelElem:s,annotationIndex:c,annotation:t[c],selectionDetails:null})};handleHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=kQ(r),a=AQ(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=`20`,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.7)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.55)`)}),o?(a.style.zIndex=`20`,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(128, 255, 128)`,a.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 179, 230)`,a.style.setProperty(`--before-border-color`,`rgb(255, 179, 230)`))):(a.style.zIndex=`20`,a.classList.contains(`positive`)?a.style.color=`rgb(0, 77, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(153, 0, 102)`))};handleCancelHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=kQ(r),a=AQ(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=``,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`)}),o?(a.style.zIndex=``,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(153, 255, 153)`,a.style.removeProperty(`--before-border-color`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 204, 238)`,a.style.removeProperty(`--before-border-color`))):(a.style.zIndex=``,a.classList.contains(`positive`)?a.style.color=`rgb(0, 128, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(204, 0, 136)`))};handleClose=e=>{let{selectedElems:t,labelElem:n}=this.state;t.length&&!t[0].hasAttribute(`data-id`)&&EQ(t,this.textRef),n&&(n.style.zIndex=``),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),DQ()};handleSelection=e=>{let t=window.getSelection();if(e.detail>2){DQ();return}if(t&&t.rangeCount>0){let e=t.getRangeAt(0),n=e.toString(),r=this.textRef.contains(e.commonAncestorContainer);if(!t.isCollapsed&&n!==``&&r){let t=TQ(e,this.textRef),n=wQ(e);this.setState({anchorEl:n[0],openedMenu:!0,selectedElems:n,selectionDetails:t})}}};deleteAnnotation=()=>{let{annotations:e,onChange:t}=this.props,{selectedElems:n,labelElem:r,annotationIndex:i,annotation:a}=this.state;(OQ(a.label)?this.labelsRef:n[0]).removeChild(r),EQ(n,this.textRef),e.splice(i,1),t(e),this.handleClose()};createDOMAnnotation=(e,t)=>{let{disabled:n}=this.props,{id:r,label:i,type:a}=t;(e||[]).forEach(e=>{e.dataset.id=r,e.className=`annotation ${a}`,e.style.position=`relative`,e.style.cursor=`pointer`,a===`positive`?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:a===`negative`&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`),e.onclick=!n&&this.handleClick,e.onmouseover=this.handleHover,e.onmouseout=this.handleCancelHover});let o=e&&e[0]||{},s=document.createElement(`SPAN`);if(s.dataset.annId=r,s.innerHTML=i,s.onclick=!n&&this.handleClick,s.onmouseover=this.handleHover,s.onmouseout=this.handleCancelHover,OQ(i)){let e=(o.offsetTop?o.offsetTop:o.offsetParent.offsetTop)-this.textRef.scrollTop,t=this.textRef.offsetLeft+this.textRef.offsetWidth+8;s.dataset.freeform=!0,s.className=`sideAnnotation ${a}`,s.style.position=`absolute`,s.style.padding=`4px`,s.style.borderRadius=`4px`,s.style.marginLeft=`8px`,s.style.width=`180px`,s.style.whiteSpace=`pre-wrap`,s.style.wordBreak=`break-word`,s.style.border=`2px solid #ffffff`,s.style.fontSize=`14px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.top=`${e}px`,s.style.left=`${t}px`,a===`negative`?s.style.backgroundColor=`rgb(255, 204, 238)`:a===`positive`&&(s.style.backgroundColor=`rgb(153, 255, 153)`),s.style.setProperty(`--before-border-width`,`7px`),s.style.setProperty(`--before-top`,`5px`),s.style.setProperty(`--before-right`,`100%`),a===`negative`?s.style.setProperty(`--before-border-color`,`rgb(255, 204, 238)`):a===`positive`&&s.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`),this.labelsRef.appendChild(s)}else s.className=`annotationLabel ${a}`,s.style.backgroundColor=`rgb(242, 242, 242)`,s.style.padding=`2px`,s.style.position=`absolute`,s.style.userSelect=`none`,s.style.whiteSpace=`nowrap`,s.style.top=`-10px`,s.style.left=`-2px`,s.style.fontSize=`12px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.lineHeight=`6px`,s.style.webkitUserSelect=`none`,s.style.mozUserSelect=`none`,s.style.msUserSelect=`none`,a===`positive`?s.style.color=`rgb(0, 128, 0)`:a===`negative`&&(s.style.color=`rgb(204, 0, 136)`),o.appendChild(s)};createNewAnnotation=(e,t)=>{let{selectedElems:n,selectionDetails:r}=this.state,i={id:[r.start,r.end,new Date().getTime()].join(`-`),label:e,type:t,...r};return this.createDOMAnnotation(n,i),i};handleMenuClick=e=>{let{annotations:t,onChange:n}=this.props,{annotation:r,annotationIndex:i}=this.state,{type:a,text:o}=e;if(r){let e={...r,label:o,type:a},{type:n,label:s}=r;this.updateLabel(s,e,a!==n&&n),t.splice(i,1,e)}else{let e=this.createNewAnnotation(o,a);t.push(e)}n(t),this.handleClose()};editAnnotation=()=>{this.setState({openedMenu:!1,openedEditor:!0})};addAnnotation=e=>{let{annotations:t,onChange:n}=this.props,r=this.createNewAnnotation(``,e),i=AQ(r.id);t.push(r),this.setState({openedMenu:!1,openedEditor:!0,annotationIndex:t.length-1,annotation:r,labelElem:i}),n(t)};updateLabel=(e,t,n)=>{let{selectedElems:r,labelElem:i}=this.state,{label:a,type:o}=t;OQ(a)&&OQ(e)||!OQ(a)&&!OQ(e)?(i.innerHTML=a,n&&(i.classList.remove(n),i.classList.add(o),r.forEach(e=>{e.classList.remove(n),e.classList.add(o)}))):OQ(a)&&!OQ(e)?(r[0].removeChild(i),this.createDOMAnnotation(r,t)):!OQ(a)&&OQ(e)&&(this.labelsRef.removeChild(i),this.createDOMAnnotation(r,t))};changeAnnotationType=e=>{let{annotations:t,onChange:n}=this.props,{annotationIndex:r,selectedElems:i}=this.state,{type:a,label:o}=t[r],s=a===`positive`?`negative`:`positive`,c={...t[r],type:s,label:e};i.forEach(e=>{e.classList.remove(a),e.classList.add(s)}),this.updateLabel(o,c,a),t.splice(r,1,c),n(t),this.handleClose()};updateAnnotation=(e,t)=>{let{annotations:n,onChange:r}=this.props,{annotationIndex:i}=this.state,a={...n[i],label:t};this.updateLabel(e,a),n.splice(i,1,a),r(n)};componentWillUnmount(){this.textRef.removeEventListener(`scroll`,this.adjustAnnotationsPosition)}render(){let{comment:e,customKeys:t,disabled:n,disabledMath:r,keypadMode:i,height:a,width:o,maxHeight:s,onCommentChange:c,predefinedAnnotations:l,text:u}=this.props,{anchorEl:d,annotation:f,openedMenu:p,openedEditor:m,selectionDetails:h}=this.state,g=d&&(d.offsetTop?d.offsetTop:d.offsetParent.offsetTop),_=this.textRef&&g?g-this.textRef.scrollTop-8:0;return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(XQ,{children:[(0,U.jsx)(JQ,{style:{width:o-34,minHeight:a,maxHeight:s},ref:e=>this.textRef=e,onMouseDown:n?()=>{}:DQ,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:u}}),(0,U.jsx)(YQ,{ref:e=>this.labelsRef=e})]}),(0,U.jsx)(ZQ,{label:`Comment`,children:(0,U.jsx)(yQ,{className:`prompt`,markup:e||``,onChange:c,width:o&&(o+104).toString(),disabled:n,pluginProps:{math:{disabled:r,customKeys:t,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0}}})}),(0,U.jsx)(VQ,{anchorEl:d,open:p&&!n,annotations:l,isNewAnnotation:!!h,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),(0,U.jsx)(FQ,{anchorEl:this.textRef,open:m&&!n,offset:_,value:f&&f.label||``,type:f&&f.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType})]})}};function e$(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function t$(e,t){return!e||e$(e)?e:e$(e.default)?e.default:t&&e$(e[t])?e[t]:t&&e$(e[t]?.default)?e[t].default:e}var n$=t$(WR,`UiLayout`)||t$(c$.UiLayout,`UiLayout`),r$=t$(bz,`PreviewPrompt`)||t$(c$.PreviewPrompt,`PreviewPrompt`),i$=t$(SR,`Collapsible`)||t$(c$.Collapsible,`Collapsible`),a$=t$(KL,`Feedback`)||t$(c$.Feedback,`Feedback`),o$=Zz,s$=o$.default,c$=s$&&typeof s$==`object`?s$:o$,l$=D(`@pie-ui:extended-text-entry`),u$=G(n$)({backgroundColor:pL(),color:KI()}),d$=G(qo)(({theme:e})=>({width:`100%`,color:KI(),marginBottom:e.spacing(2),fontSize:`inherit`})),f$=G(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),p$=G(yQ)(({theme:e})=>({marginBottom:e.spacing(2),borderRadius:`4px`})),m$=G(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),h$=class extends P.Component{static propTypes={onValueChange:p.func.isRequired,onAnnotationsChange:p.func.isRequired,onCommentChange:p.func.isRequired,model:p.object,session:p.shape({value:p.string,annotations:p.array,comment:p.string}).isRequired};changeSessionValue=v(this.props.onValueChange,1500);changeSessionComment=v(this.props.onCommentChange,1500);render(){let{model:e,session:t,onAnnotationsChange:n}=this.props,{animationsDisabled:r,annotatorMode:i,customKeys:a,dimensions:o,disabled:s,disabledAnnotator:c,equationEditor:l,extraCSSRules:u,feedback:d,mathInput:f,playersToolbarPosition:p,predefinedAnnotations:m,prompt:h,spanishInput:g,specialInput:_,spellCheckEnabled:v,teacherInstructions:y}=e,{annotations:b,comment:x,value:S}=t,{width:C,height:w}=o||{},T=`40vh`,E={position:p===`top`?`top`:`bottom`};l$(`[render] disabled? `,s);let D=(0,U.jsx)(r$,{defaultClassName:`teacher-instructions`,prompt:y}),O=[];return g&&O.push({language:`spanish`}),_&&O.push({language:`special`}),(0,U.jsxs)(u$,{extraCSSRules:u,ref:e=>{this.containerRef=e},children:[(0,U.jsx)(m$,{children:`Constructed Response Question`}),y&&(0,U.jsx)(f$,{children:r?D:(0,U.jsx)(i$,{labels:{hidden:`Show Teacher Instructions`,visible:`Hide Teacher Instructions`},children:D})}),h&&(0,U.jsx)(d$,{component:`span`,children:(0,U.jsx)(r$,{defaultClassName:`prompt`,prompt:e.prompt})}),i?(0,U.jsx)($Q,{text:S||``,annotations:b||[],comment:x||``,predefinedAnnotations:m||[],onChange:n,onCommentChange:this.changeSessionComment,width:C,height:w,maxHeight:T,disabled:c,disabledMath:!f,customKeys:a,keypadMode:l}):(0,U.jsx)(p$,{className:`response-area-editor`,onChange:this.changeSessionValue,markup:S||``,maxWidth:C&&C.toString(),minWidth:`100px`,minHeight:w&&w.toString(),maxHeight:T,disabled:s,highlightShape:!0,toolbarOpts:E,spellCheck:v,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!f,customKeys:this.props.model.customKeys,keypadMode:this.props.model.equationEditor,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},table:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0},separateParagraphs:{disabled:!1},ul_list:{disabled:!0},ol_list:{disabled:!0}},languageCharactersProps:O}),d&&(0,U.jsx)(a$,{correctness:`correct`,feedback:d})]})}},g$=o((e=>{var t=is();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),_$=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},v$=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},y$=g$(),b$=D(`@pie-elements:extended-text-entry`),x$=new DOMParser;function S$(e){if(typeof e==`string`)try{return x$.parseFromString(e,`text/html`).body.textContent}catch{return b$(`tried to parse as dom and failed`,e),e}}function C$(e){let t=S$(e);return t!==void 0&&t.length>0}var w$=class extends HTMLElement{constructor(){super(),this._model=null,this._session=null,this._root=null}setLangAttribute(){let e=this._model&&typeof this._model.language?this._model.language:``,t=e?e.slice(0,2):`en`;this.setAttribute(`lang`,t)}set model(e){this._model=e,this.dispatchEvent(new _$(this.tagName.toLowerCase(),!1,!!this._model)),this.render()}set session(e){this._session=e,this.render()}get session(){return this._session}valueChange(e){this._session.value=e,this.dispatchEvent(new v$(this.tagName.toLowerCase(),C$(e))),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new v$(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this.dispatchEvent(new v$(this.tagName.toLowerCase(),C$(e))),this.render()}connectedCallback(){this.setAttribute(`aria-label`,`Written Response Question`),this.setAttribute(`role`,`region`),this.render()}render(){if(this._model&&this._session){let e=P.createElement(h$,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),this._root||=(0,y$.createRoot)(this),this._root.render(e),queueMicrotask(()=>{vR(this)})}}disconnectedCallback(){this._root&&this._root.unmount()}};return typeof window<`u`&&!customElements.get(`extended-text-entry-element`)&&customElements.define(`extended-text-entry-element`,w$),w$})();