@pie-element/extended-text-entry 16.0.2-next.20261007003844 → 16.0.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.
- package/dist/browser/author/index.js +644 -644
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{dist-Dcix7OLC.js → dist-j1vyVp3g.js} +10160 -9237
- package/dist/browser/dist-j1vyVp3g.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +644 -644
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/{dist-DOjPCQ8G.js → dist-DuFswITB.js} +7033 -6110
- package/dist/browser/editor-runtime/dist-DuFswITB.js.map +1 -0
- package/dist/browser/editor-runtime/{main-CbR0FsxW.js → main-BhK70YBL.js} +176 -176
- package/dist/browser/editor-runtime/main-BhK70YBL.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{main-D5PwTUlN.js → main-BRPP6Mvf.js} +176 -176
- package/dist/browser/main-BRPP6Mvf.js.map +1 -0
- package/dist/browser/print/index.js +2 -2
- package/dist/delivery/annotation/annotation-editor.js +24 -23
- package/dist/index.iife.js +44 -42
- package/module/print.js +9572 -8649
- package/module/print.js.map +1 -1
- package/package.json +12 -11
- package/dist/browser/dist-Dcix7OLC.js.map +0 -1
- package/dist/browser/editor-runtime/dist-DOjPCQ8G.js.map +0 -1
- package/dist/browser/editor-runtime/main-CbR0FsxW.js.map +0 -1
- package/dist/browser/main-D5PwTUlN.js.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
this.ExtendedTextEntryElement=(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+te(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(O,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+te(s,l);c+=k(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+te(s,l++),c+=k(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M={current:null},ne={transition:null},re={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:ne,ReactCurrentOwner:C};function ie(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,e.act=ie,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ne.transition;ne.transition={};try{e()}finally{ne.transition=t}},e.unstable_act=ie,e.useCallback=function(e,t){return M.current.useCallback(e,t)},e.useContext=function(e){return M.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return M.current.useDeferredValue(e)},e.useEffect=function(e,t){return M.current.useEffect(e,t)},e.useId=function(){return M.current.useId()},e.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return M.current.useMemo(e,t)},e.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},e.useRef=function(e){return M.current.useRef(e)},e.useState=function(e){return M.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return M.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=function(){return null};f.isRequired=f;var p=()=>f,m={array:f,bigint:f,bool:f,func:f,number:f,object:f,string:f,symbol:f,any:f,element:f,elementType:f,node:f,arrayOf:p,instanceOf:p,objectOf:p,oneOf:p,oneOfType:p,shape:p,exact:p,checkPropTypes:()=>{},resetWarningCache:()=>{}};m.PropTypes=m;var h=()=>{};function g(){let e=function(){};return e.enabled=!1,e.log=h,e.extend=()=>e,e.destroy=h,e}g.log=h,g.enable=h,g.disable=()=>``,g.enabled=()=>!1;function _(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function v(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_(e))&&(r&&(r+=` `),r+=t);return r}function y(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function b(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function x(e){if(typeof e!=`string`)throw Error(b(7));return e.charAt(0).toUpperCase()+e.slice(1)}var S=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),C=o(((e,t)=>{t.exports=S()})),w=l(d()),T=C();function E(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ee(e){if(w.isValidElement(e)||(0,T.isValidElementType)(e)||!E(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=ee(e[n])}),t}function D(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return E(e)&&E(t)&&Object.keys(t).forEach(i=>{w.isValidElement(t[i])||(0,T.isValidElementType)(t[i])?r[i]=t[i]:E(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&E(e[i])?r[i]=D(e[i],t[i],n):n.clone?r[i]=E(t[i])?ee(t[i]):t[i]:r[i]=t[i]}),r}function O(e,t){return t?D(e,t,{clone:!1}):e}function te(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function k(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function A(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function j(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var M={xs:0,sm:600,md:900,lg:1200,xl:1536},ne={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${M[e]}px)`},re={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:M[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ie(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||ne;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||ne;return Object.keys(t).reduce((i,a)=>{if(k(e.keys,a)){let e=A(r.containerQueries?r:re,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||M).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function N(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function ae(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function oe(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function se(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:oe(e,n)||r,t&&(i=t(i,r,e)),i}function ce(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=oe(o,r)||{};return ie(e,a,e=>{let r=se(s,i,e);return e===r&&typeof e==`string`&&(r=se(s,i,`${t}${e==="default"?``:x(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function le(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var ue={m:`margin`,p:`padding`},de={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},fe={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},pe=le(e=>{if(e.length>2)if(fe[e])e=fe[e];else return[e];let[t,n]=e.split(``),r=ue[t],i=de[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),me=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],he=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],ge=[...me,...he];function _e(e,t,n,r){let i=oe(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function ve(e){return _e(e,`spacing`,8,`spacing`)}function ye(e,t){return typeof t==`string`||t==null?t:e(t)}function be(e,t){return n=>e.reduce((e,r)=>(e[r]=ye(t,n),e),{})}function xe(e,t,n,r){if(!t.includes(n))return null;let i=be(pe(n),r),a=e[n];return ie(e,a,i)}function Se(e,t){let n=ve(e.theme);return Object.keys(e).map(r=>xe(e,t,r,n)).reduce(O,{})}function Ce(e){return Se(e,me)}Ce.propTypes={},Ce.filterProps=me;function we(e){return Se(e,he)}we.propTypes={},we.filterProps=he;function Te(e){return Se(e,ge)}Te.propTypes={},Te.filterProps=ge;function Ee(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?O(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function De(e){return typeof e==`number`?`${e}px solid`:e}function Oe(e,t){return ce({prop:e,themeKey:`borders`,transform:t})}var ke=Oe(`border`,De),Ae=Oe(`borderTop`,De),je=Oe(`borderRight`,De),Me=Oe(`borderBottom`,De),Ne=Oe(`borderLeft`,De),Pe=Oe(`borderColor`),Fe=Oe(`borderTopColor`),Ie=Oe(`borderRightColor`),Le=Oe(`borderBottomColor`),Re=Oe(`borderLeftColor`),ze=Oe(`outline`,De),Be=Oe(`outlineColor`),Ve=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=_e(e.theme,`shape.borderRadius`,4,`borderRadius`);return ie(e,e.borderRadius,e=>({borderRadius:ye(t,e)}))}return null};Ve.propTypes={},Ve.filterProps=[`borderRadius`],Ee(ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,Ve,ze,Be);var He=e=>{if(e.gap!==void 0&&e.gap!==null){let t=_e(e.theme,`spacing`,8,`gap`);return ie(e,e.gap,e=>({gap:ye(t,e)}))}return null};He.propTypes={},He.filterProps=[`gap`];var Ue=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=_e(e.theme,`spacing`,8,`columnGap`);return ie(e,e.columnGap,e=>({columnGap:ye(t,e)}))}return null};Ue.propTypes={},Ue.filterProps=[`columnGap`];var We=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=_e(e.theme,`spacing`,8,`rowGap`);return ie(e,e.rowGap,e=>({rowGap:ye(t,e)}))}return null};We.propTypes={},We.filterProps=[`rowGap`],Ee(He,Ue,We,ce({prop:`gridColumn`}),ce({prop:`gridRow`}),ce({prop:`gridAutoFlow`}),ce({prop:`gridAutoColumns`}),ce({prop:`gridAutoRows`}),ce({prop:`gridTemplateColumns`}),ce({prop:`gridTemplateRows`}),ce({prop:`gridTemplateAreas`}),ce({prop:`gridArea`}));function Ge(e,t){return t===`grey`?t:e}Ee(ce({prop:`color`,themeKey:`palette`,transform:Ge}),ce({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Ge}),ce({prop:`backgroundColor`,themeKey:`palette`,transform:Ge}));function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}var qe=ce({prop:`width`,transform:Ke}),Je=e=>e.maxWidth!==void 0&&e.maxWidth!==null?ie(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||M[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Ke(t)}}):null;Je.filterProps=[`maxWidth`];var Ye=ce({prop:`minWidth`,transform:Ke}),Xe=ce({prop:`height`,transform:Ke}),Ze=ce({prop:`maxHeight`,transform:Ke}),Qe=ce({prop:`minHeight`,transform:Ke});ce({prop:`size`,cssProperty:`width`,transform:Ke}),ce({prop:`size`,cssProperty:`height`,transform:Ke}),Ee(qe,Je,Ye,Xe,Ze,Qe,ce({prop:`boxSizing`}));var $e={border:{themeKey:`borders`,transform:De},borderTop:{themeKey:`borders`,transform:De},borderRight:{themeKey:`borders`,transform:De},borderBottom:{themeKey:`borders`,transform:De},borderLeft:{themeKey:`borders`,transform:De},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:De},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Ve},color:{themeKey:`palette`,transform:Ge},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Ge},backgroundColor:{themeKey:`palette`,transform:Ge},p:{style:we},pt:{style:we},pr:{style:we},pb:{style:we},pl:{style:we},px:{style:we},py:{style:we},padding:{style:we},paddingTop:{style:we},paddingRight:{style:we},paddingBottom:{style:we},paddingLeft:{style:we},paddingX:{style:we},paddingY:{style:we},paddingInline:{style:we},paddingInlineStart:{style:we},paddingInlineEnd:{style:we},paddingBlock:{style:we},paddingBlockStart:{style:we},paddingBlockEnd:{style:we},m:{style:Ce},mt:{style:Ce},mr:{style:Ce},mb:{style:Ce},ml:{style:Ce},mx:{style:Ce},my:{style:Ce},margin:{style:Ce},marginTop:{style:Ce},marginRight:{style:Ce},marginBottom:{style:Ce},marginLeft:{style:Ce},marginX:{style:Ce},marginY:{style:Ce},marginInline:{style:Ce},marginInlineStart:{style:Ce},marginInlineEnd:{style:Ce},marginBlock:{style:Ce},marginBlockStart:{style:Ce},marginBlockEnd:{style:Ce},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:He},rowGap:{style:We},columnGap:{style:Ue},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Ke},maxWidth:{style:Je},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function et(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function tt(e,t){return typeof e==`function`?e(t):e}function nt(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=oe(n,s)||{};return l?l(i):ie(i,t,t=>{let n=se(u,c,t);return t===n&&typeof t==`string`&&(n=se(u,c,`${e}${t==="default"?``:x(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??$e;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=N(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=tt(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=O(l,e(n,a,i,o));else{let e=ie({theme:i},a,e=>({[n]:e}));et(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=O(l,e)}else l=O(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":te(i,ae(c,l))}:te(i,ae(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var rt=nt();rt.filterProps=[`sx`];var it=e=>{let t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??$e;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function at(e){let{sx:t,...n}=e,{systemProps:r,otherProps:i}=it(n),a;return a=Array.isArray(t)?[r,...t]:typeof t==`function`?(...e)=>{let n=t(...e);return E(n)?{...r,...n}:r}:{...r,...t},{...i,sx:a}}function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(null,arguments)}function st(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ct(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var lt=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(ct(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=st(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),ut=`-ms-`,dt=`-moz-`,ft=`-webkit-`,pt=`comm`,mt=`rule`,ht=`decl`,gt=`@import`,_t=`@keyframes`,vt=`@layer`,yt=Math.abs,bt=String.fromCharCode,xt=Object.assign;function St(e,t){return Dt(e,0)^45?(((t<<2^Dt(e,0))<<2^Dt(e,1))<<2^Dt(e,2))<<2^Dt(e,3):0}function Ct(e){return e.trim()}function wt(e,t){return(e=t.exec(e))?e[0]:e}function Tt(e,t,n){return e.replace(t,n)}function Et(e,t){return e.indexOf(t)}function Dt(e,t){return e.charCodeAt(t)|0}function Ot(e,t,n){return e.slice(t,n)}function kt(e){return e.length}function At(e){return e.length}function jt(e,t){return t.push(e),e}function Mt(e,t){return e.map(t).join(``)}var Nt=1,Pt=1,Ft=0,It=0,Lt=0,Rt=``;function zt(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Nt,column:Pt,length:o,return:``}}function Bt(e,t){return xt(zt(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Vt(){return Lt}function Ht(){return Lt=It>0?Dt(Rt,--It):0,Pt--,Lt===10&&(Pt=1,Nt--),Lt}function Ut(){return Lt=It<Ft?Dt(Rt,It++):0,Pt++,Lt===10&&(Pt=1,Nt++),Lt}function Wt(){return Dt(Rt,It)}function Gt(){return It}function Kt(e,t){return Ot(Rt,e,t)}function qt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Jt(e){return Nt=Pt=1,Ft=kt(Rt=e),It=0,[]}function Yt(e){return Rt=``,e}function Xt(e){return Ct(Kt(It-1,$t(e===91?e+2:e===40?e+1:e)))}function Zt(e){for(;(Lt=Wt())&&Lt<33;)Ut();return qt(e)>2||qt(Lt)>3?``:` `}function Qt(e,t){for(;--t&&Ut()&&!(Lt<48||Lt>102||Lt>57&&Lt<65||Lt>70&&Lt<97););return Kt(e,Gt()+(t<6&&Wt()==32&&Ut()==32))}function $t(e){for(;Ut();)switch(Lt){case e:return It;case 34:case 39:e!==34&&e!==39&&$t(Lt);break;case 40:e===41&&$t(e);break;case 92:Ut();break}return It}function en(e,t){for(;Ut()&&e+Lt!==57&&!(e+Lt===84&&Wt()===47););return`/*`+Kt(t,It-1)+`*`+bt(e===47?e:Ut())}function tn(e){for(;!qt(Wt());)Ut();return Kt(e,It)}function nn(e){return Yt(rn(``,null,null,null,[``],e=Jt(e),0,[0],e))}function rn(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=Ut()){case 40:if(m!=108&&Dt(C,d-1)==58){Et(C+=Tt(Xt(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Xt(v);break;case 9:case 10:case 13:case 32:C+=Zt(m);break;case 92:C+=Qt(Gt()-1,7);continue;case 47:switch(Wt()){case 42:case 47:jt(on(en(Ut(),Gt()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=kt(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=Tt(C,/\f/g,``)),p>0&&kt(C)-d&&jt(p>32?sn(C+`;`,r,n,d-1):sn(Tt(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(jt(S=an(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)rn(C,t,S,S,b,a,d,s,x);else switch(f===99&&Dt(C,3)===110?100:f){case 100:case 108:case 109:case 115:rn(e,S,S,r&&jt(an(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:rn(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+kt(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Ht()==125)continue}switch(C+=bt(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(kt(C)-1)*_,_=1;break;case 64:Wt()===45&&(C+=Xt(Ut())),f=Wt(),u=d=kt(y=C+=tn(Gt())),v++;break;case 45:m===45&&kt(C)==2&&(h=0)}}return a}function an(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=At(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=Ot(e,d+1,d=yt(h=o[m])),y=e;_<p;++_)(y=Ct(h>0?f[_]+` `+v:Tt(v,/&\f/g,f[_])))&&(c[g++]=y);return zt(e,t,n,i===0?mt:s,c,l,u)}function on(e,t,n){return zt(e,t,n,pt,bt(Vt()),Ot(e,2,-2),0)}function sn(e,t,n,r){return zt(e,t,n,ht,Ot(e,0,r),Ot(e,r+1,-1),r)}function cn(e,t){for(var n=``,r=At(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function ln(e,t,n,r){switch(e.type){case vt:if(e.children.length)break;case gt:case ht:return e.return=e.return||e.value;case pt:return``;case _t:return e.return=e.value+`{`+cn(e.children,r)+`}`;case mt:e.value=e.props.join(`,`)}return kt(n=cn(e.children,r))?e.return=e.value+`{`+n+`}`:``}function un(e){var t=At(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function dn(e){return function(t){t.root||(t=t.return)&&e(t)}}function fn(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var pn=function(e,t,n){for(var r=0,i=0;r=i,i=Wt(),r===38&&i===12&&(t[n]=1),!qt(i);)Ut();return Kt(e,It)},mn=function(e,t){var n=-1,r=44;do switch(qt(r)){case 0:r===38&&Wt()===12&&(t[n]=1),e[n]+=pn(It-1,t,n);break;case 2:e[n]+=Xt(r);break;case 4:if(r===44){e[++n]=Wt()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=bt(r)}while(r=Ut());return e},hn=function(e,t){return Yt(mn(Jt(e),t))},gn=new WeakMap,_n=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!gn.get(n))&&!r){gn.set(e,!0);for(var i=[],a=hn(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},vn=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function yn(e,t){switch(St(e,t)){case 5103:return ft+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ft+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ft+e+dt+e+ut+e+e;case 6828:case 4268:return ft+e+ut+e+e;case 6165:return ft+e+ut+`flex-`+e+e;case 5187:return ft+e+Tt(e,/(\w+).+(:[^]+)/,ft+`box-$1$2`+ut+`flex-$1$2`)+e;case 5443:return ft+e+ut+`flex-item-`+Tt(e,/flex-|-self/,``)+e;case 4675:return ft+e+ut+`flex-line-pack`+Tt(e,/align-content|flex-|-self/,``)+e;case 5548:return ft+e+ut+Tt(e,`shrink`,`negative`)+e;case 5292:return ft+e+ut+Tt(e,`basis`,`preferred-size`)+e;case 6060:return ft+`box-`+Tt(e,`-grow`,``)+ft+e+ut+Tt(e,`grow`,`positive`)+e;case 4554:return ft+Tt(e,/([^-])(transform)/g,`$1`+ft+`$2`)+e;case 6187:return Tt(Tt(Tt(e,/(zoom-|grab)/,ft+`$1`),/(image-set)/,ft+`$1`),e,``)+e;case 5495:case 3959:return Tt(e,/(image-set\([^]*)/,ft+"$1$`$1");case 4968:return Tt(Tt(e,/(.+:)(flex-)?(.*)/,ft+`box-pack:$3`+ut+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+ft+e+e;case 4095:case 3583:case 4068:case 2532:return Tt(e,/(.+)-inline(.+)/,ft+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kt(e)-1-t>6)switch(Dt(e,t+1)){case 109:if(Dt(e,t+4)!==45)break;case 102:return Tt(e,/(.+:)(.+)-([^]+)/,`$1`+ft+`$2-$3$1`+dt+(Dt(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Et(e,`stretch`)?yn(Tt(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(Dt(e,t+1)!==115)break;case 6444:switch(Dt(e,kt(e)-3-(~Et(e,`!important`)&&10))){case 107:return Tt(e,`:`,`:`+ft)+e;case 101:return Tt(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+ft+(Dt(e,14)===45?`inline-`:``)+`box$3$1`+ft+`$2$3$1`+ut+`$2box$3`)+e}break;case 5936:switch(Dt(e,t+11)){case 114:return ft+e+ut+Tt(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return ft+e+ut+Tt(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return ft+e+ut+Tt(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return ft+e+ut+e+e}return e}var bn=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ht:e.return=yn(e.value,e.length);break;case _t:return cn([Bt(e,{value:Tt(e.value,`@`,`@`+ft)})],r);case mt:if(e.length)return Mt(e.props,function(t){switch(wt(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return cn([Bt(e,{props:[Tt(t,/:(read-\w+)/,`:`+dt+`$1`)]})],r);case`::placeholder`:return cn([Bt(e,{props:[Tt(t,/:(plac\w+)/,`:`+ft+`input-$1`)]}),Bt(e,{props:[Tt(t,/:(plac\w+)/,`:`+dt+`$1`)]}),Bt(e,{props:[Tt(t,/:(plac\w+)/,ut+`input-$1`)]})],r)}return``})}}],xn=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||bn,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[_n,vn],l,u=[ln,dn(function(e){l.insert(e)})],d=un(c.concat(r,u)),f=function(e){return cn(nn(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new lt({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},Sn=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Cn=o(((e,t)=>{t.exports=Sn()})),wn=o(((e,t)=>{var n=Cn(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function Tn(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var En=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},Dn=function(e,t,n){En(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function On(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},An=/[A-Z]|^ms/g,jn=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mn=function(e){return e.charCodeAt(1)===45},Nn=function(e){return e!=null&&typeof e!=`boolean`},Pn=fn(function(e){return Mn(e)?e:e.replace(An,`-$&`).toLowerCase()}),Fn=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(jn,function(e,t,n){return zn={name:t,styles:n,next:zn},t})}return kn[e]!==1&&!Mn(e)&&typeof t==`number`&&t!==0?t+`px`:t};function In(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return zn={name:i.name,styles:i.styles,next:zn},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)zn={name:o.name,styles:o.styles,next:zn},o=o.next;return a.styles+`;`}return Ln(e,t,n);case`function`:if(e!==void 0){var s=zn,c=n(e);return zn=s,In(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Ln(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=In(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Nn(s)&&(r+=Pn(a)+`:`+Fn(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Nn(o[c])&&(r+=Pn(a)+`:`+Fn(a,o[c])+`;`);else{var l=In(e,t,o);switch(a){case`animation`:case`animationName`:r+=Pn(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var Rn=/label:\s*([^\s;{]+)\s*(;|$)/g,zn;function Bn(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;zn=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=In(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=In(n,t,e[o]),r&&(i+=a[o]);Rn.lastIndex=0;for(var s=``,c;(c=Rn.exec(i))!==null;)s+=`-`+c[1];return{name:On(i)+s,styles:i,next:zn}}var Vn=function(e){return e()},Hn=w.useInsertionEffect?w.useInsertionEffect:!1,Un=Hn||Vn,Wn=Hn||w.useLayoutEffect,Gn=w.createContext(typeof HTMLElement<`u`?xn({key:`css`}):null),Kn=Gn.Provider,qn=function(e){return(0,w.forwardRef)(function(t,n){return e(t,(0,w.useContext)(Gn),n)})},Jn=w.createContext({}),Yn={}.hasOwnProperty,Xn=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Zn=function(e,t){var n={};for(var r in t)Yn.call(t,r)&&(n[r]=t[r]);return n[Xn]=e,n},Qn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return En(t,n,r),Un(function(){return Dn(t,n,r)}),null},$n=qn(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Xn],a=[r],o=``;typeof e.className==`string`?o=Tn(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=Bn(a,void 0,w.useContext(Jn));o+=t.key+`-`+s.name;var c={};for(var l in e)Yn.call(e,l)&&l!==`css`&&l!==Xn&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),w.createElement(w.Fragment,null,w.createElement(Qn,{cache:t,serialized:s,isStringTag:typeof i==`string`}),w.createElement(i,c))});wn();var er=function(e,t){var n=arguments;if(t==null||!Yn.call(t,`css`))return w.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=$n,i[1]=Zn(e,t);for(var a=2;a<r;a++)i[a]=n[a];return w.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(er||={});var tr=qn(function(e,t){var n=e.styles,r=Bn([n],void 0,w.useContext(Jn)),i=w.useRef();return Wn(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Wn(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&Dn(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function nr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bn(t)}function rr(){var e=nr.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var ir=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ar=fn(function(e){return ir.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),or=function(e){return e!==`theme`},sr=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?ar:or},cr=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},lr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return En(t,n,r),Un(function(){return Dn(t,n,r)}),null},ur=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=cr(t,n,r),c=s||sr(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=qn(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=w.useContext(Jn)}typeof e.className==`string`?a=Tn(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=Bn(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?sr(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),w.createElement(w.Fragment,null,w.createElement(lr,{cache:t,serialized:m,isStringTag:typeof r==`string`}),w.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,ot({},n,r,{shouldForwardProp:cr(h,r,!0)})).apply(void 0,d)},h}},dr=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),fr=ur.bind(null);dr.forEach(function(e){fr[e]=fr(e)});var pr=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),P=o(((e,t)=>{t.exports=pr()}))(),mr=new Map,hr={insert:void 0},gr=(e,t)=>{let n=xn(e);return n.sheet=new t({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n},_r;if(typeof document==`object`&&(_r=document.querySelector(`[name="emotion-insertion-point"]`),!_r)){_r=document.createElement(`meta`),_r.setAttribute(`name`,`emotion-insertion-point`),_r.setAttribute(`content`,``);let e=document.querySelector(`head`);e&&e.prepend(_r)}function vr(e,t){if(e||t){class n extends lt{insert(e,t){return hr.insert?hr.insert(e,t):(this.key&&this.key.endsWith(`global`)&&(this.before=_r),super.insert(e,t))}}let r=gr({key:`css`,insertionPoint:e?_r:void 0},n);if(t){let e=r.insert;r.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return r}}function yr(e){let{injectFirst:t,enableCssLayer:n,children:r}=e,i=w.useMemo(()=>{let e=`${t}-${n}`;if(typeof document==`object`&&mr.has(e))return mr.get(e);let r=vr(t,n);return mr.set(e,r),r},[t,n]);return i?(0,P.jsx)(Kn,{value:i,children:r}):r}function br(e){return e==null||Object.keys(e).length===0}function xr(e){let{styles:t,defaultTheme:n={}}=e;return(0,P.jsx)(tr,{styles:typeof t==`function`?e=>t(br(e)?n:e):t})}function Sr(e,t){return fr(e,t)}function Cr(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var wr=[];function Tr(e){return wr[0]=e,Bn(wr)}var Er=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function Dr(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Er(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}var Or={borderRadius:4};function kr(e=8,t=ve({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function Ar(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function jr(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Dr(n),c=kr(i),l=D({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...Or,...a}},o);return l=j(l),l.applyStyles=Ar,l=t.reduce((e,t)=>D(e,t),l),l.unstable_sxConfig={...$e,...o?.unstable_sxConfig},l.unstable_sx=function(e){return rt({sx:e,theme:this})},l}function Mr(e){return Object.keys(e).length===0}function Nr(e=null){let t=w.useContext(Jn);return!t||Mr(t)?e:t}var Pr=jr();function Fr(e=Pr){return Nr(e)}function Ir(e){let t=Tr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Lr({styles:e,themeId:t,defaultTheme:n={}}){let r=Fr(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Ir(typeof e==`function`?e(i):e)):Ir(a)),(0,P.jsx)(xr,{styles:a})}var Rr=e=>e,zr=(()=>{let e=Rr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Rr}}})(),Br={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Vr(e,t,n=`Mui`){let r=Br[t];return r?`${n}-${r}`:`${zr.generate(e)}-${t}`}function Hr(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Vr(e,t,n)}),r}function Ur(e){let{variants:t,...n}=e,r={variants:t,style:Tr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Tr(e.style))}),r}var Wr=jr();function Gr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Kr(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function qr(e){return e?(t,n)=>n[e]:null}function Jr(e,t,n){e.theme=Qr(e.theme)?n:e.theme[t]||e.theme}function Yr(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Yr(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Kr(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Kr(Tr(i),n):i}return Xr(e,r.variants,[t],n)}return r?.isProcessed?n?Kr(Tr(r.style),n):r.style:n?Kr(Tr(r),n):r}function Xr(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Kr(Tr(o.style(i)),r):o.style(i))):n.push(r?Kr(Tr(o.style),r):o.style)}return n}function Zr(e={}){let{themeId:t,defaultTheme:n=Wr,rootShouldForwardProp:r=Gr,slotShouldForwardProp:i=Gr}=e;function a(e){Jr(e,t,n)}return(e,t={})=>{Cr(e,e=>e.filter(e=>e!==rt));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=qr(ei(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Gr;o===`Root`||o===`root`?m=r:o?m=i:$r(e)&&(m=void 0);let h=Sr(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return Yr(t,e,t.theme.modularCssLayers?d:void 0)};if(E(e)){let t=Ur(e);return function(e){return t.variants?Yr(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Kr(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=Yr(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?Xr(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(rt),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Qr(e){for(let t in e)return!1;return!0}function $r(e){return typeof e==`string`&&e.charCodeAt(0)>96}function ei(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ti(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=ti(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=v(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}var ni=typeof window<`u`?w.useLayoutEffect:w.useEffect;function ri(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function ii(e,t=0,n=1){return ri(e,t,n)}function ai(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function oi(e){if(e.type)return e;if(e.charAt(0)===`#`)return oi(ai(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(b(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(b(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var si=e=>{let t=oi(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},ci=(e,t)=>{try{return si(e)}catch{return e}};function li(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function ui(e){e=oi(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),li({type:s,values:c})}function di(e){e=oi(e);let t=e.type===`hsl`||e.type===`hsla`?oi(ui(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function fi(e,t){let n=di(e),r=di(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function pi(e,t){return e=oi(e),t=ii(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,li(e)}function mi(e,t,n){try{return pi(e,t)}catch{return e}}function hi(e,t){if(e=oi(e),t=ii(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return li(e)}function gi(e,t,n){try{return hi(e,t)}catch{return e}}function _i(e,t){if(e=oi(e),t=ii(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return li(e)}function vi(e,t,n){try{return _i(e,t)}catch{return e}}function yi(e,t=.15){return di(e)>.5?hi(e,t):_i(e,t)}function bi(e,t,n){try{return yi(e,t)}catch{return e}}var xi=w.createContext(null);function Si(){return w.useContext(xi)}var Ci=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function wi(e,t){return typeof t==`function`?t(e):{...e,...t}}function Ti(e){let{children:t,theme:n}=e,r=Si(),i=w.useMemo(()=>{let e=r===null?{...n}:wi(r,n);return e!=null&&(e[Ci]=r!==null),e},[n,r]);return(0,P.jsx)(xi.Provider,{value:i,children:t})}var Ei=w.createContext();function Di({value:e,...t}){return(0,P.jsx)(Ei.Provider,{value:e??!0,...t})}var Oi=()=>w.useContext(Ei)??!1,ki=w.createContext(void 0);function Ai({value:e,children:t}){return(0,P.jsx)(ki.Provider,{value:e,children:t})}function ji(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?ti(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ti(i,r,t.components.mergeClassNameAndStyle):r}function Mi({props:e,name:t}){return ji({props:e,name:t,theme:{components:w.useContext(ki)}})}var Ni=0;function Pi(e){let[t,n]=w.useState(e),r=e||t;return w.useEffect(()=>{t??(Ni+=1,n(`mui-${Ni}`))},[t]),r}var Fi={...w}.useId;function Ii(e){if(Fi!==void 0){let t=Fi();return e??t}return Pi(e)}function Li(e){let t=Nr(),n=Ii()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,ni(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,P.jsx)(Lr,{styles:i}):null}var Ri={};function zi(e,t,n,r=!1){return w.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function Bi(e){let{children:t,theme:n,themeId:r}=e,i=Nr(Ri),a=Si()||Ri,o=zi(r,i,n),s=zi(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=Li(o);return(0,P.jsx)(Ti,{theme:s,children:(0,P.jsx)(Jn.Provider,{value:o,children:(0,P.jsx)(Di,{value:c,children:(0,P.jsxs)(Ai,{value:r?o[r].components:o.components,children:[l,t]})})})})}var Vi={theme:void 0};function Hi(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Vi.theme=r.theme,i=Ur(e(Vi)),t=i,n=r.theme),i}}var Ui=`mode`,Wi=`color-scheme`,Gi=`data-color-scheme`;function Ki(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=Ui,colorSchemeStorageKey:a=Wi,attribute:o=Gi,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
1
|
+
this.ExtendedTextEntryElement=(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+te(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(O,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+te(s,l);c+=k(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+te(s,l++),c+=k(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M={current:null},ne={transition:null},re={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:ne,ReactCurrentOwner:C};function ie(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,e.act=ie,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ne.transition;ne.transition={};try{e()}finally{ne.transition=t}},e.unstable_act=ie,e.useCallback=function(e,t){return M.current.useCallback(e,t)},e.useContext=function(e){return M.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return M.current.useDeferredValue(e)},e.useEffect=function(e,t){return M.current.useEffect(e,t)},e.useId=function(){return M.current.useId()},e.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return M.current.useMemo(e,t)},e.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},e.useRef=function(e){return M.current.useRef(e)},e.useState=function(e){return M.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return M.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=function(){return null};f.isRequired=f;var p=()=>f,m={array:f,bigint:f,bool:f,func:f,number:f,object:f,string:f,symbol:f,any:f,element:f,elementType:f,node:f,arrayOf:p,instanceOf:p,objectOf:p,oneOf:p,oneOfType:p,shape:p,exact:p,checkPropTypes:()=>{},resetWarningCache:()=>{}};m.PropTypes=m;var h=()=>{};function g(){let e=function(){};return e.enabled=!1,e.log=h,e.extend=()=>e,e.destroy=h,e}g.log=h,g.enable=h,g.disable=()=>``,g.enabled=()=>!1;function _(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function v(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_(e))&&(r&&(r+=` `),r+=t);return r}function y(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function b(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function x(e){if(typeof e!=`string`)throw Error(b(7));return e.charAt(0).toUpperCase()+e.slice(1)}var S=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),C=o(((e,t)=>{t.exports=S()})),w=l(d()),T=C();function E(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ee(e){if(w.isValidElement(e)||(0,T.isValidElementType)(e)||!E(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=ee(e[n])}),t}function D(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return E(e)&&E(t)&&Object.keys(t).forEach(i=>{w.isValidElement(t[i])||(0,T.isValidElementType)(t[i])?r[i]=t[i]:E(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&E(e[i])?r[i]=D(e[i],t[i],n):n.clone?r[i]=E(t[i])?ee(t[i]):t[i]:r[i]=t[i]}),r}function O(e,t){return t?D(e,t,{clone:!1}):e}function te(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function k(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function A(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function j(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var M={xs:0,sm:600,md:900,lg:1200,xl:1536},ne={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${M[e]}px)`},re={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:M[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ie(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||ne;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||ne;return Object.keys(t).reduce((i,a)=>{if(k(e.keys,a)){let e=A(r.containerQueries?r:re,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||M).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function ae(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function oe(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function se(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function ce(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:se(e,n)||r,t&&(i=t(i,r,e)),i}function le(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=se(o,r)||{};return ie(e,a,e=>{let r=ce(s,i,e);return e===r&&typeof e==`string`&&(r=ce(s,i,`${t}${e==="default"?``:x(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function ue(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var de={m:`margin`,p:`padding`},fe={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},pe={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},me=ue(e=>{if(e.length>2)if(pe[e])e=pe[e];else return[e];let[t,n]=e.split(``),r=de[t],i=fe[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),he=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],ge=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],_e=[...he,...ge];function ve(e,t,n,r){let i=se(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function N(e){return ve(e,`spacing`,8,`spacing`)}function ye(e,t){return typeof t==`string`||t==null?t:e(t)}function be(e,t){return n=>e.reduce((e,r)=>(e[r]=ye(t,n),e),{})}function xe(e,t,n,r){if(!t.includes(n))return null;let i=be(me(n),r),a=e[n];return ie(e,a,i)}function Se(e,t){let n=N(e.theme);return Object.keys(e).map(r=>xe(e,t,r,n)).reduce(O,{})}function Ce(e){return Se(e,he)}Ce.propTypes={},Ce.filterProps=he;function we(e){return Se(e,ge)}we.propTypes={},we.filterProps=ge;function Te(e){return Se(e,_e)}Te.propTypes={},Te.filterProps=_e;function Ee(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?O(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function De(e){return typeof e==`number`?`${e}px solid`:e}function Oe(e,t){return le({prop:e,themeKey:`borders`,transform:t})}var ke=Oe(`border`,De),Ae=Oe(`borderTop`,De),je=Oe(`borderRight`,De),Me=Oe(`borderBottom`,De),Ne=Oe(`borderLeft`,De),Pe=Oe(`borderColor`),Fe=Oe(`borderTopColor`),Ie=Oe(`borderRightColor`),Le=Oe(`borderBottomColor`),Re=Oe(`borderLeftColor`),ze=Oe(`outline`,De),Be=Oe(`outlineColor`),Ve=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=ve(e.theme,`shape.borderRadius`,4,`borderRadius`);return ie(e,e.borderRadius,e=>({borderRadius:ye(t,e)}))}return null};Ve.propTypes={},Ve.filterProps=[`borderRadius`],Ee(ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,Ve,ze,Be);var He=e=>{if(e.gap!==void 0&&e.gap!==null){let t=ve(e.theme,`spacing`,8,`gap`);return ie(e,e.gap,e=>({gap:ye(t,e)}))}return null};He.propTypes={},He.filterProps=[`gap`];var Ue=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=ve(e.theme,`spacing`,8,`columnGap`);return ie(e,e.columnGap,e=>({columnGap:ye(t,e)}))}return null};Ue.propTypes={},Ue.filterProps=[`columnGap`];var We=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=ve(e.theme,`spacing`,8,`rowGap`);return ie(e,e.rowGap,e=>({rowGap:ye(t,e)}))}return null};We.propTypes={},We.filterProps=[`rowGap`],Ee(He,Ue,We,le({prop:`gridColumn`}),le({prop:`gridRow`}),le({prop:`gridAutoFlow`}),le({prop:`gridAutoColumns`}),le({prop:`gridAutoRows`}),le({prop:`gridTemplateColumns`}),le({prop:`gridTemplateRows`}),le({prop:`gridTemplateAreas`}),le({prop:`gridArea`}));function Ge(e,t){return t===`grey`?t:e}Ee(le({prop:`color`,themeKey:`palette`,transform:Ge}),le({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Ge}),le({prop:`backgroundColor`,themeKey:`palette`,transform:Ge}));function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}var qe=le({prop:`width`,transform:Ke}),Je=e=>e.maxWidth!==void 0&&e.maxWidth!==null?ie(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||M[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Ke(t)}}):null;Je.filterProps=[`maxWidth`];var Ye=le({prop:`minWidth`,transform:Ke}),Xe=le({prop:`height`,transform:Ke}),Ze=le({prop:`maxHeight`,transform:Ke}),Qe=le({prop:`minHeight`,transform:Ke});le({prop:`size`,cssProperty:`width`,transform:Ke}),le({prop:`size`,cssProperty:`height`,transform:Ke}),Ee(qe,Je,Ye,Xe,Ze,Qe,le({prop:`boxSizing`}));var $e={border:{themeKey:`borders`,transform:De},borderTop:{themeKey:`borders`,transform:De},borderRight:{themeKey:`borders`,transform:De},borderBottom:{themeKey:`borders`,transform:De},borderLeft:{themeKey:`borders`,transform:De},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:De},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Ve},color:{themeKey:`palette`,transform:Ge},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Ge},backgroundColor:{themeKey:`palette`,transform:Ge},p:{style:we},pt:{style:we},pr:{style:we},pb:{style:we},pl:{style:we},px:{style:we},py:{style:we},padding:{style:we},paddingTop:{style:we},paddingRight:{style:we},paddingBottom:{style:we},paddingLeft:{style:we},paddingX:{style:we},paddingY:{style:we},paddingInline:{style:we},paddingInlineStart:{style:we},paddingInlineEnd:{style:we},paddingBlock:{style:we},paddingBlockStart:{style:we},paddingBlockEnd:{style:we},m:{style:Ce},mt:{style:Ce},mr:{style:Ce},mb:{style:Ce},ml:{style:Ce},mx:{style:Ce},my:{style:Ce},margin:{style:Ce},marginTop:{style:Ce},marginRight:{style:Ce},marginBottom:{style:Ce},marginLeft:{style:Ce},marginX:{style:Ce},marginY:{style:Ce},marginInline:{style:Ce},marginInlineStart:{style:Ce},marginInlineEnd:{style:Ce},marginBlock:{style:Ce},marginBlockStart:{style:Ce},marginBlockEnd:{style:Ce},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:He},rowGap:{style:We},columnGap:{style:Ue},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Ke},maxWidth:{style:Je},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function et(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function tt(e,t){return typeof e==`function`?e(t):e}function nt(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=se(n,s)||{};return l?l(i):ie(i,t,t=>{let n=ce(u,c,t);return t===n&&typeof t==`string`&&(n=ce(u,c,`${e}${t==="default"?``:x(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??$e;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=ae(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=tt(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=O(l,e(n,a,i,o));else{let e=ie({theme:i},a,e=>({[n]:e}));et(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=O(l,e)}else l=O(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":te(i,oe(c,l))}:te(i,oe(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var rt=nt();rt.filterProps=[`sx`];var it=e=>{let t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??$e;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function at(e){let{sx:t,...n}=e,{systemProps:r,otherProps:i}=it(n),a;return a=Array.isArray(t)?[r,...t]:typeof t==`function`?(...e)=>{let n=t(...e);return E(n)?{...r,...n}:r}:{...r,...t},{...i,sx:a}}function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(null,arguments)}function st(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ct(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var lt=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(ct(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=st(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),ut=`-ms-`,dt=`-moz-`,ft=`-webkit-`,pt=`comm`,mt=`rule`,ht=`decl`,gt=`@import`,_t=`@keyframes`,vt=`@layer`,yt=Math.abs,bt=String.fromCharCode,xt=Object.assign;function St(e,t){return Dt(e,0)^45?(((t<<2^Dt(e,0))<<2^Dt(e,1))<<2^Dt(e,2))<<2^Dt(e,3):0}function Ct(e){return e.trim()}function wt(e,t){return(e=t.exec(e))?e[0]:e}function Tt(e,t,n){return e.replace(t,n)}function Et(e,t){return e.indexOf(t)}function Dt(e,t){return e.charCodeAt(t)|0}function Ot(e,t,n){return e.slice(t,n)}function kt(e){return e.length}function At(e){return e.length}function jt(e,t){return t.push(e),e}function Mt(e,t){return e.map(t).join(``)}var Nt=1,Pt=1,Ft=0,It=0,Lt=0,Rt=``;function zt(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Nt,column:Pt,length:o,return:``}}function Bt(e,t){return xt(zt(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Vt(){return Lt}function Ht(){return Lt=It>0?Dt(Rt,--It):0,Pt--,Lt===10&&(Pt=1,Nt--),Lt}function Ut(){return Lt=It<Ft?Dt(Rt,It++):0,Pt++,Lt===10&&(Pt=1,Nt++),Lt}function Wt(){return Dt(Rt,It)}function Gt(){return It}function Kt(e,t){return Ot(Rt,e,t)}function qt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Jt(e){return Nt=Pt=1,Ft=kt(Rt=e),It=0,[]}function Yt(e){return Rt=``,e}function Xt(e){return Ct(Kt(It-1,$t(e===91?e+2:e===40?e+1:e)))}function Zt(e){for(;(Lt=Wt())&&Lt<33;)Ut();return qt(e)>2||qt(Lt)>3?``:` `}function Qt(e,t){for(;--t&&Ut()&&!(Lt<48||Lt>102||Lt>57&&Lt<65||Lt>70&&Lt<97););return Kt(e,Gt()+(t<6&&Wt()==32&&Ut()==32))}function $t(e){for(;Ut();)switch(Lt){case e:return It;case 34:case 39:e!==34&&e!==39&&$t(Lt);break;case 40:e===41&&$t(e);break;case 92:Ut();break}return It}function en(e,t){for(;Ut()&&e+Lt!==57&&!(e+Lt===84&&Wt()===47););return`/*`+Kt(t,It-1)+`*`+bt(e===47?e:Ut())}function tn(e){for(;!qt(Wt());)Ut();return Kt(e,It)}function nn(e){return Yt(rn(``,null,null,null,[``],e=Jt(e),0,[0],e))}function rn(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=Ut()){case 40:if(m!=108&&Dt(C,d-1)==58){Et(C+=Tt(Xt(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Xt(v);break;case 9:case 10:case 13:case 32:C+=Zt(m);break;case 92:C+=Qt(Gt()-1,7);continue;case 47:switch(Wt()){case 42:case 47:jt(on(en(Ut(),Gt()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=kt(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=Tt(C,/\f/g,``)),p>0&&kt(C)-d&&jt(p>32?sn(C+`;`,r,n,d-1):sn(Tt(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(jt(S=an(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)rn(C,t,S,S,b,a,d,s,x);else switch(f===99&&Dt(C,3)===110?100:f){case 100:case 108:case 109:case 115:rn(e,S,S,r&&jt(an(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:rn(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+kt(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Ht()==125)continue}switch(C+=bt(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(kt(C)-1)*_,_=1;break;case 64:Wt()===45&&(C+=Xt(Ut())),f=Wt(),u=d=kt(y=C+=tn(Gt())),v++;break;case 45:m===45&&kt(C)==2&&(h=0)}}return a}function an(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=At(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=Ot(e,d+1,d=yt(h=o[m])),y=e;_<p;++_)(y=Ct(h>0?f[_]+` `+v:Tt(v,/&\f/g,f[_])))&&(c[g++]=y);return zt(e,t,n,i===0?mt:s,c,l,u)}function on(e,t,n){return zt(e,t,n,pt,bt(Vt()),Ot(e,2,-2),0)}function sn(e,t,n,r){return zt(e,t,n,ht,Ot(e,0,r),Ot(e,r+1,-1),r)}function cn(e,t){for(var n=``,r=At(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function ln(e,t,n,r){switch(e.type){case vt:if(e.children.length)break;case gt:case ht:return e.return=e.return||e.value;case pt:return``;case _t:return e.return=e.value+`{`+cn(e.children,r)+`}`;case mt:e.value=e.props.join(`,`)}return kt(n=cn(e.children,r))?e.return=e.value+`{`+n+`}`:``}function un(e){var t=At(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function dn(e){return function(t){t.root||(t=t.return)&&e(t)}}function fn(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var pn=function(e,t,n){for(var r=0,i=0;r=i,i=Wt(),r===38&&i===12&&(t[n]=1),!qt(i);)Ut();return Kt(e,It)},mn=function(e,t){var n=-1,r=44;do switch(qt(r)){case 0:r===38&&Wt()===12&&(t[n]=1),e[n]+=pn(It-1,t,n);break;case 2:e[n]+=Xt(r);break;case 4:if(r===44){e[++n]=Wt()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=bt(r)}while(r=Ut());return e},hn=function(e,t){return Yt(mn(Jt(e),t))},gn=new WeakMap,_n=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!gn.get(n))&&!r){gn.set(e,!0);for(var i=[],a=hn(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},vn=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function yn(e,t){switch(St(e,t)){case 5103:return ft+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ft+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ft+e+dt+e+ut+e+e;case 6828:case 4268:return ft+e+ut+e+e;case 6165:return ft+e+ut+`flex-`+e+e;case 5187:return ft+e+Tt(e,/(\w+).+(:[^]+)/,ft+`box-$1$2`+ut+`flex-$1$2`)+e;case 5443:return ft+e+ut+`flex-item-`+Tt(e,/flex-|-self/,``)+e;case 4675:return ft+e+ut+`flex-line-pack`+Tt(e,/align-content|flex-|-self/,``)+e;case 5548:return ft+e+ut+Tt(e,`shrink`,`negative`)+e;case 5292:return ft+e+ut+Tt(e,`basis`,`preferred-size`)+e;case 6060:return ft+`box-`+Tt(e,`-grow`,``)+ft+e+ut+Tt(e,`grow`,`positive`)+e;case 4554:return ft+Tt(e,/([^-])(transform)/g,`$1`+ft+`$2`)+e;case 6187:return Tt(Tt(Tt(e,/(zoom-|grab)/,ft+`$1`),/(image-set)/,ft+`$1`),e,``)+e;case 5495:case 3959:return Tt(e,/(image-set\([^]*)/,ft+"$1$`$1");case 4968:return Tt(Tt(e,/(.+:)(flex-)?(.*)/,ft+`box-pack:$3`+ut+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+ft+e+e;case 4095:case 3583:case 4068:case 2532:return Tt(e,/(.+)-inline(.+)/,ft+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kt(e)-1-t>6)switch(Dt(e,t+1)){case 109:if(Dt(e,t+4)!==45)break;case 102:return Tt(e,/(.+:)(.+)-([^]+)/,`$1`+ft+`$2-$3$1`+dt+(Dt(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Et(e,`stretch`)?yn(Tt(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(Dt(e,t+1)!==115)break;case 6444:switch(Dt(e,kt(e)-3-(~Et(e,`!important`)&&10))){case 107:return Tt(e,`:`,`:`+ft)+e;case 101:return Tt(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+ft+(Dt(e,14)===45?`inline-`:``)+`box$3$1`+ft+`$2$3$1`+ut+`$2box$3`)+e}break;case 5936:switch(Dt(e,t+11)){case 114:return ft+e+ut+Tt(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return ft+e+ut+Tt(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return ft+e+ut+Tt(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return ft+e+ut+e+e}return e}var bn=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ht:e.return=yn(e.value,e.length);break;case _t:return cn([Bt(e,{value:Tt(e.value,`@`,`@`+ft)})],r);case mt:if(e.length)return Mt(e.props,function(t){switch(wt(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return cn([Bt(e,{props:[Tt(t,/:(read-\w+)/,`:`+dt+`$1`)]})],r);case`::placeholder`:return cn([Bt(e,{props:[Tt(t,/:(plac\w+)/,`:`+ft+`input-$1`)]}),Bt(e,{props:[Tt(t,/:(plac\w+)/,`:`+dt+`$1`)]}),Bt(e,{props:[Tt(t,/:(plac\w+)/,ut+`input-$1`)]})],r)}return``})}}],xn=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||bn,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[_n,vn],l,u=[ln,dn(function(e){l.insert(e)})],d=un(c.concat(r,u)),f=function(e){return cn(nn(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new lt({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},Sn=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Cn=o(((e,t)=>{t.exports=Sn()})),wn=o(((e,t)=>{var n=Cn(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function Tn(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var En=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},Dn=function(e,t,n){En(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function On(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},An=/[A-Z]|^ms/g,jn=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mn=function(e){return e.charCodeAt(1)===45},Nn=function(e){return e!=null&&typeof e!=`boolean`},Pn=fn(function(e){return Mn(e)?e:e.replace(An,`-$&`).toLowerCase()}),Fn=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(jn,function(e,t,n){return zn={name:t,styles:n,next:zn},t})}return kn[e]!==1&&!Mn(e)&&typeof t==`number`&&t!==0?t+`px`:t};function In(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return zn={name:i.name,styles:i.styles,next:zn},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)zn={name:o.name,styles:o.styles,next:zn},o=o.next;return a.styles+`;`}return Ln(e,t,n);case`function`:if(e!==void 0){var s=zn,c=n(e);return zn=s,In(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Ln(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=In(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Nn(s)&&(r+=Pn(a)+`:`+Fn(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Nn(o[c])&&(r+=Pn(a)+`:`+Fn(a,o[c])+`;`);else{var l=In(e,t,o);switch(a){case`animation`:case`animationName`:r+=Pn(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var Rn=/label:\s*([^\s;{]+)\s*(;|$)/g,zn;function Bn(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;zn=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=In(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=In(n,t,e[o]),r&&(i+=a[o]);Rn.lastIndex=0;for(var s=``,c;(c=Rn.exec(i))!==null;)s+=`-`+c[1];return{name:On(i)+s,styles:i,next:zn}}var Vn=function(e){return e()},Hn=w.useInsertionEffect?w.useInsertionEffect:!1,Un=Hn||Vn,Wn=Hn||w.useLayoutEffect,Gn=w.createContext(typeof HTMLElement<`u`?xn({key:`css`}):null),Kn=Gn.Provider,qn=function(e){return(0,w.forwardRef)(function(t,n){return e(t,(0,w.useContext)(Gn),n)})},Jn=w.createContext({}),Yn={}.hasOwnProperty,Xn=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Zn=function(e,t){var n={};for(var r in t)Yn.call(t,r)&&(n[r]=t[r]);return n[Xn]=e,n},Qn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return En(t,n,r),Un(function(){return Dn(t,n,r)}),null},$n=qn(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Xn],a=[r],o=``;typeof e.className==`string`?o=Tn(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=Bn(a,void 0,w.useContext(Jn));o+=t.key+`-`+s.name;var c={};for(var l in e)Yn.call(e,l)&&l!==`css`&&l!==Xn&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),w.createElement(w.Fragment,null,w.createElement(Qn,{cache:t,serialized:s,isStringTag:typeof i==`string`}),w.createElement(i,c))});wn();var er=function(e,t){var n=arguments;if(t==null||!Yn.call(t,`css`))return w.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=$n,i[1]=Zn(e,t);for(var a=2;a<r;a++)i[a]=n[a];return w.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(er||={});var tr=qn(function(e,t){var n=e.styles,r=Bn([n],void 0,w.useContext(Jn)),i=w.useRef();return Wn(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Wn(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&Dn(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function nr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bn(t)}function rr(){var e=nr.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var ir=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ar=fn(function(e){return ir.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),or=function(e){return e!==`theme`},sr=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?ar:or},cr=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},lr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return En(t,n,r),Un(function(){return Dn(t,n,r)}),null},ur=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=cr(t,n,r),c=s||sr(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=qn(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=w.useContext(Jn)}typeof e.className==`string`?a=Tn(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=Bn(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?sr(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),w.createElement(w.Fragment,null,w.createElement(lr,{cache:t,serialized:m,isStringTag:typeof r==`string`}),w.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,ot({},n,r,{shouldForwardProp:cr(h,r,!0)})).apply(void 0,d)},h}},dr=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),fr=ur.bind(null);dr.forEach(function(e){fr[e]=fr(e)});var pr=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),P=o(((e,t)=>{t.exports=pr()}))(),mr=new Map,hr={insert:void 0},gr=(e,t)=>{let n=xn(e);return n.sheet=new t({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n},_r;if(typeof document==`object`&&(_r=document.querySelector(`[name="emotion-insertion-point"]`),!_r)){_r=document.createElement(`meta`),_r.setAttribute(`name`,`emotion-insertion-point`),_r.setAttribute(`content`,``);let e=document.querySelector(`head`);e&&e.prepend(_r)}function vr(e,t){if(e||t){class n extends lt{insert(e,t){return hr.insert?hr.insert(e,t):(this.key&&this.key.endsWith(`global`)&&(this.before=_r),super.insert(e,t))}}let r=gr({key:`css`,insertionPoint:e?_r:void 0},n);if(t){let e=r.insert;r.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return r}}function yr(e){let{injectFirst:t,enableCssLayer:n,children:r}=e,i=w.useMemo(()=>{let e=`${t}-${n}`;if(typeof document==`object`&&mr.has(e))return mr.get(e);let r=vr(t,n);return mr.set(e,r),r},[t,n]);return i?(0,P.jsx)(Kn,{value:i,children:r}):r}function br(e){return e==null||Object.keys(e).length===0}function xr(e){let{styles:t,defaultTheme:n={}}=e;return(0,P.jsx)(tr,{styles:typeof t==`function`?e=>t(br(e)?n:e):t})}function Sr(e,t){return fr(e,t)}function Cr(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var wr=[];function Tr(e){return wr[0]=e,Bn(wr)}var Er=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function Dr(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Er(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}var Or={borderRadius:4};function kr(e=8,t=N({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function Ar(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function jr(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Dr(n),c=kr(i),l=D({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...Or,...a}},o);return l=j(l),l.applyStyles=Ar,l=t.reduce((e,t)=>D(e,t),l),l.unstable_sxConfig={...$e,...o?.unstable_sxConfig},l.unstable_sx=function(e){return rt({sx:e,theme:this})},l}function Mr(e){return Object.keys(e).length===0}function Nr(e=null){let t=w.useContext(Jn);return!t||Mr(t)?e:t}var Pr=jr();function Fr(e=Pr){return Nr(e)}function Ir(e){let t=Tr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Lr({styles:e,themeId:t,defaultTheme:n={}}){let r=Fr(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Ir(typeof e==`function`?e(i):e)):Ir(a)),(0,P.jsx)(xr,{styles:a})}var Rr=e=>e,zr=(()=>{let e=Rr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Rr}}})(),Br={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Vr(e,t,n=`Mui`){let r=Br[t];return r?`${n}-${r}`:`${zr.generate(e)}-${t}`}function Hr(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Vr(e,t,n)}),r}function Ur(e){let{variants:t,...n}=e,r={variants:t,style:Tr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Tr(e.style))}),r}var Wr=jr();function Gr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Kr(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function qr(e){return e?(t,n)=>n[e]:null}function Jr(e,t,n){e.theme=Qr(e.theme)?n:e.theme[t]||e.theme}function Yr(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Yr(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Kr(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Kr(Tr(i),n):i}return Xr(e,r.variants,[t],n)}return r?.isProcessed?n?Kr(Tr(r.style),n):r.style:n?Kr(Tr(r),n):r}function Xr(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Kr(Tr(o.style(i)),r):o.style(i))):n.push(r?Kr(Tr(o.style),r):o.style)}return n}function Zr(e={}){let{themeId:t,defaultTheme:n=Wr,rootShouldForwardProp:r=Gr,slotShouldForwardProp:i=Gr}=e;function a(e){Jr(e,t,n)}return(e,t={})=>{Cr(e,e=>e.filter(e=>e!==rt));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=qr(ei(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Gr;o===`Root`||o===`root`?m=r:o?m=i:$r(e)&&(m=void 0);let h=Sr(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return Yr(t,e,t.theme.modularCssLayers?d:void 0)};if(E(e)){let t=Ur(e);return function(e){return t.variants?Yr(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Kr(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=Yr(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?Xr(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(rt),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Qr(e){for(let t in e)return!1;return!0}function $r(e){return typeof e==`string`&&e.charCodeAt(0)>96}function ei(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ti(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=ti(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=v(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}var ni=typeof window<`u`?w.useLayoutEffect:w.useEffect;function ri(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function ii(e,t=0,n=1){return ri(e,t,n)}function ai(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function oi(e){if(e.type)return e;if(e.charAt(0)===`#`)return oi(ai(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(b(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(b(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var si=e=>{let t=oi(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},ci=(e,t)=>{try{return si(e)}catch{return e}};function li(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function ui(e){e=oi(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),li({type:s,values:c})}function di(e){e=oi(e);let t=e.type===`hsl`||e.type===`hsla`?oi(ui(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function fi(e,t){let n=di(e),r=di(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function pi(e,t){return e=oi(e),t=ii(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,li(e)}function mi(e,t,n){try{return pi(e,t)}catch{return e}}function hi(e,t){if(e=oi(e),t=ii(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return li(e)}function gi(e,t,n){try{return hi(e,t)}catch{return e}}function _i(e,t){if(e=oi(e),t=ii(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return li(e)}function vi(e,t,n){try{return _i(e,t)}catch{return e}}function yi(e,t=.15){return di(e)>.5?hi(e,t):_i(e,t)}function bi(e,t,n){try{return yi(e,t)}catch{return e}}var xi=w.createContext(null);function Si(){return w.useContext(xi)}var Ci=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function wi(e,t){return typeof t==`function`?t(e):{...e,...t}}function Ti(e){let{children:t,theme:n}=e,r=Si(),i=w.useMemo(()=>{let e=r===null?{...n}:wi(r,n);return e!=null&&(e[Ci]=r!==null),e},[n,r]);return(0,P.jsx)(xi.Provider,{value:i,children:t})}var Ei=w.createContext();function Di({value:e,...t}){return(0,P.jsx)(Ei.Provider,{value:e??!0,...t})}var Oi=()=>w.useContext(Ei)??!1,ki=w.createContext(void 0);function Ai({value:e,children:t}){return(0,P.jsx)(ki.Provider,{value:e,children:t})}function ji(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?ti(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ti(i,r,t.components.mergeClassNameAndStyle):r}function Mi({props:e,name:t}){return ji({props:e,name:t,theme:{components:w.useContext(ki)}})}var Ni=0;function Pi(e){let[t,n]=w.useState(e),r=e||t;return w.useEffect(()=>{t??(Ni+=1,n(`mui-${Ni}`))},[t]),r}var Fi={...w}.useId;function Ii(e){if(Fi!==void 0){let t=Fi();return e??t}return Pi(e)}function Li(e){let t=Nr(),n=Ii()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,ni(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,P.jsx)(Lr,{styles:i}):null}var Ri={};function zi(e,t,n,r=!1){return w.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function Bi(e){let{children:t,theme:n,themeId:r}=e,i=Nr(Ri),a=Si()||Ri,o=zi(r,i,n),s=zi(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=Li(o);return(0,P.jsx)(Ti,{theme:s,children:(0,P.jsx)(Jn.Provider,{value:o,children:(0,P.jsx)(Di,{value:c,children:(0,P.jsxs)(Ai,{value:r?o[r].components:o.components,children:[l,t]})})})})}var Vi={theme:void 0};function Hi(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Vi.theme=r.theme,i=Ur(e(Vi)),t=i,n=r.theme),i}}var Ui=`mode`,Wi=`color-scheme`,Gi=`data-color-scheme`;function Ki(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=Ui,colorSchemeStorageKey:a=Wi,attribute:o=Gi,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
2
2
|
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let d=u.match(/\[([^[\]]+)\]/);if(d){let[e,t]=d[1].split(`=`);t||(l+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
3
3
|
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
4
4
|
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,P.jsx)(`script`,{suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(function() {
|
|
@@ -25,7 +25,7 @@ try {
|
|
|
25
25
|
if (colorScheme) {
|
|
26
26
|
${l}
|
|
27
27
|
}
|
|
28
|
-
} catch(e){}})();`}},`mui-color-scheme-init`)}function qi(){}var Ji=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return qi;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function Yi(){}function Xi(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Zi(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function Qi(e){return Zi(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function $i(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=Ui,colorSchemeStorageKey:o=Wi,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=Ji,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=w.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=w.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=w.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=w.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:Xi(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=w.useState(l||!d);w.useEffect(()=>{v(!0)},[]);let y=Qi(h),b=w.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:Xi(r)}})},[f,t]),x=w.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return Zi(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),S=w.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=w.useRef(S);return C.current=S,w.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>C.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),w.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||Yi,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||Yi,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||Yi;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var ea=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function ta(e){let{themeId:t,theme:n={},modeStorageKey:r=Ui,colorSchemeStorageKey:i=Wi,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=w.createContext(void 0),u=()=>w.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:S=`system`,forceThemeRerender:C=!1,noSsr:T}=e,E=w.useRef(!1),ee=Si(),D=w.useContext(l),O=!!D&&!b,te=w.useMemo(()=>u||(typeof n==`function`?n():n),[u]),k=te[t],A=k||te,{colorSchemes:j=d,components:M=f,cssVarPrefix:ne}=A,re=Object.keys(j).filter(e=>!!j[e]).join(`,`),ie=w.useMemo(()=>re.split(`,`),[re]),N=typeof o==`string`?o:o.light,ae=typeof o==`string`?o:o.dark,{mode:oe,setMode:se,systemMode:ce,lightColorScheme:le,darkColorScheme:ue,colorScheme:de,setColorScheme:fe}=$i({supportedColorSchemes:ie,defaultLightColorScheme:N,defaultDarkColorScheme:ae,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:j[N]&&j[ae]?S:j[A.defaultColorScheme]?.palette?.mode||A.palette?.mode,storageManager:g,storageWindow:_,noSsr:T}),pe=oe,me=de;O&&(pe=D.mode,me=D.colorScheme);let he=me||A.defaultColorScheme;A.vars&&!C&&(he=A.defaultColorScheme);let ge=w.useMemo(()=>{let e=A.generateThemeVars?.()||A.vars,t={...A,components:M,colorSchemes:j,cssVarPrefix:ne,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),he){let e=j[he];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[A,he,M,j,ne]),_e=A.colorSchemeSelector;ni(()=>{if(me&&y&&_e&&_e!==`media`){let e=_e,t=_e;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...ie.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,me));else{let e=t.replace(`%s`,me).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||ie.forEach(e=>{y.removeAttribute(t.replace(me,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,me)}}},[me,_e,y,ie]),w.useEffect(()=>{let e;if(h&&E.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(ea)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[me,h,v]),w.useEffect(()=>(E.current=!0,()=>{E.current=!1}),[]);let ve=w.useMemo(()=>({allColorSchemes:ie,colorScheme:me,darkColorScheme:ue,lightColorScheme:le,mode:pe,setColorScheme:fe,setMode:se,systemMode:ce}),[ie,me,ue,le,pe,fe,se,ce,ge.colorSchemeSelector]),ye=!0;(x||A.cssVariables===!1||O&&ee?.cssVarPrefix===ne)&&(ye=!1);let be=(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(Bi,{themeId:k?t:void 0,theme:ge,children:c}),ye&&(0,P.jsx)(xr,{styles:ge.generateStyleSheets?.()||[]})]});return O?be:(0,P.jsx)(l.Provider,{value:ve,children:be})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>Ki({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function na(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var ra=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},ia=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},aa=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function oa(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return ia(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=aa(e,t);Object.assign(i,{[r]:c}),ra(a,e,`var(${r})`,s),ra(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function sa(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=oa(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=oa(n,t);p=D(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=oa(h,t);p=D(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=D(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function ca(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function la(e,t){return w.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var ua={black:`#000`,white:`#fff`},da={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},fa={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},pa={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},ma={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},ha={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},ga={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},_a={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function va(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:ua.white,default:ua.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var ya=va();function ba(){return{text:{primary:ua.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:ua.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var xa=ba();function Sa(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=_i(e.main,i):t===`dark`&&(e.dark=hi(e.main,a)))}function Ca(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function wa(e=`light`){return e===`dark`?{main:ha[200],light:ha[50],dark:ha[400]}:{main:ha[700],light:ha[400],dark:ha[800]}}function Ta(e=`light`){return e===`dark`?{main:fa[200],light:fa[50],dark:fa[400]}:{main:fa[500],light:fa[300],dark:fa[700]}}function Ea(e=`light`){return e===`dark`?{main:pa[500],light:pa[300],dark:pa[700]}:{main:pa[700],light:pa[400],dark:pa[800]}}function Da(e=`light`){return e===`dark`?{main:ga[400],light:ga[300],dark:ga[700]}:{main:ga[700],light:ga[500],dark:ga[900]}}function Oa(e=`light`){return e===`dark`?{main:_a[400],light:_a[300],dark:_a[700]}:{main:_a[800],light:_a[500],dark:_a[900]}}function ka(e=`light`){return e===`dark`?{main:ma[400],light:ma[300],dark:ma[700]}:{main:`#ed6c02`,light:ma[500],dark:ma[900]}}function Aa(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function ja(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||wa(t),s=e.secondary||Ta(t),c=e.error||Ea(t),l=e.info||Da(t),u=e.success||Oa(t),d=e.warning||ka(t);function f(e){return i?Aa(e):fi(e,xa.text.primary)>=n?xa.text.primary:ya.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(b(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(b(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(Ca(i,e,`light`,a,r),Ca(i,e,`dark`,o,r)):(Sa(e,`light`,a,r),Sa(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=va():t===`dark`&&(m=ba()),D({common:{...ua},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:da,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function Ma(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function Na(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Pa(e){return Math.round(e*1e5)/1e5}var Fa={textTransform:`uppercase`},Ia=`"Roboto", "Helvetica", "Arial", sans-serif`;function La(e,t){let{fontFamily:n=Ia,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Ia?{letterSpacing:`${Pa(i/t)}em`}:{},...a,...l});return D({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Fa),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Fa),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var Ra=.2,za=.14,Ba=.12;function Va(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ra})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${za})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ba})`].join(`,`)}var Ha=[`none`,Va(0,2,1,-1,0,1,1,0,0,1,3,0),Va(0,3,1,-2,0,2,2,0,0,1,5,0),Va(0,3,3,-2,0,3,4,0,0,1,8,0),Va(0,2,4,-1,0,4,5,0,0,1,10,0),Va(0,3,5,-1,0,5,8,0,0,1,14,0),Va(0,3,5,-1,0,6,10,0,0,1,18,0),Va(0,4,5,-2,0,7,10,1,0,2,16,1),Va(0,5,5,-3,0,8,10,1,0,3,14,2),Va(0,5,6,-3,0,9,12,1,0,3,16,2),Va(0,6,6,-3,0,10,14,1,0,4,18,3),Va(0,6,7,-4,0,11,15,1,0,4,20,3),Va(0,7,8,-4,0,12,17,2,0,5,22,4),Va(0,7,8,-4,0,13,19,2,0,5,24,4),Va(0,7,9,-4,0,14,21,2,0,5,26,4),Va(0,8,9,-5,0,15,22,2,0,6,28,5),Va(0,8,10,-5,0,16,24,2,0,6,30,5),Va(0,8,11,-5,0,17,26,2,0,6,32,5),Va(0,9,11,-5,0,18,28,2,0,7,34,6),Va(0,9,12,-6,0,19,29,2,0,7,36,6),Va(0,10,13,-6,0,20,31,3,0,8,38,7),Va(0,10,13,-6,0,21,33,3,0,8,40,7),Va(0,10,14,-6,0,22,35,3,0,8,42,7),Va(0,11,14,-7,0,23,36,3,0,9,44,8),Va(0,11,15,-7,0,24,38,3,0,9,46,8)],Ua={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},Wa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ga(e){return`${Math.round(e)}ms`}function Ka(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function qa(e){let t={...Ua,...e.easing},n={...Wa,...e.duration};return{getAutoHeightDuration:Ka,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Ga(i)} ${a} ${typeof o==`string`?o:Ga(o)}`).join(`,`)},...e,easing:t,duration:n}}var Ja={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ya(e){return E(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Xa(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ya(a)||i.startsWith(`unstable_`)?delete e[i]:E(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
28
|
+
} catch(e){}})();`}},`mui-color-scheme-init`)}function qi(){}var Ji=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return qi;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function Yi(){}function Xi(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Zi(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function Qi(e){return Zi(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function $i(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=Ui,colorSchemeStorageKey:o=Wi,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=Ji,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=w.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=w.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=w.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=w.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:Xi(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=w.useState(l||!d);w.useEffect(()=>{v(!0)},[]);let y=Qi(h),b=w.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:Xi(r)}})},[f,t]),x=w.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return Zi(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),S=w.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=w.useRef(S);return C.current=S,w.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>C.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),w.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||Yi,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||Yi,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||Yi;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var ea=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function ta(e){let{themeId:t,theme:n={},modeStorageKey:r=Ui,colorSchemeStorageKey:i=Wi,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=w.createContext(void 0),u=()=>w.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:S=`system`,forceThemeRerender:C=!1,noSsr:T}=e,E=w.useRef(!1),ee=Si(),D=w.useContext(l),O=!!D&&!b,te=w.useMemo(()=>u||(typeof n==`function`?n():n),[u]),k=te[t],A=k||te,{colorSchemes:j=d,components:M=f,cssVarPrefix:ne}=A,re=Object.keys(j).filter(e=>!!j[e]).join(`,`),ie=w.useMemo(()=>re.split(`,`),[re]),ae=typeof o==`string`?o:o.light,oe=typeof o==`string`?o:o.dark,{mode:se,setMode:ce,systemMode:le,lightColorScheme:ue,darkColorScheme:de,colorScheme:fe,setColorScheme:pe}=$i({supportedColorSchemes:ie,defaultLightColorScheme:ae,defaultDarkColorScheme:oe,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:j[ae]&&j[oe]?S:j[A.defaultColorScheme]?.palette?.mode||A.palette?.mode,storageManager:g,storageWindow:_,noSsr:T}),me=se,he=fe;O&&(me=D.mode,he=D.colorScheme);let ge=he||A.defaultColorScheme;A.vars&&!C&&(ge=A.defaultColorScheme);let _e=w.useMemo(()=>{let e=A.generateThemeVars?.()||A.vars,t={...A,components:M,colorSchemes:j,cssVarPrefix:ne,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),ge){let e=j[ge];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[A,ge,M,j,ne]),ve=A.colorSchemeSelector;ni(()=>{if(he&&y&&ve&&ve!==`media`){let e=ve,t=ve;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...ie.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,he));else{let e=t.replace(`%s`,he).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||ie.forEach(e=>{y.removeAttribute(t.replace(he,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,he)}}},[he,ve,y,ie]),w.useEffect(()=>{let e;if(h&&E.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(ea)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[he,h,v]),w.useEffect(()=>(E.current=!0,()=>{E.current=!1}),[]);let N=w.useMemo(()=>({allColorSchemes:ie,colorScheme:he,darkColorScheme:de,lightColorScheme:ue,mode:me,setColorScheme:pe,setMode:ce,systemMode:le}),[ie,he,de,ue,me,pe,ce,le,_e.colorSchemeSelector]),ye=!0;(x||A.cssVariables===!1||O&&ee?.cssVarPrefix===ne)&&(ye=!1);let be=(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(Bi,{themeId:k?t:void 0,theme:_e,children:c}),ye&&(0,P.jsx)(xr,{styles:_e.generateStyleSheets?.()||[]})]});return O?be:(0,P.jsx)(l.Provider,{value:N,children:be})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>Ki({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function na(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var ra=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},ia=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},aa=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function oa(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return ia(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=aa(e,t);Object.assign(i,{[r]:c}),ra(a,e,`var(${r})`,s),ra(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function sa(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=oa(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=oa(n,t);p=D(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=oa(h,t);p=D(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=D(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function ca(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function la(e,t){return w.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var ua={black:`#000`,white:`#fff`},da={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},fa={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},pa={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},ma={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},ha={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},ga={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},_a={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function va(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:ua.white,default:ua.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var ya=va();function ba(){return{text:{primary:ua.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:ua.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var xa=ba();function Sa(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=_i(e.main,i):t===`dark`&&(e.dark=hi(e.main,a)))}function Ca(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function wa(e=`light`){return e===`dark`?{main:ha[200],light:ha[50],dark:ha[400]}:{main:ha[700],light:ha[400],dark:ha[800]}}function Ta(e=`light`){return e===`dark`?{main:fa[200],light:fa[50],dark:fa[400]}:{main:fa[500],light:fa[300],dark:fa[700]}}function Ea(e=`light`){return e===`dark`?{main:pa[500],light:pa[300],dark:pa[700]}:{main:pa[700],light:pa[400],dark:pa[800]}}function Da(e=`light`){return e===`dark`?{main:ga[400],light:ga[300],dark:ga[700]}:{main:ga[700],light:ga[500],dark:ga[900]}}function Oa(e=`light`){return e===`dark`?{main:_a[400],light:_a[300],dark:_a[700]}:{main:_a[800],light:_a[500],dark:_a[900]}}function ka(e=`light`){return e===`dark`?{main:ma[400],light:ma[300],dark:ma[700]}:{main:`#ed6c02`,light:ma[500],dark:ma[900]}}function Aa(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function ja(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||wa(t),s=e.secondary||Ta(t),c=e.error||Ea(t),l=e.info||Da(t),u=e.success||Oa(t),d=e.warning||ka(t);function f(e){return i?Aa(e):fi(e,xa.text.primary)>=n?xa.text.primary:ya.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(b(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(b(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(Ca(i,e,`light`,a,r),Ca(i,e,`dark`,o,r)):(Sa(e,`light`,a,r),Sa(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=va():t===`dark`&&(m=ba()),D({common:{...ua},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:da,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function Ma(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function Na(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Pa(e){return Math.round(e*1e5)/1e5}var Fa={textTransform:`uppercase`},Ia=`"Roboto", "Helvetica", "Arial", sans-serif`;function La(e,t){let{fontFamily:n=Ia,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Ia?{letterSpacing:`${Pa(i/t)}em`}:{},...a,...l});return D({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Fa),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Fa),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var Ra=.2,za=.14,Ba=.12;function Va(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ra})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${za})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ba})`].join(`,`)}var Ha=[`none`,Va(0,2,1,-1,0,1,1,0,0,1,3,0),Va(0,3,1,-2,0,2,2,0,0,1,5,0),Va(0,3,3,-2,0,3,4,0,0,1,8,0),Va(0,2,4,-1,0,4,5,0,0,1,10,0),Va(0,3,5,-1,0,5,8,0,0,1,14,0),Va(0,3,5,-1,0,6,10,0,0,1,18,0),Va(0,4,5,-2,0,7,10,1,0,2,16,1),Va(0,5,5,-3,0,8,10,1,0,3,14,2),Va(0,5,6,-3,0,9,12,1,0,3,16,2),Va(0,6,6,-3,0,10,14,1,0,4,18,3),Va(0,6,7,-4,0,11,15,1,0,4,20,3),Va(0,7,8,-4,0,12,17,2,0,5,22,4),Va(0,7,8,-4,0,13,19,2,0,5,24,4),Va(0,7,9,-4,0,14,21,2,0,5,26,4),Va(0,8,9,-5,0,15,22,2,0,6,28,5),Va(0,8,10,-5,0,16,24,2,0,6,30,5),Va(0,8,11,-5,0,17,26,2,0,6,32,5),Va(0,9,11,-5,0,18,28,2,0,7,34,6),Va(0,9,12,-6,0,19,29,2,0,7,36,6),Va(0,10,13,-6,0,20,31,3,0,8,38,7),Va(0,10,13,-6,0,21,33,3,0,8,40,7),Va(0,10,14,-6,0,22,35,3,0,8,42,7),Va(0,11,14,-7,0,23,36,3,0,9,44,8),Va(0,11,15,-7,0,24,38,3,0,9,46,8)],Ua={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},Wa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ga(e){return`${Math.round(e)}ms`}function Ka(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function qa(e){let t={...Ua,...e.easing},n={...Wa,...e.duration};return{getAutoHeightDuration:Ka,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Ga(i)} ${a} ${typeof o==`string`?o:Ga(o)}`).join(`,`)},...e,easing:t,duration:n}}var Ja={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ya(e){return E(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Xa(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ya(a)||i.startsWith(`unstable_`)?delete e[i]:E(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
29
29
|
|
|
30
30
|
const theme = ${JSON.stringify(t,null,2)};
|
|
31
31
|
|
|
@@ -33,18 +33,18 @@ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
|
33
33
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
34
34
|
|
|
35
35
|
export default theme;`}function Za(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Qa=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function $a(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:pi(t,Qa(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Za(n)})`:_i(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Za(n)})`:hi(t,n)}})}function eo(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,colorSpace:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(b(20));let d=ja({...a,colorSpace:l}),f=jr(e),p=D(f,{mixins:Na(f.breakpoints,r),palette:d,shadows:Ha.slice(),typography:La(d,s),transitions:qa(o),zIndex:{...Ja}});return p=D(p,u),p=t.reduce((e,t)=>D(e,t),p),p.unstable_sxConfig={...$e,...u?.unstable_sxConfig},p.unstable_sx=function(e){return rt({sx:e,theme:this})},p.toRuntimeSource=Xa,$a(p),p}function to(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var no=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=to(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function ro(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function io(e){return e===`dark`?no:[]}function ao(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=ja({...t,colorSpace:i});return{palette:o,opacity:{...ro(o.mode),...n},overlays:r||io(o.mode),...a}}function oo(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var so=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],co=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return so(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function lo(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function F(e,t,n){!e[t]&&n&&(e[t]=n)}function uo(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:ui(e)}function fo(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ci(uo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
36
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function po(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var mo=e=>{try{return e()}catch{}},ho=(e=`mui`)=>na(e);function go(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=ao({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=eo({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...ro(a),...n?.opacity},overlays:n?.overlays||io(a)},s}function _o(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=oo,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=ho(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(b(21,f));let x;o&&(x=`oklch`);let S=go(x,v,y,u,f);h&&!v.light&&go(x,v,h,void 0,`light`),g&&!v.dark&&go(x,v,g,void 0,`dark`);let C={defaultColorScheme:f,...S,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...Ma(S.typography),...S.font},spacing:po(u.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(F(t.common,`background`,`#fff`),F(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(F(t.common,`background`,`#000`),F(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===mi&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===gi&&(r=`#000 ${(n*100).toFixed(0)}%`),e===vi&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(lo(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){F(t.Alert,`errorColor`,r(gi,o?p(`palette-error-light`):t.error.light,.6)),F(t.Alert,`infoColor`,r(gi,o?p(`palette-info-light`):t.info.light,.6)),F(t.Alert,`successColor`,r(gi,o?p(`palette-success-light`):t.success.light,.6)),F(t.Alert,`warningColor`,r(gi,o?p(`palette-warning-light`):t.warning.light,.6)),F(t.Alert,`errorFilledBg`,n(`palette-error-main`)),F(t.Alert,`infoFilledBg`,n(`palette-info-main`)),F(t.Alert,`successFilledBg`,n(`palette-success-main`)),F(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),F(t.Alert,`errorFilledColor`,mo(()=>t.getContrastText(t.error.main))),F(t.Alert,`infoFilledColor`,mo(()=>t.getContrastText(t.info.main))),F(t.Alert,`successFilledColor`,mo(()=>t.getContrastText(t.success.main))),F(t.Alert,`warningFilledColor`,mo(()=>t.getContrastText(t.warning.main))),F(t.Alert,`errorStandardBg`,r(vi,o?p(`palette-error-light`):t.error.light,.9)),F(t.Alert,`infoStandardBg`,r(vi,o?p(`palette-info-light`):t.info.light,.9)),F(t.Alert,`successStandardBg`,r(vi,o?p(`palette-success-light`):t.success.light,.9)),F(t.Alert,`warningStandardBg`,r(vi,o?p(`palette-warning-light`):t.warning.light,.9)),F(t.Alert,`errorIconColor`,n(`palette-error-main`)),F(t.Alert,`infoIconColor`,n(`palette-info-main`)),F(t.Alert,`successIconColor`,n(`palette-success-main`)),F(t.Alert,`warningIconColor`,n(`palette-warning-main`)),F(t.AppBar,`defaultBg`,n(`palette-grey-100`)),F(t.Avatar,`defaultBg`,n(`palette-grey-400`)),F(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),F(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),F(t.Chip,`defaultBorder`,n(`palette-grey-400`)),F(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),F(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),F(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),F(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),F(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),F(t.LinearProgress,`primaryBg`,r(vi,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.LinearProgress,`secondaryBg`,r(vi,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.LinearProgress,`errorBg`,r(vi,o?p(`palette-error-main`):t.error.main,.62)),F(t.LinearProgress,`infoBg`,r(vi,o?p(`palette-info-main`):t.info.main,.62)),F(t.LinearProgress,`successBg`,r(vi,o?p(`palette-success-main`):t.success.main,.62)),F(t.LinearProgress,`warningBg`,r(vi,o?p(`palette-warning-light`):t.warning.main,.62)),F(t.Skeleton,`bg`,x?r(mi,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),F(t.Slider,`primaryTrack`,r(vi,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.Slider,`secondaryTrack`,r(vi,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.Slider,`errorTrack`,r(vi,o?p(`palette-error-main`):t.error.main,.62)),F(t.Slider,`infoTrack`,r(vi,o?p(`palette-info-main`):t.info.main,.62)),F(t.Slider,`successTrack`,r(vi,o?p(`palette-success-main`):t.success.main,.62)),F(t.Slider,`warningTrack`,r(vi,o?p(`palette-warning-main`):t.warning.main,.62));let e=x?r(gi,o?p(`palette-background-default`):t.background.default,.6825):bi(t.background.default,.8);F(t.SnackbarContent,`bg`,e),F(t.SnackbarContent,`color`,mo(()=>x?xa.text.primary:t.getContrastText(e))),F(t.SpeedDialAction,`fabHoverBg`,bi(t.background.paper,.15)),F(t.StepConnector,`border`,n(`palette-grey-400`)),F(t.StepContent,`border`,n(`palette-grey-400`)),F(t.Switch,`defaultColor`,n(`palette-common-white`)),F(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),F(t.Switch,`primaryDisabledColor`,r(vi,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.Switch,`secondaryDisabledColor`,r(vi,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.Switch,`errorDisabledColor`,r(vi,o?p(`palette-error-main`):t.error.main,.62)),F(t.Switch,`infoDisabledColor`,r(vi,o?p(`palette-info-main`):t.info.main,.62)),F(t.Switch,`successDisabledColor`,r(vi,o?p(`palette-success-main`):t.success.main,.62)),F(t.Switch,`warningDisabledColor`,r(vi,o?p(`palette-warning-main`):t.warning.main,.62)),F(t.TableCell,`border`,r(vi,mi(o?p(`palette-divider`):t.divider,1),.88)),F(t.Tooltip,`bg`,r(mi,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){F(t.Alert,`errorColor`,r(vi,o?p(`palette-error-light`):t.error.light,.6)),F(t.Alert,`infoColor`,r(vi,o?p(`palette-info-light`):t.info.light,.6)),F(t.Alert,`successColor`,r(vi,o?p(`palette-success-light`):t.success.light,.6)),F(t.Alert,`warningColor`,r(vi,o?p(`palette-warning-light`):t.warning.light,.6)),F(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),F(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),F(t.Alert,`successFilledBg`,n(`palette-success-dark`)),F(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),F(t.Alert,`errorFilledColor`,mo(()=>t.getContrastText(t.error.dark))),F(t.Alert,`infoFilledColor`,mo(()=>t.getContrastText(t.info.dark))),F(t.Alert,`successFilledColor`,mo(()=>t.getContrastText(t.success.dark))),F(t.Alert,`warningFilledColor`,mo(()=>t.getContrastText(t.warning.dark))),F(t.Alert,`errorStandardBg`,r(gi,o?p(`palette-error-light`):t.error.light,.9)),F(t.Alert,`infoStandardBg`,r(gi,o?p(`palette-info-light`):t.info.light,.9)),F(t.Alert,`successStandardBg`,r(gi,o?p(`palette-success-light`):t.success.light,.9)),F(t.Alert,`warningStandardBg`,r(gi,o?p(`palette-warning-light`):t.warning.light,.9)),F(t.Alert,`errorIconColor`,n(`palette-error-main`)),F(t.Alert,`infoIconColor`,n(`palette-info-main`)),F(t.Alert,`successIconColor`,n(`palette-success-main`)),F(t.Alert,`warningIconColor`,n(`palette-warning-main`)),F(t.AppBar,`defaultBg`,n(`palette-grey-900`)),F(t.AppBar,`darkBg`,n(`palette-background-paper`)),F(t.AppBar,`darkColor`,n(`palette-text-primary`)),F(t.Avatar,`defaultBg`,n(`palette-grey-600`)),F(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),F(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),F(t.Chip,`defaultBorder`,n(`palette-grey-700`)),F(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),F(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),F(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),F(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),F(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),F(t.LinearProgress,`primaryBg`,r(gi,o?p(`palette-primary-main`):t.primary.main,.5)),F(t.LinearProgress,`secondaryBg`,r(gi,o?p(`palette-secondary-main`):t.secondary.main,.5)),F(t.LinearProgress,`errorBg`,r(gi,o?p(`palette-error-main`):t.error.main,.5)),F(t.LinearProgress,`infoBg`,r(gi,o?p(`palette-info-main`):t.info.main,.5)),F(t.LinearProgress,`successBg`,r(gi,o?p(`palette-success-main`):t.success.main,.5)),F(t.LinearProgress,`warningBg`,r(gi,o?p(`palette-warning-main`):t.warning.main,.5)),F(t.Skeleton,`bg`,x?r(mi,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),F(t.Slider,`primaryTrack`,r(gi,o?p(`palette-primary-main`):t.primary.main,.5)),F(t.Slider,`secondaryTrack`,r(gi,o?p(`palette-secondary-main`):t.secondary.main,.5)),F(t.Slider,`errorTrack`,r(gi,o?p(`palette-error-main`):t.error.main,.5)),F(t.Slider,`infoTrack`,r(gi,o?p(`palette-info-main`):t.info.main,.5)),F(t.Slider,`successTrack`,r(gi,o?p(`palette-success-main`):t.success.main,.5)),F(t.Slider,`warningTrack`,r(gi,o?p(`palette-warning-light`):t.warning.main,.5));let e=x?r(vi,o?p(`palette-background-default`):t.background.default,.985):bi(t.background.default,.98);F(t.SnackbarContent,`bg`,e),F(t.SnackbarContent,`color`,mo(()=>x?ya.text.primary:t.getContrastText(e))),F(t.SpeedDialAction,`fabHoverBg`,bi(t.background.paper,.15)),F(t.StepConnector,`border`,n(`palette-grey-600`)),F(t.StepContent,`border`,n(`palette-grey-600`)),F(t.Switch,`defaultColor`,n(`palette-grey-300`)),F(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),F(t.Switch,`primaryDisabledColor`,r(gi,o?p(`palette-primary-main`):t.primary.main,.55)),F(t.Switch,`secondaryDisabledColor`,r(gi,o?p(`palette-secondary-main`):t.secondary.main,.55)),F(t.Switch,`errorDisabledColor`,r(gi,o?p(`palette-error-main`):t.error.main,.55)),F(t.Switch,`infoDisabledColor`,r(gi,o?p(`palette-info-main`):t.info.main,.55)),F(t.Switch,`successDisabledColor`,r(gi,o?p(`palette-success-main`):t.success.main,.55)),F(t.Switch,`warningDisabledColor`,r(gi,o?p(`palette-warning-light`):t.warning.main,.55)),F(t.TableCell,`border`,r(gi,mi(o?p(`palette-divider`):t.divider,1),.68)),F(t.Tooltip,`bg`,r(mi,o?p(`palette-grey-700`):t.grey[700],.92))}o||(fo(t.background,`default`),fo(t.background,`paper`),fo(t.common,`background`),fo(t.common,`onBackground`),fo(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&F(t[e],`mainChannel`,ci(uo(n.main))),n.light&&F(t[e],`lightChannel`,ci(uo(n.light))),n.dark&&F(t[e],`darkChannel`,ci(uo(n.dark))),n.contrastText&&F(t[e],`contrastTextChannel`,ci(uo(n.contrastText))),e===`text`&&(fo(t[e],`primary`),fo(t[e],`secondary`)),e===`action`&&(n.active&&fo(t[e],`active`),n.selected&&fo(t[e],`selected`)))})}),C=t.reduce((e,t)=>D(e,t),C);let w={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:co(C),enableContrastVars:o},{vars:T,generateThemeVars:E,generateStyleSheets:ee}=sa(C,w);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=E,C.generateStyleSheets=ee,C.generateSpacing=function(){return kr(u.spacing,ve(this))},C.getColorSchemeSelector=ca(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...$e,...u?.unstable_sxConfig},C.unstable_sx=function(e){return rt({sx:e,theme:this})},C.toRuntimeSource=Xa,C}function vo(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ja({...n===!0?{}:n.palette,mode:t})})}function yo(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return eo(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=eo({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},vo(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},vo(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),_o({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var bo=yo(),xo=`$$material`;function So(){let e=Fr(bo);return e.$$material||e}function Co(e){return(0,P.jsx)(Lr,{...e,defaultTheme:bo,themeId:xo})}function wo(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var To=e=>wo(e)&&e!==`classes`,I=Zr({themeId:xo,defaultTheme:bo,rootShouldForwardProp:To});function Eo(e){return function(t){return(0,P.jsx)(Co,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function Do(){return at}var Oo=Hi;function ko(e){return Mi(e)}var L=x;function Ao(e){return typeof e.main==`string`}function jo(e,t=[]){if(!Ao(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Mo(e=[]){return([,t])=>t&&jo(t,e)}function No(e){return Vr(`MuiTypography`,e)}Hr(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`,`paragraph`]);var Po={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Fo=Do(),Io=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e;return y({root:[`root`,a,e.align!==`inherit`&&`align${L(t)}`,n&&`gutterBottom`,r&&`noWrap`,i&&`paragraph`]},No,o)},Lo=I(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${L(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Oo(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${L(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),Ro={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},zo=w.forwardRef(function(e,t){let{color:n,...r}=ko({props:e,name:`MuiTypography`}),i=!Po[n],a=Fo({...r,...i&&{color:n}}),{align:o=`inherit`,className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:d=!1,variant:f=`body1`,variantMapping:p=Ro,...m}=a,h={...a,align:o,color:n,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:d,variant:f,variantMapping:p},g=c||(d?`p`:p[f]||Ro[f])||`span`,_=Io(h);return(0,P.jsx)(Lo,{as:g,ref:t,className:v(_.root,s),...m,ownerState:h,style:{...o!==`inherit`&&{"--Typography-textAlign":o},...m.style}})});function Bo({theme:e,...t}){let n=`$$material`in e?e[xo]:void 0;return(0,P.jsx)(Bi,{...t,themeId:n?xo:void 0,theme:n||e})}var Vo={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:Ho,useColorScheme:Uo,getInitColorSchemeScript:Wo}=ta({themeId:xo,theme:()=>yo({cssVariables:!0}),colorSchemeStorageKey:Vo.colorSchemeStorageKey,modeStorageKey:Vo.modeStorageKey,defaultColorScheme:{light:Vo.defaultLightColorScheme,dark:Vo.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:La(e.palette,e.typography)};return t.unstable_sx=function(e){return rt({sx:e,theme:this})},t}}),Go=Ho;function Ko({theme:e,...t}){let n=w.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[xo]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,P.jsx)(Bo,{theme:n,...t}):(0,P.jsx)(Go,{theme:e,...t})}var qo=1,Jo=2,Yo=4,Xo=1,Zo=2,Qo=`Expected a function`,$o=4294967295,es=500,ts=9007199254740991,ns=`[object Arguments]`,rs=`[object Array]`,is=`[object ArrayBuffer]`,as=`[object AsyncFunction]`,ss=`[object Boolean]`,cs=`[object DataView]`,ls=`[object Date]`,us=`[object Error]`,ds=`[object Function]`,fs=`[object GeneratorFunction]`,ps=`[object Map]`,ms=`[object Number]`,hs=`[object Object]`,gs=`[object Proxy]`,_s=`[object RegExp]`,vs=`[object Set]`,ys=`[object String]`,bs=`[object Symbol]`,xs=new Set([`Float32`,`Float64`,`Int8`,`Int16`,`Int32`,`Uint8`,`Uint8Clamped`,`Uint16`,`Uint32`].map(e=>`[object ${e}Array]`)),Ss=new Set([ns,rs,is,ss,cs,ls,ps,ms,hs,_s,vs,ys,bs,...xs]),Cs=/\\(\\)?/g,ws=/\w*$/,Ts=/^[-+]0x[0-9a-f]+$/i,Es=/^0b[01]+$/i,Ds=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Os=/^0o[0-7]+$/i,ks=/^\w*$/,As=/^(?:0|[1-9]\d*)$/,js=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ms=/^\s+/,Ns=/\s/,Ps=Object.prototype,Fs=Ps.hasOwnProperty,Is=Ps.toString,Ls=Ps.propertyIsEnumerable,Rs=Function.prototype.toString,zs=Rs.call(Object),Bs=Symbol.prototype.toString,Vs=Symbol.prototype.valueOf;function Hs(e){return typeof e==`object`&&!!e}function Us(e,t){return e===t||e!==e&&t!==t}function Ws(e){let t=Fs.call(e,Symbol.toStringTag),n=e[Symbol.toStringTag],r=!1;try{e[Symbol.toStringTag]=void 0,r=!0}catch{}let i=Is.call(e);return r&&(t?e[Symbol.toStringTag]=n:delete e[Symbol.toStringTag]),i}function Gs(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Symbol.toStringTag in Object(e)?Ws(e):Is.call(e)}function Ks(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=ts}function qs(e,t){let n=typeof e,r=t??ts;return!!r&&(n==`number`||n!=`symbol`&&As.test(e))&&e>-1&&e%1==0&&e<r}function Js(e){return e!=null&&Ks(e.length)&&!vl(e)}function Ys(e){return Hs(e)&&Js(e)}function Xs(e){return Hs(e)&&Gs(e)==ns}function Zs(e){return Hs(e)&&Ks(e.length)&&xs.has(Gs(e))}function Qs(e){return typeof e==`symbol`||Hs(e)&&Gs(e)==bs}function $s(e){return Hs(e)&&Gs(e)==ps}function ec(e){return Hs(e)&&Gs(e)==vs}function tc(e){let t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Ps)}function nc(e){if(!Hs(e)||Gs(e)!=hs)return!1;let t=Object.getPrototypeOf(Object(e));if(t===null)return!0;let n=Fs.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Rs.call(n)==zs}function rc(e){let t=e.length;for(;t--&&Ns.test(e.charAt(t)););return t}function ic(e){return e&&e.slice(0,rc(e)+1).replace(Ms,``)}function ac(e){if(typeof e==`number`)return e;if(Qs(e))return NaN;if(yl(e)){let t=typeof e.valueOf==`function`?e.valueOf():e;e=yl(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;let t=ic(e),n=Es.test(t);return n||Os.test(t)?parseInt(t.slice(2),n?2:8):Ts.test(t)?NaN:+t}function oc(e){if(!e)return e===0?e:0;let t=ac(e);return t===1/0||t===-1/0?t<0?-Number.MAX_VALUE:Number.MAX_VALUE:t===t?t:0}function sc(e){let t=oc(e),n=t%1;return n?t-n:t}function cc(e){if(typeof e==`string`)return e;if(Array.isArray(e))return hc(e,cc)+``;if(Qs(e))return Bs.call(e);let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function lc(e){return e==null?``:cc(e)}function uc(e){if(typeof e==`string`||Qs(e))return e;let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function dc(e){return e}function fc(e){return typeof e==`function`?e:dc}function pc(e,t){let n=-1,r=e==null?0:e.length;for(;++n<r&&t(e[n],n,e)!==!1;);return e}function mc(e,t){let n=-1,r=e==null?0:e.length,i=[];for(;++n<r;){let r=e[n];t(r,n,e)&&i.push(r)}return i}function hc(e,t){let n=-1,r=e==null?0:e.length,i=Array(r);for(;++n<r;)i[n]=t(e[n],n,e);return i}function gc(e,t){let n=-1,{length:r}=t,i=e.length;for(;++n<r;)e[i+n]=t[n];return e}function _c(e,t){let n=-1,r=e==null?0:e.length;for(;++n<r;)if(t(e[n],n))return!0;return!1}function vc(e,t,n){let r=-1,{length:i}=e;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;let a=Array(i);for(;++r<i;)a[r]=e[r+t];return a}function yc(e,t){let n=-1,r=Array(e);for(;++n<e;)r[n]=t(n);return r}function bc(e,t){let n=-1,{length:r}=e,i=t||Array(r);for(;++n<r;)i[n]=e[n];return i}function xc(e){let t=e==null?0:e.length;return t?e[t-1]:void 0}function Sc(e){let t=-1,n=Array(e.size);return e.forEach(e=>{n[++t]=e}),n}function Cc(e){let t=-1,n=Array(e.size);return e.forEach((e,r)=>{n[++t]=[r,e]}),n}function wc(e,t){let n=Array.isArray(e),r=!n&&Xs(e),i=!n&&!r&&Zs(e),a=n||r||i,o=a?yc(e.length,String):[],{length:s}=o;for(let n in e)(t||Fs.call(e,n))&&!(a&&(n==`length`||i&&(n==`buffer`||n==`byteLength`||n==`byteOffset`)||qs(n,s)))&&o.push(n);return o}function Tc(e){if(!tc(e))return Object.keys(Object(e));let t=[];for(let n in Object(e))Fs.call(e,n)&&n!=`constructor`&&t.push(n);return t}function R(e){let t=[];if(e!=null)for(let n in Object(e))t.push(n);return t}function Ec(e){if(!yl(e))return R(e);let t=tc(e),n=[];for(let r in e)r==`constructor`&&(t||!Fs.call(e,r))||n.push(r);return n}function Dc(e){return Js(e)?wc(e,!1):Tc(e)}function Oc(e){return Js(e)?wc(e,!0):Ec(e)}function kc(e){if(e==null)return[];let t=Object(e);return Object.getOwnPropertySymbols(t).filter(e=>Ls.call(t,e))}function Ac(e){let t=[],n=e;for(;n;)gc(t,kc(n)),n=Object.getPrototypeOf(Object(n));return t}function jc(e){let t=Dc(e);return Array.isArray(e)?t:gc(t,kc(e))}function Mc(e){let t=Oc(e);return Array.isArray(e)?t:gc(t,Ac(e))}function Nc(e,t,n){t==`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Pc(e,t,n){let r=e[t];(!(Fs.call(e,t)&&Us(r,n))||n===void 0&&!(t in e))&&Nc(e,t,n)}function Fc(e,t,n){let r=!n,i=n||{},a=-1,{length:o}=t;for(;++a<o;){let n=t[a];r?Nc(i,n,e[n]):Pc(i,n,e[n])}return i}function Ic(e,t){return e&&Fc(t,Dc(t),e)}function Lc(e,t){return e&&Fc(t,Oc(t),e)}function Rc(e,t){return Fc(e,kc(e),t)}function zc(e,t){return Fc(e,Ac(e),t)}function Bc(e){return Array.isArray(e)||Xs(e)||!!(e&&e[Symbol.isConcatSpreadable])}function Vc(e,t,n=Bc,r=!1,i=[]){let a=-1,{length:o}=e;for(;++a<o;){let o=e[a];t>0&&n(o)?t>1?Vc(o,t-1,n,r,i):gc(i,o):r||(i[i.length]=o)}return i}function Hc(e){let t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(js,(e,n,r,i)=>(t.push(r?i.replace(Cs,`$1`):n||e),e)),t}var Uc=new Map;function Wc(e){Uc.size===es&&Uc.clear();let t=Uc.get(e);return t===void 0&&(t=Hc(e),Uc.set(e,t)),t}function Gc(e,t){if(Array.isArray(e))return!1;let n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Qs(e)?!0:ks.test(e)||!Ds.test(e)||t!=null&&e in Object(t)}function Kc(e,t){return Array.isArray(e)?e:Gc(e,t)?[e]:Wc(lc(e))}function qc(e,t){let n=Kc(t,e),r=0,{length:i}=n,a=e;for(;a!=null&&r<i;)a=a[uc(n[r++])];return r&&r==i?a:void 0}function Jc(e,t){return t.length<2?e:qc(e,vc(t,0,-1))}function Yc(e,t){let n=Kc(t,e),r=-1,{length:i}=n;if(!i)return!0;let a=e==null||typeof e!=`object`&&typeof e!=`function`;for(;++r<i;){let t=n[r];if(typeof t==`string`){if(t===`__proto__`&&!Fs.call(e,`__proto__`))return!1;if(t===`constructor`&&r+1<i&&typeof n[r+1]==`string`&&n[r+1]===`prototype`){if(a&&r===0)continue;return!1}}}let o=Jc(e,n);return o==null||delete o[uc(xc(n))]}function Xc(e){return t=>t?.[e]}function Zc(e,t){return e.byteLength==t.byteLength&&nl(new Uint8Array(e),new Uint8Array(t))}function Qc(e,t,n,r,i){let a=n&Xo,o=e.length,s=t.length;if(o!=s&&!(a&&s>o))return!1;let c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;let u=-1,d=!0,f=n&Zo?new Set:void 0;for(i.set(e,t),i.set(t,e);++u<o;){let o=e[u],s=t[u],c;if(r&&(c=a?r(s,o,u,t,e,i):r(o,s,u,e,t,i)),c!==void 0){if(c)continue;d=!1;break}if(f){if(!_c(t,(e,t)=>!f.has(t)&&(o===e||nl(o,e,n,r,i))?f.add(t):!1)){d=!1;break}}else if(!(o===s||nl(o,s,n,r,i))){d=!1;break}}return i.delete(e),i.delete(t),d}function $c(e,t,n,r,i,a){switch(n){case cs:return e.byteLength==t.byteLength&&e.byteOffset==t.byteOffset&&Zc(e.buffer,t.buffer);case is:return Zc(e,t);case ss:case ls:case ms:return Us(+e,+t);case us:return e.name==t.name&&e.message==t.message;case _s:case ys:return e==t+``;case ps:case vs:{let o=r&Xo;if(e.size!=t.size&&!o)return!1;let s=a.get(e);if(s)return s==t;let c=n==ps?Cc:Sc;a.set(e,t);let l=Qc(c(e),c(t),r|Zo,i,a);return a.delete(e),l}case bs:return Vs.call(e)==Vs.call(t)}return!1}function el(e,t,n,r,i){let a=n&Xo,o=jc(e),s=o.length;if(s!=jc(t).length&&!a)return!1;let c=s;for(;c--;){let e=o[c];if(!(a?e in t:Fs.call(t,e)))return!1}let l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;let d=!0;i.set(e,t),i.set(t,e);let f=!!a;for(;++c<s;){let s=o[c],l=e[s],u=t[s],p;if(r&&(p=a?r(u,l,s,t,e,i):r(l,u,s,e,t,i)),!(p===void 0?l===u||nl(l,u,n,r,i):p)){d=!1;break}f||=s==`constructor`}if(d&&!f){let n=e.constructor,r=t.constructor;n!=r&&`constructor`in e&&`constructor`in t&&!(typeof n==`function`&&n instanceof n&&typeof r==`function`&&r instanceof r)&&(d=!1)}return i.delete(e),i.delete(t),d}function tl(e,t,n,r,i){let a=Array.isArray(e),o=Array.isArray(t),s=a?rs:Gs(e),c=o?rs:Gs(t);s=s==ns?hs:s,c=c==ns?hs:c;let l=s==hs,u=s==c;return u&&!l?a||Zs(e)?Qc(e,t,n,r,i||new Map):$c(e,t,s,n,r,i||new Map):u?el(e,t,n,r,i||new Map):!1}function nl(e,t,n=0,r,i){return e===t?!0:e==null||t==null||!Hs(e)&&!Hs(t)?e!==e&&t!==t:tl(e,t,n,r,i)}function rl(e){return yl(e)?Object.create(e):{}}function il(e){let{length:t}=e,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Fs.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function al(e){return typeof e.constructor==`function`&&!tc(e)?rl(Object.getPrototypeOf(Object(e))):{}}function ol(e){let t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}function sl(e,t){let n=t?ol(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function cl(e,t,n){let r=e.constructor;switch(t){case is:return ol(e);case ss:case ls:return new r(+e);case cs:return new r(n?ol(e.buffer):e.buffer,e.byteOffset,e.byteLength);case ps:case vs:return new r;case ms:case ys:return new r(e);case _s:{let t=new r(e.source,ws.exec(e));return t.lastIndex=e.lastIndex,t}case bs:return Object(Vs.call(e))}return xs.has(t)?sl(e,n):void 0}function ll(e,t,n,r,i,a){let o,s=!!(t&qo),c=!!(t&Jo),l=!!(t&Yo);if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!yl(e))return e;let u=Array.isArray(e);if(u){if(o=il(e),!s)return bc(e,o)}else{let t=Gs(e),n=t==ds||t==fs;if(t==hs||t==ns||n&&!i){if(o=c||n?{}:al(e),!s)return c?zc(e,Lc(o,e)):Rc(e,Ic(o,e))}else{if(!Ss.has(t))return i?e:{};o=cl(e,t,s)}}let d=a||new Map,f=d.get(e);if(f)return f;d.set(e,o),ec(e)?e.forEach(r=>{o.add(ll(r,t,n,r,e,d))}):$s(e)&&e.forEach((r,i)=>{o.set(i,ll(r,t,n,i,e,d))});let p=u?void 0:(l?c?Mc:jc:c?Oc:Dc)(e);return pc(p||e,(r,i)=>{let a=i,s=r;p&&(a=r,s=e[a]),Pc(o,a,ll(s,t,n,a,e,d))}),o}function ul(e){return nc(e)?void 0:e}function dl(e){if(!(e&&e.length))return[];let t=0,n=mc(e,e=>Ys(e)?(t=Math.max(e.length,t),!0):!1);return yc(t,e=>hc(n,Xc(e)))}function fl(e){let t=-1,n=e==null?0:e.length,r=[];for(;++t<n;){let n=e[t];n&&r.push(n)}return r}function pl(e,t,n){let r,i,a=0,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Qo);let p=ac(t)||0;yl(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Math.max(ac(n.maxWait)||0,p):a,f=`trailing`in n?!!n.trailing:f);let m=t=>{let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o},h=e=>{let t=e-c,n=e-l,r=p-t;return d?Math.min(r,a-n):r},g=e=>{let t=e-c,n=e-l;return c===void 0||t>=p||t<0||d&&n>=a},_=e=>(s=void 0,f&&r?m(e):(r=i=void 0,o)),v=()=>{let e=Date.now();if(g(e)){_(e);return}s=setTimeout(v,h(e))},y=e=>(l=e,s=setTimeout(v,p),u?m(e):o),b=function(...e){let t=Date.now(),n=g(t);if(r=e,i=this,c=t,n){if(s===void 0)return y(c);if(d)return clearTimeout(s),s=setTimeout(v,p),m(c)}return s===void 0&&(s=setTimeout(v,p)),o};return b.cancel=()=>{s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0},b.flush=()=>s===void 0?o:_(Date.now()),b}function ml(e){return e!=null&&e.length?Vc(e,1):[]}function hl(e,t,n){let r=e==null?void 0:qc(e,t);return r===void 0?n:r}function gl(e){if(e==null)return!0;if(Js(e)&&(Array.isArray(e)||typeof e==`string`||typeof e.splice==`function`||Zs(e)||Xs(e)))return!e.length;let t=Gs(e);if(t==ps||t==vs)return!e.size;if(tc(e))return!Tc(e).length;for(let t in e)if(Fs.call(e,t))return!1;return!0}function _l(e,t){return nl(e,t)}function vl(e){if(!yl(e))return!1;let t=Gs(e);return t==ds||t==fs||t==as||t==gs}function yl(e){let t=typeof e;return e!=null&&(t==`object`||t==`function`)}function bl(e,...t){let n={};if(e==null)return n;let r=!1,i=hc(ml(t),t=>{let n=Kc(t,e);return r||=n.length>1,n});Fc(e,Mc(e),n),r&&(n=ll(n,7,ul));let a=i.length;for(;a--;)Yc(n,i[a]);return n}function xl(e,t){let n=sc(e);if(n<1||n>ts)return[];let r=$o,i=Math.min(n,$o),a=fc(t);n-=$o;let o=yc(i,a);for(;++r<n;)a(r);return o}function Sl(...e){return dl(e)}function Cl(e){this.content=e}Cl.prototype={constructor:Cl,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Cl(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Cl(n)},addToStart:function(e,t){return new Cl([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Cl(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Cl(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Cl.from(e),e.size?new Cl(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Cl.from(e),e.size?new Cl(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Cl.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Cl.from=function(e){if(e instanceof Cl)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Cl(t)};function wl(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&Dl(e.charCodeAt(r-1))&&El(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=wl(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Tl(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&Dl(e.charCodeAt(i-1))&&El(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=Tl(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}function El(e){return e>=56320&&e<57344}function Dl(e){return e>=55296&&e<56320}var z=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return wl(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Tl(this,e,t,n)}findIndex(e){if(e==0)return kl(0,e);if(e==this.size)return kl(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?kl(t+1,i):kl(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};z.empty=new z([],0);var Ol={index:0,offset:0};function kl(e,t){return Ol.index=e,Ol.offset=t,Ol}function Al(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Al(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Al(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var jl=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Al(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};jl.none=[];var Ml=class extends Error{},B=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Pl(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Nl(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(z.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};B.empty=new B(z.empty,0,0);function Nl(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(Nl(a.content,t-i-1,n-i-1)))}function Pl(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=Pl(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function Fl(e,t,n){if(n.openStart>e.depth)throw new Ml(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ml(`Inconsistent open depths`);return Il(e,t,n,0)}function Il(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Il(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return Vl(a,Ul(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Vl(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=Wl(n,e);return Vl(a,Hl(e,i,o,t,r))}}function Ll(e,t){if(!t.type.compatibleContent(e.type))throw new Ml(`Cannot join `+t.type.name+` onto `+e.type.name)}function Rl(e,t,n){let r=e.node(n);return Ll(r,t.node(n)),r}function zl(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Bl(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(zl(e.nodeAfter,r),a++));for(let e=a;e<o;e++)zl(i.child(e),r);t&&t.depth==n&&t.textOffset&&zl(t.nodeBefore,r)}function Vl(e,t){if(!e.type.validContent(t))throw new Ml(`Invalid content for node `+e.type.name);return e.copy(t)}function Hl(e,t,n,r,i){let a=e.depth>i&&Rl(e,t,i+1),o=r.depth>i&&Rl(n,r,i+1),s=[];return Bl(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Ll(a,o),zl(Vl(a,Hl(e,t,n,r,i+1)),s)):(a&&zl(Vl(a,Ul(e,t,i+1)),s),Bl(t,n,i,s),o&&zl(Vl(o,Ul(n,r,i+1)),s)),Bl(r,null,i,s),new z(s)}function Ul(e,t,n){let r=[];return Bl(null,e,n,r),e.depth>n&&zl(Vl(Rl(e,t,n+1),Ul(e,t,n+1)),r),Bl(t,null,n,r),new z(r)}function Wl(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(z.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var Gl=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return jl.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Yl(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=Jl.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else Jl.set(t,r=new Kl);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%ql,i}},Kl=class{constructor(){this.elts=[],this.i=0}},ql=12,Jl=new WeakMap,Yl=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Xl=Object.create(null),Zl=class e{constructor(e,t,n,r=jl.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||z.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Al(this.attrs,t||e.defaultAttrs||Xl)&&jl.sameSet(this.marks,n||jl.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return B.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new B(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return Fl(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Gl.resolveCached(this,e)}resolveNoCache(e){return Gl.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),$l(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=z.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),eu(this.type.attrs,this.attrs,`node`,this.type.name);let e=jl.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];eu(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!jl.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=z.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Zl.prototype.text=void 0;var Ql=class e extends Zl{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):$l(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function $l(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function eu(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var tu=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new nu(t,n);if(r.next==null)return e.empty;let i=ru(r);r.next&&r.err(`Unexpected trailing text`);let a=pu(uu(i));return mu(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return z.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
36
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function po(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var mo=e=>{try{return e()}catch{}},ho=(e=`mui`)=>na(e);function go(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=ao({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=eo({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...ro(a),...n?.opacity},overlays:n?.overlays||io(a)},s}function _o(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=oo,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=ho(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(b(21,f));let x;o&&(x=`oklch`);let S=go(x,v,y,u,f);h&&!v.light&&go(x,v,h,void 0,`light`),g&&!v.dark&&go(x,v,g,void 0,`dark`);let C={defaultColorScheme:f,...S,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...Ma(S.typography),...S.font},spacing:po(u.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(F(t.common,`background`,`#fff`),F(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(F(t.common,`background`,`#000`),F(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===mi&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===gi&&(r=`#000 ${(n*100).toFixed(0)}%`),e===vi&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(lo(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){F(t.Alert,`errorColor`,r(gi,o?p(`palette-error-light`):t.error.light,.6)),F(t.Alert,`infoColor`,r(gi,o?p(`palette-info-light`):t.info.light,.6)),F(t.Alert,`successColor`,r(gi,o?p(`palette-success-light`):t.success.light,.6)),F(t.Alert,`warningColor`,r(gi,o?p(`palette-warning-light`):t.warning.light,.6)),F(t.Alert,`errorFilledBg`,n(`palette-error-main`)),F(t.Alert,`infoFilledBg`,n(`palette-info-main`)),F(t.Alert,`successFilledBg`,n(`palette-success-main`)),F(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),F(t.Alert,`errorFilledColor`,mo(()=>t.getContrastText(t.error.main))),F(t.Alert,`infoFilledColor`,mo(()=>t.getContrastText(t.info.main))),F(t.Alert,`successFilledColor`,mo(()=>t.getContrastText(t.success.main))),F(t.Alert,`warningFilledColor`,mo(()=>t.getContrastText(t.warning.main))),F(t.Alert,`errorStandardBg`,r(vi,o?p(`palette-error-light`):t.error.light,.9)),F(t.Alert,`infoStandardBg`,r(vi,o?p(`palette-info-light`):t.info.light,.9)),F(t.Alert,`successStandardBg`,r(vi,o?p(`palette-success-light`):t.success.light,.9)),F(t.Alert,`warningStandardBg`,r(vi,o?p(`palette-warning-light`):t.warning.light,.9)),F(t.Alert,`errorIconColor`,n(`palette-error-main`)),F(t.Alert,`infoIconColor`,n(`palette-info-main`)),F(t.Alert,`successIconColor`,n(`palette-success-main`)),F(t.Alert,`warningIconColor`,n(`palette-warning-main`)),F(t.AppBar,`defaultBg`,n(`palette-grey-100`)),F(t.Avatar,`defaultBg`,n(`palette-grey-400`)),F(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),F(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),F(t.Chip,`defaultBorder`,n(`palette-grey-400`)),F(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),F(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),F(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),F(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),F(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),F(t.LinearProgress,`primaryBg`,r(vi,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.LinearProgress,`secondaryBg`,r(vi,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.LinearProgress,`errorBg`,r(vi,o?p(`palette-error-main`):t.error.main,.62)),F(t.LinearProgress,`infoBg`,r(vi,o?p(`palette-info-main`):t.info.main,.62)),F(t.LinearProgress,`successBg`,r(vi,o?p(`palette-success-main`):t.success.main,.62)),F(t.LinearProgress,`warningBg`,r(vi,o?p(`palette-warning-light`):t.warning.main,.62)),F(t.Skeleton,`bg`,x?r(mi,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),F(t.Slider,`primaryTrack`,r(vi,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.Slider,`secondaryTrack`,r(vi,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.Slider,`errorTrack`,r(vi,o?p(`palette-error-main`):t.error.main,.62)),F(t.Slider,`infoTrack`,r(vi,o?p(`palette-info-main`):t.info.main,.62)),F(t.Slider,`successTrack`,r(vi,o?p(`palette-success-main`):t.success.main,.62)),F(t.Slider,`warningTrack`,r(vi,o?p(`palette-warning-main`):t.warning.main,.62));let e=x?r(gi,o?p(`palette-background-default`):t.background.default,.6825):bi(t.background.default,.8);F(t.SnackbarContent,`bg`,e),F(t.SnackbarContent,`color`,mo(()=>x?xa.text.primary:t.getContrastText(e))),F(t.SpeedDialAction,`fabHoverBg`,bi(t.background.paper,.15)),F(t.StepConnector,`border`,n(`palette-grey-400`)),F(t.StepContent,`border`,n(`palette-grey-400`)),F(t.Switch,`defaultColor`,n(`palette-common-white`)),F(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),F(t.Switch,`primaryDisabledColor`,r(vi,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.Switch,`secondaryDisabledColor`,r(vi,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.Switch,`errorDisabledColor`,r(vi,o?p(`palette-error-main`):t.error.main,.62)),F(t.Switch,`infoDisabledColor`,r(vi,o?p(`palette-info-main`):t.info.main,.62)),F(t.Switch,`successDisabledColor`,r(vi,o?p(`palette-success-main`):t.success.main,.62)),F(t.Switch,`warningDisabledColor`,r(vi,o?p(`palette-warning-main`):t.warning.main,.62)),F(t.TableCell,`border`,r(vi,mi(o?p(`palette-divider`):t.divider,1),.88)),F(t.Tooltip,`bg`,r(mi,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){F(t.Alert,`errorColor`,r(vi,o?p(`palette-error-light`):t.error.light,.6)),F(t.Alert,`infoColor`,r(vi,o?p(`palette-info-light`):t.info.light,.6)),F(t.Alert,`successColor`,r(vi,o?p(`palette-success-light`):t.success.light,.6)),F(t.Alert,`warningColor`,r(vi,o?p(`palette-warning-light`):t.warning.light,.6)),F(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),F(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),F(t.Alert,`successFilledBg`,n(`palette-success-dark`)),F(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),F(t.Alert,`errorFilledColor`,mo(()=>t.getContrastText(t.error.dark))),F(t.Alert,`infoFilledColor`,mo(()=>t.getContrastText(t.info.dark))),F(t.Alert,`successFilledColor`,mo(()=>t.getContrastText(t.success.dark))),F(t.Alert,`warningFilledColor`,mo(()=>t.getContrastText(t.warning.dark))),F(t.Alert,`errorStandardBg`,r(gi,o?p(`palette-error-light`):t.error.light,.9)),F(t.Alert,`infoStandardBg`,r(gi,o?p(`palette-info-light`):t.info.light,.9)),F(t.Alert,`successStandardBg`,r(gi,o?p(`palette-success-light`):t.success.light,.9)),F(t.Alert,`warningStandardBg`,r(gi,o?p(`palette-warning-light`):t.warning.light,.9)),F(t.Alert,`errorIconColor`,n(`palette-error-main`)),F(t.Alert,`infoIconColor`,n(`palette-info-main`)),F(t.Alert,`successIconColor`,n(`palette-success-main`)),F(t.Alert,`warningIconColor`,n(`palette-warning-main`)),F(t.AppBar,`defaultBg`,n(`palette-grey-900`)),F(t.AppBar,`darkBg`,n(`palette-background-paper`)),F(t.AppBar,`darkColor`,n(`palette-text-primary`)),F(t.Avatar,`defaultBg`,n(`palette-grey-600`)),F(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),F(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),F(t.Chip,`defaultBorder`,n(`palette-grey-700`)),F(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),F(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),F(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),F(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),F(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),F(t.LinearProgress,`primaryBg`,r(gi,o?p(`palette-primary-main`):t.primary.main,.5)),F(t.LinearProgress,`secondaryBg`,r(gi,o?p(`palette-secondary-main`):t.secondary.main,.5)),F(t.LinearProgress,`errorBg`,r(gi,o?p(`palette-error-main`):t.error.main,.5)),F(t.LinearProgress,`infoBg`,r(gi,o?p(`palette-info-main`):t.info.main,.5)),F(t.LinearProgress,`successBg`,r(gi,o?p(`palette-success-main`):t.success.main,.5)),F(t.LinearProgress,`warningBg`,r(gi,o?p(`palette-warning-main`):t.warning.main,.5)),F(t.Skeleton,`bg`,x?r(mi,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),F(t.Slider,`primaryTrack`,r(gi,o?p(`palette-primary-main`):t.primary.main,.5)),F(t.Slider,`secondaryTrack`,r(gi,o?p(`palette-secondary-main`):t.secondary.main,.5)),F(t.Slider,`errorTrack`,r(gi,o?p(`palette-error-main`):t.error.main,.5)),F(t.Slider,`infoTrack`,r(gi,o?p(`palette-info-main`):t.info.main,.5)),F(t.Slider,`successTrack`,r(gi,o?p(`palette-success-main`):t.success.main,.5)),F(t.Slider,`warningTrack`,r(gi,o?p(`palette-warning-light`):t.warning.main,.5));let e=x?r(vi,o?p(`palette-background-default`):t.background.default,.985):bi(t.background.default,.98);F(t.SnackbarContent,`bg`,e),F(t.SnackbarContent,`color`,mo(()=>x?ya.text.primary:t.getContrastText(e))),F(t.SpeedDialAction,`fabHoverBg`,bi(t.background.paper,.15)),F(t.StepConnector,`border`,n(`palette-grey-600`)),F(t.StepContent,`border`,n(`palette-grey-600`)),F(t.Switch,`defaultColor`,n(`palette-grey-300`)),F(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),F(t.Switch,`primaryDisabledColor`,r(gi,o?p(`palette-primary-main`):t.primary.main,.55)),F(t.Switch,`secondaryDisabledColor`,r(gi,o?p(`palette-secondary-main`):t.secondary.main,.55)),F(t.Switch,`errorDisabledColor`,r(gi,o?p(`palette-error-main`):t.error.main,.55)),F(t.Switch,`infoDisabledColor`,r(gi,o?p(`palette-info-main`):t.info.main,.55)),F(t.Switch,`successDisabledColor`,r(gi,o?p(`palette-success-main`):t.success.main,.55)),F(t.Switch,`warningDisabledColor`,r(gi,o?p(`palette-warning-light`):t.warning.main,.55)),F(t.TableCell,`border`,r(gi,mi(o?p(`palette-divider`):t.divider,1),.68)),F(t.Tooltip,`bg`,r(mi,o?p(`palette-grey-700`):t.grey[700],.92))}o||(fo(t.background,`default`),fo(t.background,`paper`),fo(t.common,`background`),fo(t.common,`onBackground`),fo(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&F(t[e],`mainChannel`,ci(uo(n.main))),n.light&&F(t[e],`lightChannel`,ci(uo(n.light))),n.dark&&F(t[e],`darkChannel`,ci(uo(n.dark))),n.contrastText&&F(t[e],`contrastTextChannel`,ci(uo(n.contrastText))),e===`text`&&(fo(t[e],`primary`),fo(t[e],`secondary`)),e===`action`&&(n.active&&fo(t[e],`active`),n.selected&&fo(t[e],`selected`)))})}),C=t.reduce((e,t)=>D(e,t),C);let w={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:co(C),enableContrastVars:o},{vars:T,generateThemeVars:E,generateStyleSheets:ee}=sa(C,w);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=E,C.generateStyleSheets=ee,C.generateSpacing=function(){return kr(u.spacing,N(this))},C.getColorSchemeSelector=ca(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...$e,...u?.unstable_sxConfig},C.unstable_sx=function(e){return rt({sx:e,theme:this})},C.toRuntimeSource=Xa,C}function vo(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ja({...n===!0?{}:n.palette,mode:t})})}function yo(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return eo(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=eo({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},vo(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},vo(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),_o({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var bo=yo(),xo=`$$material`;function So(){let e=Fr(bo);return e.$$material||e}function Co(e){return(0,P.jsx)(Lr,{...e,defaultTheme:bo,themeId:xo})}function wo(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var To=e=>wo(e)&&e!==`classes`,I=Zr({themeId:xo,defaultTheme:bo,rootShouldForwardProp:To});function Eo(e){return function(t){return(0,P.jsx)(Co,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function Do(){return at}var Oo=Hi;function ko(e){return Mi(e)}var L=x;function Ao(e){return typeof e.main==`string`}function jo(e,t=[]){if(!Ao(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Mo(e=[]){return([,t])=>t&&jo(t,e)}function No(e){return Vr(`MuiTypography`,e)}Hr(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`,`paragraph`]);var Po={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Fo=Do(),Io=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e;return y({root:[`root`,a,e.align!==`inherit`&&`align${L(t)}`,n&&`gutterBottom`,r&&`noWrap`,i&&`paragraph`]},No,o)},Lo=I(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${L(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Oo(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${L(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),Ro={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},zo=w.forwardRef(function(e,t){let{color:n,...r}=ko({props:e,name:`MuiTypography`}),i=!Po[n],a=Fo({...r,...i&&{color:n}}),{align:o=`inherit`,className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:d=!1,variant:f=`body1`,variantMapping:p=Ro,...m}=a,h={...a,align:o,color:n,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:d,variant:f,variantMapping:p},g=c||(d?`p`:p[f]||Ro[f])||`span`,_=Io(h);return(0,P.jsx)(Lo,{as:g,ref:t,className:v(_.root,s),...m,ownerState:h,style:{...o!==`inherit`&&{"--Typography-textAlign":o},...m.style}})});function Bo({theme:e,...t}){let n=`$$material`in e?e[xo]:void 0;return(0,P.jsx)(Bi,{...t,themeId:n?xo:void 0,theme:n||e})}var Vo={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:Ho,useColorScheme:Uo,getInitColorSchemeScript:Wo}=ta({themeId:xo,theme:()=>yo({cssVariables:!0}),colorSchemeStorageKey:Vo.colorSchemeStorageKey,modeStorageKey:Vo.modeStorageKey,defaultColorScheme:{light:Vo.defaultLightColorScheme,dark:Vo.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:La(e.palette,e.typography)};return t.unstable_sx=function(e){return rt({sx:e,theme:this})},t}}),Go=Ho;function Ko({theme:e,...t}){let n=w.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[xo]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,P.jsx)(Bo,{theme:n,...t}):(0,P.jsx)(Go,{theme:e,...t})}var qo=1,Jo=2,Yo=4,Xo=1,Zo=2,Qo=`Expected a function`,$o=4294967295,es=500,ts=9007199254740991,ns=`[object Arguments]`,rs=`[object Array]`,is=`[object ArrayBuffer]`,as=`[object AsyncFunction]`,ss=`[object Boolean]`,cs=`[object DataView]`,ls=`[object Date]`,us=`[object Error]`,ds=`[object Function]`,fs=`[object GeneratorFunction]`,ps=`[object Map]`,ms=`[object Number]`,hs=`[object Object]`,gs=`[object Proxy]`,_s=`[object RegExp]`,vs=`[object Set]`,ys=`[object String]`,bs=`[object Symbol]`,xs=new Set([`Float32`,`Float64`,`Int8`,`Int16`,`Int32`,`Uint8`,`Uint8Clamped`,`Uint16`,`Uint32`].map(e=>`[object ${e}Array]`)),Ss=new Set([ns,rs,is,ss,cs,ls,ps,ms,hs,_s,vs,ys,bs,...xs]),Cs=/\\(\\)?/g,ws=/\w*$/,Ts=/^[-+]0x[0-9a-f]+$/i,Es=/^0b[01]+$/i,Ds=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Os=/^0o[0-7]+$/i,ks=/^\w*$/,As=/^(?:0|[1-9]\d*)$/,js=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ms=/^\s+/,Ns=/\s/,Ps=Object.prototype,Fs=Ps.hasOwnProperty,Is=Ps.toString,Ls=Ps.propertyIsEnumerable,Rs=Function.prototype.toString,zs=Rs.call(Object),Bs=Symbol.prototype.toString,Vs=Symbol.prototype.valueOf;function Hs(e){return typeof e==`object`&&!!e}function Us(e,t){return e===t||e!==e&&t!==t}function Ws(e){let t=Fs.call(e,Symbol.toStringTag),n=e[Symbol.toStringTag],r=!1;try{e[Symbol.toStringTag]=void 0,r=!0}catch{}let i=Is.call(e);return r&&(t?e[Symbol.toStringTag]=n:delete e[Symbol.toStringTag]),i}function Gs(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Symbol.toStringTag in Object(e)?Ws(e):Is.call(e)}function Ks(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=ts}function qs(e,t){let n=typeof e,r=t??ts;return!!r&&(n==`number`||n!=`symbol`&&As.test(e))&&e>-1&&e%1==0&&e<r}function Js(e){return e!=null&&Ks(e.length)&&!vl(e)}function Ys(e){return Hs(e)&&Js(e)}function Xs(e){return Hs(e)&&Gs(e)==ns}function Zs(e){return Hs(e)&&Ks(e.length)&&xs.has(Gs(e))}function Qs(e){return typeof e==`symbol`||Hs(e)&&Gs(e)==bs}function $s(e){return Hs(e)&&Gs(e)==ps}function ec(e){return Hs(e)&&Gs(e)==vs}function tc(e){let t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Ps)}function nc(e){if(!Hs(e)||Gs(e)!=hs)return!1;let t=Object.getPrototypeOf(Object(e));if(t===null)return!0;let n=Fs.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Rs.call(n)==zs}function rc(e){let t=e.length;for(;t--&&Ns.test(e.charAt(t)););return t}function ic(e){return e&&e.slice(0,rc(e)+1).replace(Ms,``)}function ac(e){if(typeof e==`number`)return e;if(Qs(e))return NaN;if(yl(e)){let t=typeof e.valueOf==`function`?e.valueOf():e;e=yl(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;let t=ic(e),n=Es.test(t);return n||Os.test(t)?parseInt(t.slice(2),n?2:8):Ts.test(t)?NaN:+t}function oc(e){if(!e)return e===0?e:0;let t=ac(e);return t===1/0||t===-1/0?t<0?-Number.MAX_VALUE:Number.MAX_VALUE:t===t?t:0}function sc(e){let t=oc(e),n=t%1;return n?t-n:t}function cc(e){if(typeof e==`string`)return e;if(Array.isArray(e))return hc(e,cc)+``;if(Qs(e))return Bs.call(e);let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function lc(e){return e==null?``:cc(e)}function uc(e){if(typeof e==`string`||Qs(e))return e;let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function dc(e){return e}function fc(e){return typeof e==`function`?e:dc}function pc(e,t){let n=-1,r=e==null?0:e.length;for(;++n<r&&t(e[n],n,e)!==!1;);return e}function mc(e,t){let n=-1,r=e==null?0:e.length,i=[];for(;++n<r;){let r=e[n];t(r,n,e)&&i.push(r)}return i}function hc(e,t){let n=-1,r=e==null?0:e.length,i=Array(r);for(;++n<r;)i[n]=t(e[n],n,e);return i}function gc(e,t){let n=-1,{length:r}=t,i=e.length;for(;++n<r;)e[i+n]=t[n];return e}function _c(e,t){let n=-1,r=e==null?0:e.length;for(;++n<r;)if(t(e[n],n))return!0;return!1}function vc(e,t,n){let r=-1,{length:i}=e;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;let a=Array(i);for(;++r<i;)a[r]=e[r+t];return a}function yc(e,t){let n=-1,r=Array(e);for(;++n<e;)r[n]=t(n);return r}function bc(e,t){let n=-1,{length:r}=e,i=t||Array(r);for(;++n<r;)i[n]=e[n];return i}function xc(e){let t=e==null?0:e.length;return t?e[t-1]:void 0}function Sc(e){let t=-1,n=Array(e.size);return e.forEach(e=>{n[++t]=e}),n}function Cc(e){let t=-1,n=Array(e.size);return e.forEach((e,r)=>{n[++t]=[r,e]}),n}function wc(e,t){let n=Array.isArray(e),r=!n&&Xs(e),i=!n&&!r&&Zs(e),a=n||r||i,o=a?yc(e.length,String):[],{length:s}=o;for(let n in e)(t||Fs.call(e,n))&&!(a&&(n==`length`||i&&(n==`buffer`||n==`byteLength`||n==`byteOffset`)||qs(n,s)))&&o.push(n);return o}function Tc(e){if(!tc(e))return Object.keys(Object(e));let t=[];for(let n in Object(e))Fs.call(e,n)&&n!=`constructor`&&t.push(n);return t}function R(e){let t=[];if(e!=null)for(let n in Object(e))t.push(n);return t}function Ec(e){if(!yl(e))return R(e);let t=tc(e),n=[];for(let r in e)r==`constructor`&&(t||!Fs.call(e,r))||n.push(r);return n}function Dc(e){return Js(e)?wc(e,!1):Tc(e)}function Oc(e){return Js(e)?wc(e,!0):Ec(e)}function kc(e){if(e==null)return[];let t=Object(e);return Object.getOwnPropertySymbols(t).filter(e=>Ls.call(t,e))}function Ac(e){let t=[],n=e;for(;n;)gc(t,kc(n)),n=Object.getPrototypeOf(Object(n));return t}function jc(e){let t=Dc(e);return Array.isArray(e)?t:gc(t,kc(e))}function Mc(e){let t=Oc(e);return Array.isArray(e)?t:gc(t,Ac(e))}function Nc(e,t,n){t==`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Pc(e,t,n){let r=e[t];(!(Fs.call(e,t)&&Us(r,n))||n===void 0&&!(t in e))&&Nc(e,t,n)}function Fc(e,t,n){let r=!n,i=n||{},a=-1,{length:o}=t;for(;++a<o;){let n=t[a];r?Nc(i,n,e[n]):Pc(i,n,e[n])}return i}function Ic(e,t){return e&&Fc(t,Dc(t),e)}function Lc(e,t){return e&&Fc(t,Oc(t),e)}function Rc(e,t){return Fc(e,kc(e),t)}function zc(e,t){return Fc(e,Ac(e),t)}function Bc(e){return Array.isArray(e)||Xs(e)||!!(e&&e[Symbol.isConcatSpreadable])}function Vc(e,t,n=Bc,r=!1,i=[]){let a=-1,{length:o}=e;for(;++a<o;){let o=e[a];t>0&&n(o)?t>1?Vc(o,t-1,n,r,i):gc(i,o):r||(i[i.length]=o)}return i}function Hc(e){let t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(js,(e,n,r,i)=>(t.push(r?i.replace(Cs,`$1`):n||e),e)),t}var Uc=new Map;function Wc(e){Uc.size===es&&Uc.clear();let t=Uc.get(e);return t===void 0&&(t=Hc(e),Uc.set(e,t)),t}function Gc(e,t){if(Array.isArray(e))return!1;let n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Qs(e)?!0:ks.test(e)||!Ds.test(e)||t!=null&&e in Object(t)}function Kc(e,t){return Array.isArray(e)?e:Gc(e,t)?[e]:Wc(lc(e))}function qc(e,t){let n=Kc(t,e),r=0,{length:i}=n,a=e;for(;a!=null&&r<i;)a=a[uc(n[r++])];return r&&r==i?a:void 0}function Jc(e,t){return t.length<2?e:qc(e,vc(t,0,-1))}function Yc(e,t){let n=Kc(t,e),r=-1,{length:i}=n;if(!i)return!0;let a=e==null||typeof e!=`object`&&typeof e!=`function`;for(;++r<i;){let t=n[r];if(typeof t==`string`){if(t===`__proto__`&&!Fs.call(e,`__proto__`))return!1;if(t===`constructor`&&r+1<i&&typeof n[r+1]==`string`&&n[r+1]===`prototype`){if(a&&r===0)continue;return!1}}}let o=Jc(e,n);return o==null||delete o[uc(xc(n))]}function Xc(e){return t=>t?.[e]}function Zc(e,t){return e.byteLength==t.byteLength&&nl(new Uint8Array(e),new Uint8Array(t))}function Qc(e,t,n,r,i){let a=n&Xo,o=e.length,s=t.length;if(o!=s&&!(a&&s>o))return!1;let c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;let u=-1,d=!0,f=n&Zo?new Set:void 0;for(i.set(e,t),i.set(t,e);++u<o;){let o=e[u],s=t[u],c;if(r&&(c=a?r(s,o,u,t,e,i):r(o,s,u,e,t,i)),c!==void 0){if(c)continue;d=!1;break}if(f){if(!_c(t,(e,t)=>!f.has(t)&&(o===e||nl(o,e,n,r,i))?f.add(t):!1)){d=!1;break}}else if(!(o===s||nl(o,s,n,r,i))){d=!1;break}}return i.delete(e),i.delete(t),d}function $c(e,t,n,r,i,a){switch(n){case cs:return e.byteLength==t.byteLength&&e.byteOffset==t.byteOffset&&Zc(e.buffer,t.buffer);case is:return Zc(e,t);case ss:case ls:case ms:return Us(+e,+t);case us:return e.name==t.name&&e.message==t.message;case _s:case ys:return e==t+``;case ps:case vs:{let o=r&Xo;if(e.size!=t.size&&!o)return!1;let s=a.get(e);if(s)return s==t;let c=n==ps?Cc:Sc;a.set(e,t);let l=Qc(c(e),c(t),r|Zo,i,a);return a.delete(e),l}case bs:return Vs.call(e)==Vs.call(t)}return!1}function el(e,t,n,r,i){let a=n&Xo,o=jc(e),s=o.length;if(s!=jc(t).length&&!a)return!1;let c=s;for(;c--;){let e=o[c];if(!(a?e in t:Fs.call(t,e)))return!1}let l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;let d=!0;i.set(e,t),i.set(t,e);let f=!!a;for(;++c<s;){let s=o[c],l=e[s],u=t[s],p;if(r&&(p=a?r(u,l,s,t,e,i):r(l,u,s,e,t,i)),!(p===void 0?l===u||nl(l,u,n,r,i):p)){d=!1;break}f||=s==`constructor`}if(d&&!f){let n=e.constructor,r=t.constructor;n!=r&&`constructor`in e&&`constructor`in t&&!(typeof n==`function`&&n instanceof n&&typeof r==`function`&&r instanceof r)&&(d=!1)}return i.delete(e),i.delete(t),d}function tl(e,t,n,r,i){let a=Array.isArray(e),o=Array.isArray(t),s=a?rs:Gs(e),c=o?rs:Gs(t);s=s==ns?hs:s,c=c==ns?hs:c;let l=s==hs,u=s==c;return u&&!l?a||Zs(e)?Qc(e,t,n,r,i||new Map):$c(e,t,s,n,r,i||new Map):u?el(e,t,n,r,i||new Map):!1}function nl(e,t,n=0,r,i){return e===t?!0:e==null||t==null||!Hs(e)&&!Hs(t)?e!==e&&t!==t:tl(e,t,n,r,i)}function rl(e){return yl(e)?Object.create(e):{}}function il(e){let{length:t}=e,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Fs.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function al(e){return typeof e.constructor==`function`&&!tc(e)?rl(Object.getPrototypeOf(Object(e))):{}}function ol(e){let t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}function sl(e,t){let n=t?ol(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function cl(e,t,n){let r=e.constructor;switch(t){case is:return ol(e);case ss:case ls:return new r(+e);case cs:return new r(n?ol(e.buffer):e.buffer,e.byteOffset,e.byteLength);case ps:case vs:return new r;case ms:case ys:return new r(e);case _s:{let t=new r(e.source,ws.exec(e));return t.lastIndex=e.lastIndex,t}case bs:return Object(Vs.call(e))}return xs.has(t)?sl(e,n):void 0}function ll(e,t,n,r,i,a){let o,s=!!(t&qo),c=!!(t&Jo),l=!!(t&Yo);if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!yl(e))return e;let u=Array.isArray(e);if(u){if(o=il(e),!s)return bc(e,o)}else{let t=Gs(e),n=t==ds||t==fs;if(t==hs||t==ns||n&&!i){if(o=c||n?{}:al(e),!s)return c?zc(e,Lc(o,e)):Rc(e,Ic(o,e))}else{if(!Ss.has(t))return i?e:{};o=cl(e,t,s)}}let d=a||new Map,f=d.get(e);if(f)return f;d.set(e,o),ec(e)?e.forEach(r=>{o.add(ll(r,t,n,r,e,d))}):$s(e)&&e.forEach((r,i)=>{o.set(i,ll(r,t,n,i,e,d))});let p=u?void 0:(l?c?Mc:jc:c?Oc:Dc)(e);return pc(p||e,(r,i)=>{let a=i,s=r;p&&(a=r,s=e[a]),Pc(o,a,ll(s,t,n,a,e,d))}),o}function ul(e){return nc(e)?void 0:e}function dl(e){if(!(e&&e.length))return[];let t=0,n=mc(e,e=>Ys(e)?(t=Math.max(e.length,t),!0):!1);return yc(t,e=>hc(n,Xc(e)))}function fl(e){let t=-1,n=e==null?0:e.length,r=[];for(;++t<n;){let n=e[t];n&&r.push(n)}return r}function pl(e,t,n){let r,i,a=0,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Qo);let p=ac(t)||0;yl(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Math.max(ac(n.maxWait)||0,p):a,f=`trailing`in n?!!n.trailing:f);let m=t=>{let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o},h=e=>{let t=e-c,n=e-l,r=p-t;return d?Math.min(r,a-n):r},g=e=>{let t=e-c,n=e-l;return c===void 0||t>=p||t<0||d&&n>=a},_=e=>(s=void 0,f&&r?m(e):(r=i=void 0,o)),v=()=>{let e=Date.now();if(g(e)){_(e);return}s=setTimeout(v,h(e))},y=e=>(l=e,s=setTimeout(v,p),u?m(e):o),b=function(...e){let t=Date.now(),n=g(t);if(r=e,i=this,c=t,n){if(s===void 0)return y(c);if(d)return clearTimeout(s),s=setTimeout(v,p),m(c)}return s===void 0&&(s=setTimeout(v,p)),o};return b.cancel=()=>{s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0},b.flush=()=>s===void 0?o:_(Date.now()),b}function ml(e){return e!=null&&e.length?Vc(e,1):[]}function hl(e,t,n){let r=e==null?void 0:qc(e,t);return r===void 0?n:r}function gl(e){if(e==null)return!0;if(Js(e)&&(Array.isArray(e)||typeof e==`string`||typeof e.splice==`function`||Zs(e)||Xs(e)))return!e.length;let t=Gs(e);if(t==ps||t==vs)return!e.size;if(tc(e))return!Tc(e).length;for(let t in e)if(Fs.call(e,t))return!1;return!0}function _l(e,t){return nl(e,t)}function vl(e){if(!yl(e))return!1;let t=Gs(e);return t==ds||t==fs||t==as||t==gs}function yl(e){let t=typeof e;return e!=null&&(t==`object`||t==`function`)}function bl(e,...t){let n={};if(e==null)return n;let r=!1,i=hc(ml(t),t=>{let n=Kc(t,e);return r||=n.length>1,n});Fc(e,Mc(e),n),r&&(n=ll(n,7,ul));let a=i.length;for(;a--;)Yc(n,i[a]);return n}function xl(e,t){let n=sc(e);if(n<1||n>ts)return[];let r=$o,i=Math.min(n,$o),a=fc(t);n-=$o;let o=yc(i,a);for(;++r<n;)a(r);return o}function Sl(...e){return dl(e)}function Cl(e){this.content=e}Cl.prototype={constructor:Cl,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Cl(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Cl(n)},addToStart:function(e,t){return new Cl([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Cl(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Cl(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Cl.from(e),e.size?new Cl(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Cl.from(e),e.size?new Cl(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Cl.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Cl.from=function(e){if(e instanceof Cl)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Cl(t)};function wl(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&Dl(e.charCodeAt(r-1))&&El(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=wl(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Tl(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&Dl(e.charCodeAt(i-1))&&El(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=Tl(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}function El(e){return e>=56320&&e<57344}function Dl(e){return e>=55296&&e<56320}var z=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return wl(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Tl(this,e,t,n)}findIndex(e){if(e==0)return kl(0,e);if(e==this.size)return kl(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?kl(t+1,i):kl(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};z.empty=new z([],0);var Ol={index:0,offset:0};function kl(e,t){return Ol.index=e,Ol.offset=t,Ol}function Al(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Al(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Al(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var jl=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Al(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};jl.none=[];var Ml=class extends Error{},B=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Pl(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Nl(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(z.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};B.empty=new B(z.empty,0,0);function Nl(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(Nl(a.content,t-i-1,n-i-1)))}function Pl(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=Pl(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function Fl(e,t,n){if(n.openStart>e.depth)throw new Ml(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ml(`Inconsistent open depths`);return Il(e,t,n,0)}function Il(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Il(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return Vl(a,Ul(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Vl(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=Wl(n,e);return Vl(a,Hl(e,i,o,t,r))}}function Ll(e,t){if(!t.type.compatibleContent(e.type))throw new Ml(`Cannot join `+t.type.name+` onto `+e.type.name)}function Rl(e,t,n){let r=e.node(n);return Ll(r,t.node(n)),r}function zl(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Bl(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(zl(e.nodeAfter,r),a++));for(let e=a;e<o;e++)zl(i.child(e),r);t&&t.depth==n&&t.textOffset&&zl(t.nodeBefore,r)}function Vl(e,t){if(!e.type.validContent(t))throw new Ml(`Invalid content for node `+e.type.name);return e.copy(t)}function Hl(e,t,n,r,i){let a=e.depth>i&&Rl(e,t,i+1),o=r.depth>i&&Rl(n,r,i+1),s=[];return Bl(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Ll(a,o),zl(Vl(a,Hl(e,t,n,r,i+1)),s)):(a&&zl(Vl(a,Ul(e,t,i+1)),s),Bl(t,n,i,s),o&&zl(Vl(o,Ul(n,r,i+1)),s)),Bl(r,null,i,s),new z(s)}function Ul(e,t,n){let r=[];return Bl(null,e,n,r),e.depth>n&&zl(Vl(Rl(e,t,n+1),Ul(e,t,n+1)),r),Bl(t,null,n,r),new z(r)}function Wl(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(z.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var Gl=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return jl.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Yl(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=Jl.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else Jl.set(t,r=new Kl);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%ql,i}},Kl=class{constructor(){this.elts=[],this.i=0}},ql=12,Jl=new WeakMap,Yl=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Xl=Object.create(null),Zl=class e{constructor(e,t,n,r=jl.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||z.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Al(this.attrs,t||e.defaultAttrs||Xl)&&jl.sameSet(this.marks,n||jl.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return B.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new B(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return Fl(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Gl.resolveCached(this,e)}resolveNoCache(e){return Gl.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),$l(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=z.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),eu(this.type.attrs,this.attrs,`node`,this.type.name);let e=jl.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];eu(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!jl.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=z.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Zl.prototype.text=void 0;var Ql=class e extends Zl{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):$l(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function $l(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function eu(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var tu=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new nu(t,n);if(r.next==null)return e.empty;let i=ru(r);r.next&&r.err(`Unexpected trailing text`);let a=pu(uu(i));return mu(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return z.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
37
37
|
`)}};tu.empty=new tu(!0);var nu=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function ru(e){let t=[];do t.push(iu(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function iu(e){let t=[];do t.push(au(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function au(e){let t=lu(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=su(e,t);else break;return t}function ou(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function su(e,t){let n=ou(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:ou(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function cu(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function lu(e){if(e.eat(`(`)){let t=ru(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=cu(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function uu(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function du(e,t){return t-e}function fu(e,t){let n=[];return r(t),n.sort(du);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function pu(e){let t=Object.create(null);return n(fu(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);fu(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new tu(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(du);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function mu(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function hu(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function gu(e,t){let n=Object.create(null);for(let r in e){let i=e[r],a=t&&t[r];if(a===void 0)if(i.hasDefault)a=i.default;else throw RangeError(`No value supplied for attribute `+r);else i.validate&&i.validate(a);n[r]=a}return n}function _u(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new bu(e,r,t[r]);return n}var vu=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=_u(e,n.attrs),this.defaultAttrs=hu(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==tu.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:gu(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new Zl(this,this.computeAttrs(e),z.from(t),jl.setFrom(n))}createChecked(e=null,t,n){return t=z.from(t),this.checkContent(t),new Zl(this,this.computeAttrs(e),t,jl.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=z.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(z.empty,!0);return i?new Zl(this,e,t.append(i),jl.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:jl.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function yu(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var bu=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?yu(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},xu=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=_u(e,r.attrs),this.excluded=null;let i=hu(this.attrs);this.instance=i?new jl(this,i):null}create(e=null){return!e&&this.instance?this.instance:new jl(this,gu(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}},Su=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Cl.from(e.nodes),t.marks=Cl.from(e.marks||{}),this.nodes=vu.compile(this.spec.nodes,this),this.marks=xu.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=tu.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Cu(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Cu(this,n.split(` `))}this.nodeFromJSON=e=>Zl.fromJSON(this,e),this.markFromJSON=e=>jl.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof vu))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new Ql(n,n.defaultAttrs,e,jl.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function Cu(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function wu(e){return e.tag!=null}function Tu(e){return e.style!=null}var Eu=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(wu(e))this.tags.push(e);else if(Tu(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new Fu(this,t,!1);return n.addAll(e,jl.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Fu(this,t,!0);return n.addAll(e,jl.none,t.from,t.to),B.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Lu(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Ru(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Ru(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},Du={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ou={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ku={ol:!0,ul:!0},Au=1,ju=2,Mu=4;function Nu(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?Au:0)|(t===`full`?ju:0)}var Pu=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=jl.none,this.match=i||(a&Mu?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(z.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Au)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=z.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(z.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Du.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Fu=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=Nu(null,t.preserveWhitespace,0)|(n?Mu:0);i=r?new Pu(r.type,r.attrs,jl.none,!0,t.topMatch||r.type.contentMatch,a):n?new Pu(null,null,jl.none,!0,null,a):new Pu(e.schema.topNodeType,null,jl.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&ju?`full`:this.localPreserveWS||(r.options&Au)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
38
38
|
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;ku.hasOwnProperty(a)&&this.parser.normalizeLists&&Iu(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:Ou.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(Du.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
39
39
|
`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=jl.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):zu(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=Nu(e,i,a.options);a.options&Mu&&a.content.length==0&&(o|=Mu);let s=jl.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):zu(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new Pu(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=Au);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function Iu(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&ku.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function Lu(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Ru(e){let t={};for(let n in e)t[n]=e[n];return t}function zu(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var Bu=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=Hu(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Hu(t).createTextNode(e.text);let{dom:n,contentDOM:r}=Ku(Hu(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Ku(Hu(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:Ku(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=Vu(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return Vu(e.marks)}};function Vu(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Hu(e){return e.document||window.document}var Uu=new WeakMap;function Wu(e){let t=Uu.get(e);return t===void 0&&Uu.set(e,t=Gu(e)),t}function Gu(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function Ku(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=Wu(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=Ku(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var qu=65535,Ju=2**16;function Yu(e,t){return e+t*Ju}function Xu(e){return e&qu}function Zu(e){return(e-(e&qu))/Ju}var Qu=1,$u=2,ed=4,td=8,nd=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&td)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&ed)>0}},rd=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=Xu(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+Zu(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:Yu(o/3,e-s),f=0;return c&&(f|=e==s?$u:e==u?Qu:ed,(t<0?e!=s:e!=u)&&(f|=td)),new nd(a,f,d)}r+=l-c}return n?e+r:new nd(e+r,0,null)}touches(e,t){let n=0,r=Xu(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};rd.empty=new rd([]);var id=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new nd(e,r,null)}},ad=Object.create(null),od=class{getMap(){return rd.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=ad[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in ad)throw RangeError(`Duplicate use of step JSON ID `+e);return ad[e]=t,t.prototype.jsonID=e,t}},sd=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof Ml)return e.fail(t.message);throw t}}};function cd(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(cd(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return z.fromArray(r)}var ld=class e extends od{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new B(cd(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return sd.fromReplace(e,this.from,this.to,i)}invert(){return new ud(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};od.jsonID(`addMark`,ld);var ud=class e extends od{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new B(cd(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return sd.fromReplace(e,this.from,this.to,n)}invert(){return new ld(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};od.jsonID(`removeMark`,ud);var dd=class e extends od{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return sd.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return sd.fromReplace(e,this.pos,this.pos+1,new B(z.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new fd(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};od.jsonID(`addNodeMark`,dd);var fd=class e extends od{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return sd.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return sd.fromReplace(e,this.pos,this.pos+1,new B(z.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new dd(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};od.jsonID(`removeNodeMark`,fd);var pd=class e extends od{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&hd(e,this.from,this.to)?sd.fail(`Structure replace would overwrite content`):sd.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new rd([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,B.fromJSON(t,n.slice),!!n.structure)}};pd.MAP_BIAS=1,od.jsonID(`replace`,pd);var md=class e extends od{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(hd(e,this.from,this.gapFrom)||hd(e,this.gapTo,this.to)))return sd.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return sd.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?sd.fromReplace(e,this.from,this.to,n):sd.fail(`Content does not fit in gap`)}getMap(){return new rd([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};od.jsonID(`replaceAround`,md);function hd(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function gd(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new ud(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new ld(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function _d(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof xu){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new ud(t.from,t.to,t.style)))}function vd(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new pd(s,l,B.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new ud(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new B(z.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new pd(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(z.empty,!0);e.replace(s,s,new B(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function yd(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function bd(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!yd(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function xd(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=z.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=z.from(r.node(e).copy(u)),d++):c--;let f=z.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=z.from(i.node(e).copy(f)),p++):l++;e.step(new md(c,l,o,s,new B(u.append(f),d,p),u.size-d,!0))}function Sd(e,t,n=null,r=e){let i=wd(e,t),a=i&&Td(r,t);return a?i.map(Cd).concat({type:t,attrs:n}).concat(a.map(Cd)):null}function Cd(e){return{type:e,attrs:null}}function wd(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function Td(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function Ed(e,t,n){let r=z.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=z.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new md(i,a,i,a,new B(r,0,0),n.length,!0))}function Dd(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&Ad(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&kd(e,t,n,a),vd(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new md(c,l,c+1,l-1,new B(z.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&Od(e,t,n,a),!1}})}function Od(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function kd(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
40
|
-
`))}})}function Ad(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function jd(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new md(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new B(z.from(o),0,0),1,!0))}function Md(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function Nd(e,t,n=1,r){let i=e.doc.resolve(t),a=z.empty,o=z.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=z.from(i.node(e).copy(a));let t=r&&r[s];o=z.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new pd(t,t,new B(a.append(o),n,n),!0))}function Pd(e,t){let n=e.resolve(t),r=n.index();return Id(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Fd(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function Id(e,t){return!!(e&&t&&!e.isLeaf&&Fd(e,t))}function Ld(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&Id(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function Rd(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);kd(e,r.node(),r.before(),s)}o.inlineContent&&vd(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new pd(l,c.map(t+n,-1),B.empty,!0)),r===!0){let t=e.doc.resolve(l);Od(e,t.node(),t.before(),e.steps.length)}return e}function zd(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function Bd(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function Vd(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return Hd(i,a,r)?new pd(t,n,r):new Ud(i,a,r).fit()}function Hd(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var Ud=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=z.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=z.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new B(i,a,o);return e>-1?new md(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new pd(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=Kd(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(z.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return Zd(e,-1)<=t?!1:(this.unplaced.size>1&&Zd(e,1)>n&&n++,this.unplaced=new B(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Kd(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new B(Wd(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new B(Wd(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(qd(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=Gd(this.placed,t,z.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?B.empty:new B(Wd(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new B(Wd(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Jd(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Jd(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=Jd(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Gd(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Gd(this.placed,this.depth,z.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(z.empty,!0);e.childCount&&(this.placed=Gd(this.placed,this.frontier.length,e))}};function Wd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Wd(e.firstChild.content,t-1,n)))}function Gd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Gd(e.lastChild.content,t-1,n)))}function Kd(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function qd(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,qd(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(z.empty,!0)))),e.copy(r)}function Jd(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!Yd(n,a.content,o)?s:null}function Yd(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function Xd(e){return e.spec.defining||e.spec.definingForContent}function Zd(e,t){for(let n=0;;n++){let r=t<0?e.firstChild:e.lastChild;if(!r||r.isAtom)return n;e=r.content}}function Qd(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(Hd(i,a,r))return e.step(new pd(t,n,r));let o=nf(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=Xd(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new B($d(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function $d(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy($d(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(z.empty,!0))}return e}function ef(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=zd(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new B(z.from(r),0,0))}function tf(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),o=!1;for(let e=r.depth;e>a;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>a;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let a=nf(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function nf(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var rf=class e extends od{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return sd.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return sd.fromReplace(e,this.pos,this.pos+1,new B(z.from(r),0,+!t.isLeaf))}getMap(){return rd.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};od.jsonID(`attr`,rf);var af=class e extends od{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return sd.ok(n)}getMap(){return rd.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};od.jsonID(`docAttr`,af);var of=class extends Error{};of=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},of.prototype=Object.create(Error.prototype),of.prototype.constructor=of,of.prototype.name=`TransformError`;var sf=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new id}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new of(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=B.empty){let r=Vd(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new B(z.from(n),0,0))}delete(e,t){return this.replace(e,t,B.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return Qd(this,e,t,n),this}replaceRangeWith(e,t,n){return ef(this,e,t,n),this}deleteRange(e,t){return tf(this,e,t),this}lift(e,t){return xd(this,e,t),this}join(e,t=1){return Rd(this,e,t),this}wrap(e,t){return Ed(this,e,t),this}setBlockType(e,t=e,n,r=null){return Dd(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return jd(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new rf(e,t,n)),this}setDocAttribute(e,t){return this.step(new af(e,t)),this}addNodeMark(e,t){return this.step(new dd(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof jl)t.isInSet(n.marks)&&this.step(new fd(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new fd(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return Nd(this,e,t,n),this}addMark(e,t,n){return gd(this,e,t,n),this}removeMark(e,t,n){return _d(this,e,t,n),this}clearIncompatible(e,t,n){return vd(this,e,t,n),this}},cf=Object.create(null),lf=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new uf(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=B.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?B.empty:t),o==0&&vf(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),vf(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new V(e):_f(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?_f(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):_f(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new hf(e.node(0))}static atStart(e){return _f(e,e,0,0,1)||new hf(e)}static atEnd(e){return _f(e,e,e.content.size,e.childCount,-1)||new hf(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=cf[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in cf)throw RangeError(`Duplicate use of selection JSON ID `+e);return cf[e]=t,t.prototype.jsonID=e,t}getBookmark(){return V.between(this.$anchor,this.$head).getBookmark()}};lf.prototype.visible=!0;var uf=class{constructor(e,t){this.$from=e,this.$to=t}},df=!1;function ff(e){!df&&!e.parent.inlineContent&&(df=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var V=class e extends lf{constructor(e,t=e){ff(e),ff(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return lf.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=B.empty){if(super.replace(e,t),t==B.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new pf(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=lf.findFrom(n,r,!0)||lf.findFrom(n,-r,!0);if(e)n=e.$head;else return lf.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(lf.findFrom(t,-r,!0)||lf.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};lf.jsonID(`text`,V);var pf=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return V.between(e.resolve(this.anchor),e.resolve(this.head))}},H=class e extends lf{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?lf.near(a):new e(a)}content(){return new B(z.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new mf(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};H.prototype.visible=!1,lf.jsonID(`node`,H);var mf=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new pf(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&H.isSelectable(n)?new H(t):lf.near(t)}},hf=class e extends lf{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=B.empty){if(t==B.empty){e.delete(0,e.doc.content.size);let t=lf.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return gf}};lf.jsonID(`all`,hf);var gf={map(){return this},resolve(e){return new hf(e)}};function _f(e,t,n,r,i,a=!1){if(t.inlineContent)return V.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=_f(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&H.isSelectable(r))return H.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function vf(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof pd||i instanceof md))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(lf.near(e.doc.resolve(o),n))}var yf=1,bf=2,xf=4,Sf=class extends sf{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|yf)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&yf)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=bf,this}ensureMarks(e){return jl.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&bf)>0}addStep(e,t){super.addStep(e,t),this.updated&=-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||jl.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(lf.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=xf,this}get scrolledIntoView(){return(this.updated&xf)>0}};function Cf(e,t){return!t||!e?e:e.bind(t)}var wf=class{constructor(e,t,n){this.name=e,this.init=Cf(t.init,n),this.apply=Cf(t.apply,n)}},Tf=[new wf(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new wf(`selection`,{init(e,t){return e.selection||lf.atStart(t.doc)},apply(e){return e.selection}}),new wf(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new wf(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Ef=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Tf.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new wf(e.key,e.spec.state,e))})}},Df=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new Sf(this)}static create(t){let n=new Ef(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new Ef(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new Ef(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=Zl.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=lf.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function Of(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=Of(i,t,{})),n[r]=i}return n}var kf=class{constructor(e){this.spec=e,this.props={},e.props&&Of(e.props,this,this.props),this.key=e.key?e.key.key:jf(`plugin`)}getState(e){return e[this.key]}},Af=Object.create(null);function jf(e){return e in Af?e+`$`+ ++Af[e]:(Af[e]=0,e+`$`)}var Mf=class{constructor(e=`key`){this.key=jf(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},Nf=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,A(x);else{var t=n(l);t!==null&&j(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&j(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function ee(){return!(e.unstable_now()-E<T)}function D(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?O():(S=!1,C=null)}}else S=!1}var O;if(typeof v==`function`)O=function(){v(D)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,k=te.port2;te.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){g(D,0)};function A(e){C=e,S||(S=!0,O())}function j(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,A(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,j(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,A(x))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Pf=o(((e,t)=>{t.exports=Nf()})),Ff=o((e=>{var t=d(),n=Pf();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e){return l.call(p,e)?!0:l.call(f,e)?!1:u.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),D=Symbol.for(`react.provider`),O=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),k=Symbol.for(`react.suspense`),A=Symbol.for(`react.suspense_list`),j=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),ne=Symbol.for(`react.offscreen`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Object.assign,ae;function oe(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``}return`
|
|
41
|
-
`+
|
|
40
|
+
`))}})}function Ad(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function jd(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new md(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new B(z.from(o),0,0),1,!0))}function Md(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function Nd(e,t,n=1,r){let i=e.doc.resolve(t),a=z.empty,o=z.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=z.from(i.node(e).copy(a));let t=r&&r[s];o=z.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new pd(t,t,new B(a.append(o),n,n),!0))}function Pd(e,t){let n=e.resolve(t),r=n.index();return Id(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Fd(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function Id(e,t){return!!(e&&t&&!e.isLeaf&&Fd(e,t))}function Ld(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&Id(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function Rd(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);kd(e,r.node(),r.before(),s)}o.inlineContent&&vd(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new pd(l,c.map(t+n,-1),B.empty,!0)),r===!0){let t=e.doc.resolve(l);Od(e,t.node(),t.before(),e.steps.length)}return e}function zd(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function Bd(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function Vd(e,t,n=t,r=B.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return Hd(i,a,r)?new pd(t,n,r):new Ud(i,a,r).fit()}function Hd(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var Ud=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=z.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=z.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new B(i,a,o);return e>-1?new md(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new pd(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=Kd(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(z.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return Zd(e,-1)<=t?!1:(this.unplaced.size>1&&Zd(e,1)>n&&n++,this.unplaced=new B(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Kd(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new B(Wd(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new B(Wd(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(qd(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=Gd(this.placed,t,z.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?B.empty:new B(Wd(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new B(Wd(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Jd(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Jd(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=Jd(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Gd(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Gd(this.placed,this.depth,z.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(z.empty,!0);e.childCount&&(this.placed=Gd(this.placed,this.frontier.length,e))}};function Wd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Wd(e.firstChild.content,t-1,n)))}function Gd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Gd(e.lastChild.content,t-1,n)))}function Kd(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function qd(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,qd(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(z.empty,!0)))),e.copy(r)}function Jd(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!Yd(n,a.content,o)?s:null}function Yd(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function Xd(e){return e.spec.defining||e.spec.definingForContent}function Zd(e,t){for(let n=0;;n++){let r=t<0?e.firstChild:e.lastChild;if(!r||r.isAtom)return n;e=r.content}}function Qd(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(Hd(i,a,r))return e.step(new pd(t,n,r));let o=nf(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=Xd(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new B($d(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function $d(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy($d(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(z.empty,!0))}return e}function ef(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=zd(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new B(z.from(r),0,0))}function tf(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),o=!1;for(let e=r.depth;e>a;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>a;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let a=nf(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function nf(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var rf=class e extends od{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return sd.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return sd.fromReplace(e,this.pos,this.pos+1,new B(z.from(r),0,+!t.isLeaf))}getMap(){return rd.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};od.jsonID(`attr`,rf);var af=class e extends od{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return sd.ok(n)}getMap(){return rd.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};od.jsonID(`docAttr`,af);var of=class extends Error{};of=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},of.prototype=Object.create(Error.prototype),of.prototype.constructor=of,of.prototype.name=`TransformError`;var sf=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new id}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new of(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=B.empty){let r=Vd(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new B(z.from(n),0,0))}delete(e,t){return this.replace(e,t,B.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return Qd(this,e,t,n),this}replaceRangeWith(e,t,n){return ef(this,e,t,n),this}deleteRange(e,t){return tf(this,e,t),this}lift(e,t){return xd(this,e,t),this}join(e,t=1){return Rd(this,e,t),this}wrap(e,t){return Ed(this,e,t),this}setBlockType(e,t=e,n,r=null){return Dd(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return jd(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new rf(e,t,n)),this}setDocAttribute(e,t){return this.step(new af(e,t)),this}addNodeMark(e,t){return this.step(new dd(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof jl)t.isInSet(n.marks)&&this.step(new fd(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new fd(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return Nd(this,e,t,n),this}addMark(e,t,n){return gd(this,e,t,n),this}removeMark(e,t,n){return _d(this,e,t,n),this}clearIncompatible(e,t,n){return vd(this,e,t,n),this}},cf=Object.create(null),lf=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new uf(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=B.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?B.empty:t),o==0&&vf(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),vf(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new V(e):_f(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?_f(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):_f(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new hf(e.node(0))}static atStart(e){return _f(e,e,0,0,1)||new hf(e)}static atEnd(e){return _f(e,e,e.content.size,e.childCount,-1)||new hf(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=cf[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in cf)throw RangeError(`Duplicate use of selection JSON ID `+e);return cf[e]=t,t.prototype.jsonID=e,t}getBookmark(){return V.between(this.$anchor,this.$head).getBookmark()}};lf.prototype.visible=!0;var uf=class{constructor(e,t){this.$from=e,this.$to=t}},df=!1;function ff(e){!df&&!e.parent.inlineContent&&(df=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var V=class e extends lf{constructor(e,t=e){ff(e),ff(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return lf.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=B.empty){if(super.replace(e,t),t==B.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new pf(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=lf.findFrom(n,r,!0)||lf.findFrom(n,-r,!0);if(e)n=e.$head;else return lf.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(lf.findFrom(t,-r,!0)||lf.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};lf.jsonID(`text`,V);var pf=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return V.between(e.resolve(this.anchor),e.resolve(this.head))}},H=class e extends lf{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?lf.near(a):new e(a)}content(){return new B(z.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new mf(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};H.prototype.visible=!1,lf.jsonID(`node`,H);var mf=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new pf(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&H.isSelectable(n)?new H(t):lf.near(t)}},hf=class e extends lf{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=B.empty){if(t==B.empty){e.delete(0,e.doc.content.size);let t=lf.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return gf}};lf.jsonID(`all`,hf);var gf={map(){return this},resolve(e){return new hf(e)}};function _f(e,t,n,r,i,a=!1){if(t.inlineContent)return V.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=_f(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&H.isSelectable(r))return H.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function vf(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof pd||i instanceof md))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(lf.near(e.doc.resolve(o),n))}var yf=1,bf=2,xf=4,Sf=class extends sf{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|yf)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&yf)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=bf,this}ensureMarks(e){return jl.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&bf)>0}addStep(e,t){super.addStep(e,t),this.updated&=-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||jl.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(lf.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=xf,this}get scrolledIntoView(){return(this.updated&xf)>0}};function Cf(e,t){return!t||!e?e:e.bind(t)}var wf=class{constructor(e,t,n){this.name=e,this.init=Cf(t.init,n),this.apply=Cf(t.apply,n)}},Tf=[new wf(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new wf(`selection`,{init(e,t){return e.selection||lf.atStart(t.doc)},apply(e){return e.selection}}),new wf(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new wf(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],Ef=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Tf.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new wf(e.key,e.spec.state,e))})}},Df=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new Sf(this)}static create(t){let n=new Ef(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new Ef(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new Ef(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=Zl.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=lf.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function Of(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=Of(i,t,{})),n[r]=i}return n}var kf=class{constructor(e){this.spec=e,this.props={},e.props&&Of(e.props,this,this.props),this.key=e.key?e.key.key:jf(`plugin`)}getState(e){return e[this.key]}},Af=Object.create(null);function jf(e){return e in Af?e+`$`+ ++Af[e]:(Af[e]=0,e+`$`)}var Mf=class{constructor(e=`key`){this.key=jf(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},Nf=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,A(x);else{var t=n(l);t!==null&&j(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&j(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function ee(){return!(e.unstable_now()-E<T)}function D(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?O():(S=!1,C=null)}}else S=!1}var O;if(typeof v==`function`)O=function(){v(D)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,k=te.port2;te.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){g(D,0)};function A(e){C=e,S||(S=!0,O())}function j(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,A(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,j(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,A(x))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Pf=o(((e,t)=>{t.exports=Nf()})),Ff=o((e=>{var t=d(),n=Pf();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e){return l.call(p,e)?!0:l.call(f,e)?!1:u.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),D=Symbol.for(`react.provider`),O=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),k=Symbol.for(`react.suspense`),A=Symbol.for(`react.suspense_list`),j=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),ne=Symbol.for(`react.offscreen`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Object.assign,oe;function se(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``}return`
|
|
41
|
+
`+oe+e}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
42
42
|
`),a=r.stack.split(`
|
|
43
43
|
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
44
|
-
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{se=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?oe(e):``}function le(e){switch(e.tag){case 5:return oe(e.type);case 16:return oe(`Lazy`);case 13:return oe(`Suspense`);case 19:return oe(`SuspenseList`);case 0:case 2:case 15:return e=ce(e.type,!1),e;case 11:return e=ce(e.type.render,!1),e;case 1:return e=ce(e.type,!0),e;default:return``}}function ue(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case T:return`Fragment`;case w:return`Portal`;case ee:return`Profiler`;case E:return`StrictMode`;case k:return`Suspense`;case A:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case O:return(e.displayName||`Context`)+`.Consumer`;case D:return(e._context.displayName||`Context`)+`.Provider`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case j:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}function de(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ue(t);case 8:return t===E?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function fe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function pe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function me(e){var t=pe(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function he(e){e._valueTracker||=me(e)}function ge(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=pe(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function _e(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function ve(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ye(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=fe(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function be(e,t){t=t.checked,t!=null&&x(e,`checked`,t,!1)}function xe(e,t){be(e,t);var n=fe(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Ce(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Ce(e,t.type,fe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Ce(e,t,n){(t!==`number`||_e(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var we=Array.isArray;function Te(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+fe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ee(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return N({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function De(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(we(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:fe(n)}}function Oe(e,t){var n=fe(t.value),r=fe(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function ke(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ae(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function je(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ae(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Me,Ne=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Me||=document.createElement(`div`),Me.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ie=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Fe).forEach(function(e){Ie.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fe[t]=Fe[e]})});function Le(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Fe.hasOwnProperty(e)&&Fe[e]?(``+t).trim():t+`px`}function Re(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Le(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var ze=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Be(e,t){if(t){if(ze[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ve(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var He=null;function Ue(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var We=null,Ge=null,Ke=null;function qe(e){if(e=qi(e)){if(typeof We!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),We(e.stateNode,e.type,t))}}function Je(e){Ge?Ke?Ke.push(e):Ke=[e]:Ge=e}function Ye(){if(Ge){var e=Ge,t=Ke;if(Ke=Ge=null,qe(e),t)for(e=0;e<t.length;e++)qe(t[e])}}function Xe(e,t){return e(t)}function Ze(){}var Qe=!1;function $e(e,t,n){if(Qe)return e(t,n);Qe=!0;try{return Xe(e,t,n)}finally{Qe=!1,(Ge!==null||Ke!==null)&&(Ze(),Ye())}}function et(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var tt=!1;if(c)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){tt=!0}}),window.addEventListener(`test`,nt,nt),window.removeEventListener(`test`,nt,nt)}catch{tt=!1}function rt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var it=!1,at=null,ot=!1,st=null,ct={onError:function(e){it=!0,at=e}};function lt(e,t,n,r,i,a,o,s,c){it=!1,at=null,rt.apply(ct,arguments)}function ut(e,t,n,i,a,o,s,c,l){if(lt.apply(this,arguments),it){if(it){var u=at;it=!1,at=null}else throw Error(r(198));ot||(ot=!0,st=u)}}function dt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ft(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function pt(e){if(dt(e)!==e)throw Error(r(188))}function mt(e){var t=e.alternate;if(!t){if(t=dt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return pt(a),e;if(o===i)return pt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ht(e){return e=mt(e),e===null?null:gt(e)}function gt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gt(e);if(t!==null)return t;e=e.sibling}return null}var _t=n.unstable_scheduleCallback,vt=n.unstable_cancelCallback,yt=n.unstable_shouldYield,bt=n.unstable_requestPaint,xt=n.unstable_now,St=n.unstable_getCurrentPriorityLevel,Ct=n.unstable_ImmediatePriority,wt=n.unstable_UserBlockingPriority,Tt=n.unstable_NormalPriority,Et=n.unstable_LowPriority,Dt=n.unstable_IdlePriority,Ot=null,kt=null;function At(e){if(kt&&typeof kt.onCommitFiberRoot==`function`)try{kt.onCommitFiberRoot(Ot,e,void 0,(e.current.flags&128)==128)}catch{}}var jt=Math.clz32?Math.clz32:Pt,Mt=Math.log,Nt=Math.LN2;function Pt(e){return e>>>=0,e===0?32:31-(Mt(e)/Nt|0)|0}var Ft=64,It=4194304;function Lt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Lt(a))):r=Lt(s)}else o=n&~i,o===0?a!==0&&(r=Lt(a)):r=Lt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jt(t),i=1<<n,r|=e[n],t&=~i;return r}function zt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-jt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=zt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Vt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ht(){var e=Ft;return Ft<<=1,!(Ft&4194240)&&(Ft=64),e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=n}function Gt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-jt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Kt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qt=0;function Jt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Yt,Xt,Zt,Qt,$t,en=!1,tn=[],nn=null,rn=null,an=null,on=new Map,sn=new Map,cn=[],ln=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function un(e,t){switch(e){case`focusin`:case`focusout`:nn=null;break;case`dragenter`:case`dragleave`:rn=null;break;case`mouseover`:case`mouseout`:an=null;break;case`pointerover`:case`pointerout`:on.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:sn.delete(t.pointerId)}}function dn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qi(t),t!==null&&Xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function fn(e,t,n,r,i){switch(t){case`focusin`:return nn=dn(nn,e,t,n,r,i),!0;case`dragenter`:return rn=dn(rn,e,t,n,r,i),!0;case`mouseover`:return an=dn(an,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return on.set(a,dn(on.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,sn.set(a,dn(sn.get(a)||null,e,t,n,r,i)),!0}return!1}function pn(e){var t=Ki(e.target);if(t!==null){var n=dt(t);if(n!==null){if(t=n.tag,t===13){if(t=ft(n),t!==null){e.blockedOn=t,$t(e.priority,function(){Zt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);He=r,n.target.dispatchEvent(r),He=null}else return t=qi(n),t!==null&&Xt(t),e.blockedOn=n,!1;t.shift()}return!0}function hn(e,t,n){mn(e)&&n.delete(t)}function gn(){en=!1,nn!==null&&mn(nn)&&(nn=null),rn!==null&&mn(rn)&&(rn=null),an!==null&&mn(an)&&(an=null),on.forEach(hn),sn.forEach(hn)}function _n(e,t){e.blockedOn===t&&(e.blockedOn=null,en||(en=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,gn)))}function vn(e){function t(t){return _n(t,e)}if(0<tn.length){_n(tn[0],e);for(var n=1;n<tn.length;n++){var r=tn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&_n(nn,e),rn!==null&&_n(rn,e),an!==null&&_n(an,e),on.forEach(t),sn.forEach(t),n=0;n<cn.length;n++)r=cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<cn.length&&(n=cn[0],n.blockedOn===null);)pn(n),n.blockedOn===null&&cn.shift()}var yn=S.ReactCurrentBatchConfig,bn=!0;function xn(e,t,n,r){var i=qt,a=yn.transition;yn.transition=null;try{qt=1,Cn(e,t,n,r)}finally{qt=i,yn.transition=a}}function Sn(e,t,n,r){var i=qt,a=yn.transition;yn.transition=null;try{qt=4,Cn(e,t,n,r)}finally{qt=i,yn.transition=a}}function Cn(e,t,n,r){if(bn){var i=Tn(e,t,n,r);if(i===null)vi(e,t,r,wn,n),un(e,r);else if(fn(i,e,t,n,r))r.stopPropagation();else if(un(e,r),t&4&&-1<ln.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Yt(a),a=Tn(e,t,n,r),a===null&&vi(e,t,r,wn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var wn=null;function Tn(e,t,n,r){if(wn=null,e=Ue(r),e=Ki(e),e!==null)if(t=dt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ft(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wn=e,null}function En(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(St()){case Ct:return 1;case wt:return 4;case Tt:case Et:return 16;case Dt:return 536870912;default:return 16}default:return 16}}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return kn=i.slice(e,1<r?1-r:void 0)}function jn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Mn(){return!0}function Nn(){return!1}function Pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Mn:Nn,this.isPropagationStopped=Nn,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=N({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=N({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(N({},Hn,{dataTransfer:0})),Gn=Pn(N({},Ln,{relatedTarget:0})),Kn=Pn(N({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(N({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(N({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(N({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(N({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(N({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),rr=Pn(N({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ir=Pn(N({},Hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ar=[9,13,27,32],or=c&&`CompositionEvent`in window,sr=null;c&&`documentMode`in document&&(sr=document.documentMode);var cr=c&&`TextEvent`in window&&!sr,lr=c&&(!or||sr&&8<sr&&11>=sr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return ar.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var P=!1;function mr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function hr(e,t){if(P)return e===`compositionend`||!or&&fr(e,t)?(e=An(),kn=On=Dn=null,P=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return lr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){Je(r),t=bi(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){fi(e,0)}function Sr(e){if(ge(Ji(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(c){var Tr;if(c){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,Ue(e)),$e(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(){for(var e=window,t=_e();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=_e(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Hr(e){var t=Br(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zr(n.ownerDocument.documentElement,n)){if(r!==null&&Vr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Rr(n,a);var o=Rr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ur=c&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==_e(r)||(r=Wr,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=bi(Gr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};c&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionend`),ii=new Map,ai=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function oi(e,t){ii.set(e,t),o(t,[e])}for(var si=0;si<ai.length;si++){var ci=ai[si];oi(ci.toLowerCase(),`on`+(ci[0].toUpperCase()+ci.slice(1)))}oi(ei,`onAnimationEnd`),oi(ti,`onAnimationIteration`),oi(ni,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ri,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var li=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),ui=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(li));function di(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ut(r,t,void 0,e),e.currentTarget=null}function fi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}}}if(ot)throw e=st,ot=!1,st=null,e}function pi(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ui.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(En(t)){case 1:var i=xn;break;case 4:i=Sn;break;default:i=Cn}n=i.bind(null,t,n,e),i=void 0,!tt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}$e(function(){var r=a,i=Ue(n),o=[];a:{var s=ii.get(e);if(s!==void 0){var c=In,l=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:c=er;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=nr;break;case ei:case ti:case ni:c=Kn;break;case ri:c=rr;break;case`scroll`:c=Rn;break;case`wheel`:c=ir;break;case`copy`:case`cut`:case`paste`:c=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=tr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=et(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==He&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=dt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=tr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Cr;else if(_r(s))if(wr)g=Nr;else{g=jr;var _=Ar}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Mr);if(g&&=g(e,r)){vr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Ce(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(_r(_)||_.contentEditable===`true`)&&(Wr=_,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(o,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(o,n,i)}var v;if(or)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else P?fr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(lr&&n.locale!==`ko`&&(P||y!==`onCompositionStart`?y===`onCompositionEnd`&&P&&(v=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,P=!0)),_=bi(r,y),0<_.length&&(y=new Jn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=cr?mr(e,n):hr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}fi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=et(e,n),a!=null&&r.unshift(yi(e,a,i)),a=et(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=et(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=et(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,`
|
|
45
|
-
`).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),vn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);vn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function $i(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function ea(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var ta={},na=Qi(ta),ra=Qi(!1),ia=ta;function aa(e,t){var n=e.type.contextTypes;if(!n)return ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function oa(e){return e=e.childContextTypes,e!=null}function sa(){$i(ra),$i(na)}function ca(e,t,n){if(na.current!==ta)throw Error(r(168));ea(na,t),ea(ra,n)}function la(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,de(e)||`Unknown`,a));return N({},n,i)}function ua(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ta,ia=na.current,ea(na,e),ea(ra,ra.current),!0}function da(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=la(e,t,ia),i.__reactInternalMemoizedMergedChildContext=e,$i(ra),$i(na),ea(na,e)):$i(ra),ea(ra,n)}var fa=null,pa=!1,ma=!1;function ha(e){fa===null?fa=[e]:fa.push(e)}function ga(e){pa=!0,ha(e)}function _a(){if(!ma&&fa!==null){ma=!0;var e=0,t=qt;try{var n=fa;for(qt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fa=null,pa=!1}catch(t){throw fa!==null&&(fa=fa.slice(e+1)),_t(Ct,_a),t}finally{qt=t,ma=!1}}return null}var va=[],ya=0,ba=null,xa=0,Sa=[],Ca=0,wa=null,Ta=1,Ea=``;function Da(e,t){va[ya++]=xa,va[ya++]=ba,ba=e,xa=t}function Oa(e,t,n){Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,wa=e;var r=Ta;e=Ea;var i=32-jt(r)-1;r&=~(1<<i),n+=1;var a=32-jt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ta=1<<32-jt(t)+i|n<<i|r,Ea=a+e}else Ta=1<<a|n<<i|r,Ea=e}function ka(e){e.return!==null&&(Da(e,1),Oa(e,1,0))}function Aa(e){for(;e===ba;)ba=va[--ya],va[ya]=null,xa=va[--ya],va[ya]=null;for(;e===wa;)wa=Sa[--Ca],Sa[Ca]=null,Ea=Sa[--Ca],Sa[Ca]=null,Ta=Sa[--Ca],Sa[Ca]=null}var ja=null,Ma=null,Na=!1,Pa=null;function Fa(e,t){var n=au(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ia(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=wa===null?null:{id:Ta,overflow:Ea},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=au(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ja=e,Ma=null,!0);default:return!1}}function La(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ra(e){if(Na){var t=Ma;if(t){var n=t;if(!Ia(e,t)){if(La(e))throw Error(r(418));t=Li(n.nextSibling);var i=ja;t&&Ia(e,t)?Fa(i,n):(e.flags=e.flags&-4097|2,Na=!1,ja=e)}}else{if(La(e))throw Error(r(418));e.flags=e.flags&-4097|2,Na=!1,ja=e}}}function za(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ja=e}function Ba(e){if(e!==ja)return!1;if(!Na)return za(e),Na=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Ma){if(La(e))throw Va(),Error(r(418));for(;t;)Fa(e,t),t=Li(t.nextSibling)}if(za(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ma=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ma=null}}else Ma=ja?Li(e.stateNode.nextSibling):null;return!0}function Va(){for(var e=Ma;e;)e=Li(e.nextSibling)}function Ha(){Ma=ja=null,Na=!1}function Ua(e){Pa===null?Pa=[e]:Pa.push(e)}var Wa=S.ReactCurrentBatchConfig;function Ga(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ka(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function qa(e){var t=e._init;return t(e._payload)}function Ja(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=cu(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===M&&qa(i)===t.type)?(r=a(t,n.props),r.ref=Ga(e,t,n),r.return=e,r):(r=lu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ga(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=uu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=fu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case C:return n=lu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ga(e,null,t),n.return=e,n;case w:return t=pu(t,e.mode,n),t.return=e,t;case M:var r=t._init;return f(e,r(t._payload),n)}if(we(t)||ie(t))return t=uu(t,e.mode,n,null),t.return=e,t;Ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case M:return i=n._init,p(e,t,i(n._payload),r)}if(we(n)||ie(n))return i===null?d(e,t,n,r,null):null;Ka(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case M:var a=r._init;return m(e,t,n,a(r._payload),i)}if(we(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);Ka(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Na&&Da(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Na&&Da(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Na&&Da(r,h),l}function g(a,s,c,l){var u=ie(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Na&&Da(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Na&&Da(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Na&&Da(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===M&&qa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ga(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===T?(r=uu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=lu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ga(e,r,i),o.return=e,e=o)}return s(e);case w:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=pu(i,e.mode,o),r.return=e,e=r}return s(e);case M:return l=i._init,_(e,r,l(i._payload),o)}if(we(i))return h(e,r,i,o);if(ie(i))return g(e,r,i,o);Ka(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=fu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ya=Ja(!0),Xa=Ja(!1),Za=Qi(null),Qa=null,$a=null,eo=null;function to(){eo=$a=Qa=null}function no(e){var t=Za.current;$i(Za),e._currentValue=t}function ro(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function io(e,t){Qa=e,eo=$a=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ks=!0),e.firstContext=null)}function ao(e){var t=e._currentValue;if(eo!==e)if(e={context:e,memoizedValue:t,next:null},$a===null){if(Qa===null)throw Error(r(308));$a=e,Qa.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var oo=null;function so(e){oo===null?oo=[e]:oo.push(e)}function co(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,so(t)):(n.next=i.next,i.next=n),t.interleaved=n,lo(e,r)}function lo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var F=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function po(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,tl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lo(e,n)}return i=r.interleaved,i===null?(t.next=t,so(r)):(t.next=i.next,i.next=t),r.interleaved=t,lo(e,n)}function ho(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kt(e,n)}}function go(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _o(e,t,n,r){var i=e.updateQueue;F=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=N({},d,f);break a;case 2:F=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);ll|=o,e.lanes=o,e.memoizedState=d}}function vo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var yo={},bo=Qi(yo),xo=Qi(yo),So=Qi(yo);function Co(e){if(e===yo)throw Error(r(174));return e}function wo(e,t){switch(ea(So,t),ea(xo,e),ea(bo,yo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:je(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=je(t,e)}$i(bo),ea(bo,t)}function To(){$i(bo),$i(xo),$i(So)}function I(e){Co(So.current);var t=Co(bo.current),n=je(t,e.type);t!==n&&(ea(xo,e),ea(bo,n))}function Eo(e){xo.current===e&&($i(bo),$i(xo))}var Do=Qi(0);function Oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ko=[];function L(){for(var e=0;e<ko.length;e++)ko[e]._workInProgressVersionPrimary=null;ko.length=0}var Ao=S.ReactCurrentDispatcher,jo=S.ReactCurrentBatchConfig,Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=0,zo=0;function Bo(){throw Error(r(321))}function Vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Ho(e,t,n,i,a,o){if(Mo=o,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ao.current=e===null||e.memoizedState===null?Es:Ds,e=n(i,a),Lo){o=0;do{if(Lo=!1,Ro=0,25<=o)throw Error(r(301));o+=1,Fo=Po=null,t.updateQueue=null,Ao.current=Os,e=n(i,a)}while(Lo)}if(Ao.current=Ts,t=Po!==null&&Po.next!==null,Mo=0,Fo=Po=No=null,Io=!1,t)throw Error(r(300));return e}function Uo(){var e=Ro!==0;return Ro=0,e}function Wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function Go(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw Error(r(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function Ko(e,t){return typeof t==`function`?t(e):t}function qo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Po,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Mo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,No.lanes|=d,ll|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Fr(i,t.memoizedState)||(Ks=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,No.lanes|=o,ll|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(Ks=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Yo(){}function Xo(e,t){var n=No,i=Go(),a=t(),o=!Fr(i.memoizedState,a);if(o&&(i.memoizedState=a,Ks=!0),i=i.queue,ls($o.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Fo!==null&&Fo.memoizedState.tag&1){if(n.flags|=2048,rs(9,Qo.bind(null,n,i,a,t),void 0,null),nl===null)throw Error(r(349));Mo&30||Zo(n,t,a)}return a}function Zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qo(e,t,n,r){t.value=n,t.getSnapshot=r,es(t)&&ts(e)}function $o(e,t,n){return n(function(){es(t)&&ts(e)})}function es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ts(e){var t=lo(e,1);t!==null&&Ol(t,e,1,-1)}function ns(e){var t=Wo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},t.queue=e,e=e.dispatch=xs.bind(null,No,e),[t.memoizedState,e]}function rs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function is(){return Go().memoizedState}function as(e,t,n,r){var i=Wo();No.flags|=e,i.memoizedState=rs(1|t,n,void 0,r===void 0?null:r)}function ss(e,t,n,r){var i=Go();r=r===void 0?null:r;var a=void 0;if(Po!==null){var o=Po.memoizedState;if(a=o.destroy,r!==null&&Vo(r,o.deps)){i.memoizedState=rs(t,n,a,r);return}}No.flags|=e,i.memoizedState=rs(1|t,n,a,r)}function cs(e,t){return as(8390656,8,e,t)}function ls(e,t){return ss(2048,8,e,t)}function us(e,t){return ss(4,2,e,t)}function ds(e,t){return ss(4,4,e,t)}function fs(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){return n=n==null?null:n.concat([e]),ss(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _s(e,t,n){return Mo&21?(Fr(n,t)||(n=Ht(),No.lanes|=n,ll|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ks=!0),e.memoizedState=n)}function vs(e,t){var n=qt;qt=n!==0&&4>n?n:4,e(!0);var r=jo.transition;jo.transition={};try{e(!1),t()}finally{qt=n,jo.transition=r}}function ys(){return Go().memoizedState}function bs(e,t,n){var r=z(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ss(e))Cs(t,n);else if(n=co(e,t,n,r),n!==null){var i=Dl();Ol(n,e,r,i),ws(n,t,r)}}function xs(e,t,n){var r=z(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ss(e))Cs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o)){var c=t.interleaved;c===null?(i.next=i,so(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=co(e,t,i,r),n!==null&&(i=Dl(),Ol(n,e,r,i),ws(n,t,r))}}function Ss(e){var t=e.alternate;return e===No||t!==null&&t===No}function Cs(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ws(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kt(e,n)}}var Ts={readContext:ao,useCallback:Bo,useContext:Bo,useEffect:Bo,useImperativeHandle:Bo,useInsertionEffect:Bo,useLayoutEffect:Bo,useMemo:Bo,useReducer:Bo,useRef:Bo,useState:Bo,useDebugValue:Bo,useDeferredValue:Bo,useTransition:Bo,useMutableSource:Bo,useSyncExternalStore:Bo,useId:Bo,unstable_isNewReconciler:!1},Es={readContext:ao,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:ao,useEffect:cs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),as(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){return as(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bs.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:ns,useDebugValue:ms,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=ns(!1),t=e[0];return e=vs.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=No,a=Wo();if(Na){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),nl===null)throw Error(r(349));Mo&30||Zo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs($o.bind(null,i,o,e),[e]),i.flags|=2048,rs(9,Qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=nl.identifierPrefix;if(Na){var n=Ea,r=Ta;n=(r&~(1<<32-jt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ro++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=zo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ds={readContext:ao,useCallback:hs,useContext:ao,useEffect:ls,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:qo,useRef:is,useState:function(){return qo(Ko)},useDebugValue:ms,useDeferredValue:function(e){return _s(Go(),Po.memoizedState,e)},useTransition:function(){return[qo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:ys,unstable_isNewReconciler:!1},Os={readContext:ao,useCallback:hs,useContext:ao,useEffect:ls,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Jo,useRef:is,useState:function(){return Jo(Ko)},useDebugValue:ms,useDeferredValue:function(e){var t=Go();return Po===null?t.memoizedState=e:_s(t,Po.memoizedState,e)},useTransition:function(){return[Jo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:ys,unstable_isNewReconciler:!1};function ks(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function As(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:N({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var js={isMounted:function(e){return(e=e._reactInternals)?dt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dl(),i=z(e),a=po(r,i);a.payload=t,n!=null&&(a.callback=n),t=mo(e,a,i),t!==null&&(Ol(t,e,i,r),ho(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dl(),i=z(e),a=po(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=mo(e,a,i),t!==null&&(Ol(t,e,i,r),ho(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dl(),r=z(e),i=po(n,r);i.tag=2,t!=null&&(i.callback=t),t=mo(e,i,r),t!==null&&(Ol(t,e,r,n),ho(t,e,r))}};function Ms(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function Ns(e,t,n){var r=!1,i=ta,a=t.contextType;return typeof a==`object`&&a?a=ao(a):(i=oa(t)?ia:na.current,r=t.contextTypes,a=(r=r!=null)?aa(e,i):ta),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=js,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ps(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&js.enqueueReplaceState(t,t.state,null)}function Fs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},uo(e);var a=t.contextType;typeof a==`object`&&a?i.context=ao(a):(a=oa(t)?ia:na.current,i.context=aa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(As(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&js.enqueueReplaceState(i,i.state,null),_o(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Is(e,t){try{var n=``,r=t;do n+=le(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
44
|
+
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?se(e):``}function ue(e){switch(e.tag){case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return``}}function de(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case T:return`Fragment`;case w:return`Portal`;case ee:return`Profiler`;case E:return`StrictMode`;case k:return`Suspense`;case A:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case O:return(e.displayName||`Context`)+`.Consumer`;case D:return(e._context.displayName||`Context`)+`.Provider`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case j:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}function fe(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return de(t);case 8:return t===E?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function pe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function me(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function he(e){var t=me(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ge(e){e._valueTracker||=he(e)}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=me(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ve(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function N(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ye(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=pe(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function be(e,t){t=t.checked,t!=null&&x(e,`checked`,t,!1)}function xe(e,t){be(e,t);var n=pe(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Ce(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Ce(e,t.type,pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Ce(e,t,n){(t!==`number`||ve(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var we=Array.isArray;function Te(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+pe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ee(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ae({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function De(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(we(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:pe(n)}}function Oe(e,t){var n=pe(t.value),r=pe(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function ke(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ae(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function je(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ae(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Me,Ne=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Me||=document.createElement(`div`),Me.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ie=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Fe).forEach(function(e){Ie.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fe[t]=Fe[e]})});function Le(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Fe.hasOwnProperty(e)&&Fe[e]?(``+t).trim():t+`px`}function Re(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Le(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var ze=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Be(e,t){if(t){if(ze[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ve(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var He=null;function Ue(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var We=null,Ge=null,Ke=null;function qe(e){if(e=qi(e)){if(typeof We!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),We(e.stateNode,e.type,t))}}function Je(e){Ge?Ke?Ke.push(e):Ke=[e]:Ge=e}function Ye(){if(Ge){var e=Ge,t=Ke;if(Ke=Ge=null,qe(e),t)for(e=0;e<t.length;e++)qe(t[e])}}function Xe(e,t){return e(t)}function Ze(){}var Qe=!1;function $e(e,t,n){if(Qe)return e(t,n);Qe=!0;try{return Xe(e,t,n)}finally{Qe=!1,(Ge!==null||Ke!==null)&&(Ze(),Ye())}}function et(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var tt=!1;if(c)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){tt=!0}}),window.addEventListener(`test`,nt,nt),window.removeEventListener(`test`,nt,nt)}catch{tt=!1}function rt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var it=!1,at=null,ot=!1,st=null,ct={onError:function(e){it=!0,at=e}};function lt(e,t,n,r,i,a,o,s,c){it=!1,at=null,rt.apply(ct,arguments)}function ut(e,t,n,i,a,o,s,c,l){if(lt.apply(this,arguments),it){if(it){var u=at;it=!1,at=null}else throw Error(r(198));ot||(ot=!0,st=u)}}function dt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ft(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function pt(e){if(dt(e)!==e)throw Error(r(188))}function mt(e){var t=e.alternate;if(!t){if(t=dt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return pt(a),e;if(o===i)return pt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ht(e){return e=mt(e),e===null?null:gt(e)}function gt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gt(e);if(t!==null)return t;e=e.sibling}return null}var _t=n.unstable_scheduleCallback,vt=n.unstable_cancelCallback,yt=n.unstable_shouldYield,bt=n.unstable_requestPaint,xt=n.unstable_now,St=n.unstable_getCurrentPriorityLevel,Ct=n.unstable_ImmediatePriority,wt=n.unstable_UserBlockingPriority,Tt=n.unstable_NormalPriority,Et=n.unstable_LowPriority,Dt=n.unstable_IdlePriority,Ot=null,kt=null;function At(e){if(kt&&typeof kt.onCommitFiberRoot==`function`)try{kt.onCommitFiberRoot(Ot,e,void 0,(e.current.flags&128)==128)}catch{}}var jt=Math.clz32?Math.clz32:Pt,Mt=Math.log,Nt=Math.LN2;function Pt(e){return e>>>=0,e===0?32:31-(Mt(e)/Nt|0)|0}var Ft=64,It=4194304;function Lt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Lt(a))):r=Lt(s)}else o=n&~i,o===0?a!==0&&(r=Lt(a)):r=Lt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jt(t),i=1<<n,r|=e[n],t&=~i;return r}function zt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-jt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=zt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Vt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ht(){var e=Ft;return Ft<<=1,!(Ft&4194240)&&(Ft=64),e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=n}function Gt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-jt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Kt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qt=0;function Jt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Yt,Xt,Zt,Qt,$t,en=!1,tn=[],nn=null,rn=null,an=null,on=new Map,sn=new Map,cn=[],ln=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function un(e,t){switch(e){case`focusin`:case`focusout`:nn=null;break;case`dragenter`:case`dragleave`:rn=null;break;case`mouseover`:case`mouseout`:an=null;break;case`pointerover`:case`pointerout`:on.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:sn.delete(t.pointerId)}}function dn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qi(t),t!==null&&Xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function fn(e,t,n,r,i){switch(t){case`focusin`:return nn=dn(nn,e,t,n,r,i),!0;case`dragenter`:return rn=dn(rn,e,t,n,r,i),!0;case`mouseover`:return an=dn(an,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return on.set(a,dn(on.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,sn.set(a,dn(sn.get(a)||null,e,t,n,r,i)),!0}return!1}function pn(e){var t=Ki(e.target);if(t!==null){var n=dt(t);if(n!==null){if(t=n.tag,t===13){if(t=ft(n),t!==null){e.blockedOn=t,$t(e.priority,function(){Zt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);He=r,n.target.dispatchEvent(r),He=null}else return t=qi(n),t!==null&&Xt(t),e.blockedOn=n,!1;t.shift()}return!0}function hn(e,t,n){mn(e)&&n.delete(t)}function gn(){en=!1,nn!==null&&mn(nn)&&(nn=null),rn!==null&&mn(rn)&&(rn=null),an!==null&&mn(an)&&(an=null),on.forEach(hn),sn.forEach(hn)}function _n(e,t){e.blockedOn===t&&(e.blockedOn=null,en||(en=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,gn)))}function vn(e){function t(t){return _n(t,e)}if(0<tn.length){_n(tn[0],e);for(var n=1;n<tn.length;n++){var r=tn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&_n(nn,e),rn!==null&&_n(rn,e),an!==null&&_n(an,e),on.forEach(t),sn.forEach(t),n=0;n<cn.length;n++)r=cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<cn.length&&(n=cn[0],n.blockedOn===null);)pn(n),n.blockedOn===null&&cn.shift()}var yn=S.ReactCurrentBatchConfig,bn=!0;function xn(e,t,n,r){var i=qt,a=yn.transition;yn.transition=null;try{qt=1,Cn(e,t,n,r)}finally{qt=i,yn.transition=a}}function Sn(e,t,n,r){var i=qt,a=yn.transition;yn.transition=null;try{qt=4,Cn(e,t,n,r)}finally{qt=i,yn.transition=a}}function Cn(e,t,n,r){if(bn){var i=Tn(e,t,n,r);if(i===null)vi(e,t,r,wn,n),un(e,r);else if(fn(i,e,t,n,r))r.stopPropagation();else if(un(e,r),t&4&&-1<ln.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Yt(a),a=Tn(e,t,n,r),a===null&&vi(e,t,r,wn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var wn=null;function Tn(e,t,n,r){if(wn=null,e=Ue(r),e=Ki(e),e!==null)if(t=dt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ft(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wn=e,null}function En(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(St()){case Ct:return 1;case wt:return 4;case Tt:case Et:return 16;case Dt:return 536870912;default:return 16}default:return 16}}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return kn=i.slice(e,1<r?1-r:void 0)}function jn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Mn(){return!0}function Nn(){return!1}function Pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Mn:Nn,this.isPropagationStopped=Nn,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=ae({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=ae({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(ae({},Hn,{dataTransfer:0})),Gn=Pn(ae({},Ln,{relatedTarget:0})),Kn=Pn(ae({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(ae({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(ae({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(ae({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(ae({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(ae({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),rr=Pn(ae({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ir=Pn(ae({},Hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ar=[9,13,27,32],or=c&&`CompositionEvent`in window,sr=null;c&&`documentMode`in document&&(sr=document.documentMode);var cr=c&&`TextEvent`in window&&!sr,lr=c&&(!or||sr&&8<sr&&11>=sr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return ar.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var P=!1;function mr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function hr(e,t){if(P)return e===`compositionend`||!or&&fr(e,t)?(e=An(),kn=On=Dn=null,P=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return lr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){Je(r),t=bi(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){fi(e,0)}function Sr(e){if(_e(Ji(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(c){var Tr;if(c){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,Ue(e)),$e(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(){for(var e=window,t=ve();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ve(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Hr(e){var t=Br(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zr(n.ownerDocument.documentElement,n)){if(r!==null&&Vr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Rr(n,a);var o=Rr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ur=c&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==ve(r)||(r=Wr,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=bi(Gr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};c&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionend`),ii=new Map,ai=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function oi(e,t){ii.set(e,t),o(t,[e])}for(var si=0;si<ai.length;si++){var ci=ai[si];oi(ci.toLowerCase(),`on`+(ci[0].toUpperCase()+ci.slice(1)))}oi(ei,`onAnimationEnd`),oi(ti,`onAnimationIteration`),oi(ni,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ri,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var li=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),ui=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(li));function di(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ut(r,t,void 0,e),e.currentTarget=null}function fi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}}}if(ot)throw e=st,ot=!1,st=null,e}function pi(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ui.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(En(t)){case 1:var i=xn;break;case 4:i=Sn;break;default:i=Cn}n=i.bind(null,t,n,e),i=void 0,!tt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}$e(function(){var r=a,i=Ue(n),o=[];a:{var s=ii.get(e);if(s!==void 0){var c=In,l=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:c=er;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=nr;break;case ei:case ti:case ni:c=Kn;break;case ri:c=rr;break;case`scroll`:c=Rn;break;case`wheel`:c=ir;break;case`copy`:case`cut`:case`paste`:c=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=tr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=et(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==He&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=dt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=tr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Cr;else if(_r(s))if(wr)g=Nr;else{g=jr;var _=Ar}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Mr);if(g&&=g(e,r)){vr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Ce(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(_r(_)||_.contentEditable===`true`)&&(Wr=_,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(o,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(o,n,i)}var v;if(or)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else P?fr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(lr&&n.locale!==`ko`&&(P||y!==`onCompositionStart`?y===`onCompositionEnd`&&P&&(v=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,P=!0)),_=bi(r,y),0<_.length&&(y=new Jn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=cr?mr(e,n):hr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}fi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=et(e,n),a!=null&&r.unshift(yi(e,a,i)),a=et(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=et(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=et(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,`
|
|
45
|
+
`).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),vn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);vn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function $i(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function ea(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var ta={},na=Qi(ta),ra=Qi(!1),ia=ta;function aa(e,t){var n=e.type.contextTypes;if(!n)return ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function oa(e){return e=e.childContextTypes,e!=null}function sa(){$i(ra),$i(na)}function ca(e,t,n){if(na.current!==ta)throw Error(r(168));ea(na,t),ea(ra,n)}function la(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,fe(e)||`Unknown`,a));return ae({},n,i)}function ua(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ta,ia=na.current,ea(na,e),ea(ra,ra.current),!0}function da(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=la(e,t,ia),i.__reactInternalMemoizedMergedChildContext=e,$i(ra),$i(na),ea(na,e)):$i(ra),ea(ra,n)}var fa=null,pa=!1,ma=!1;function ha(e){fa===null?fa=[e]:fa.push(e)}function ga(e){pa=!0,ha(e)}function _a(){if(!ma&&fa!==null){ma=!0;var e=0,t=qt;try{var n=fa;for(qt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fa=null,pa=!1}catch(t){throw fa!==null&&(fa=fa.slice(e+1)),_t(Ct,_a),t}finally{qt=t,ma=!1}}return null}var va=[],ya=0,ba=null,xa=0,Sa=[],Ca=0,wa=null,Ta=1,Ea=``;function Da(e,t){va[ya++]=xa,va[ya++]=ba,ba=e,xa=t}function Oa(e,t,n){Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,wa=e;var r=Ta;e=Ea;var i=32-jt(r)-1;r&=~(1<<i),n+=1;var a=32-jt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ta=1<<32-jt(t)+i|n<<i|r,Ea=a+e}else Ta=1<<a|n<<i|r,Ea=e}function ka(e){e.return!==null&&(Da(e,1),Oa(e,1,0))}function Aa(e){for(;e===ba;)ba=va[--ya],va[ya]=null,xa=va[--ya],va[ya]=null;for(;e===wa;)wa=Sa[--Ca],Sa[Ca]=null,Ea=Sa[--Ca],Sa[Ca]=null,Ta=Sa[--Ca],Sa[Ca]=null}var ja=null,Ma=null,Na=!1,Pa=null;function Fa(e,t){var n=au(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ia(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=wa===null?null:{id:Ta,overflow:Ea},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=au(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ja=e,Ma=null,!0);default:return!1}}function La(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ra(e){if(Na){var t=Ma;if(t){var n=t;if(!Ia(e,t)){if(La(e))throw Error(r(418));t=Li(n.nextSibling);var i=ja;t&&Ia(e,t)?Fa(i,n):(e.flags=e.flags&-4097|2,Na=!1,ja=e)}}else{if(La(e))throw Error(r(418));e.flags=e.flags&-4097|2,Na=!1,ja=e}}}function za(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ja=e}function Ba(e){if(e!==ja)return!1;if(!Na)return za(e),Na=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Ma){if(La(e))throw Va(),Error(r(418));for(;t;)Fa(e,t),t=Li(t.nextSibling)}if(za(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ma=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ma=null}}else Ma=ja?Li(e.stateNode.nextSibling):null;return!0}function Va(){for(var e=Ma;e;)e=Li(e.nextSibling)}function Ha(){Ma=ja=null,Na=!1}function Ua(e){Pa===null?Pa=[e]:Pa.push(e)}var Wa=S.ReactCurrentBatchConfig;function Ga(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ka(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function qa(e){var t=e._init;return t(e._payload)}function Ja(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=cu(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===M&&qa(i)===t.type)?(r=a(t,n.props),r.ref=Ga(e,t,n),r.return=e,r):(r=lu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ga(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=uu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=fu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case C:return n=lu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ga(e,null,t),n.return=e,n;case w:return t=pu(t,e.mode,n),t.return=e,t;case M:var r=t._init;return f(e,r(t._payload),n)}if(we(t)||ie(t))return t=uu(t,e.mode,n,null),t.return=e,t;Ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case M:return i=n._init,p(e,t,i(n._payload),r)}if(we(n)||ie(n))return i===null?d(e,t,n,r,null):null;Ka(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case M:var a=r._init;return m(e,t,n,a(r._payload),i)}if(we(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);Ka(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Na&&Da(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Na&&Da(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Na&&Da(r,h),l}function g(a,s,c,l){var u=ie(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Na&&Da(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Na&&Da(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Na&&Da(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===M&&qa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ga(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===T?(r=uu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=lu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ga(e,r,i),o.return=e,e=o)}return s(e);case w:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=pu(i,e.mode,o),r.return=e,e=r}return s(e);case M:return l=i._init,_(e,r,l(i._payload),o)}if(we(i))return h(e,r,i,o);if(ie(i))return g(e,r,i,o);Ka(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=fu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ya=Ja(!0),Xa=Ja(!1),Za=Qi(null),Qa=null,$a=null,eo=null;function to(){eo=$a=Qa=null}function no(e){var t=Za.current;$i(Za),e._currentValue=t}function ro(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function io(e,t){Qa=e,eo=$a=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ks=!0),e.firstContext=null)}function ao(e){var t=e._currentValue;if(eo!==e)if(e={context:e,memoizedValue:t,next:null},$a===null){if(Qa===null)throw Error(r(308));$a=e,Qa.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var oo=null;function so(e){oo===null?oo=[e]:oo.push(e)}function co(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,so(t)):(n.next=i.next,i.next=n),t.interleaved=n,lo(e,r)}function lo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var F=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function po(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,tl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lo(e,n)}return i=r.interleaved,i===null?(t.next=t,so(r)):(t.next=i.next,i.next=t),r.interleaved=t,lo(e,n)}function ho(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kt(e,n)}}function go(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _o(e,t,n,r){var i=e.updateQueue;F=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ae({},d,f);break a;case 2:F=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);ll|=o,e.lanes=o,e.memoizedState=d}}function vo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var yo={},bo=Qi(yo),xo=Qi(yo),So=Qi(yo);function Co(e){if(e===yo)throw Error(r(174));return e}function wo(e,t){switch(ea(So,t),ea(xo,e),ea(bo,yo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:je(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=je(t,e)}$i(bo),ea(bo,t)}function To(){$i(bo),$i(xo),$i(So)}function I(e){Co(So.current);var t=Co(bo.current),n=je(t,e.type);t!==n&&(ea(xo,e),ea(bo,n))}function Eo(e){xo.current===e&&($i(bo),$i(xo))}var Do=Qi(0);function Oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ko=[];function L(){for(var e=0;e<ko.length;e++)ko[e]._workInProgressVersionPrimary=null;ko.length=0}var Ao=S.ReactCurrentDispatcher,jo=S.ReactCurrentBatchConfig,Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=0,zo=0;function Bo(){throw Error(r(321))}function Vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Ho(e,t,n,i,a,o){if(Mo=o,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ao.current=e===null||e.memoizedState===null?Es:Ds,e=n(i,a),Lo){o=0;do{if(Lo=!1,Ro=0,25<=o)throw Error(r(301));o+=1,Fo=Po=null,t.updateQueue=null,Ao.current=Os,e=n(i,a)}while(Lo)}if(Ao.current=Ts,t=Po!==null&&Po.next!==null,Mo=0,Fo=Po=No=null,Io=!1,t)throw Error(r(300));return e}function Uo(){var e=Ro!==0;return Ro=0,e}function Wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function Go(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw Error(r(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function Ko(e,t){return typeof t==`function`?t(e):t}function qo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Po,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Mo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,No.lanes|=d,ll|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Fr(i,t.memoizedState)||(Ks=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,No.lanes|=o,ll|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(Ks=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Yo(){}function Xo(e,t){var n=No,i=Go(),a=t(),o=!Fr(i.memoizedState,a);if(o&&(i.memoizedState=a,Ks=!0),i=i.queue,ls($o.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Fo!==null&&Fo.memoizedState.tag&1){if(n.flags|=2048,rs(9,Qo.bind(null,n,i,a,t),void 0,null),nl===null)throw Error(r(349));Mo&30||Zo(n,t,a)}return a}function Zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qo(e,t,n,r){t.value=n,t.getSnapshot=r,es(t)&&ts(e)}function $o(e,t,n){return n(function(){es(t)&&ts(e)})}function es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ts(e){var t=lo(e,1);t!==null&&Ol(t,e,1,-1)}function ns(e){var t=Wo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},t.queue=e,e=e.dispatch=xs.bind(null,No,e),[t.memoizedState,e]}function rs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function is(){return Go().memoizedState}function as(e,t,n,r){var i=Wo();No.flags|=e,i.memoizedState=rs(1|t,n,void 0,r===void 0?null:r)}function ss(e,t,n,r){var i=Go();r=r===void 0?null:r;var a=void 0;if(Po!==null){var o=Po.memoizedState;if(a=o.destroy,r!==null&&Vo(r,o.deps)){i.memoizedState=rs(t,n,a,r);return}}No.flags|=e,i.memoizedState=rs(1|t,n,a,r)}function cs(e,t){return as(8390656,8,e,t)}function ls(e,t){return ss(2048,8,e,t)}function us(e,t){return ss(4,2,e,t)}function ds(e,t){return ss(4,4,e,t)}function fs(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){return n=n==null?null:n.concat([e]),ss(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _s(e,t,n){return Mo&21?(Fr(n,t)||(n=Ht(),No.lanes|=n,ll|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ks=!0),e.memoizedState=n)}function vs(e,t){var n=qt;qt=n!==0&&4>n?n:4,e(!0);var r=jo.transition;jo.transition={};try{e(!1),t()}finally{qt=n,jo.transition=r}}function ys(){return Go().memoizedState}function bs(e,t,n){var r=z(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ss(e))Cs(t,n);else if(n=co(e,t,n,r),n!==null){var i=Dl();Ol(n,e,r,i),ws(n,t,r)}}function xs(e,t,n){var r=z(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ss(e))Cs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o)){var c=t.interleaved;c===null?(i.next=i,so(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=co(e,t,i,r),n!==null&&(i=Dl(),Ol(n,e,r,i),ws(n,t,r))}}function Ss(e){var t=e.alternate;return e===No||t!==null&&t===No}function Cs(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ws(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kt(e,n)}}var Ts={readContext:ao,useCallback:Bo,useContext:Bo,useEffect:Bo,useImperativeHandle:Bo,useInsertionEffect:Bo,useLayoutEffect:Bo,useMemo:Bo,useReducer:Bo,useRef:Bo,useState:Bo,useDebugValue:Bo,useDeferredValue:Bo,useTransition:Bo,useMutableSource:Bo,useSyncExternalStore:Bo,useId:Bo,unstable_isNewReconciler:!1},Es={readContext:ao,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:ao,useEffect:cs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),as(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){return as(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bs.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:ns,useDebugValue:ms,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=ns(!1),t=e[0];return e=vs.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=No,a=Wo();if(Na){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),nl===null)throw Error(r(349));Mo&30||Zo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs($o.bind(null,i,o,e),[e]),i.flags|=2048,rs(9,Qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=nl.identifierPrefix;if(Na){var n=Ea,r=Ta;n=(r&~(1<<32-jt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ro++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=zo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ds={readContext:ao,useCallback:hs,useContext:ao,useEffect:ls,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:qo,useRef:is,useState:function(){return qo(Ko)},useDebugValue:ms,useDeferredValue:function(e){return _s(Go(),Po.memoizedState,e)},useTransition:function(){return[qo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:ys,unstable_isNewReconciler:!1},Os={readContext:ao,useCallback:hs,useContext:ao,useEffect:ls,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Jo,useRef:is,useState:function(){return Jo(Ko)},useDebugValue:ms,useDeferredValue:function(e){var t=Go();return Po===null?t.memoizedState=e:_s(t,Po.memoizedState,e)},useTransition:function(){return[Jo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:ys,unstable_isNewReconciler:!1};function ks(e,t){if(e&&e.defaultProps){for(var n in t=ae({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function As(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var js={isMounted:function(e){return(e=e._reactInternals)?dt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dl(),i=z(e),a=po(r,i);a.payload=t,n!=null&&(a.callback=n),t=mo(e,a,i),t!==null&&(Ol(t,e,i,r),ho(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dl(),i=z(e),a=po(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=mo(e,a,i),t!==null&&(Ol(t,e,i,r),ho(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dl(),r=z(e),i=po(n,r);i.tag=2,t!=null&&(i.callback=t),t=mo(e,i,r),t!==null&&(Ol(t,e,r,n),ho(t,e,r))}};function Ms(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function Ns(e,t,n){var r=!1,i=ta,a=t.contextType;return typeof a==`object`&&a?a=ao(a):(i=oa(t)?ia:na.current,r=t.contextTypes,a=(r=r!=null)?aa(e,i):ta),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=js,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ps(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&js.enqueueReplaceState(t,t.state,null)}function Fs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},uo(e);var a=t.contextType;typeof a==`object`&&a?i.context=ao(a):(a=oa(t)?ia:na.current,i.context=aa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(As(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&js.enqueueReplaceState(i,i.state,null),_o(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Is(e,t){try{var n=``,r=t;do n+=ue(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
46
46
|
Error generating stack: `+e.message+`
|
|
47
|
-
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ls(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var zs=typeof WeakMap==`function`?WeakMap:Map;function Bs(e,t,n){n=po(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,vl=r),Rs(e,t)},n}function Vs(e,t,n){n=po(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Rs(e,t),typeof r!=`function`&&(yl===null?yl=new Set([this]):yl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Hs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ql.bind(null,e,t,n),t.then(e,e))}function Us(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ws(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=po(-1,1),t.tag=2,mo(n,t,1))),n.lanes|=1),e)}var Gs=S.ReactCurrentOwner,Ks=!1;function qs(e,t,n,r){t.child=e===null?Xa(t,null,n,r):Ya(t,e.child,n,r)}function Js(e,t,n,r,i){n=n.render;var a=t.ref;return io(t,i),r=Ho(e,t,n,r,a,i),n=Uo(),e!==null&&!Ks?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mc(e,t,i)):(Na&&n&&ka(t),t.flags|=1,qs(e,t,r,i),t.child)}function Ys(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ou(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Xs(e,t,a,r,i)):(e=lu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return mc(e,t,i)}return t.flags|=1,e=cu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Xs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(Ks=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ks=!0);else return t.lanes=e.lanes,mc(e,t,i)}return $s(e,t,n,r,i)}function Zs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ea(ol,al),al|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ea(ol,al),al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,ea(ol,al),al|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),ea(ol,al),al|=r;return qs(e,t,i,n),t.child}function Qs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $s(e,t,n,r,i){var a=oa(n)?ia:na.current;return a=aa(t,a),io(t,i),n=Ho(e,t,n,r,a,i),r=Uo(),e!==null&&!Ks?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mc(e,t,i)):(Na&&r&&ka(t),t.flags|=1,qs(e,t,n,i),t.child)}function ec(e,t,n,r,i){if(oa(n)){var a=!0;ua(t)}else a=!1;if(io(t,i),t.stateNode===null)pc(e,t),Ns(t,n,r),Fs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=ao(l):(l=oa(n)?ia:na.current,l=aa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ps(t,o,r,l),F=!1;var f=t.memoizedState;o.state=f,_o(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ra.current||F?(typeof u==`function`&&(As(t,n,u,r),c=t.memoizedState),(s=F||Ms(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,fo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:ks(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=ao(c):(c=oa(n)?ia:na.current,c=aa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ps(t,o,r,c),F=!1,f=t.memoizedState,o.state=f,_o(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ra.current||F?(typeof p==`function`&&(As(t,n,p,r),m=t.memoizedState),(l=F||Ms(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return tc(e,t,n,r,a,i)}function tc(e,t,n,r,i,a){Qs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&da(t,n,!1),mc(e,t,a);r=t.stateNode,Gs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ya(t,e.child,null,a),t.child=Ya(t,null,s,a)):qs(e,t,s,a),t.memoizedState=r.state,i&&da(t,n,!0),t.child}function nc(e){var t=e.stateNode;t.pendingContext?ca(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ca(e,t.context,!1),wo(e,t.containerInfo)}function rc(e,t,n,r,i){return Ha(),Ua(i),t.flags|=256,qs(e,t,n,r),t.child}var ic={dehydrated:null,treeContext:null,retryLane:0};function ac(e){return{baseLanes:e,cachePool:null,transitions:null}}function oc(e,t,n){var r=t.pendingProps,i=Do.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ea(Do,i&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=du(o,r,0,null),e=uu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ac(n),t.memoizedState=ic,e):sc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return lc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=cu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=uu(a,o,n,null),a.flags|=2):a=cu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ac(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ic,r}return a=e.child,e=a.sibling,r=cu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sc(e,t){return t=du({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function cc(e,t,n,r){return r!==null&&Ua(r),Ya(t,e.child,null,n),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ls(Error(r(422))),cc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=du({mode:`visible`,children:i.children},a,0,null),o=uu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ya(t,e.child,null,s),t.child.memoizedState=ac(s),t.memoizedState=ic,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return cc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ls(o,i,void 0),cc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ks||c){if(i=nl,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,lo(e,a),Ol(i,e,a,-1))}return Vl(),i=Ls(Error(r(421))),cc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=eu.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ma=Li(a.nextSibling),ja=t,Na=!0,Pa=null,e!==null&&(Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,Ta=e.id,Ea=e.overflow,wa=t),t=sc(t,i.children),t.flags|=4096,t)}function uc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ro(e.return,t,n)}function dc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function fc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(qs(e,t,r.children,n),r=Do.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uc(e,n,t);else if(e.tag===19)uc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ea(Do,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),dc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}dc(t,!0,n,null,a);break;case`together`:dc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ll|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=cu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hc(e,t,n){switch(t.tag){case 3:nc(t),Ha();break;case 5:I(t);break;case 1:oa(t.type)&&ua(t);break;case 4:wo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ea(Za,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ea(Do,Do.current&1),e=mc(e,t,n),e===null?null:e.sibling):oc(e,t,n):(ea(Do,Do.current&1),t.flags|=128,null);ea(Do,Do.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ea(Do,Do.current),r)break;return null;case 22:case 23:return t.lanes=0,Zs(e,t,n)}return mc(e,t,n)}var gc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_c=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Co(bo.current);var o=null;switch(n){case`input`:i=ve(e,i),r=ve(e,r),o=[];break;case`select`:i=N({},i,{value:void 0}),r=N({},r,{value:void 0}),o=[];break;case`textarea`:i=Ee(e,i),r=Ee(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}Be(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&pi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},vc=function(e,t,n,r){n!==r&&(t.flags|=4)};function yc(e,t){if(!Na)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xc(e,t,n){var i=t.pendingProps;switch(Aa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bc(t),null;case 1:return oa(t.type)&&sa(),bc(t),null;case 3:return i=t.stateNode,To(),$i(ra),$i(na),L(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pa!==null&&(Ml(Pa),Pa=null))),bc(t),null;case 5:Eo(t);var o=Co(So.current);if(n=t.type,e!==null&&t.stateNode!=null)_c(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return bc(t),null}if(e=Co(bo.current),Ba(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=(t.mode&1)!=0,n){case`dialog`:pi(`cancel`,i),pi(`close`,i);break;case`iframe`:case`object`:case`embed`:pi(`load`,i);break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],i);break;case`source`:pi(`error`,i);break;case`img`:case`image`:case`link`:pi(`error`,i),pi(`load`,i);break;case`details`:pi(`toggle`,i);break;case`input`:ye(i,s),pi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},pi(`invalid`,i);break;case`textarea`:De(i,s),pi(`invalid`,i)}for(var c in Be(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&pi(`scroll`,i)}switch(n){case`input`:he(i),Se(i,s,!0);break;case`textarea`:he(i),ke(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ae(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,gc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ve(n,i),n){case`dialog`:pi(`cancel`,e),pi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:pi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],e);o=i;break;case`source`:pi(`error`,e),o=i;break;case`img`:case`image`:case`link`:pi(`error`,e),pi(`load`,e),o=i;break;case`details`:pi(`toggle`,e),o=i;break;case`input`:ye(e,i),o=ve(e,i),pi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=N({},i,{value:void 0}),pi(`invalid`,e);break;case`textarea`:De(e,i),o=Ee(e,i),pi(`invalid`,e);break;default:o=i}for(s in Be(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Re(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ne(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Pe(e,u):typeof u==`number`&&Pe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&pi(`scroll`,e):u!=null&&x(e,s,u,c))}switch(n){case`input`:he(e),Se(e,i,!1);break;case`textarea`:he(e),ke(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+fe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Te(e,!!i.multiple,i.defaultValue,!0):Te(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return bc(t),null;case 6:if(e&&t.stateNode!=null)vc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=Co(So.current),Co(bo.current),Ba(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ja,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return bc(t),null;case 13:if($i(Do),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Na&&Ma!==null&&t.mode&1&&!(t.flags&128))Va(),Ha(),t.flags|=98560,s=!1;else if(s=Ba(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else Ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bc(t),s=!1}else Pa!==null&&(Ml(Pa),Pa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Do.current&1?sl===0&&(sl=3):Vl())),t.updateQueue!==null&&(t.flags|=4),bc(t),null);case 4:return To(),e===null&&gi(t.stateNode.containerInfo),bc(t),null;case 10:return no(t.type._context),bc(t),null;case 17:return oa(t.type)&&sa(),bc(t),null;case 19:if($i(Do),s=t.memoizedState,s===null)return bc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)yc(s,!1);else{if(sl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Oo(e),c!==null){for(t.flags|=128,yc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ea(Do,Do.current&1|2),t.child}e=e.sibling}s.tail!==null&&xt()>hl&&(t.flags|=128,i=!0,yc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Oo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Na)return bc(t),null}else 2*xt()-s.renderingStartTime>hl&&n!==1073741824&&(t.flags|=128,i=!0,yc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(bc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=xt(),t.sibling=null,n=Do.current,ea(Do,i?n&1|2:n&1),t);case 22:case 23:return Ll(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?al&1073741824&&(bc(t),t.subtreeFlags&6&&(t.flags|=8192)):bc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Sc(e,t){switch(Aa(t),t.tag){case 1:return oa(t.type)&&sa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return To(),$i(ra),$i(na),L(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Eo(t),null;case 13:if($i(Do),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $i(Do),null;case 4:return To(),null;case 10:return no(t.type._context),null;case 22:case 23:return Ll(),null;case 24:return null;default:return null}}var Cc=!1,wc=!1,Tc=typeof WeakSet==`function`?WeakSet:Set,R=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Zl(e,t,n)}else n.current=null}function Dc(e,t,n){try{n()}catch(n){Zl(e,t,n)}}var Oc=!1;function kc(e,t){if(Oi=bn,e=Br(),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ki={focusedElem:e,selectionRange:n},bn=!1,R=t;R!==null;)if(t=R,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ks(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Zl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return h=Oc,Oc=!1,h}function Ac(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Dc(t,n,a)}i=i.next}while(i!==r)}}function jc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Mc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Nc(e){var t=e.alternate;t!==null&&(e.alternate=null,Nc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pc(e){return e.tag===5||e.tag===3||e.tag===4}function Fc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function Lc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lc(e,t,n),e=e.sibling;e!==null;)Lc(e,t,n),e=e.sibling}var Rc=null,zc=!1;function Bc(e,t,n){for(n=n.child;n!==null;)Vc(e,t,n),n=n.sibling}function Vc(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount==`function`)try{kt.onCommitFiberUnmount(Ot,n)}catch{}switch(n.tag){case 5:wc||Ec(n,t);case 6:var r=Rc,i=zc;Rc=null,Bc(e,t,n),Rc=r,zc=i,Rc!==null&&(zc?(e=Rc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rc.removeChild(n.stateNode));break;case 18:Rc!==null&&(zc?(e=Rc,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),vn(e)):Ii(Rc,n.stateNode));break;case 4:r=Rc,i=zc,Rc=n.stateNode.containerInfo,zc=!0,Bc(e,t,n),Rc=r,zc=i;break;case 0:case 11:case 14:case 15:if(!wc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Dc(n,t,o),i=i.next}while(i!==r)}Bc(e,t,n);break;case 1:if(!wc&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Zl(n,t,e)}Bc(e,t,n);break;case 21:Bc(e,t,n);break;case 22:n.mode&1?(wc=(r=wc)||n.memoizedState!==null,Bc(e,t,n),wc=r):Bc(e,t,n);break;default:Bc(e,t,n)}}function Hc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tc),t.forEach(function(t){var r=tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Uc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Rc=c.stateNode,zc=!1;break a;case 3:Rc=c.stateNode.containerInfo,zc=!0;break a;case 4:Rc=c.stateNode.containerInfo,zc=!0;break a}c=c.return}if(Rc===null)throw Error(r(160));Vc(o,s,a),Rc=null,zc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Zl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wc(t,e),t=t.sibling}function Wc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Uc(t,e),Gc(e),i&4){try{Ac(3,e,e.return),jc(3,e)}catch(t){Zl(e,e.return,t)}try{Ac(5,e,e.return)}catch(t){Zl(e,e.return,t)}}break;case 1:Uc(t,e),Gc(e),i&512&&n!==null&&Ec(n,n.return);break;case 5:if(Uc(t,e),Gc(e),i&512&&n!==null&&Ec(n,n.return),e.flags&32){var a=e.stateNode;try{Pe(a,``)}catch(t){Zl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&be(a,o),Ve(c,s);var u=Ve(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Re(a,f):d===`dangerouslySetInnerHTML`?Ne(a,f):d===`children`?Pe(a,f):x(a,d,f,u)}switch(c){case`input`:xe(a,o);break;case`textarea`:Oe(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Te(a,!!o.multiple,o.multiple?[]:``,!1):Te(a,!!o.multiple,o.defaultValue,!0)):Te(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){Zl(e,e.return,t)}}break;case 6:if(Uc(t,e),Gc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Zl(e,e.return,t)}}break;case 3:if(Uc(t,e),Gc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{vn(t.containerInfo)}catch(t){Zl(e,e.return,t)}break;case 4:Uc(t,e),Gc(e);break;case 13:Uc(t,e),Gc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(ml=xt())),i&4&&Hc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(wc=(u=wc)||d,Uc(t,e),wc=u):Uc(t,e),Gc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(R=e,d=e.child;d!==null;){for(f=R=d;R!==null;){switch(p=R,m=p.child,p.tag){case 0:case 11:case 14:case 15:Ac(4,p,p.return);break;case 1:Ec(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Zl(i,n,e)}}break;case 5:Ec(p,p.return);break;case 22:if(p.memoizedState!==null){Yc(f);continue}}m===null?Yc(f):(m.return=p,R=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Le(`display`,s))}catch(t){Zl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Zl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Uc(t,e),Gc(e),i&4&&Hc(e);break;case 21:break;default:Uc(t,e),Gc(e)}}function Gc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Pc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Pe(a,``),i.flags&=-33),Lc(e,Fc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Ic(e,Fc(e),o);break;default:throw Error(r(161))}}catch(t){Zl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kc(e,t,n){R=e,qc(e,t,n)}function qc(e,t,n){for(var r=(e.mode&1)!=0;R!==null;){var i=R,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Cc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||wc;s=Cc;var l=wc;if(Cc=o,(wc=c)&&!l)for(R=i;R!==null;)o=R,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Xc(i):(c.return=o,R=c);for(;a!==null;)R=a,qc(a,t,n),a=a.sibling;R=i,Cc=s,wc=l}Jc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,R=a):Jc(e,t,n)}}function Jc(e){for(;R!==null;){var t=R;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:wc||jc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!wc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ks(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&vo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&vn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}wc||t.flags&512&&Mc(t)}catch(e){Zl(t,t.return,e)}}if(t===e){R=null;break}if(n=t.sibling,n!==null){n.return=t.return,R=n;break}R=t.return}}function Yc(e){for(;R!==null;){var t=R;if(t===e){R=null;break}var n=t.sibling;if(n!==null){n.return=t.return,R=n;break}R=t.return}}function Xc(e){for(;R!==null;){var t=R;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jc(4,t)}catch(e){Zl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Zl(t,i,e)}}var a=t.return;try{Mc(t)}catch(e){Zl(t,a,e)}break;case 5:var o=t.return;try{Mc(t)}catch(e){Zl(t,o,e)}}}catch(e){Zl(t,t.return,e)}if(t===e){R=null;break}var s=t.sibling;if(s!==null){s.return=t.return,R=s;break}R=t.return}}var Zc=Math.ceil,Qc=S.ReactCurrentDispatcher,$c=S.ReactCurrentOwner,el=S.ReactCurrentBatchConfig,tl=0,nl=null,rl=null,il=0,al=0,ol=Qi(0),sl=0,cl=null,ll=0,ul=0,dl=0,fl=null,pl=null,ml=0,hl=1/0,gl=null,_l=!1,vl=null,yl=null,bl=!1,xl=null,Sl=0,Cl=0,wl=null,Tl=-1,El=0;function Dl(){return tl&6?xt():Tl===-1?Tl=xt():Tl}function z(e){return e.mode&1?tl&2&&il!==0?il&-il:Wa.transition===null?(e=qt,e===0?(e=window.event,e=e===void 0?16:En(e.type),e):e):(El===0&&(El=Ht()),El):1}function Ol(e,t,n,i){if(50<Cl)throw Cl=0,wl=null,Error(r(185));Wt(e,n,i),(!(tl&2)||e!==nl)&&(e===nl&&(!(tl&2)&&(ul|=n),sl===4&&Nl(e,il)),kl(e,i),n===1&&tl===0&&!(t.mode&1)&&(hl=xt()+500,pa&&_a()))}function kl(e,t){var n=e.callbackNode;Bt(e,t);var r=Rt(e,e===nl?il:0);if(r===0)n!==null&&vt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vt(n),t===1)e.tag===0?ga(Pl.bind(null,e)):ha(Pl.bind(null,e)),Pi(function(){!(tl&6)&&_a()}),n=null;else{switch(Jt(r)){case 1:n=Ct;break;case 4:n=wt;break;case 16:n=Tt;break;case 536870912:n=Dt;break;default:n=Tt}n=ru(n,Al.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Al(e,t){if(Tl=-1,El=0,tl&6)throw Error(r(327));var n=e.callbackNode;if(Yl()&&e.callbackNode!==n)return null;var i=Rt(e,e===nl?il:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Hl(e,i);else{t=i;var a=tl;tl|=2;var o=Bl();(nl!==e||il!==t)&&(gl=null,hl=xt()+500,Rl(e,t));do try{Wl();break}catch(t){zl(e,t)}while(1);to(),Qc.current=o,tl=a,rl===null?(nl=null,il=0,t=sl):t=0}if(t!==0){if(t===2&&(a=Vt(e),a!==0&&(i=a,t=jl(e,a))),t===1)throw n=cl,Rl(e,0),Nl(e,i),kl(e,xt()),n;if(t===6)Nl(e,i);else{if(a=e.current.alternate,!(i&30)&&!B(a)&&(t=Hl(e,i),t===2&&(o=Vt(e),o!==0&&(i=o,t=jl(e,o))),t===1))throw n=cl,Rl(e,0),Nl(e,i),kl(e,xt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:ql(e,pl,gl);break;case 3:if(Nl(e,i),(i&130023424)===i&&(t=ml+500-xt(),10<t)){if(Rt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Dl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(ql.bind(null,e,pl,gl),t);break}ql(e,pl,gl);break;case 4:if(Nl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-jt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=xt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Zc(i/1960))-i,10<i){e.timeoutHandle=ji(ql.bind(null,e,pl,gl),i);break}ql(e,pl,gl);break;case 5:ql(e,pl,gl);break;default:throw Error(r(329))}}}return kl(e,xt()),e.callbackNode===n?Al.bind(null,e):null}function jl(e,t){var n=fl;return e.current.memoizedState.isDehydrated&&(Rl(e,t).flags|=256),e=Hl(e,t),e!==2&&(t=pl,pl=n,t!==null&&Ml(t)),e}function Ml(e){pl===null?pl=e:pl.push.apply(pl,e)}function B(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nl(e,t){for(t&=~dl,t&=~ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jt(t),r=1<<n;e[n]=-1,t&=~r}}function Pl(e){if(tl&6)throw Error(r(327));Yl();var t=Rt(e,0);if(!(t&1))return kl(e,xt()),null;var n=Hl(e,t);if(e.tag!==0&&n===2){var i=Vt(e);i!==0&&(t=i,n=jl(e,i))}if(n===1)throw n=cl,Rl(e,0),Nl(e,t),kl(e,xt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ql(e,pl,gl),kl(e,xt()),null}function Fl(e,t){var n=tl;tl|=1;try{return e(t)}finally{tl=n,tl===0&&(hl=xt()+500,pa&&_a())}}function Il(e){xl!==null&&xl.tag===0&&!(tl&6)&&Yl();var t=tl;tl|=1;var n=el.transition,r=qt;try{if(el.transition=null,qt=1,e)return e()}finally{qt=r,el.transition=n,tl=t,!(tl&6)&&_a()}}function Ll(){al=ol.current,$i(ol)}function Rl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),rl!==null)for(n=rl.return;n!==null;){var r=n;switch(Aa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sa();break;case 3:To(),$i(ra),$i(na),L();break;case 5:Eo(r);break;case 4:To();break;case 13:$i(Do);break;case 19:$i(Do);break;case 10:no(r.type._context);break;case 22:case 23:Ll()}n=n.return}if(nl=e,rl=e=cu(e.current,null),il=al=t,sl=0,cl=null,dl=ul=ll=0,pl=fl=null,oo!==null){for(t=0;t<oo.length;t++)if(n=oo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}oo=null}return e}function zl(e,t){do{var n=rl;try{if(to(),Ao.current=Ts,Io){for(var i=No.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Io=!1}if(Mo=0,Fo=Po=No=null,Lo=!1,Ro=0,$c.current=null,n===null||n.return===null){sl=1,cl=t,rl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=il,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Us(s);if(m!==null){m.flags&=-257,Ws(m,s,c,o,t),m.mode&1&&Hs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Hs(o,u,t),Vl();break a}l=Error(r(426))}}else if(Na&&c.mode&1){var _=Us(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ws(_,s,c,o,t),Ua(Is(l,c));break a}}o=l=Is(l,c),sl!==4&&(sl=2),fl===null?fl=[o]:fl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Bs(o,l,t);go(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(yl===null||!yl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Vs(o,c,t);go(o,x);break a}}o=o.return}while(o!==null)}Kl(n)}catch(e){t=e,rl===n&&n!==null&&(rl=n=n.return);continue}break}while(1)}function Bl(){var e=Qc.current;return Qc.current=Ts,e===null?Ts:e}function Vl(){(sl===0||sl===3||sl===2)&&(sl=4),nl===null||!(ll&268435455)&&!(ul&268435455)||Nl(nl,il)}function Hl(e,t){var n=tl;tl|=2;var i=Bl();(nl!==e||il!==t)&&(gl=null,Rl(e,t));do try{Ul();break}catch(t){zl(e,t)}while(1);if(to(),tl=n,Qc.current=i,rl!==null)throw Error(r(261));return nl=null,il=0,sl}function Ul(){for(;rl!==null;)Gl(rl)}function Wl(){for(;rl!==null&&!yt();)Gl(rl)}function Gl(e){var t=nu(e.alternate,e,al);e.memoizedProps=e.pendingProps,t===null?Kl(e):rl=t,$c.current=null}function Kl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Sc(n,t),n!==null){n.flags&=32767,rl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{sl=6,rl=null;return}}else if(n=xc(n,t,al),n!==null){rl=n;return}if(t=t.sibling,t!==null){rl=t;return}rl=t=e}while(t!==null);sl===0&&(sl=5)}function ql(e,t,n){var r=qt,i=el.transition;try{el.transition=null,qt=1,Jl(e,t,n,r)}finally{el.transition=i,qt=r}return null}function Jl(e,t,n,i){do Yl();while(xl!==null);if(tl&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Gt(e,o),e===nl&&(rl=nl=null,il=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bl||(bl=!0,ru(Tt,function(){return Yl(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=el.transition,el.transition=null;var s=qt;qt=1;var c=tl;tl|=4,$c.current=null,kc(e,n),Wc(n,e),Hr(ki),bn=!!Oi,ki=Oi=null,e.current=n,Kc(n,e,a),bt(),tl=c,qt=s,el.transition=o}else e.current=n;if(bl&&(bl=!1,xl=e,Sl=a),o=e.pendingLanes,o===0&&(yl=null),At(n.stateNode,i),kl(e,xt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(_l)throw _l=!1,e=vl,vl=null,e;return Sl&1&&e.tag!==0&&Yl(),o=e.pendingLanes,o&1?e===wl?Cl++:(Cl=0,wl=e):Cl=0,_a(),null}function Yl(){if(xl!==null){var e=Jt(Sl),t=el.transition,n=qt;try{if(el.transition=null,qt=16>e?16:e,xl===null)var i=!1;else{if(e=xl,xl=null,Sl=0,tl&6)throw Error(r(331));var a=tl;for(tl|=4,R=e.current;R!==null;){var o=R,s=o.child;if(R.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(R=u;R!==null;){var d=R;switch(d.tag){case 0:case 11:case 15:Ac(8,d,o)}var f=d.child;if(f!==null)f.return=d,R=f;else for(;R!==null;){d=R;var p=d.sibling,m=d.return;if(Nc(d),d===u){R=null;break}if(p!==null){p.return=m,R=p;break}R=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}R=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,R=s;else b:for(;R!==null;){if(o=R,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ac(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,R=v;break b}R=o.return}}var y=e.current;for(R=y;R!==null;){s=R;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,R=b;else b:for(s=y;R!==null;){if(c=R,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:jc(9,c)}}catch(e){Zl(c,c.return,e)}if(c===s){R=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,R=x;break b}R=c.return}}if(tl=a,_a(),kt&&typeof kt.onPostCommitFiberRoot==`function`)try{kt.onPostCommitFiberRoot(Ot,e)}catch{}i=!0}return i}finally{qt=n,el.transition=t}}return!1}function Xl(e,t,n){t=Is(n,t),t=Bs(e,t,1),e=mo(e,t,1),t=Dl(),e!==null&&(Wt(e,1,t),kl(e,t))}function Zl(e,t,n){if(e.tag===3)Xl(e,e,n);else for(;t!==null;){if(t.tag===3){Xl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(yl===null||!yl.has(r))){e=Is(n,e),e=Vs(t,e,1),t=mo(t,e,1),e=Dl(),t!==null&&(Wt(t,1,e),kl(t,e));break}}t=t.return}}function Ql(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dl(),e.pingedLanes|=e.suspendedLanes&n,nl===e&&(il&n)===n&&(sl===4||sl===3&&(il&130023424)===il&&500>xt()-ml?Rl(e,0):dl|=n),kl(e,t)}function $l(e,t){t===0&&(e.mode&1?(t=It,It<<=1,!(It&130023424)&&(It=4194304)):t=1);var n=Dl();e=lo(e,t),e!==null&&(Wt(e,t,n),kl(e,n))}function eu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$l(e,n)}function tu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),$l(e,n)}var nu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ra.current)Ks=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ks=!1,hc(e,t,n);Ks=!!(e.flags&131072)}else Ks=!1,Na&&t.flags&1048576&&Oa(t,xa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;pc(e,t),e=t.pendingProps;var a=aa(t,na.current);io(t,n),a=Ho(null,t,i,e,a,n);var o=Uo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,oa(i)?(o=!0,ua(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,uo(t),a.updater=js,t.stateNode=a,a._reactInternals=t,Fs(t,i,e,n),t=tc(null,t,i,!0,o,n)):(t.tag=0,Na&&o&&ka(t),qs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(pc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=su(i),e=ks(i,e),a){case 0:t=$s(null,t,i,e,n);break a;case 1:t=ec(null,t,i,e,n);break a;case 11:t=Js(null,t,i,e,n);break a;case 14:t=Ys(null,t,i,ks(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),$s(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),ec(e,t,i,a,n);case 3:a:{if(nc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,fo(e,t),_o(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Is(Error(r(423)),t),t=rc(e,t,i,n,a);break a}else if(i!==a){a=Is(Error(r(424)),t),t=rc(e,t,i,n,a);break a}else for(Ma=Li(t.stateNode.containerInfo.firstChild),ja=t,Na=!0,Pa=null,n=Xa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ha(),i===a){t=mc(e,t,n);break a}qs(e,t,i,n)}t=t.child}return t;case 5:return I(t),e===null&&Ra(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),Qs(e,t),qs(e,t,s,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return oc(e,t,n);case 4:return wo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ya(t,null,i,n):qs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),Js(e,t,i,a,n);case 7:return qs(e,t,t.pendingProps,n),t.child;case 8:return qs(e,t,t.pendingProps.children,n),t.child;case 12:return qs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,ea(Za,i._currentValue),i._currentValue=s,o!==null)if(Fr(o.value,s)){if(o.children===a.children&&!ra.current){t=mc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=po(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ro(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ro(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}qs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,io(t,n),a=ao(a),i=i(a),t.flags|=1,qs(e,t,i,n),t.child;case 14:return i=t.type,a=ks(i,t.pendingProps),a=ks(i.type,a),Ys(e,t,i,a,n);case 15:return Xs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),pc(e,t),t.tag=1,oa(i)?(e=!0,ua(t)):e=!1,io(t,n),Ns(t,i,a),Fs(t,i,a,n),tc(null,t,i,!0,e,n);case 19:return fc(e,t,n);case 22:return Zs(e,t,n)}throw Error(r(156,t.tag))};function ru(e,t){return _t(e,t)}function iu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function au(e,t,n,r){return new iu(e,t,n,r)}function ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function su(e){if(typeof e==`function`)return+!!ou(e);if(e!=null){if(e=e.$$typeof,e===te)return 11;if(e===j)return 14}return 2}function cu(e,t){var n=e.alternate;return n===null?(n=au(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function lu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ou(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return uu(n.children,a,o,t);case E:s=8,a|=8;break;case ee:return e=au(12,n,t,a|2),e.elementType=ee,e.lanes=o,e;case k:return e=au(13,n,t,a),e.elementType=k,e.lanes=o,e;case A:return e=au(19,n,t,a),e.elementType=A,e.lanes=o,e;case ne:return du(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case D:s=10;break a;case O:s=9;break a;case te:s=11;break a;case j:s=14;break a;case M:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=au(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function uu(e,t,n,r){return e=au(7,e,r,t),e.lanes=n,e}function du(e,t,n,r){return e=au(22,e,r,t),e.elementType=ne,e.lanes=n,e.stateNode={isHidden:!1},e}function fu(e,t,n){return e=au(6,e,null,t),e.lanes=n,e}function pu(e,t,n){return t=au(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hu(e,t,n,r,i,a,o,s,c){return e=new mu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=au(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},uo(a),e}function gu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function _u(e){if(!e)return ta;e=e._reactInternals;a:{if(dt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(oa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(oa(n))return la(e,n,t)}return t}function vu(e,t,n,r,i,a,o,s,c){return e=hu(n,r,!0,e,i,a,o,s,c),e.context=_u(null),n=e.current,r=Dl(),i=z(n),a=po(r,i),a.callback=t??null,mo(n,a,i),e.current.lanes=i,Wt(e,i,r),kl(e,r),e}function yu(e,t,n,r){var i=t.current,a=Dl(),o=z(i);return n=_u(n),t.context===null?t.context=n:t.pendingContext=n,t=po(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mo(i,t,o),e!==null&&(Ol(e,i,o,a),ho(e,i,o)),o}function bu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function xu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Su(e,t){xu(e,t),(e=e.alternate)&&xu(e,t)}function Cu(){return null}var wu=typeof reportError==`function`?reportError:function(e){console.error(e)};function Tu(e){this._internalRoot=e}Eu.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));yu(e,t,null,null)},Eu.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Il(function(){yu(null,e,null,null)}),t[Hi]=null}};function Eu(e){this._internalRoot=e}Eu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cn.length&&t!==0&&t<cn[n].priority;n++);cn.splice(n,0,e),n===0&&pn(e)}};function Du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ou(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function ku(){}function Au(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=bu(o);a.call(e)}}var o=vu(t,r,e,0,null,!1,!1,``,ku);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),Il(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=bu(c);s.call(e)}}var c=hu(e,0,!1,null,null,!1,!1,``,ku);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),Il(function(){yu(t,c,n,r)}),c}function ju(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=bu(o);s.call(e)}}yu(t,o,e,i)}else o=Au(n,t,e,i,r);return bu(o)}Yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lt(t.pendingLanes);n!==0&&(Kt(t,n|1),kl(t,xt()),!(tl&6)&&(hl=xt()+500,_a()))}break;case 13:Il(function(){var t=lo(e,1);t!==null&&Ol(t,e,1,Dl())}),Su(e,1)}},Xt=function(e){if(e.tag===13){var t=lo(e,134217728);t!==null&&Ol(t,e,134217728,Dl()),Su(e,134217728)}},Zt=function(e){if(e.tag===13){var t=z(e),n=lo(e,t);n!==null&&Ol(n,e,t,Dl()),Su(e,t)}},Qt=function(){return qt},$t=function(e,t){var n=qt;try{return qt=e,t()}finally{qt=n}},We=function(e,t,n){switch(t){case`input`:if(xe(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));ge(i),xe(i,a)}}}break;case`textarea`:Oe(e,n);break;case`select`:t=n.value,t!=null&&Te(e,!!n.multiple,t,!1)}},Xe=Fl,Ze=Il;var Mu={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Je,Ye,Fl]},Nu={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Pu={bundleType:Nu.bundleType,version:Nu.version,rendererPackageName:Nu.rendererPackageName,rendererConfig:Nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ht(e),e===null?null:e.stateNode},findFiberByHostInstance:Nu.findFiberByHostInstance||Cu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Ot=Fu.inject(Pu),kt=Fu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Du(t))throw Error(r(200));return gu(e,t,null,n)},e.createRoot=function(e,t){if(!Du(e))throw Error(r(299));var n=!1,i=``,a=wu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=hu(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new Tu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ht(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Il(e)},e.hydrate=function(e,t,n){if(!Ou(t))throw Error(r(200));return ju(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Du(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=wu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=vu(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Eu(t)},e.render=function(e,t,n){if(!Ou(t))throw Error(r(200));return ju(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Ou(e))throw Error(r(40));return e._reactRootContainer?(Il(function(){ju(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=Fl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ou(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return ju(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),If=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ff()})),Lf=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Rf=o(((e,t)=>{t.exports=Lf()})),zf=Object.defineProperty,Bf=(e,t)=>{let n={};for(var r in e)zf(n,r,{get:e[r],enumerable:!0});return t||zf(n,Symbol.toStringTag,{value:`Module`}),n},Vf=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Hf(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var Uf=(e,t,n)=>{let r=Hf(e,n);if(!r)return!1;let i=Yf(r);if(!i){let n=r.blockRange(),i=n&&bd(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(pp(e,i,t,-1))return!0;if(r.parent.content.size==0&&(qf(a,`end`)||H.isSelectable(a)))for(let n=r.depth;;n--){let o=Vd(e.doc,r.before(n),r.after(n),B.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(qf(a,`end`)?lf.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):H.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},Wf=(e,t,n)=>{let r=Hf(e,n);if(!r)return!1;let i=Yf(r);return i?Kf(e,i,t):!1},Gf=(e,t,n)=>{let r=Xf(e,n);if(!r)return!1;let i=$f(r);return i?Kf(e,i,t):!1};function Kf(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let s=Vd(e.doc,i,o,B.empty);if(!s||s.from!=i||s instanceof pd&&s.slice.size>=o-i)return!1;if(n){let t=e.tr.step(s);t.setSelection(V.create(t.doc,i)),n(t.scrollIntoView())}return!0}function qf(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var Jf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=Yf(r)}let o=a&&a.nodeBefore;return!o||!H.isSelectable(o)?!1:(t&&t(e.tr.setSelection(H.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function Yf(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Xf(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var Zf=(e,t,n)=>{let r=Xf(e,n);if(!r)return!1;let i=$f(r);if(!i)return!1;let a=i.nodeAfter;if(pp(e,i,t,1))return!0;if(r.parent.content.size==0&&(qf(a,`start`)||H.isSelectable(a))){let n=Vd(e.doc,r.before(),r.after(),B.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(qf(a,`start`)?lf.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):H.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},Qf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=$f(r)}let o=a&&a.nodeAfter;return!o||!H.isSelectable(o)?!1:(t&&t(e.tr.setSelection(H.create(e.doc,a.pos)).scrollIntoView()),!0)};function $f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var ep=(e,t)=>{let n=e.selection,r=n instanceof H,i;if(r){if(n.node.isTextblock||!Pd(e.doc,n.from))return!1;i=n.from}else if(i=Ld(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(H.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},tp=(e,t)=>{let n=e.selection,r;if(n instanceof H){if(n.node.isTextblock||!Pd(e.doc,n.to))return!1;r=n.to}else if(r=Ld(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},np=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&bd(i);return a==null?!1:(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},rp=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
47
|
+
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ls(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var zs=typeof WeakMap==`function`?WeakMap:Map;function Bs(e,t,n){n=po(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,vl=r),Rs(e,t)},n}function Vs(e,t,n){n=po(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Rs(e,t),typeof r!=`function`&&(yl===null?yl=new Set([this]):yl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Hs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ql.bind(null,e,t,n),t.then(e,e))}function Us(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ws(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=po(-1,1),t.tag=2,mo(n,t,1))),n.lanes|=1),e)}var Gs=S.ReactCurrentOwner,Ks=!1;function qs(e,t,n,r){t.child=e===null?Xa(t,null,n,r):Ya(t,e.child,n,r)}function Js(e,t,n,r,i){n=n.render;var a=t.ref;return io(t,i),r=Ho(e,t,n,r,a,i),n=Uo(),e!==null&&!Ks?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mc(e,t,i)):(Na&&n&&ka(t),t.flags|=1,qs(e,t,r,i),t.child)}function Ys(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ou(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Xs(e,t,a,r,i)):(e=lu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return mc(e,t,i)}return t.flags|=1,e=cu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Xs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(Ks=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ks=!0);else return t.lanes=e.lanes,mc(e,t,i)}return $s(e,t,n,r,i)}function Zs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ea(ol,al),al|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ea(ol,al),al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,ea(ol,al),al|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),ea(ol,al),al|=r;return qs(e,t,i,n),t.child}function Qs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $s(e,t,n,r,i){var a=oa(n)?ia:na.current;return a=aa(t,a),io(t,i),n=Ho(e,t,n,r,a,i),r=Uo(),e!==null&&!Ks?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mc(e,t,i)):(Na&&r&&ka(t),t.flags|=1,qs(e,t,n,i),t.child)}function ec(e,t,n,r,i){if(oa(n)){var a=!0;ua(t)}else a=!1;if(io(t,i),t.stateNode===null)pc(e,t),Ns(t,n,r),Fs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=ao(l):(l=oa(n)?ia:na.current,l=aa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ps(t,o,r,l),F=!1;var f=t.memoizedState;o.state=f,_o(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ra.current||F?(typeof u==`function`&&(As(t,n,u,r),c=t.memoizedState),(s=F||Ms(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,fo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:ks(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=ao(c):(c=oa(n)?ia:na.current,c=aa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ps(t,o,r,c),F=!1,f=t.memoizedState,o.state=f,_o(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ra.current||F?(typeof p==`function`&&(As(t,n,p,r),m=t.memoizedState),(l=F||Ms(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return tc(e,t,n,r,a,i)}function tc(e,t,n,r,i,a){Qs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&da(t,n,!1),mc(e,t,a);r=t.stateNode,Gs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ya(t,e.child,null,a),t.child=Ya(t,null,s,a)):qs(e,t,s,a),t.memoizedState=r.state,i&&da(t,n,!0),t.child}function nc(e){var t=e.stateNode;t.pendingContext?ca(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ca(e,t.context,!1),wo(e,t.containerInfo)}function rc(e,t,n,r,i){return Ha(),Ua(i),t.flags|=256,qs(e,t,n,r),t.child}var ic={dehydrated:null,treeContext:null,retryLane:0};function ac(e){return{baseLanes:e,cachePool:null,transitions:null}}function oc(e,t,n){var r=t.pendingProps,i=Do.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ea(Do,i&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=du(o,r,0,null),e=uu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ac(n),t.memoizedState=ic,e):sc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return lc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=cu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=uu(a,o,n,null),a.flags|=2):a=cu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ac(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ic,r}return a=e.child,e=a.sibling,r=cu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sc(e,t){return t=du({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function cc(e,t,n,r){return r!==null&&Ua(r),Ya(t,e.child,null,n),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ls(Error(r(422))),cc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=du({mode:`visible`,children:i.children},a,0,null),o=uu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ya(t,e.child,null,s),t.child.memoizedState=ac(s),t.memoizedState=ic,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return cc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ls(o,i,void 0),cc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ks||c){if(i=nl,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,lo(e,a),Ol(i,e,a,-1))}return Vl(),i=Ls(Error(r(421))),cc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=eu.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ma=Li(a.nextSibling),ja=t,Na=!0,Pa=null,e!==null&&(Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,Ta=e.id,Ea=e.overflow,wa=t),t=sc(t,i.children),t.flags|=4096,t)}function uc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ro(e.return,t,n)}function dc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function fc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(qs(e,t,r.children,n),r=Do.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uc(e,n,t);else if(e.tag===19)uc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ea(Do,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),dc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}dc(t,!0,n,null,a);break;case`together`:dc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ll|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=cu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hc(e,t,n){switch(t.tag){case 3:nc(t),Ha();break;case 5:I(t);break;case 1:oa(t.type)&&ua(t);break;case 4:wo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ea(Za,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ea(Do,Do.current&1),e=mc(e,t,n),e===null?null:e.sibling):oc(e,t,n):(ea(Do,Do.current&1),t.flags|=128,null);ea(Do,Do.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ea(Do,Do.current),r)break;return null;case 22:case 23:return t.lanes=0,Zs(e,t,n)}return mc(e,t,n)}var gc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_c=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Co(bo.current);var o=null;switch(n){case`input`:i=N(e,i),r=N(e,r),o=[];break;case`select`:i=ae({},i,{value:void 0}),r=ae({},r,{value:void 0}),o=[];break;case`textarea`:i=Ee(e,i),r=Ee(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}Be(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&pi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},vc=function(e,t,n,r){n!==r&&(t.flags|=4)};function yc(e,t){if(!Na)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xc(e,t,n){var i=t.pendingProps;switch(Aa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bc(t),null;case 1:return oa(t.type)&&sa(),bc(t),null;case 3:return i=t.stateNode,To(),$i(ra),$i(na),L(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pa!==null&&(Ml(Pa),Pa=null))),bc(t),null;case 5:Eo(t);var o=Co(So.current);if(n=t.type,e!==null&&t.stateNode!=null)_c(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return bc(t),null}if(e=Co(bo.current),Ba(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=(t.mode&1)!=0,n){case`dialog`:pi(`cancel`,i),pi(`close`,i);break;case`iframe`:case`object`:case`embed`:pi(`load`,i);break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],i);break;case`source`:pi(`error`,i);break;case`img`:case`image`:case`link`:pi(`error`,i),pi(`load`,i);break;case`details`:pi(`toggle`,i);break;case`input`:ye(i,s),pi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},pi(`invalid`,i);break;case`textarea`:De(i,s),pi(`invalid`,i)}for(var c in Be(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&pi(`scroll`,i)}switch(n){case`input`:ge(i),Se(i,s,!0);break;case`textarea`:ge(i),ke(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ae(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,gc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ve(n,i),n){case`dialog`:pi(`cancel`,e),pi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:pi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],e);o=i;break;case`source`:pi(`error`,e),o=i;break;case`img`:case`image`:case`link`:pi(`error`,e),pi(`load`,e),o=i;break;case`details`:pi(`toggle`,e),o=i;break;case`input`:ye(e,i),o=N(e,i),pi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ae({},i,{value:void 0}),pi(`invalid`,e);break;case`textarea`:De(e,i),o=Ee(e,i),pi(`invalid`,e);break;default:o=i}for(s in Be(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Re(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ne(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Pe(e,u):typeof u==`number`&&Pe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&pi(`scroll`,e):u!=null&&x(e,s,u,c))}switch(n){case`input`:ge(e),Se(e,i,!1);break;case`textarea`:ge(e),ke(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+pe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Te(e,!!i.multiple,i.defaultValue,!0):Te(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return bc(t),null;case 6:if(e&&t.stateNode!=null)vc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=Co(So.current),Co(bo.current),Ba(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ja,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return bc(t),null;case 13:if($i(Do),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Na&&Ma!==null&&t.mode&1&&!(t.flags&128))Va(),Ha(),t.flags|=98560,s=!1;else if(s=Ba(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else Ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bc(t),s=!1}else Pa!==null&&(Ml(Pa),Pa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Do.current&1?sl===0&&(sl=3):Vl())),t.updateQueue!==null&&(t.flags|=4),bc(t),null);case 4:return To(),e===null&&gi(t.stateNode.containerInfo),bc(t),null;case 10:return no(t.type._context),bc(t),null;case 17:return oa(t.type)&&sa(),bc(t),null;case 19:if($i(Do),s=t.memoizedState,s===null)return bc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)yc(s,!1);else{if(sl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Oo(e),c!==null){for(t.flags|=128,yc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ea(Do,Do.current&1|2),t.child}e=e.sibling}s.tail!==null&&xt()>hl&&(t.flags|=128,i=!0,yc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Oo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Na)return bc(t),null}else 2*xt()-s.renderingStartTime>hl&&n!==1073741824&&(t.flags|=128,i=!0,yc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(bc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=xt(),t.sibling=null,n=Do.current,ea(Do,i?n&1|2:n&1),t);case 22:case 23:return Ll(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?al&1073741824&&(bc(t),t.subtreeFlags&6&&(t.flags|=8192)):bc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Sc(e,t){switch(Aa(t),t.tag){case 1:return oa(t.type)&&sa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return To(),$i(ra),$i(na),L(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Eo(t),null;case 13:if($i(Do),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $i(Do),null;case 4:return To(),null;case 10:return no(t.type._context),null;case 22:case 23:return Ll(),null;case 24:return null;default:return null}}var Cc=!1,wc=!1,Tc=typeof WeakSet==`function`?WeakSet:Set,R=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Zl(e,t,n)}else n.current=null}function Dc(e,t,n){try{n()}catch(n){Zl(e,t,n)}}var Oc=!1;function kc(e,t){if(Oi=bn,e=Br(),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ki={focusedElem:e,selectionRange:n},bn=!1,R=t;R!==null;)if(t=R,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ks(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Zl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return h=Oc,Oc=!1,h}function Ac(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Dc(t,n,a)}i=i.next}while(i!==r)}}function jc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Mc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Nc(e){var t=e.alternate;t!==null&&(e.alternate=null,Nc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pc(e){return e.tag===5||e.tag===3||e.tag===4}function Fc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function Lc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lc(e,t,n),e=e.sibling;e!==null;)Lc(e,t,n),e=e.sibling}var Rc=null,zc=!1;function Bc(e,t,n){for(n=n.child;n!==null;)Vc(e,t,n),n=n.sibling}function Vc(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount==`function`)try{kt.onCommitFiberUnmount(Ot,n)}catch{}switch(n.tag){case 5:wc||Ec(n,t);case 6:var r=Rc,i=zc;Rc=null,Bc(e,t,n),Rc=r,zc=i,Rc!==null&&(zc?(e=Rc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rc.removeChild(n.stateNode));break;case 18:Rc!==null&&(zc?(e=Rc,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),vn(e)):Ii(Rc,n.stateNode));break;case 4:r=Rc,i=zc,Rc=n.stateNode.containerInfo,zc=!0,Bc(e,t,n),Rc=r,zc=i;break;case 0:case 11:case 14:case 15:if(!wc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Dc(n,t,o),i=i.next}while(i!==r)}Bc(e,t,n);break;case 1:if(!wc&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Zl(n,t,e)}Bc(e,t,n);break;case 21:Bc(e,t,n);break;case 22:n.mode&1?(wc=(r=wc)||n.memoizedState!==null,Bc(e,t,n),wc=r):Bc(e,t,n);break;default:Bc(e,t,n)}}function Hc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tc),t.forEach(function(t){var r=tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Uc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Rc=c.stateNode,zc=!1;break a;case 3:Rc=c.stateNode.containerInfo,zc=!0;break a;case 4:Rc=c.stateNode.containerInfo,zc=!0;break a}c=c.return}if(Rc===null)throw Error(r(160));Vc(o,s,a),Rc=null,zc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Zl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wc(t,e),t=t.sibling}function Wc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Uc(t,e),Gc(e),i&4){try{Ac(3,e,e.return),jc(3,e)}catch(t){Zl(e,e.return,t)}try{Ac(5,e,e.return)}catch(t){Zl(e,e.return,t)}}break;case 1:Uc(t,e),Gc(e),i&512&&n!==null&&Ec(n,n.return);break;case 5:if(Uc(t,e),Gc(e),i&512&&n!==null&&Ec(n,n.return),e.flags&32){var a=e.stateNode;try{Pe(a,``)}catch(t){Zl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&be(a,o),Ve(c,s);var u=Ve(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Re(a,f):d===`dangerouslySetInnerHTML`?Ne(a,f):d===`children`?Pe(a,f):x(a,d,f,u)}switch(c){case`input`:xe(a,o);break;case`textarea`:Oe(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Te(a,!!o.multiple,o.multiple?[]:``,!1):Te(a,!!o.multiple,o.defaultValue,!0)):Te(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){Zl(e,e.return,t)}}break;case 6:if(Uc(t,e),Gc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Zl(e,e.return,t)}}break;case 3:if(Uc(t,e),Gc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{vn(t.containerInfo)}catch(t){Zl(e,e.return,t)}break;case 4:Uc(t,e),Gc(e);break;case 13:Uc(t,e),Gc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(ml=xt())),i&4&&Hc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(wc=(u=wc)||d,Uc(t,e),wc=u):Uc(t,e),Gc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(R=e,d=e.child;d!==null;){for(f=R=d;R!==null;){switch(p=R,m=p.child,p.tag){case 0:case 11:case 14:case 15:Ac(4,p,p.return);break;case 1:Ec(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Zl(i,n,e)}}break;case 5:Ec(p,p.return);break;case 22:if(p.memoizedState!==null){Yc(f);continue}}m===null?Yc(f):(m.return=p,R=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Le(`display`,s))}catch(t){Zl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Zl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Uc(t,e),Gc(e),i&4&&Hc(e);break;case 21:break;default:Uc(t,e),Gc(e)}}function Gc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Pc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Pe(a,``),i.flags&=-33),Lc(e,Fc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Ic(e,Fc(e),o);break;default:throw Error(r(161))}}catch(t){Zl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kc(e,t,n){R=e,qc(e,t,n)}function qc(e,t,n){for(var r=(e.mode&1)!=0;R!==null;){var i=R,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Cc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||wc;s=Cc;var l=wc;if(Cc=o,(wc=c)&&!l)for(R=i;R!==null;)o=R,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Xc(i):(c.return=o,R=c);for(;a!==null;)R=a,qc(a,t,n),a=a.sibling;R=i,Cc=s,wc=l}Jc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,R=a):Jc(e,t,n)}}function Jc(e){for(;R!==null;){var t=R;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:wc||jc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!wc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ks(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&vo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&vn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}wc||t.flags&512&&Mc(t)}catch(e){Zl(t,t.return,e)}}if(t===e){R=null;break}if(n=t.sibling,n!==null){n.return=t.return,R=n;break}R=t.return}}function Yc(e){for(;R!==null;){var t=R;if(t===e){R=null;break}var n=t.sibling;if(n!==null){n.return=t.return,R=n;break}R=t.return}}function Xc(e){for(;R!==null;){var t=R;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jc(4,t)}catch(e){Zl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Zl(t,i,e)}}var a=t.return;try{Mc(t)}catch(e){Zl(t,a,e)}break;case 5:var o=t.return;try{Mc(t)}catch(e){Zl(t,o,e)}}}catch(e){Zl(t,t.return,e)}if(t===e){R=null;break}var s=t.sibling;if(s!==null){s.return=t.return,R=s;break}R=t.return}}var Zc=Math.ceil,Qc=S.ReactCurrentDispatcher,$c=S.ReactCurrentOwner,el=S.ReactCurrentBatchConfig,tl=0,nl=null,rl=null,il=0,al=0,ol=Qi(0),sl=0,cl=null,ll=0,ul=0,dl=0,fl=null,pl=null,ml=0,hl=1/0,gl=null,_l=!1,vl=null,yl=null,bl=!1,xl=null,Sl=0,Cl=0,wl=null,Tl=-1,El=0;function Dl(){return tl&6?xt():Tl===-1?Tl=xt():Tl}function z(e){return e.mode&1?tl&2&&il!==0?il&-il:Wa.transition===null?(e=qt,e===0?(e=window.event,e=e===void 0?16:En(e.type),e):e):(El===0&&(El=Ht()),El):1}function Ol(e,t,n,i){if(50<Cl)throw Cl=0,wl=null,Error(r(185));Wt(e,n,i),(!(tl&2)||e!==nl)&&(e===nl&&(!(tl&2)&&(ul|=n),sl===4&&Nl(e,il)),kl(e,i),n===1&&tl===0&&!(t.mode&1)&&(hl=xt()+500,pa&&_a()))}function kl(e,t){var n=e.callbackNode;Bt(e,t);var r=Rt(e,e===nl?il:0);if(r===0)n!==null&&vt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vt(n),t===1)e.tag===0?ga(Pl.bind(null,e)):ha(Pl.bind(null,e)),Pi(function(){!(tl&6)&&_a()}),n=null;else{switch(Jt(r)){case 1:n=Ct;break;case 4:n=wt;break;case 16:n=Tt;break;case 536870912:n=Dt;break;default:n=Tt}n=ru(n,Al.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Al(e,t){if(Tl=-1,El=0,tl&6)throw Error(r(327));var n=e.callbackNode;if(Yl()&&e.callbackNode!==n)return null;var i=Rt(e,e===nl?il:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Hl(e,i);else{t=i;var a=tl;tl|=2;var o=Bl();(nl!==e||il!==t)&&(gl=null,hl=xt()+500,Rl(e,t));do try{Wl();break}catch(t){zl(e,t)}while(1);to(),Qc.current=o,tl=a,rl===null?(nl=null,il=0,t=sl):t=0}if(t!==0){if(t===2&&(a=Vt(e),a!==0&&(i=a,t=jl(e,a))),t===1)throw n=cl,Rl(e,0),Nl(e,i),kl(e,xt()),n;if(t===6)Nl(e,i);else{if(a=e.current.alternate,!(i&30)&&!B(a)&&(t=Hl(e,i),t===2&&(o=Vt(e),o!==0&&(i=o,t=jl(e,o))),t===1))throw n=cl,Rl(e,0),Nl(e,i),kl(e,xt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:ql(e,pl,gl);break;case 3:if(Nl(e,i),(i&130023424)===i&&(t=ml+500-xt(),10<t)){if(Rt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Dl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(ql.bind(null,e,pl,gl),t);break}ql(e,pl,gl);break;case 4:if(Nl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-jt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=xt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Zc(i/1960))-i,10<i){e.timeoutHandle=ji(ql.bind(null,e,pl,gl),i);break}ql(e,pl,gl);break;case 5:ql(e,pl,gl);break;default:throw Error(r(329))}}}return kl(e,xt()),e.callbackNode===n?Al.bind(null,e):null}function jl(e,t){var n=fl;return e.current.memoizedState.isDehydrated&&(Rl(e,t).flags|=256),e=Hl(e,t),e!==2&&(t=pl,pl=n,t!==null&&Ml(t)),e}function Ml(e){pl===null?pl=e:pl.push.apply(pl,e)}function B(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nl(e,t){for(t&=~dl,t&=~ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jt(t),r=1<<n;e[n]=-1,t&=~r}}function Pl(e){if(tl&6)throw Error(r(327));Yl();var t=Rt(e,0);if(!(t&1))return kl(e,xt()),null;var n=Hl(e,t);if(e.tag!==0&&n===2){var i=Vt(e);i!==0&&(t=i,n=jl(e,i))}if(n===1)throw n=cl,Rl(e,0),Nl(e,t),kl(e,xt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ql(e,pl,gl),kl(e,xt()),null}function Fl(e,t){var n=tl;tl|=1;try{return e(t)}finally{tl=n,tl===0&&(hl=xt()+500,pa&&_a())}}function Il(e){xl!==null&&xl.tag===0&&!(tl&6)&&Yl();var t=tl;tl|=1;var n=el.transition,r=qt;try{if(el.transition=null,qt=1,e)return e()}finally{qt=r,el.transition=n,tl=t,!(tl&6)&&_a()}}function Ll(){al=ol.current,$i(ol)}function Rl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),rl!==null)for(n=rl.return;n!==null;){var r=n;switch(Aa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sa();break;case 3:To(),$i(ra),$i(na),L();break;case 5:Eo(r);break;case 4:To();break;case 13:$i(Do);break;case 19:$i(Do);break;case 10:no(r.type._context);break;case 22:case 23:Ll()}n=n.return}if(nl=e,rl=e=cu(e.current,null),il=al=t,sl=0,cl=null,dl=ul=ll=0,pl=fl=null,oo!==null){for(t=0;t<oo.length;t++)if(n=oo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}oo=null}return e}function zl(e,t){do{var n=rl;try{if(to(),Ao.current=Ts,Io){for(var i=No.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Io=!1}if(Mo=0,Fo=Po=No=null,Lo=!1,Ro=0,$c.current=null,n===null||n.return===null){sl=1,cl=t,rl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=il,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Us(s);if(m!==null){m.flags&=-257,Ws(m,s,c,o,t),m.mode&1&&Hs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Hs(o,u,t),Vl();break a}l=Error(r(426))}}else if(Na&&c.mode&1){var _=Us(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ws(_,s,c,o,t),Ua(Is(l,c));break a}}o=l=Is(l,c),sl!==4&&(sl=2),fl===null?fl=[o]:fl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Bs(o,l,t);go(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(yl===null||!yl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Vs(o,c,t);go(o,x);break a}}o=o.return}while(o!==null)}Kl(n)}catch(e){t=e,rl===n&&n!==null&&(rl=n=n.return);continue}break}while(1)}function Bl(){var e=Qc.current;return Qc.current=Ts,e===null?Ts:e}function Vl(){(sl===0||sl===3||sl===2)&&(sl=4),nl===null||!(ll&268435455)&&!(ul&268435455)||Nl(nl,il)}function Hl(e,t){var n=tl;tl|=2;var i=Bl();(nl!==e||il!==t)&&(gl=null,Rl(e,t));do try{Ul();break}catch(t){zl(e,t)}while(1);if(to(),tl=n,Qc.current=i,rl!==null)throw Error(r(261));return nl=null,il=0,sl}function Ul(){for(;rl!==null;)Gl(rl)}function Wl(){for(;rl!==null&&!yt();)Gl(rl)}function Gl(e){var t=nu(e.alternate,e,al);e.memoizedProps=e.pendingProps,t===null?Kl(e):rl=t,$c.current=null}function Kl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Sc(n,t),n!==null){n.flags&=32767,rl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{sl=6,rl=null;return}}else if(n=xc(n,t,al),n!==null){rl=n;return}if(t=t.sibling,t!==null){rl=t;return}rl=t=e}while(t!==null);sl===0&&(sl=5)}function ql(e,t,n){var r=qt,i=el.transition;try{el.transition=null,qt=1,Jl(e,t,n,r)}finally{el.transition=i,qt=r}return null}function Jl(e,t,n,i){do Yl();while(xl!==null);if(tl&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Gt(e,o),e===nl&&(rl=nl=null,il=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bl||(bl=!0,ru(Tt,function(){return Yl(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=el.transition,el.transition=null;var s=qt;qt=1;var c=tl;tl|=4,$c.current=null,kc(e,n),Wc(n,e),Hr(ki),bn=!!Oi,ki=Oi=null,e.current=n,Kc(n,e,a),bt(),tl=c,qt=s,el.transition=o}else e.current=n;if(bl&&(bl=!1,xl=e,Sl=a),o=e.pendingLanes,o===0&&(yl=null),At(n.stateNode,i),kl(e,xt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(_l)throw _l=!1,e=vl,vl=null,e;return Sl&1&&e.tag!==0&&Yl(),o=e.pendingLanes,o&1?e===wl?Cl++:(Cl=0,wl=e):Cl=0,_a(),null}function Yl(){if(xl!==null){var e=Jt(Sl),t=el.transition,n=qt;try{if(el.transition=null,qt=16>e?16:e,xl===null)var i=!1;else{if(e=xl,xl=null,Sl=0,tl&6)throw Error(r(331));var a=tl;for(tl|=4,R=e.current;R!==null;){var o=R,s=o.child;if(R.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(R=u;R!==null;){var d=R;switch(d.tag){case 0:case 11:case 15:Ac(8,d,o)}var f=d.child;if(f!==null)f.return=d,R=f;else for(;R!==null;){d=R;var p=d.sibling,m=d.return;if(Nc(d),d===u){R=null;break}if(p!==null){p.return=m,R=p;break}R=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}R=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,R=s;else b:for(;R!==null;){if(o=R,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ac(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,R=v;break b}R=o.return}}var y=e.current;for(R=y;R!==null;){s=R;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,R=b;else b:for(s=y;R!==null;){if(c=R,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:jc(9,c)}}catch(e){Zl(c,c.return,e)}if(c===s){R=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,R=x;break b}R=c.return}}if(tl=a,_a(),kt&&typeof kt.onPostCommitFiberRoot==`function`)try{kt.onPostCommitFiberRoot(Ot,e)}catch{}i=!0}return i}finally{qt=n,el.transition=t}}return!1}function Xl(e,t,n){t=Is(n,t),t=Bs(e,t,1),e=mo(e,t,1),t=Dl(),e!==null&&(Wt(e,1,t),kl(e,t))}function Zl(e,t,n){if(e.tag===3)Xl(e,e,n);else for(;t!==null;){if(t.tag===3){Xl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(yl===null||!yl.has(r))){e=Is(n,e),e=Vs(t,e,1),t=mo(t,e,1),e=Dl(),t!==null&&(Wt(t,1,e),kl(t,e));break}}t=t.return}}function Ql(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Dl(),e.pingedLanes|=e.suspendedLanes&n,nl===e&&(il&n)===n&&(sl===4||sl===3&&(il&130023424)===il&&500>xt()-ml?Rl(e,0):dl|=n),kl(e,t)}function $l(e,t){t===0&&(e.mode&1?(t=It,It<<=1,!(It&130023424)&&(It=4194304)):t=1);var n=Dl();e=lo(e,t),e!==null&&(Wt(e,t,n),kl(e,n))}function eu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$l(e,n)}function tu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),$l(e,n)}var nu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ra.current)Ks=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ks=!1,hc(e,t,n);Ks=!!(e.flags&131072)}else Ks=!1,Na&&t.flags&1048576&&Oa(t,xa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;pc(e,t),e=t.pendingProps;var a=aa(t,na.current);io(t,n),a=Ho(null,t,i,e,a,n);var o=Uo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,oa(i)?(o=!0,ua(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,uo(t),a.updater=js,t.stateNode=a,a._reactInternals=t,Fs(t,i,e,n),t=tc(null,t,i,!0,o,n)):(t.tag=0,Na&&o&&ka(t),qs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(pc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=su(i),e=ks(i,e),a){case 0:t=$s(null,t,i,e,n);break a;case 1:t=ec(null,t,i,e,n);break a;case 11:t=Js(null,t,i,e,n);break a;case 14:t=Ys(null,t,i,ks(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),$s(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),ec(e,t,i,a,n);case 3:a:{if(nc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,fo(e,t),_o(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Is(Error(r(423)),t),t=rc(e,t,i,n,a);break a}else if(i!==a){a=Is(Error(r(424)),t),t=rc(e,t,i,n,a);break a}else for(Ma=Li(t.stateNode.containerInfo.firstChild),ja=t,Na=!0,Pa=null,n=Xa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ha(),i===a){t=mc(e,t,n);break a}qs(e,t,i,n)}t=t.child}return t;case 5:return I(t),e===null&&Ra(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),Qs(e,t),qs(e,t,s,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return oc(e,t,n);case 4:return wo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ya(t,null,i,n):qs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),Js(e,t,i,a,n);case 7:return qs(e,t,t.pendingProps,n),t.child;case 8:return qs(e,t,t.pendingProps.children,n),t.child;case 12:return qs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,ea(Za,i._currentValue),i._currentValue=s,o!==null)if(Fr(o.value,s)){if(o.children===a.children&&!ra.current){t=mc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=po(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ro(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ro(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}qs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,io(t,n),a=ao(a),i=i(a),t.flags|=1,qs(e,t,i,n),t.child;case 14:return i=t.type,a=ks(i,t.pendingProps),a=ks(i.type,a),Ys(e,t,i,a,n);case 15:return Xs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),pc(e,t),t.tag=1,oa(i)?(e=!0,ua(t)):e=!1,io(t,n),Ns(t,i,a),Fs(t,i,a,n),tc(null,t,i,!0,e,n);case 19:return fc(e,t,n);case 22:return Zs(e,t,n)}throw Error(r(156,t.tag))};function ru(e,t){return _t(e,t)}function iu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function au(e,t,n,r){return new iu(e,t,n,r)}function ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function su(e){if(typeof e==`function`)return+!!ou(e);if(e!=null){if(e=e.$$typeof,e===te)return 11;if(e===j)return 14}return 2}function cu(e,t){var n=e.alternate;return n===null?(n=au(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function lu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ou(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return uu(n.children,a,o,t);case E:s=8,a|=8;break;case ee:return e=au(12,n,t,a|2),e.elementType=ee,e.lanes=o,e;case k:return e=au(13,n,t,a),e.elementType=k,e.lanes=o,e;case A:return e=au(19,n,t,a),e.elementType=A,e.lanes=o,e;case ne:return du(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case D:s=10;break a;case O:s=9;break a;case te:s=11;break a;case j:s=14;break a;case M:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=au(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function uu(e,t,n,r){return e=au(7,e,r,t),e.lanes=n,e}function du(e,t,n,r){return e=au(22,e,r,t),e.elementType=ne,e.lanes=n,e.stateNode={isHidden:!1},e}function fu(e,t,n){return e=au(6,e,null,t),e.lanes=n,e}function pu(e,t,n){return t=au(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hu(e,t,n,r,i,a,o,s,c){return e=new mu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=au(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},uo(a),e}function gu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function _u(e){if(!e)return ta;e=e._reactInternals;a:{if(dt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(oa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(oa(n))return la(e,n,t)}return t}function vu(e,t,n,r,i,a,o,s,c){return e=hu(n,r,!0,e,i,a,o,s,c),e.context=_u(null),n=e.current,r=Dl(),i=z(n),a=po(r,i),a.callback=t??null,mo(n,a,i),e.current.lanes=i,Wt(e,i,r),kl(e,r),e}function yu(e,t,n,r){var i=t.current,a=Dl(),o=z(i);return n=_u(n),t.context===null?t.context=n:t.pendingContext=n,t=po(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mo(i,t,o),e!==null&&(Ol(e,i,o,a),ho(e,i,o)),o}function bu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function xu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Su(e,t){xu(e,t),(e=e.alternate)&&xu(e,t)}function Cu(){return null}var wu=typeof reportError==`function`?reportError:function(e){console.error(e)};function Tu(e){this._internalRoot=e}Eu.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));yu(e,t,null,null)},Eu.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Il(function(){yu(null,e,null,null)}),t[Hi]=null}};function Eu(e){this._internalRoot=e}Eu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cn.length&&t!==0&&t<cn[n].priority;n++);cn.splice(n,0,e),n===0&&pn(e)}};function Du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ou(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function ku(){}function Au(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=bu(o);a.call(e)}}var o=vu(t,r,e,0,null,!1,!1,``,ku);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),Il(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=bu(c);s.call(e)}}var c=hu(e,0,!1,null,null,!1,!1,``,ku);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),Il(function(){yu(t,c,n,r)}),c}function ju(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=bu(o);s.call(e)}}yu(t,o,e,i)}else o=Au(n,t,e,i,r);return bu(o)}Yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lt(t.pendingLanes);n!==0&&(Kt(t,n|1),kl(t,xt()),!(tl&6)&&(hl=xt()+500,_a()))}break;case 13:Il(function(){var t=lo(e,1);t!==null&&Ol(t,e,1,Dl())}),Su(e,1)}},Xt=function(e){if(e.tag===13){var t=lo(e,134217728);t!==null&&Ol(t,e,134217728,Dl()),Su(e,134217728)}},Zt=function(e){if(e.tag===13){var t=z(e),n=lo(e,t);n!==null&&Ol(n,e,t,Dl()),Su(e,t)}},Qt=function(){return qt},$t=function(e,t){var n=qt;try{return qt=e,t()}finally{qt=n}},We=function(e,t,n){switch(t){case`input`:if(xe(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));_e(i),xe(i,a)}}}break;case`textarea`:Oe(e,n);break;case`select`:t=n.value,t!=null&&Te(e,!!n.multiple,t,!1)}},Xe=Fl,Ze=Il;var Mu={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Je,Ye,Fl]},Nu={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Pu={bundleType:Nu.bundleType,version:Nu.version,rendererPackageName:Nu.rendererPackageName,rendererConfig:Nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ht(e),e===null?null:e.stateNode},findFiberByHostInstance:Nu.findFiberByHostInstance||Cu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Ot=Fu.inject(Pu),kt=Fu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Du(t))throw Error(r(200));return gu(e,t,null,n)},e.createRoot=function(e,t){if(!Du(e))throw Error(r(299));var n=!1,i=``,a=wu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=hu(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new Tu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ht(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Il(e)},e.hydrate=function(e,t,n){if(!Ou(t))throw Error(r(200));return ju(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Du(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=wu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=vu(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Eu(t)},e.render=function(e,t,n){if(!Ou(t))throw Error(r(200));return ju(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Ou(e))throw Error(r(40));return e._reactRootContainer?(Il(function(){ju(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=Fl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ou(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return ju(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),If=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ff()})),Lf=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Rf=o(((e,t)=>{t.exports=Lf()})),zf=Object.defineProperty,Bf=(e,t)=>{let n={};for(var r in e)zf(n,r,{get:e[r],enumerable:!0});return t||zf(n,Symbol.toStringTag,{value:`Module`}),n},Vf=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Hf(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var Uf=(e,t,n)=>{let r=Hf(e,n);if(!r)return!1;let i=Yf(r);if(!i){let n=r.blockRange(),i=n&&bd(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(pp(e,i,t,-1))return!0;if(r.parent.content.size==0&&(qf(a,`end`)||H.isSelectable(a)))for(let n=r.depth;;n--){let o=Vd(e.doc,r.before(n),r.after(n),B.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(qf(a,`end`)?lf.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):H.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},Wf=(e,t,n)=>{let r=Hf(e,n);if(!r)return!1;let i=Yf(r);return i?Kf(e,i,t):!1},Gf=(e,t,n)=>{let r=Xf(e,n);if(!r)return!1;let i=$f(r);return i?Kf(e,i,t):!1};function Kf(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let s=Vd(e.doc,i,o,B.empty);if(!s||s.from!=i||s instanceof pd&&s.slice.size>=o-i)return!1;if(n){let t=e.tr.step(s);t.setSelection(V.create(t.doc,i)),n(t.scrollIntoView())}return!0}function qf(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var Jf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=Yf(r)}let o=a&&a.nodeBefore;return!o||!H.isSelectable(o)?!1:(t&&t(e.tr.setSelection(H.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function Yf(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Xf(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var Zf=(e,t,n)=>{let r=Xf(e,n);if(!r)return!1;let i=$f(r);if(!i)return!1;let a=i.nodeAfter;if(pp(e,i,t,1))return!0;if(r.parent.content.size==0&&(qf(a,`start`)||H.isSelectable(a))){let n=Vd(e.doc,r.before(),r.after(),B.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(qf(a,`start`)?lf.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):H.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},Qf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=$f(r)}let o=a&&a.nodeAfter;return!o||!H.isSelectable(o)?!1:(t&&t(e.tr.setSelection(H.create(e.doc,a.pos)).scrollIntoView()),!0)};function $f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var ep=(e,t)=>{let n=e.selection,r=n instanceof H,i;if(r){if(n.node.isTextblock||!Pd(e.doc,n.from))return!1;i=n.from}else if(i=Ld(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(H.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},tp=(e,t)=>{let n=e.selection,r;if(n instanceof H){if(n.node.isTextblock||!Pd(e.doc,n.to))return!1;r=n.to}else if(r=Ld(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},np=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&bd(i);return a==null?!1:(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},rp=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
48
48
|
`).scrollIntoView()),!0)};function ip(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var ap=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=ip(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(lf.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},op=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof hf||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=ip(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(V.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},sp=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Md(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&bd(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function cp(e){return(t,n)=>{if(t.selection instanceof H&&t.selection.node.isBlock){let{$from:e}=t.selection;return!e.parentOffset||!Md(t.doc,e.pos)?!1:(n&&n(t.tr.split(e.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let r=t.tr;!t.selection.empty&&(t.selection instanceof V||t.selection instanceof hf)&&r.deleteSelection();let{$from:i}=r.selection,a=r.steps.length,o=[],s,c,l=!1,u=!1;for(let t=i.depth;;t--)if(i.node(t).isBlock){l=i.end(t)==i.pos+(i.depth-t),u=i.start(t)==i.pos-(i.depth-t),c=ip(i.node(t-1).contentMatchAt(i.indexAfter(t-1)));let n=e&&e(i.parent,l,i);o.unshift(n||(l&&c?{type:c}:null)),s=t;break}else{if(t==1)return!1;o.unshift(null)}let d=i.pos,f=Md(r.doc,d,o.length,o);if(f||=(o[0]=c?{type:c}:null,Md(r.doc,d,o.length,o)),!f)return!1;if(r.split(d,o.length,o),!l&&u&&i.node(s).type!=c){let e=r.mapping.slice(a),t=e.map(i.before(s)),n=r.doc.resolve(t);c&&i.node(s-1).canReplaceWith(n.index(),n.index()+1,c)&&r.setNodeMarkup(e.map(i.before(s)),c)}return n&&n(r.scrollIntoView()),!0}}var lp=cp(),up=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a==0?!1:(i=n.before(a),t&&t(e.tr.setSelection(H.create(e.doc,i))),!0)},dp=(e,t)=>(t&&t(e.tr.setSelection(new hf(e.doc))),!0);function fp(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||Pd(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function pp(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&fp(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=z.empty;for(let e=o.length-1;e>=0;e--)s=z.from(o[e].create(null,s));s=z.from(i.copy(s));let c=e.tr.step(new md(t.pos-1,r,t.pos,r,new B(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&Pd(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:lf.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&bd(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&qf(a,`start`,!0)&&qf(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=z.empty;for(let e=o.length-1;e>=0;e--)r=z.from(o[e].copy(r));n(e.tr.step(new md(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new B(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function mp(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(V.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var hp=mp(-1),gp=mp(1);function _p(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a),s=o&&Sd(o,e,t);return s?(r&&r(n.tr.wrap(o,s).scrollIntoView()),!0):!1}}function vp(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}}function yp(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var bp=yp(Vf,Uf,Jf),xp=yp(Vf,Zf,Qf),Sp={Enter:yp(rp,op,sp,lp),"Mod-Enter":ap,Backspace:bp,"Mod-Backspace":bp,"Shift-Backspace":bp,Delete:xp,"Mod-Delete":xp,"Mod-a":dp},Cp={"Ctrl-h":Sp.Backspace,"Alt-Backspace":Sp[`Mod-Backspace`],"Ctrl-d":Sp.Delete,"Ctrl-Alt-Backspace":Sp[`Mod-Delete`],"Alt-Delete":Sp[`Mod-Delete`],"Alt-d":Sp[`Mod-Delete`],"Ctrl-a":hp,"Ctrl-e":gp};for(let e in Sp)Cp[e]=Sp[e];typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform();function wp(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return Tp(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function Tp(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new Yl(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new Yl(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=Sd(a,n,r,t);return s?(e&&Ep(e,t,s,i,n),!0):!1}function Ep(e,t,n,r,i){let a=z.empty;for(let e=n.length-1;e>=0;e--)a=z.from(n[e].type.create(n[e].attrs,a));e.step(new md(t.start-(r?2:0),t.end,t.start,t.end,new B(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&Md(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function Dp(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?Op(t,n,e,a):kp(t,n,a):!0:!1}}function Op(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new md(a-1,o,a,o,new B(z.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Yl(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=bd(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return Pd(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function kp(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+ +!s,u+1,o.content.append(c?z.empty:z.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new md(d-+!!s,f+ +!!c,d+1,f-1,new B((s?z.empty:z.from(i.copy(z.empty))).append(c?z.empty:z.from(i.copy(z.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function Ap(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,c=s.child(o-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==s.type,i=z.from(r?e.create():null),o=new B(z.from(e.create(null,z.from(s.type.create(null,i)))),r?3:1,0),l=a.start,u=a.end;n(t.tr.step(new md(l-(r?3:1),u,l,u,o,1,!0)).scrollIntoView())}return!0}}var jp=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Mp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Np=null,Pp=function(e,t,n){let r=Np||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Fp=function(){Np=null},Ip=function(e,t,n,r){return n&&(Rp(e,t,n,r,-1)||Rp(e,t,n,r,1))},Lp=/^(img|br|input|textarea|hr)$/i;function Rp(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:zp(e))){let n=e.parentNode;if(!n||!Bp(n)||Kp(e)||Lp.test(e.nodeName)||e.contentEditable==`false`)return!1;t=jp(e)+(i<0?0:1),e=n}else if(Bp(e)){let n=e.childNodes[t+(i<0?-1:0)];if(Bp(n)&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?zp(e):0}else return!1}}function zp(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Bp(e){return e.nodeType==1}function Vp(e){return e.nodeType==3}function Hp(e,t){return t?e.contains(Bp(t)?t:t.parentNode):!1}function Up(e,t){for(;;){if(Vp(e)&&t)return e;if(Bp(e)&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=zp(e)}else if(e.parentNode&&!Kp(e))t=jp(e),e=e.parentNode;else return null}}function Wp(e,t){for(;;){if(Vp(e)&&t<e.nodeValue.length)return e;if(Bp(e)&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Kp(e))t=jp(e)+1,e=e.parentNode;else return null}}function Gp(e,t,n){for(let r=t==0,i=t==zp(e);r||i;){if(e==n)return!0;let t=jp(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==zp(e)}}function Kp(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var qp=function(e){return e.focusNode&&Ip(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Jp(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function Yp(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Xp(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(zp(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(zp(r.startContainer),r.startOffset)}}}var Zp=typeof navigator<`u`?navigator:null,Qp=typeof document<`u`?document:null,$p=Zp&&Zp.userAgent||``,em=/Edge\/(\d+)/.exec($p),tm=/MSIE \d/.exec($p),nm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($p),rm=!!(tm||nm||em),im=tm?document.documentMode:nm?+nm[1]:em?+em[1]:0,am=!rm&&/gecko\/(\d+)/i.test($p);am&&+(/Firefox\/(\d+)/.exec($p)||[0,0])[1];var om=!rm&&/Chrome\/(\d+)/.exec($p),sm=!!om,cm=om?+om[1]:0,lm=!rm&&!!Zp&&/Apple Computer/.test(Zp.vendor),um=lm&&(/Mobile\/\w+/.test($p)||!!Zp&&Zp.maxTouchPoints>2),dm=um||(Zp?/Mac/.test(Zp.platform):!1),fm=Zp?/Win/.test(Zp.platform):!1,pm=/Android \d/.test($p),mm=!!Qp&&`webkitFontSmoothing`in Qp.documentElement.style,hm=mm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function gm(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function _m(e,t){return typeof e==`number`?e:e[t]}function vm(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function ym(e,t,n){if(!Pm(t)&&t.left==0)return;let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(!Bp(o)){o=Mp(o);continue}let e=o==a.body,n=e?gm(a):vm(o),s=0,c=0;if(t.top<n.top+_m(r,`top`)?c=-(n.top-t.top+_m(i,`top`)):t.bottom>n.bottom-_m(r,`bottom`)&&(c=t.bottom-t.top>n.bottom-n.top?t.top+_m(i,`top`)-n.top:t.bottom-n.bottom+_m(i,`bottom`)),t.left<n.left+_m(r,`left`)?s=-(n.left-t.left+_m(i,`left`)):t.right>n.right-_m(r,`right`)&&(s=t.right-n.right+_m(i,`right`)),s||c)if(e)a.defaultView.scrollBy(s,c);else{let e=o.scrollLeft,n=o.scrollTop;c&&(o.scrollTop+=c),s&&(o.scrollLeft+=s);let r=o.scrollLeft-e,i=o.scrollTop-n;t={left:t.left-r,top:t.top-i,right:t.right-r,bottom:t.bottom-i}}let l=e?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(l))break;o=l==`absolute`?o.offsetParent:Mp(o)}}function bm(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:xm(e.dom)}}function xm(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Mp(r));return t}function Sm({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Cm(n,r==0?0:r-t)}function Cm(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var wm=null;function Tm(e){if(e.setActive)return e.setActive();if(wm)return e.focus(wm);let t=xm(e);e.focus(wm==null?{get preventScroll(){return wm={preventScroll:!0},!0}}:void 0),wm||(wm=!1,Cm(t,0))}function Em(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(Bp(u))e=u.getClientRects();else if(Vp(u))e=Pp(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&Vp(n)?{left:p.right<t.left?p.right:p.left,top:t.top}:t,Bp(u)&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&Vp(n)?Dm(n,i):!n||r?{node:e,offset:a}:Em(n,i)}function Dm(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=Fm(r,1);if(n.top!=n.bottom&&Om(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function Om(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function km(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Am(e,t,n){let{node:r,offset:i}=Em(t,n),a=-1;if(Bp(r)&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function jm(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(Bp(t.dom)&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function Mm(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(Bp(n)){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(Om(t,i))return Mm(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function Nm(e,t){let n=e.dom.ownerDocument,r,i=0,a=Xp(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o)){let n=e.dom.getBoundingClientRect();if(!Om(t,n)||(o=Mm(e.dom,t,n),!o))return null}if(lm)for(let e=o;r&&e;e=Mp(e))e.draggable&&(r=void 0);if(o=km(o,t),r){if(am&&Bp(r)&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;mm&&i&&Bp(r)&&Bp(n=r.childNodes[i-1])&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&Bp(r.lastChild)&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||!Bp(r)||r.childNodes[i-1].nodeName!=`BR`)&&(s=jm(e,r,i,t))}s??=Am(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Pm(e){return e.top<e.bottom||e.left<e.right}function Fm(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Pm(e))return e}return Array.prototype.find.call(n,Pm)||e.getBoundingClientRect()}var Im=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Lm(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=mm||am;if(Vp(r))if(o&&(Im.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=Fm(Pp(r,i,i),n);if(am&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Fm(Pp(r,i-1,i-1),-1);if(t.top==e.top){let n=Fm(Pp(r,i,i+1),-1);if(n.top!=e.top)return Rm(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,Rm(Fm(Pp(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==zp(r))){let e=r.childNodes[i-1];if(Bp(e))return zm(e.getBoundingClientRect(),!1)}if(a==null&&i<zp(r)){let e=r.childNodes[i];if(Bp(e))return zm(e.getBoundingClientRect(),!0)}return zm(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==zp(r))){let e=r.childNodes[i-1],t=Vp(e)?Pp(e,zp(e)-+!o):Bp(e)&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return Rm(Fm(t,1),!1)}if(a==null&&i<zp(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?Vp(e)?Pp(e,0,+!o):Bp(e)?e:null:null;if(t)return Rm(Fm(t,-1),!0)}return Rm(Fm(Vp(r)?Pp(r):r,-n),n>=0)}function Rm(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function zm(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Bm(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Vm(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return Bm(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=Lm(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(Bp(e))t=e.getClientRects();else if(Vp(e))t=Pp(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var Hm=/[\u0590-\u08ac]/;function Um(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!Hm.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:Bm(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!Hp(l,u)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var Wm=null,Gm=null,Km=!1;function qm(e,t,n){return Wm==t&&Gm==n?Km:(Wm=t,Gm=n,Km=n==`up`||n==`down`?Vm(e,t,n):Um(e,t,n))}var Jm=0,Ym=1,Xm=2,Zm=3,Qm=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=Jm,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&Hp(this.contentDOM,e))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>jp(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=!!(e.compareDocumentPosition(this.contentDOM)&4);else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(Bp(a)?Hp(a,e):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(;n>0;n--){let e=this.children[n-1];if(e.size||!(e instanceof ah||e instanceof $m&&e.side>=0))break}if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?jp(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?jp(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=jp(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=jp(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(!Bp(t)||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((am||lm)&&e==t){let{node:e,offset:t}=o;if(Vp(e)){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
49
49
|
`),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:jp(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(am&&l.focusNode&&l.focusNode!=s.node&&Bp(l.focusNode)){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&lm)&&Ip(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Ip(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&am)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?Xm:Ym,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Zm:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Xm:Zm}n=a}this.dirty=Xm}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Xm:Ym;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},$m=class extends Qm{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){let e=Bp(a)?a:document.createElement(`span`);e!=a&&e.appendChild(a),e.hasAttribute(`contenteditable`)||(e.contentEditable=`false`),e.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==Jm&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},eh=class extends Qm{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},th=class e extends Qm{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=Bu.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Zm||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Zm&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Jm){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=Jm}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=Sh(a,n,o,r)),t>0&&(a=Sh(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},nh=class e extends Qm{constructor(e,t,n,r,i,a,o){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(!Vp(u))throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=Bu.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=ph(u,r,n),l?c=new oh(t,n,r,i,u,d||null,f,l):n.isText?new ih(t,n,r,i,u,f):new e(t,n,r,i,u,d||null,f)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(t.preserveWhitespace=`full`),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find(t=>Bp(t)&&e.indexOf(t.parentNode)<0&&this.dom.contains(t));n?t.contentElement=n:t.getContent=()=>z.empty}}return t}matchesNode(e,t,n){return this.dirty==Jm&&e.eq(this.node)&&mh(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new gh(this,a&&a.node,e),c=this.node.inlineContent,l=c&&this.node.isBlock;yh(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?jl.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,u,d)=>{s.syncToMarks(t.marks,n,e,d),l&&t.isAtom&&!t.isText&&s.addHackNode(`IMG`,s.top);let f;s.findNodeMatch(t,a,u,d)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(f=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,u,f,e)||s.updateNextNode(t,a,u,e,d,r)||s.addNode(t,a,u,e,r),r+=t.nodeSize,c&&(l=t.isAtom&&!t.isText)}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==Xm)&&(a&&this.protectLocalComposition(e,a),sh(this.contentDOM,this.children,e),um&&bh(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof V)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=xh(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&=void 0}let a=new eh(this,i,t,r);e.input.compositionNodes.push(a),this.children=Sh(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==Zm||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Jm}updateOuterDeco(e){if(mh(e,this.outerDeco))return;let t=!Bp(this.nodeDOM),n=this.dom;this.dom=dh(this.dom,this.nodeDOM,uh(this.outerDeco,this.node,t),uh(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){Bp(this.nodeDOM)&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){Bp(this.nodeDOM)&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function rh(e,t,n,r,i){ph(r,t,e);let a=new nh(void 0,e,t,n,r,r,r);return a.contentDOM&&a.updateChildren(i,0),a}var ih=class e extends nh{constructor(e,t,n,r,i,a){super(e,t,n,r,i,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==Zm||this.dirty!=Jm&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Jm||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=Jm,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Zm)}get domAtom(){return!1}isText(e){return this.node.text==e}},ah=class extends Qm{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Jm&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},oh=class extends nh{constructor(e,t,n,r,i,a,o,s){super(e,t,n,r,i,a,o),this.spec=s}update(e,t,n,r){if(this.dirty==Zm)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function sh(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=hh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof th){let t=r?r.previousSibling:e.lastChild;sh(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=hh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var ch=function(e){e&&(this.nodeName=e)};ch.prototype=Object.create(null);var lh=[new ch];function uh(e,t,n){if(e.length==0)return lh;let r=n?lh[0]:new ch,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new ch(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new ch(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function dh(e,t,n,r){if(n==lh&&r==lh)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=lh[0],i=t)}fh(i,o||lh[0],a)}return i}function fh(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function ph(e,t,n){return dh(e,e,lh,uh(t,n,!Bp(e)))}function mh(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function hh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var gh=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=_h(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=Jm,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i<0&&this.index<this.top.children.length){let t=this.top.children[this.index];t instanceof th&&t.dirty!=Zm&&t.mark.type==e[a].type&&t.spec.update&&!this.isLocked(t.dom)&&t.spec.update(e[a])&&(t.mark=e[a],i=this.index,this.changed=!0)}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=th.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==Zm&&a.dom==a.contentDOM&&(a.dirty=Xm),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof nh){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=Zm&&mh(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=Xm,u.updateChildren(r,a+1),u.dirty=Jm),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!mh(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=nh.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=nh.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new $m(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof th;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof ih)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((lm||sm)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new ah(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||Bp(e)&&e.contains(this.lock.parentNode))}};function _h(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof th)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function vh(e,t){return e.type.side-t.type.side}function yh(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u)if(d){d.sort(vh);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function bh(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function xh(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function Sh(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function Ch(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(qp(n)){for(c=o;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&H.isSelectable(i.node)&&i.parent&&!(i.node.isInline&&Gp(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new H(o==e?s:r.resolve(e))}else if(am&&t==`key`&&o>e.state.selection.to&&Bp(n.focusNode)&&n.focusOffset==n.focusNode.childNodes.length&&i&&i.posAtStart>e.state.selection.to)for(let e=n.focusNode;;e=e.parentNode){if(getComputedStyle(e).overflow!=`visible`){l=lf.findFrom(r.resolve(i.posAtStart),1);break}if(e==i.dom||e.nextSibling||!e.parentNode||!Bp(e.parentNode))break}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=Ph(e,u,s,n)}return l}function wh(e){return e.editable?e.hasFocus():Ih(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Th(e,t=!1){let n=e.state.selection;if(Mh(e,n),!wh(e))return;let r=e.input.mouseDown;if(!t&&sm&&r){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Ip(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)&&r.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)jh(e);else{let{anchor:r,head:i}=n,a,o;Eh&&!(n instanceof V)&&(n.$from.parent.inlineContent||(a=Dh(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=Dh(e,n.to))),e.docView.setSelection(r,i,e,t),Eh&&(a&&kh(a),o&&kh(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&Ah(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var Eh=lm||sm&&cm<63;function Dh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(lm&&i&&i.contentEditable==`false`)return Oh(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return Oh(i);if(a)return Oh(a)}}function Oh(e){return e.contentEditable=`true`,lm&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function kh(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function Ah(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!wh(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function jh(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,jp(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&rm&&im<=11&&(n.disabled=!0,n.disabled=!1)}function Mh(e,t){if(t instanceof H){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Nh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Nh(e)}function Nh(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function Ph(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||V.between(t,n,r)}function Fh(e){return e.editable&&!e.hasFocus()?!1:Ih(e)}function Ih(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return Hp(e.dom,t.anchorNode)&&(e.editable||Hp(e.dom,t.focusNode))}catch{return!1}}function Lh(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ip(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Rh(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&lf.findFrom(a,t)}function zh(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Bh(e,t,n){let r=e.state.selection;if(r instanceof V){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return zh(e,new V(r.$anchor,a))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=Rh(e.state,t);return n&&n instanceof H?zh(e,n):!1}else if(!(dm&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?H.isSelectable(i)?zh(e,new H(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):zh(e,new V(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1}}else if(r instanceof H&&r.node.isInline)return zh(e,new V(t>0?r.$to:r.$from));else{let n=Rh(e.state,t);return n?zh(e,n):!1}}function Vh(e,t){let n=e.pmViewDesc;return n?n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`):Bp(e)&&e.contentEditable==`false`}function Hh(e,t){return t<0?Uh(e):Wh(e)}function Uh(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(am&&Bp(n)&&r<zp(n)&&Vh(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(!Bp(n))break;let e=n.childNodes[r-1];if(Vh(e,-1))i=n,a=--r;else if(Vp(e))n=e,r=n.nodeValue.length;else break}else if(Gh(n))break;else{let t=n.previousSibling;for(;t&&Vh(t,-1);)i=n.parentNode,a=jp(t),t=t.previousSibling;if(t)n=t,r=zp(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?Jh(e,n,r):i&&Jh(e,i,a)}function Wh(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=zp(n),a,o;for(;;)if(r<i){if(!Bp(n))break;let e=n.childNodes[r];if(Vh(e,1))a=n,o=++r;else break}else if(Gh(n))break;else{let t=n.nextSibling;for(;t&&Vh(t,1);)a=t.parentNode,o=jp(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=zp(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&Jh(e,a,o)}function Gh(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Kh(e,t){for(;e&&t==e.childNodes.length&&!Kp(e);)t=jp(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(Vp(n))return n;if(Bp(n)&&n.contentEditable==`false`)break;e=n,t=0}}function qh(e,t){for(;e&&!t&&!Kp(e);)t=jp(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(Vp(n))return n;if(Bp(n)&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function Jh(e,t,n){if(!Vp(t)){let e,r;(r=Kh(t,n))?(t=r,n=0):(e=qh(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(qp(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Th(e)},50)}function Yh(e,t){let n=e.state.doc.resolve(t);if(!(sm||fm)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function Xh(e,t,n){let r=e.state.selection;if(r instanceof V&&!r.empty||n.indexOf(`s`)>-1||dm&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=Rh(e.state,t);if(n&&n instanceof H)return zh(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof hf?lf.near(n,t):lf.findFrom(n,t);return o?zh(e,o):!1}return!1}function Zh(e,t){if(!(e.state.selection instanceof V))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function Qh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function $h(e){if(!lm||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&Bp(t)&&n==0&&t.firstChild&&Bp(t.firstChild)&&t.firstChild.contentEditable==`false`){let n=t.firstChild;Qh(e,n,`true`),setTimeout(()=>Qh(e,n,`false`),20)}return!1}function eg(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function tg(e,t){let n=t.keyCode,r=eg(t);if(n==8||dm&&n==72&&r==`c`)return Zh(e,-1)||Hh(e,-1);if(n==46&&!t.shiftKey||dm&&n==68&&r==`c`)return Zh(e,1)||Hh(e,1);if(n==13||n==27)return!0;if(n==37||dm&&n==66&&r==`c`){let t=n==37?Yh(e,e.state.selection.from)==`ltr`?-1:1:-1;return Bh(e,t,r)||Hh(e,t)}else if(n==39||dm&&n==70&&r==`c`){let t=n==39?Yh(e,e.state.selection.from)==`ltr`?1:-1:1;return Bh(e,t,r)||Hh(e,t)}else if(n==38||dm&&n==80&&r==`c`)return Xh(e,-1,r)||Hh(e,-1);else if(n==40||dm&&n==78&&r==`c`)return $h(e)||Xh(e,1,r)||Hh(e,1);else if(r==(dm?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function ng(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||Bu.fromSchema(e.state.schema),s=fg(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&Bp(l)&&(u=dg[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&Bp(l)&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
|
|
50
50
|
|
|
@@ -259,7 +259,7 @@ img.ProseMirror-separator {
|
|
|
259
259
|
animation-iteration-count: infinite;
|
|
260
260
|
animation-delay: 200ms;
|
|
261
261
|
}
|
|
262
|
-
`,JP=w.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=ko({props:e,name:`MuiTouchRipple`}),[o,s]=w.useState([]),c=w.useRef(0),l=w.useRef(null);w.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=w.useRef(!1),d=zP(),f=w.useRef(null),p=w.useRef(null),m=w.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,P.jsx)(qP,{classes:{ripple:v(r.ripple,VP.ripple),rippleVisible:v(r.rippleVisible,VP.rippleVisible),ripplePulsate:v(r.ripplePulsate,VP.ripplePulsate),child:v(r.child,VP.child),childLeaving:v(r.childLeaving,VP.childLeaving),childPulsate:v(r.childPulsate,VP.childPulsate)},timeout:HP,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=w.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),g=w.useCallback(()=>{h({},{pulsate:!0})},[h]),_=w.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{_(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return w.useImperativeHandle(t,()=>({pulsate:g,start:h,stop:_}),[g,h,_]),(0,P.jsx)(KP,{className:v(VP.root,r.root,i),ref:p,...a,children:(0,P.jsx)(FP,{component:null,exit:!0,children:o})})});function YP(e){return Vr(`MuiButtonBase`,e)}var XP=Hr(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),ZP=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=y({root:[`root`,t&&`disabled`,n&&`focusVisible`]},YP,i);return n&&r&&(a.root+=` ${r}`),a},QP=I(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${XP.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),$P=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:g,onDragLeave:_,onFocus:y,onFocusVisible:b,onKeyDown:x,onKeyUp:S,onMouseDown:C,onMouseLeave:T,onMouseUp:E,onTouchEnd:ee,onTouchMove:D,onTouchStart:O,tabIndex:te=0,TouchRippleProps:k,touchRippleRef:A,type:j,...M}=n,ne=w.useRef(null),re=aP(),ie=QN(re.ref,A),[
|
|
262
|
+
`,JP=w.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=ko({props:e,name:`MuiTouchRipple`}),[o,s]=w.useState([]),c=w.useRef(0),l=w.useRef(null);w.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=w.useRef(!1),d=zP(),f=w.useRef(null),p=w.useRef(null),m=w.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,P.jsx)(qP,{classes:{ripple:v(r.ripple,VP.ripple),rippleVisible:v(r.rippleVisible,VP.rippleVisible),ripplePulsate:v(r.ripplePulsate,VP.ripplePulsate),child:v(r.child,VP.child),childLeaving:v(r.childLeaving,VP.childLeaving),childPulsate:v(r.childPulsate,VP.childPulsate)},timeout:HP,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=w.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),g=w.useCallback(()=>{h({},{pulsate:!0})},[h]),_=w.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{_(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return w.useImperativeHandle(t,()=>({pulsate:g,start:h,stop:_}),[g,h,_]),(0,P.jsx)(KP,{className:v(VP.root,r.root,i),ref:p,...a,children:(0,P.jsx)(FP,{component:null,exit:!0,children:o})})});function YP(e){return Vr(`MuiButtonBase`,e)}var XP=Hr(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),ZP=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=y({root:[`root`,t&&`disabled`,n&&`focusVisible`]},YP,i);return n&&r&&(a.root+=` ${r}`),a},QP=I(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${XP.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),$P=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:g,onDragLeave:_,onFocus:y,onFocusVisible:b,onKeyDown:x,onKeyUp:S,onMouseDown:C,onMouseLeave:T,onMouseUp:E,onTouchEnd:ee,onTouchMove:D,onTouchStart:O,tabIndex:te=0,TouchRippleProps:k,touchRippleRef:A,type:j,...M}=n,ne=w.useRef(null),re=aP(),ie=QN(re.ref,A),[ae,oe]=w.useState(!1);c&&ae&&oe(!1),w.useImperativeHandle(r,()=>({focusVisible:()=>{oe(!0),ne.current.focus()}}),[]);let se=re.shouldMount&&!l&&!c;w.useEffect(()=>{ae&&d&&!l&&re.pulsate()},[l,d,ae,re]);let ce=eF(re,`start`,C,u),le=eF(re,`stop`,g,u),ue=eF(re,`stop`,_,u),de=eF(re,`stop`,E,u),fe=eF(re,`stop`,e=>{ae&&e.preventDefault(),T&&T(e)},u),pe=eF(re,`start`,O,u),me=eF(re,`stop`,ee,u),he=eF(re,`stop`,D,u),ge=eF(re,`stop`,e=>{tP(e.target)||oe(!1),m&&m(e)},!1),_e=XN(e=>{ne.current||=e.currentTarget,tP(e.target)&&(oe(!0),b&&b(e)),y&&y(e)}),ve=()=>{let e=ne.current;return e?e.tagName!==`BUTTON`&&!(e.tagName===`A`&&e.href):s&&s!==`button`},N=XN(e=>{d&&!e.repeat&&ae&&e.key===` `&&re.stop(e,()=>{re.start(e)}),e.target===e.currentTarget&&ve()&&e.key===` `&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ve()&&e.key===`Enter`&&!c&&(e.preventDefault(),h&&h(e))}),ye=XN(e=>{d&&e.key===` `&&ae&&!e.defaultPrevented&&re.stop(e,()=>{re.pulsate(e)}),S&&S(e),h&&e.target===e.currentTarget&&ve()&&e.key===` `&&!e.defaultPrevented&&!c&&h(e)}),be=s;be===`button`&&(M.href||M.to)&&(be=p);let xe={};if(be===`button`){let e=!!M.formAction;xe.type=j===void 0&&!e?`button`:j,xe.disabled=c}else!M.href&&!M.to&&(xe.role=`button`),c&&(xe[`aria-disabled`]=c);let Se=QN(t,ne),Ce={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,tabIndex:te,focusVisible:ae},we=ZP(Ce);return(0,P.jsxs)(QP,{as:be,className:v(we.root,o),ownerState:Ce,onBlur:ge,onClick:h,onContextMenu:le,onFocus:_e,onKeyDown:N,onKeyUp:ye,onMouseDown:ce,onMouseLeave:fe,onMouseUp:de,onDragLeave:ue,onTouchEnd:me,onTouchMove:he,onTouchStart:pe,ref:Se,tabIndex:c?-1:te,type:j,...xe,...M,children:[a,se?(0,P.jsx)(JP,{ref:ie,center:i,...k}):null]})});function eF(e,t,n,r=!1){return XN(i=>(n&&n(i),r||e[t](i),!0))}function tF(e){return Vr(`MuiCircularProgress`,e)}Hr(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]);var nF=44,rF=rr`
|
|
263
263
|
0% {
|
|
264
264
|
transform: rotate(0deg);
|
|
265
265
|
}
|
|
@@ -288,58 +288,60 @@ img.ProseMirror-separator {
|
|
|
288
288
|
animation: ${iF} 1.4s ease-in-out infinite;
|
|
289
289
|
`,sF=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return y({root:[`root`,n,`color${L(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${L(n)}`,i&&`circleDisableShrink`]},tF,t)},cF=I(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${L(n.color)}`]]}})(Oo(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:aF||{animation:`${rF} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),lF=I(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),uF=I(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${L(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Oo(({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:oF||{animation:`${iF} 1.4s ease-in-out infinite`}}]}))),dF=I(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Oo(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),fF=w.forwardRef(function(e,t){let n=ko({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=sF(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((nF-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,P.jsx)(cF,{className:v(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,P.jsxs)(lF,{className:m.svg,ownerState:p,viewBox:`${nF/2} ${nF/2} ${nF} ${nF}`,children:[o?(0,P.jsx)(dF,{className:m.track,ownerState:p,cx:nF,cy:nF,r:(nF-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,P.jsx)(uF,{className:m.circle,style:h,ownerState:p,cx:nF,cy:nF,r:(nF-l)/2,fill:`none`,strokeWidth:l})]})})});function pF(e){return Vr(`MuiIconButton`,e)}var mF=Hr(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),hF=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return y({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${L(r)}`,i&&`edge${L(i)}`,`size${L(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},pF,t)},gF=I($P,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${L(n.color)}`],n.edge&&t[`edge${L(n.edge)}`],t[`size${L(n.size)}`]]}})(Oo(({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}}]})),Oo(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Mo()).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)}}],[`&.${mF.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${mF.loading}`]:{color:`transparent`}}))),_F=I(`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`}}]})),vF=w.forwardRef(function(e,t){let n=ko({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=KN(u),h=f??(0,P.jsx)(fF,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=hF(g);return(0,P.jsxs)(gF,{id:d?m:u,className:v(_.root,a),centerRipple:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,P.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,P.jsx)(_F,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),yF=IN((0,P.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`),bF=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,xF=({size:e,children:t})=>(e=bF(e),(0,P.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));xF.propTypes={size:m.number,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired};var SF=({size:e,children:t,sx:n})=>(0,P.jsx)(xF,{size:e,children:(0,P.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});SF.propTypes={size:m.oneOfType([m.string,m.number]),children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,sx:m.object};var CF=({fill:e})=>(0,P.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});CF.propTypes={fill:m.string.isRequired};var wF=({fill:e})=>(0,P.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});wF.propTypes={fill:m.string.isRequired};var TF=({fill:e})=>(0,P.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});TF.propTypes={fill:m.string.isRequired};var EF=({fill:e})=>(0,P.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});EF.propTypes={fill:m.string.isRequired};var DF=({fill:e})=>(0,P.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});DF.propTypes={fill:m.string.isRequired};var OF=(e,t)=>{class n extends w.Component{static propTypes={iconSet:m.oneOf([`emoji`,`check`]),shape:m.oneOf([`round`,`square`]),category:m.oneOf([`feedback`,void 0]),open:m.bool,size:m.oneOfType([m.number,m.string]),fg:m.string,bg:m.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,P.jsx)(e,{fill:s}):(0,P.jsx)(t,{fill:s}),u=n===`check`?(0,P.jsx)(e,{fill:c}):(0,P.jsx)(t,{fill:c});return a?(0,P.jsx)(SF,{size:o,children:u}):(0,P.jsxs)(SF,{size:o,children:[i===`feedback`?r===`round`?(0,P.jsx)(TF,{fill:c}):(0,P.jsx)(wF,{fill:c}):r===`round`?(0,P.jsx)(EF,{fill:c}):(0,P.jsx)(DF,{fill:c}),l]})}}return n},kF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,P.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
|
|
290
290
|
c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z`,fill:e}),(0,P.jsx)(`rect`,{x:`21.1`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e}),(0,P.jsx)(`rect`,{x:`12.7`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e})]});kF.propTypes={fill:m.string.isRequired};var AF=({fill:e,x:t=0,y:n=0})=>(0,P.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});AF.propTypes={fill:m.string.isRequired,x:m.number,y:m.number};var jF=OF(AF,kF);jF.propTypes={iconSet:m.oneOf([`emoji`,`check`]),shape:m.oneOf([`round`,`square`]),category:m.oneOf([`feedback`,void 0]),open:m.bool,fg:m.string,bg:m.string,size:m.oneOfType([m.string,m.number])},jF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#f8ffe2`,size:30};var MF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,P.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,P.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})]});MF.propTypes={fill:m.string.isRequired};var NF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,P.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,P.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,P.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});NF.propTypes={fill:m.string.isRequired};var PF=OF(MF,NF);PF.propTypes={iconSet:m.oneOf([`emoji`,`check`]),shape:m.oneOf([`round`,`square`]),category:m.oneOf([`feedback`,void 0]),open:m.bool,fg:m.string,bg:m.string,size:m.oneOfType([m.string,m.number])},PF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30};var FF=({fill:e})=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,P.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});FF.propTypes={fill:m.string.isRequired};var IF=({fill:e})=>(0,P.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});IF.propTypes={fill:m.string.isRequired};var LF=({fill:e})=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,P.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,P.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
|
|
291
|
-
C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});LF.propTypes={fill:m.string.isRequired};var RF=class extends w.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(FF,{fill:t})]}),emoji:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),feedback:{check:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),emoji:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),square:{check:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(FF,{fill:t})]}),emoji:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),open:{check:(0,P.jsx)(SF,{children:(0,P.jsx)(FF,{fill:n})}),emoji:(0,P.jsx)(SF,{children:(0,P.jsx)(LF,{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]}};RF.propTypes={iconSet:m.oneOf([`emoji`,`check`,void 0]),shape:m.oneOf([`square`,void 0]),category:m.oneOf([`feedback`,void 0]),open:m.bool,fg:m.string,bg:m.string},RF.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var zF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,P.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,P.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});zF.propTypes={fill:m.string.isRequired};var BF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,P.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,P.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,P.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})]});BF.propTypes={fill:m.string.isRequired};var VF=OF(zF,BF);VF.propTypes={iconSet:m.oneOf([`emoji`,`check`]),shape:m.oneOf([`round`,`square`]),category:m.oneOf([`feedback`,void 0]),open:m.bool,fg:m.string,bg:m.string,size:m.oneOfType([m.string,m.number])},VF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function HF(e){return typeof e==`string`}function UF(e){return e?.ref||null}var WF=e=>e.scrollTop;function GF(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function KF(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function qF(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 JF(e){return`scale(${e}, ${e**2})`}var YF={entering:{opacity:1,transform:JF(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:JF(.75)},exited:{opacity:0,transform:JF(.75)}},XF={opacity:0,transform:JF(.75),visibility:`hidden`},ZF=w.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=zP(),_=w.useRef(),v=So(),y=w.useRef(null),b=QN(y,UF(i),t),x=GF(y,l),S=GF(y,(e,t)=>{WF(e);let{duration:n,delay:r,easing:i}=qF({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=GF(y,c),T=GF(y,f),E=GF(y,e=>{let{duration:t,delay:n,easing:r}=qF({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=JF(.75),u&&u(e)}),ee=GF(y,e=>{e.style.transition=``,d&&d(e)});return(0,P.jsx)(SP,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:E,onExited:ee,onExiting:T,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=KF(e,o,YF,XF,p,i.props.style);return w.cloneElement(i,{style:r,ref:b,...n})}})});ZF&&(ZF.muiSupportAuto=!0);function QF(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function $F(e){let t=BN(e);return t.body===e?HN(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function eI(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function tI(e){return parseFloat(HN(e).getComputedStyle(e).paddingRight)||0}function nI(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 rI(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!nI(e);t&&n&&eI(e,i)})}function iI(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function aI(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if($F(r)){let e=QF(HN(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${tI(r)+e}px`;let t=BN(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${tI(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=BN(r).body;else{let t=r.parentElement,n=HN(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 oI(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var sI=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&&eI(e.modalRef,!1);let r=oI(t);rI(t,e.mount,e.modalRef,r,!0);let i=iI(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=iI(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=aI(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=iI(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&&eI(e.modalRef,t),rI(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&&eI(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function cI(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 lI=cI;function uI(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var dI=uI,fI=`data-mui-focusable`;function pI(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${fI}]`):null}var mI=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function hI(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 gI(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 _I(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||gI(e))}function vI(e){let t=[],n=[];return Array.from(e.querySelectorAll(mI)).forEach((e,r)=>{let i=hI(e);i===-1||!_I(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 yI(){return!0}function bI(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=vI,isEnabled:o=yI,open:s}=e,c=w.useRef(!1),l=w.useRef(null),u=w.useRef(null),d=w.useRef(null),f=w.useRef(null),p=w.useRef(!1),m=w.useRef(null),h=ZN(UF(t),m),g=w.useRef(null);w.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),w.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=dI(BN(m.current)),t=pI(m.current)??m.current;return lI(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]),w.useEffect(()=>{if(!s||!m.current)return;let e=BN(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&dI(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=dI(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(lI(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=dI(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,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),w.cloneElement(t,{ref:h,onFocus:_}),(0,P.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function xI(e){return typeof e==`function`?e():e}var SI=w.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=w.useState(null),s=ZN(w.isValidElement(n)?UF(n):null,t);if(ni(()=>{i||o(xI(r)||document.body)},[r,i]),ni(()=>{if(a&&!i)return WN(t,a),()=>{WN(t,null)}},[t,a,i]),i){if(w.isValidElement(n)){let e={ref:s};return w.cloneElement(n,e)}return n}return a&&rw.createPortal(n,a)});function CI(e,t,n){return e===void 0||HF(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function wI(e,t,n){return typeof e==`function`?e(t,n):e}function TI(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 EI(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 DI(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=v(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=TI({...i,...r}),s=EI(r),c=EI(i),l=t(o),u=v(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 OI(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=wI(d[e],i),{props:{component:h,...g},internalRef:_}=DI({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=ZN(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,CI(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 kI={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},AI={opacity:0,visibility:`hidden`},jI=w.forwardRef(function(e,t){let n=So(),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=w.useRef(null),y=QN(v,UF(o),t),b=GF(v,d),x=GF(v,(e,t)=>{WF(e);let r=qF({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=GF(v,u),C=GF(v,m),T=GF(v,e=>{let t=qF({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),E=GF(v,e=>{e.style.transition=``,p&&p(e)});return(0,P.jsx)(SP,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:T,onExited:E,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=KF(e,c,kI,AI,h,o.props.style);return w.cloneElement(o,{style:r,ref:y,...n})}})});function MI(e){return Vr(`MuiBackdrop`,e)}Hr(`MuiBackdrop`,[`root`,`invisible`]);var NI=e=>{let{classes:t,invisible:n}=e;return y({root:[`root`,n&&`invisible`]},MI,t)},PI=I(`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`}}]}),FI=w.forwardRef(function(e,t){let n=ko({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=NI(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[y,b]=OI(`root`,{elementType:PI,externalForwardedProps:_,className:v(g.root,i),ownerState:h}),[x,S]=OI(`transition`,{elementType:jI,externalForwardedProps:_,ownerState:h});return(0,P.jsx)(x,{in:s,timeout:p,...m,...S,children:(0,P.jsx)(y,{"aria-hidden":!0,...b,ref:t,children:r})})});function II(e){return typeof e==`function`?e():e}function LI(e){return e?e.props.hasOwnProperty(`in`):!1}var RI=()=>{},zI=new sI;function BI(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=w.useRef({}),f=w.useRef(null),p=w.useRef(null),m=ZN(p,u),[h,g]=w.useState(!l),_=LI(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>BN(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{zI.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=YN(()=>{let e=II(t)||y().body;zI.add(b(),e),p.current&&x()}),C=()=>zI.isTopModal(b()),T=YN(e=>{f.current=e,e&&(l&&C()?x():p.current&&eI(p.current,v))}),E=w.useCallback(()=>{zI.remove(b(),v)},[v]);w.useEffect(()=>()=>{E()},[E]),w.useEffect(()=>{l?S():(!_||!i)&&E()},[l,E,_,i,S]);let ee=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=TI(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:ee(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:jN(()=>{g(!1),a&&a()},s?.props.onEnter??RI),onExited:jN(()=>{g(!0),o&&o(),i&&E()},s?.props.onExited??RI)}),rootRef:m,portalRef:T,isTopModal:C,exited:h,hasTransition:_}}function VI(e){return Vr(`MuiModal`,e)}Hr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var HI=e=>{let{open:t,exited:n,classes:r}=e;return y({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},VI,r)},UI=I(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Oo(({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`}}]}))),WI=I(FI,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),GI=w.forwardRef(function(e,t){let n=ko({name:`MuiModal`,props:e}),{BackdropComponent:r=WI,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:y=!1,hideBackdrop:b=!1,keepMounted:x=!1,onClose:S,onTransitionEnter:C,onTransitionExited:T,open:E,slotProps:ee={},slots:D={},theme:O,...te}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:y,hideBackdrop:b,keepMounted:x},{getRootProps:A,getBackdropProps:j,getTransitionProps:M,portalRef:ne,isTopModal:re,exited:ie,hasTransition:N}=BI({...k,rootRef:t}),ae={...k,exited:ie},oe=HI(ae),se={};if(c.props.tabIndex===void 0&&(se.tabIndex=`-1`),N){let{onEnter:e,onExited:t}=M();se.onEnter=e,se.onExited=t}let ce={slots:{root:d.Root,backdrop:d.Backdrop,...D},slotProps:{...f,...ee}},[le,ue]=OI(`root`,{ref:t,elementType:UI,externalForwardedProps:{...ce,...te,component:u},getSlotProps:A,ownerState:ae,className:v(o,oe?.root,!ae.open&&ae.exited&&oe?.hidden)}),[de,fe]=OI(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ce,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>j({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:v(i?.className,oe?.backdrop),ownerState:ae});return!x&&!E&&(!N||ie)?null:(0,P.jsx)(SI,{ref:ne,container:l,disablePortal:g,children:(0,P.jsxs)(le,{...ue,children:[!b&&r?(0,P.jsx)(de,{...fe}):null,(0,P.jsx)(bI,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:re,open:E,children:w.cloneElement(c,se)})]})})});function KI(e){return Vr(`MuiPaper`,e)}Hr(`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 qI=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return y({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},KI,i)},JI=I(`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}`]]}})(Oo(({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)`}}]}))),YI=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiPaper`}),r=So(),{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},d=qI(u);return(0,P.jsx)(JI,{as:a,ownerState:u,className:v(d.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(${pi(`#fff`,to(o))}, ${pi(`#fff`,to(o))})`}},...l.style}})});function XI(e){return Vr(`MuiPopover`,e)}Hr(`MuiPopover`,[`root`,`paper`]);function ZI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function QI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function $I(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function eL(e){return typeof e==`function`?e():e}var tL=e=>{let{classes:t}=e;return y({root:[`root`],paper:[`paper`]},XI,t)},nL=I(GI,{name:`MuiPopover`,slot:`Root`})({}),rL=I(YI,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),iL=w.forwardRef(function(e,t){let n=ko({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:y,transitionDuration:b=`auto`,TransitionProps:x={},disableScrollLock:S=!1,...C}=n,T=w.useRef(),E={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:y,transitionDuration:b,TransitionProps:x},ee=tL(E),D=w.useCallback(()=>{if(s===`anchorPosition`)return o;let e=eL(i),t=(e&&e.nodeType===1?e:VN(T.current).body).getBoundingClientRect();return{top:t.top+ZI(t,a.vertical),left:t.left+QI(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),O=w.useCallback(e=>({vertical:ZI(e,_.vertical),horizontal:QI(e,_.horizontal)}),[_.horizontal,_.vertical]),te=w.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if(s===`none`)return{top:null,left:null,transformOrigin:$I(n)};let r=D(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=UN(eL(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:$I(n)}},[i,s,D,O,f]),[k,A]=w.useState(p),j=w.useCallback(()=>{let e=T.current;if(!e)return;let t=te(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[te]);w.useEffect(()=>(S&&window.addEventListener(`scroll`,j),()=>window.removeEventListener(`scroll`,j)),[i,S,j]);let M=()=>{j()},ne=()=>{A(!1)};w.useEffect(()=>{p&&j()}),w.useImperativeHandle(r,()=>p?{updatePosition:()=>{j()}}:null,[p,j]),w.useEffect(()=>{if(!p)return;let e=RN(()=>{j()}),t=UN(eL(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,j]);let re=b,ie={slots:{transition:y,...h},slotProps:{transition:x,paper:m,...g}},[N,ae]=OI(`transition`,{elementType:ZF,externalForwardedProps:ie,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),M()},onExited:t=>{e.onExited?.(t),ne()}}),additionalProps:{appear:!0,in:p}});b===`auto`&&!N.muiSupportAuto&&(re=void 0);let oe=u||(i?VN(eL(i)).body:void 0),[se,{slots:ce,slotProps:le,...ue}]=OI(`root`,{ref:t,elementType:nL,externalForwardedProps:{...ie,...C},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:eP(typeof g.backdrop==`function`?g.backdrop(E):g.backdrop,{invisible:!0})},container:oe,open:p},ownerState:E,className:v(ee.root,l)}),[de,fe]=OI(`paper`,{ref:T,className:ee.paper,elementType:rL,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:E});return(0,P.jsx)(se,{...ue,...!HF(se)&&{slots:ce,slotProps:le,disableScrollLock:S},children:(0,P.jsx)(N,{...ae,timeout:re,children:(0,P.jsx)(de,{...fe,children:c})})})}),aL={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`},oL={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`},sL=s({background:()=>ML,backgroundDark:()=>NL,black:()=>KL,blueGrey100:()=>nR,blueGrey300:()=>rR,blueGrey600:()=>iR,blueGrey900:()=>aR,border:()=>zL,borderDark:()=>VL,borderGray:()=>HL,borderLight:()=>BL,buttonBorder:()=>gR,buttonFocusOutline:()=>$L,buttonHoverBg:()=>_R,correct:()=>mL,correctSecondary:()=>hL,correctTertiary:()=>gL,correctWithIcon:()=>_L,defaults:()=>G,disabled:()=>dL,disabledSecondary:()=>fL,disabledText:()=>pL,dropdownBackground:()=>FL,editorToolbar:()=>hR,fadedPrimary:()=>DL,focusChecked:()=>YL,focusCheckedBorder:()=>XL,focusOutline:()=>eR,focusUnchecked:()=>ZL,focusUncheckedBorder:()=>QL,incorrect:()=>vL,incorrectSecondary:()=>bL,incorrectWithIcon:()=>yL,keyBoardFocusIndicator:()=>tR,keypadButton:()=>cR,keypadButtonHover:()=>dR,keypadButtonOperator:()=>lR,keypadButtonOperatorHover:()=>fR,keypadEmptyPlaceholder:()=>uR,keypadInk:()=>mR,missing:()=>xL,missingWithIcon:()=>SL,primary:()=>CL,primaryDark:()=>TL,primaryLight:()=>wL,primaryText:()=>EL,secondary:()=>OL,secondaryBackground:()=>PL,secondaryDark:()=>AL,secondaryLight:()=>kL,secondaryText:()=>jL,surface:()=>IL,tableGrid:()=>UL,tableGridLight:()=>WL,tableStripe:()=>GL,tertiary:()=>LL,tertiaryLight:()=>RL,text:()=>uL,transparent:()=>JL,v:()=>cL,visualElementsColors:()=>vR,white:()=>qL}),G={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:`#208537`,CORRECT_SECONDARY:_a[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:`#a65f00`,INCORRECT_SECONDARY:pa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:pa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:oL[500],PRIMARY_LIGHT:oL[200],PRIMARY_DARK:oL[800],SECONDARY:aL.A400,SECONDARY_LIGHT:aL[200],SECONDARY_DARK:aL[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)`,SURFACE:`#EBECF1`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#66686A`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#81848F`,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)`,EDITOR_TOOLBAR:`#efefef`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(G);var cL=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},lL=cL(`pie`),uL=()=>lL(`text`,G.TEXT),dL=()=>lL(`disabled`,G.DISABLED),fL=()=>lL(`disabled-secondary`,G.DISABLED_SECONDARY),pL=()=>lL(`disabled-text`,`text`,G.DISABLED_TEXT),mL=()=>lL(`correct`,G.CORRECT),hL=()=>lL(`correct-secondary`,G.CORRECT_SECONDARY),gL=()=>lL(`correct-tertiary`,G.CORRECT_TERTIARY),_L=()=>lL(`correct-icon`,G.CORRECT_WITH_ICON),vL=()=>lL(`incorrect`,G.INCORRECT),yL=()=>lL(`incorrect-icon`,G.INCORRECT_WITH_ICON),bL=()=>lL(`incorrect-secondary`,G.INCORRECT_SECONDARY),xL=()=>lL(`missing`,G.MISSING),SL=()=>lL(`missing-icon`,G.MISSING_WITH_ICON),CL=()=>lL(`primary`,G.PRIMARY),wL=()=>lL(`primary-light`,G.PRIMARY_LIGHT),TL=()=>lL(`primary-dark`,G.PRIMARY_DARK),EL=()=>lL(`primary-text`,`text`,G.TEXT),DL=()=>lL(`faded-primary`,G.FADED_PRIMARY),OL=()=>lL(`secondary`,G.SECONDARY),kL=()=>lL(`secondary-light`,G.SECONDARY_LIGHT),AL=()=>lL(`secondary-dark`,G.SECONDARY_DARK),jL=()=>lL(`secondary-text`,`text`,G.TEXT),ML=()=>lL(`background`,G.BACKGROUND),NL=()=>lL(`background-dark`,G.BACKGROUND_DARK),PL=()=>lL(`secondary-background`,G.SECONDARY_BACKGROUND),FL=()=>lL(`dropdown-background`,G.DROPDOWN_BACKGROUND),IL=()=>lL(`surface`,G.SURFACE),LL=()=>lL(`tertiary`,G.TERTIARY),RL=()=>lL(`tertiary-light`,G.TERTIARY_LIGHT),zL=()=>lL(`border`,G.BORDER),BL=()=>lL(`border-light`,G.BORDER_LIGHT),VL=()=>lL(`border-dark`,G.BORDER_DARK),HL=()=>lL(`border-gray`,G.BORDER_GRAY),UL=()=>lL(`table-grid`,`text`,G.TABLE_GRID),WL=()=>lL(`table-grid-light`,`border-light`,G.TABLE_GRID_LIGHT),GL=()=>lL(`table-stripe`,`background-dark`,G.TABLE_STRIPE),KL=()=>lL(`black`,G.BLACK),qL=()=>lL(`white`,G.WHITE),JL=()=>G.TRANSPARENT,YL=()=>lL(`focus-checked`,G.FOCUS_CHECKED),XL=()=>lL(`focus-checked-border`,G.FOCUS_CHECKED_BORDER),ZL=()=>lL(`focus-unchecked`,G.FOCUS_UNCHECKED),QL=()=>lL(`focus-unchecked-border`,G.FOCUS_UNCHECKED_BORDER),$L=()=>lL(`button-focus-outline`,G.BUTTON_FOCUS_OUTLINE),eR=()=>lL(`focus-outline`,`button-focus-outline`,`focus-checked-border`,G.FOCUS_CHECKED_BORDER),tR=eR,nR=()=>lL(`blue-grey-100`,G.BLUE_GREY100),rR=()=>lL(`blue-grey-300`,G.BLUE_GREY300),iR=()=>lL(`blue-grey-600`,G.BLUE_GREY600),aR=()=>lL(`blue-grey-900`,G.BLUE_GREY900),oR=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return t?t.slice(1).map(e=>parseInt(e,16)):e.match(/\d+/g).slice(0,3).map(Number)},sR=(e,t)=>`color-mix(in srgb, rgb(${oR(e).map(e=>(e-255*(1-t))/t).join(` `)}) ${t*100}%, ${lL(`background`,G.WHITE)})`,cR=()=>lL(`keypad-button`,sR(G.KEYPAD_BUTTON,.5)),lR=()=>lL(`keypad-button-operator`,sR(G.KEYPAD_BUTTON_OPERATOR,.5)),uR=()=>lL(`keypad-empty-placeholder`,G.KEYPAD_EMPTY_PLACEHOLDER),dR=()=>lL(`keypad-button-hover`,sR(G.KEYPAD_BUTTON_HOVER,.25)),fR=()=>lL(`keypad-button-operator-hover`,sR(G.KEYPAD_BUTTON_OPERATOR_HOVER,.25)),pR=`clamp(0.6, (r + g + b) / 450, 1)`,mR=()=>`rgb(from ${uL()} calc(r * ${pR}) calc(g * ${pR}) calc(b * ${pR}))`,hR=()=>sR(G.EDITOR_TOOLBAR,.125),gR=()=>lL(`button-border`,G.BUTTON_BORDER),_R=()=>lL(`button-hover-bg`,G.BUTTON_HOVER_BG),vR={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},yR=I(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),bR=I(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${NL()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, ${uL()})`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${hL()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${bL()})`}}),xR=I(`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`}}),SR=class extends w.Component{static propTypes={correctness:m.string,feedback:m.string};nodeRef=w.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,P.jsx)(EP,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,P.jsx)(xR,{ref:this.nodeRef,children:(0,P.jsx)(yR,{children:(0,P.jsx)(bR,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,P.jsx)(`div`,{children:(0,P.jsx)(FP,{children:this.renderFeedback()})})}},CR=s({Correct:()=>kR,Incorrect:()=>AR,NothingSubmitted:()=>MR,PartiallyCorrect:()=>jR}),wR=g(`pie-libs:render-ui:response-indicators`),TR=I(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),ER=I(iL)({cursor:`pointer`}),DR=I(`div`)({padding:`0`,borderRadius:`4px`}),OR=(e,t)=>{class n extends w.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{wR(`[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,P.jsxs)(TR,{hasFeedback:!!n,children:[(0,P.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,P.jsx)(e,{})}),n&&(0,P.jsx)(ER,{PaperComponent:DR,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,P.jsx)(SR,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:m.string},n},kR=OR(jF,`correct`),AR=OR(PF,`incorrect`),jR=OR(VF,`partially-correct`),MR=OR(RF,`nothing-submitted`);function NR(e){return Vr(`MuiCollapse`,e)}Hr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var PR=e=>{let{orientation:t,classes:n}=e;return y({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},NR,n)},FR=I(`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]}})(Oo(({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`}}]}))),IR=I(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),LR=I(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),RR=w.forwardRef(function(e,t){let n=ko({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:y={},style:b,timeout:x=Wa.standard,TransitionComponent:S=SP,...C}=n,T={...n,orientation:g,collapsedSize:o},E=PR(T),ee=So(),D=zP(),O=w.useRef(null),te=w.useRef(),k=typeof o==`number`?`${o}px`:o,A=g===`horizontal`,j=A?`width`:`height`,M=w.useRef(null),ne=QN(t,M),re=()=>O.current?O.current[A?`clientWidth`:`clientHeight`]:0,ie=GF(M,(e,t)=>{O.current&&A&&(O.current.style.position=`absolute`),e.style[j]=k,u&&u(e,t)}),N=GF(M,(e,t)=>{let n=re();O.current&&A&&(O.current.style.position=``);let{duration:r,easing:i}=qF({style:b,timeout:x,easing:c},{mode:`enter`});if(x===`auto`){let t=ee.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,te.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[j]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),ae=GF(M,(e,t)=>{e.style[j]=`auto`,d&&d(e,t)}),oe=GF(M,e=>{e.style[j]=`${re()}px`,p&&p(e)}),se=GF(M,m),ce=GF(M,e=>{let t=re(),{duration:n,easing:r}=qF({style:b,timeout:x,easing:c},{mode:`exit`});if(x===`auto`){let n=ee.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,te.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[j]=k,e.style.transitionTimingFunction=r,h&&h(e)}),le=e=>{x===`auto`&&D.start(te.current||0,e),r&&r(M.current,e)},ue={slots:_,slotProps:y,component:s},[de,fe]=OI(`root`,{ref:ne,className:v(E.root,a),elementType:FR,externalForwardedProps:ue,ownerState:T,additionalProps:{style:{[A?`minWidth`:`minHeight`]:k,...b}}}),[pe,me]=OI(`wrapper`,{ref:O,className:E.wrapper,elementType:IR,externalForwardedProps:ue,ownerState:T}),[he,ge]=OI(`wrapperInner`,{className:E.wrapperInner,elementType:LR,externalForwardedProps:ue,ownerState:T});return(0,P.jsx)(S,{in:l,onEnter:ie,onEntered:ae,onEntering:N,onExit:oe,onExited:se,onExiting:ce,addEndListener:le,nodeRef:M,timeout:x===`auto`?null:x,...C,children:(e,{ownerState:t,...n})=>{let r={...T,state:e};return(0,P.jsx)(de,{...fe,className:v(fe.className,{entered:E.entered,exited:!l&&k===`0px`&&E.hidden}[e]),ownerState:r,...n,children:(0,P.jsx)(pe,{...me,ownerState:r,children:(0,P.jsx)(he,{...ge,ownerState:r,children:i})})})}})});RR&&(RR.muiSupportAuto=!0);var zR=`4.1.3`,BR=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,VR=`@pie-lib/math-rendering@2`,HR=[`nemeth`,`euro`],UR=`mathjax@${zR}/sre`,WR=/^[^@]+@[^@]+$/;function GR(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!WR.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function KR(){let e=globalThis[VR]?.opts;return e&&typeof e==`object`?e:{}}function qR(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function JR(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=qR(r);e&&t.set(n,e)}return t.size?t:void 0}function YR(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function XR(e,t){let n=KR(),r=qR(e.assetRoot??n.assetRoot)??GR(t);return{root:r,speechPath:qR(e.speechPath??n.speechPath)??(r?`${r}/${UR}`:void 0),speechLocales:YR(e.speechLocales??n.speechLocales),urls:JR(e.assetUrls??n.assetUrls)}}function ZR(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!HR.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function QR(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!HR.includes(e))}var $R=`pie-mathjax-no-asset-root`,ez={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},tz=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function nz(e){let t=globalThis;t[tz]??=[];let n=t[tz];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${ez[e]}. Set window['${VR}'].opts.assetRoot to an npm root. See ${BR}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent($R,{detail:{effect:e,message:r,docsUrl:BR}}))}var rz=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,iz=`pie-mathjax-version-conflict`,az=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function oz(e,t){if(typeof window>`u`)return;let n=globalThis;n[az]??={logged:!1,conditions:[]};let r=n[az];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${rz}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(iz,{detail:{condition:e,message:i,docsUrl:rz}}))}function sz(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function cz(){return window.MathJax}function lz(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${zR}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${zR}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function uz(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(lz(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(nz(`untypeset`),Promise.resolve(!1))}var dz=globalThis,fz=`PIE-MJX-CHTML-styles`,pz=[`MJX-CHTML-styles`,`MJX-SVG-styles`],mz=sz,hz=`http://www.w3.org/1998/Math/MathML`,gz=/^([a-z_][\w.-]*):math$/,_z=/^[a-z][a-z0-9-]*$/;function vz(e){for(let t of e.querySelectorAll(`*`)){let n=gz.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(yz(t,`${n}:`))}}function yz(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!_z.test(n))return e;let r=e.ownerDocument.createElementNS(hz,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?yz(n,t):n)}return r}var bz=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),xz={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},Sz={tight:`0em`,medium:`0.1em`,loose:`0.2em`},Cz=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,wz=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,Tz=/^(\d+(\.\d*)?|\.\d+)$/,Ez=new Set([`mn`,`mo`,`mi`,`mtext`]),Dz=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function Oz(e,t,n=[],r={}){let i=e.createElementNS(hz,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function kz(e,t){let n=Oz(e.document,`mo`);return n.textContent=t,n}function Az(e){let t=Oz(e.document,`mn`);return t.textContent=`0`,Oz(e.document,`mphantom`,[t])}function jz(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function Mz(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function Nz(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function Pz(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function Fz(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(Nz(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else Ez.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:Pz(r.length,n.stackAlign,i??a),position:t}}function Iz(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>bz.has(e))}function Lz(e,t){let n=[...e.children].filter(e=>!Nz(e));return n.length<=1?n[0]??null:Oz(t.document,`mrow`,n)}function Rz(e,t,n){let r=jz(e,`location`)??`n`,i=Iz(e.getAttribute(`crossout`)),a=[...e.children].map(e=>Nz(e)?null:e.localName===`mscarry`?{content:Lz(e,n),location:jz(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?Iz(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:Pz(a.length,n.stackAlign),position:t,scale:Tz.test(o)?o:`0.6`}}function zz(e){let t=jz(e,`mslinethickness`)??`medium`,n=xz[t]??(Cz.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${wz.test(r)?r:`currentColor`}`}function Bz(e,t,n){let r=Math.max(0,Mz(e,`length`));return{kind:`line`,length:r,anchor:Pz(r,n.stackAlign),position:t,border:zz(e)}}function Vz(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+Mz(e,`position`);switch(e.localName){case`msgroup`:Vz([...e.children],o,Mz(e,`shift`),r,i);break;case`msline`:i.push(Bz(e,o,r));break;case`mscarries`:i.push(Rz(e,o,r));break;case`msrow`:case`mrow`:i.push(Fz([...e.children],o,r));break;default:i.push(Fz([e],o,r))}})}function Hz(e){return-e.anchor-e.position}function Uz(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function Wz(e){return Hz(e)+Uz(e)-1}function Gz(e,t,n,r){let i=e=>Oz(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>Oz(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function Kz(e,t,n){let r=Oz(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?Oz(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function qz(e,t,n,r,i){let a=e&&t.crossout.length?Kz(e,t.crossout,i):e;if(!t.content)return a;let o=Oz(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return Gz(a??Az(i),o,n,i)}function Jz(e,t){return e.carries[t-Hz(e)]??null}function Yz(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=Jz(s,t),l=n.slice(0,o).some(e=>Jz(e,t));if(!c&&!l)return;let u=c??{content:Az(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=qz(i,u,d,s.scale,r)}),e.content=i}function Xz(e,t){let n=e.filter(e=>Uz(e)>0),r=Math.min(0,...n.map(Hz)),i=Math.max(r,...n.map(Wz))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+Hz(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+Hz(e)+r].content=t}),u.length&&n.forEach((e,n)=>{Yz(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function Zz(e,{rows:t},n){let r=Oz(n.document,`mtable`,t.map(e=>Oz(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return Oz(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])Dz.has(t)||r.setAttribute(t,n);let i=jz(e,`charspacing`)??`medium`,a=jz(e,`charalign`);return r.setAttribute(`columnspacing`,Sz[i]??(Cz.test(i)?i:Sz.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function Qz(e){return{document:e.ownerDocument,stackAlign:jz(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function $z(e){let t=Qz(e),n=[];return Vz([...e.children],0,0,t,n),Zz(e,Xz(n,t),t)}function eB(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function tB(e,t){let n=kz(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[Oz(t.document,`mrow`,[e,Oz(t.document,`mspace`,[],{width:`0.2em`})]),Oz(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function nB(e){let t=Qz(e),[n,r,...i]=[...e.children],a=n&&!Nz(n)?n:null,o=r&&!Nz(r)?r:null,s=jz(e,`longdivstyle`)??`lefttop`,c=zz(e),l=[];Vz(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...Fz(n,0,t).cells)};switch(s){case`left/\\right`:f(a,kz(t,`/`)),p(kz(t,`\\`),o);break;case`left)(right`:f(a,kz(t,`)`)),p(kz(t,`(`),o);break;case`:right=right`:p(kz(t,`:`),a,kz(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&Vz([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...tB(a,t));break}let m=Xz(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+Hz(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+Wz(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,eB(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,eB(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:rB(h,g,s,a,o,c,t);break;default:eB(h,g,_(1),v,`top`,c)}return Zz(e,m,t)}function rB(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&Oz(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function iB(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?$z(t):nB(t))}var aB=`PIE-MJX-explorer-styles`,oB=`var(--pie-text, black)`,sB=`var(--pie-background, #ffffff)`,cB=`var(--pie-border-dark, #66686A)`,lB=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,uB=`color-mix(in srgb, ${lB} 15%, transparent)`,dB=`
|
|
291
|
+
C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});LF.propTypes={fill:m.string.isRequired};var RF=class extends w.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(FF,{fill:t})]}),emoji:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),feedback:{check:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),emoji:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),square:{check:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(FF,{fill:t})]}),emoji:(0,P.jsxs)(SF,{children:[(0,P.jsx)(IF,{fill:n}),(0,P.jsx)(LF,{fill:t})]}),open:{check:(0,P.jsx)(SF,{children:(0,P.jsx)(FF,{fill:n})}),emoji:(0,P.jsx)(SF,{children:(0,P.jsx)(LF,{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]}};RF.propTypes={iconSet:m.oneOf([`emoji`,`check`,void 0]),shape:m.oneOf([`square`,void 0]),category:m.oneOf([`feedback`,void 0]),open:m.bool,fg:m.string,bg:m.string},RF.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var zF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,P.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,P.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});zF.propTypes={fill:m.string.isRequired};var BF=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,P.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,P.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,P.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})]});BF.propTypes={fill:m.string.isRequired};var VF=OF(zF,BF);VF.propTypes={iconSet:m.oneOf([`emoji`,`check`]),shape:m.oneOf([`round`,`square`]),category:m.oneOf([`feedback`,void 0]),open:m.bool,fg:m.string,bg:m.string,size:m.oneOfType([m.string,m.number])},VF.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function HF(e){return typeof e==`string`}function UF(e){return e?.ref||null}var WF=e=>e.scrollTop;function GF(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function KF(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function qF(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 JF(e){return`scale(${e}, ${e**2})`}var YF={entering:{opacity:1,transform:JF(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:JF(.75)},exited:{opacity:0,transform:JF(.75)}},XF={opacity:0,transform:JF(.75),visibility:`hidden`},ZF=w.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=zP(),_=w.useRef(),v=So(),y=w.useRef(null),b=QN(y,UF(i),t),x=GF(y,l),S=GF(y,(e,t)=>{WF(e);let{duration:n,delay:r,easing:i}=qF({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=GF(y,c),T=GF(y,f),E=GF(y,e=>{let{duration:t,delay:n,easing:r}=qF({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=JF(.75),u&&u(e)}),ee=GF(y,e=>{e.style.transition=``,d&&d(e)});return(0,P.jsx)(SP,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:E,onExited:ee,onExiting:T,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=KF(e,o,YF,XF,p,i.props.style);return w.cloneElement(i,{style:r,ref:b,...n})}})});ZF&&(ZF.muiSupportAuto=!0);function QF(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function $F(e){let t=BN(e);return t.body===e?HN(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function eI(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function tI(e){return parseFloat(HN(e).getComputedStyle(e).paddingRight)||0}function nI(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 rI(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!nI(e);t&&n&&eI(e,i)})}function iI(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function aI(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if($F(r)){let e=QF(HN(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${tI(r)+e}px`;let t=BN(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${tI(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=BN(r).body;else{let t=r.parentElement,n=HN(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 oI(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var sI=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&&eI(e.modalRef,!1);let r=oI(t);rI(t,e.mount,e.modalRef,r,!0);let i=iI(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=iI(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=aI(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=iI(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&&eI(e.modalRef,t),rI(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&&eI(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function cI(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 lI=cI;function uI(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var dI=uI,fI=`data-mui-focusable`;function pI(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${fI}]`):null}var mI=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function hI(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 gI(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 _I(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||gI(e))}function vI(e){let t=[],n=[];return Array.from(e.querySelectorAll(mI)).forEach((e,r)=>{let i=hI(e);i===-1||!_I(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 yI(){return!0}function bI(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=vI,isEnabled:o=yI,open:s}=e,c=w.useRef(!1),l=w.useRef(null),u=w.useRef(null),d=w.useRef(null),f=w.useRef(null),p=w.useRef(!1),m=w.useRef(null),h=ZN(UF(t),m),g=w.useRef(null);w.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),w.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=dI(BN(m.current)),t=pI(m.current)??m.current;return lI(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]),w.useEffect(()=>{if(!s||!m.current)return;let e=BN(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&dI(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=dI(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(lI(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=dI(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,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),w.cloneElement(t,{ref:h,onFocus:_}),(0,P.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function xI(e){return typeof e==`function`?e():e}var SI=w.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=w.useState(null),s=ZN(w.isValidElement(n)?UF(n):null,t);if(ni(()=>{i||o(xI(r)||document.body)},[r,i]),ni(()=>{if(a&&!i)return WN(t,a),()=>{WN(t,null)}},[t,a,i]),i){if(w.isValidElement(n)){let e={ref:s};return w.cloneElement(n,e)}return n}return a&&rw.createPortal(n,a)});function CI(e,t,n){return e===void 0||HF(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function wI(e,t,n){return typeof e==`function`?e(t,n):e}function TI(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 EI(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 DI(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=v(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=TI({...i,...r}),s=EI(r),c=EI(i),l=t(o),u=v(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 OI(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=wI(d[e],i),{props:{component:h,...g},internalRef:_}=DI({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=ZN(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,CI(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 kI={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},AI={opacity:0,visibility:`hidden`},jI=w.forwardRef(function(e,t){let n=So(),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=w.useRef(null),y=QN(v,UF(o),t),b=GF(v,d),x=GF(v,(e,t)=>{WF(e);let r=qF({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=GF(v,u),C=GF(v,m),T=GF(v,e=>{let t=qF({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),E=GF(v,e=>{e.style.transition=``,p&&p(e)});return(0,P.jsx)(SP,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:T,onExited:E,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=KF(e,c,kI,AI,h,o.props.style);return w.cloneElement(o,{style:r,ref:y,...n})}})});function MI(e){return Vr(`MuiBackdrop`,e)}Hr(`MuiBackdrop`,[`root`,`invisible`]);var NI=e=>{let{classes:t,invisible:n}=e;return y({root:[`root`,n&&`invisible`]},MI,t)},PI=I(`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`}}]}),FI=w.forwardRef(function(e,t){let n=ko({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=NI(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[y,b]=OI(`root`,{elementType:PI,externalForwardedProps:_,className:v(g.root,i),ownerState:h}),[x,S]=OI(`transition`,{elementType:jI,externalForwardedProps:_,ownerState:h});return(0,P.jsx)(x,{in:s,timeout:p,...m,...S,children:(0,P.jsx)(y,{"aria-hidden":!0,...b,ref:t,children:r})})});function II(e){return typeof e==`function`?e():e}function LI(e){return e?e.props.hasOwnProperty(`in`):!1}var RI=()=>{},zI=new sI;function BI(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=w.useRef({}),f=w.useRef(null),p=w.useRef(null),m=ZN(p,u),[h,g]=w.useState(!l),_=LI(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>BN(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{zI.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=YN(()=>{let e=II(t)||y().body;zI.add(b(),e),p.current&&x()}),C=()=>zI.isTopModal(b()),T=YN(e=>{f.current=e,e&&(l&&C()?x():p.current&&eI(p.current,v))}),E=w.useCallback(()=>{zI.remove(b(),v)},[v]);w.useEffect(()=>()=>{E()},[E]),w.useEffect(()=>{l?S():(!_||!i)&&E()},[l,E,_,i,S]);let ee=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=TI(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:ee(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:jN(()=>{g(!1),a&&a()},s?.props.onEnter??RI),onExited:jN(()=>{g(!0),o&&o(),i&&E()},s?.props.onExited??RI)}),rootRef:m,portalRef:T,isTopModal:C,exited:h,hasTransition:_}}function VI(e){return Vr(`MuiModal`,e)}Hr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var HI=e=>{let{open:t,exited:n,classes:r}=e;return y({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},VI,r)},UI=I(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Oo(({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`}}]}))),WI=I(FI,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),GI=w.forwardRef(function(e,t){let n=ko({name:`MuiModal`,props:e}),{BackdropComponent:r=WI,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:y=!1,hideBackdrop:b=!1,keepMounted:x=!1,onClose:S,onTransitionEnter:C,onTransitionExited:T,open:E,slotProps:ee={},slots:D={},theme:O,...te}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:y,hideBackdrop:b,keepMounted:x},{getRootProps:A,getBackdropProps:j,getTransitionProps:M,portalRef:ne,isTopModal:re,exited:ie,hasTransition:ae}=BI({...k,rootRef:t}),oe={...k,exited:ie},se=HI(oe),ce={};if(c.props.tabIndex===void 0&&(ce.tabIndex=`-1`),ae){let{onEnter:e,onExited:t}=M();ce.onEnter=e,ce.onExited=t}let le={slots:{root:d.Root,backdrop:d.Backdrop,...D},slotProps:{...f,...ee}},[ue,de]=OI(`root`,{ref:t,elementType:UI,externalForwardedProps:{...le,...te,component:u},getSlotProps:A,ownerState:oe,className:v(o,se?.root,!oe.open&&oe.exited&&se?.hidden)}),[fe,pe]=OI(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:le,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>j({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:v(i?.className,se?.backdrop),ownerState:oe});return!x&&!E&&(!ae||ie)?null:(0,P.jsx)(SI,{ref:ne,container:l,disablePortal:g,children:(0,P.jsxs)(ue,{...de,children:[!b&&r?(0,P.jsx)(fe,{...pe}):null,(0,P.jsx)(bI,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:re,open:E,children:w.cloneElement(c,ce)})]})})});function KI(e){return Vr(`MuiPaper`,e)}Hr(`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 qI=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return y({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},KI,i)},JI=I(`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}`]]}})(Oo(({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)`}}]}))),YI=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiPaper`}),r=So(),{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},d=qI(u);return(0,P.jsx)(JI,{as:a,ownerState:u,className:v(d.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(${pi(`#fff`,to(o))}, ${pi(`#fff`,to(o))})`}},...l.style}})});function XI(e){return Vr(`MuiPopover`,e)}Hr(`MuiPopover`,[`root`,`paper`]);function ZI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function QI(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function $I(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function eL(e){return typeof e==`function`?e():e}var tL=e=>{let{classes:t}=e;return y({root:[`root`],paper:[`paper`]},XI,t)},nL=I(GI,{name:`MuiPopover`,slot:`Root`})({}),rL=I(YI,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),iL=w.forwardRef(function(e,t){let n=ko({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:y,transitionDuration:b=`auto`,TransitionProps:x={},disableScrollLock:S=!1,...C}=n,T=w.useRef(),E={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:y,transitionDuration:b,TransitionProps:x},ee=tL(E),D=w.useCallback(()=>{if(s===`anchorPosition`)return o;let e=eL(i),t=(e&&e.nodeType===1?e:VN(T.current).body).getBoundingClientRect();return{top:t.top+ZI(t,a.vertical),left:t.left+QI(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),O=w.useCallback(e=>({vertical:ZI(e,_.vertical),horizontal:QI(e,_.horizontal)}),[_.horizontal,_.vertical]),te=w.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if(s===`none`)return{top:null,left:null,transformOrigin:$I(n)};let r=D(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=UN(eL(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:$I(n)}},[i,s,D,O,f]),[k,A]=w.useState(p),j=w.useCallback(()=>{let e=T.current;if(!e)return;let t=te(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[te]);w.useEffect(()=>(S&&window.addEventListener(`scroll`,j),()=>window.removeEventListener(`scroll`,j)),[i,S,j]);let M=()=>{j()},ne=()=>{A(!1)};w.useEffect(()=>{p&&j()}),w.useImperativeHandle(r,()=>p?{updatePosition:()=>{j()}}:null,[p,j]),w.useEffect(()=>{if(!p)return;let e=RN(()=>{j()}),t=UN(eL(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,j]);let re=b,ie={slots:{transition:y,...h},slotProps:{transition:x,paper:m,...g}},[ae,oe]=OI(`transition`,{elementType:ZF,externalForwardedProps:ie,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),M()},onExited:t=>{e.onExited?.(t),ne()}}),additionalProps:{appear:!0,in:p}});b===`auto`&&!ae.muiSupportAuto&&(re=void 0);let se=u||(i?VN(eL(i)).body:void 0),[ce,{slots:le,slotProps:ue,...de}]=OI(`root`,{ref:t,elementType:nL,externalForwardedProps:{...ie,...C},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:eP(typeof g.backdrop==`function`?g.backdrop(E):g.backdrop,{invisible:!0})},container:se,open:p},ownerState:E,className:v(ee.root,l)}),[fe,pe]=OI(`paper`,{ref:T,className:ee.paper,elementType:rL,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:E});return(0,P.jsx)(ce,{...de,...!HF(ce)&&{slots:le,slotProps:ue,disableScrollLock:S},children:(0,P.jsx)(ae,{...oe,timeout:re,children:(0,P.jsx)(fe,{...pe,children:c})})})});function aL(e,t){this.v=e,this.k=t}function oL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sL(e){if(Array.isArray(e))return e}function cL(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function lL(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
292
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uL(e,t){return sL(e)||cL(e,t)||dL(e,t)||lL()}function dL(e,t){if(e){if(typeof e==`string`)return oL(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oL(e,t):void 0}}function fL(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof aL;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}fL.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},fL.prototype.next=function(e){return this._invoke(`next`,e)},fL.prototype.throw=function(e){return this._invoke(`throw`,e)},fL.prototype.return=function(e){return this._invoke(`return`,e)};var pL=Object.entries,mL=Object.setPrototypeOf,hL=Object.isFrozen,gL=Object.getPrototypeOf,_L=Object.getOwnPropertyDescriptor,vL=Object.freeze,yL=Object.seal,bL=Object.create,xL=typeof Reflect<`u`&&Reflect,SL=xL.apply,CL=xL.construct;vL||=function(e){return e},yL||=function(e){return e},SL||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},CL||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var wL=WL(Array.prototype.forEach);Array.prototype.indexOf;var TL=WL(Array.prototype.lastIndexOf),EL=WL(Array.prototype.pop),DL=WL(Array.prototype.push);Array.prototype.slice;var OL=WL(Array.prototype.splice),kL=Array.isArray,AL=WL(String.prototype.toLowerCase),jL=WL(String.prototype.toString),ML=WL(String.prototype.match),NL=WL(String.prototype.replace),PL=WL(String.prototype.indexOf),FL=WL(String.prototype.trim),IL=WL(Number.prototype.toString),LL=WL(Boolean.prototype.toString),RL=typeof BigInt>`u`?null:WL(BigInt.prototype.toString),zL=typeof Symbol>`u`?null:WL(Symbol.prototype.toString),BL=WL(Object.prototype.hasOwnProperty),VL=WL(Object.prototype.toString),HL=WL(RegExp.prototype.test),UL=GL(TypeError);function WL(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return SL(e,t,r)}}function GL(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return CL(e,n)}}function KL(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:AL;if(mL&&mL(e,null),!kL(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(hL(t)||(t[r]=e),i=e)}e[i]=!0}return e}function qL(e){for(let t=0;t<e.length;t++)BL(e,t)||(e[t]=null);return e}function JL(e){let t=bL(null);for(let r of pL(e)){var n=uL(r,2);let i=n[0],a=n[1];BL(e,i)&&(kL(a)?t[i]=qL(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=JL(a):t[i]=a)}return t}function YL(e){switch(typeof e){case`string`:return e;case`number`:return IL(e);case`boolean`:return LL(e);case`bigint`:return RL?RL(e):`0`;case`symbol`:return zL?zL(e):`Symbol()`;case`undefined`:return VL(e);case`function`:case`object`:{if(e===null)return VL(e);let t=e,n=XL(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:VL(e)}return VL(e)}default:return VL(e)}}function XL(e,t){for(;e!==null;){let n=_L(e,t);if(n){if(n.get)return WL(n.get);if(typeof n.value==`function`)return WL(n.value)}e=gL(e)}function n(){return null}return n}function ZL(e){try{return HL(e,``),!0}catch{return!1}}var QL=vL(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),$L=vL(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),eR=vL([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),tR=vL([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),nR=vL(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),rR=vL([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),iR=vL([`#text`]),aR=vL(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),oR=vL(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),sR=vL(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),cR=vL([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),lR=yL(/{{[\w\W]*|^[\w\W]*}}/g),uR=yL(/<%[\w\W]*|^[\w\W]*%>/g),dR=yL(/\${[\w\W]*/g),fR=yL(/^data-[\-\w.\u00B7-\uFFFF]+$/),pR=yL(/^aria-[\-\w]+$/),mR=yL(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hR=yL(/^(?:\w+script|data):/i),gR=yL(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_R=yL(/^html$/i),vR=yL(/^[a-z][.\w]*(-[.\w]+)+$/i),yR=yL(/<[/\w!]/g),bR=yL(/<[/\w]/g),xR=yL(/<\/no(script|embed|frames)/i),SR=yL(/\/>/i),CR={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},wR=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],TR=vL(KL({},wR)),ER=function(){let e={};return wL(wR,t=>{e[t]=yL(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),vL(e)}(),DR=function(){return typeof window>`u`?null:window},OR=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},kR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},AR=function(e,t,n,r){return BL(e,t)&&kL(e[t])?KL(r.base?JL(r.base):{},e[t],r.transform):n},jR=function(e,t,n){let r=BL(e,t)?e[t]:void 0;return r&&typeof r==`object`?JL(r):n()};function MR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DR(),t=e=>MR(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==CR.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=XL(d,`cloneNode`),p=XL(d,`remove`),m=XL(d,`removeAttributeNode`),h=XL(d,`nextSibling`),g=XL(d,`childNodes`),_=XL(d,`parentNode`),v=XL(d,`shadowRoot`),y=XL(d,`attributes`),b=o&&o.prototype?XL(o.prototype,`nodeType`):null,x=o&&o.prototype?XL(o.prototype,`nodeName`):null,S=o&&o.prototype?XL(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,ee,D=!1,O=0,te=function(){if(O>0)throw UL(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},k=function(e){te(),O++;try{return T.createHTML(e)}finally{O--}},A=function(e){te(),O++;try{return T.createScriptURL(e)}finally{O--}},j=function(){return D||=(ee=OR(u,i),!0),ee},M=n,ne=M.implementation,re=M.createNodeIterator,ie=M.createDocumentFragment,ae=M.getElementsByTagName,oe=r.importNode,se=kR();t.isSupported=typeof pL==`function`&&typeof _==`function`&&ne&&ne.createHTMLDocument!==void 0;let ce=lR,le=uR,ue=dR,de=fR,fe=pR,pe=hR,me=gR,he=vR,ge=mR,_e=null,ve=KL({},[...QL,...$L,...eR,...nR,...iR]),N=null,ye=KL({},[...aR,...oR,...sR,...cR]),be=Object.seal(bL(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Se=null,Ce=Object.seal(bL(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),we=!0,Te=!0,Ee=!1,De=!0,Oe=!1,ke=!0,Ae=!1,je=!1,Me=null,Ne=null,Pe=!1,Fe=!1,Ie=!1,Le=!1,Re=!0,ze=!1,Be=`user-content-`,Ve=!0,He=!1,Ue={},We=null,Ge=KL({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ke=null,qe=KL({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Je=null,Ye=KL({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Xe=`http://www.w3.org/1998/Math/MathML`,Ze=`http://www.w3.org/2000/svg`,Qe=`http://www.w3.org/1999/xhtml`,$e=Qe,et=!1,tt=null,nt=KL({},[Xe,Ze,Qe],jL),rt=vL([`mi`,`mo`,`mn`,`ms`,`mtext`]),it=KL({},rt),at=vL([`annotation-xml`]),ot=KL({},at),st=KL({},[`title`,`style`,`font`,`a`,`script`]),ct=null,lt=[`application/xhtml+xml`,`text/html`],ut=null,dt=null,ft=n.createElement(`form`),pt=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(dt&&dt===e)return;(!e||typeof e!=`object`)&&(e={}),e=JL(e),ct=lt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ut=ct===`application/xhtml+xml`?jL:AL,_e=AR(e,`ALLOWED_TAGS`,ve,{transform:ut}),N=AR(e,`ALLOWED_ATTR`,ye,{transform:ut}),tt=AR(e,`ALLOWED_NAMESPACES`,nt,{transform:jL}),Je=AR(e,`ADD_URI_SAFE_ATTR`,Ye,{transform:ut,base:Ye}),Ke=AR(e,`ADD_DATA_URI_TAGS`,qe,{transform:ut,base:qe}),We=AR(e,`FORBID_CONTENTS`,Ge,{transform:ut}),xe=AR(e,`FORBID_TAGS`,JL({}),{transform:ut}),Se=AR(e,`FORBID_ATTR`,JL({}),{transform:ut}),Ue=BL(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?JL(e.USE_PROFILES):e.USE_PROFILES:!1,we=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Oe=e.SAFE_FOR_TEMPLATES||!1,ke=e.SAFE_FOR_XML!==!1,Ae=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Le=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Re=e.SANITIZE_DOM!==!1,ze=e.SANITIZE_NAMED_PROPS||!1,Ve=e.KEEP_CONTENT!==!1,He=e.IN_PLACE||!1,ge=ZL(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:mR,$e=typeof e.NAMESPACE==`string`?e.NAMESPACE:Qe,it=jR(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>KL({},rt)),ot=jR(e,`HTML_INTEGRATION_POINTS`,()=>KL({},at));let t=jR(e,`CUSTOM_ELEMENT_HANDLING`,()=>bL(null));if(be=bL(null),BL(t,`tagNameCheck`)&&pt(t.tagNameCheck)&&(be.tagNameCheck=t.tagNameCheck),BL(t,`attributeNameCheck`)&&pt(t.attributeNameCheck)&&(be.attributeNameCheck=t.attributeNameCheck),BL(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(be.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),yL(be),Oe&&(Te=!1),Ie&&(Fe=!0),Ue&&(_e=KL({},iR),N=bL(null),Ue.html===!0&&(KL(_e,QL),KL(N,aR)),Ue.svg===!0&&(KL(_e,$L),KL(N,oR),KL(N,cR)),Ue.svgFilters===!0&&(KL(_e,eR),KL(N,oR),KL(N,cR)),Ue.mathMl===!0&&(KL(_e,nR),KL(N,sR),KL(N,cR))),Ce.tagCheck=null,Ce.attributeCheck=null,BL(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Ce.tagCheck=e.ADD_TAGS:kL(e.ADD_TAGS)&&(_e===ve&&(_e=JL(_e)),KL(_e,e.ADD_TAGS,ut))),BL(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Ce.attributeCheck=e.ADD_ATTR:kL(e.ADD_ATTR)&&(N===ye&&(N=JL(N)),KL(N,e.ADD_ATTR,ut))),BL(e,`ADD_FORBID_CONTENTS`)&&kL(e.ADD_FORBID_CONTENTS)&&(We===Ge&&(We=JL(We)),KL(We,e.ADD_FORBID_CONTENTS,ut)),Ve&&(_e[`#text`]=!0),Ae&&KL(_e,[`html`,`head`,`body`]),_e.table&&(KL(_e,[`tbody`]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw UL(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw UL(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=k(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=j()),T&&typeof E==`string`&&(E=k(``)));vL&&vL(e),dt=e},ht=KL({},[...$L,...eR,...tR]),gt=KL({},[...nR,...rR]),_t=function(e,t,n){return t.namespaceURI===Qe?e===`svg`:t.namespaceURI===Xe?e===`svg`&&(n===`annotation-xml`||it[n]):!!ht[e]},vt=function(e,t,n){return t.namespaceURI===Qe?e===`math`:t.namespaceURI===Ze?e===`math`&&ot[n]:!!gt[e]},yt=function(e,t,n){return t.namespaceURI===Ze&&!ot[n]||t.namespaceURI===Xe&&!it[n]?!1:!gt[e]&&(st[e]||!ht[e])},bt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:$e,tagName:`template`});let n=AL(e.tagName),r=AL(t.tagName);return tt[e.namespaceURI]?e.namespaceURI===Ze?_t(n,t,r):e.namespaceURI===Xe?vt(n,t,r):e.namespaceURI===Qe?yt(n,t,r):!!(ct===`application/xhtml+xml`&&tt[e.namespaceURI]):!1},xt=function(e){DL(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw UL(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},St=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Ct=function(e){Et(e);let t=g(e);if(t){let e=[];wL(t,t=>{DL(e,t)}),wL(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&St(e,r,i)}},wt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}DL(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(Fe||Ie)try{xt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Tt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||N[ut(i)]||St(e,r,i)}},Et=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===CR.element&&Tt(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Dt=function(e,t){return ke?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Ot=function(e){if(!ke)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===CR.processingInstruction||n===CR.comment&&HL(bR,e.data)){try{p(e)}catch{}continue}if(n===CR.element){let t=e,n=ut(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Dt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},kt=function(e){let t=null,r=null;if(Pe)e=`<remove></remove>`+e;else{let t=ML(e,/^[\r\n\t ]+/);r=t&&t[0]}ct===`application/xhtml+xml`&&$e===Qe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?k(e):e;if($e===Qe)try{t=new l().parseFromString(i,ct)}catch{}if(!t||!t.documentElement){t=ne.createDocument($e,`template`,null);try{t.documentElement.innerHTML=et?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),$e===Qe?ae.call(t,Ae?`html`:`body`)[0]:Ae?t.documentElement:a},At=function(e){let t=S?S(e):e.ownerDocument;return re.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},jt=function(e){return e=NL(e,ce,` `),e=NL(e,le,` `),e=NL(e,ue,` `),e},Mt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=re.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=jt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&wL(i,e=>{Pt(e.content)&&Mt(e.content)})},Nt=function(e){let t=x?x(e):null;return typeof t!=`string`||ut(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Pt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===CR.documentFragment}catch{return!1}},Ft=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function It(e,n,r){e.length!==0&&wL(e,e=>{e.call(t,n,r,dt)})}let Lt=function(e,t){return!!(ke&&e.hasChildNodes()&&!Ft(e.firstElementChild)&&HL(yR,e.textContent)&&HL(yR,e.innerHTML)||ke&&e.namespaceURI===Qe&&TR[t]&&(Ft(e.firstElementChild)||typeof e.textContent==`string`&&HL(ER[t],e.textContent))||e.nodeType===CR.processingInstruction||ke&&e.nodeType===CR.comment&&HL(bR,e.data))},Rt=function(e,t){if(e instanceof RegExp)return HL(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},zt=function(e,t,n){if(!xe[t]&&Gt(t)&&Rt(be.tagNameCheck,t))return!1;if(Ve&&!We[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return xt(e),!0},Bt=function(e,t,n,r){return e.length===0?t:t===n||t===r?JL(t):t},Vt=function(e,t){return e===t||_(e)!==null?!1:(He&&Et(e),!0)},Ht=function(e,n){if(It(se.beforeSanitizeElements,e,null),Vt(e,n))return!0;if(Nt(e))return xt(e),!0;let r=ut(w(e));if(_e=Bt(se.uponSanitizeElement,_e,ve,Me),It(se.uponSanitizeElement,e,{tagName:r,allowedTags:_e}),Vt(e,n))return!0;if(Lt(e,r))return xt(e),!0;if(xe[r]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(r))&&!_e[r]){let t=zt(e,r,n);return t===!1&&(It(se.afterSanitizeElements,e,null),Vt(e,n))?!0:t}if(C(e)===CR.element&&!bt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&HL(xR,e.innerHTML))return xt(e),!0;if(Oe&&e.nodeType===CR.text){let n=jt(e.textContent);e.textContent!==n&&(DL(t.removed,{element:e.cloneNode()}),e.textContent=n)}return It(se.afterSanitizeElements,e,null),Vt(e,n)},Ut=function(e,t,r){if(Se[t]||Dt(t,e)||Re&&(t===`id`||t===`name`)&&(r in n||r in ft))return!1;let i=N[t]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(t,e);return Te&&HL(de,t)||we&&HL(fe,t)?!0:i?Je[t]||HL(ge,NL(r,me,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&PL(r,`data:`)===0&&Ke[e]||Ee&&!HL(pe,NL(r,me,``))?!0:!r:Gt(e)&&Rt(be.tagNameCheck,e)&&Rt(be.attributeNameCheck,t,e)||t===`is`&&be.allowCustomizedBuiltInElements&&Rt(be.tagNameCheck,r)},Wt=KL({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Gt=function(e){return!Wt[AL(e)]&&HL(he,e)},Kt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return k(r);case`TrustedScriptURL`:return A(r)}return r},qt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),Nt(e)?(xt(e),!1):!0}catch{return wt(t,e),!1}},Jt=function(e,n){if(It(se.beforeSanitizeAttributes,e,null),Vt(e,n))return;let r=e.attributes;if(!r||Nt(e))return;N=Bt(se.uponSanitizeAttribute,N,ye,Ne);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},a=r.length,o=ut(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=ut(s),d=l,f=s===`value`?d:FL(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,It(se.uponSanitizeAttribute,e,i),f=i.attrValue,ze&&(u===`id`||u===`name`)&&PL(f,Be)!==0&&(wt(s,e,n),f=Be+f,p=!0),ke&&HL(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){wt(s,e,n);continue}if(u===`attributename`&&ML(f,`href`)){wt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){wt(s,e,n);continue}if(!De&&HL(SR,f)){wt(s,e,n);continue}if(Oe&&(f=jt(f)),!Ut(o,u,f)){wt(s,e,n);continue}f=Kt(o,u,c,f),f!==d&&qt(e,s,c,f)&&p&&EL(t.removed)}}It(se.afterSanitizeAttributes,e,null),Vt(e,n)},Yt=function(e){let t=null,n=At(e);for(It(se.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(It(se.uponSanitizeShadowNode,t,null),Ht(t,e),Jt(t,e),Pt(t.content)&&Yt(t.content),C(t)===CR.element){let e=v(t);Pt(e)&&(Xt(e),Yt(e))}It(se.afterSanitizeShadowDOM,e,null)},Xt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Yt(e.shadow);continue}let n=e.node,r=C(n)===CR.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&ut(e)===`template`){let e=n.content;Pt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Pt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(et=!e,et&&(e=`<!-->`),typeof e!=`string`&&!Ft(e)&&(e=YL(e),typeof e!=`string`))throw UL(`dirty is not a string, aborting`);if(!t.isSupported)return e;je?(_e=Me,N=Ne):mt(n),(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&(_e=JL(_e)),se.uponSanitizeAttribute.length>0&&(N=JL(N)),t.removed=[];let c=He&&typeof e!=`string`&&Ft(e);if(c){Ot(e);let t=w(e);if(typeof t==`string`){let n=ut(t);if(!_e[n]||xe[n])throw Ct(e),UL(`root node is forbidden and cannot be sanitized in-place`)}if(Nt(e))throw Ct(e),UL(`root node is clobbered and cannot be sanitized in-place`);try{Xt(e)}catch(t){throw Ct(e),t}}else if(Ft(e))i=kt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===CR.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Xt(i);else{if(!Fe&&!Oe&&!Ae&&e.indexOf(`<`)===-1)return T&&Le?k(e):e;if(i=kt(e),!i)return Fe?null:Le?E:``}i&&Pe&&xt(i.firstChild);let l=c?e:i;try{let e=At(l);for(;o=e.nextNode();)Ht(o,l),Jt(o,l),Pt(o.content)&&Yt(o.content)}catch(n){throw c&&(Ct(e),wL(t.removed,e=>{e.element&&Et(e.element)})),n}if(c){let n=!1;if(wL(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Et(t.element))}),n)throw UL(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Oe&&Mt(e),e}if(Fe){if(Oe&&Mt(i),Ie)for(s=ie.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(N.shadowroot||N.shadowrootmode)&&(s=oe.call(r,s,!0)),s}let u=Ae?i.outerHTML:i.innerHTML;return Ae&&_e[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&HL(_R,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
293
|
+
`+u),Oe&&(u=jt(u)),T&&Le?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mt(e),je=!0,Me=_e,Ne=N},t.clearConfig=function(){dt=null,je=!1,Me=null,Ne=null,T=ee,E=``},t.isValidAttribute=function(e,t,n){dt||mt({});let r=ut(e),i=ut(t);return Ut(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&BL(se,e)&&DL(se[e],t)},t.removeHook=function(e,t){if(BL(se,e)){if(t!==void 0){let n=TL(se[e],t);return n===-1?void 0:OL(se[e],n,1)[0]}return EL(se[e])}},t.removeHooks=function(e){BL(se,e)&&(se[e]=[])},t.removeAllHooks=function(){se=kR()},t}var NR=MR(),PR=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],FR=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],IR=new Set([`iframe`,`object`,`semantics`,`annotation`,`none`]),LR=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,RR={ADD_TAGS:e=>IR.has(e)||LR.test(e),ADD_ATTR:[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`],FORBID_TAGS:PR,FORBID_ATTR:FR,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},zR=1e6,BR=new Map,VR=0;function HR(e){if(e==null||e===``||!NR.isSupported)return``;let t=typeof e==`string`?e:String(e),n=BR.get(t);if(n!==void 0)return n;let r=String(NR.sanitize(t,RR)),i=t.length+r.length;if(i>zR)return r;for(let[e,t]of BR){if(VR+i<=zR)break;BR.delete(e),VR-=e.length+t.length}return BR.set(t,r),VR+=i,r}var UR={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`},WR={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`},GR=s({background:()=>gz,backgroundDark:()=>_z,black:()=>Az,blueGrey100:()=>Bz,blueGrey300:()=>Vz,blueGrey600:()=>Hz,blueGrey900:()=>Uz,border:()=>Cz,borderDark:()=>Tz,borderGray:()=>Ez,borderLight:()=>wz,buttonBorder:()=>eB,buttonFocusOutline:()=>Lz,buttonHoverBg:()=>tB,correct:()=>QR,correctSecondary:()=>$R,correctTertiary:()=>ez,correctWithIcon:()=>tz,defaults:()=>G,disabled:()=>YR,disabledSecondary:()=>XR,disabledText:()=>ZR,dropdownBackground:()=>yz,editorToolbar:()=>$z,fadedPrimary:()=>dz,focusChecked:()=>Nz,focusCheckedBorder:()=>Pz,focusOutline:()=>Rz,focusUnchecked:()=>Fz,focusUncheckedBorder:()=>Iz,incorrect:()=>nz,incorrectSecondary:()=>iz,incorrectWithIcon:()=>rz,keyBoardFocusIndicator:()=>zz,keypadButton:()=>Kz,keypadButtonHover:()=>Yz,keypadButtonOperator:()=>qz,keypadButtonOperatorHover:()=>Xz,keypadEmptyPlaceholder:()=>Jz,keypadInk:()=>Qz,missing:()=>az,missingWithIcon:()=>oz,primary:()=>sz,primaryDark:()=>lz,primaryLight:()=>cz,primaryText:()=>uz,secondary:()=>fz,secondaryBackground:()=>vz,secondaryDark:()=>mz,secondaryLight:()=>pz,secondaryText:()=>hz,surface:()=>bz,tableGrid:()=>Dz,tableGridLight:()=>Oz,tableStripe:()=>kz,tertiary:()=>xz,tertiaryLight:()=>Sz,text:()=>JR,transparent:()=>Mz,v:()=>KR,visualElementsColors:()=>nB,white:()=>jz}),G={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:`#208537`,CORRECT_SECONDARY:_a[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:`#a65f00`,INCORRECT_SECONDARY:pa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:pa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:WR[500],PRIMARY_LIGHT:WR[200],PRIMARY_DARK:WR[800],SECONDARY:UR.A400,SECONDARY_LIGHT:UR[200],SECONDARY_DARK:UR[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)`,SURFACE:`#EBECF1`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#66686A`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#81848F`,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)`,EDITOR_TOOLBAR:`#efefef`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(G);var KR=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},qR=KR(`pie`),JR=()=>qR(`text`,G.TEXT),YR=()=>qR(`disabled`,G.DISABLED),XR=()=>qR(`disabled-secondary`,G.DISABLED_SECONDARY),ZR=()=>qR(`disabled-text`,`text`,G.DISABLED_TEXT),QR=()=>qR(`correct`,G.CORRECT),$R=()=>qR(`correct-secondary`,G.CORRECT_SECONDARY),ez=()=>qR(`correct-tertiary`,G.CORRECT_TERTIARY),tz=()=>qR(`correct-icon`,G.CORRECT_WITH_ICON),nz=()=>qR(`incorrect`,G.INCORRECT),rz=()=>qR(`incorrect-icon`,G.INCORRECT_WITH_ICON),iz=()=>qR(`incorrect-secondary`,G.INCORRECT_SECONDARY),az=()=>qR(`missing`,G.MISSING),oz=()=>qR(`missing-icon`,G.MISSING_WITH_ICON),sz=()=>qR(`primary`,G.PRIMARY),cz=()=>qR(`primary-light`,G.PRIMARY_LIGHT),lz=()=>qR(`primary-dark`,G.PRIMARY_DARK),uz=()=>qR(`primary-text`,`text`,G.TEXT),dz=()=>qR(`faded-primary`,G.FADED_PRIMARY),fz=()=>qR(`secondary`,G.SECONDARY),pz=()=>qR(`secondary-light`,G.SECONDARY_LIGHT),mz=()=>qR(`secondary-dark`,G.SECONDARY_DARK),hz=()=>qR(`secondary-text`,`text`,G.TEXT),gz=()=>qR(`background`,G.BACKGROUND),_z=()=>qR(`background-dark`,G.BACKGROUND_DARK),vz=()=>qR(`secondary-background`,G.SECONDARY_BACKGROUND),yz=()=>qR(`dropdown-background`,G.DROPDOWN_BACKGROUND),bz=()=>qR(`surface`,G.SURFACE),xz=()=>qR(`tertiary`,G.TERTIARY),Sz=()=>qR(`tertiary-light`,G.TERTIARY_LIGHT),Cz=()=>qR(`border`,G.BORDER),wz=()=>qR(`border-light`,G.BORDER_LIGHT),Tz=()=>qR(`border-dark`,G.BORDER_DARK),Ez=()=>qR(`border-gray`,G.BORDER_GRAY),Dz=()=>qR(`table-grid`,`text`,G.TABLE_GRID),Oz=()=>qR(`table-grid-light`,`border-light`,G.TABLE_GRID_LIGHT),kz=()=>qR(`table-stripe`,`background-dark`,G.TABLE_STRIPE),Az=()=>qR(`black`,G.BLACK),jz=()=>qR(`white`,G.WHITE),Mz=()=>G.TRANSPARENT,Nz=()=>qR(`focus-checked`,G.FOCUS_CHECKED),Pz=()=>qR(`focus-checked-border`,G.FOCUS_CHECKED_BORDER),Fz=()=>qR(`focus-unchecked`,G.FOCUS_UNCHECKED),Iz=()=>qR(`focus-unchecked-border`,G.FOCUS_UNCHECKED_BORDER),Lz=()=>qR(`button-focus-outline`,G.BUTTON_FOCUS_OUTLINE),Rz=()=>qR(`focus-outline`,`button-focus-outline`,`focus-checked-border`,G.FOCUS_CHECKED_BORDER),zz=Rz,Bz=()=>qR(`blue-grey-100`,G.BLUE_GREY100),Vz=()=>qR(`blue-grey-300`,G.BLUE_GREY300),Hz=()=>qR(`blue-grey-600`,G.BLUE_GREY600),Uz=()=>qR(`blue-grey-900`,G.BLUE_GREY900),Wz=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return t?t.slice(1).map(e=>parseInt(e,16)):e.match(/\d+/g).slice(0,3).map(Number)},Gz=(e,t)=>`color-mix(in srgb, rgb(${Wz(e).map(e=>(e-255*(1-t))/t).join(` `)}) ${t*100}%, ${qR(`background`,G.WHITE)})`,Kz=()=>qR(`keypad-button`,Gz(G.KEYPAD_BUTTON,.5)),qz=()=>qR(`keypad-button-operator`,Gz(G.KEYPAD_BUTTON_OPERATOR,.5)),Jz=()=>qR(`keypad-empty-placeholder`,G.KEYPAD_EMPTY_PLACEHOLDER),Yz=()=>qR(`keypad-button-hover`,Gz(G.KEYPAD_BUTTON_HOVER,.25)),Xz=()=>qR(`keypad-button-operator-hover`,Gz(G.KEYPAD_BUTTON_OPERATOR_HOVER,.25)),Zz=`clamp(0.6, (r + g + b) / 450, 1)`,Qz=()=>`rgb(from ${JR()} calc(r * ${Zz}) calc(g * ${Zz}) calc(b * ${Zz}))`,$z=()=>Gz(G.EDITOR_TOOLBAR,.125),eB=()=>qR(`button-border`,G.BUTTON_BORDER),tB=()=>qR(`button-hover-bg`,G.BUTTON_HOVER_BG),nB={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},rB=I(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),iB=I(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${_z()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, ${JR()})`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${$R()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${iz()})`}}),aB=I(`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`}}),oB=class extends w.Component{static propTypes={correctness:m.string,feedback:m.string};nodeRef=w.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,P.jsx)(EP,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,P.jsx)(aB,{ref:this.nodeRef,children:(0,P.jsx)(rB,{children:(0,P.jsx)(iB,{className:e,dangerouslySetInnerHTML:{__html:HR(t)}})})})},`hasFeedback`)}render(){return(0,P.jsx)(`div`,{children:(0,P.jsx)(FP,{children:this.renderFeedback()})})}},sB=s({Correct:()=>pB,Incorrect:()=>mB,NothingSubmitted:()=>gB,PartiallyCorrect:()=>hB}),cB=g(`pie-libs:render-ui:response-indicators`),lB=I(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),uB=I(iL)({cursor:`pointer`}),dB=I(`div`)({padding:`0`,borderRadius:`4px`}),fB=(e,t)=>{class n extends w.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{cB(`[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,P.jsxs)(lB,{hasFeedback:!!n,children:[(0,P.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,P.jsx)(e,{})}),n&&(0,P.jsx)(uB,{PaperComponent:dB,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,P.jsx)(oB,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:m.string},n},pB=fB(jF,`correct`),mB=fB(PF,`incorrect`),hB=fB(VF,`partially-correct`),gB=fB(RF,`nothing-submitted`);function _B(e){return Vr(`MuiCollapse`,e)}Hr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var vB=e=>{let{orientation:t,classes:n}=e;return y({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},_B,n)},yB=I(`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]}})(Oo(({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`}}]}))),bB=I(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),xB=I(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),SB=w.forwardRef(function(e,t){let n=ko({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:y={},style:b,timeout:x=Wa.standard,TransitionComponent:S=SP,...C}=n,T={...n,orientation:g,collapsedSize:o},E=vB(T),ee=So(),D=zP(),O=w.useRef(null),te=w.useRef(),k=typeof o==`number`?`${o}px`:o,A=g===`horizontal`,j=A?`width`:`height`,M=w.useRef(null),ne=QN(t,M),re=()=>O.current?O.current[A?`clientWidth`:`clientHeight`]:0,ie=GF(M,(e,t)=>{O.current&&A&&(O.current.style.position=`absolute`),e.style[j]=k,u&&u(e,t)}),ae=GF(M,(e,t)=>{let n=re();O.current&&A&&(O.current.style.position=``);let{duration:r,easing:i}=qF({style:b,timeout:x,easing:c},{mode:`enter`});if(x===`auto`){let t=ee.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,te.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[j]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),oe=GF(M,(e,t)=>{e.style[j]=`auto`,d&&d(e,t)}),se=GF(M,e=>{e.style[j]=`${re()}px`,p&&p(e)}),ce=GF(M,m),le=GF(M,e=>{let t=re(),{duration:n,easing:r}=qF({style:b,timeout:x,easing:c},{mode:`exit`});if(x===`auto`){let n=ee.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,te.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[j]=k,e.style.transitionTimingFunction=r,h&&h(e)}),ue=e=>{x===`auto`&&D.start(te.current||0,e),r&&r(M.current,e)},de={slots:_,slotProps:y,component:s},[fe,pe]=OI(`root`,{ref:ne,className:v(E.root,a),elementType:yB,externalForwardedProps:de,ownerState:T,additionalProps:{style:{[A?`minWidth`:`minHeight`]:k,...b}}}),[me,he]=OI(`wrapper`,{ref:O,className:E.wrapper,elementType:bB,externalForwardedProps:de,ownerState:T}),[ge,_e]=OI(`wrapperInner`,{className:E.wrapperInner,elementType:xB,externalForwardedProps:de,ownerState:T});return(0,P.jsx)(S,{in:l,onEnter:ie,onEntered:oe,onEntering:ae,onExit:se,onExited:ce,onExiting:le,addEndListener:ue,nodeRef:M,timeout:x===`auto`?null:x,...C,children:(e,{ownerState:t,...n})=>{let r={...T,state:e};return(0,P.jsx)(fe,{...pe,className:v(pe.className,{entered:E.entered,exited:!l&&k===`0px`&&E.hidden}[e]),ownerState:r,...n,children:(0,P.jsx)(me,{...he,ownerState:r,children:(0,P.jsx)(ge,{..._e,ownerState:r,children:i})})})}})});SB&&(SB.muiSupportAuto=!0);var CB=`4.1.3`,wB=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,TB=`@pie-lib/math-rendering@2`,EB=[`nemeth`,`euro`],DB=`mathjax@${CB}/sre`,OB=/^[^@]+@[^@]+$/;function kB(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!OB.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function AB(){let e=globalThis[TB]?.opts;return e&&typeof e==`object`?e:{}}function jB(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function MB(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=jB(r);e&&t.set(n,e)}return t.size?t:void 0}function NB(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function PB(e,t){let n=AB(),r=jB(e.assetRoot??n.assetRoot)??kB(t);return{root:r,speechPath:jB(e.speechPath??n.speechPath)??(r?`${r}/${DB}`:void 0),speechLocales:NB(e.speechLocales??n.speechLocales),urls:MB(e.assetUrls??n.assetUrls)}}function FB(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!EB.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function IB(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!EB.includes(e))}var LB=`pie-mathjax-no-asset-root`,RB={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},zB=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function BB(e){let t=globalThis;t[zB]??=[];let n=t[zB];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${RB[e]}. Set window['${TB}'].opts.assetRoot to an npm root. See ${wB}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(LB,{detail:{effect:e,message:r,docsUrl:wB}}))}var VB=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,HB=`pie-mathjax-version-conflict`,UB=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function WB(e,t){if(typeof window>`u`)return;let n=globalThis;n[UB]??={logged:!1,conditions:[]};let r=n[UB];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${VB}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(HB,{detail:{condition:e,message:i,docsUrl:VB}}))}function GB(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function KB(){return window.MathJax}function qB(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${CB}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${CB}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function JB(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(qB(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(BB(`untypeset`),Promise.resolve(!1))}var YB=globalThis,XB=`PIE-MJX-CHTML-styles`,ZB=[`MJX-CHTML-styles`,`MJX-SVG-styles`],QB=GB,$B=`http://www.w3.org/1998/Math/MathML`,eV=/^([a-z_][\w.-]*):math$/,tV=/^[a-z][a-z0-9-]*$/;function nV(e){for(let t of e.querySelectorAll(`*`)){let n=eV.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(rV(t,`${n}:`))}}function rV(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!tV.test(n))return e;let r=e.ownerDocument.createElementNS($B,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?rV(n,t):n)}return r}var iV=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),aV={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},oV={tight:`0em`,medium:`0.1em`,loose:`0.2em`},sV=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,cV=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,lV=/^(\d+(\.\d*)?|\.\d+)$/,uV=new Set([`mn`,`mo`,`mi`,`mtext`]),dV=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function fV(e,t,n=[],r={}){let i=e.createElementNS($B,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function pV(e,t){let n=fV(e.document,`mo`);return n.textContent=t,n}function mV(e){let t=fV(e.document,`mn`);return t.textContent=`0`,fV(e.document,`mphantom`,[t])}function hV(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function gV(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function _V(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function vV(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function yV(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(_V(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else uV.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:vV(r.length,n.stackAlign,i??a),position:t}}function bV(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>iV.has(e))}function xV(e,t){let n=[...e.children].filter(e=>!_V(e));return n.length<=1?n[0]??null:fV(t.document,`mrow`,n)}function SV(e,t,n){let r=hV(e,`location`)??`n`,i=bV(e.getAttribute(`crossout`)),a=[...e.children].map(e=>_V(e)?null:e.localName===`mscarry`?{content:xV(e,n),location:hV(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?bV(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:vV(a.length,n.stackAlign),position:t,scale:lV.test(o)?o:`0.6`}}function CV(e){let t=hV(e,`mslinethickness`)??`medium`,n=aV[t]??(sV.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${cV.test(r)?r:`currentColor`}`}function wV(e,t,n){let r=Math.max(0,gV(e,`length`));return{kind:`line`,length:r,anchor:vV(r,n.stackAlign),position:t,border:CV(e)}}function TV(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+gV(e,`position`);switch(e.localName){case`msgroup`:TV([...e.children],o,gV(e,`shift`),r,i);break;case`msline`:i.push(wV(e,o,r));break;case`mscarries`:i.push(SV(e,o,r));break;case`msrow`:case`mrow`:i.push(yV([...e.children],o,r));break;default:i.push(yV([e],o,r))}})}function EV(e){return-e.anchor-e.position}function DV(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function OV(e){return EV(e)+DV(e)-1}function kV(e,t,n,r){let i=e=>fV(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>fV(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function AV(e,t,n){let r=fV(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?fV(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function jV(e,t,n,r,i){let a=e&&t.crossout.length?AV(e,t.crossout,i):e;if(!t.content)return a;let o=fV(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return kV(a??mV(i),o,n,i)}function MV(e,t){return e.carries[t-EV(e)]??null}function NV(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=MV(s,t),l=n.slice(0,o).some(e=>MV(e,t));if(!c&&!l)return;let u=c??{content:mV(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=jV(i,u,d,s.scale,r)}),e.content=i}function PV(e,t){let n=e.filter(e=>DV(e)>0),r=Math.min(0,...n.map(EV)),i=Math.max(r,...n.map(OV))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+EV(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+EV(e)+r].content=t}),u.length&&n.forEach((e,n)=>{NV(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function FV(e,{rows:t},n){let r=fV(n.document,`mtable`,t.map(e=>fV(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return fV(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])dV.has(t)||r.setAttribute(t,n);let i=hV(e,`charspacing`)??`medium`,a=hV(e,`charalign`);return r.setAttribute(`columnspacing`,oV[i]??(sV.test(i)?i:oV.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function IV(e){return{document:e.ownerDocument,stackAlign:hV(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function LV(e){let t=IV(e),n=[];return TV([...e.children],0,0,t,n),FV(e,PV(n,t),t)}function RV(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function zV(e,t){let n=pV(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[fV(t.document,`mrow`,[e,fV(t.document,`mspace`,[],{width:`0.2em`})]),fV(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function BV(e){let t=IV(e),[n,r,...i]=[...e.children],a=n&&!_V(n)?n:null,o=r&&!_V(r)?r:null,s=hV(e,`longdivstyle`)??`lefttop`,c=CV(e),l=[];TV(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...yV(n,0,t).cells)};switch(s){case`left/\\right`:f(a,pV(t,`/`)),p(pV(t,`\\`),o);break;case`left)(right`:f(a,pV(t,`)`)),p(pV(t,`(`),o);break;case`:right=right`:p(pV(t,`:`),a,pV(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&TV([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...zV(a,t));break}let m=PV(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+EV(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+OV(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,RV(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,RV(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:VV(h,g,s,a,o,c,t);break;default:RV(h,g,_(1),v,`top`,c)}return FV(e,m,t)}function VV(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&fV(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function HV(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?LV(t):BV(t))}var UV=`PIE-MJX-explorer-styles`,WV=`var(--pie-text, black)`,GV=`var(--pie-background, #ffffff)`,KV=`var(--pie-border-dark, #66686A)`,qV=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,JV=`color-mix(in srgb, ${qV} 15%, transparent)`,YV=`
|
|
292
294
|
:root mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect) {
|
|
293
|
-
color: ${
|
|
294
|
-
fill: ${
|
|
295
|
+
color: ${WV} !important;
|
|
296
|
+
fill: ${WV} !important;
|
|
295
297
|
}
|
|
296
298
|
:root mjx-container:not([data-mjx-clone-container]) [data-sre-highlight-1]:not([data-sre-enclosed], rect) {
|
|
297
|
-
background-color: ${
|
|
299
|
+
background-color: ${JV} !important;
|
|
298
300
|
}
|
|
299
301
|
:root mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed]) {
|
|
300
|
-
fill: ${
|
|
302
|
+
fill: ${JV} !important;
|
|
301
303
|
}
|
|
302
304
|
:root mjx-container .mjx-selected {
|
|
303
|
-
outline: 2px solid ${
|
|
305
|
+
outline: 2px solid ${qV} !important;
|
|
304
306
|
}
|
|
305
307
|
:root mjx-container [data-sre-highlight-2] {
|
|
306
|
-
color: ${
|
|
308
|
+
color: ${WV} !important;
|
|
307
309
|
background-color: transparent !important;
|
|
308
|
-
fill: ${
|
|
309
|
-
outline: 2px dashed ${
|
|
310
|
+
fill: ${WV} !important;
|
|
311
|
+
outline: 2px dashed ${qV} !important;
|
|
310
312
|
}
|
|
311
313
|
:root mjx-container rect[data-sre-highlight-2] {
|
|
312
314
|
fill: transparent !important;
|
|
313
|
-
stroke: ${
|
|
315
|
+
stroke: ${qV} !important;
|
|
314
316
|
stroke-width: 2px !important;
|
|
315
317
|
vector-effect: non-scaling-stroke;
|
|
316
318
|
}
|
|
317
319
|
:root .MJX_LiveRegion, :root .MJX_HoverRegion, :root .MJX_ToolTip {
|
|
318
|
-
color: ${
|
|
319
|
-
background-color: ${
|
|
320
|
-
border-color: ${
|
|
320
|
+
color: ${WV} !important;
|
|
321
|
+
background-color: ${GV} !important;
|
|
322
|
+
border-color: ${KV} !important;
|
|
321
323
|
}
|
|
322
324
|
:root .MJX_LiveRegion > div, :root .MJX_HoverRegion > div {
|
|
323
|
-
color: ${
|
|
324
|
-
background-color: ${
|
|
325
|
+
color: ${WV} !important;
|
|
326
|
+
background-color: ${JV} !important;
|
|
325
327
|
}
|
|
326
|
-
`;function fB(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=aB,t.textContent=dB,e.head.appendChild(t)}var pB=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function mB(){let e=globalThis;e[pB]||(e[pB]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${BR}`))}function hB(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),mB()}function gB(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>hB(e),{once:!0}),a})}`${UR}`;var _B={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},vB=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,yB=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,bB=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,xB=/\\embed\{newLine\}\[\]/g,SB=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],CB=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),wB=`MJX-CHTML-styles`,TB=`PIE-MJX-SVG-styles`,EB=`PIE-MathJax-Menu-Settings`,DB={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},OB=200,kB=201;function AB(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function jB(e){for(let[t,n]of SB)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function MB(e){return jB(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var NB=`mathjax_ignore`,PB=`mathjax_process`;function FB(e,t){let n=e.closest(`.${NB}, .${PB}`);return n!==null&&t.contains(n)&&!n.classList.contains(PB)}function IB(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||FB(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${MB(n)}\\)`.replace(xB,`\\newline `),t.dataset.mathHandled=`true`)}}function LB(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function RB(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?bB:yB).test(e.textContent??``)}function zB(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=XR(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=cz();return BB(t)&&VB(t),e}}},startup:{typeset:!1,ready:()=>{let e=cz(),r=e?.startup,i=BB(e);i&&(VB(e),HB(e,s.speechLocales),ZR(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(UB(r?.document),r?.document?.addStyles?.(DB),gB(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{..._B}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(vB),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=QR(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),uz(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function BB(e){return!!e?.version?.startsWith(`4.`)}function VB(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=fz);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=TB)}function HB(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=EB;try{let e=localStorage.getItem(EB);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(EB,JSON.stringify(i)):localStorage.removeItem(EB)}catch{}}}function UB(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(AB(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,kB,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&AB(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===wB&&(r.id=fz),KB()}function WB(e){return e instanceof HTMLStyleElement&&pz.includes(e.id)}function GB(e){oz(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function KB(){let e=document.head,t=[...e.children].find(WB);if(t){GB(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(WB);if(e){GB(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function qB(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=OB&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function JB(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=cz()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function YB(e){let t=cz();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():JB(t):zB(e)}function XB(e){return YB(e).then(()=>{let e=cz();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function ZB(e){let t=dz,n=t[CB];return n||(n=XB(e),t[CB]=n),n}function QB(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=mz();r&&oz(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),IB(n),vz(n),LB(n),iB(n);let i=ZB(e);if(!RB(n,t)){i.catch(()=>{});return}await i;let a=cz();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){fB(),qB(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}AB(n)}}}var $B=`@pie-lib/math-rendering`,eV=`@pie-lib/math-rendering@2`,tV=`pie-print`,nV=50,rV=1e4,iV=null;function aV(){return!!window[eV]?.opts?.useSingleDollar}function oV(){return iV||=QB({useSingleDollar:aV()}),iV}function sV(){if(typeof window>`u`)return null;let e=window[$B];return typeof e?.renderMath==`function`&&e.renderMath!==dV?e:null}function cV(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===tV)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function lV(){let e=window.renderMath;return typeof e==`function`?e:null}async function uV(e){let t=cV(e);if(!t)return null;let n=lV();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+rV;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,nV));let e=lV();if(e)return e}return null}var dV=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=sV(),i=r||t?null:await uV(n);return r?await r.renderMath?.(n):i&&i!==dV?await i(n):await oV()(n),t?n.innerHTML:void 0},fV=(e,t)=>{let n=sV()?.wrapMath?.(e,t);if(n!=null)return n;let[r,i]=t===`dollar`||t===`double_dollar`?[`$`,`$`]:[`\\(`,`\\)`];return`${r}${jB(e)}${i}`},pV=e=>{let t=e.trim();return t.startsWith(`\\[`)&&t.endsWith(`\\]`)?{unwrapped:t.slice(2,-2).trim(),wrapper:{open:`\\[`,close:`\\]`}}:t.startsWith(`\\(`)&&t.endsWith(`\\)`)?{unwrapped:t.slice(2,-2).trim(),wrapper:{open:`\\(`,close:`\\)`}}:t.startsWith(`$$`)&&t.endsWith(`$$`)?{unwrapped:t.slice(2,-2).trim(),wrapper:{open:`$$`,close:`$$`}}:t.startsWith(`$`)&&t.endsWith(`$`)?{unwrapped:t.slice(1,-1).trim(),wrapper:{open:`$`,close:`$`}}:{unwrapped:t}},mV={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},hV={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},gV=e=>typeof e==`string`,_V=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},vV=e=>e==null?``:``+e,yV=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},bV=/###/g,xV=e=>e&&e.indexOf(`###`)>-1?e.replace(bV,`.`):e,SV=e=>!e||gV(e),CV=(e,t,n)=>{let r=gV(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(SV(e))return{};let t=xV(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return SV(e)?{}:{obj:e,k:xV(r[i])}},wV=(e,t,n)=>{let{obj:r,k:i}=CV(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=CV(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=CV(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},TV=(e,t,n,r)=>{let{obj:i,k:a}=CV(e,t,Object);i[a]=i[a]||[],i[a].push(n)},EV=(e,t)=>{let{obj:n,k:r}=CV(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},DV=(e,t,n)=>{let r=EV(e,n);return r===void 0?EV(t,n):r},OV=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?gV(e[r])||e[r]instanceof String||gV(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):OV(e[r],t[r],n):e[r]=t[r]);return e},kV=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),AV={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},jV=e=>gV(e)?e.replace(/[&<>"'\/]/g,e=>AV[e]):e,MV=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},NV=[` `,`,`,`?`,`!`,`;`],PV=new MV(20),FV=(e,t,n)=>{t||=``,n||=``;let r=NV.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=PV.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},IV=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},LV=e=>e?.replace(/_/g,`-`),RV={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},zV=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||RV,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(gV(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},BV=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},VV=class extends BV{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):gV(n)&&i?o.push(...n.split(i)):o.push(n)));let s=EV(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!gV(n)?s:IV(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),wV(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(gV(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=EV(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?OV(s,n,i):s={...s,...n},wV(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},HV={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},UV=Symbol(`i18next/PATH_KEY`);function WV(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===UV?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function GV(e,t){let{[UV]:n}=e(WV()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var KV={},qV=e=>!gV(e)&&typeof e!=`boolean`&&typeof e!=`number`,JV=class e extends BV{constructor(e,t={}){super(),yV([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=zV.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=qV(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!FV(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:gV(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:gV(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=GV(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?GV(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!gV(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let ee=qV(E),D=Object.prototype.toString.apply(E);if(y&&E&&ee&&_.indexOf(D)<0&&!(gV(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:qV(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&gV(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=gV(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!gV(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=gV(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=HV.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return gV(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?GV(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!gV(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(gV(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!KV[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(KV[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!gV(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},YV=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=zV.create(`languageUtils`)}getScriptPartFromCode(e){if(e=LV(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=LV(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(gV(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),gV(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return gV(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):gV(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},XV={zero:0,one:1,two:2,few:3,many:4,other:5},ZV={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},QV=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=zV.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=LV(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ZV;if(!e.match(/-|_/))return ZV;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>XV[e]-XV[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},$V=(e,t,n,r=`.`,i=!0)=>{let a=DV(e,t,n);return!a&&i&&gV(n)&&(a=IV(e,n,r),a===void 0&&(a=IV(t,n,r))),a},eH=e=>e.replace(/\$/g,`$$$$`),tH=class{constructor(e={}){this.logger=zV.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?jV:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?kV(i):a||`{{`,this.suffix=o?kV(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?kV(d):f||kV(`$t(`),this.nestingSuffix=p?kV(p):m||kV(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=$V(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format($V(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>eH(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?eH(this.escape(e)):eH(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=gV(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!gV(a)&&!this.useRawValueToEscape&&(a=vV(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${kV(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!gV(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!gV(i))return i;gV(i)||(i=vV(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},nH=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},rH=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(LV(r),i),t[o]=s),s(n)}},iH=e=>(t,n,r)=>e(LV(n),r)(t),aH=class{constructor(e={}){this.logger=zV.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?rH:iH;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=rH(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=nH(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},oH=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},sH=class extends BV{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=zV.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{TV(n.loaded,[i],a),oH(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();gV(e)&&(e=this.languageUtils.toResolveHierarchy(e)),gV(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},cH=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),gV(e[1])&&(t.defaultValue=e[1]),gV(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),lH=e=>(gV(e.ns)&&(e.ns=[e.ns]),gV(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),gV(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),uH=()=>{},dH=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},fH=`__i18next_supportNoticeShown`,pH=()=>!!(typeof globalThis<`u`&&globalThis[fH]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),mH=()=>{typeof globalThis<`u`&&(globalThis[fH]=!0)},hH=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),gH=class e extends BV{constructor(e={},t){if(super(),this.options=lH(e),this.services={},this.logger=zV,this.modules={external:[]},dH(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(gV(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=cH();this.options={...n,...this.options,...lH(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!hH(this)&&!pH()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),mH());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?zV.init(r(this.modules.logger),this.options):zV.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:aH;let t=new YV(this.options);this.store=new VV(this.options.resources,this.options);let i=this.services;i.logger=zV,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new QV(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new tH(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new sH(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new JV(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=uH,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=_V(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=uH){let n=t,r=gV(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=_V();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=uH,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&HV.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=_V();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=gV(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(gV(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=GV(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=GV(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=GV(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return gV(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=_V();return this.options.ns?(gV(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=_V();gV(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new YV(cH());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=uH){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new VV(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...cH().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new tH(n)}return a.translator=new JV(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();gH.createInstance,gH.dir,gH.init,gH.loadResources,gH.reloadResources,gH.use,gH.changeLanguage,gH.getFixedT,gH.t,gH.exists,gH.setDefaultNamespace,gH.hasLoadedNamespace,gH.loadNamespaces,gH.loadLanguages,gH.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:mV,es:hV}});var _H={translator:{...gH,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return gH.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},vH=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,yH=e=>w.useState(()=>vH(e))[0],{translator:bH}=_H,xH=I(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:LL(),cursor:`pointer`}),SH=I(`span`)({borderBottom:`1px dotted currentColor`}),CH=I(RR)(({theme:e})=>({paddingTop:e.spacing(2)})),wH=class extends w.Component{static propTypes={className:m.string,children:m.object,labels:m.shape({visible:m.string,hidden:m.string}),language:m.string};static defaultProps={labels:{}};state={expanded:!1};panelId=vH(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){dV(this.root)}componentDidUpdate(){dV(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||bH.t(`common:hide`,{lng:r}):e.hidden||bH.t(`common:show`,{lng:r});return(0,P.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,P.jsx)(`div`,{children:(0,P.jsx)(xH,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,P.jsx)(SH,{children:a})})}),(0,P.jsx)(`div`,{id:this.panelId,children:(0,P.jsx)(CH,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}};function TH(e){return Vr(`MuiButton`,e)}var EH=Hr(`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(`.`)),DH=w.createContext({}),OH=w.createContext(void 0),kH=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=y({root:[`root`,o&&`loading`,a,`${a}${L(t)}`,`size${L(i)}`,`${a}Size${L(i)}`,`color${L(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${L(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${L(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${L(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},TH,c);return{...c,...l}},AH=[{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}}}],jH=I($P,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${L(n.color)}`],t[`size${L(n.size)}`],t[`${n.variant}Size${L(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Oo(({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`},[`&.${EH.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]},[`&.${EH.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${EH.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)`,[`&.${EH.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(Mo()).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`},[`&.${EH.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${EH.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}),[`&.${EH.loading}`]:{color:`transparent`}}}]}})),MH=I(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${L(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}},...AH]})),NH=I(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${L(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}},...AH]})),PH=I(`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}}]})),FH=I(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),IH=w.forwardRef(function(e,t){let n=w.useContext(DH),r=w.useContext(OH),i=ko({props:ti(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:y=`center`,size:b=`medium`,startIcon:x,type:S,variant:C=`text`,...T}=i,E=KN(h),ee=_??(0,P.jsx)(fF,{"aria-labelledby":E,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:ee,loadingPosition:y,size:b,type:S,variant:C},O=kH(D),te=(x||g&&y===`start`)&&(0,P.jsx)(MH,{className:O.startIcon,ownerState:D,children:x||(0,P.jsx)(FH,{className:O.loadingIconPlaceholder,ownerState:D})}),k=(f||g&&y===`end`)&&(0,P.jsx)(NH,{className:O.endIcon,ownerState:D,children:f||(0,P.jsx)(FH,{className:O.loadingIconPlaceholder,ownerState:D})}),A=r||``,j=typeof g==`boolean`?(0,P.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:g&&(0,P.jsx)(PH,{className:O.loadingIndicator,ownerState:D,children:ee})}):null,{root:M,...ne}=O;return(0,P.jsxs)(jH,{ownerState:D,className:v(n.className,O.root,c,A),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:v(O.focusVisible,p),ref:t,type:S,id:g?E:h,...T,classes:ne,children:[te,y!==`end`&&j,a,y===`end`&&j,k]})}),LH=IN((0,P.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`),RH=IN((0,P.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`),zH=I(`div`)({display:`flex`,flexDirection:`column`}),BH=I(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),VH=I(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),HH=I(IH)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),UH=e=>{class t extends w.Component{static propTypes={session:m.object,onSessionChange:m.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,P.jsxs)(zH,{children:[(0,P.jsxs)(BH,{children:[(0,P.jsxs)(HH,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,P.jsx)(VH,{children:(0,P.jsx)(RH,{})}),`Undo`]}),(0,P.jsxs)(HH,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,P.jsx)(VH,{children:(0,P.jsx)(LH,{})}),`Start Over`]})]}),(0,P.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},WH=yo({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`}}}}}}),GH=I(`div`)({"& table, th, td":{fontSize:`inherit`}}),KH=class extends w.Component{static propTypes={className:m.string,children:m.array,extraCSSRules:m.shape({names:m.arrayOf(m.string),rules:m.string}),fontSizeFactor:m.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}scopeClass=vH(`extra-css-rules`);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,P.jsx)(yr,{injectFirst:!0,children:(0,P.jsxs)(Ko,{theme:WH,children:[i?.rules?(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,P.jsx)(GH,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}},qH=I(KH)({display:`flex`,flexDirection:`column`,position:`relative`}),JH=class extends w.Component{static propTypes={ariaLabel:m.string,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,role:m.string,extraCSSRules:m.shape({names:m.arrayOf(m.string),rules:m.string}),fontSizeFactor:m.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,P.jsx)(qH,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},YH=class extends w.Component{static propTypes={tag:m.string,className:m.string,html:m.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,P.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function XH({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 ZH=w.createContext(void 0);function QH(){return w.useContext(ZH)}function $H(e){return Vr(`MuiFormLabel`,e)}var eU=Hr(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),tU=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return y({root:[`root`,`color${L(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},$H,t)},nU=I(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Oo(({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(Mo()).map(([t])=>({props:{color:t},style:{[`&.${eU.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${eU.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${eU.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),rU=I(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Oo(({theme:e})=>({[`&.${eU.error}`]:{color:(e.vars||e).palette.error.main}}))),iU=w.forwardRef(function(e,t){let n=ko({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=XH({props:n,muiFormControl:QH(),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=tU(m);return(0,P.jsxs)(nU,{as:o,ownerState:m,className:v(h.root,i),ref:t,...f,children:[r,p.required&&(0,P.jsxs)(rU,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function aU(e){return Vr(`MuiInputLabel`,e)}Hr(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var oU=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=y({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${L(r)}`,o],asterisk:[s&&`asterisk`]},aU,t);return{...t,...c}},sU=I(iU,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${eU.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]]}})(Oo(({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)`}}]}))),cU=w.forwardRef(function(e,t){let n=ko({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=QH(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=XH({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=oU(f);return(0,P.jsx)(sU,{"data-shrink":u,ref:t,className:v(p.root,s),...c,ownerState:f,classes:p})});function lU(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function uU(e,t=!1){return e&&(lU(e.value)&&e.value!==``||t&&lU(e.defaultValue)&&e.defaultValue!==``)}function dU(e){return e.startAdornment}function fU(e){return Vr(`MuiFormControl`,e)}Hr(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var pU=e=>{let{classes:t,margin:n,fullWidth:r}=e;return y({root:[`root`,n!==`none`&&`margin${L(n)}`,r&&`fullWidth`]},fU,t)},mU=I(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${L(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%`}}]}),hU=w.forwardRef(function(e,t){let n=ko({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},y=pU(_),[b,x]=w.useState(()=>{let e=!1;return r&&w.Children.forEach(r,t=>{if(!zN(t,[`Input`,`Select`]))return;let n=zN(t,[`Select`])?t.props.input:t;n&&dU(n.props)&&(e=!0)}),e}),[S,C]=w.useState(()=>{let e=!1;return r&&w.Children.forEach(r,t=>{zN(t,[`Input`,`Select`])&&(uU(t.props,!0)||uU(t.props.inputProps,!0))&&(e=!0)}),e}),[T,E]=w.useState(!1);s&&T&&E(!1);let ee=l!==void 0&&!s?l:T;w.useRef(!1);let D=w.useCallback(()=>{C(!0)},[]),O=w.useCallback(()=>{C(!1)},[]),te=w.useMemo(()=>({adornedStart:b,setAdornedStart:x,color:a,disabled:s,error:c,filled:S,focused:ee,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{E(!1)},onFocus:()=>{E(!0)},onEmpty:O,onFilled:D,registerEffect:void 0,required:p,variant:h}),[b,a,s,c,S,ee,u,d,void 0,O,D,p,m,h]);return(0,P.jsx)(ZH.Provider,{value:te,children:(0,P.jsx)(mU,{as:o,ownerState:_,className:v(y.root,i),ref:t,...g,children:r})})}),gU=I(hU)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),_U=I(cU)(()=>({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)`}})),vU=({label:e,className:t,children:n})=>(0,P.jsxs)(gU,{className:t,children:[(0,P.jsx)(_U,{shrink:!0,children:e}),n]});vU.propTypes={label:m.oneOfType([m.string,m.object]).isRequired,className:m.string,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired};var{translator:yU}=_H,bU=`pie-prompt-audio-player`,xU=`play-audio-button`,SU=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,CU=I(`div`)(({theme:e,tagName:t})=>({[`& .${xU}:focus-visible`]:{outline:`2px solid ${eR()}`,outlineOffset:`2px`},[SU(`:not([role="presentation"])`)]:{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:UL()},[SU(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:GL()},[SU(`:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td`)]:{backgroundColor:GL()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},[SU(` td > p.kds-indent`)]:{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:uL()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${uL()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),wU=/\\embed\{newLine\}\[\]/g,TU=`\\newline `,EU=`preview-prompt`,DU=class extends w.Component{static propTypes={prompt:m.string,tagName:m.string,className:m.string,onClick:m.func,defaultClassName:m.string,autoplayAudioEnabled:m.bool,customAudioButton:m.shape({playImage:m.string,pauseImage:m.string}),language:m.string};static defaultProps={onClick:()=>{}};promptRef=w.createRef();audioId=vH(bU);playButtonId=vH(xU);parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n,language:r}=this.props,i=document.createElement(`div`);i.innerHTML=e;let a=i.querySelector(`audio`);if(a){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,a.getAttribute(`src`)),a.removeAttribute(`src`),a.id=this.audioId,a.classList.add(bU),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,yU.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=xU,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,margin:`0`,padding:`0`,font:`inherit`,backgroundColor:`transparent`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),a.parentNode.insertBefore(e,a)}}return i.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=this.promptRef.current,r=n?.querySelector(`.${xU}`),i=n?.querySelector(`.${bU}`);if(e&&i&&i.play().then(()=>{r&&t&&i.addEventListener(`ended`,o)}).catch(e=>{r&&t&&(r.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!r||!i||!t)return;let a=()=>{i.paused&&i.play()},o=()=>{r.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(r.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},c=()=>{Object.assign(r.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};r.addEventListener(`click`,a),i.addEventListener(`play`,s),i.addEventListener(`pause`,c),i.addEventListener(`ended`,o),this._playButton=r,this._audio=i,this._handlePlayClick=a,this._handleAudioPlay=s,this._handleAudioPause=c,this._handleAudioEnded=o}removeCustomAudioButtonListeners(){let e=this._playButton,t=this._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=this.promptRef.current;e&&typeof dV==`function`&&dV(e)}alignImages(){let e=this.promptRef.current;if(!e)return;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`:``} ${EU}`.trim();return(0,P.jsx)(CU,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(wU,TU)}})}},OU=e=>(0,P.jsx)(P.Fragment,{children:w.Children.map(e.children,t=>w.cloneElement(t,{"data-pie-readable":e.false===void 0}))});OU.propTypes={children:m.node,false:m.bool};var kU=e=>(0,P.jsx)(P.Fragment,{children:w.Children.map(e.children,t=>w.cloneElement(t,{"data-pie-purpose":e.purpose}))});kU.propTypes={children:m.node,purpose:m.string};var AU;typeof window<`u`&&(AU=new DOMParser);var jU=e=>AU.parseFromString(e,`text/html`).body.textContent,MU=e=>{if(!e)return!1;let t=jU(e);return!!(t&&t.trim())},NU;typeof window<`u`&&(NU=new DOMParser);var PU=e=>{if(!e)return!1;let t=NU.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},FU=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFEYXGCscITNDVRcoGRocEUIjJS0eEVI2KSsjNCU6LwFtLx/9oADAMBAAIRAxEAPwD1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARtJNt2S4sDaljMNB2dZfNr9gGn49hfzv1WA+PYX879VgPj2F/O/VYD49hrNqpeyvaz1A0d8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaBY5hSm7QpVZPsUb/rA+mLbV3Fx8zAoAAAAAAAAAAAAAAAAAAAAPhxOYqDcaNtOM3w+YD8bF5u296cnLsb4epAfnV887lrvvV6eLoB88topvSNRJW5xfsA0d/Z/nv8AaAd/Z/nv9oCPPpxTbrcFf+EBtvaZX0rafpe8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veBu0to4VZ7inLXn3TggP0cJnNOpLuae+km27q6XbxA/UoVac1GruKcZLg219nMD9qjUhOKUFO1r+Mn9rA3AAAAAAAAAAAAAAAAAAB8mPxLoU92ErSlxfYgOF7W7S5XszlmMzzNsfTw2AwNKVatVqLxVGK8Z29F7c3pZan6WbNeIuRatRrVM6RD8716jD25u3Z0piNZl5+9MPWv2828zPEYLZHM8Zs7kEZtUYYafcsVXjfSdWpHxot+RF2SdnvWuVbY+VMLgaIrxNMV3OXXfEdERxT1z7tEn2xmvF46uaMLVNu3yabqp6Znjjqj36ukMXjMZj68sVjsVWxNaesqlao5yl6W9WdTRbotxwaI0joctXcruVcKudZ6WyengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN7CYzGYCvHFYHFVsNWhrGpRqOEo+hrVHmu3Rcjg1xrHS90XK7dXConSeh3Z0Q9avbvYTMKGB2rzLGbQZFKa7rDEVO6YqgnxnTqy8aVvIk2tLLd4nLbXyphcdRNeGpi3c6N0T0THF749+rqdj5rxeBrijE1Tct9O+Y6Ynjnqn3aM+NltqMBtDluDzvKMXTxeExtOOIw9ZSsqkJap6cHZ8LKz4olN6zXh7lVq5GlUTpMKxZvUYi3TdtTrTMaxLmuX42U4NxqzaUVeMo726r2110t6voPzfo/To1FVhvqpGevFKwG4AAAAAAAAAAAAAAAAAfgZpWko1au/KSi7KV9fmt6AMQOvHthiMDsVlWy2FxDpxzvMJVa8Y/wAOlQSk4S7V3SdKX+qrcztckYWLuMrxFUfgjd0TV+0THvcTnjFTawdGHpn8c7+mKf3mJ9zCcqCWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGaXUi2wr4zYvNdl8Ripz7y46NahF6qnSrpy3UuzfhVl/rMl+d8LFrGUYiI/HG/rj9piFSyPipu4OvD1T+Cd3RFX7xM+9ltlGKi9y8U3JqTk22mr+p+g4p2zkuFxNOreEIRppO0VdXfzAfSAAAAAAAAAAAAAAAA0VZUowfdpRjFqzcnZAcUziruUG4ylGcVfzNfe+ugGD/Xnqznidj4Saaj3xtbz/ABf7+ooeQ+cdjxJ3n7m/b8LFcoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGUXUeqyp4va1Ra8Z5do158R+q5Pc+c37fhUTIPOOx4mbWVTiqcJVpWcZWi6fBevzXJ4ojmeGgpRjiJL9knHV66/N8yA3wAAAAAAAAAAAAAAAG1ilF4epv8N1+vl9IHDtoXGGH3VFq8XqtF6G+foAwg67zi8Tsju8P2/bstu4bk9fuih5D5x2PEnefub9vwsXihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZOdSj/H7Xf8A0H2YknufOb9vwqJkHnHY8TNjZ7WV5VHBRfJ2TRPFEcwy9zUof4zudvFtfd+wD9IAAAAAAAAAAAAAAABs4tTeHnuSs0m351zA4ftG2sNpNqSacUn62Bg5124OOO2UdrJ/H0r6P/N+XzlDyHzjseJO8/c37fhYxFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAya6lN/je1iva8cDr/8AkE9z5zft+FRMg847HiZrbPb1NqO+oNvTRa8bpXehPFEczy9y7pG1Va6um5NfqswP0wAAAAAAAAAAAAAAAGxjJ7mHmrtNq11G4HDtpFL4uqt/F4JJJPXz8fmsBg912t14zZLdem7jrLs/J/P6Sh5D5x2PEnefub9vwsYihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZNdSn8s2s/RwP94J7nzm/b8KiZB5x2PEzd2fhGcVGSun7yeKI5fgYVEoN4eMocp6byA/QAAAAAAAAAAAAAAAAbOLipYeeidk2r8gOG7RNzp9zcYqKW85pXkvMBg/12oRhidkk14/7fu9eFsNb9ZQ8h847HiTvP3N+34WMJQk7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMm+pSv23tY+xYH+8E9z5zft+FRMg847HiZubOS8ZRat2efiTxRHNcBUh3CFPeSkr6XV3qB9QAAAAAAAAAAAAAAADYxkHKhJqUk4pvR8V5wOGZ81GlKDbV1rfmla33uBg/wBdhp4rZK1tFj+bul+1/m+7KHkPnHY8Sd5+5v2/CxjKEnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABk11Kfyzaz9HA/3gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/2sD6AAAAAAAAAAAAAAAAGxjYKeHld23dUBw3aNN0UpNJdrtfj6L2Awd67Di8bso4xaVsdpe/+jlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyb6lLfxvaxaarAvh/wCIJ7nzm/b8KiZB5x2PEzb2fjvKLV7p3XjNdvYTxRHNsFTi8PCd5X1/hO3HsA+oAAAAAAAAAAAAAAAB8+Oq9yw8v2Ock1bxeQHEdoG6mC8Vt3krR+/vAwa666ti9kteMcd/uCh5D5x2PEnefub9vwsZChJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA+rLMqzPO8fRyrJsuxWPxuJluUcNhaMqtWrLjaMIpuT05I8XLlFqma7kxERyzuh7t2671UUW4mZnkjfLlP4FumP8A+U22X/6HFf8A8GH/ABXAf89H91P6s3+E4/8A4K/7av0PwLdMf/ym2y//AEOK/wD4H8VwH/PR/dT+p/Ccf/wV/wBtX6Nut0O9LmHg6lfos2vpwXGU8jxSS+dwPsbUwNW6L1H90fq+TsvHUxrNmv8Atn9HGsxyvM8oxLwWbZdicFiI6uliKMqc1/qySZl0XKLscKiYmOjew7luu1PBriYnp3PlPbwAZe7A/B/+HGw+QbZ/ha+Jd/Mtw2Y/Fu8PdO491pxnub/xhb1t617K/YjhsbnT7JibmH8hrwZmNeFprpOn5Xd4LJX2zDW8R5fThRE6cHXTWNfzOmOsX0FPoB2uy/ZXwp7+rH5bHMPjHxL4ruXq1Ibm73Sd/wDF3vdceGmu/wBh7Y/jViq9wODpOmmuvJE+qPW5/buxv4Lfps8Ph6xrrppyzHrn1OqTdNIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ/wC2HUh2G6Rdgsi2g2Eq09mNoauUYSpNJOWCxc3Ri26kFd05N8Zw87cZN3Jlhc24nA4mu1ifv0cKeuN/JPL1T8YU/FZRw2Ow1F3Dfcr4MdU7uWOTrj4Swt6R+inb3onzp5Ht1s/Xy+rJvuNa2/QxEV/CpVF4s1w4O6vqk9Dv8DtLDbSt+Uw1evfHXCfY/ZuK2bc8niaNOnknqlxIzmCAAAAAAAAAAAABk11KbfGtrUvxt3A2fL/OCe585v2/ComQecdjxM3tnL3j2a/rJ4ojmmCVX4vBqcd3XTd149twPqAAAAAAAAAAAAAAAAfPjZ7tFxUrOSfNa+bX9QHD9oKtB4ZQ34RndOytvWf2rUDBzrrxaxeybemmOVuf+b8ih5D5x2PEnefub9vwsZChJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf+Uv93M0uY/Rd7q+sN3lz0rZ6/pL1gIotr8qttXsth6tTD19pcqp1aUnCcJ4ympRknZppvRp6WP2jDXpjWKJ+EvxnE2YnSa4+MN3BbQ5BmVb4vl2eZfiqtr7lHEwnK3oTufK7F23GtVMxHU+037Vc6U1RM9bZ2l2T2Y2yyypk21mQZfm+BqJ71DGYeNWF+1KSdn2NWa4o9WMTewtflLFU0z64nR5xGGs4qjyd+mKo9UxqwQ61vU/w3Rzl9fpH6Mqdeps/TnfMMtnJ1J4BSaSqU5PxpUruzTvKN07tX3aRlzM9WOrjCYz8fJPr6J6e9NsyZXpwNE4vB/g5Y9XTHR3MTjtnDvXnoD/yH7Afzay7+zwIZtn0jf8Abq75XXYvo6x7FPdDDL4Rb/K5s9/Nyn/acQd9kbzK57f0hwGevPbfsfWWKZ2riQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ofVtTsns1ttktfZ3a3JMJmuW4lfsmHxNNTjflJc4yXKSs1yaPGHxN7CXIu2Kppqjlh7xGGs4u3Nq/TFVM8ksJenDqDZtlTxG0PQviamZYNXnPJcXUXxmmuL7jUdlUXZGVpacZtlC2RnOi5pa2hGk/mji98cnXG7qTza+S67et3Z86x+WeP3Ty9U7+tiFmGXZhlGOr5ZmuBxGCxmGm6dbD4ilKnUpyXGMoySafmZ3VFdN2mK6J1ieWHCV26rVU0VxpMck8b5j08AAAAAAAAAABk31Kt1V9rpO+8lgLdlrYi9/oJ7nzm/b8KiZB5x2PEzbyCU4qLjuLXVydrcSeKI5tl874eMGpXV9d12evID6gAAAAAAAAAAAAAAAGxjP8RJb8Yqz4q9/MgOHbQ1GqKS3XNK6klrxs0Bg512JXxuynDhjuSX+jlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAB2t1V2l1hNh7v/ANpf7uZpcxei73V9YbvLnpWz1/SXrARRbXjv0wf5Wttv5x5l2/6TU7S77L8xs+xT3Qgu1PPr3t1d8uJRlKElOEnGUXdNOzTM6Y13SwYnTfDMHqS9Yva6W2uD6I9sM5xea5XmdKcMrqYmfdKmErU4Snub8vGdOUYyVm3ZqCjZXRwmbNh2Ps846xTFNVP4tOWJ3a9ffv1d7lLbt/7RGBxFU1U1fh15Jjfp1ftozpzbK8DneV4zJczoRr4PH4ephcRSlwqUpxcZRfmabROLdyq1XFyidJidY9ykXLdN2ibdcaxMaT1S8bNscgeym12ebLOt3Z5PmOJy91PLdKrKG98+7cveFvfabFF780RPxjVAsVY+zX67P5ZmPhOj1h6A/wDIfsB/NrLv7PAie2fSN/26u+Vt2L6OsexT3Qwx+EWv+F3Z/s8G6X9qxB32RvMrnt/SHAZ68+t+x9ZYqHauJc+6NugrpU6WnKpsPslicZhKc9ypjarjRw0HzXdJtRk1zUbtdhrcftjBbN3YiuIn1cc/CGzwGx8btPfhqJmPXxR8Z+jujBfB3dMleCnjdp9kMM2r7ixWJnJPsdqNvU2c/XnjAROlNFc+6P1dDRkbH1RrVXRHvn9HFNt+pJ09bGYSpj6GR4LaOhSW9N5JiJV6iXmpTjCpJ+aMWzNwmbdmYqrgzVNE/wBUafOJmPjLBxeUdp4WnhRTFcf0zr8piJ+EOhqtKpRqTo1qcqdSnJxnCSs4tcU1yZ0sTExrDmpiYnSXbXRt1W+lvpX2Xp7X7G5fltfLqtapQUquYU6c1ODtJOL1Xz8mnzNHj8w4HZt7yGImYq4+KeVvMBl3HbSsxfw8RNPFxxyNvpN6sPS30R7NLazbHKcHTy74zDCyqYbGQrOE5qTi2o8F4tr9rXaetn5gwO073kMPVPC013xo87Qy9jtmWfL4imODrpunV1ObppHLejLov2v6XNpJbK7FYOjiMfDDTxc1WrKlCNKLjFtyei1nFelowtobQsbMteWxE6U66eveztn7Ov7TveQw8a1aa+rc7Xl1E+sHFOUsmydJK7bzSlojSf8A2Gy/zT/bLd//AB21Pyx/dDH2pDudSVPfjLdk1vRd07c15jqInWNXLzGk6NIfAAAAAAAAAAAAAAAAAAAAAAAB7LdHv7gdmv5Hwf8AUwIJjfOrntT3yv2C81t+zHdDkBisoA616YOr50a9NWAdPavJ1SzKEN3D5thEqeLo9i3rePFeTNNcbWepttmbaxeyatbFX3eWmeKf064ajamxMJtanS/T97kqjjj9eqWAXTf1SukrocliM2p4aW0GzVNuSzTBUnejDtr0tXS9N3Dh419Cm7IzLhNqaUTPAuflnl6p5e/oTHa+WcXsvWuI4dv80cnXHJ3dLpA6JzgAAAAAAAAAyb6lNvjO1r4ySwNlfjpiPdzJ7nzm/b8KiZB5x2PEzd2dbSTSb8y+cniiOZYGFZ0ac1WtDXxHFdvaB9gAAAAAAAAAAAAAAAD58bZUJPzNfj7v/P0AcM2jpuUISjFSdrfjtvj2X/UBhB12Zb2N2T0X4uO4K1/ycoeQ+cdjxJ3n7m/b8LGMoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAO1uqt++F2H/lL/dzNLmP0Xe6vrDd5c9K2ev6S9YCKLa8d+l+fdOlnbae7u720WZO172/bNQu+zI0wNmP6Ke6EF2pOuOvT/XV3y4iZzBd59TLYnNtrunjIsfg8JUngNn3PMcfXV1ClFQlGmm+2VRxSjzW9yTOczVi6MNs2umqfvV7o+O/4Q6TKmErxO06KqY+7Rvmfdu+MvUMjqyPHTpZzjC7Q9Ke2OfYGanhsxz/MMVQkuEqc8ROUX6mi8bNtTYwVm3VxxTTHwiEF2ndi/jb12nimqqfnL1O6A/8AIfsB/NrLv7PAjO2fSN/26u+Vn2L6OsexT3Qwy+EWa/C5s8r6+DlP+1Yg77I3mVz2/pDgM9ee2/Y+suvOqf0K4Ppp6ToZfn1OU9n8moPH5nGM3B1knu06Ka1W9J6213Yzs07M2uZNq1bKwfCtfjqnSOj1z7o+ejVZa2TTtbGcG7+CmNZ6fVHvn5avTyUsi2SyKdRxwmVZRlWGc3uxjSo4ejCN3otIxSRH/wCZibnLVVVPXMzKxfy8Nb13U00x1REQxuzr4Qroby7N54HLcj2lzXB0puLx1DDUqcKi8qnCpUjNr9JQfmOstZJx9dHCrqppn1TM/PSJj4auSu532fbucGimqqPXER8tZifjo746NekzY/pZ2Xo7XbFZi8Vgas5UpxnBwq0Ksbb1OpF8JK67U0002mmc3j8Bf2bemxiI0n5THrh0uA2hY2lZi/h51j5xPqlip1++hHKKGV4fpn2dwEMPi/jMMJncaUbRrRmrUq8raKSklBv+Fvw7Ne0yZta5Nc7PuzrGmtPRpxx9eje4rOmyLcURtC1Gk66VdOvFP06dz8v4OrpBjhc12k6MsZiIwjjYQzjBRlpepC1OtFPtcXRaXZCR+2eMFwqLeMpji+7PfH1+L8cjY3g13MHVPH96O6fp8GV3TpsL+Enoj2o2OhSdTEY3ATnhIpXbxNJqpRS9NSEV85xWyMZ9gx1q/wAkTv6p3T8pdttjB/b8Ddw/LMbuuN8fOHkJwLmhLOf4OfYfuOU7UdIuJpNSxNenlOFk428SEe6VbPmm50/nh5ic55xety1hI5I4U+/dHdPxUjIuD0t3cXPLPBj3b574+DvDrX9IL6Oug3aHMsPiHSx+aU1lGCcePda94yafJxpqpJPtic5lzBfbto26JjdH3p6o/fSHR5kxv2HZtyuJ31fdjrn9tZeVBaUUAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ocgMVlAACSjGcXCcVKMlZpq6aHEcbGfpw6j+wnSG6+f7ASobK59O85U4U/2hiZ8fHpx1pN+VDTm4t6nXbIzdicDpaxP8yj/tHv5ff8XIbXyjhsdrdwv8uv/rPu5Pd8GB/SN0VbedFGcvI9udnsRl9VuXcazW9QxEU/xqVReLNejVX1SehSsDtHDbSt+Uw1evfHXCaY/ZuJ2bc8niaNO6eqXEjNYIAAAAAADJnqVq+K2telt3A8r8sRy5k9z5zft+FRMg847HiZv7Ocvv2k8URzPAStSjHk78IPjft4AfWAAAAAAAAAAAAAAAA28Rf4vUsv4L+wDhe0tRfF1Sas/wAZPt1QGDfXW/LNk/0cd/dyh5D5x2PEnefub9vwsZShJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf+Uv93M0uY/Rd7q+sN3lz0rZ6/pL1gIotrH/aLqQ9CO0+0GZ7S5nDPljM2xlbHYjueYKMO6VZuct1bjsrydlc6exm3aOHtU2aODpTERG7kiNPW5i/lHZ2Iu1Xq+FrVMzO/lmdfU+bB9Qzq/YWuq1fLs7xkFxpVszkov8AoKMvpPdecdqVRpE0x7v11eKcm7LpnWYqn3/po7n2H6PdiujbJoZBsNs5g8owUdXCjFudR6+NUqSbnUlq9ZNs5/F43EY655XEVzVPT9I4o9zoMJgsPgLfksNRFMdH1njn3unetb1lck6Jtlcbsrs7mVHEbZZpQlQo0aUt55fCas8RUt+LJJ3hF6uVnZxTN9lzYNzaV6m9djS1TOs/1ackfXo6WgzJt+3syzNi1Ot2qNI/p15Z+nT0PM0rqQPXnoD/AMh+wH82su/s8CGbZ9I3/bq75XXYvo6x7FPdDDL4RZr8Lmzyvr4OU/7ViDvsjeZXPb+kOAz157b9j6y6M6LumrpD6G62Y4jYDN6GAqZrGlDFSqYOlXclTcnFLukXu/jy4WvpfgjpNo7Jwu1IpjFU68HXTfMcfU5vZ21sVsqapwtWnC013RPF1uyKvTb1renrIMw2JwFPMdoMux8Y0cZHLskppKKlGdpVadNbibSveSunbmamNk7E2NdpxFUxRVG+Nap6uKZ3tvO19t7ZtVYemJrpndOlMdfHEbn5eB6mHWRx0I1F0duhCSunXzTBwfzx7rvL50ftXmrZNG7yuvVTV+j8KMqbXr3+S066qf1ZWdSrob6Veh6ltbgekLKKeX4TMpYKtgoRxlGupVIKsqrSpye67SpXb42Vji817VwW1JtVYWrWaddd0x6tOP3u2ynsrG7Li7TiqdIq003xPr14vc5p1yqFKv1btse6w3u5wwdSOvCSxlGzNdleqadrWdOn/GWwzTTFWyb2vR/lDzo6Ftvq/Rh0pbObbUqjjSy/GRWKXlYaonTrL/7cpW89irbWwUbQwVzDzyxu643x80o2TjZ2fjbeIjknf1Tun5PX6nUp1qca1GpGdOcVKMou6knwafNELmJidJXaJiY1h5M9ZXYV9HnTbtVkEKThhauNlj8Joku4V/2WKjblHfcP9Rlt2DjPt2zrV2ePTSeuN37oht/B/Ydo3bUcWusdU7/lxPR/q5bD/g86FNk9m6kHHErARxmKTVmq9dutOL/Rc93/AFUSfbmL+3bQu3o4tdI6o3R3aq1sLB/Ydn2rPLprPXO+e/Ril8Ij0hvMtq8h6NMHVfccmw8sxxqTVpYitpTi/PGnFv0VjtckYHydivF1cdU6R1Rx/Ge5xOecd5S/bwdPFTGs9c8XwjvYfndODAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ocgMVlAAAAA/I2p2S2a23yWvs7tbkmEzXLcR/jMPiaanG/KS5xkuUlZrk0fvh8TewlyLtiqaao5YfhicNZxdubV+mKqZ5JYS9OXUIzTJ1idpOhrFzzHBQTqVMmxlVLEUktX3Gq7Kol5MrS04zbKFsjOVF3Szj40n80cXvjk927qTvbGTK7Wt7Z86x+WeP3Ty+/f1sO5RlCThOLjKLs0+KZ3kTrvhwUxpOkoAAAAAGTXUpt8b2s7d3A/3gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/wBrA+gAAAAAAAAAAAAAAABtYm/xepu+SwOE7RNzW40o2jpJq/PzMDB/rr7vxvZK177uOv2f5uUPIfOOx4k7z9zft+FjIUJOwAAAAAAAAAAAAAAAAAAAAAAAAAAAHa3VW/fC7D/yl/u5mlzH6LvdX1hu8uelbPX9JesBFFtYH7d9ffpX2W232h2YweyuydXD5RmuLwFKdXD4lzlClWlCLlauldqKvbS5SMHkzB4nD271VyrWqmJ5OWNfUm2MzpjcNiLlmm3TpTVMcvJOnrcfq/CJ9M0lajsrsZB2d28JipP5v2wZVOR8BHHXX8Y//LEqzzj54qKPhV/+nCtseuf1gNr6FXCLa6GR4aqrSp5Ph44aS/Rq61Y/NNGxwuVdl4WYq4HCn+qdflxfJrsVmvamKiafKcGP6Y0+fH83SWIxFfF16mKxVepWrVpupUqVJOUpybu5NvVtvmdDTTFMcGmNIc7VVNU8KqdZbZ9fHrz0Ba9B+wFv/hvLv7PAhm2fSN/26u+V12L6OsexT3Qwy+EWa/C5s8r6+DlP+1Yg77I3mVz2/pDgM9ee2/Y+suDdUzoFwvTft1Xe0DqR2dyCnTxOPjC6eJnKVqeH3lZxUlGbbWqUWlZtNbLMu2atk4aItf6le6Oj1z+jXZZ2NTtbEz5b/To3z0zyR+r0oUNkejnZapOnSy/IMgybDyqSVOEaNDD0oq7dlovtb7WSX+fjr0RvrrqnrmZVv+RgbMzuoopjqiIY47S/CG9FOV4ythNndmc/zuFJ2jid2nhqVXzx3252/Sgn5jq8PkjG3KYqu1009G+Z+W75uTxGeMDbqmm1RVV07oj57/k7C6vXWVyzrBVs8o5Zsrisn7xxw0qjr4mNXuird0tbdirW7l9PmNXtvYNexYomuuKuFrxRpxafq2mxNv0bbmuKKJp4OnHOvHr+i9cT97dtn/3OE/tlE+ZY9LWeuf8AGX3NHom91R/lDyvLOiz1P6ofSC+kLoKyHEYmv3THZJF5Li25b0t6gkqbb43dJ0m782yM5mwX2LaVcRG6r70e/j+eq0ZYxv27ZtuZn71P3Z93F8tHX/Wq6D6nSH0x9FudUcAq2DzDG96M2aV70KO9ilG3DWlHFK77EbTLu14wOAxNuZ0mI4VPXP3e/gtXmPZE47H4W5EaxM8Grqj73dwmUeIxFDCYeri8VVhSo0YSqVKk3aMIpXbb5JJHG00zVMUxxy7OqqKYmqeKHj10sbdYjpL6SNoducQ52zbHVKtGM/xoUF4tGD/RpxhH5i77NwcYDCW8NH+2Pny/PVBtp4ycfi7mJn/dO7q5PhGjiRmsEAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/AKmBBMb51c9qe+V+wXmtv2Y7ocgMVlAAAAA626YOsF0a9CuAdXavOI1cynHew+U4Rqpi62mj3L+JF+XNpdl3obbZmxcXtarSxT93lqnij9eqGo2ptvCbJo1v1fe5KY45/TrlgF03dbbpL6Yp4jKaWJls9s3UvFZXgqrvWg+Vero6v6NlD+LfUpuyctYTZelcxw7n5p5OqOTv6Ux2vmbGbUmaIngW/wAscvXPL3dDo86JzgAAAAAGTXUp/K9rLcd3A2X/AOQT3PnN+34VEyDzjseJm9s5y+/aTxRHNME6vxeCUI7uuu9rx7LAfUAAAAAAAAAAAAAAAA2MXNwoSShJ7yaule3pA4TtJNOMVKlPVaPSy19oGEXXZSWN2TsreLjv4Sf+jlDyHzjseJO8/c37fhYxlCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAB2t1Vv3wuw/8AKX+7maXMfou91fWG7y56Vs9f0l6wEUW1489Ml/wvbcXd34SZnfS3+dVC77L8xs+xT3Qg21fP7/t1f5S4eZzAAAAD156A/wDIfsB/NrLv7PAhm2fSN/26u+V12L6OsexT3Qwy+EWX/pd2fdl+5ylr/wDVYg77I3mVz2/pDgM9ee2/Y+su0Pg43hfwfbWRhKPxlZzTdRc1DuEdz6d/1M0+etftVr1cH6//AMbjImn2W76+F9HZfXJ2U2o2w6CM3y3ZTCVsXiKGIw+Mr4WhFyqV6FOd5KMUm5NPdlZeQanK2Js4XaVFd6dImJiJ9Uz/AO0bjNOGvYrZldFiNZiYmY9cR/7V5eQoV6leOFp0ak605qnGnGLcnJuyilxvfSxYpqiI4UzuRqKZmeDEb3oX1EehvbTo42dz7anbHL6mWT2leGjhsBiIOGIp0qPdP2SpF6w3nVdotJpRu+KJdnDamHx12izh54XA11mOLWdN0dWip5O2ViMBauXsRHB4emkTx6Rrvnr14nYfXBhKfVv20jCLb7hhXZdixdFs1WWPS1nrn/GW2zPv2Te6o/yh5WlnRVlt8Hl0hd6Nu856OcZXaobQYVYzCRfD4zQTckvPKlKbf/dI4jO+C8rhqMXTx0TpPVP797ucj47yWJrwlU7q41jrj9u5n9KnTnKEp04ydOW9BtXcXZq67HZtehsmUTMKdMRPG6T64+362D6Cc7WHxPcsfn+7k2Fs7N91v3Xhr/iY1de1o6DK+C+2bSo1jdR96fdxfPRz2acb9i2bXpO+v7se/j+Wry3LIjIAAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/qYEExvnVz2p75X7Bea2/ZjuhyAxWUAAPydqdrNmticlr7RbW53hMqy3DL9kxGJqKMU3wiucpPlFXb5Jn74fDXsXci1YpmqqeSH4YjE2cJbm7fqimmOWWEvTh1+c2zV4jZ7oXw1TLcG7wnnWLpr4zUXB9xpu6prslK8teEGihbIyZRb0u7QnWfyxxe+eXqjd1p5tfOldzW1s+NI/NPH7o5Oud/UxCzDMcwzfHV8zzXHYjG4zEzdStiMRVlUqVJPjKUpNtvzs7qiim1TFFEaRHJDhK7lV2qa651meWeN8x6eAAAAAAAGTXUpTeL2stdeLgVfs/KCe585v2/ComQecdjxM3dnJw3VPeW72305k8URzfA/ksPn+1gfQAAAAAAAAAAAAAAAA2sVFSw87xTtFtX5acQOFbS1KkaailHdtdJ63d/QBg711rfG9k+22O05W/a9ih5D5x2PEnefub9vwsZShJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf8AlL/dzNLmP0Xe6vrDd5c9K2ev6S9YCKLa8eemNNdLu3CfFbSZnzv/AJ1U58y77L8xs+xT3Qg21fP7/t1f5S4eZzAAAAD156A7/gP2Av8A/DWW/wBngQzbPpG/7dXfK67G9HWPYp7oYY/CK2/C9s+9L+DdLn//AKsQd9kbzK57f0hwGevPrfsfWXXfVd6fZ9BG21XF5lQq4nZ7O4Qw+a0qSvOCi26daC/hShvS05xlJcbG2zDsb+MYeKaJ0rp30/WPe1OXdtfwbETVXGtFW6r6T7npnshtvslt/k9PP9jNoMFm+AqpNVcNU3t1tX3Zx/GhLtjJJrmiQ4nCX8Fc8liKZpnp/wDb1fwuLsY235XD1xVHR/7c+zvPkGExc87eV5fRxUVKc8X3CEaiTT3m52v231PHlbtVPk+FMx6tfo/TyVqmrynBiJ9en1cP2b6d+jLbDpDxXRlsvtDTzPNsFgqmNr1MPaWGShUjCVNVL2nUW+naN1ZPW6aM6/sfGYXCxjL1PBpmdI1498a66ckdbAsbYweKxU4OzXwqojWdOLdOmmvr6m9057K1ttuh/a/ZnC64jGZTXeHXlVoR7pTj5ryhFX5XPOyMTGEx9q9VxRVGvVO6fk9bYw04vAXbMcc0zp1xvj5vIMuiEuR9HW2OM6Ptusi21wLn3XJ8dSxTjC16lNS/ZIa+VByj85i47C043DV4er/dEx+k+6d7LwOKqwOJoxFP+2Yn9Y98bnsXl+OwuaYDDZngqndMPi6MK9Gdrb0JxUov1NEGrom3VNFXHG5e6K4uUxXTxTvYAfCE9IMc86Rcp6P8FiFPD7NYN18SoyWmKxFpbrXmpRpNfpv56dknBeRwteKqjfXOkdUfvr8EwzvjvLYqjC0zuojWeuf20+LFA7VxAAAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/qYEExvnVz2p75X7Bea2/ZjuhyAxWUkpRhFznJRjFXbbskhxnExn6cOvBsJ0eOvkGwEaG1WfQvCVSFT9oYafDx6kdarXkw05OSeh12yMo4nHaXcT/Lo/7T7uT3/ByG183YbA62sL/Mr/AOse/l93xYH9I/Stt70sZ088262gr5hVi33GjfcoYeL/AINKmvFguHBXdtW3qUnA7Nw2zbfk8NRp3z1ymmP2litpXPKYmvXo5I6ocSM5ggAAAAAAAADJrqUt/HNrFfTdwP8AeCe585v2/ComQecdjxM3dnFJRVnHefO2nMniiOb4C/xSnfjr9rA+gAAAAAAAAAAAAAAABsYxruEouputp2W9a/mA4RtHPeShvR4X4q7+js7AMJOu1u/HtlN2DirY7RvX/oCh5D5x2PEnefub9vwsYihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6suzTM8nxKxuU5jisFiIqyq4atKnNLs3otPkjxct0XY4NcRMdO97t3K7U8K3MxPRufoZrtttlntD4tnm1udZjRtbueLx9WtG3ZaUmj8reEw9mdbdumJ6IiH63MXiL0cG5cqmOmZl+KZDHAAHZvQD0L590z7fZdk2GyvFTyOhiIVM4xsIuNOhhk05x7pwVSS8WK43d7WTa1G2tq2tlYaq5NUcOY+7Hrnq9UcrcbF2Td2riqbcUzwIn708kR1+ueR6uY3GZZs5kuIzDF1KeEy7K8LOtVk9IUaNODbfmSjF+oitFNd+5FNO+qqfjMrZXVRYtzVVuppj4RDx36Qdr8b0gbcZ5tnj3N1s5x1XFbsndwjKXiQ9EY7sV5oou+CwtOCw1GHp4qYiP39/GguOxVWNxNeIq46pmf293E48ZTFAAAAAAAAAAAAAAAAAAAAAAAAAB7LdHv7gdmv5Hwf9TAgmN86ue1PfK/YLzW37Md0OK9MHWD6NehXAOptXnCq5lOG9h8pwlqmLrdj3b2hF+VNpcbXehmbM2Li9rVaWKfu8tU8Ufr1Qwtqbbwmyadb9X3uSmOOf065YBdOHW06SumSVfKaeJls/s1OTSyvBVWnWjqrYiqrOrx/FsocHu3SZTtkZawmy9K5jh3PzTydUcnXx9KY7XzLi9q60RPAt/ljl655eri6HSB0LnAAAAAAAAAAAAZN9Sl2xW1t2krYFu682I5k9z5zft+FRMg847HiZu7NpRUUr8+Lv2k8URzbAK2Fh57/AGgfQAAAAAAAAAAAAAAAA2Mar4ad76di9wHDNok40nJX1Wrtf0a8uHqAwf67CisZsmle6WPTurf6OUPIfOOx4k7z9zft+FjGUJOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkB1G8uwOZ9PmCw+Y4Ghi6Ky3GS3K1JVIp7lr2aa5/Scxm6uq3syZonSdYdRk+im5tOIrjWNJemNKjhsFQVKhSpUKNNO0YRUYxXF6LREimZrnWd8q/ERRGkboYYddHrQbPY7Z/E9EHR5mlDM6mPtHOsww1RTo0acZp/F6c07TnJxW+1oo+Lq21Hv8q5eu0XYx2Kp4MR+GJ456Z6PV/wC1n+a8w2qrU4DC1cKZ/FMcUdEdPr+HVg6UVOAAAAAAAAAAAAAAAAAAAAAAAAAAAMrtvOvZtC9kMp2M6J8vqZMsJluGwuKzbGQhPEucaUYzVGn40IK6fjtyb4pRepxWDyfa8vXiMbPC1mZimOLj5Z456t3vdtjc43fIUYfAxwdIiJqnj4uSOKOvf7mLWY5jmGb46vmebY/EY3GYmbqV8RiKsqlSrN8ZSlJtt+dnZ0W6LVMUURpEcURxOMuXK7tU11zrM8czxvmPTwAAAAAAAAAAAABk11KVfF7WXs1u4Ff2gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/2sD6AAAAAAAAAAAAAAAAGzjHFYWq5vxd1p6X08/mPsa67nydNN7hu0zn8XUd17mjvra9+HYfH1g311vyzZP9HHf3coeQ+cdjxJ3n7m/b8LGUoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfwWPx2W4iOLy7G18LXimo1aNRwmr8bNanmuim5HBrjWOl6orqtzwqJ0nofs5p0hbfZ3gll2dbcbQY/CKO6qGKzOtVpqPZuyk1bV+s/C3gcLZq4du3TE+uIiPoyLmOxV6ngXLlUx6pmZ+rj5ksUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZNdSn8s2s/RwP94J7nzm/b8KiZB5x2PEze2c5fftJ4ojm2B/JYfP9rA+gAAAAAAAAAAAAAAABtYpSlhqqjPde69bXPsdL5PQ4VtNu9zirPetxvpa/YfH1g711vyzZP8ARx393KHkPnHY8Sd5+5v2/CxlKEnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABk11Kfyzaz9HA/wB4J7nzm/b8KiZB5x2PEze2c5fftJ4ojm2B/JYfP9rA+gAAAAAAAAAAAAAAABtYqEamGqxnG63W/n5H2J03w+TGu6XCtppPucY6Wtfhrx7T4+sHeut+WbJ/o47+7lDyHzjseJO8/c37fhYylCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAya6lP5ZtZ+jgf7wT3PnN+34VEyDzjseJm9s5y+/aTxRHNsD+Sw+f7WB9AAAAAAAAAAAAAAAAD58d+SVeP4vJtNff1duh9p43yricP2mj+11PdXJXs78fV+s+PrBvrrflmyf6OO/u5Q8h847HiTvP3N+34WMpQk7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMmupT+WbWfo4H+8E9z5zft+FRMg847HiZvbOcvv2k8URzbA/ksPn+1gfQAAAAAAAAAAAAAAAA2cXf4rVUW03Bq64rz8GIJcN2jVOWGctd6Nlqrc/pAwc666axmyd014uO+zDlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8vPNqdndmqcaufZzhMEpK8VVqJSku1R4v5kYmL2hhcDETibkU6+ud/ujjZmE2fisdMxhrc1aeqN0dc8T8nK+lTo9zmssPgNq8E6spKMY1XKi5N8lvpX+YwcPmHZmKq4Fu9GvTrHfEM7EZd2nhaeHcszp0aT3TLlSaklKLTT1TRueNpeIAAAAAAAAAAAAAAAAAAADJvqUp/G9rJcksCv7QT3PnN+34VEyDzjseJm3s/UjTUXNtJu17Pzk8URzjA/ksPn+1gfQAAAAAAAAAAAAAAAA28RGpKjKNJJuSa1YHC9oIVJwVo9t227fMub9AGEXXeX7a2Rldu6x/F66fF1+ooeQ+cdjxJ3n7m/b8LF4oSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4t0k7ZQ2I2VxObxcXipfsOFi7O9Rp2dnxSSb+a3M1G3NpxsrB1Xo/FO6nrn9ONuNhbLna2MpsT+GN9XVH68TFC+0+3e0MIUaGPzfNcwquNChRpzxFatU5QhBJuT/ipehciL38RdxVybt6qaqp5ZWqxh7WFtxas0xTTHJD6dtOjrpA6OsZSwW32wef7MV8ZDutChnGW1sJOcL8YqrGLa86Pxfs7Q6BOknHPNo7D5tinXwleM+99SbcpwnFX7nfjuOKbV+FrI7zKG27kXo2fenWmfw9GkcXVpHucFnDYluqzO0LMaVR+LpiZ4+vWfe7/ACkpoAAAAAAAAAAAAAAAAAADJzqTxcsVtYkld/EEvViCe585v2/ComQecdjxM28hjKO4tWnxSTX0/OTxRHNMA5woxo1IS4XjLimn9nzsD6wAAAAAAAJfWzT42QBNPVO4FAj3tWrPTRecA3w0vf6AF9bAE07pPhxAjTcHF2bas9NPUBxfPsPKVp8UpSjJcX4urd1btAw566uyuIxmyuV7S0aNSp3oxkqdZ20p0qyScm+zukIR+dfN2uSMVFrGV4eqfxxu6Zp/aZn3OJzxhZu4OjEUx+Cd/RFX7xEe9hyVBLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdLdZ2vOGRZNh0lu1cTUcu3SKt9pwee5nyNnrnuh3uQ4jy96eiO+WQXwLezuTZl0+7V59jsBTrY7KNnl8SqzV3RdWqozcextRSvxtdc2TZS2XHwwuSZTmHVPp5tjMBRq4zLdo8G8JXlHx6O/CqpqL4pSSV1wdl2IDxu6HmvwlZEr8cQ+X8V+o22wqpo2jZmn80NTt2mK9m3oq/LLMAt6GgAAAAAAAAAAAAAAAAAAzC6mOy2IweyeabSV6E4d9sZGNF2/wAZSoXSmu1d0lONvMyX53xUXcZRh6Z/BG/omr9oifeqWR8LNrB14iqPxzu6Yp/eZj3Muslw8rQXjOEHHjZtNJ8fUvn7OJxTtnM8JFRo3i7p6J9qSsn89r/OBvgAAGinJzhGTdna0kuF+YGsABJJuLUZWbWjtwAoEcU7taNq11xA03cUlbRXvz0+24GpNO6T4cQKAAjSejVwDV7atWd9APyc4w0KkKkXFN7rmknx4X9Gm8/PZAdZ7Z7L4LaXKsTlGa4ONbB4ym8NWpyjdShK6dufPlrfW97H62b1eHuU3bU6VUzrEvyvWaMRbqtXY1pqjSYYF9J/Vt202Jx1bEZBg6+e5S3vQlhoOpiKMW9I1IJJy5+PBOOjvuvxVV9lZqwmOoinETFuvp3RPVPJ1TOvXxpNtbKmLwNc1YeJuUdG+Y645euI06uJ1LicLicHVlh8Xh6tCrHjCpBxkvSmdPRXTcjhUTrDl66Krc8GuNJbR6eQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0j1oP8A1TkP/ia3+zE4PPf+jZ657od9kP8A1r3VHfLJj4E1L8M23r/7P0f68mylMtfhef3n+J1/94sv/wBmqB4w9DkN7pJyOV7bmIv6fFa/WbTYvpCz7UNXtv0de9mWX5cULAAAAAAAAAAAAAAAAG7hsLicZVjh8Jh6terLhCnByk/Qkea66bccKudIeqKKrk8GiNZdt9F3Vt2z24x1LE7Q4TEZDk8HvVamIp7mIqxT1jTpy1Tdrb0lZXulK1jmNrZrwmBomnDzFy5yacUdcx3Rv5N3G6nZGU8Xj64qxETbt8uu6qeqJ753cu/iZ2bGbL5dkOXYHKMtwtLD4LB0o0qMYrSEY2SjfW78/N9r1JRevV4i5VduzrVVOsyrFmzRh7dNq1GlNMaRDsbJsNOn3Kaptyb33Faacfm+ftt2M/J+rkUI7sVG97JK/wDzA1AAI72dnZ8gNELS1taUW0+fHW1+zh9AG4AAAAAADTKF5RknZrS/m7PoQCM7u1rXV1fi/mA1AAAG3Vpd0XHk/N9PLVIDjecZSoqbtuvWSnG61tdWSv61wb9AHDMyyOClKo8NepBtKnKO7a997TlwWi83YB+LidnI1tZ4fWbkpX5PxbSfLjJffiH5ktloKyWH3ZOVlePN8rc1r7uAG3PZTDWk6bbUXbm9Eld34cftQGl7JUl/CW62kpWlbW/Hs4fdagHsnBLW0bK7clJLzL0v9TAPZKCvpZKN25KSALZGMnFRWjtq1Li/t94EWycJRvBbzSd7KX23Ar2Spp7t05P8WylrrYAtkVa8o217JXta9wItkoys4RvFvR2l22Ar2ThGydruTS0lZ6ff1gFsje/iWt5pagR7Jwcmoq/pUr8E72v5wKtkYpKU1Za30loBFsmm2lFXXFeNdekCvZKMY70lZbt9IydvMwJ4JLelDdV4uzS3tGBfBGKV5Rf4t7KMnr2ATwTW9u2Tdr2W9wA1LZFaOUbXveyk2gNL2TirXilfhfe9X0oCrZG9/EtbzS1AS2Sir2jp51JcrvmBFsmpJOMU03xW8BqeyK4KN3fslawGnwTjdLdV3wXjagVbIp6uNtbcJX9IDwR10hxdlpK/GwGlbKKSbhFSt2bwGt7IRV1a7ukrKVmBpeyaSbcUrK7vvAWOySk14qs+dpWAeCKsrRd7XekgI9k4xV5RSS7d778mBVsjd23LaX4S9QB7IrlF8Fe6kgI9k4xV5RSS7d778mBVsjd23LaX4S9QB7IrlF8Fe6kgI9k0k24pWV3feAsdklJrxVZ87SsA8EVZWi72u9JAPBHlucXbhIDStlFJNwipW7N4DW9kIq6td3SVlKzAngj/ABPokBPBON0t1XfBeNqBVsinq421twlf0gHsj2Q05aSAj2Stxh9EgC2TUknGKab4reA1PZFcFG7v2StYCeCP8T6JAR7JxVrxSu7L8bj92gKtkb38S1vNLUA9kVd7sW1e2qkgHgj/ABPokBgl8K5lEcr2D2Ge6t6pmWK7b27nTfP0oD874E3/ACzber/s/R/rwMtfhef3n+J/nFl/+zVA8bugDbHI+j/pl2T2y2lq1KWV5VmMK+KnTpd0nGmk02o83qgPQfLfhLerzi83jgMVs7thhMDKpuPMK+EouEVr40oQrOVrJ2STfDTjYMqujvaHYbpY2cwu13R3n+FzzKcX+LXw0pb0HzjODtKE1zjKzWt7Acl8Fry3Y0JPS/O9u3iBfBSX+jT+n2gPBSX+jT+n2ga4bJJqTnBwtG+qlr9IE8E024qKvF2a8bQC+CP8T6JAPBH+J9EgHgjHccpKzXK0gJ4JptxUVeLs142gF8Ef4n0SAeCP8T6JAVbIrdvu62TtaXPl/wAgNK2Ti3uqKva9vG4Afbl2y8YTlCorRcXJOzdnbjr+rUDk2W5LGnGbkoxlzUb3aVr6vz7y5PTzaBy7L8qjRmpyUXaN47qb3eF35+DYHI8FhHh/Hl+NKKVnq49uvq9QH1gAAGipLdTlyinJ9nz/AH5AWEdyKiuC0Xo5AagAAAAAAANurayTfF2VuOumn37QNavZXVnzAoAABtYml3WnupXfov5u1doH5VTJ6uJklUgocbtu6V+xJ6WbbA+Cts9OUtYR5vxJa7rs+GnZbhx83APnxGzfi+JhIQTlGylDhK+9or+d9vNAaIbPw3k3RhaUIySUXuu/B69u8/naXJAIbPJ71Pua7o7Jvdbu2uGvmjf1+dgI7PwlLdjTjreySbT9/i+rXmwIsgp79+5xaVkkldat2XDzvX0eYBPZ2Mp7ihFyuoxitNeHzcX90BZZDSnuzUYxi/Git211yeqAkdn4dzUVTUUtHLdcnbhr5tF6XfncCLIKMHvunCVk278EtHfh5vt7WBZbOwUpRqpKSdmrW1562+kC+D8JLdhSildybSvdLVvhyu/oXYBpWz9BpNqLuteXFei4Fns+mu6OEYxXHxb2vqlw8/Ds8yAd4KMdVGLas1yaa1+1ASWzsYWcoxUUmvxddNOzV3t9IFeQUYp7sYt9vB8nbs5AHs7GNm4xUeGsezjy46ev0gO8FBwsoxvJPXg1dW7OwCS2eju77hFJcfF5vW2i7H9gFWQUEpLdjvLS/Cz52aX0gFs7F33YR5vhfS93y8/2eYCQyCimt+MHrbh6+Xo+6APZ+k5b27HS78yWj7OGn29rAPZxRk4yjBS4JNW9enoA1d4aEorcjFJO/C17cLpoDStnI7nixilFcWr6cE728328wKshoRd5QhJcOHN+hen7sCS2dpSlolJt/O+K7PP97ICvZ6F1KSglJby8W1128ACyGhbd3Ypu+qXFefS3H9TAkdnae94sU/p52XL+N9nYgHg7CLamoXXmt+oCvIaEtN2MbK9ktNfSuz2ASOzkG3GEE29FpfW3o/i/b5wC2fpLioPXs9wFeQ0ZPhFWSsktF6192BI7OQbcYQTb0Wl9bej+L9vnALZ+kuKg9ez3AV5DRk9VFaOySukvV23+0CR2dp73ixT+nnZcv432diAeDsItqahdea36gLLIaL/gQSXJa6v5vN9gEeztJu0YqV3ZW4812ef72QFez0LqUlBKS3l4trrt4AO8FLd3Ywp3el72v6dAIsgoNKUbcecbfqALZyO54sYpRXFq+nBO9vN9vMCxyCindwpy9P8AyAneCi5eNbV8bX9PL0fSA8HqSd1GLtdvhZLR9nm+3tYFezkYScZximuTVn9gCWQ0d227BJcbc/oAng9RacXu3Wj/AF2dvpAq2di77sI83wvpe75ef7PMAjs/SVnKNOXb2fYAeQUm7tR9i9XYBHs9QlHlqvRx+YDzt+GWy74j0b9HslT3VPN8ZyXHuVN8vT9gHXfwJt/wzbe/zfo/14GWvwvP7z/Ffziy/wD2aoHh7s/kecbTZ5gNndn8BiMdmWZ4iGEwuGw9Nzq1qk3uxjGK1bbfADvzpZ6gfWj6F9gqfSZtx0erDZRCEKmNeDxlLE1MBvJNOtCm3uK7s2rxT4tAcD6CusV0odXfNc0znozzmhhK2bYKWDxVLE0FWoyWu5U3HpKpCUm4tp2u07ptAfs1uuZ1pq+ZyzmfTftR3dtXUcVajfjbuSXc7acN22nCwGbHUs+EnzHbDanL+inrAfEPjGa1aeGyzaGjRhh4zrtWjTxME9xOUtFOCSvJXiuIHpjLIaS1tSilJR4N8b25cfxvo7EBVs/SavuxXq9gDwfpdkPo9gFWQUbreUWly+6ALZ6m34lNPe8VRjG+qXC7XYk/6XnAng/S7IfR7AHg/S7IfR7AKsgpXvKMJen/AJATwdhxjBO6eijfglfW36Ovp7WA8H6XZD6PYBVs/STut1NffsA3KeT7jj+yWUWmrPhx5fOB+tgsos9+U5PegnJtr8a6a7eCf/ID9WjhaVBWUU3zk+LA3gAAABtpuorxdotKz7U/pQGtJJJJWS4ICgAAAAAAAaZw3ra8NUnwvyYByau3HRc/YgLdXtfV8gKAAAAJZXvbVcwJKEZXUldPinqvUBVFK1layskuAEUIq9la7u7aXYBwg5Kbit5cHbUA4RlFxkt5Pk9QEYwS3Yx3VF8ErL76gSVOlvd0lCG9deM0r35Aat1NNNXUuKeoGmNKlB3hTjF9qVgK6cJRUZxUkvK1+0CRpU4pqEFG/HdVvsAs6dOdt+EZW4XVwJGlTimoQUb8d1W+wCzp05234RlbhdXAkaVKDvCnGL7UrAV04SiozipJeVr9oGnuNCLUlRgmmrWiBr3U001dS4p6gaPi9D8zT/ooDVGMEkoJJRbso6ICSo0pPelSg2+bigEaNKL3o0oJrmooCuEZRcZLeT5PUDT8Xofmaf8ARQGqNOEVuwioq9/F0AkqVKbvOnGT7WrgT4vQ/M0/6KA1qKVrK1lZJcANDo0JSd6MG+LbiA+L0PzNP+igNdtbgaHQw6snRp68PFQD4vQ/M0/6KA121uBo+L0PzNP+igHxeh+Zp/0UBrUUrWVrKyS4AaHQottujBt8XuoB8Xofmaf9FAao04RW7CKir38XQCSp0qj3p04yfDxogT4vQ/M0/wCigLGjSi96NKCa5qKArhGUXGS3k+T1A0qhh3dKjT04+KgHxeh+Zp/0UBqUIxSUVupcEtEBJUaUnvSpQbfNxQE+L0PzNP8AooAqFFNNUYJrg91Aa91NNNXUuKeoGj4vQ/M0/wCigCoYdpNUIa/xEBY0qUHeFOMX2pWA2sbicBgcHUxmZYihQwuHjv1KuImowhFcZSlLRLzsDojOOvT1PMizSpk+YdOeyaxVKbpzVKv3WMZLk5wTitdOIHcOyO12xe32SYfaPYvPcqzrLMVFTpYrA16danNeaUW0B53/AA3FOnDo16NtyEY3zjHXsrf9FSA6h+BNv+Gbb3+b9H+vAy1+F5/ef4r+cWX/AOzVA8vvg5oQqddbosU1FpZnXklJX1WErtfOnr8wHuN1pqFPE9W3pPo1aMasJbKZnvQlHeTXxeb1QH82GX4WpjcfhsHScVOvWhSjvcLykkr6PTXsYHt9lnwSPVb/AAVQ2WxmW5rX2lqYFp7Rd8KsasMY46VY079z3FLhBxaavze8B4qbU5Didjds822YljFLE5HmdfAPEQbinUo1XBzT4rWN0wMmMR8KH1yFh8Ll+C6RMNgqGCw9LDRjSyyjvT7nFR35ympSc5WvLW13wAyN6rfwum0GI2iwOyfWWy3AVsux1eOHhtLgKTpTwk5KyliaPjRlC7fjQS3Ul4rs2g9XcvqZZmOCoZjl1ShicLiqca1CtTanCcJRTjKL5pqzv5wPo+L0PzNP+igNcYxit2MUkuSQGiVKjOTcqUW+bcf1gT4vh42Xcaer0ukBfi9D8zT/AKKA1RhCCtCKiuxKwElSpTd504yfa1cCLD4df9DD+igHxeh+Zp/0UBqhTpwvuQjG/GysBqAAAAG3Z7705pq+qXn/AFAbgEur2vq+QFAAAIrNuSd+XHsAoAAAAAAAACWV721XMCgRq/OwB30s/SAd+SAJWAJ3SbVvMATvfzAG0rJvjwAoAAAAjSdm1w4AUAAAiXHW9/oAO/JgErJJcgGt+GgFAl9bW+cCgRO9/MBQJ4sk4uz5NAUAAAARq6aTt5wKBErJJcgCvZXd3zAoE1vw0AoEbsm0r+YCgRJK7S48QF9bAUABE00mndPgwKBGuGtrfSASsBQJrfjoBQAE1vw0ANJ6NXAoEvra3zgUDyV+GH6zm08NrsF1btmMyrYLKcPgqOZZ53GdvjdSpd0qUmn+LGKu4u920+QHnVlXRZ0kZ3sziNtMn2GzrHZFhLqtmFDBznQh6ZRVtL/Q+xgc06vHWe6VOrRtpR2q6Os9qLD1aqnmOVV5ftTHwvrGpDhF2taUdVZa20Ay4+ET60mwXWq6uPRhtrsfP4rjMPnONo5pldWadbA1+40rxklxi+MZcGrAb/wJv+Wbb1f9n6P9eBnn8Il0LbY9O3VizrY7YHBvG53hcZh80w2Cj+Pi+5b29Shf+E1NtegDzq+Dj6ofT5lvWl2a292u6Oc42cyLZGWJxmMxWZ4V0VOboVKcKVNSacpOU1qrpJO/ID1e60Kb6uHSbZf+6mZ/2eYH83Gzn7ocr/8AG0P9tAf1IYKSlhaf42kVx56cfQB/Mp00X/DVt3ZpPwpzTVuyX7bqcwPQ7qf/AAVXRl0v9A+S9KPSttPn1LMtrMNPF4PDZXWp04YLDOUo0m3KD36rUVJ3W6t61m9QMDus50JYnq6dNu03RBWzbvnSyWtD4vi3FRdWjUhGpCTXKW7JJ8NU+QHs58Fhthmu2PUx2RhnOIqV6uQ4vHZPRqSlq6FKvJ0o6cownGCXZBAZcgANFSTi4JO15WfaBqSsBQAEaT0auBQAAAAAAAAAABLa3uwHjW5N39GgC+trfOAsr3tquYC1kkm9PnuA8a3Ju/o0AX0V01fl2AE07pPhxAoAAAAAAAAAAAAAAEsr3tquYC2twDXDW1vpAO+ln6QDvyQC+trfOAbtbzgG0tW7AUAAAAAAAAAAARpOza4cAKBErAGr87AUCK+t36ADvZ2V3yAoETvysAbsBQJdXtfVcgKAAAAAACNJppq6fFAUCNXTT5gUABErJJu/nAoEV7K7u+YFAivzQBuybSv5gKB4f/DBbCYzZzrRx2tdKSwO0+UYatSm27d1oxVOpFf0Yv8A1gMsfgb9v8k2o6As96MMVTozxezuaV6lXD1Ypqth8Ruy3t21mt68Xf6bgdM/Cb/B+5XsJg8X1hehbJ3h8ndVPaHJ8PTXc8G5f5zTX8GDdlKPJyVuIHmcpyUHHedr33eK4cfSB6N/Amu/TLt7aTivB+h4i4P9n4vz+1gexTV7eYCgfFneTZbtHkuYbPZxho4nAZphauDxVGXCpRqQcJxfmcZNfOBhRsT8Ef1cdiulPC9IMc52kzTB4DGxx+DyPGVaUsPTnGalFTnu79SCaWj111fADOKK3YqPZotb6elgfzm9YzoG6WdnOsbtvspitg86xGMxe0uNq4P4vgqk44ulXryqUp0pbtpKUJxd1e19QPdzqo7C5/0ZdW/o62C2poRoZtkuz+Fw+MpJ37nV3FKUL87OTXzAeL3wo379Tbj/ALvAf2WmB6QfBBXfU9wzaSb2jzHnrwpJX+b6LelhmyAA26qbimlqne64r2+y4GtNNJp3T4MCgAAAAAAAAAAAAAAAAAAAAAAI0mmmrp8UAtxs2ru4Bb2u9bjpbsAm8rXl4tld35AagAAAAAAAAAAAAAAAAAAAARpNNNXT4oA1e3mAW1vf5gHja8Hrpy0AN2TaV/MAbtbzgLq9r6vkBQAAAAAAAAAAAAAAAAABEkkklZLggCVgFtb3+YBrfjoA1vw0AN2TaV/MBQIndJrmATTuk+HECgAAAAAAAAMIPhZugqp0pdXZ7c5PglVzjYTErMFuxvUqYSfiVYJ2bst5TtpfdQHmd8Ht1gaXV+6x2R5vnGKrU9n8+fejNFCWkY1WlCo1z3ZW7NGwPf8AzPLMj2tyHFZPm+Dw2ZZTm2FlQxOHqpTpV6FSFpRkuDTjL6QP56Ou/wBWzHdWTp1zjZCkt/IMxnLMcjrXu5YSbdoS0spRd4210SfmQZO/AouUumfbpxa12fpOd76Lu9oxXn+iy43A9inxWr48kBQAGinpdNJNvetftA1Li1d9vADTKjRnUhWnShKpTvuScU3G/Gz5XA1geAnwof79Pbn9DA82/wDNqfaB6R/BB73+B1g22t17RZlursV6d/pv99EGbAACO9nZ2fIDRTtFula1tY35rzejh6gNwAAAAAAAAAAAAAAAAAAAAAAAAAAI1dNPmBN3xt5Pjo9PT7QG81+NG3DhrqBU09U7gUAAAAAAAAAAAAAAAAAAAAAAAAARRSbklq+ICztpLnzQDW/DQAnx0tb6QG8rKTdk7cdAKAAAAAAAAAAAAAAAAAAAAAAAjim02tVzAoESskm7+cAr2V3d8wCvzQBPjpa30gL62AXV7X1fID4s8ybLtosmx2QZvho4jBZjh6mFxFKSTU6c4uMlr5mB/OR1seg3OOrx06bRbB46h3PDUsXPFZbUUWozws5OVK1+LUXG4HsH8GV1lodPHQLg8gzzMe7bU7GRhlmPhLWdSjFfsNbhqnGyfJNWAx7+G52VzDE5T0b7X4fK9/C4SpjcHiMXGDbg5dzlGEmvxU9Wr2u78bAcH+BJyjMqnSV0iZ9DBVXgKGUYTCzxG74iqzqyahe1r2i3a/C3agPX4AAA0JS3lvK9lx7H939+Yala7tfjrcCgAP53/hCtocPtP1y+lHM8JUhUpU82hgoyjzeHoUqMr+fepsD1Z+CYy14DqX7PYpRtDMc3zXE03e90sTKlf10n7uCDMcABt1fxqS7Z/qYG4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASyve2q5gLaOzavz7AJvWbu7LRaq2v3sBqAivZXVnzAoEvra3zgUAAAAAAAAAAAAAAAAAAAAAAAAlle9tVzANXt5gDXDW1vpAa346AN5Wcm7JXvfQBrfhoBQAETuk2reYCgAAAAAAAAAAAAAAAAAAAAARpOza4cAMD/hYOrDU6WuiOl0rbJ5Q8RtLsWpVMQqME6mIy+zc1prLc4pekDzU6h3WRn1Z+n3LNo82xk6GzWcLvXn0dbRoSfi1WrXvCWt+ScgPfvN8i2K6Udk4YLP8py3aDIc1owrxpYinGtRqwlG8ZK/mejWuoGjYno42D6N8qlkmwWyeW5DgpzdSdLA0FSU5PnJrVv0sDkgGlXUnGUk76rtArduVwCik20rXAoEbsm3yA+XN80wWR5Tjc7zKsqWEy/D1MViKj/gU6cXKT+ZJgfzDdJe089tekXafbGrJynnmb4vMZt8XKrWlNv1yA/oK6iew9Xo+6o3Rhs5iMJLB4pZJDHYmk0lJVcTOeImn571Xfz3A76AARuzWj9KAkVFNqL0VlbkvZyArvyYFAjvZ2V3yAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ1JXklvNcOT466/fgBqjJSV0/cBQAEtrcCgAAAAAAAAAAAAAAAAAAAAAAAAAAAARpNNNXT4oAk1bxr2Wt1qwJvNfjR7XpqBbq9r6rkBQIlYCgAAAAAAAAAAAAAAAAAAAA2cZhMNj8JXwGNoQrYfE05UatOavGcJK0otdjTaA/n7+EE6sGP6tvTnmNHA4KpHZXaWpUzHJa1vEjCUvHo38qMr8lo1xAzu+CU62lLbbYqfV+26z+M8/2ejKpkksTUXdMVgEl+xptpydN3VrN7ttdAPRwABpkrq64rVAIyu2nxT7Laff7ANQAABj/wBfTpFh0X9UrpFz9VJwr4vKZ5Nh3Fre7pi/2unrxsqkn81/OB/P30b7KYvb3pB2d2NwmGqYqvnma4XARpw3t6bq1ow5Jv8AhAf085TluHyfKsHlGEio0MDh6eGpJKyUIRUUrctEgPrAAbcW3VlroklZ/avvy8wG4AAAAIkkkkrJcEBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEaTs2uHADTFSjZPxr8X7gNUZKS3ou6YFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpcU4OC8VWsraW9AF8aztZ9i4AE+OlrfSAjJSW9F6AUAAAAAAAAAAAAAAAAAAAOgeuv1YMq60/Qtj9jXuUM/y6XfHI8W1rTxUIv8AY2/Jmm4v0p8gPAvLcx6Rerz0s0swwscVkW1uxuZtqNanKEqdanKzjKLs3GSumucZPtA9/Op91ptkutV0V4Xa/J6tHDZ3gYww+eZUqu9UwWItzvq4Ss3GVldehgd7AANEotu8dHwf6vT6POwNSaaTTunwYBPjpa30gUDzd+Gt6S5ZL0V7DdF2ExTjV2kzavmeJhHnQwlOMUpeZzxCa88AMNvgrejSPSD1vtncwxdCrPBbJYTFZ7VcYXj3SEVTpKT4Jd0rRf8Aq2A96wAADbp+Om34yk96LfZyA3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACJJXaXHiBpjvRspXbk3qtUvv9+QGpNPVO4FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjSdm1w4AGrgRKS0bvx1+fRAVPWzTXEAmndJ8OIFAAAAAAAAAAAAAAAAefPwoPUbh0v7OVunjo0wShtfs/hpTzfB04aZpgoRbc0lr3amlx/hRuuKTA8t+rJ1jdu+rB0pYDpB2MrznTVSFDNstlJ9yzHB76dShNcna+7LjGVnw3osP6HuiTpQ2W6aejvIek/YzFqvk+fYSOKoKS8elJ6Spz7JRd4tcboDmAACJWvq3d315ARaybfFaLT0AV35IDxO+GV2uxWddZ7K9l3Ubwuz2zWGhCO7bdqVqlSpPXzp0/o8wHcfwIOxtBYbpO6QZqcqzngcnptrxYRtOrNJ9re5f9GIHqeAAkrqL3eNtANKs1Bz/GWiv28/1gawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0yhvJ68Vaz1T+YA52fjKys22+VgNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaVFR4fP5/SAbko8N6XqAt9bAE00mndPgwKAAAAAAAAAAANM4QqQlTqQUoSTjKMldNPimgPCr4Uvqz5d0EdOVPazZbDLD7ObeqtmGGw8IJU8LiYOPd6UbKyi5SUknr4z5LQO/vgV+mjHfGNs+g3NMQ5YGlQhn+XOrV0oy3+514RvwUt6nLdXNSemtw9U/juDtf43Rtpr3RcwJ8dwf+l0f/ALiAksXgZRcZYui01Z/si9oCOOwk3piqStrbfXZ9+AGt4nDJpPEU7vgt9agfz4fCObQ4jaLrm9JNWriJVaOCzClgcPrdRhSw9OLS828pAel/wPWzeDynqo1c8oUYxrZ5tFjatWcYpb/ctyjG9uOkPPx48kGcoADbrWcHFrSV4u3G1uXaBrV9bv0AUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEaTTTV0+KAjUknuPWzsnwuAlJRaT58+SA1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAm6tdLXd3bQBbW9/mAR3reNb0rmBN5Levoo63fCwGoAAAAAAAAB51fDVbI5tm3QjsZtbgMtqV8LkOe1aWNrwjvfF4YiklFy7IudKKvwu4rmgPHTBY3F4GpOrgsTXoVZRcd6jUcHu8Xqnw0WgH1LaLaF2tn+YXbtb41NfrAstos/co2z3Mop83iqmvK/H28wC2jz+y389zG2uqxc73tpz4X/AFgSO0W0V1J57mG6mk28VUt89mAe0W0G6nHPsy0/Gvi58deGvYB8NarUrVXWxU51KspN1HKTc5O+rbfP2Ae/vwZWyeb7H9TTYbA5zg6+GrY143MYwrx3Z9zrYmc4Pd5Jxaa7VZ8wMpwAG3VtaN3rvK1uN/N9+FwNavzQFAAAAAAAAAAAAAAAAAAAAAAiad0nw4gLa3v8wFAAAAACK/NAUAAAAAAACN2Tb5AUAAAjSaaaunxQBKwFAAAJrfjoBQAAAAAAAIndJtW8wFAAAAAAAAAAJonrLjokBQAAAAAjvpZekCgAAAAAAAAAETuk1zAoE3Vrpa7u7aAUAAAAR35MCgAPkzXKcqz3LsRk+d5bhcwwGLpuliMLiqMatGtB8YzhJOMk+xoDrV9U/qsyblLq1dFbb1bexuXf8EA+qf1WZNyl1auitt6tvY3Lv+CA/wAE7qsf9Wnoq/8AJuXf8EB/gndVj/q09FX/AJNy7/ggR9U/qspNrq0dFT83gbl3/BAv+Cd1WP8Aq09FX/k3Lv8Agga8P1VurBhK9PFYXq4dF1GtRmqlOpT2Py6MoSTupJqjdNPVNAdoU6dOlTjSpQjCEEoxjFWSS4JLkBqAARpOza4cAKAAAS2t7/MBQImnqncCgAAACK+t16AKAAAAAAAAAltb3+YCgAAACN2TaV/MBQAAAAAAAAEtrcCgAAEV7K6s+YFAAAAAAAAARtLVuwBpPRq4FAjvpZ+kCgAAAAAAARu1vOBQAAABGr87AUAAAAAAETuk2reYCgAAAAAAltbgUAAAjvZ2V3yAoAAAAAAAAABLK97armAur2vq+QFAivrd+gCgAAAAAAAAIncCgAAEStzuBQAAAAAARPjpa30gUAAAAAAAAAAAS6va+r5AUCW1uBQAAABE7gUAAAASyve2r5gUCJ8dLW+kCgAAAAAAjvZ2V3yAoAAAAAAAACK9ld3fMCgAAAAAAARrhra30gUAAAAAAAABHZvdvqrPRgUAAAAAI3YCgAAEsr3tq+YFAARvhpe/0AUAAAAAAACK9ldWfMCgAAAAAAjvZ2dnyAoAAAAAAAACJcdb3+gCgAAAAAAAAIlYBZXvbV8wKAAAAAAAAAAAAAAAAAAAAABLq9r6rkBQI3YCgAI3w0vf6AKAAARXsrqz5gUABHezs7PkBQAAABEuOt7/AEAUAAAARKwFAAAAEsr3tquYFAAAAAAAAAAAAAAAAAAAAAAAAJdXtfVcgKBL62AoACJ35WAoACK+t16AKAAjvZ2dnyAoAAAAiVkk3fzgUAAAjV7eYCgAAACNJ6NXAoAAAAAAAAAAAAAAAAAAAAAACO9nZ2fICLeVrq7fHsWgF0iufH08QFle9tVzAXV7X1XICgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEd7Ozs+QESem8724O/HTmBdJLxo8+YC+tgKBLq9r6rkBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEsr3tquYFAARKwFAARLjre/0AUABHezs7PkBQAAABFeyurPmBQAACN8NL3+gCgAAACN2AoAAAAAS6va+q5AUAAAAAAAAAAAAAAAAAAAAAAAAjSejVwKAAjV7eYCgAAESskm7+cCgAI72dnZ8gKAAAAIr63XoAoAAAAid+VgKAAAAJfWwFAAAAACPdT3nZXsr/AGAUAAAAAI1cCgAAAAAAjXDW1vpAoAAAAAAAEV7K7u+YFAAAAAABHezsrvkBQAAAAAAAAET46Wt9IFAAAAAAAAARO4FAAAAAABLK97armBQJdXtfV8gKAAAAIlYCgAAAAAAiXHW9/oAoAAAAAAI72dnZ8gKAAAAAAAAAivZXVnzAoAAAAAAAEb4aXv8AQBQAAAAAARXsrqz5gUAAAAAAAAAAARuybSv5gFle9tXzAoAAAAAAAAABLa3AoETvfzAUAAAAAAAABErc7gUAAAiaeqdwKAAAAAACK+t36AKAAAAAAAAAAAI72dld8gKAAAAAAAAAAAAEsr3tq+YBO6Tat5gKAAAAAAAAAjVwKAAjdrecCgAAAAAAARrhra30gUAAAARtLVuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function IU(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 LU(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:wI(n,r),{props:s,internalRef:c}=DI({...a,externalSlotProps:o}),l=ZN(c,o?.ref,e.additionalProps?.ref);return CI(t,{...s,ref:l},r)}var RU=w.createContext({});function zU(e){return Vr(`MuiList`,e)}Hr(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var BU=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return y({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},zU,t)},VU=I(`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}}]}),HU=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=w.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=BU(d);return(0,P.jsx)(RU.Provider,{value:u,children:(0,P.jsxs)(VU,{as:a,className:v(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),UU=QF;function WU(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function GU(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function KU(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 qU(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`)||!KU(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var JU=w.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=w.useRef(null),p=w.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});GN(()=>{r&&f.current.focus()},[r]),w.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${UU(UN(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=dI(VN(t));if(n===`ArrowDown`)e.preventDefault(),qU(t,r,c,s,WU);else if(n===`ArrowUp`)e.preventDefault(),qU(t,r,c,s,GU);else if(n===`Home`)e.preventDefault(),qU(t,null,c,s,WU);else if(n===`End`)e.preventDefault(),qU(t,null,c,s,GU);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&&KU(r,i);i.previousKeyMatched&&(c||qU(t,r,!1,s,WU,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=QN(f,t),g=-1;w.Children.forEach(a,(e,t)=>{if(!w.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 _=w.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),w.cloneElement(e,t)}return e});return(0,P.jsx)(HU,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function YU(e){return Vr(`MuiMenu`,e)}Hr(`MuiMenu`,[`root`,`paper`,`list`]);var XU={vertical:`top`,horizontal:`right`},ZU={vertical:`top`,horizontal:`left`},QU=e=>{let{classes:t}=e;return y({root:[`root`],paper:[`paper`],list:[`list`]},YU,t)},$U=I(iL,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),eW=I(rL,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),tW=I(JU,{name:`MuiMenu`,slot:`List`})({outline:0}),nW=w.forwardRef(function(e,t){let n=ko({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:_={},...y}=n,b=Oi(),x={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},S=QU(x),C=r&&!o&&l,T=w.useRef(null),E=(e,t)=>{T.current&&T.current.adjustStyleForScrollbar(e,{direction:b?`rtl`:`ltr`}),p&&p(e,t)},ee=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},D=-1;w.Children.map(i,(e,t)=>{w.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||D===-1)&&(D=t))});let O={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},te=LU({elementType:g.root,externalSlotProps:_.root,ownerState:x,className:[S.root,a]}),[k,A]=OI(`paper`,{className:S.paper,elementType:eW,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[j,M]=OI(`list`,{className:v(S.list,s.className),elementType:tW,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{ee(t),e.onKeyDown?.(t)}}),ownerState:x}),ne=typeof O.slotProps.transition==`function`?O.slotProps.transition(x):O.slotProps.transition;return(0,P.jsx)($U,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:b?`right`:`left`},transformOrigin:b?XU:ZU,slots:{root:g.root,paper:k,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:te,paper:A,backdrop:typeof _.backdrop==`function`?_.backdrop(x):_.backdrop,transition:{...ne,onEntering:(...e)=>{E(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:x,...y,classes:d,children:(0,P.jsx)(j,{actions:T,autoFocus:r&&(D===-1||o),autoFocusItem:C,variant:h,...M,children:i})})}),rW=({slotProps:e,...t})=>(0,P.jsx)(nW,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}}),iW=s({Collapsible:()=>wH,EnableAudioAutoplayImage:()=>FU,Feedback:()=>SR,HtmlAndMath:()=>YH,InlineMenu:()=>rW,InputContainer:()=>vU,PreviewLayout:()=>JH,PreviewPrompt:()=>DU,Purpose:()=>kU,Readable:()=>OU,UiLayout:()=>KH,color:()=>sL,createUniqueId:()=>vH,hasMedia:()=>PU,hasText:()=>MU,indicators:()=>CR,transformDataHeadings:()=>IU,useUniqueId:()=>yH,withUndoReset:()=>UH}),aW=`pie-toolbar`,oW=`var(--editable-html-toolbar-bg, ${hR()})`,sW=IN((0,P.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),{translator:cW}=_H,lW=I(vF)({verticalAlign:`top`,width:`28px`,height:`28px`,color:`var(--editable-html-toolbar-check, ${_L()})`,padding:`4px`}),uW=({onClick:e,doneButtonRef:t,language:n})=>(0,P.jsx)(lW,{"aria-label":cW.t(`editableHtml.buttons.done`,{lng:n}),buttonRef:t,onClick:e,children:(0,P.jsx)(sW,{})});uW.propTypes={onClick:m.func,doneButtonRef:m.func,language:m.string};var dW=uW,fW=I(`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:oW,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`}})),pW=I(vF)({width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`}),mW=I(`div`)({display:`flex`});function hW(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,P.jsxs)(fW,{className:aW,showDone:c,toolbarAlignment:r.alignment,isFocused:r.alwaysVisible||a,autoWidth:i,isHidden:r.isHidden===!0,style:{...d,...u},children:[t,(0,P.jsxs)(mW,{children:[n&&(0,P.jsx)(pW,{"aria-label":`Delete`,onMouseDown:e=>s?.(e),children:(0,P.jsx)(yF,{})}),c&&(0,P.jsx)(dW,{doneButtonRef:o,onClick:l})]})]})}var gW=`toolbarOpenedChanged`,_W=(e,t)=>{let n=!!t;e._toolbarOpened!==n&&(e._toolbarOpened=n,e?.view&&e?.state?.tr&&e.view.dispatch(e.state.tr.setMeta(gW,!0)))},vW=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,w.useState)(!1),p=c([n,u],t,()=>{}),m=(0,w.useRef)(null),h;if(l){let e=l(),t=parseInt(o.index,10);h=!!e?.[t]?.[0]}return(0,w.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&f(a):f(a)},[t,n,a]),(0,w.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,P.jsxs)(ww,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline-flex`,minHeight:`55px`,position:`relative`,cursor:`pointer`},children:[(0,P.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> </div>`}}),d&&(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(`div`,{ref:m,className:`absolute z-50 bg-white shadow-lg rounded p-2`,style:{zIndex:1},children:(0,P.jsx)(p,{})}),t._tiptapContainerEl&&rw.createPortal((0,P.jsx)(hW,{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),_W(t,!1),t.view.dispatch(e),f(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};vW.propTypes={attributes:m.object,error:m.any,value:m.string,isFocused:m.bool};var yW=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function bW(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function xW(e){return`nodeType`in e}function SW(e){return e?bW(e)?e:xW(e)?e.ownerDocument?.defaultView??window:window:window}function CW(e){let{Document:t}=SW(e);return e instanceof t}function wW(e){return!bW(e)&&e instanceof SW(e).HTMLElement}function TW(e){return e instanceof SW(e).SVGElement}function EW(e){return e?bW(e)?e.document:xW(e)?CW(e)?e:wW(e)||TW(e)?e.ownerDocument:document:document:document}var DW=yW?w.useLayoutEffect:w.useEffect;function OW(e){let t=(0,w.useRef)(e);return DW(()=>{t.current=e}),(0,w.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 kW(e,t){t===void 0&&(t=[e]);let n=(0,w.useRef)(e);return DW(()=>{n.current!==e&&(n.current=e)},t),n}function AW(e){let t=OW(e),n=(0,w.useRef)(null);return[n,(0,w.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var jW={};function MW(e,t){return(0,w.useMemo)(()=>{if(t)return t;let n=jW[e]==null?0:jW[e]+1;return jW[e]=n,e+`-`+n},[e,t])}function NW(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 PW=NW(1),FW=NW(-1);function IW(e){return`clientX`in e&&`clientY`in e}function LW(e){if(!e)return!1;let{KeyboardEvent:t}=SW(e.target);return t&&e instanceof t}function RW(e){if(!e)return!1;let{TouchEvent:t}=SW(e.target);return t&&e instanceof t}function zW(e){if(RW(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 IW(e)?{x:e.clientX,y:e.clientY}:null}var BW;(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`})(BW||={});function VW(){}var HW=Object.freeze({x:0,y:0});function UW(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 WW(e,t,n){let r=UW(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 GW={ignoreTransform:!1};function KW(e,t){t===void 0&&(t=GW);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=SW(e).getComputedStyle(e);t&&(n=WW(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 qW(e,t){return t===void 0&&(t=SW(e).getComputedStyle(e)),t.position===`fixed`}function JW(e,t){t===void 0&&(t=SW(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)})}function YW(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(CW(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!wW(i)||TW(i)||n.includes(i))return n;let a=SW(e).getComputedStyle(i);return i!==e&&JW(i,a)&&n.push(i),qW(i,a)?n:r(i.parentNode)}return e?r(e):n}function XW(e){let[t]=YW(e,1);return t??null}var ZW;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(ZW||={});function QW(e){return!yW||!e?!1:e===document.scrollingElement}function $W(e){let t={x:0,y:0},n=QW(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 eG(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 tG(e,t){if(t===void 0&&(t=KW),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);XW(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var nG=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 rG(e){let{EventTarget:t}=SW(e);return e instanceof t?e:EW(e)}function iG(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}var aG;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(aG||={});function oG(e){e.preventDefault()}function sG(e){e.stopPropagation()}var cG;(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`})(cG||={});var lG={start:[cG.Space,cG.Enter],cancel:[cG.Esc],end:[cG.Space,cG.Enter,cG.Tab]},uG=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case cG.Right:return{...n,x:n.x+25};case cG.Left:return{...n,x:n.x-25};case cG.Down:return{...n,y:n.y+25};case cG.Up:return{...n,y:n.y-25}}},dG=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 nG(EW(t)),this.windowListeners=new nG(SW(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(aG.Resize,this.handleCancel),this.windowListeners.add(aG.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(aG.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&tG(n),t(HW)}handleKeyDown(e){if(LW(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=lG,coordinateGetter:a=uG,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}:HW;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=FW(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}=$W(n),p=eG(n),m={x:Math.min(i===cG.Right?p.right-p.width/2:p.right,Math.max(i===cG.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===cG.Down?p.bottom-p.height/2:p.bottom,Math.max(i===cG.Down?p.top:p.top+p.height/2,u.y))},h=i===cG.Right&&!s||i===cG.Left&&!c,g=i===cG.Down&&!l||i===cG.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===cG.Right&&e<=d.x||i===cG.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===cG.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===cG.Down&&e<=d.y||i===cG.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===cG.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,PW(FW(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()}};dG.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=lG,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 fG(e){return!!(e&&`distance`in e)}function pG(e){return!!(e&&`delay`in e)}var mG=class{constructor(e,t,n){n===void 0&&(n=rG(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=EW(i),this.documentListeners=new nG(this.document),this.listeners=new nG(n),this.windowListeners=new nG(SW(i)),this.initialCoordinates=zW(r)??HW,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(aG.Resize,this.handleCancel),this.windowListeners.add(aG.DragStart,oG),this.windowListeners.add(aG.VisibilityChange,this.handleCancel),this.windowListeners.add(aG.ContextMenu,oG),this.documentListeners.add(aG.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(pG(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(fG(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(aG.Click,sG,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(aG.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=zW(e)??HW,s=FW(n,o);if(!t&&a){if(fG(a)){if(a.tolerance!=null&&iG(s,a.tolerance))return this.handleCancel();if(iG(s,a.distance))return this.handleStart()}if(pG(a)&&iG(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===cG.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},hG={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},gG=class extends mG{constructor(e){let{event:t}=e,n=EW(t.target);super(e,hG,n)}};gG.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 _G={move:{name:`mousemove`},end:{name:`mouseup`}},vG;(function(e){e[e.RightClick=2]=`RightClick`})(vG||={});var yG=class extends mG{constructor(e){super(e,_G,EW(e.event.target))}};yG.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===vG.RightClick?!1:(r?.({event:n}),!0)}}];var bG={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},xG=class extends mG{constructor(e){super(e,bG)}static setup(){return window.addEventListener(bG.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(bG.move.name,e)};function e(){}}};xG.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 SG;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(SG||={});var CG;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(CG||={}),ZW.Backward,ZW.Forward,ZW.Backward,ZW.Forward;var wG;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(wG||={});var TG;(function(e){e.Optimized=`optimized`})(TG||={});function EG(e){let{callback:t,disabled:n}=e,r=OW(t),i=(0,w.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,w.useEffect)(()=>()=>i?.disconnect(),[i]),i}function DG(e,t){return(0,w.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}wG.WhileDragging,TG.Optimized;var OG={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:VW,draggableNodes:new Map,over:null,measureDroppableContainers:VW},kG=(0,w.createContext)(OG),AG=(0,w.createContext)({...HW,scaleX:1,scaleY:1}),jG;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(jG||={});var MG=(0,w.createContext)(null),NG=`button`,PG=`Draggable`;function FG(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=MW(PG),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,w.useContext)(kG),{role:p=NG,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,w.useContext)(g?AG:MG),[v,y]=AW(),[b,x]=AW(),S=DG(o,t),C=kW(n);return DW(()=>(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,w.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===NG?!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 IG=`Droppable`,LG={timeout:25};function RG(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=MW(IG),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,w.useContext)(kG),u=(0,w.useRef)({disabled:n}),d=(0,w.useRef)(!1),f=(0,w.useRef)(null),p=(0,w.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...LG,...i},_=kW(h??r),v=EG({callback:(0,w.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]=AW((0,w.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=kW(t);return(0,w.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,w.useEffect)(()=>(s({type:BW.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:BW.UnregisterDroppable,key:a,id:r})),[r]),(0,w.useEffect)(()=>{n!==u.current.disabled&&(s({type:BW.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 zG=IN((0,P.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),BG=IN((0,P.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`),VG=e=>{switch(e){case`down`:return 90;case`up`:return-90;case`left`:return 180;default:return 0}},HG=e=>{let{direction:t,style:n}=e;return(0,P.jsx)(zG,{style:{transform:`rotate(${VG(t)}deg)`,...n}})};HG.propTypes={direction:m.string,style:m.object};var UG=({style:e})=>(0,P.jsxs)(`span`,{style:e,children:[(0,P.jsx)(BG,{style:{margin:`0 -16px`}}),(0,P.jsx)(BG,{})]});UG.propTypes={style:m.object},I(`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 WG=I(`span`)(({theme:e})=>({border:`solid 0px ${e.palette.primary.main}`,"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:`120% !important`},"& mjx-frac":{fontSize:`120% !important`}}));function GG({n:e,children:t,isDragging:n,isOver:r,dragItem:i,value:a,selected:o}){let[s,c]=(0,w.useState)(null),l=(0,w.useRef)(null),u=e=>{l.current&&(l.current.contains(e.target)?l.current.classList.add(`selected`):l.current.classList.remove(`selected`))};(0,w.useEffect)(()=>(document.addEventListener(`click`,u),()=>{document.removeEventListener(`click`,u)}),[]),(0,w.useEffect)(()=>{l.current&&typeof dV==`function`&&dV(l.current)},[a?.value,r,i?.value?.value]),(0,w.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 ${TL()}`:m?`1px solid ${G.BORDER_DARK}`:`1px solid ${G.BORDER_LIGHT}`;return(0,P.jsxs)(`div`,{ref:l,className:o?`selected`:void 0,style:{display:`inline-flex`,minWidth:`178px`,minHeight:`36px`,background:m?`${G.BORDER_LIGHT}`:`${G.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,P.jsx)(UG,{style:{position:`absolute`,top:`6px`,left:`15px`,color:`#9B9B9B`},contentEditable:!1}),(0,P.jsx)(`span`,{dangerouslySetInnerHTML:{__html:f}}),t]})}GG.propTypes={n:m.object,children:m.node,isDragging:m.bool,isOver:m.bool,dragItem:m.object,value:m.object,selected:m.bool};function KG({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}=FG({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}=RG({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)},y=(0,P.jsx)(GG,{n:i,isDragging:p,isOver:h,dragItem:g?.data?.current,value:e,selected:l,children:r}),b=e?(0,P.jsx)(`span`,{ref:_,...u,...d,children:y}):(0,P.jsx)(`span`,{ref:m,children:y});return(0,P.jsx)(WG,{className:v(h&&`over`),children:b})}KG.propTypes={value:m.object,disabled:m.bool,instanceId:m.string,children:m.node,n:m.object.isRequired,onChange:m.func.isRequired,removeResponse:m.func.isRequired,duplicates:m.bool,selected:m.bool};var qG=(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)},JG=(e,t,n)=>{let{tr:r}=e.state;r.setNodeMarkup(n.pos,void 0,bl(t.attrs,[`value`,`id`])),r.isDone=!0,e.view.dispatch(r)},YG=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{inTable:s}=o,c=r();return(0,P.jsx)(ww,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline`,whiteSpace:`normal`},children:(0,P.jsx)(`span`,{...o,style:{display:`inline-flex`,minHeight:`50px`,minWidth:`178px`,position:`relative`,margin:s?`10px`:`0 10px`,cursor:`pointer`},children:(0,P.jsx)(KG,{n:o,dragKey:o.id,targetId:`0`,pos:c,value:o,duplicates:i.duplicates,selected:a,onChange:e=>qG(t,n,c,e),removeResponse:e=>JG(t,n,e)})})})};YG.propTypes={attributes:m.object,data:m.object,n:m.object,nodeProps:m.object,opts:m.object};var XG=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s,error:c}=o,l=s||`<div> </div>`,u=r(),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(!1),m=(0,w.useRef)(null),h=()=>t._holdInlineDropdownToolbarIndex!=null&&String(t._holdInlineDropdownToolbarIndex)===String(n.attrs.index),[g,_]=(0,w.useState)(!1),[v,y]=(0,w.useState)({top:0,left:0}),b=()=>{h()||(_(!1),i.onInlineDropdownToolbarClose?.(t))},x=i.respAreaToolbar([n,u],t,b),S=()=>{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(H.create(e.doc,u)),t.view.dispatch(e))},C=()=>{p.current||(i.onToolbarCloseRequest?(p.current=!0,i.onToolbarCloseRequest([n,u],t,()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,b()},()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,_(!0),setTimeout(S,0)})):b())};(0,w.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&_(!0):g&&C()},[t,n,a]);let T=e=>e.clientX>document.documentElement.clientWidth||e.clientY>document.documentElement.clientHeight||e.target===document.documentElement;return(0,w.useEffect)(()=>{m.current&&typeof dV==`function`&&dV(m.current)},[s]),(0,w.useEffect)(()=>{let e=document.body.getBoundingClientRect(),{from:n}=t.state.selection,r=t.view.coordsAtPos(n);y({top:r.top+Math.abs(e.top)+40,left:r.left});let i=e=>{if(T(e))return;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]`)&&C()};return g?document.addEventListener(`mousedown`,i):document.removeEventListener(`mousedown`,i),()=>document.removeEventListener(`mousedown`,i)},[g,n]),(0,P.jsxs)(ww,{className:`inline-dropdown`,"data-selected":a,style:{display:`inline-flex`,height:`50px`,cursor:`pointer`},children:[(0,P.jsxs)(`div`,{ref:m,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:()=>_(!0),children:[(0,P.jsx)(`div`,{style:{flex:1,overflow:`hidden`,padding:`0 25px 0 8px`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},children:(0,P.jsx)(`span`,{style:{display:`inline-block`,verticalAlign:`middle`},dangerouslySetInnerHTML:{__html:l}})}),(0,P.jsx)(HG,{direction:`down`,style:{position:`absolute`,top:`5px`,right:`5px`}})]}),g&&(0,P.jsxs)(w.Fragment,{children:[rw.createPortal((0,P.jsx)(`div`,{ref:d,children:(0,P.jsx)(x,{editorCallback:e=>{f.current=e}})}),t?._tiptapContainerEl||document.body),t._tiptapContainerEl&&rw.createPortal((0,P.jsx)(hW,{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),_W(t,!1),delete t._holdInlineDropdownToolbarIndex,t.view.dispatch(e),_(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};XG.propTypes={attributes:m.object,selectedItem:m.oneOfType([m.string,m.object])};var ZG=s({greaterThan:()=>eK,greaterThanEqual:()=>nK,lessThan:()=>$G,lessThanEqual:()=>tK}),QG=e=>({...e,category:`comparison`}),$G=QG({name:`Less than`,latex:`<`,command:`\\lt`}),eK=QG({name:`Greater than`,latex:`>`,command:`\\gt`}),tK=QG({name:`Less than or equal`,latex:`\\le`,symbol:`<=`,command:`\\le`,ariaLabel:`less than or equal to`}),nK=QG({name:`Greater than or equal`,symbol:`>=`,command:`\\ge`,latex:`\\ge`}),rK=e=>t=>({...t,category:e}),iK=(e=[])=>{let t=[];xl(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},aK=e=>t=>{let n=ml(e),r=n.some(e=>e.latex===t.latex),i=n.some(e=>e.name===t.name);return!r&&!i},oK=(e=[],t=[])=>{t=t.filter(aK(e));let n=[];xl(5-e.length,()=>e.push([])),xl(5,()=>n.push([]));let r=iK(t);for(let t=0;t<5;t++)n[t]=[...e[t],...r[t]];return n},sK=s({theta:()=>dK,x:()=>lK,y:()=>uK}),cK=rK(`vars`),lK=cK({name:`X`,latex:`x`,write:`x`}),uK=cK({name:`Y`,latex:`y`,write:`y`}),dK=cK({name:`Theta`,latex:`\\theta`,write:`\\theta`}),fK=s({blankOverBlank:()=>mK,xBlankBlank:()=>gK,xOverBlank:()=>hK}),pK=rK(`fractions`),mK=pK({name:`blank/blank`,latex:`\\frac{}{}`,command:`\\frac`,ariaLabel:`fraction`}),hK=pK({latex:`\\frac{x}{ }`,name:`X/blank`,label:`x/[]`,command:`/`,ariaLabel:`x over blank fraction`}),gK=pK({name:`X (blank/blank)`,latex:`x\\frac{}{}`,label:`x([]/[])`,command:`\\frac`,ariaLabel:`mixed number`}),_K=s({nthRoot:()=>SK,squareRoot:()=>xK,squared:()=>yK,xToPowerOfN:()=>bK}),vK=rK(`exponent`),yK=vK({name:`Squared`,latex:`x^2`,write:`^2`}),bK=vK({name:`X to the power of n`,latex:`x^{}`,command:`^`,ariaLabel:`exponent`}),xK=vK({name:`Square root`,latex:`\\sqrt{}`,command:`\\sqrt`}),SK=vK({name:`Nth root`,latex:`\\sqrt[{}]{}`,command:`\\nthroot`}),CK=s({absValue:()=>EK,approx:()=>AK,brackets:()=>OK,nApprox:()=>jK,notEqual:()=>MK,notSimilar:()=>PK,parenthesis:()=>DK,percentage:()=>kK,plusMinus:()=>TK,similar:()=>NK}),wK=rK(`misc`),TK=wK({name:`Plus or Minus`,latex:`\\pm`,write:`\\pm`}),EK=wK({name:`Absolute Value`,latex:`\\abs{}`,symbol:`| |`,command:`|`}),DK=wK({name:`Parenthesis`,latex:`\\left(\\right)`,symbol:`( )`,command:`(`}),OK=wK({name:`Brackets`,latex:`\\left[\\right]`,symbol:`[ ]`,command:`[`}),kK=wK({name:`Percent`,latex:`%`,command:`%`}),AK=wK({latex:`\\approx`,command:`\\approx`,ariaLabel:`Approximately equal to`}),jK=wK({latex:`\\napprox`,command:`\\napprox`,ariaLabel:`Not pproximately equal to`}),MK=wK({latex:`\\neq`,command:`\\neq`,ariaLabel:`Not equals`}),NK=wK({latex:`\\sim`,command:`\\sim`,ariaLabel:`Similar`}),PK=wK({latex:`\\nsim`,command:`\\nsim`,ariaLabel:`Not similar`}),FK=s({eulers:()=>RK,halfInfinity:()=>BK,infinity:()=>zK,pi:()=>LK}),IK=rK(`constants`),LK=IK({name:`Pi`,label:`π`,latex:`\\pi`,command:`\\pi`,category:`constants`}),RK=IK({name:`Eulers`,label:`e`,latex:`e`,command:`e`,category:`constants`}),zK=IK({name:`Infinity`,label:`\\infty`,latex:`\\infty`,command:`\\infty`,category:`constants`}),BK=IK({name:`Half Infinity`,label:`\\propto`,latex:`\\propto`,command:`\\propto`,category:`constants`}),VK=s({cos:()=>WK,cot:()=>JK,csc:()=>qK,sec:()=>KK,sin:()=>UK,tan:()=>GK}),HK=rK(`trigonometry`),UK=HK({name:`sine`,label:`sin`,command:`\\sin`,latex:`\\sin`}),WK=HK({name:`cosine`,label:`cos`,command:`\\cos`,latex:`\\cos`}),GK=HK({name:`tanget`,label:`tan`,command:`\\tan`,latex:`\\tan`}),KK=HK({name:`secant`,label:`sec`,command:`\\sec`,latex:`\\sec`}),qK=HK({name:`cosecant`,label:`csc`,command:`\\csc`,latex:`\\csc`}),JK=HK({name:`cotangent`,label:`cot`,command:`\\cot`,latex:`\\cot`}),YK=s({angle:()=>iq,circledDot:()=>uq,congruentTo:()=>pq,degree:()=>dq,doublePrimeArcSecond:()=>gq,leftArrow:()=>_q,leftrightArrow:()=>yq,measureOfAngle:()=>oq,notCongruentTo:()=>mq,notParallel:()=>nq,overArc:()=>aq,overLeftRightArrow:()=>$K,overRightArrow:()=>QK,overline:()=>ZK,parallel:()=>tq,parallelogram:()=>lq,perpindicular:()=>rq,primeArcminute:()=>hq,rightArrow:()=>vq,segment:()=>eq,similarTo:()=>fq,square:()=>cq,triangle:()=>sq}),XK=e=>({...e,category:`geometry`}),ZK=XK({name:`Line`,latex:`\\overline{}`,command:`\\overline`}),QK=XK({name:`Ray`,latex:`\\overrightarrow{}`,command:`\\overrightarrow`}),$K=XK({name:`Segment`,latex:`\\overleftrightarrow{\\overline{}}`,symbol:`AB`,command:`\\overleftrightarrow`}),eq=XK({name:`Segment`,latex:`\\overleftrightarrow{AB}`,write:`\\overleftrightarrow{AB}`,label:`AB`}),tq=XK({name:`Parallel`,latex:`\\parallel`,command:`\\parallel`}),nq=XK({name:`Not Parallel`,latex:`\\nparallel`,command:`\\nparallel`}),rq=XK({name:`Perpendicular`,latex:`\\perp`,command:`\\perpendicular`}),iq=XK({name:`Angle`,latex:`\\angle`,command:`\\angle`}),aq=XK({name:`Over arc`,latex:`\\overarc{\\overline{}}`,command:`\\overarc`}),oq=XK({name:`Measured Angle`,latex:`\\measuredangle`,command:[`m`,`\\angle`]}),sq=XK({name:`Triangle`,latex:`\\triangle`,command:`\\triangle`}),cq=XK({name:`Square`,latex:`\\square`,command:`\\square`}),lq=XK({name:`Parallelogram`,latex:`\\parallelogram`,command:`\\parallelogram`}),uq=XK({name:`Circled Dot`,latex:`\\odot`,command:`\\odot`}),dq=XK({name:`Degree`,latex:`\\degree`,command:`\\degree`}),fq=XK({name:`Similar`,command:`\\sim`,latex:`\\sim`}),pq=XK({name:`Congruent To`,command:`\\cong`,latex:`\\cong`}),mq=XK({name:`Not Congruent To`,command:`\\ncong`,latex:`\\ncong`}),hq=XK({name:`Prime`,label:`pam`,latex:`'`,write:`'`}),gq=XK({name:`Double Prime`,latex:`''`,write:`''`}),_q=XK({name:`Left Arrow`,latex:`\\leftarrow`,command:`\\leftarrow`}),vq=XK({name:`Right Arrow`,latex:`\\rightarrow`,command:`\\rightarrow`}),yq=XK({name:`Left and Right Arrow`,latex:`\\leftrightarrow`,command:`\\leftrightarrow`}),bq=s({circleDot:()=>xq}),xq=rK(`operators`)({name:`CircleDot`,label:`⋅`,write:`\\cdot`,ariaLabel:`Dot multiplier`}),Sq=s({ln:()=>Eq,log:()=>wq,logSubscript:()=>Tq}),Cq=rK(`log`),wq=Cq({name:`Log`,label:`log`,command:`\\log`,latex:`\\log`}),Tq=Cq({name:`log base n`,label:`log s`,latex:`\\log_{}`,command:[`\\log`,`_`]}),Eq=Cq({name:`natural log`,label:`ln`,command:`\\ln`,latex:`\\ln`}),Dq=s({subscript:()=>Aq,superscript:()=>kq}),Oq=rK(`sub-sup`),kq=Oq({name:`Superscript`,latex:`x^{}`,command:`^`}),Aq=Oq({name:`Subscript`,latex:`x_{}`,command:`_`}),jq=s({mu:()=>Fq,sigma:()=>Iq,smallSigma:()=>Lq,xBar:()=>Nq,yBar:()=>Pq}),Mq=rK(`statistics`),Nq=Mq({name:`X Bar`,label:`x̄`,latex:`\\overline{x}`,write:`\\overline{x}`}),Pq=Mq({name:`Y Bar`,latex:`\\overline{y}`,write:`\\overline{y}`}),Fq=Mq({name:`mu`,label:`mu`,latex:`\\mu`,write:`\\mu`}),Iq=Mq({name:`Sigma`,ariaLabel:`Uppercase Sigma`,label:`\\Sigma`,latex:`\\Sigma`,write:`\\Sigma`}),Lq=Mq({name:`sigma`,ariaLabel:`Lowercase Sigma`,label:`\\sigma`,latex:`\\sigma`,write:`\\sigma`}),Rq=s({divide:()=>Uq,equals:()=>Bq,minus:()=>Hq,multiply:()=>Wq,plus:()=>Vq}),zq=rK(`operators`),Bq=zq({write:`=`,label:`=`}),Vq=zq({write:`+`,label:`+`}),Hq=zq({write:`−`,label:`−`}),Uq=zq({name:`divide`,label:`÷`,command:`\\divide`,otherNotation:`\\div`}),Wq=zq({name:`multiply`,label:`×`,command:`\\times`}),Gq=s({doubleCellMatrix:()=>Jq,singleCellMatrix:()=>qq}),Kq=rK(`matrices`),qq=Kq({name:`Single Cell Matrix`,label:`[ ]`,write:`\\begin{pmatrix}\\end{pmatrix}`}),Jq=Kq({name:`Double Cell Matrix`,label:`[ ] [ ] \\\\newline [ ] [ ]`,write:`\\begin{bmatrix}&\\\\&\\end{bmatrix}`}),Yq={0:`zero`,1:`one`,2:`two`,3:`three`,4:`four`,5:`five`,6:`six`,7:`seven`,8:`eight`,9:`nine`},Xq=xl(10,String).map(e=>({name:Yq[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`}}),Zq=rK(`logic`),Qq=Zq({name:`Therefore`,label:`∴`,write:`∴`}),$q=Zq({name:`Long division`,latex:`\\longdiv{}`,command:`\\longdiv`}),eJ=rK(`navigation`),tJ=eJ({label:`◀`,keystroke:`Left`,ariaLabel:`Move cursor left`}),nJ=eJ({label:`▶`,keystroke:`Right`,ariaLabel:`Move cursor right`}),rJ={label:`⌫`,category:`edit`,keystroke:`Backspace`,ariaLabel:`Delete`},iJ=[[mK,kK,lK,yK,xK],[xq,uK,Aq,bK,SK],[TK,$G,eK,tK,nK],[LK,dK,DK,OK,EK],[MK,UK,WK,GK,dq]],aJ=(()=>{let e=[...iJ.map(e=>[...e])];return e[0].push({name:`i`,latex:`i`,write:`i`}),e[1].push(wq),e[2].push(Tq),e[3].push(Eq),e[4].push(RK),e})(),oJ=(()=>{let e=[...iJ.map(e=>[...e])];return e[0].push(Fq),e[1].push(Nq),e[2].push(Pq),e[3].push(Iq),e[4].push(Lq),e})(),sJ=[{predicate:e=>e>=3&&e<=5,set:[[$G,eK],[hK,gK],[lK,$q],[yK,bK]]},{predicate:e=>e>=6&&e<=7,set:[[dq,$G,eK],[xq,tK,nK],[lK,uK,yK,bK],[TK,hK,gK,xK],[LK,DK,EK,SK]]},{predicate:e=>e>=8||e===`HS`,set:iJ},{predicate:`non-negative-integers`,set:[[Xq.seven,Xq.eight,Xq.nine],[Xq.four,Xq.five,Xq.six],[Xq.one,Xq.two,Xq.three],[Xq.zero,{name:``,latex:``,write:``},{name:``,latex:``,write:``}],[tJ,nJ,rJ]]},{predicate:`integers`,set:[[Xq.seven,Xq.eight,Xq.nine],[Xq.four,Xq.five,Xq.six],[Xq.one,Xq.two,Xq.three],[Xq.zero,{name:``,latex:``,write:``},Hq],[tJ,nJ,rJ]]},{predicate:`decimals`,set:[[Xq.seven,Xq.eight,Xq.nine],[Xq.four,Xq.five,Xq.six],[Xq.one,Xq.two,Xq.three],[Xq.zero,Xq.decimalPoint,Hq],[tJ,nJ,rJ]]},{predicate:`fractions`,set:[[Xq.seven,Xq.eight,Xq.nine],[Xq.four,Xq.five,Xq.six],[Xq.one,Xq.two,Xq.three],[Xq.zero,mK,Hq],[tJ,nJ,rJ]]},{predicate:`geometry`,set:[[mK,dq,hq,gq,pq,fq],[xq,iq,oq,sq,mq,PK],[UK,WK,GK,LK,xK,SK],[qK,KK,JK,dK,Aq,bK],[ZK,QK,$K,aq,rq,tq]]},{predicate:`advanced-algebra`,set:aJ},{predicate:`statistics`,set:oJ},{predicate:`item-authoring`,set:[[Uq,mK,$q,BK,yK,xK,ZK,QK,$K,wq],[Wq,xq,{name:``,latex:``,write:``},Aq,bK,SK,rq,tq,aq,Tq],[TK,LK,dK,dq,iq,_q,vq,sq,cq,Eq],[MK,EK,Lq,Fq,Qq,Iq,yq,UK,WK,GK],[tK,nK,{name:``,latex:``,write:``},{name:``,latex:``,write:``},zK,{name:``,latex:``,write:``},{name:``,latex:``,write:``},qK,KK,JK]]},{predicate:e=>e>=1&&e<=2,set:[]}],cJ=e=>{let t=parseInt(e,10);if(e=isNaN(t)?e:t,!e)return[];let n=sJ.find(t=>typeof t.predicate==`string`?t.predicate===e:t.predicate(e));if(n)return n.set||[];if(e!==`language`)return sJ[2].set},lJ=[...Object.values(Rq),...Object.values(ZG),...Object.values(FK),...Object.values(Xq),...Object.values(_K),...Object.values(fK),...Object.values(YK),...Object.values(Sq),...Object.values(Gq),...Object.values(CK),...Object.values(bq),...Object.values(jq),...Object.values(Dq),...Object.values(VK),...Object.values(sK)],uJ=e=>(e||[]).map(e=>{let{latex:t}=e,n=(lJ||[]).find(e=>t===e.latex||t===e.write||t===e.command||t===e.otherNotation);return t&&n||e}),dJ=()=>{(Array.from(document.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:fJ,two:pJ,three:mJ,four:hJ,five:gJ,six:_J,seven:vJ,eight:yJ,nine:bJ,zero:xJ,comma:SJ,decimalPoint:CJ}=Xq,wJ=[[vJ,yJ,bJ,Uq],[hJ,gJ,_J,Wq],[fJ,pJ,mJ,Hq],[xJ,CJ,SJ,Vq],[tJ,nJ,rJ,Bq]],{translator:TJ}=_H;function EJ(e,t){if(!e)return;let n=TJ.t(`mathInput.enterAnswer`,{lng:t});for(let t of e.querySelectorAll(`.mq-editable-field > .mq-textarea > textarea`))t.setAttribute(`aria-label`,n)}function K(e){this.elements=Array.isArray(e)?e:[e].filter(Boolean),this.length=this.elements.length;for(var t=0;t<this.elements.length;t++)this[t]=this.elements[t]}K.prototype.addClass=function(e){var t=(e||``).split(/\s+/).filter(Boolean);return this.elements.forEach(function(e){t.forEach(function(t){e.classList.add(t)})}),this},K.prototype.removeClass=function(e){return this.elements.forEach(function(t){e?(e||``).split(/\s+/).filter(Boolean).forEach(function(e){t.classList.remove(e)}):t.className=``}),this},K.prototype.toggleClass=function(e,t){var n=(e||``).split(/\s+/).filter(Boolean),r=arguments.length>1?!!t:null;return this.elements.forEach(function(e){n.forEach(function(t){r===null?e.classList.toggle(t):e.classList.toggle(t,r)})}),this},K.prototype.attr=function(e,t){return t===jJ?this.elements[0]?this.elements[0].getAttribute(e):jJ:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},K.prototype.html=function(e){return e===jJ?this.elements[0]?this.elements[0].innerHTML:``:(this.elements.forEach(function(t){t.innerHTML=e}),this)},K.prototype.append=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e){e.appendChild(t)}),this},K.prototype.prepend=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e,n){var r=n===0?t:t.cloneNode(!0);e.insertBefore(r,e.firstChild)}),this},K.prototype.wrapAll=function(e){if(!this.elements.length)return this;var t;if(typeof e==`string`&&e.trim().indexOf(`<`)===0){var n=document.createElement(`div`);n.innerHTML=e.trim(),t=n.firstChild}else if(e instanceof K)t=e.elements[0];else if(e&&e.nodeType)t=e;else return this;var r=this.elements[0],i=r.parentNode;return i&&(i.insertBefore(t,r),this.elements.forEach(function(e){t.appendChild(e)})),this},K.prototype.appendTo=function(e){var t=e instanceof K?e.elements[0]:e;return t&&this.elements.forEach(function(e){t.appendChild(e)}),this},K.prototype.prependTo=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.firstChild;return this.elements.forEach(function(e){t.insertBefore(e,n),n=e}),this},K.prototype.insertBefore=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode;return n&&this.elements.forEach(function(e){n.insertBefore(e,t)}),this},K.prototype.insertAfter=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode,r=t.nextSibling;return n&&this.elements.forEach(function(e){n.insertBefore(e,r),r=e}),this},K.prototype.replaceWith=function(e){var t=[];return e instanceof K?t=e.elements.slice():e&&typeof e.length==`number`&&!e.tagName?t=Array.from(e):e&&e.nodeType&&(t=[e]),this.elements.forEach(function(e){var n=e.parentNode;n&&(t.forEach(function(t){n.insertBefore(t,e)}),n.removeChild(e))}),this},K.prototype.insDirOf=function(e,t){return e===-1?this.insertBefore(t.first()):this.insertAfter(t.last())},K.prototype.insAtDirEnd=function(e,t){return e===-1?this.prependTo(t):this.appendTo(t)},K.prototype.children=function(e){var t=[];return this.elements.forEach(function(n){var r;if(!e)r=Array.from(n.children);else if(e===`:first`)r=n.firstElementChild?[n.firstElementChild]:[];else if(e===`:last`)r=n.lastElementChild?[n.lastElementChild]:[];else{var i=/^:eq\((\d+)\)$/.exec(e);if(i){var a=parseInt(i[1],10),o=Array.from(n.children);r=o[a]?[o[a]]:[]}else r=Array.from(n.querySelectorAll(`:scope > `+e))}t.push.apply(t,r)}),new K(t)},K.prototype.find=function(e){var t=[];return this.elements.forEach(function(n){var r=Array.from(n.querySelectorAll(e));t.push.apply(t,r)}),new K(t)},K.prototype.closest=function(e){return new K(this.elements.map(function(t){return t.closest(e)}).filter(Boolean))},K.prototype.contents=function(){var e=[];return this.elements.forEach(function(t){var n=Array.from(t.childNodes);e.push.apply(e,n)}),new K(e)},K.prototype.filter=function(e){return new K(this.elements.filter(function(t,n){return e(n,t)}))},K.prototype.detach=function(){return this.elements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this},K.prototype.remove=function(){return this.elements.forEach(function(e){e.remove()}),this},K.prototype.empty=function(){return this.elements.forEach(function(e){e.innerHTML=``}),this};function DJ(e){return(e||``).split(`.`)[0]}K.prototype.on=function(e,t){var n=DJ(e);return this.elements.forEach(function(e){e.addEventListener(n,t)}),this},K.prototype.bind=function(e,t,n){var r=this;if(typeof e==`object`){for(var i in e)e.hasOwnProperty(i)&&r.bind(i,e[i]);return this}var a=typeof t==`function`?t:n;return a===!1&&(a=function(e){e.preventDefault()}),(e||``).split(/\s+/).filter(Boolean).forEach(function(e){var t=DJ(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},K.prototype.off=function(e,t){var n=DJ(e);return this.elements.forEach(function(e){e.removeEventListener(n,t)}),this},K.prototype.unbind=function(e,t){if(e&&e.includes(`.`))this.elements.forEach(function(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.replaceChild(t,e)});else if(e&&t){var n=DJ(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},K.prototype.trigger=function(e){var t=new Event(DJ(e),{bubbles:!0,cancelable:!0});return this.elements.forEach(function(e){e.dispatchEvent(t)}),this},K.prototype.focus=function(e){return typeof e==`function`?this.on(`focus`,e):(this.elements.forEach(function(e){e.focus&&e.focus()}),this)},K.prototype.blur=function(e){return typeof e==`function`?this.on(`blur`,e):(this.elements.forEach(function(e){e.blur&&e.blur()}),this)},[`mousemove`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`click`,`keydown`,`keypress`,`keyup`,`focusout`,`paste`,`cut`,`copy`,`input`,`load`].forEach(function(e){K.prototype[e]=function(t){return this.on(e,t)}}),K.prototype.next=function(e){return new K(this.elements.map(function(e){return e.nextElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.prev=function(e){return new K(this.elements.map(function(e){return e.previousElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.parent=function(){return new K(this.elements.map(function(e){return e.parentElement}).filter(Boolean))},K.prototype.offset=function(){if(!this.elements[0])return{top:0,left:0};var e=this.elements[0].getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}},K.prototype.width=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.width)||e.getBoundingClientRect().width},K.prototype.height=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.height)||e.getBoundingClientRect().height},K.prototype.outerWidth=function(){return this.elements[0]?this.elements[0].offsetWidth:0},K.prototype.outerHeight=function(){return this.elements[0]?this.elements[0].offsetHeight:0},K.prototype.innerWidth=function(){return this.elements[0]?this.elements[0].clientWidth:0},K.prototype.innerHeight=function(){return this.elements[0]?this.elements[0].clientHeight:0},K.prototype.css=function(e,t){if(t===jJ){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):jJ}}else this.elements.forEach(function(n){n.style[e]=t});return this},K.prototype.scrollTop=function(e){var t=this.elements[0];return e===jJ?t?t===window?window.pageYOffset||document.documentElement.scrollTop:t.scrollTop:0:(t===window?window.scrollTo(window.pageXOffset||0,e):this.elements.forEach(function(t){t.scrollTop=e}),this)},K.prototype.scrollLeft=function(e){var t=this.elements[0];return e===jJ?t?t===window?window.pageXOffset||document.documentElement.scrollLeft:t.scrollLeft:0:(t===window?window.scrollTo(e,window.pageYOffset||0):this.elements.forEach(function(t){t.scrollLeft=e}),this)},K.prototype.each=function(e){return this.elements.forEach(function(t,n){e.call(t,n,t)}),this},K.prototype.eq=function(e){return new K([this.elements[e]])},K.prototype.get=function(e){return e===jJ?this.elements:e<0?this.elements[this.elements.length+e]:this.elements[e]},K.prototype.add=function(e){var t=this.elements.slice();return e instanceof K?t.push.apply(t,e.elements):Array.isArray(e)?t.push.apply(t,e):e&&e.nodeType&&t.push(e),new K(t)},K.prototype.first=function(){return new K([this.elements[0]])},K.prototype.last=function(){return new K([this.elements[this.elements.length-1]])},K.prototype.index=function(e){if(!e){var t=this.elements[0]&&this.elements[0].parentElement;return t?Array.from(t.children).indexOf(this.elements[0]):-1}var n=e instanceof K?e.elements[0]:e;return this.elements.indexOf(n)},K.prototype.is=function(e){return this.elements.some(function(t){return t.matches(e)})},K.prototype.text=function(e){return e===jJ?this.elements.map(function(e){return e.textContent}).join(``):(this.elements.forEach(function(t){t.textContent=e}),this)},K.prototype.val=function(e){var t=this.elements[0];return t?e===jJ?t.value===jJ?t.textContent:t.value:(this.elements.forEach(function(t){t.value===jJ?t.textContent=e:t.value=e}),this):jJ};function OJ(e){var t=Array.isArray(e)?e:[e].filter(Boolean),n=Object.create(K.prototype);n.elements=t,n.length=t.length;for(var r=0;r<t.length;r++)n[r]=t[r];return n}var kJ=function(e,t){var n;if(!e)n=[];else if(e===window||e===document)n=[e];else if(e.nodeType)n=[e];else if(e&&e.current&&e.current.nodeType)n=[e.current];else if(typeof e==`string`&&e[0]===`<`){var r=document.createElement(`div`);r.innerHTML=e.trim(),n=Array.from(r.children)}else if(typeof e==`string`){var i=t instanceof K?t.elements[0]:t||document;n=Array.from(i.querySelectorAll(e))}else n=e instanceof K?e.elements:e.length===jJ?[]:Array.from(e);return OJ(n)};kJ.contains=function(e,t){return e!==t&&e.contains(t)};var AJ=kJ,jJ,MJ=`mathquill-command-id`,NJ=`mathquill-block-id`,PJ=Math.min,FJ=Math.max;function IJ(){}var LJ=[].slice;function RJ(e){var t=e.length-1;return function(){var n=LJ.call(arguments,0,t),r=LJ.call(arguments,t);return e.apply(this,n.concat([r]))}}var zJ=RJ(function(e,t){return RJ(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function BJ(e){return RJ(function(t,n){return typeof t!=`function`&&(t=zJ(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function q(e){var t=LJ.call(arguments,1);return function(){return e.apply(this,t)}}function VJ(e,t){if(!t)throw Error(`prayer failed: `+e)}var J=(function(e,t,n){function r(e){return typeof e==`object`}function i(e){return typeof e==`function`}function a(){}return function o(s,c){c===n&&(c=s,s=Object);function l(){var e=new u;return i(e.init)&&e.init.apply(e,arguments),e}function u(){}l.Bare=u;var d=a[e]=s[e],f=u[e]=l[e]=l.p=new a,p;return f.constructor=l,l.extend=function(e){return o(l,e)},(l.open=function(e){if(p={},i(e)?p=e.call(l,f,d,l,s):r(e)&&(p=e),r(p))for(var n in p)t.call(p,n)&&(f[n]=p[n]);return i(f.init)||(f.init=s),l})(c)}})(`prototype`,{}.hasOwnProperty),Y=-1,X=1;function HJ(e){VJ(`a direction was passed`,e===Y||e===X)}var UJ=J(function(e){e.parent=0,e[Y]=0,e[X]=0,e.init=function(e,t,n){this.parent=e,this[Y]=t,this[X]=n},this.copy=function(e){return UJ(e.parent,e[Y],e[X])}}),WJ=J(function(e){e[Y]=0,e[X]=0,e.parent=0;var t=0;function n(){return t+=1}this.byId={},e.init=function(){this.id=n(),WJ.byId[this.id]=this,this.ends={},this.ends[Y]=0,this.ends[X]=0},e.dispose=function(){delete WJ.byId[this.id]},e.toString=function(){return`{{ MathQuill Node #`+this.id+` }}`},e.jQ=kJ(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){var e=kJ(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute(`mathquill-command-id`),r=e.getAttribute(`mathquill-block-id`);n&&WJ.byId[n].jQadd(e),r&&WJ.byId[r].jQadd(e)}for(e=e.firstChild;e;e=e.nextSibling)t(e)}for(var n=0;n<e.length;n+=1)t(e[n]);return e},e.createDir=function(e,t){HJ(e);var n=this;return n.jQize(),n.jQ.insDirOf(e,t.jQ),t[e]=n.adopt(t.parent,t[Y],t[X]),n},e.createLeftOf=function(e){return this.createDir(Y,e)},e.selectChildren=function(e,t){return XJ(e,t)},e.bubble=BJ(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=BJ(function(e){return(function t(n){n.eachChild(t),e(n)})(this),this}),e.isEmpty=function(){return this.ends[Y]===0&&this.ends[X]===0},e.isStyleBlock=function(){return!1},e.children=function(){return KJ(this.ends[Y],this.ends[X])},e.eachChild=function(){var e=this.children();return e.each.apply(e,arguments),this},e.foldChildren=function(e,t){return this.children().fold(e,t)},e.withDirAdopt=function(e,t,n,r){return KJ(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return KJ(this,this).adopt(e,t,n),this},e.disown=function(){return KJ(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function GJ(e,t,n){VJ(`a parent is always present`,e),t&&(t[X]!==n&&(t[X]=n),t.parent!==e&&(t.parent=e)),n&&(n[Y]!==t&&(n[Y]=t),n.parent!==e&&(n.parent=e)),VJ(`leftward is properly set up`,(function(){return t?t[X]===n&&t.parent===e:e.ends[Y]===n})()),VJ(`rightward is properly set up`,(function(){return n?n[Y]===t&&n.parent===e:e.ends[X]===t})())}var KJ=J(function(e){e.init=function(e,t,n){if(n===jJ&&(n=Y),HJ(n),VJ(`no half-empty fragments`,!e==!t),this.ends={},e){VJ(`withDir is passed to Fragment`,e instanceof WJ),VJ(`oppDir is passed to Fragment`,t instanceof WJ),VJ(`withDir and oppDir have the same parent`,e.parent===t.parent),this.ends[n]=e,this.ends[-n]=t;var r=this.fold([],function(e,t){return e.push.apply(e,t.jQ.get()),e});this.jQ=this.jQ.add(r)}},e.jQ=kJ(),e.withDirAdopt=function(e,t,n,r){return e===Y?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){GJ(e,t,n);var r=this;r.disowned=!1;var i=r.ends[Y];if(!i)return this;var a=r.ends[X];return t||(e.ends[Y]=i),n?n[Y]=a:e.ends[X]=a,r.ends[X][X]=n,r.each(function(n){n[Y]=t,n.parent=e,t&&(t[X]=n),t=n}),r},e.disown=function(){var e=this,t=e.ends[Y];if(!t||e.disowned)return e;e.disowned=!0;var n=e.ends[X],r=t.parent;return GJ(r,t[Y],t),GJ(r,n,n[X]),t[Y]?t[Y][X]=n[X]:r.ends[Y]=n[X],n[X]?n[X][Y]=t[Y]:r.ends[X]=t[Y],e},e.remove=function(){return this.jQ.remove(),this.each(`postOrder`,`dispose`),this.disown()},e.each=BJ(function(e){var t=this,n=t.ends[Y];if(!n)return t;for(;n!==t.ends[X][X]&&e(n)!==!1;n=n[X]);return t}),e.fold=function(e,t){return this.each(function(n){e=t.call(this,e,n)}),e}}),Z={},qJ={},JJ={},YJ=J(UJ,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=kJ(`<span class="mq-cursor">​</span>`);this.blink=function(){n.toggleClass(`mq-blink`)},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass(`mq-blink`),`intervalId`in this?clearInterval(this.intervalId):(this[X]?this.selection&&this.selection.ends[Y][Y]===this[Y]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[X].jQ.first()):this.jQ.appendTo(this.parent.jQ),this.parent.focus()),this.intervalId=setInterval(this.blink,500),this},e.hide=function(){return`intervalId`in this&&clearInterval(this.intervalId),delete this.intervalId,this.jQ.detach(),this.jQ=kJ(),this},e.withDirInsertAt=function(e,t,n,r){var i=this.parent;this.parent=t,this[e]=n,this[-e]=r,i!==t&&i.blur&&i.blur(this)},e.insDirOf=function(e,t){return HJ(e),!t||!t.jQ?this:(this.jQ.insDirOf(e,t.jQ),this.withDirInsertAt(e,t.parent,t[e],t),this.parent.jQ.addClass(`mq-hasCursor`),this)},e.insLeftOf=function(e){return this.insDirOf(Y,e)},e.insRightOf=function(e){return this.insDirOf(X,e)},e.insAtDirEnd=function(e,t){return HJ(e),this.jQ.insAtDirEnd(e,t.jQ),this.withDirInsertAt(e,t,0,t.ends[e]),t.focus(),this},e.insAtLeftEnd=function(e){return this.insAtDirEnd(Y,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(X,e)},e.jumpUpDown=function(e,t){var n=this;n.upDownCache[e.id]=UJ.copy(n);var r=n.upDownCache[t.id];if(r)r[X]?n.insLeftOf(r[X]):n.insAtRightEnd(r.parent);else{var i=n.offset().left;t.seek(i,n)}},e.offset=function(){var e=this,t=e.jQ.removeClass(`mq-cursor`).offset();return e.jQ.addClass(`mq-cursor`),t},e.unwrapGramp=function(){var e=this.parent.parent,t=e.parent,n=e[X],r=this,i=e[Y];if(e.disown().eachChild(function(r){r.isEmpty()||(r.children().adopt(t,i,n).each(function(t){t.jQ.insertBefore(e.jQ.first())}),i=r.ends[X])}),!this[X])if(this[Y])this[X]=this[Y][X];else for(;!this[X];)if(this.parent=this.parent[X],this.parent)this[X]=this.parent.ends[Y];else{this[X]=e[X],this.parent=t;break}this[X]?this.insLeftOf(this[X]):this.insAtRightEnd(t),e.jQ.remove(),e[Y].siblingDeleted&&e[Y].siblingDeleted(r.options,X),e[X].siblingDeleted&&e[X].siblingDeleted(r.options,Y)},e.startSelection=function(){for(var e=this.anticursor=UJ.copy(this),t=e.ancestors={},n=e;n.parent;n=n.parent)t[n.parent.id]=n},e.endSelection=function(){delete this.anticursor},e.select=function(){var e=this.anticursor;if(!e||!e.ancestors||this[Y]===e[Y]&&this.parent===e.parent)return!1;for(var t,n=this;n.parent;n=n.parent)if(n.parent.id in e.ancestors){t=n.parent;break}if(!t)return!1;var r=e.ancestors[t.id],i,a,o=X;if(n[Y]!==r){for(var s=n;s;s=s[X])if(s[X]===r[X]){o=Y,i=n,a=r;break}}return o===X&&(i=r,a=n),i instanceof UJ&&(i=i[X]),a instanceof UJ&&(a=a[Y]),!i||!a?!1:(this.hide().selection=t.selectChildren(i,a),this.insDirOf(o,this.selection.ends[o]),this.selectionChanged(),!0)},e.clearSelection=function(){return this.selection&&(this.selection.clear(),delete this.selection,this.selectionChanged()),this},e.deleteSelection=function(){this.selection&&(this[Y]=this.selection.ends[Y][Y],this[X]=this.selection.ends[X][X],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[Y]=e.ends[Y][Y],this[X]=e.ends[X][X],delete this.selection),e},e.depth=function(){for(var e=this,t=0;e=e.parent;)t+=+(e instanceof _Y);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==jJ)return this.depth()+(e||0)>this.options.maxDepth},e.howDeep=function(){for(var e=0,t=this;t=t.parent;)e++;return 1+Math.floor(e/2)},e.tooDeep=function(){var e=this.options.maxDepth;return e&&this.howDeep()>e}}),XJ=J(KJ,function(e,t){e.init=function(){t.init.apply(this,arguments),this.jQ=this.jQ.wrapAll(`<span class="mq-selection"></span>`).parent()},e.adopt=function(){return this.jQ.replaceWith(this.jQ=this.jQ.children()),t.adopt.apply(this,arguments)},e.clear=function(){var e=this.jQ[0];return e&&this.jQ.replaceWith(e.childNodes),this},e.join=function(e){return this.fold(``,function(t,n){return t+n[e]()})}}),ZJ=J(function(e){e.init=function(e,t,n){this.id=e.id,this.data={},this.root=e,this.container=t,this.options=n,e.controller=this,this.cursor=e.cursor=YJ(e,n)},e.handle=function(e,t){var n=this.options.handlers;if(n&&n.fns[e]){var r=n.APIClasses[this.KIND_OF_MQ](this);t===Y||t===X?n.fns[e](t,r):n.fns[e](r)}};var t=[];this.onNotify=function(e){t.push(e)},e.notify=function(){for(var e=0;e<t.length;e+=1)t[e].apply(this.cursor,arguments);return this}}),QJ={},$J=J(),eY={},tY=J(),nY={};function rY(){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:
|
|
328
|
+
`;function XV(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=UV,t.textContent=YV,e.head.appendChild(t)}var ZV=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function QV(){let e=globalThis;e[ZV]||(e[ZV]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${wB}`))}function $V(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),QV()}function eH(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>$V(e),{once:!0}),a})}`${DB}`;var tH={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},nH=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,rH=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,iH=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,aH=/\\embed\{newLine\}\[\]/g,oH=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],sH=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),cH=`MJX-CHTML-styles`,lH=`PIE-MJX-SVG-styles`,uH=`PIE-MathJax-Menu-Settings`,dH={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},fH=200,pH=201;function mH(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function hH(e){for(let[t,n]of oH)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function gH(e){return hH(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var _H=`mathjax_ignore`,vH=`mathjax_process`;function yH(e,t){let n=e.closest(`.${_H}, .${vH}`);return n!==null&&t.contains(n)&&!n.classList.contains(vH)}function bH(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||yH(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${gH(n)}\\)`.replace(aH,`\\newline `),t.dataset.mathHandled=`true`)}}function xH(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function SH(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?iH:rH).test(e.textContent??``)}function CH(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=PB(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=KB();return wH(t)&&TH(t),e}}},startup:{typeset:!1,ready:()=>{let e=KB(),r=e?.startup,i=wH(e);i&&(TH(e),EH(e,s.speechLocales),FB(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(DH(r?.document),r?.document?.addStyles?.(dH),eH(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...tH}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(nH),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=IB(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),JB(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function wH(e){return!!e?.version?.startsWith(`4.`)}function TH(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=XB);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=lH)}function EH(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=uH;try{let e=localStorage.getItem(uH);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(uH,JSON.stringify(i)):localStorage.removeItem(uH)}catch{}}}function DH(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(mH(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,pH,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&mH(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===cH&&(r.id=XB),AH()}function OH(e){return e instanceof HTMLStyleElement&&ZB.includes(e.id)}function kH(e){WB(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function AH(){let e=document.head,t=[...e.children].find(OH);if(t){kH(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(OH);if(e){kH(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function jH(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=fH&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function MH(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=KB()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function NH(e){let t=KB();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():MH(t):CH(e)}function PH(e){return NH(e).then(()=>{let e=KB();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function FH(e){let t=YB,n=t[sH];return n||(n=PH(e),t[sH]=n),n}function IH(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=QB();r&&WB(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),bH(n),nV(n),xH(n),HV(n);let i=FH(e);if(!SH(n,t)){i.catch(()=>{});return}await i;let a=KB();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){XV(),jH(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}mH(n)}}}var LH=`@pie-lib/math-rendering`,RH=`@pie-lib/math-rendering@2`,zH=`pie-print`,BH=50,VH=1e4,HH=null;function UH(){return!!window[RH]?.opts?.useSingleDollar}function WH(){return HH||=IH({useSingleDollar:UH()}),HH}function GH(){if(typeof window>`u`)return null;let e=window[LH];return typeof e?.renderMath==`function`&&e.renderMath!==YH?e:null}function KH(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===zH)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function qH(){let e=window.renderMath;return typeof e==`function`?e:null}async function JH(e){let t=KH(e);if(!t)return null;let n=qH();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+VH;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,BH));let e=qH();if(e)return e}return null}var YH=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=GH(),i=r||t?null:await JH(n);return r?await r.renderMath?.(n):i&&i!==YH?await i(n):await WH()(n),t?n.innerHTML:void 0},XH=(e,t)=>{let n=GH()?.wrapMath?.(e,t);if(n!=null)return n;let[r,i]=t===`dollar`||t===`double_dollar`?[`$`,`$`]:[`\\(`,`\\)`];return`${r}${hH(e)}${i}`},ZH=e=>{let t=e.trim();return t.startsWith(`\\[`)&&t.endsWith(`\\]`)?{unwrapped:t.slice(2,-2).trim(),wrapper:{open:`\\[`,close:`\\]`}}:t.startsWith(`\\(`)&&t.endsWith(`\\)`)?{unwrapped:t.slice(2,-2).trim(),wrapper:{open:`\\(`,close:`\\)`}}:t.startsWith(`$$`)&&t.endsWith(`$$`)?{unwrapped:t.slice(2,-2).trim(),wrapper:{open:`$$`,close:`$$`}}:t.startsWith(`$`)&&t.endsWith(`$`)?{unwrapped:t.slice(1,-1).trim(),wrapper:{open:`$`,close:`$`}}:{unwrapped:t}},QH={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},$H={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},eU=e=>typeof e==`string`,tU=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},nU=e=>e==null?``:``+e,rU=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},iU=/###/g,aU=e=>e&&e.indexOf(`###`)>-1?e.replace(iU,`.`):e,oU=e=>!e||eU(e),sU=(e,t,n)=>{let r=eU(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(oU(e))return{};let t=aU(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return oU(e)?{}:{obj:e,k:aU(r[i])}},cU=(e,t,n)=>{let{obj:r,k:i}=sU(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=sU(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=sU(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},lU=(e,t,n,r)=>{let{obj:i,k:a}=sU(e,t,Object);i[a]=i[a]||[],i[a].push(n)},uU=(e,t)=>{let{obj:n,k:r}=sU(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},dU=(e,t,n)=>{let r=uU(e,n);return r===void 0?uU(t,n):r},fU=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?eU(e[r])||e[r]instanceof String||eU(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):fU(e[r],t[r],n):e[r]=t[r]);return e},pU=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),mU={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},hU=e=>eU(e)?e.replace(/[&<>"'\/]/g,e=>mU[e]):e,gU=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},_U=[` `,`,`,`?`,`!`,`;`],vU=new gU(20),yU=(e,t,n)=>{t||=``,n||=``;let r=_U.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=vU.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},bU=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},xU=e=>e?.replace(/_/g,`-`),SU={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},CU=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||SU,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(eU(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},wU=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},TU=class extends wU{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):eU(n)&&i?o.push(...n.split(i)):o.push(n)));let s=uU(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!eU(n)?s:bU(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),cU(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(eU(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=uU(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?fU(s,n,i):s={...s,...n},cU(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},EU={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},DU=Symbol(`i18next/PATH_KEY`);function OU(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===DU?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function kU(e,t){let{[DU]:n}=e(OU()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var AU={},jU=e=>!eU(e)&&typeof e!=`boolean`&&typeof e!=`number`,MU=class e extends wU{constructor(e,t={}){super(),rU([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=CU.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=jU(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!yU(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:eU(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:eU(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=kU(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?kU(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!eU(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let ee=jU(E),D=Object.prototype.toString.apply(E);if(y&&E&&ee&&_.indexOf(D)<0&&!(eU(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:jU(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&eU(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=eU(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!eU(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=eU(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=EU.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return eU(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?kU(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!eU(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(eU(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!AU[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(AU[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!eU(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},NU=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=CU.create(`languageUtils`)}getScriptPartFromCode(e){if(e=xU(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=xU(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(eU(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),eU(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return eU(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):eU(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},PU={zero:0,one:1,two:2,few:3,many:4,other:5},FU={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},IU=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=CU.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=xU(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),FU;if(!e.match(/-|_/))return FU;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>PU[e]-PU[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},LU=(e,t,n,r=`.`,i=!0)=>{let a=dU(e,t,n);return!a&&i&&eU(n)&&(a=bU(e,n,r),a===void 0&&(a=bU(t,n,r))),a},RU=e=>e.replace(/\$/g,`$$$$`),zU=class{constructor(e={}){this.logger=CU.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?hU:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?pU(i):a||`{{`,this.suffix=o?pU(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?pU(d):f||pU(`$t(`),this.nestingSuffix=p?pU(p):m||pU(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=LU(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(LU(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>RU(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?RU(this.escape(e)):RU(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=eU(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!eU(a)&&!this.useRawValueToEscape&&(a=nU(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${pU(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!eU(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!eU(i))return i;eU(i)||(i=nU(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},BU=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},VU=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(xU(r),i),t[o]=s),s(n)}},HU=e=>(t,n,r)=>e(xU(n),r)(t),UU=class{constructor(e={}){this.logger=CU.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?VU:HU;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=VU(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=BU(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},WU=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},GU=class extends wU{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=CU.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{lU(n.loaded,[i],a),WU(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();eU(e)&&(e=this.languageUtils.toResolveHierarchy(e)),eU(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},KU=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),eU(e[1])&&(t.defaultValue=e[1]),eU(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),qU=e=>(eU(e.ns)&&(e.ns=[e.ns]),eU(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),eU(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),JU=()=>{},YU=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},XU=`__i18next_supportNoticeShown`,ZU=()=>!!(typeof globalThis<`u`&&globalThis[XU]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),QU=()=>{typeof globalThis<`u`&&(globalThis[XU]=!0)},$U=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),eW=class e extends wU{constructor(e={},t){if(super(),this.options=qU(e),this.services={},this.logger=CU,this.modules={external:[]},YU(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(eU(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=KU();this.options={...n,...this.options,...qU(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!$U(this)&&!ZU()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),QU());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?CU.init(r(this.modules.logger),this.options):CU.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:UU;let t=new NU(this.options);this.store=new TU(this.options.resources,this.options);let i=this.services;i.logger=CU,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new IU(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new zU(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new GU(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new MU(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=JU,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=tU(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=JU){let n=t,r=eU(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=tU();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=JU,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&EU.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=tU();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=eU(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(eU(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=kU(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=kU(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=kU(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return eU(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=tU();return this.options.ns?(eU(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=tU();eU(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new NU(KU());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=JU){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new TU(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...KU().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new zU(n)}return a.translator=new MU(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();eW.createInstance,eW.dir,eW.init,eW.loadResources,eW.reloadResources,eW.use,eW.changeLanguage,eW.getFixedT,eW.t,eW.exists,eW.setDefaultNamespace,eW.hasLoadedNamespace,eW.loadNamespaces,eW.loadLanguages,eW.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:QH,es:$H}});var tW={translator:{...eW,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return eW.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},nW=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,rW=e=>w.useState(()=>nW(e))[0],{translator:iW}=tW,aW=I(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:xz(),cursor:`pointer`}),oW=I(`span`)({borderBottom:`1px dotted currentColor`}),sW=I(SB)(({theme:e})=>({paddingTop:e.spacing(2)})),cW=class extends w.Component{static propTypes={className:m.string,children:m.object,labels:m.shape({visible:m.string,hidden:m.string}),language:m.string};static defaultProps={labels:{}};state={expanded:!1};panelId=nW(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){YH(this.root)}componentDidUpdate(){YH(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||iW.t(`common:hide`,{lng:r}):e.hidden||iW.t(`common:show`,{lng:r});return(0,P.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,P.jsx)(`div`,{children:(0,P.jsx)(aW,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,P.jsx)(oW,{children:a})})}),(0,P.jsx)(`div`,{id:this.panelId,children:(0,P.jsx)(sW,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}};function lW(e){return Vr(`MuiButton`,e)}var uW=Hr(`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(`.`)),dW=w.createContext({}),fW=w.createContext(void 0),pW=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=y({root:[`root`,o&&`loading`,a,`${a}${L(t)}`,`size${L(i)}`,`${a}Size${L(i)}`,`color${L(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${L(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${L(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${L(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},lW,c);return{...c,...l}},mW=[{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}}}],hW=I($P,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${L(n.color)}`],t[`size${L(n.size)}`],t[`${n.variant}Size${L(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Oo(({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`},[`&.${uW.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]},[`&.${uW.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${uW.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)`,[`&.${uW.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(Mo()).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`},[`&.${uW.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${uW.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}),[`&.${uW.loading}`]:{color:`transparent`}}}]}})),gW=I(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${L(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}},...mW]})),_W=I(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${L(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}},...mW]})),vW=I(`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}}]})),yW=I(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),bW=w.forwardRef(function(e,t){let n=w.useContext(dW),r=w.useContext(fW),i=ko({props:ti(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:y=`center`,size:b=`medium`,startIcon:x,type:S,variant:C=`text`,...T}=i,E=KN(h),ee=_??(0,P.jsx)(fF,{"aria-labelledby":E,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:ee,loadingPosition:y,size:b,type:S,variant:C},O=pW(D),te=(x||g&&y===`start`)&&(0,P.jsx)(gW,{className:O.startIcon,ownerState:D,children:x||(0,P.jsx)(yW,{className:O.loadingIconPlaceholder,ownerState:D})}),k=(f||g&&y===`end`)&&(0,P.jsx)(_W,{className:O.endIcon,ownerState:D,children:f||(0,P.jsx)(yW,{className:O.loadingIconPlaceholder,ownerState:D})}),A=r||``,j=typeof g==`boolean`?(0,P.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:g&&(0,P.jsx)(vW,{className:O.loadingIndicator,ownerState:D,children:ee})}):null,{root:M,...ne}=O;return(0,P.jsxs)(hW,{ownerState:D,className:v(n.className,O.root,c,A),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:v(O.focusVisible,p),ref:t,type:S,id:g?E:h,...T,classes:ne,children:[te,y!==`end`&&j,a,y===`end`&&j,k]})}),xW=IN((0,P.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`),SW=IN((0,P.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`),CW=I(`div`)({display:`flex`,flexDirection:`column`}),wW=I(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),TW=I(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),EW=I(bW)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),DW=e=>{class t extends w.Component{static propTypes={session:m.object,onSessionChange:m.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,P.jsxs)(CW,{children:[(0,P.jsxs)(wW,{children:[(0,P.jsxs)(EW,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,P.jsx)(TW,{children:(0,P.jsx)(SW,{})}),`Undo`]}),(0,P.jsxs)(EW,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,P.jsx)(TW,{children:(0,P.jsx)(xW,{})}),`Start Over`]})]}),(0,P.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},OW=yo({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`}}}}}}),kW=I(`div`)({"& table, th, td":{fontSize:`inherit`}}),AW=class extends w.Component{static propTypes={className:m.string,children:m.array,extraCSSRules:m.shape({names:m.arrayOf(m.string),rules:m.string}),fontSizeFactor:m.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}scopeClass=nW(`extra-css-rules`);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,P.jsx)(yr,{injectFirst:!0,children:(0,P.jsxs)(Ko,{theme:OW,children:[i?.rules?(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,P.jsx)(kW,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}},jW=I(AW)({display:`flex`,flexDirection:`column`,position:`relative`}),MW=class extends w.Component{static propTypes={ariaLabel:m.string,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,role:m.string,extraCSSRules:m.shape({names:m.arrayOf(m.string),rules:m.string}),fontSizeFactor:m.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,P.jsx)(jW,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},NW=class extends w.Component{static propTypes={tag:m.string,className:m.string,html:m.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,P.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:HR(n)}})}};function PW({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 FW=w.createContext(void 0);function IW(){return w.useContext(FW)}function LW(e){return Vr(`MuiFormLabel`,e)}var RW=Hr(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),zW=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return y({root:[`root`,`color${L(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},LW,t)},BW=I(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Oo(({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(Mo()).map(([t])=>({props:{color:t},style:{[`&.${RW.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${RW.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${RW.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),VW=I(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Oo(({theme:e})=>({[`&.${RW.error}`]:{color:(e.vars||e).palette.error.main}}))),HW=w.forwardRef(function(e,t){let n=ko({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=PW({props:n,muiFormControl:IW(),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=zW(m);return(0,P.jsxs)(BW,{as:o,ownerState:m,className:v(h.root,i),ref:t,...f,children:[r,p.required&&(0,P.jsxs)(VW,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function UW(e){return Vr(`MuiInputLabel`,e)}Hr(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var WW=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=y({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${L(r)}`,o],asterisk:[s&&`asterisk`]},UW,t);return{...t,...c}},GW=I(HW,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${RW.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]]}})(Oo(({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)`}}]}))),KW=w.forwardRef(function(e,t){let n=ko({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=IW(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=PW({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=WW(f);return(0,P.jsx)(GW,{"data-shrink":u,ref:t,className:v(p.root,s),...c,ownerState:f,classes:p})});function qW(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function JW(e,t=!1){return e&&(qW(e.value)&&e.value!==``||t&&qW(e.defaultValue)&&e.defaultValue!==``)}function YW(e){return e.startAdornment}function XW(e){return Vr(`MuiFormControl`,e)}Hr(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var ZW=e=>{let{classes:t,margin:n,fullWidth:r}=e;return y({root:[`root`,n!==`none`&&`margin${L(n)}`,r&&`fullWidth`]},XW,t)},QW=I(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${L(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%`}}]}),$W=w.forwardRef(function(e,t){let n=ko({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},y=ZW(_),[b,x]=w.useState(()=>{let e=!1;return r&&w.Children.forEach(r,t=>{if(!zN(t,[`Input`,`Select`]))return;let n=zN(t,[`Select`])?t.props.input:t;n&&YW(n.props)&&(e=!0)}),e}),[S,C]=w.useState(()=>{let e=!1;return r&&w.Children.forEach(r,t=>{zN(t,[`Input`,`Select`])&&(JW(t.props,!0)||JW(t.props.inputProps,!0))&&(e=!0)}),e}),[T,E]=w.useState(!1);s&&T&&E(!1);let ee=l!==void 0&&!s?l:T;w.useRef(!1);let D=w.useCallback(()=>{C(!0)},[]),O=w.useCallback(()=>{C(!1)},[]),te=w.useMemo(()=>({adornedStart:b,setAdornedStart:x,color:a,disabled:s,error:c,filled:S,focused:ee,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{E(!1)},onFocus:()=>{E(!0)},onEmpty:O,onFilled:D,registerEffect:void 0,required:p,variant:h}),[b,a,s,c,S,ee,u,d,void 0,O,D,p,m,h]);return(0,P.jsx)(FW.Provider,{value:te,children:(0,P.jsx)(QW,{as:o,ownerState:_,className:v(y.root,i),ref:t,...g,children:r})})}),eG=I($W)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),tG=I(KW)(()=>({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)`}})),nG=({label:e,className:t,children:n})=>(0,P.jsxs)(eG,{className:t,children:[(0,P.jsx)(tG,{shrink:!0,children:e}),n]});nG.propTypes={label:m.oneOfType([m.string,m.object]).isRequired,className:m.string,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired};var{translator:rG}=tW,iG=`pie-prompt-audio-player`,aG=`play-audio-button`,oG=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,sG=I(`div`)(({theme:e,tagName:t})=>({[`& .${aG}:focus-visible`]:{outline:`2px solid ${Rz()}`,outlineOffset:`2px`},[oG(`:not([role="presentation"])`)]:{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:Dz()},[oG(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:kz()},[oG(`:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td`)]:{backgroundColor:kz()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},[oG(` td > p.kds-indent`)]:{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:JR()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${JR()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),cG=/\\embed\{newLine\}\[\]/g,lG=`\\newline `,uG=`preview-prompt`,dG=class extends w.Component{static propTypes={prompt:m.string,tagName:m.string,className:m.string,onClick:m.func,defaultClassName:m.string,autoplayAudioEnabled:m.bool,customAudioButton:m.shape({playImage:m.string,pauseImage:m.string}),language:m.string};static defaultProps={onClick:()=>{}};promptRef=w.createRef();audioId=nW(iG);playButtonId=nW(aG);parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n,language:r}=this.props,i=document.createElement(`div`);i.innerHTML=HR(e);let a=i.querySelector(`audio`);if(a){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,a.getAttribute(`src`)),a.removeAttribute(`src`),a.id=this.audioId,a.classList.add(iG),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,rG.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=aG,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,margin:`0`,padding:`0`,font:`inherit`,backgroundColor:`transparent`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),a.parentNode.insertBefore(e,a)}}return i.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=this.promptRef.current,r=n?.querySelector(`.${aG}`),i=n?.querySelector(`.${iG}`);if(e&&i&&i.play().then(()=>{r&&t&&i.addEventListener(`ended`,o)}).catch(e=>{r&&t&&(r.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!r||!i||!t)return;let a=()=>{i.paused&&i.play()},o=()=>{r.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(r.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},c=()=>{Object.assign(r.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};r.addEventListener(`click`,a),i.addEventListener(`play`,s),i.addEventListener(`pause`,c),i.addEventListener(`ended`,o),this._playButton=r,this._audio=i,this._handlePlayClick=a,this._handleAudioPlay=s,this._handleAudioPause=c,this._handleAudioEnded=o}removeCustomAudioButtonListeners(){let e=this._playButton,t=this._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=this.promptRef.current;e&&typeof YH==`function`&&YH(e)}alignImages(){let e=this.promptRef.current;if(!e)return;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`:``} ${uG}`.trim();return(0,P.jsx)(sG,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(cG,lG)}})}},fG=e=>(0,P.jsx)(P.Fragment,{children:w.Children.map(e.children,t=>w.cloneElement(t,{"data-pie-readable":e.false===void 0}))});fG.propTypes={children:m.node,false:m.bool};var pG=e=>(0,P.jsx)(P.Fragment,{children:w.Children.map(e.children,t=>w.cloneElement(t,{"data-pie-purpose":e.purpose}))});pG.propTypes={children:m.node,purpose:m.string};var mG;typeof window<`u`&&(mG=new DOMParser);var hG=e=>mG.parseFromString(e,`text/html`).body.textContent,gG=e=>{if(!e)return!1;let t=hG(e);return!!(t&&t.trim())},_G;typeof window<`u`&&(_G=new DOMParser);var vG=e=>{if(!e)return!1;let t=_G.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},yG=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFEYXGCscITNDVRcoGRocEUIjJS0eEVI2KSsjNCU6LwFtLx/9oADAMBAAIRAxEAPwD1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARtJNt2S4sDaljMNB2dZfNr9gGn49hfzv1WA+PYX879VgPj2F/O/VYD49hrNqpeyvaz1A0d8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaBY5hSm7QpVZPsUb/rA+mLbV3Fx8zAoAAAAAAAAAAAAAAAAAAAAPhxOYqDcaNtOM3w+YD8bF5u296cnLsb4epAfnV887lrvvV6eLoB88topvSNRJW5xfsA0d/Z/nv8AaAd/Z/nv9oCPPpxTbrcFf+EBtvaZX0rafpe8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veBu0to4VZ7inLXn3TggP0cJnNOpLuae+km27q6XbxA/UoVac1GruKcZLg219nMD9qjUhOKUFO1r+Mn9rA3AAAAAAAAAAAAAAAAAAB8mPxLoU92ErSlxfYgOF7W7S5XszlmMzzNsfTw2AwNKVatVqLxVGK8Z29F7c3pZan6WbNeIuRatRrVM6RD8716jD25u3Z0piNZl5+9MPWv2828zPEYLZHM8Zs7kEZtUYYafcsVXjfSdWpHxot+RF2SdnvWuVbY+VMLgaIrxNMV3OXXfEdERxT1z7tEn2xmvF46uaMLVNu3yabqp6Znjjqj36ukMXjMZj68sVjsVWxNaesqlao5yl6W9WdTRbotxwaI0joctXcruVcKudZ6WyengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN7CYzGYCvHFYHFVsNWhrGpRqOEo+hrVHmu3Rcjg1xrHS90XK7dXConSeh3Z0Q9avbvYTMKGB2rzLGbQZFKa7rDEVO6YqgnxnTqy8aVvIk2tLLd4nLbXyphcdRNeGpi3c6N0T0THF749+rqdj5rxeBrijE1Tct9O+Y6Ynjnqn3aM+NltqMBtDluDzvKMXTxeExtOOIw9ZSsqkJap6cHZ8LKz4olN6zXh7lVq5GlUTpMKxZvUYi3TdtTrTMaxLmuX42U4NxqzaUVeMo726r2110t6voPzfo/To1FVhvqpGevFKwG4AAAAAAAAAAAAAAAAAfgZpWko1au/KSi7KV9fmt6AMQOvHthiMDsVlWy2FxDpxzvMJVa8Y/wAOlQSk4S7V3SdKX+qrcztckYWLuMrxFUfgjd0TV+0THvcTnjFTawdGHpn8c7+mKf3mJ9zCcqCWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGaXUi2wr4zYvNdl8Ripz7y46NahF6qnSrpy3UuzfhVl/rMl+d8LFrGUYiI/HG/rj9piFSyPipu4OvD1T+Cd3RFX7xM+9ltlGKi9y8U3JqTk22mr+p+g4p2zkuFxNOreEIRppO0VdXfzAfSAAAAAAAAAAAAAAAA0VZUowfdpRjFqzcnZAcUziruUG4ylGcVfzNfe+ugGD/Xnqznidj4Saaj3xtbz/ABf7+ooeQ+cdjxJ3n7m/b8LFcoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGUXUeqyp4va1Ra8Z5do158R+q5Pc+c37fhUTIPOOx4mbWVTiqcJVpWcZWi6fBevzXJ4ojmeGgpRjiJL9knHV66/N8yA3wAAAAAAAAAAAAAAAG1ilF4epv8N1+vl9IHDtoXGGH3VFq8XqtF6G+foAwg67zi8Tsju8P2/bstu4bk9fuih5D5x2PEnefub9vwsXihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZOdSj/H7Xf8A0H2YknufOb9vwqJkHnHY8TNjZ7WV5VHBRfJ2TRPFEcwy9zUof4zudvFtfd+wD9IAAAAAAAAAAAAAAABs4tTeHnuSs0m351zA4ftG2sNpNqSacUn62Bg5124OOO2UdrJ/H0r6P/N+XzlDyHzjseJO8/c37fhYxFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAya6lN/je1iva8cDr/8AkE9z5zft+FRMg847HiZrbPb1NqO+oNvTRa8bpXehPFEczy9y7pG1Va6um5NfqswP0wAAAAAAAAAAAAAAAGxjJ7mHmrtNq11G4HDtpFL4uqt/F4JJJPXz8fmsBg912t14zZLdem7jrLs/J/P6Sh5D5x2PEnefub9vwsYihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZNdSn8s2s/RwP94J7nzm/b8KiZB5x2PEzd2fhGcVGSun7yeKI5fgYVEoN4eMocp6byA/QAAAAAAAAAAAAAAAAbOLipYeeidk2r8gOG7RNzp9zcYqKW85pXkvMBg/12oRhidkk14/7fu9eFsNb9ZQ8h847HiTvP3N+34WMJQk7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMm+pSv23tY+xYH+8E9z5zft+FRMg847HiZubOS8ZRat2efiTxRHNcBUh3CFPeSkr6XV3qB9QAAAAAAAAAAAAAAADYxkHKhJqUk4pvR8V5wOGZ81GlKDbV1rfmla33uBg/wBdhp4rZK1tFj+bul+1/m+7KHkPnHY8Sd5+5v2/CxjKEnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABk11Kfyzaz9HA/3gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/2sD6AAAAAAAAAAAAAAAAGxjYKeHld23dUBw3aNN0UpNJdrtfj6L2Awd67Di8bso4xaVsdpe/+jlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyb6lLfxvaxaarAvh/wCIJ7nzm/b8KiZB5x2PEzb2fjvKLV7p3XjNdvYTxRHNsFTi8PCd5X1/hO3HsA+oAAAAAAAAAAAAAAAB8+Oq9yw8v2Ock1bxeQHEdoG6mC8Vt3krR+/vAwa666ti9kteMcd/uCh5D5x2PEnefub9vwsZChJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA+rLMqzPO8fRyrJsuxWPxuJluUcNhaMqtWrLjaMIpuT05I8XLlFqma7kxERyzuh7t2671UUW4mZnkjfLlP4FumP8A+U22X/6HFf8A8GH/ABXAf89H91P6s3+E4/8A4K/7av0PwLdMf/ym2y//AEOK/wD4H8VwH/PR/dT+p/Ccf/wV/wBtX6Nut0O9LmHg6lfos2vpwXGU8jxSS+dwPsbUwNW6L1H90fq+TsvHUxrNmv8Atn9HGsxyvM8oxLwWbZdicFiI6uliKMqc1/qySZl0XKLscKiYmOjew7luu1PBriYnp3PlPbwAZe7A/B/+HGw+QbZ/ha+Jd/Mtw2Y/Fu8PdO491pxnub/xhb1t617K/YjhsbnT7JibmH8hrwZmNeFprpOn5Xd4LJX2zDW8R5fThRE6cHXTWNfzOmOsX0FPoB2uy/ZXwp7+rH5bHMPjHxL4ruXq1Ibm73Sd/wDF3vdceGmu/wBh7Y/jViq9wODpOmmuvJE+qPW5/buxv4Lfps8Ph6xrrppyzHrn1OqTdNIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ/wC2HUh2G6Rdgsi2g2Eq09mNoauUYSpNJOWCxc3Ri26kFd05N8Zw87cZN3Jlhc24nA4mu1ifv0cKeuN/JPL1T8YU/FZRw2Ow1F3Dfcr4MdU7uWOTrj4Swt6R+inb3onzp5Ht1s/Xy+rJvuNa2/QxEV/CpVF4s1w4O6vqk9Dv8DtLDbSt+Uw1evfHXCfY/ZuK2bc8niaNOnknqlxIzmCAAAAAAAAAAAABk11KbfGtrUvxt3A2fL/OCe585v2/ComQecdjxM3tnL3j2a/rJ4ojmmCVX4vBqcd3XTd149twPqAAAAAAAAAAAAAAAAfPjZ7tFxUrOSfNa+bX9QHD9oKtB4ZQ34RndOytvWf2rUDBzrrxaxeybemmOVuf+b8ih5D5x2PEnefub9vwsZChJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf+Uv93M0uY/Rd7q+sN3lz0rZ6/pL1gIotr8qttXsth6tTD19pcqp1aUnCcJ4ympRknZppvRp6WP2jDXpjWKJ+EvxnE2YnSa4+MN3BbQ5BmVb4vl2eZfiqtr7lHEwnK3oTufK7F23GtVMxHU+037Vc6U1RM9bZ2l2T2Y2yyypk21mQZfm+BqJ71DGYeNWF+1KSdn2NWa4o9WMTewtflLFU0z64nR5xGGs4qjyd+mKo9UxqwQ61vU/w3Rzl9fpH6Mqdeps/TnfMMtnJ1J4BSaSqU5PxpUruzTvKN07tX3aRlzM9WOrjCYz8fJPr6J6e9NsyZXpwNE4vB/g5Y9XTHR3MTjtnDvXnoD/yH7Afzay7+zwIZtn0jf8Abq75XXYvo6x7FPdDDL4Rb/K5s9/Nyn/acQd9kbzK57f0hwGevPbfsfWWKZ2riQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ofVtTsns1ttktfZ3a3JMJmuW4lfsmHxNNTjflJc4yXKSs1yaPGHxN7CXIu2Kppqjlh7xGGs4u3Nq/TFVM8ksJenDqDZtlTxG0PQviamZYNXnPJcXUXxmmuL7jUdlUXZGVpacZtlC2RnOi5pa2hGk/mji98cnXG7qTza+S67et3Z86x+WeP3Ty9U7+tiFmGXZhlGOr5ZmuBxGCxmGm6dbD4ilKnUpyXGMoySafmZ3VFdN2mK6J1ieWHCV26rVU0VxpMck8b5j08AAAAAAAAAABk31Kt1V9rpO+8lgLdlrYi9/oJ7nzm/b8KiZB5x2PEzbyCU4qLjuLXVydrcSeKI5tl874eMGpXV9d12evID6gAAAAAAAAAAAAAAAGxjP8RJb8Yqz4q9/MgOHbQ1GqKS3XNK6klrxs0Bg512JXxuynDhjuSX+jlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAB2t1V2l1hNh7v/ANpf7uZpcxei73V9YbvLnpWz1/SXrARRbXjv0wf5Wttv5x5l2/6TU7S77L8xs+xT3Qgu1PPr3t1d8uJRlKElOEnGUXdNOzTM6Y13SwYnTfDMHqS9Yva6W2uD6I9sM5xea5XmdKcMrqYmfdKmErU4Snub8vGdOUYyVm3ZqCjZXRwmbNh2Ps846xTFNVP4tOWJ3a9ffv1d7lLbt/7RGBxFU1U1fh15Jjfp1ftozpzbK8DneV4zJczoRr4PH4ephcRSlwqUpxcZRfmabROLdyq1XFyidJidY9ykXLdN2ibdcaxMaT1S8bNscgeym12ebLOt3Z5PmOJy91PLdKrKG98+7cveFvfabFF780RPxjVAsVY+zX67P5ZmPhOj1h6A/wDIfsB/NrLv7PAie2fSN/26u+Vt2L6OsexT3Qwx+EWv+F3Z/s8G6X9qxB32RvMrnt/SHAZ68+t+x9ZYqHauJc+6NugrpU6WnKpsPslicZhKc9ypjarjRw0HzXdJtRk1zUbtdhrcftjBbN3YiuIn1cc/CGzwGx8btPfhqJmPXxR8Z+jujBfB3dMleCnjdp9kMM2r7ixWJnJPsdqNvU2c/XnjAROlNFc+6P1dDRkbH1RrVXRHvn9HFNt+pJ09bGYSpj6GR4LaOhSW9N5JiJV6iXmpTjCpJ+aMWzNwmbdmYqrgzVNE/wBUafOJmPjLBxeUdp4WnhRTFcf0zr8piJ+EOhqtKpRqTo1qcqdSnJxnCSs4tcU1yZ0sTExrDmpiYnSXbXRt1W+lvpX2Xp7X7G5fltfLqtapQUquYU6c1ODtJOL1Xz8mnzNHj8w4HZt7yGImYq4+KeVvMBl3HbSsxfw8RNPFxxyNvpN6sPS30R7NLazbHKcHTy74zDCyqYbGQrOE5qTi2o8F4tr9rXaetn5gwO073kMPVPC013xo87Qy9jtmWfL4imODrpunV1ObppHLejLov2v6XNpJbK7FYOjiMfDDTxc1WrKlCNKLjFtyei1nFelowtobQsbMteWxE6U66eveztn7Ov7TveQw8a1aa+rc7Xl1E+sHFOUsmydJK7bzSlojSf8A2Gy/zT/bLd//AB21Pyx/dDH2pDudSVPfjLdk1vRd07c15jqInWNXLzGk6NIfAAAAAAAAAAAAAAAAAAAAAAAB7LdHv7gdmv5Hwf8AUwIJjfOrntT3yv2C81t+zHdDkBisoA616YOr50a9NWAdPavJ1SzKEN3D5thEqeLo9i3rePFeTNNcbWepttmbaxeyatbFX3eWmeKf064ajamxMJtanS/T97kqjjj9eqWAXTf1SukrocliM2p4aW0GzVNuSzTBUnejDtr0tXS9N3Dh419Cm7IzLhNqaUTPAuflnl6p5e/oTHa+WcXsvWuI4dv80cnXHJ3dLpA6JzgAAAAAAAAAyb6lNvjO1r4ySwNlfjpiPdzJ7nzm/b8KiZB5x2PEzd2dbSTSb8y+cniiOZYGFZ0ac1WtDXxHFdvaB9gAAAAAAAAAAAAAAAD58bZUJPzNfj7v/P0AcM2jpuUISjFSdrfjtvj2X/UBhB12Zb2N2T0X4uO4K1/ycoeQ+cdjxJ3n7m/b8LGMoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAO1uqt++F2H/lL/dzNLmP0Xe6vrDd5c9K2ev6S9YCKLa8d+l+fdOlnbae7u720WZO172/bNQu+zI0wNmP6Ke6EF2pOuOvT/XV3y4iZzBd59TLYnNtrunjIsfg8JUngNn3PMcfXV1ClFQlGmm+2VRxSjzW9yTOczVi6MNs2umqfvV7o+O/4Q6TKmErxO06KqY+7Rvmfdu+MvUMjqyPHTpZzjC7Q9Ke2OfYGanhsxz/MMVQkuEqc8ROUX6mi8bNtTYwVm3VxxTTHwiEF2ndi/jb12nimqqfnL1O6A/8AIfsB/NrLv7PAjO2fSN/26u+Vn2L6OsexT3Qwy+EWa/C5s8r6+DlP+1Yg77I3mVz2/pDgM9ee2/Y+suvOqf0K4Ppp6ToZfn1OU9n8moPH5nGM3B1knu06Ka1W9J6213Yzs07M2uZNq1bKwfCtfjqnSOj1z7o+ejVZa2TTtbGcG7+CmNZ6fVHvn5avTyUsi2SyKdRxwmVZRlWGc3uxjSo4ejCN3otIxSRH/wCZibnLVVVPXMzKxfy8Nb13U00x1REQxuzr4Qroby7N54HLcj2lzXB0puLx1DDUqcKi8qnCpUjNr9JQfmOstZJx9dHCrqppn1TM/PSJj4auSu532fbucGimqqPXER8tZifjo746NekzY/pZ2Xo7XbFZi8Vgas5UpxnBwq0Ksbb1OpF8JK67U0002mmc3j8Bf2bemxiI0n5THrh0uA2hY2lZi/h51j5xPqlip1++hHKKGV4fpn2dwEMPi/jMMJncaUbRrRmrUq8raKSklBv+Fvw7Ne0yZta5Nc7PuzrGmtPRpxx9eje4rOmyLcURtC1Gk66VdOvFP06dz8v4OrpBjhc12k6MsZiIwjjYQzjBRlpepC1OtFPtcXRaXZCR+2eMFwqLeMpji+7PfH1+L8cjY3g13MHVPH96O6fp8GV3TpsL+Enoj2o2OhSdTEY3ATnhIpXbxNJqpRS9NSEV85xWyMZ9gx1q/wAkTv6p3T8pdttjB/b8Ddw/LMbuuN8fOHkJwLmhLOf4OfYfuOU7UdIuJpNSxNenlOFk428SEe6VbPmm50/nh5ic55xety1hI5I4U+/dHdPxUjIuD0t3cXPLPBj3b574+DvDrX9IL6Oug3aHMsPiHSx+aU1lGCcePda94yafJxpqpJPtic5lzBfbto26JjdH3p6o/fSHR5kxv2HZtyuJ31fdjrn9tZeVBaUUAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ocgMVlAACSjGcXCcVKMlZpq6aHEcbGfpw6j+wnSG6+f7ASobK59O85U4U/2hiZ8fHpx1pN+VDTm4t6nXbIzdicDpaxP8yj/tHv5ff8XIbXyjhsdrdwv8uv/rPu5Pd8GB/SN0VbedFGcvI9udnsRl9VuXcazW9QxEU/xqVReLNejVX1SehSsDtHDbSt+Uw1evfHXCaY/ZuJ2bc8niaNO6eqXEjNYIAAAAAADJnqVq+K2telt3A8r8sRy5k9z5zft+FRMg847HiZv7Ocvv2k8URzPAStSjHk78IPjft4AfWAAAAAAAAAAAAAAAA28Rf4vUsv4L+wDhe0tRfF1Sas/wAZPt1QGDfXW/LNk/0cd/dyh5D5x2PEnefub9vwsZShJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf+Uv93M0uY/Rd7q+sN3lz0rZ6/pL1gIotrH/aLqQ9CO0+0GZ7S5nDPljM2xlbHYjueYKMO6VZuct1bjsrydlc6exm3aOHtU2aODpTERG7kiNPW5i/lHZ2Iu1Xq+FrVMzO/lmdfU+bB9Qzq/YWuq1fLs7xkFxpVszkov8AoKMvpPdecdqVRpE0x7v11eKcm7LpnWYqn3/po7n2H6PdiujbJoZBsNs5g8owUdXCjFudR6+NUqSbnUlq9ZNs5/F43EY655XEVzVPT9I4o9zoMJgsPgLfksNRFMdH1njn3unetb1lck6Jtlcbsrs7mVHEbZZpQlQo0aUt55fCas8RUt+LJJ3hF6uVnZxTN9lzYNzaV6m9djS1TOs/1ackfXo6WgzJt+3syzNi1Ot2qNI/p15Z+nT0PM0rqQPXnoD/AMh+wH82su/s8CGbZ9I3/bq75XXYvo6x7FPdDDL4RZr8Lmzyvr4OU/7ViDvsjeZXPb+kOAz157b9j6y6M6LumrpD6G62Y4jYDN6GAqZrGlDFSqYOlXclTcnFLukXu/jy4WvpfgjpNo7Jwu1IpjFU68HXTfMcfU5vZ21sVsqapwtWnC013RPF1uyKvTb1renrIMw2JwFPMdoMux8Y0cZHLskppKKlGdpVadNbibSveSunbmamNk7E2NdpxFUxRVG+Nap6uKZ3tvO19t7ZtVYemJrpndOlMdfHEbn5eB6mHWRx0I1F0duhCSunXzTBwfzx7rvL50ftXmrZNG7yuvVTV+j8KMqbXr3+S066qf1ZWdSrob6Veh6ltbgekLKKeX4TMpYKtgoRxlGupVIKsqrSpye67SpXb42Vji817VwW1JtVYWrWaddd0x6tOP3u2ynsrG7Li7TiqdIq003xPr14vc5p1yqFKv1btse6w3u5wwdSOvCSxlGzNdleqadrWdOn/GWwzTTFWyb2vR/lDzo6Ftvq/Rh0pbObbUqjjSy/GRWKXlYaonTrL/7cpW89irbWwUbQwVzDzyxu643x80o2TjZ2fjbeIjknf1Tun5PX6nUp1qca1GpGdOcVKMou6knwafNELmJidJXaJiY1h5M9ZXYV9HnTbtVkEKThhauNlj8Joku4V/2WKjblHfcP9Rlt2DjPt2zrV2ePTSeuN37oht/B/Ydo3bUcWusdU7/lxPR/q5bD/g86FNk9m6kHHErARxmKTVmq9dutOL/Rc93/AFUSfbmL+3bQu3o4tdI6o3R3aq1sLB/Ydn2rPLprPXO+e/Ril8Ij0hvMtq8h6NMHVfccmw8sxxqTVpYitpTi/PGnFv0VjtckYHydivF1cdU6R1Rx/Ge5xOecd5S/bwdPFTGs9c8XwjvYfndODAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ocgMVlAAAAA/I2p2S2a23yWvs7tbkmEzXLcR/jMPiaanG/KS5xkuUlZrk0fvh8TewlyLtiqaao5YfhicNZxdubV+mKqZ5JYS9OXUIzTJ1idpOhrFzzHBQTqVMmxlVLEUktX3Gq7Kol5MrS04zbKFsjOVF3Szj40n80cXvjk927qTvbGTK7Wt7Z86x+WeP3Ty+/f1sO5RlCThOLjKLs0+KZ3kTrvhwUxpOkoAAAAAGTXUpt8b2s7d3A/3gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/wBrA+gAAAAAAAAAAAAAAABtYm/xepu+SwOE7RNzW40o2jpJq/PzMDB/rr7vxvZK177uOv2f5uUPIfOOx4k7z9zft+FjIUJOwAAAAAAAAAAAAAAAAAAAAAAAAAAAHa3VW/fC7D/yl/u5mlzH6LvdX1hu8uelbPX9JesBFFtYH7d9ffpX2W232h2YweyuydXD5RmuLwFKdXD4lzlClWlCLlauldqKvbS5SMHkzB4nD271VyrWqmJ5OWNfUm2MzpjcNiLlmm3TpTVMcvJOnrcfq/CJ9M0lajsrsZB2d28JipP5v2wZVOR8BHHXX8Y//LEqzzj54qKPhV/+nCtseuf1gNr6FXCLa6GR4aqrSp5Ph44aS/Rq61Y/NNGxwuVdl4WYq4HCn+qdflxfJrsVmvamKiafKcGP6Y0+fH83SWIxFfF16mKxVepWrVpupUqVJOUpybu5NvVtvmdDTTFMcGmNIc7VVNU8KqdZbZ9fHrz0Ba9B+wFv/hvLv7PAhm2fSN/26u+V12L6OsexT3Qwy+EWa/C5s8r6+DlP+1Yg77I3mVz2/pDgM9ee2/Y+suDdUzoFwvTft1Xe0DqR2dyCnTxOPjC6eJnKVqeH3lZxUlGbbWqUWlZtNbLMu2atk4aItf6le6Oj1z+jXZZ2NTtbEz5b/To3z0zyR+r0oUNkejnZapOnSy/IMgybDyqSVOEaNDD0oq7dlovtb7WSX+fjr0RvrrqnrmZVv+RgbMzuoopjqiIY47S/CG9FOV4ythNndmc/zuFJ2jid2nhqVXzx3252/Sgn5jq8PkjG3KYqu1009G+Z+W75uTxGeMDbqmm1RVV07oj57/k7C6vXWVyzrBVs8o5Zsrisn7xxw0qjr4mNXuird0tbdirW7l9PmNXtvYNexYomuuKuFrxRpxafq2mxNv0bbmuKKJp4OnHOvHr+i9cT97dtn/3OE/tlE+ZY9LWeuf8AGX3NHom91R/lDyvLOiz1P6ofSC+kLoKyHEYmv3THZJF5Li25b0t6gkqbb43dJ0m782yM5mwX2LaVcRG6r70e/j+eq0ZYxv27ZtuZn71P3Z93F8tHX/Wq6D6nSH0x9FudUcAq2DzDG96M2aV70KO9ilG3DWlHFK77EbTLu14wOAxNuZ0mI4VPXP3e/gtXmPZE47H4W5EaxM8Grqj73dwmUeIxFDCYeri8VVhSo0YSqVKk3aMIpXbb5JJHG00zVMUxxy7OqqKYmqeKHj10sbdYjpL6SNoducQ52zbHVKtGM/xoUF4tGD/RpxhH5i77NwcYDCW8NH+2Pny/PVBtp4ycfi7mJn/dO7q5PhGjiRmsEAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/AKmBBMb51c9qe+V+wXmtv2Y7ocgMVlAAAAA626YOsF0a9CuAdXavOI1cynHew+U4Rqpi62mj3L+JF+XNpdl3obbZmxcXtarSxT93lqnij9eqGo2ptvCbJo1v1fe5KY45/TrlgF03dbbpL6Yp4jKaWJls9s3UvFZXgqrvWg+Vero6v6NlD+LfUpuyctYTZelcxw7n5p5OqOTv6Ux2vmbGbUmaIngW/wAscvXPL3dDo86JzgAAAAAGTXUp/K9rLcd3A2X/AOQT3PnN+34VEyDzjseJm9s5y+/aTxRHNME6vxeCUI7uuu9rx7LAfUAAAAAAAAAAAAAAAA2MXNwoSShJ7yaule3pA4TtJNOMVKlPVaPSy19oGEXXZSWN2TsreLjv4Sf+jlDyHzjseJO8/c37fhYxlCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAB2t1Vv3wuw/8AKX+7maXMfou91fWG7y56Vs9f0l6wEUW1489Ml/wvbcXd34SZnfS3+dVC77L8xs+xT3Qg21fP7/t1f5S4eZzAAAAD156A/wDIfsB/NrLv7PAhm2fSN/26u+V12L6OsexT3Qwy+EWX/pd2fdl+5ylr/wDVYg77I3mVz2/pDgM9ee2/Y+su0Pg43hfwfbWRhKPxlZzTdRc1DuEdz6d/1M0+etftVr1cH6//AMbjImn2W76+F9HZfXJ2U2o2w6CM3y3ZTCVsXiKGIw+Mr4WhFyqV6FOd5KMUm5NPdlZeQanK2Js4XaVFd6dImJiJ9Uz/AO0bjNOGvYrZldFiNZiYmY9cR/7V5eQoV6leOFp0ak605qnGnGLcnJuyilxvfSxYpqiI4UzuRqKZmeDEb3oX1EehvbTo42dz7anbHL6mWT2leGjhsBiIOGIp0qPdP2SpF6w3nVdotJpRu+KJdnDamHx12izh54XA11mOLWdN0dWip5O2ViMBauXsRHB4emkTx6Rrvnr14nYfXBhKfVv20jCLb7hhXZdixdFs1WWPS1nrn/GW2zPv2Te6o/yh5WlnRVlt8Hl0hd6Nu856OcZXaobQYVYzCRfD4zQTckvPKlKbf/dI4jO+C8rhqMXTx0TpPVP797ucj47yWJrwlU7q41jrj9u5n9KnTnKEp04ydOW9BtXcXZq67HZtehsmUTMKdMRPG6T64+362D6Cc7WHxPcsfn+7k2Fs7N91v3Xhr/iY1de1o6DK+C+2bSo1jdR96fdxfPRz2acb9i2bXpO+v7se/j+Wry3LIjIAAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/qYEExvnVz2p75X7Bea2/ZjuhyAxWUAAPydqdrNmticlr7RbW53hMqy3DL9kxGJqKMU3wiucpPlFXb5Jn74fDXsXci1YpmqqeSH4YjE2cJbm7fqimmOWWEvTh1+c2zV4jZ7oXw1TLcG7wnnWLpr4zUXB9xpu6prslK8teEGihbIyZRb0u7QnWfyxxe+eXqjd1p5tfOldzW1s+NI/NPH7o5Oud/UxCzDMcwzfHV8zzXHYjG4zEzdStiMRVlUqVJPjKUpNtvzs7qiim1TFFEaRHJDhK7lV2qa651meWeN8x6eAAAAAAAGTXUpTeL2stdeLgVfs/KCe585v2/ComQecdjxM3dnJw3VPeW72305k8URzfA/ksPn+1gfQAAAAAAAAAAAAAAAA2sVFSw87xTtFtX5acQOFbS1KkaailHdtdJ63d/QBg711rfG9k+22O05W/a9ih5D5x2PEnefub9vwsZShJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf8AlL/dzNLmP0Xe6vrDd5c9K2ev6S9YCKLa8eemNNdLu3CfFbSZnzv/AJ1U58y77L8xs+xT3Qg21fP7/t1f5S4eZzAAAAD156A7/gP2Av8A/DWW/wBngQzbPpG/7dXfK67G9HWPYp7oYY/CK2/C9s+9L+DdLn//AKsQd9kbzK57f0hwGevPrfsfWXXfVd6fZ9BG21XF5lQq4nZ7O4Qw+a0qSvOCi26daC/hShvS05xlJcbG2zDsb+MYeKaJ0rp30/WPe1OXdtfwbETVXGtFW6r6T7npnshtvslt/k9PP9jNoMFm+AqpNVcNU3t1tX3Zx/GhLtjJJrmiQ4nCX8Fc8liKZpnp/wDb1fwuLsY235XD1xVHR/7c+zvPkGExc87eV5fRxUVKc8X3CEaiTT3m52v231PHlbtVPk+FMx6tfo/TyVqmrynBiJ9en1cP2b6d+jLbDpDxXRlsvtDTzPNsFgqmNr1MPaWGShUjCVNVL2nUW+naN1ZPW6aM6/sfGYXCxjL1PBpmdI1498a66ckdbAsbYweKxU4OzXwqojWdOLdOmmvr6m9057K1ttuh/a/ZnC64jGZTXeHXlVoR7pTj5ryhFX5XPOyMTGEx9q9VxRVGvVO6fk9bYw04vAXbMcc0zp1xvj5vIMuiEuR9HW2OM6Ptusi21wLn3XJ8dSxTjC16lNS/ZIa+VByj85i47C043DV4er/dEx+k+6d7LwOKqwOJoxFP+2Yn9Y98bnsXl+OwuaYDDZngqndMPi6MK9Gdrb0JxUov1NEGrom3VNFXHG5e6K4uUxXTxTvYAfCE9IMc86Rcp6P8FiFPD7NYN18SoyWmKxFpbrXmpRpNfpv56dknBeRwteKqjfXOkdUfvr8EwzvjvLYqjC0zuojWeuf20+LFA7VxAAAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/qYEExvnVz2p75X7Bea2/ZjuhyAxWUkpRhFznJRjFXbbskhxnExn6cOvBsJ0eOvkGwEaG1WfQvCVSFT9oYafDx6kdarXkw05OSeh12yMo4nHaXcT/Lo/7T7uT3/ByG183YbA62sL/Mr/AOse/l93xYH9I/Stt70sZ088262gr5hVi33GjfcoYeL/AINKmvFguHBXdtW3qUnA7Nw2zbfk8NRp3z1ymmP2litpXPKYmvXo5I6ocSM5ggAAAAAAAADJrqUt/HNrFfTdwP8AeCe585v2/ComQecdjxM3dnFJRVnHefO2nMniiOb4C/xSnfjr9rA+gAAAAAAAAAAAAAAABsYxruEouputp2W9a/mA4RtHPeShvR4X4q7+js7AMJOu1u/HtlN2DirY7RvX/oCh5D5x2PEnefub9vwsYihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6suzTM8nxKxuU5jisFiIqyq4atKnNLs3otPkjxct0XY4NcRMdO97t3K7U8K3MxPRufoZrtttlntD4tnm1udZjRtbueLx9WtG3ZaUmj8reEw9mdbdumJ6IiH63MXiL0cG5cqmOmZl+KZDHAAHZvQD0L590z7fZdk2GyvFTyOhiIVM4xsIuNOhhk05x7pwVSS8WK43d7WTa1G2tq2tlYaq5NUcOY+7Hrnq9UcrcbF2Td2riqbcUzwIn708kR1+ueR6uY3GZZs5kuIzDF1KeEy7K8LOtVk9IUaNODbfmSjF+oitFNd+5FNO+qqfjMrZXVRYtzVVuppj4RDx36Qdr8b0gbcZ5tnj3N1s5x1XFbsndwjKXiQ9EY7sV5oou+CwtOCw1GHp4qYiP39/GguOxVWNxNeIq46pmf293E48ZTFAAAAAAAAAAAAAAAAAAAAAAAAAB7LdHv7gdmv5Hwf9TAgmN86ue1PfK/YLzW37Md0OK9MHWD6NehXAOptXnCq5lOG9h8pwlqmLrdj3b2hF+VNpcbXehmbM2Li9rVaWKfu8tU8Ufr1Qwtqbbwmyadb9X3uSmOOf065YBdOHW06SumSVfKaeJls/s1OTSyvBVWnWjqrYiqrOrx/FsocHu3SZTtkZawmy9K5jh3PzTydUcnXx9KY7XzLi9q60RPAt/ljl655eri6HSB0LnAAAAAAAAAAAAZN9Sl2xW1t2krYFu682I5k9z5zft+FRMg847HiZu7NpRUUr8+Lv2k8URzbAK2Fh57/AGgfQAAAAAAAAAAAAAAAA2Mar4ad76di9wHDNok40nJX1Wrtf0a8uHqAwf67CisZsmle6WPTurf6OUPIfOOx4k7z9zft+FjGUJOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkB1G8uwOZ9PmCw+Y4Ghi6Ky3GS3K1JVIp7lr2aa5/Scxm6uq3syZonSdYdRk+im5tOIrjWNJemNKjhsFQVKhSpUKNNO0YRUYxXF6LREimZrnWd8q/ERRGkboYYddHrQbPY7Z/E9EHR5mlDM6mPtHOsww1RTo0acZp/F6c07TnJxW+1oo+Lq21Hv8q5eu0XYx2Kp4MR+GJ456Z6PV/wC1n+a8w2qrU4DC1cKZ/FMcUdEdPr+HVg6UVOAAAAAAAAAAAAAAAAAAAAAAAAAAAMrtvOvZtC9kMp2M6J8vqZMsJluGwuKzbGQhPEucaUYzVGn40IK6fjtyb4pRepxWDyfa8vXiMbPC1mZimOLj5Z456t3vdtjc43fIUYfAxwdIiJqnj4uSOKOvf7mLWY5jmGb46vmebY/EY3GYmbqV8RiKsqlSrN8ZSlJtt+dnZ0W6LVMUURpEcURxOMuXK7tU11zrM8czxvmPTwAAAAAAAAAAAABk11KVfF7WXs1u4Ff2gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/2sD6AAAAAAAAAAAAAAAAGzjHFYWq5vxd1p6X08/mPsa67nydNN7hu0zn8XUd17mjvra9+HYfH1g311vyzZP9HHf3coeQ+cdjxJ3n7m/b8LGUoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfwWPx2W4iOLy7G18LXimo1aNRwmr8bNanmuim5HBrjWOl6orqtzwqJ0nofs5p0hbfZ3gll2dbcbQY/CKO6qGKzOtVpqPZuyk1bV+s/C3gcLZq4du3TE+uIiPoyLmOxV6ngXLlUx6pmZ+rj5ksUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZNdSn8s2s/RwP94J7nzm/b8KiZB5x2PEze2c5fftJ4ojm2B/JYfP9rA+gAAAAAAAAAAAAAAABtYpSlhqqjPde69bXPsdL5PQ4VtNu9zirPetxvpa/YfH1g711vyzZP8ARx393KHkPnHY8Sd5+5v2/CxlKEnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABk11Kfyzaz9HA/wB4J7nzm/b8KiZB5x2PEze2c5fftJ4ojm2B/JYfP9rA+gAAAAAAAAAAAAAAABtYqEamGqxnG63W/n5H2J03w+TGu6XCtppPucY6Wtfhrx7T4+sHeut+WbJ/o47+7lDyHzjseJO8/c37fhYylCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAya6lP5ZtZ+jgf7wT3PnN+34VEyDzjseJm9s5y+/aTxRHNsD+Sw+f7WB9AAAAAAAAAAAAAAAAD58d+SVeP4vJtNff1duh9p43yricP2mj+11PdXJXs78fV+s+PrBvrrflmyf6OO/u5Q8h847HiTvP3N+34WMpQk7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMmupT+WbWfo4H+8E9z5zft+FRMg847HiZvbOcvv2k8URzbA/ksPn+1gfQAAAAAAAAAAAAAAAA2cXf4rVUW03Bq64rz8GIJcN2jVOWGctd6Nlqrc/pAwc666axmyd014uO+zDlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8vPNqdndmqcaufZzhMEpK8VVqJSku1R4v5kYmL2hhcDETibkU6+ud/ujjZmE2fisdMxhrc1aeqN0dc8T8nK+lTo9zmssPgNq8E6spKMY1XKi5N8lvpX+YwcPmHZmKq4Fu9GvTrHfEM7EZd2nhaeHcszp0aT3TLlSaklKLTT1TRueNpeIAAAAAAAAAAAAAAAAAAADJvqUp/G9rJcksCv7QT3PnN+34VEyDzjseJm3s/UjTUXNtJu17Pzk8URzjA/ksPn+1gfQAAAAAAAAAAAAAAAA28RGpKjKNJJuSa1YHC9oIVJwVo9t227fMub9AGEXXeX7a2Rldu6x/F66fF1+ooeQ+cdjxJ3n7m/b8LF4oSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4t0k7ZQ2I2VxObxcXipfsOFi7O9Rp2dnxSSb+a3M1G3NpxsrB1Xo/FO6nrn9ONuNhbLna2MpsT+GN9XVH68TFC+0+3e0MIUaGPzfNcwquNChRpzxFatU5QhBJuT/ipehciL38RdxVybt6qaqp5ZWqxh7WFtxas0xTTHJD6dtOjrpA6OsZSwW32wef7MV8ZDutChnGW1sJOcL8YqrGLa86Pxfs7Q6BOknHPNo7D5tinXwleM+99SbcpwnFX7nfjuOKbV+FrI7zKG27kXo2fenWmfw9GkcXVpHucFnDYluqzO0LMaVR+LpiZ4+vWfe7/ACkpoAAAAAAAAAAAAAAAAAADJzqTxcsVtYkld/EEvViCe585v2/ComQecdjxM28hjKO4tWnxSTX0/OTxRHNMA5woxo1IS4XjLimn9nzsD6wAAAAAAAJfWzT42QBNPVO4FAj3tWrPTRecA3w0vf6AF9bAE07pPhxAjTcHF2bas9NPUBxfPsPKVp8UpSjJcX4urd1btAw566uyuIxmyuV7S0aNSp3oxkqdZ20p0qyScm+zukIR+dfN2uSMVFrGV4eqfxxu6Zp/aZn3OJzxhZu4OjEUx+Cd/RFX7xEe9hyVBLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdLdZ2vOGRZNh0lu1cTUcu3SKt9pwee5nyNnrnuh3uQ4jy96eiO+WQXwLezuTZl0+7V59jsBTrY7KNnl8SqzV3RdWqozcextRSvxtdc2TZS2XHwwuSZTmHVPp5tjMBRq4zLdo8G8JXlHx6O/CqpqL4pSSV1wdl2IDxu6HmvwlZEr8cQ+X8V+o22wqpo2jZmn80NTt2mK9m3oq/LLMAt6GgAAAAAAAAAAAAAAAAAAzC6mOy2IweyeabSV6E4d9sZGNF2/wAZSoXSmu1d0lONvMyX53xUXcZRh6Z/BG/omr9oifeqWR8LNrB14iqPxzu6Yp/eZj3Muslw8rQXjOEHHjZtNJ8fUvn7OJxTtnM8JFRo3i7p6J9qSsn89r/OBvgAAGinJzhGTdna0kuF+YGsABJJuLUZWbWjtwAoEcU7taNq11xA03cUlbRXvz0+24GpNO6T4cQKAAjSejVwDV7atWd9APyc4w0KkKkXFN7rmknx4X9Gm8/PZAdZ7Z7L4LaXKsTlGa4ONbB4ym8NWpyjdShK6dufPlrfW97H62b1eHuU3bU6VUzrEvyvWaMRbqtXY1pqjSYYF9J/Vt202Jx1bEZBg6+e5S3vQlhoOpiKMW9I1IJJy5+PBOOjvuvxVV9lZqwmOoinETFuvp3RPVPJ1TOvXxpNtbKmLwNc1YeJuUdG+Y645euI06uJ1LicLicHVlh8Xh6tCrHjCpBxkvSmdPRXTcjhUTrDl66Krc8GuNJbR6eQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0j1oP8A1TkP/ia3+zE4PPf+jZ657od9kP8A1r3VHfLJj4E1L8M23r/7P0f68mylMtfhef3n+J1/94sv/wBmqB4w9DkN7pJyOV7bmIv6fFa/WbTYvpCz7UNXtv0de9mWX5cULAAAAAAAAAAAAAAAAG7hsLicZVjh8Jh6terLhCnByk/Qkea66bccKudIeqKKrk8GiNZdt9F3Vt2z24x1LE7Q4TEZDk8HvVamIp7mIqxT1jTpy1Tdrb0lZXulK1jmNrZrwmBomnDzFy5yacUdcx3Rv5N3G6nZGU8Xj64qxETbt8uu6qeqJ753cu/iZ2bGbL5dkOXYHKMtwtLD4LB0o0qMYrSEY2SjfW78/N9r1JRevV4i5VduzrVVOsyrFmzRh7dNq1GlNMaRDsbJsNOn3Kaptyb33Faacfm+ftt2M/J+rkUI7sVG97JK/wDzA1AAI72dnZ8gNELS1taUW0+fHW1+zh9AG4AAAAAADTKF5RknZrS/m7PoQCM7u1rXV1fi/mA1AAAG3Vpd0XHk/N9PLVIDjecZSoqbtuvWSnG61tdWSv61wb9AHDMyyOClKo8NepBtKnKO7a997TlwWi83YB+LidnI1tZ4fWbkpX5PxbSfLjJffiH5ktloKyWH3ZOVlePN8rc1r7uAG3PZTDWk6bbUXbm9Eld34cftQGl7JUl/CW62kpWlbW/Hs4fdagHsnBLW0bK7clJLzL0v9TAPZKCvpZKN25KSALZGMnFRWjtq1Li/t94EWycJRvBbzSd7KX23Ar2Spp7t05P8WylrrYAtkVa8o217JXta9wItkoys4RvFvR2l22Ar2ThGydruTS0lZ6ff1gFsje/iWt5pagR7Jwcmoq/pUr8E72v5wKtkYpKU1Za30loBFsmm2lFXXFeNdekCvZKMY70lZbt9IydvMwJ4JLelDdV4uzS3tGBfBGKV5Rf4t7KMnr2ATwTW9u2Tdr2W9wA1LZFaOUbXveyk2gNL2TirXilfhfe9X0oCrZG9/EtbzS1AS2Sir2jp51JcrvmBFsmpJOMU03xW8BqeyK4KN3fslawGnwTjdLdV3wXjagVbIp6uNtbcJX9IDwR10hxdlpK/GwGlbKKSbhFSt2bwGt7IRV1a7ukrKVmBpeyaSbcUrK7vvAWOySk14qs+dpWAeCKsrRd7XekgI9k4xV5RSS7d778mBVsjd23LaX4S9QB7IrlF8Fe6kgI9k4xV5RSS7d778mBVsjd23LaX4S9QB7IrlF8Fe6kgI9k0k24pWV3feAsdklJrxVZ87SsA8EVZWi72u9JAPBHlucXbhIDStlFJNwipW7N4DW9kIq6td3SVlKzAngj/ABPokBPBON0t1XfBeNqBVsinq421twlf0gHsj2Q05aSAj2Stxh9EgC2TUknGKab4reA1PZFcFG7v2StYCeCP8T6JAR7JxVrxSu7L8bj92gKtkb38S1vNLUA9kVd7sW1e2qkgHgj/ABPokBgl8K5lEcr2D2Ge6t6pmWK7b27nTfP0oD874E3/ACzber/s/R/rwMtfhef3n+J/nFl/+zVA8bugDbHI+j/pl2T2y2lq1KWV5VmMK+KnTpd0nGmk02o83qgPQfLfhLerzi83jgMVs7thhMDKpuPMK+EouEVr40oQrOVrJ2STfDTjYMqujvaHYbpY2cwu13R3n+FzzKcX+LXw0pb0HzjODtKE1zjKzWt7Acl8Fry3Y0JPS/O9u3iBfBSX+jT+n2gPBSX+jT+n2ga4bJJqTnBwtG+qlr9IE8E024qKvF2a8bQC+CP8T6JAPBH+J9EgHgjHccpKzXK0gJ4JptxUVeLs142gF8Ef4n0SAeCP8T6JAVbIrdvu62TtaXPl/wAgNK2Ti3uqKva9vG4Afbl2y8YTlCorRcXJOzdnbjr+rUDk2W5LGnGbkoxlzUb3aVr6vz7y5PTzaBy7L8qjRmpyUXaN47qb3eF35+DYHI8FhHh/Hl+NKKVnq49uvq9QH1gAAGipLdTlyinJ9nz/AH5AWEdyKiuC0Xo5AagAAAAAAANurayTfF2VuOumn37QNavZXVnzAoAABtYml3WnupXfov5u1doH5VTJ6uJklUgocbtu6V+xJ6WbbA+Cts9OUtYR5vxJa7rs+GnZbhx83APnxGzfi+JhIQTlGylDhK+9or+d9vNAaIbPw3k3RhaUIySUXuu/B69u8/naXJAIbPJ71Pua7o7Jvdbu2uGvmjf1+dgI7PwlLdjTjreySbT9/i+rXmwIsgp79+5xaVkkldat2XDzvX0eYBPZ2Mp7ihFyuoxitNeHzcX90BZZDSnuzUYxi/Git211yeqAkdn4dzUVTUUtHLdcnbhr5tF6XfncCLIKMHvunCVk278EtHfh5vt7WBZbOwUpRqpKSdmrW1562+kC+D8JLdhSildybSvdLVvhyu/oXYBpWz9BpNqLuteXFei4Fns+mu6OEYxXHxb2vqlw8/Ds8yAd4KMdVGLas1yaa1+1ASWzsYWcoxUUmvxddNOzV3t9IFeQUYp7sYt9vB8nbs5AHs7GNm4xUeGsezjy46ev0gO8FBwsoxvJPXg1dW7OwCS2eju77hFJcfF5vW2i7H9gFWQUEpLdjvLS/Cz52aX0gFs7F33YR5vhfS93y8/2eYCQyCimt+MHrbh6+Xo+6APZ+k5b27HS78yWj7OGn29rAPZxRk4yjBS4JNW9enoA1d4aEorcjFJO/C17cLpoDStnI7nixilFcWr6cE728328wKshoRd5QhJcOHN+hen7sCS2dpSlolJt/O+K7PP97ICvZ6F1KSglJby8W1128ACyGhbd3Ypu+qXFefS3H9TAkdnae94sU/p52XL+N9nYgHg7CLamoXXmt+oCvIaEtN2MbK9ktNfSuz2ASOzkG3GEE29FpfW3o/i/b5wC2fpLioPXs9wFeQ0ZPhFWSsktF6192BI7OQbcYQTb0Wl9bej+L9vnALZ+kuKg9ez3AV5DRk9VFaOySukvV23+0CR2dp73ixT+nnZcv432diAeDsItqahdea36gLLIaL/gQSXJa6v5vN9gEeztJu0YqV3ZW4812ef72QFez0LqUlBKS3l4trrt4AO8FLd3Ywp3el72v6dAIsgoNKUbcecbfqALZyO54sYpRXFq+nBO9vN9vMCxyCindwpy9P8AyAneCi5eNbV8bX9PL0fSA8HqSd1GLtdvhZLR9nm+3tYFezkYScZximuTVn9gCWQ0d227BJcbc/oAng9RacXu3Wj/AF2dvpAq2di77sI83wvpe75ef7PMAjs/SVnKNOXb2fYAeQUm7tR9i9XYBHs9QlHlqvRx+YDzt+GWy74j0b9HslT3VPN8ZyXHuVN8vT9gHXfwJt/wzbe/zfo/14GWvwvP7z/Ffziy/wD2aoHh7s/kecbTZ5gNndn8BiMdmWZ4iGEwuGw9Nzq1qk3uxjGK1bbfADvzpZ6gfWj6F9gqfSZtx0erDZRCEKmNeDxlLE1MBvJNOtCm3uK7s2rxT4tAcD6CusV0odXfNc0znozzmhhK2bYKWDxVLE0FWoyWu5U3HpKpCUm4tp2u07ptAfs1uuZ1pq+ZyzmfTftR3dtXUcVajfjbuSXc7acN22nCwGbHUs+EnzHbDanL+inrAfEPjGa1aeGyzaGjRhh4zrtWjTxME9xOUtFOCSvJXiuIHpjLIaS1tSilJR4N8b25cfxvo7EBVs/SavuxXq9gDwfpdkPo9gFWQUbreUWly+6ALZ6m34lNPe8VRjG+qXC7XYk/6XnAng/S7IfR7AHg/S7IfR7AKsgpXvKMJen/AJATwdhxjBO6eijfglfW36Ovp7WA8H6XZD6PYBVs/STut1NffsA3KeT7jj+yWUWmrPhx5fOB+tgsos9+U5PegnJtr8a6a7eCf/ID9WjhaVBWUU3zk+LA3gAAABtpuorxdotKz7U/pQGtJJJJWS4ICgAAAAAAAaZw3ra8NUnwvyYByau3HRc/YgLdXtfV8gKAAAAJZXvbVcwJKEZXUldPinqvUBVFK1layskuAEUIq9la7u7aXYBwg5Kbit5cHbUA4RlFxkt5Pk9QEYwS3Yx3VF8ErL76gSVOlvd0lCG9deM0r35Aat1NNNXUuKeoGmNKlB3hTjF9qVgK6cJRUZxUkvK1+0CRpU4pqEFG/HdVvsAs6dOdt+EZW4XVwJGlTimoQUb8d1W+wCzp05234RlbhdXAkaVKDvCnGL7UrAV04SiozipJeVr9oGnuNCLUlRgmmrWiBr3U001dS4p6gaPi9D8zT/ooDVGMEkoJJRbso6ICSo0pPelSg2+bigEaNKL3o0oJrmooCuEZRcZLeT5PUDT8Xofmaf8ARQGqNOEVuwioq9/F0AkqVKbvOnGT7WrgT4vQ/M0/6KA1qKVrK1lZJcANDo0JSd6MG+LbiA+L0PzNP+igNdtbgaHQw6snRp68PFQD4vQ/M0/6KA121uBo+L0PzNP+igHxeh+Zp/0UBrUUrWVrKyS4AaHQottujBt8XuoB8Xofmaf9FAao04RW7CKir38XQCSp0qj3p04yfDxogT4vQ/M0/wCigLGjSi96NKCa5qKArhGUXGS3k+T1A0qhh3dKjT04+KgHxeh+Zp/0UBqUIxSUVupcEtEBJUaUnvSpQbfNxQE+L0PzNP8AooAqFFNNUYJrg91Aa91NNNXUuKeoGj4vQ/M0/wCigCoYdpNUIa/xEBY0qUHeFOMX2pWA2sbicBgcHUxmZYihQwuHjv1KuImowhFcZSlLRLzsDojOOvT1PMizSpk+YdOeyaxVKbpzVKv3WMZLk5wTitdOIHcOyO12xe32SYfaPYvPcqzrLMVFTpYrA16danNeaUW0B53/AA3FOnDo16NtyEY3zjHXsrf9FSA6h+BNv+Gbb3+b9H+vAy1+F5/ef4r+cWX/AOzVA8vvg5oQqddbosU1FpZnXklJX1WErtfOnr8wHuN1pqFPE9W3pPo1aMasJbKZnvQlHeTXxeb1QH82GX4WpjcfhsHScVOvWhSjvcLykkr6PTXsYHt9lnwSPVb/AAVQ2WxmW5rX2lqYFp7Rd8KsasMY46VY079z3FLhBxaavze8B4qbU5Didjds822YljFLE5HmdfAPEQbinUo1XBzT4rWN0wMmMR8KH1yFh8Ll+C6RMNgqGCw9LDRjSyyjvT7nFR35ympSc5WvLW13wAyN6rfwum0GI2iwOyfWWy3AVsux1eOHhtLgKTpTwk5KyliaPjRlC7fjQS3Ul4rs2g9XcvqZZmOCoZjl1ShicLiqca1CtTanCcJRTjKL5pqzv5wPo+L0PzNP+igNcYxit2MUkuSQGiVKjOTcqUW+bcf1gT4vh42Xcaer0ukBfi9D8zT/AKKA1RhCCtCKiuxKwElSpTd504yfa1cCLD4df9DD+igHxeh+Zp/0UBqhTpwvuQjG/GysBqAAAAG3Z7705pq+qXn/AFAbgEur2vq+QFAAAIrNuSd+XHsAoAAAAAAAACWV721XMCgRq/OwB30s/SAd+SAJWAJ3SbVvMATvfzAG0rJvjwAoAAAAjSdm1w4AUAAAiXHW9/oAO/JgErJJcgGt+GgFAl9bW+cCgRO9/MBQJ4sk4uz5NAUAAAARq6aTt5wKBErJJcgCvZXd3zAoE1vw0AoEbsm0r+YCgRJK7S48QF9bAUABE00mndPgwKBGuGtrfSASsBQJrfjoBQAE1vw0ANJ6NXAoEvra3zgUDyV+GH6zm08NrsF1btmMyrYLKcPgqOZZ53GdvjdSpd0qUmn+LGKu4u920+QHnVlXRZ0kZ3sziNtMn2GzrHZFhLqtmFDBznQh6ZRVtL/Q+xgc06vHWe6VOrRtpR2q6Os9qLD1aqnmOVV5ftTHwvrGpDhF2taUdVZa20Ay4+ET60mwXWq6uPRhtrsfP4rjMPnONo5pldWadbA1+40rxklxi+MZcGrAb/wJv+Wbb1f9n6P9eBnn8Il0LbY9O3VizrY7YHBvG53hcZh80w2Cj+Pi+5b29Shf+E1NtegDzq+Dj6ofT5lvWl2a292u6Oc42cyLZGWJxmMxWZ4V0VOboVKcKVNSacpOU1qrpJO/ID1e60Kb6uHSbZf+6mZ/2eYH83Gzn7ocr/8AG0P9tAf1IYKSlhaf42kVx56cfQB/Mp00X/DVt3ZpPwpzTVuyX7bqcwPQ7qf/AAVXRl0v9A+S9KPSttPn1LMtrMNPF4PDZXWp04YLDOUo0m3KD36rUVJ3W6t61m9QMDus50JYnq6dNu03RBWzbvnSyWtD4vi3FRdWjUhGpCTXKW7JJ8NU+QHs58Fhthmu2PUx2RhnOIqV6uQ4vHZPRqSlq6FKvJ0o6cownGCXZBAZcgANFSTi4JO15WfaBqSsBQAEaT0auBQAAAAAAAAAABLa3uwHjW5N39GgC+trfOAsr3tquYC1kkm9PnuA8a3Ju/o0AX0V01fl2AE07pPhxAoAAAAAAAAAAAAAAEsr3tquYC2twDXDW1vpAO+ln6QDvyQC+trfOAbtbzgG0tW7AUAAAAAAAAAAARpOza4cAKBErAGr87AUCK+t36ADvZ2V3yAoETvysAbsBQJdXtfVcgKAAAAAACNJppq6fFAUCNXTT5gUABErJJu/nAoEV7K7u+YFAivzQBuybSv5gKB4f/DBbCYzZzrRx2tdKSwO0+UYatSm27d1oxVOpFf0Yv8A1gMsfgb9v8k2o6As96MMVTozxezuaV6lXD1Ypqth8Ruy3t21mt68Xf6bgdM/Cb/B+5XsJg8X1hehbJ3h8ndVPaHJ8PTXc8G5f5zTX8GDdlKPJyVuIHmcpyUHHedr33eK4cfSB6N/Amu/TLt7aTivB+h4i4P9n4vz+1gexTV7eYCgfFneTZbtHkuYbPZxho4nAZphauDxVGXCpRqQcJxfmcZNfOBhRsT8Ef1cdiulPC9IMc52kzTB4DGxx+DyPGVaUsPTnGalFTnu79SCaWj111fADOKK3YqPZotb6elgfzm9YzoG6WdnOsbtvspitg86xGMxe0uNq4P4vgqk44ulXryqUp0pbtpKUJxd1e19QPdzqo7C5/0ZdW/o62C2poRoZtkuz+Fw+MpJ37nV3FKUL87OTXzAeL3wo379Tbj/ALvAf2WmB6QfBBXfU9wzaSb2jzHnrwpJX+b6LelhmyAA26qbimlqne64r2+y4GtNNJp3T4MCgAAAAAAAAAAAAAAAAAAAAAAI0mmmrp8UAtxs2ru4Bb2u9bjpbsAm8rXl4tld35AagAAAAAAAAAAAAAAAAAAAARpNNNXT4oA1e3mAW1vf5gHja8Hrpy0AN2TaV/MAbtbzgLq9r6vkBQAAAAAAAAAAAAAAAAABEkkklZLggCVgFtb3+YBrfjoA1vw0AN2TaV/MBQIndJrmATTuk+HECgAAAAAAAAMIPhZugqp0pdXZ7c5PglVzjYTErMFuxvUqYSfiVYJ2bst5TtpfdQHmd8Ht1gaXV+6x2R5vnGKrU9n8+fejNFCWkY1WlCo1z3ZW7NGwPf8AzPLMj2tyHFZPm+Dw2ZZTm2FlQxOHqpTpV6FSFpRkuDTjL6QP56Ou/wBWzHdWTp1zjZCkt/IMxnLMcjrXu5YSbdoS0spRd4210SfmQZO/AouUumfbpxa12fpOd76Lu9oxXn+iy43A9inxWr48kBQAGinpdNJNvetftA1Li1d9vADTKjRnUhWnShKpTvuScU3G/Gz5XA1geAnwof79Pbn9DA82/wDNqfaB6R/BB73+B1g22t17RZlursV6d/pv99EGbAACO9nZ2fIDRTtFula1tY35rzejh6gNwAAAAAAAAAAAAAAAAAAAAAAAAAAI1dNPmBN3xt5Pjo9PT7QG81+NG3DhrqBU09U7gUAAAAAAAAAAAAAAAAAAAAAAAAARRSbklq+ICztpLnzQDW/DQAnx0tb6QG8rKTdk7cdAKAAAAAAAAAAAAAAAAAAAAAAAjim02tVzAoESskm7+cAr2V3d8wCvzQBPjpa30gL62AXV7X1fID4s8ybLtosmx2QZvho4jBZjh6mFxFKSTU6c4uMlr5mB/OR1seg3OOrx06bRbB46h3PDUsXPFZbUUWozws5OVK1+LUXG4HsH8GV1lodPHQLg8gzzMe7bU7GRhlmPhLWdSjFfsNbhqnGyfJNWAx7+G52VzDE5T0b7X4fK9/C4SpjcHiMXGDbg5dzlGEmvxU9Wr2u78bAcH+BJyjMqnSV0iZ9DBVXgKGUYTCzxG74iqzqyahe1r2i3a/C3agPX4AAA0JS3lvK9lx7H939+Yala7tfjrcCgAP53/hCtocPtP1y+lHM8JUhUpU82hgoyjzeHoUqMr+fepsD1Z+CYy14DqX7PYpRtDMc3zXE03e90sTKlf10n7uCDMcABt1fxqS7Z/qYG4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASyve2q5gLaOzavz7AJvWbu7LRaq2v3sBqAivZXVnzAoEvra3zgUAAAAAAAAAAAAAAAAAAAAAAAAlle9tVzANXt5gDXDW1vpAa346AN5Wcm7JXvfQBrfhoBQAETuk2reYCgAAAAAAAAAAAAAAAAAAAAARpOza4cAMD/hYOrDU6WuiOl0rbJ5Q8RtLsWpVMQqME6mIy+zc1prLc4pekDzU6h3WRn1Z+n3LNo82xk6GzWcLvXn0dbRoSfi1WrXvCWt+ScgPfvN8i2K6Udk4YLP8py3aDIc1owrxpYinGtRqwlG8ZK/mejWuoGjYno42D6N8qlkmwWyeW5DgpzdSdLA0FSU5PnJrVv0sDkgGlXUnGUk76rtArduVwCik20rXAoEbsm3yA+XN80wWR5Tjc7zKsqWEy/D1MViKj/gU6cXKT+ZJgfzDdJe089tekXafbGrJynnmb4vMZt8XKrWlNv1yA/oK6iew9Xo+6o3Rhs5iMJLB4pZJDHYmk0lJVcTOeImn571Xfz3A76AARuzWj9KAkVFNqL0VlbkvZyArvyYFAjvZ2V3yAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ1JXklvNcOT466/fgBqjJSV0/cBQAEtrcCgAAAAAAAAAAAAAAAAAAAAAAAAAAAARpNNNXT4oAk1bxr2Wt1qwJvNfjR7XpqBbq9r6rkBQIlYCgAAAAAAAAAAAAAAAAAAAA2cZhMNj8JXwGNoQrYfE05UatOavGcJK0otdjTaA/n7+EE6sGP6tvTnmNHA4KpHZXaWpUzHJa1vEjCUvHo38qMr8lo1xAzu+CU62lLbbYqfV+26z+M8/2ejKpkksTUXdMVgEl+xptpydN3VrN7ttdAPRwABpkrq64rVAIyu2nxT7Laff7ANQAABj/wBfTpFh0X9UrpFz9VJwr4vKZ5Nh3Fre7pi/2unrxsqkn81/OB/P30b7KYvb3pB2d2NwmGqYqvnma4XARpw3t6bq1ow5Jv8AhAf085TluHyfKsHlGEio0MDh6eGpJKyUIRUUrctEgPrAAbcW3VlroklZ/avvy8wG4AAAAIkkkkrJcEBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEaTs2uHADTFSjZPxr8X7gNUZKS3ou6YFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpcU4OC8VWsraW9AF8aztZ9i4AE+OlrfSAjJSW9F6AUAAAAAAAAAAAAAAAAAAAOgeuv1YMq60/Qtj9jXuUM/y6XfHI8W1rTxUIv8AY2/Jmm4v0p8gPAvLcx6Rerz0s0swwscVkW1uxuZtqNanKEqdanKzjKLs3GSumucZPtA9/Op91ptkutV0V4Xa/J6tHDZ3gYww+eZUqu9UwWItzvq4Ss3GVldehgd7AANEotu8dHwf6vT6POwNSaaTTunwYBPjpa30gUDzd+Gt6S5ZL0V7DdF2ExTjV2kzavmeJhHnQwlOMUpeZzxCa88AMNvgrejSPSD1vtncwxdCrPBbJYTFZ7VcYXj3SEVTpKT4Jd0rRf8Aq2A96wAADbp+Om34yk96LfZyA3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACJJXaXHiBpjvRspXbk3qtUvv9+QGpNPVO4FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjSdm1w4AGrgRKS0bvx1+fRAVPWzTXEAmndJ8OIFAAAAAAAAAAAAAAAAefPwoPUbh0v7OVunjo0wShtfs/hpTzfB04aZpgoRbc0lr3amlx/hRuuKTA8t+rJ1jdu+rB0pYDpB2MrznTVSFDNstlJ9yzHB76dShNcna+7LjGVnw3osP6HuiTpQ2W6aejvIek/YzFqvk+fYSOKoKS8elJ6Spz7JRd4tcboDmAACJWvq3d315ARaybfFaLT0AV35IDxO+GV2uxWddZ7K9l3Ubwuz2zWGhCO7bdqVqlSpPXzp0/o8wHcfwIOxtBYbpO6QZqcqzngcnptrxYRtOrNJ9re5f9GIHqeAAkrqL3eNtANKs1Bz/GWiv28/1gawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0yhvJ68Vaz1T+YA52fjKys22+VgNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaVFR4fP5/SAbko8N6XqAt9bAE00mndPgwKAAAAAAAAAAANM4QqQlTqQUoSTjKMldNPimgPCr4Uvqz5d0EdOVPazZbDLD7ObeqtmGGw8IJU8LiYOPd6UbKyi5SUknr4z5LQO/vgV+mjHfGNs+g3NMQ5YGlQhn+XOrV0oy3+514RvwUt6nLdXNSemtw9U/juDtf43Rtpr3RcwJ8dwf+l0f/ALiAksXgZRcZYui01Z/si9oCOOwk3piqStrbfXZ9+AGt4nDJpPEU7vgt9agfz4fCObQ4jaLrm9JNWriJVaOCzClgcPrdRhSw9OLS828pAel/wPWzeDynqo1c8oUYxrZ5tFjatWcYpb/ctyjG9uOkPPx48kGcoADbrWcHFrSV4u3G1uXaBrV9bv0AUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEaTTTV0+KAjUknuPWzsnwuAlJRaT58+SA1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAm6tdLXd3bQBbW9/mAR3reNb0rmBN5Levoo63fCwGoAAAAAAAAB51fDVbI5tm3QjsZtbgMtqV8LkOe1aWNrwjvfF4YiklFy7IudKKvwu4rmgPHTBY3F4GpOrgsTXoVZRcd6jUcHu8Xqnw0WgH1LaLaF2tn+YXbtb41NfrAstos/co2z3Mop83iqmvK/H28wC2jz+y389zG2uqxc73tpz4X/AFgSO0W0V1J57mG6mk28VUt89mAe0W0G6nHPsy0/Gvi58deGvYB8NarUrVXWxU51KspN1HKTc5O+rbfP2Ae/vwZWyeb7H9TTYbA5zg6+GrY143MYwrx3Z9zrYmc4Pd5Jxaa7VZ8wMpwAG3VtaN3rvK1uN/N9+FwNavzQFAAAAAAAAAAAAAAAAAAAAAAiad0nw4gLa3v8wFAAAAACK/NAUAAAAAAACN2Tb5AUAAAjSaaaunxQBKwFAAAJrfjoBQAAAAAAAIndJtW8wFAAAAAAAAAAJonrLjokBQAAAAAjvpZekCgAAAAAAAAAETuk1zAoE3Vrpa7u7aAUAAAAR35MCgAPkzXKcqz3LsRk+d5bhcwwGLpuliMLiqMatGtB8YzhJOMk+xoDrV9U/qsyblLq1dFbb1bexuXf8EA+qf1WZNyl1auitt6tvY3Lv+CA/wAE7qsf9Wnoq/8AJuXf8EB/gndVj/q09FX/AJNy7/ggR9U/qspNrq0dFT83gbl3/BAv+Cd1WP8Aq09FX/k3Lv8Agga8P1VurBhK9PFYXq4dF1GtRmqlOpT2Py6MoSTupJqjdNPVNAdoU6dOlTjSpQjCEEoxjFWSS4JLkBqAARpOza4cAKAAAS2t7/MBQImnqncCgAAACK+t16AKAAAAAAAAAltb3+YCgAAACN2TaV/MBQAAAAAAAAEtrcCgAAEV7K6s+YFAAAAAAAAARtLVuwBpPRq4FAjvpZ+kCgAAAAAAARu1vOBQAAABGr87AUAAAAAAETuk2reYCgAAAAAAltbgUAAAjvZ2V3yAoAAAAAAAAABLK97armAur2vq+QFAivrd+gCgAAAAAAAAIncCgAAEStzuBQAAAAAARPjpa30gUAAAAAAAAAAAS6va+r5AUCW1uBQAAABE7gUAAAASyve2r5gUCJ8dLW+kCgAAAAAAjvZ2V3yAoAAAAAAAACK9ld3fMCgAAAAAAARrhra30gUAAAAAAAABHZvdvqrPRgUAAAAAI3YCgAAEsr3tq+YFAARvhpe/0AUAAAAAAACK9ldWfMCgAAAAAAjvZ2dnyAoAAAAAAAACJcdb3+gCgAAAAAAAAIlYBZXvbV8wKAAAAAAAAAAAAAAAAAAAAABLq9r6rkBQI3YCgAI3w0vf6AKAAARXsrqz5gUABHezs7PkBQAAABEuOt7/AEAUAAAARKwFAAAAEsr3tquYFAAAAAAAAAAAAAAAAAAAAAAAAJdXtfVcgKBL62AoACJ35WAoACK+t16AKAAjvZ2dnyAoAAAAiVkk3fzgUAAAjV7eYCgAAACNJ6NXAoAAAAAAAAAAAAAAAAAAAAAACO9nZ2fICLeVrq7fHsWgF0iufH08QFle9tVzAXV7X1XICgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEd7Ozs+QESem8724O/HTmBdJLxo8+YC+tgKBLq9r6rkBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEsr3tquYFAARKwFAARLjre/0AUABHezs7PkBQAAABFeyurPmBQAACN8NL3+gCgAAACN2AoAAAAAS6va+q5AUAAAAAAAAAAAAAAAAAAAAAAAAjSejVwKAAjV7eYCgAAESskm7+cCgAI72dnZ8gKAAAAIr63XoAoAAAAid+VgKAAAAJfWwFAAAAACPdT3nZXsr/AGAUAAAAAI1cCgAAAAAAjXDW1vpAoAAAAAAAEV7K7u+YFAAAAAABHezsrvkBQAAAAAAAAET46Wt9IFAAAAAAAAARO4FAAAAAABLK97armBQJdXtfV8gKAAAAIlYCgAAAAAAiXHW9/oAoAAAAAAI72dnZ8gKAAAAAAAAAivZXVnzAoAAAAAAAEb4aXv8AQBQAAAAAARXsrqz5gUAAAAAAAAAAARuybSv5gFle9tXzAoAAAAAAAAABLa3AoETvfzAUAAAAAAAABErc7gUAAAiaeqdwKAAAAAACK+t36AKAAAAAAAAAAAI72dld8gKAAAAAAAAAAAAEsr3tq+YBO6Tat5gKAAAAAAAAAjVwKAAjdrecCgAAAAAAARrhra30gUAAAARtLVuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function bG(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 xG(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:wI(n,r),{props:s,internalRef:c}=DI({...a,externalSlotProps:o}),l=ZN(c,o?.ref,e.additionalProps?.ref);return CI(t,{...s,ref:l},r)}var SG=w.createContext({});function CG(e){return Vr(`MuiList`,e)}Hr(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var wG=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return y({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},CG,t)},TG=I(`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}}]}),EG=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=w.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=wG(d);return(0,P.jsx)(SG.Provider,{value:u,children:(0,P.jsxs)(TG,{as:a,className:v(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),DG=QF;function OG(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function kG(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function AG(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 jG(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`)||!AG(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var MG=w.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=w.useRef(null),p=w.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});GN(()=>{r&&f.current.focus()},[r]),w.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${DG(UN(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=dI(VN(t));if(n===`ArrowDown`)e.preventDefault(),jG(t,r,c,s,OG);else if(n===`ArrowUp`)e.preventDefault(),jG(t,r,c,s,kG);else if(n===`Home`)e.preventDefault(),jG(t,null,c,s,OG);else if(n===`End`)e.preventDefault(),jG(t,null,c,s,kG);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&&AG(r,i);i.previousKeyMatched&&(c||jG(t,r,!1,s,OG,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=QN(f,t),g=-1;w.Children.forEach(a,(e,t)=>{if(!w.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 _=w.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),w.cloneElement(e,t)}return e});return(0,P.jsx)(EG,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function NG(e){return Vr(`MuiMenu`,e)}Hr(`MuiMenu`,[`root`,`paper`,`list`]);var PG={vertical:`top`,horizontal:`right`},FG={vertical:`top`,horizontal:`left`},IG=e=>{let{classes:t}=e;return y({root:[`root`],paper:[`paper`],list:[`list`]},NG,t)},LG=I(iL,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),RG=I(rL,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),zG=I(MG,{name:`MuiMenu`,slot:`List`})({outline:0}),BG=w.forwardRef(function(e,t){let n=ko({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:_={},...y}=n,b=Oi(),x={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},S=IG(x),C=r&&!o&&l,T=w.useRef(null),E=(e,t)=>{T.current&&T.current.adjustStyleForScrollbar(e,{direction:b?`rtl`:`ltr`}),p&&p(e,t)},ee=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},D=-1;w.Children.map(i,(e,t)=>{w.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||D===-1)&&(D=t))});let O={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},te=xG({elementType:g.root,externalSlotProps:_.root,ownerState:x,className:[S.root,a]}),[k,A]=OI(`paper`,{className:S.paper,elementType:RG,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[j,M]=OI(`list`,{className:v(S.list,s.className),elementType:zG,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{ee(t),e.onKeyDown?.(t)}}),ownerState:x}),ne=typeof O.slotProps.transition==`function`?O.slotProps.transition(x):O.slotProps.transition;return(0,P.jsx)(LG,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:b?`right`:`left`},transformOrigin:b?PG:FG,slots:{root:g.root,paper:k,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:te,paper:A,backdrop:typeof _.backdrop==`function`?_.backdrop(x):_.backdrop,transition:{...ne,onEntering:(...e)=>{E(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:x,...y,classes:d,children:(0,P.jsx)(j,{actions:T,autoFocus:r&&(D===-1||o),autoFocusItem:C,variant:h,...M,children:i})})}),VG=({slotProps:e,...t})=>(0,P.jsx)(BG,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}}),HG=s({Collapsible:()=>cW,EnableAudioAutoplayImage:()=>yG,Feedback:()=>oB,HtmlAndMath:()=>NW,InlineMenu:()=>VG,InputContainer:()=>nG,PreviewLayout:()=>MW,PreviewPrompt:()=>dG,Purpose:()=>pG,Readable:()=>fG,UiLayout:()=>AW,color:()=>GR,createUniqueId:()=>nW,hasMedia:()=>vG,hasText:()=>gG,indicators:()=>sB,transformDataHeadings:()=>bG,useUniqueId:()=>rW,withUndoReset:()=>DW}),UG=`pie-toolbar`,WG=`var(--editable-html-toolbar-bg, ${$z()})`,GG=IN((0,P.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),{translator:KG}=tW,qG=I(vF)({verticalAlign:`top`,width:`28px`,height:`28px`,color:`var(--editable-html-toolbar-check, ${tz()})`,padding:`4px`}),JG=({onClick:e,doneButtonRef:t,language:n})=>(0,P.jsx)(qG,{"aria-label":KG.t(`editableHtml.buttons.done`,{lng:n}),buttonRef:t,onClick:e,children:(0,P.jsx)(GG,{})});JG.propTypes={onClick:m.func,doneButtonRef:m.func,language:m.string};var YG=JG,XG=I(`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:WG,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`}})),ZG=I(vF)({width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`}),QG=I(`div`)({display:`flex`});function $G(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,P.jsxs)(XG,{className:UG,showDone:c,toolbarAlignment:r.alignment,isFocused:r.alwaysVisible||a,autoWidth:i,isHidden:r.isHidden===!0,style:{...d,...u},children:[t,(0,P.jsxs)(QG,{children:[n&&(0,P.jsx)(ZG,{"aria-label":`Delete`,onMouseDown:e=>s?.(e),children:(0,P.jsx)(yF,{})}),c&&(0,P.jsx)(YG,{doneButtonRef:o,onClick:l})]})]})}var eK=`toolbarOpenedChanged`,tK=(e,t)=>{let n=!!t;e._toolbarOpened!==n&&(e._toolbarOpened=n,e?.view&&e?.state?.tr&&e.view.dispatch(e.state.tr.setMeta(eK,!0)))},nK=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,w.useState)(!1),p=c([n,u],t,()=>{}),m=(0,w.useRef)(null),h;if(l){let e=l(),t=parseInt(o.index,10);h=!!e?.[t]?.[0]}return(0,w.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&f(a):f(a)},[t,n,a]),(0,w.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,P.jsxs)(ww,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline-flex`,minHeight:`55px`,position:`relative`,cursor:`pointer`},children:[(0,P.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> </div>`}}),d&&(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(`div`,{ref:m,className:`absolute z-50 bg-white shadow-lg rounded p-2`,style:{zIndex:1},children:(0,P.jsx)(p,{})}),t._tiptapContainerEl&&rw.createPortal((0,P.jsx)($G,{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),tK(t,!1),t.view.dispatch(e),f(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};nK.propTypes={attributes:m.object,error:m.any,value:m.string,isFocused:m.bool};var rK=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function iK(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function aK(e){return`nodeType`in e}function oK(e){return e?iK(e)?e:aK(e)?e.ownerDocument?.defaultView??window:window:window}function sK(e){let{Document:t}=oK(e);return e instanceof t}function cK(e){return!iK(e)&&e instanceof oK(e).HTMLElement}function lK(e){return e instanceof oK(e).SVGElement}function uK(e){return e?iK(e)?e.document:aK(e)?sK(e)?e:cK(e)||lK(e)?e.ownerDocument:document:document:document}var dK=rK?w.useLayoutEffect:w.useEffect;function fK(e){let t=(0,w.useRef)(e);return dK(()=>{t.current=e}),(0,w.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 pK(e,t){t===void 0&&(t=[e]);let n=(0,w.useRef)(e);return dK(()=>{n.current!==e&&(n.current=e)},t),n}function mK(e){let t=fK(e),n=(0,w.useRef)(null);return[n,(0,w.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var hK={};function gK(e,t){return(0,w.useMemo)(()=>{if(t)return t;let n=hK[e]==null?0:hK[e]+1;return hK[e]=n,e+`-`+n},[e,t])}function _K(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 vK=_K(1),yK=_K(-1);function bK(e){return`clientX`in e&&`clientY`in e}function xK(e){if(!e)return!1;let{KeyboardEvent:t}=oK(e.target);return t&&e instanceof t}function SK(e){if(!e)return!1;let{TouchEvent:t}=oK(e.target);return t&&e instanceof t}function CK(e){if(SK(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 bK(e)?{x:e.clientX,y:e.clientY}:null}var wK;(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`})(wK||={});function TK(){}var EK=Object.freeze({x:0,y:0});function DK(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 OK(e,t,n){let r=DK(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 kK={ignoreTransform:!1};function AK(e,t){t===void 0&&(t=kK);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=oK(e).getComputedStyle(e);t&&(n=OK(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 jK(e,t){return t===void 0&&(t=oK(e).getComputedStyle(e)),t.position===`fixed`}function MK(e,t){t===void 0&&(t=oK(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)})}function NK(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(sK(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!cK(i)||lK(i)||n.includes(i))return n;let a=oK(e).getComputedStyle(i);return i!==e&&MK(i,a)&&n.push(i),jK(i,a)?n:r(i.parentNode)}return e?r(e):n}function PK(e){let[t]=NK(e,1);return t??null}var FK;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(FK||={});function IK(e){return!rK||!e?!1:e===document.scrollingElement}function LK(e){let t={x:0,y:0},n=IK(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 RK(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 zK(e,t){if(t===void 0&&(t=AK),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);PK(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var BK=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 VK(e){let{EventTarget:t}=oK(e);return e instanceof t?e:uK(e)}function HK(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}var UK;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(UK||={});function WK(e){e.preventDefault()}function GK(e){e.stopPropagation()}var KK;(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`})(KK||={});var qK={start:[KK.Space,KK.Enter],cancel:[KK.Esc],end:[KK.Space,KK.Enter,KK.Tab]},JK=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case KK.Right:return{...n,x:n.x+25};case KK.Left:return{...n,x:n.x-25};case KK.Down:return{...n,y:n.y+25};case KK.Up:return{...n,y:n.y-25}}},YK=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 BK(uK(t)),this.windowListeners=new BK(oK(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(UK.Resize,this.handleCancel),this.windowListeners.add(UK.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(UK.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&zK(n),t(EK)}handleKeyDown(e){if(xK(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=qK,coordinateGetter:a=JK,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}:EK;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=yK(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}=LK(n),p=RK(n),m={x:Math.min(i===KK.Right?p.right-p.width/2:p.right,Math.max(i===KK.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===KK.Down?p.bottom-p.height/2:p.bottom,Math.max(i===KK.Down?p.top:p.top+p.height/2,u.y))},h=i===KK.Right&&!s||i===KK.Left&&!c,g=i===KK.Down&&!l||i===KK.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===KK.Right&&e<=d.x||i===KK.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===KK.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===KK.Down&&e<=d.y||i===KK.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===KK.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,vK(yK(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()}};YK.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=qK,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 XK(e){return!!(e&&`distance`in e)}function ZK(e){return!!(e&&`delay`in e)}var QK=class{constructor(e,t,n){n===void 0&&(n=VK(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=uK(i),this.documentListeners=new BK(this.document),this.listeners=new BK(n),this.windowListeners=new BK(oK(i)),this.initialCoordinates=CK(r)??EK,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(UK.Resize,this.handleCancel),this.windowListeners.add(UK.DragStart,WK),this.windowListeners.add(UK.VisibilityChange,this.handleCancel),this.windowListeners.add(UK.ContextMenu,WK),this.documentListeners.add(UK.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ZK(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(XK(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(UK.Click,GK,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(UK.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=CK(e)??EK,s=yK(n,o);if(!t&&a){if(XK(a)){if(a.tolerance!=null&&HK(s,a.tolerance))return this.handleCancel();if(HK(s,a.distance))return this.handleStart()}if(ZK(a)&&HK(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===KK.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},$K={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},eq=class extends QK{constructor(e){let{event:t}=e,n=uK(t.target);super(e,$K,n)}};eq.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 tq={move:{name:`mousemove`},end:{name:`mouseup`}},nq;(function(e){e[e.RightClick=2]=`RightClick`})(nq||={});var rq=class extends QK{constructor(e){super(e,tq,uK(e.event.target))}};rq.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===nq.RightClick?!1:(r?.({event:n}),!0)}}];var iq={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},aq=class extends QK{constructor(e){super(e,iq)}static setup(){return window.addEventListener(iq.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(iq.move.name,e)};function e(){}}};aq.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 oq;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(oq||={});var sq;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(sq||={}),FK.Backward,FK.Forward,FK.Backward,FK.Forward;var cq;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(cq||={});var lq;(function(e){e.Optimized=`optimized`})(lq||={});function uq(e){let{callback:t,disabled:n}=e,r=fK(t),i=(0,w.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,w.useEffect)(()=>()=>i?.disconnect(),[i]),i}function dq(e,t){return(0,w.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}cq.WhileDragging,lq.Optimized;var fq={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:TK,draggableNodes:new Map,over:null,measureDroppableContainers:TK},pq=(0,w.createContext)(fq),mq=(0,w.createContext)({...EK,scaleX:1,scaleY:1}),hq;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(hq||={});var gq=(0,w.createContext)(null),_q=`button`,vq=`Draggable`;function yq(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=gK(vq),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,w.useContext)(pq),{role:p=_q,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,w.useContext)(g?mq:gq),[v,y]=mK(),[b,x]=mK(),S=dq(o,t),C=pK(n);return dK(()=>(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,w.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===_q?!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 bq=`Droppable`,xq={timeout:25};function Sq(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=gK(bq),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,w.useContext)(pq),u=(0,w.useRef)({disabled:n}),d=(0,w.useRef)(!1),f=(0,w.useRef)(null),p=(0,w.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...xq,...i},_=pK(h??r),v=uq({callback:(0,w.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]=mK((0,w.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=pK(t);return(0,w.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,w.useEffect)(()=>(s({type:wK.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:wK.UnregisterDroppable,key:a,id:r})),[r]),(0,w.useEffect)(()=>{n!==u.current.disabled&&(s({type:wK.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 Cq=IN((0,P.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),wq=IN((0,P.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`),Tq=e=>{switch(e){case`down`:return 90;case`up`:return-90;case`left`:return 180;default:return 0}},Eq=e=>{let{direction:t,style:n}=e;return(0,P.jsx)(Cq,{style:{transform:`rotate(${Tq(t)}deg)`,...n}})};Eq.propTypes={direction:m.string,style:m.object};var Dq=({style:e})=>(0,P.jsxs)(`span`,{style:e,children:[(0,P.jsx)(wq,{style:{margin:`0 -16px`}}),(0,P.jsx)(wq,{})]});Dq.propTypes={style:m.object},I(`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 Oq=I(`span`)(({theme:e})=>({border:`solid 0px ${e.palette.primary.main}`,"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:`120% !important`},"& mjx-frac":{fontSize:`120% !important`}}));function kq({n:e,children:t,isDragging:n,isOver:r,dragItem:i,value:a,selected:o}){let[s,c]=(0,w.useState)(null),l=(0,w.useRef)(null),u=e=>{l.current&&(l.current.contains(e.target)?l.current.classList.add(`selected`):l.current.classList.remove(`selected`))};(0,w.useEffect)(()=>(document.addEventListener(`click`,u),()=>{document.removeEventListener(`click`,u)}),[]),(0,w.useEffect)(()=>{l.current&&typeof YH==`function`&&YH(l.current)},[a?.value,r,i?.value?.value]),(0,w.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 ${lz()}`:m?`1px solid ${G.BORDER_DARK}`:`1px solid ${G.BORDER_LIGHT}`;return(0,P.jsxs)(`div`,{ref:l,className:o?`selected`:void 0,style:{display:`inline-flex`,minWidth:`178px`,minHeight:`36px`,background:m?`${G.BORDER_LIGHT}`:`${G.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,P.jsx)(Dq,{style:{position:`absolute`,top:`6px`,left:`15px`,color:`#9B9B9B`},contentEditable:!1}),(0,P.jsx)(`span`,{dangerouslySetInnerHTML:{__html:f}}),t]})}kq.propTypes={n:m.object,children:m.node,isDragging:m.bool,isOver:m.bool,dragItem:m.object,value:m.object,selected:m.bool};function Aq({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}=yq({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}=Sq({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)},y=(0,P.jsx)(kq,{n:i,isDragging:p,isOver:h,dragItem:g?.data?.current,value:e,selected:l,children:r}),b=e?(0,P.jsx)(`span`,{ref:_,...u,...d,children:y}):(0,P.jsx)(`span`,{ref:m,children:y});return(0,P.jsx)(Oq,{className:v(h&&`over`),children:b})}Aq.propTypes={value:m.object,disabled:m.bool,instanceId:m.string,children:m.node,n:m.object.isRequired,onChange:m.func.isRequired,removeResponse:m.func.isRequired,duplicates:m.bool,selected:m.bool};var jq=(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)},Mq=(e,t,n)=>{let{tr:r}=e.state;r.setNodeMarkup(n.pos,void 0,bl(t.attrs,[`value`,`id`])),r.isDone=!0,e.view.dispatch(r)},Nq=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{inTable:s}=o,c=r();return(0,P.jsx)(ww,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline`,whiteSpace:`normal`},children:(0,P.jsx)(`span`,{...o,style:{display:`inline-flex`,minHeight:`50px`,minWidth:`178px`,position:`relative`,margin:s?`10px`:`0 10px`,cursor:`pointer`},children:(0,P.jsx)(Aq,{n:o,dragKey:o.id,targetId:`0`,pos:c,value:o,duplicates:i.duplicates,selected:a,onChange:e=>jq(t,n,c,e),removeResponse:e=>Mq(t,n,e)})})})};Nq.propTypes={attributes:m.object,data:m.object,n:m.object,nodeProps:m.object,opts:m.object};var Pq=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s,error:c}=o,l=s||`<div> </div>`,u=r(),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(!1),m=(0,w.useRef)(null),h=()=>t._holdInlineDropdownToolbarIndex!=null&&String(t._holdInlineDropdownToolbarIndex)===String(n.attrs.index),[g,_]=(0,w.useState)(!1),[v,y]=(0,w.useState)({top:0,left:0}),b=()=>{h()||(_(!1),i.onInlineDropdownToolbarClose?.(t))},x=i.respAreaToolbar([n,u],t,b),S=()=>{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(H.create(e.doc,u)),t.view.dispatch(e))},C=()=>{p.current||(i.onToolbarCloseRequest?(p.current=!0,i.onToolbarCloseRequest([n,u],t,()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,b()},()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,_(!0),setTimeout(S,0)})):b())};(0,w.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&_(!0):g&&C()},[t,n,a]);let T=e=>e.clientX>document.documentElement.clientWidth||e.clientY>document.documentElement.clientHeight||e.target===document.documentElement;return(0,w.useEffect)(()=>{m.current&&typeof YH==`function`&&YH(m.current)},[s]),(0,w.useEffect)(()=>{let e=document.body.getBoundingClientRect(),{from:n}=t.state.selection,r=t.view.coordsAtPos(n);y({top:r.top+Math.abs(e.top)+40,left:r.left});let i=e=>{if(T(e))return;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]`)&&C()};return g?document.addEventListener(`mousedown`,i):document.removeEventListener(`mousedown`,i),()=>document.removeEventListener(`mousedown`,i)},[g,n]),(0,P.jsxs)(ww,{className:`inline-dropdown`,"data-selected":a,style:{display:`inline-flex`,height:`50px`,cursor:`pointer`},children:[(0,P.jsxs)(`div`,{ref:m,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:()=>_(!0),children:[(0,P.jsx)(`div`,{style:{flex:1,overflow:`hidden`,padding:`0 25px 0 8px`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},children:(0,P.jsx)(`span`,{style:{display:`inline-block`,verticalAlign:`middle`},dangerouslySetInnerHTML:{__html:l}})}),(0,P.jsx)(Eq,{direction:`down`,style:{position:`absolute`,top:`5px`,right:`5px`}})]}),g&&(0,P.jsxs)(w.Fragment,{children:[rw.createPortal((0,P.jsx)(`div`,{ref:d,children:(0,P.jsx)(x,{editorCallback:e=>{f.current=e}})}),t?._tiptapContainerEl||document.body),t._tiptapContainerEl&&rw.createPortal((0,P.jsx)($G,{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),tK(t,!1),delete t._holdInlineDropdownToolbarIndex,t.view.dispatch(e),_(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};Pq.propTypes={attributes:m.object,selectedItem:m.oneOfType([m.string,m.object])};var Fq=s({greaterThan:()=>Rq,greaterThanEqual:()=>Bq,lessThan:()=>Lq,lessThanEqual:()=>zq}),Iq=e=>({...e,category:`comparison`}),Lq=Iq({name:`Less than`,latex:`<`,command:`\\lt`}),Rq=Iq({name:`Greater than`,latex:`>`,command:`\\gt`}),zq=Iq({name:`Less than or equal`,latex:`\\le`,symbol:`<=`,command:`\\le`,ariaLabel:`less than or equal to`}),Bq=Iq({name:`Greater than or equal`,symbol:`>=`,command:`\\ge`,latex:`\\ge`}),Vq=e=>t=>({...t,category:e}),Hq=(e=[])=>{let t=[];xl(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},Uq=e=>t=>{let n=ml(e),r=n.some(e=>e.latex===t.latex),i=n.some(e=>e.name===t.name);return!r&&!i},Wq=(e=[],t=[])=>{t=t.filter(Uq(e));let n=[];xl(5-e.length,()=>e.push([])),xl(5,()=>n.push([]));let r=Hq(t);for(let t=0;t<5;t++)n[t]=[...e[t],...r[t]];return n},Gq=s({theta:()=>Yq,x:()=>qq,y:()=>Jq}),Kq=Vq(`vars`),qq=Kq({name:`X`,latex:`x`,write:`x`}),Jq=Kq({name:`Y`,latex:`y`,write:`y`}),Yq=Kq({name:`Theta`,latex:`\\theta`,write:`\\theta`}),Xq=s({blankOverBlank:()=>Qq,xBlankBlank:()=>eJ,xOverBlank:()=>$q}),Zq=Vq(`fractions`),Qq=Zq({name:`blank/blank`,latex:`\\frac{}{}`,command:`\\frac`,ariaLabel:`fraction`}),$q=Zq({latex:`\\frac{x}{ }`,name:`X/blank`,label:`x/[]`,command:`/`,ariaLabel:`x over blank fraction`}),eJ=Zq({name:`X (blank/blank)`,latex:`x\\frac{}{}`,label:`x([]/[])`,command:`\\frac`,ariaLabel:`mixed number`}),tJ=s({nthRoot:()=>oJ,squareRoot:()=>aJ,squared:()=>rJ,xToPowerOfN:()=>iJ}),nJ=Vq(`exponent`),rJ=nJ({name:`Squared`,latex:`x^2`,write:`^2`}),iJ=nJ({name:`X to the power of n`,latex:`x^{}`,command:`^`,ariaLabel:`exponent`}),aJ=nJ({name:`Square root`,latex:`\\sqrt{}`,command:`\\sqrt`}),oJ=nJ({name:`Nth root`,latex:`\\sqrt[{}]{}`,command:`\\nthroot`}),sJ=s({absValue:()=>uJ,approx:()=>mJ,brackets:()=>fJ,nApprox:()=>hJ,notEqual:()=>gJ,notSimilar:()=>vJ,parenthesis:()=>dJ,percentage:()=>pJ,plusMinus:()=>lJ,similar:()=>_J}),cJ=Vq(`misc`),lJ=cJ({name:`Plus or Minus`,latex:`\\pm`,write:`\\pm`}),uJ=cJ({name:`Absolute Value`,latex:`\\abs{}`,symbol:`| |`,command:`|`}),dJ=cJ({name:`Parenthesis`,latex:`\\left(\\right)`,symbol:`( )`,command:`(`}),fJ=cJ({name:`Brackets`,latex:`\\left[\\right]`,symbol:`[ ]`,command:`[`}),pJ=cJ({name:`Percent`,latex:`%`,command:`%`}),mJ=cJ({latex:`\\approx`,command:`\\approx`,ariaLabel:`Approximately equal to`}),hJ=cJ({latex:`\\napprox`,command:`\\napprox`,ariaLabel:`Not pproximately equal to`}),gJ=cJ({latex:`\\neq`,command:`\\neq`,ariaLabel:`Not equals`}),_J=cJ({latex:`\\sim`,command:`\\sim`,ariaLabel:`Similar`}),vJ=cJ({latex:`\\nsim`,command:`\\nsim`,ariaLabel:`Not similar`}),yJ=s({eulers:()=>SJ,halfInfinity:()=>wJ,infinity:()=>CJ,pi:()=>xJ}),bJ=Vq(`constants`),xJ=bJ({name:`Pi`,label:`π`,latex:`\\pi`,command:`\\pi`,category:`constants`}),SJ=bJ({name:`Eulers`,label:`e`,latex:`e`,command:`e`,category:`constants`}),CJ=bJ({name:`Infinity`,label:`\\infty`,latex:`\\infty`,command:`\\infty`,category:`constants`}),wJ=bJ({name:`Half Infinity`,label:`\\propto`,latex:`\\propto`,command:`\\propto`,category:`constants`}),TJ=s({cos:()=>OJ,cot:()=>MJ,csc:()=>jJ,sec:()=>AJ,sin:()=>DJ,tan:()=>kJ}),EJ=Vq(`trigonometry`),DJ=EJ({name:`sine`,label:`sin`,command:`\\sin`,latex:`\\sin`}),OJ=EJ({name:`cosine`,label:`cos`,command:`\\cos`,latex:`\\cos`}),kJ=EJ({name:`tanget`,label:`tan`,command:`\\tan`,latex:`\\tan`}),AJ=EJ({name:`secant`,label:`sec`,command:`\\sec`,latex:`\\sec`}),jJ=EJ({name:`cosecant`,label:`csc`,command:`\\csc`,latex:`\\csc`}),MJ=EJ({name:`cotangent`,label:`cot`,command:`\\cot`,latex:`\\cot`}),NJ=s({angle:()=>HJ,circledDot:()=>JJ,congruentTo:()=>ZJ,degree:()=>YJ,doublePrimeArcSecond:()=>eY,leftArrow:()=>tY,leftrightArrow:()=>rY,measureOfAngle:()=>WJ,notCongruentTo:()=>QJ,notParallel:()=>BJ,overArc:()=>UJ,overLeftRightArrow:()=>LJ,overRightArrow:()=>IJ,overline:()=>FJ,parallel:()=>zJ,parallelogram:()=>qJ,perpindicular:()=>VJ,primeArcminute:()=>$J,rightArrow:()=>nY,segment:()=>RJ,similarTo:()=>XJ,square:()=>KJ,triangle:()=>GJ}),PJ=e=>({...e,category:`geometry`}),FJ=PJ({name:`Line`,latex:`\\overline{}`,command:`\\overline`}),IJ=PJ({name:`Ray`,latex:`\\overrightarrow{}`,command:`\\overrightarrow`}),LJ=PJ({name:`Segment`,latex:`\\overleftrightarrow{\\overline{}}`,symbol:`AB`,command:`\\overleftrightarrow`}),RJ=PJ({name:`Segment`,latex:`\\overleftrightarrow{AB}`,write:`\\overleftrightarrow{AB}`,label:`AB`}),zJ=PJ({name:`Parallel`,latex:`\\parallel`,command:`\\parallel`}),BJ=PJ({name:`Not Parallel`,latex:`\\nparallel`,command:`\\nparallel`}),VJ=PJ({name:`Perpendicular`,latex:`\\perp`,command:`\\perpendicular`}),HJ=PJ({name:`Angle`,latex:`\\angle`,command:`\\angle`}),UJ=PJ({name:`Over arc`,latex:`\\overarc{\\overline{}}`,command:`\\overarc`}),WJ=PJ({name:`Measured Angle`,latex:`\\measuredangle`,command:[`m`,`\\angle`]}),GJ=PJ({name:`Triangle`,latex:`\\triangle`,command:`\\triangle`}),KJ=PJ({name:`Square`,latex:`\\square`,command:`\\square`}),qJ=PJ({name:`Parallelogram`,latex:`\\parallelogram`,command:`\\parallelogram`}),JJ=PJ({name:`Circled Dot`,latex:`\\odot`,command:`\\odot`}),YJ=PJ({name:`Degree`,latex:`\\degree`,command:`\\degree`}),XJ=PJ({name:`Similar`,command:`\\sim`,latex:`\\sim`}),ZJ=PJ({name:`Congruent To`,command:`\\cong`,latex:`\\cong`}),QJ=PJ({name:`Not Congruent To`,command:`\\ncong`,latex:`\\ncong`}),$J=PJ({name:`Prime`,label:`pam`,latex:`'`,write:`'`}),eY=PJ({name:`Double Prime`,latex:`''`,write:`''`}),tY=PJ({name:`Left Arrow`,latex:`\\leftarrow`,command:`\\leftarrow`}),nY=PJ({name:`Right Arrow`,latex:`\\rightarrow`,command:`\\rightarrow`}),rY=PJ({name:`Left and Right Arrow`,latex:`\\leftrightarrow`,command:`\\leftrightarrow`}),iY=s({circleDot:()=>aY}),aY=Vq(`operators`)({name:`CircleDot`,label:`⋅`,write:`\\cdot`,ariaLabel:`Dot multiplier`}),oY=s({ln:()=>uY,log:()=>cY,logSubscript:()=>lY}),sY=Vq(`log`),cY=sY({name:`Log`,label:`log`,command:`\\log`,latex:`\\log`}),lY=sY({name:`log base n`,label:`log s`,latex:`\\log_{}`,command:[`\\log`,`_`]}),uY=sY({name:`natural log`,label:`ln`,command:`\\ln`,latex:`\\ln`}),dY=s({subscript:()=>mY,superscript:()=>pY}),fY=Vq(`sub-sup`),pY=fY({name:`Superscript`,latex:`x^{}`,command:`^`}),mY=fY({name:`Subscript`,latex:`x_{}`,command:`_`}),hY=s({mu:()=>yY,sigma:()=>bY,smallSigma:()=>xY,xBar:()=>_Y,yBar:()=>vY}),gY=Vq(`statistics`),_Y=gY({name:`X Bar`,label:`x̄`,latex:`\\overline{x}`,write:`\\overline{x}`}),vY=gY({name:`Y Bar`,latex:`\\overline{y}`,write:`\\overline{y}`}),yY=gY({name:`mu`,label:`mu`,latex:`\\mu`,write:`\\mu`}),bY=gY({name:`Sigma`,ariaLabel:`Uppercase Sigma`,label:`\\Sigma`,latex:`\\Sigma`,write:`\\Sigma`}),xY=gY({name:`sigma`,ariaLabel:`Lowercase Sigma`,label:`\\sigma`,latex:`\\sigma`,write:`\\sigma`}),SY=s({divide:()=>DY,equals:()=>wY,minus:()=>EY,multiply:()=>OY,plus:()=>TY}),CY=Vq(`operators`),wY=CY({write:`=`,label:`=`}),TY=CY({write:`+`,label:`+`}),EY=CY({write:`−`,label:`−`}),DY=CY({name:`divide`,label:`÷`,command:`\\divide`,otherNotation:`\\div`}),OY=CY({name:`multiply`,label:`×`,command:`\\times`}),kY=s({doubleCellMatrix:()=>MY,singleCellMatrix:()=>jY}),AY=Vq(`matrices`),jY=AY({name:`Single Cell Matrix`,label:`[ ]`,write:`\\begin{pmatrix}\\end{pmatrix}`}),MY=AY({name:`Double Cell Matrix`,label:`[ ] [ ] \\\\newline [ ] [ ]`,write:`\\begin{bmatrix}&\\\\&\\end{bmatrix}`}),NY={0:`zero`,1:`one`,2:`two`,3:`three`,4:`four`,5:`five`,6:`six`,7:`seven`,8:`eight`,9:`nine`},PY=xl(10,String).map(e=>({name:NY[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`}}),FY=Vq(`logic`),IY=FY({name:`Therefore`,label:`∴`,write:`∴`}),LY=FY({name:`Long division`,latex:`\\longdiv{}`,command:`\\longdiv`}),RY=Vq(`navigation`),zY=RY({label:`◀`,keystroke:`Left`,ariaLabel:`Move cursor left`}),BY=RY({label:`▶`,keystroke:`Right`,ariaLabel:`Move cursor right`}),VY={label:`⌫`,category:`edit`,keystroke:`Backspace`,ariaLabel:`Delete`},HY=[[Qq,pJ,qq,rJ,aJ],[aY,Jq,mY,iJ,oJ],[lJ,Lq,Rq,zq,Bq],[xJ,Yq,dJ,fJ,uJ],[gJ,DJ,OJ,kJ,YJ]],UY=(()=>{let e=[...HY.map(e=>[...e])];return e[0].push({name:`i`,latex:`i`,write:`i`}),e[1].push(cY),e[2].push(lY),e[3].push(uY),e[4].push(SJ),e})(),WY=(()=>{let e=[...HY.map(e=>[...e])];return e[0].push(yY),e[1].push(_Y),e[2].push(vY),e[3].push(bY),e[4].push(xY),e})(),GY=[{predicate:e=>e>=3&&e<=5,set:[[Lq,Rq],[$q,eJ],[qq,LY],[rJ,iJ]]},{predicate:e=>e>=6&&e<=7,set:[[YJ,Lq,Rq],[aY,zq,Bq],[qq,Jq,rJ,iJ],[lJ,$q,eJ,aJ],[xJ,dJ,uJ,oJ]]},{predicate:e=>e>=8||e===`HS`,set:HY},{predicate:`non-negative-integers`,set:[[PY.seven,PY.eight,PY.nine],[PY.four,PY.five,PY.six],[PY.one,PY.two,PY.three],[PY.zero,{name:``,latex:``,write:``},{name:``,latex:``,write:``}],[zY,BY,VY]]},{predicate:`integers`,set:[[PY.seven,PY.eight,PY.nine],[PY.four,PY.five,PY.six],[PY.one,PY.two,PY.three],[PY.zero,{name:``,latex:``,write:``},EY],[zY,BY,VY]]},{predicate:`decimals`,set:[[PY.seven,PY.eight,PY.nine],[PY.four,PY.five,PY.six],[PY.one,PY.two,PY.three],[PY.zero,PY.decimalPoint,EY],[zY,BY,VY]]},{predicate:`fractions`,set:[[PY.seven,PY.eight,PY.nine],[PY.four,PY.five,PY.six],[PY.one,PY.two,PY.three],[PY.zero,Qq,EY],[zY,BY,VY]]},{predicate:`geometry`,set:[[Qq,YJ,$J,eY,ZJ,XJ],[aY,HJ,WJ,GJ,QJ,vJ],[DJ,OJ,kJ,xJ,aJ,oJ],[jJ,AJ,MJ,Yq,mY,iJ],[FJ,IJ,LJ,UJ,VJ,zJ]]},{predicate:`advanced-algebra`,set:UY},{predicate:`statistics`,set:WY},{predicate:`item-authoring`,set:[[DY,Qq,LY,wJ,rJ,aJ,FJ,IJ,LJ,cY],[OY,aY,{name:``,latex:``,write:``},mY,iJ,oJ,VJ,zJ,UJ,lY],[lJ,xJ,Yq,YJ,HJ,tY,nY,GJ,KJ,uY],[gJ,uJ,xY,yY,IY,bY,rY,DJ,OJ,kJ],[zq,Bq,{name:``,latex:``,write:``},{name:``,latex:``,write:``},CJ,{name:``,latex:``,write:``},{name:``,latex:``,write:``},jJ,AJ,MJ]]},{predicate:e=>e>=1&&e<=2,set:[]}],KY=e=>{let t=parseInt(e,10);if(e=isNaN(t)?e:t,!e)return[];let n=GY.find(t=>typeof t.predicate==`string`?t.predicate===e:t.predicate(e));if(n)return n.set||[];if(e!==`language`)return GY[2].set},qY=[...Object.values(SY),...Object.values(Fq),...Object.values(yJ),...Object.values(PY),...Object.values(tJ),...Object.values(Xq),...Object.values(NJ),...Object.values(oY),...Object.values(kY),...Object.values(sJ),...Object.values(iY),...Object.values(hY),...Object.values(dY),...Object.values(TJ),...Object.values(Gq)],JY=e=>(e||[]).map(e=>{let{latex:t}=e,n=(qY||[]).find(e=>t===e.latex||t===e.write||t===e.command||t===e.otherNotation);return t&&n||e}),YY=()=>{(Array.from(document.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:XY,two:ZY,three:QY,four:$Y,five:eX,six:tX,seven:nX,eight:rX,nine:iX,zero:aX,comma:oX,decimalPoint:sX}=PY,cX=[[nX,rX,iX,DY],[$Y,eX,tX,OY],[XY,ZY,QY,EY],[aX,sX,oX,TY],[zY,BY,VY,wY]],{translator:lX}=tW;function uX(e,t){if(!e)return;let n=lX.t(`mathInput.enterAnswer`,{lng:t});for(let t of e.querySelectorAll(`.mq-editable-field > .mq-textarea > textarea`))t.setAttribute(`aria-label`,n)}function K(e){this.elements=Array.isArray(e)?e:[e].filter(Boolean),this.length=this.elements.length;for(var t=0;t<this.elements.length;t++)this[t]=this.elements[t]}K.prototype.addClass=function(e){var t=(e||``).split(/\s+/).filter(Boolean);return this.elements.forEach(function(e){t.forEach(function(t){e.classList.add(t)})}),this},K.prototype.removeClass=function(e){return this.elements.forEach(function(t){e?(e||``).split(/\s+/).filter(Boolean).forEach(function(e){t.classList.remove(e)}):t.className=``}),this},K.prototype.toggleClass=function(e,t){var n=(e||``).split(/\s+/).filter(Boolean),r=arguments.length>1?!!t:null;return this.elements.forEach(function(e){n.forEach(function(t){r===null?e.classList.toggle(t):e.classList.toggle(t,r)})}),this},K.prototype.attr=function(e,t){return t===hX?this.elements[0]?this.elements[0].getAttribute(e):hX:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},K.prototype.html=function(e){return e===hX?this.elements[0]?this.elements[0].innerHTML:``:(this.elements.forEach(function(t){t.innerHTML=e}),this)},K.prototype.append=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e){e.appendChild(t)}),this},K.prototype.prepend=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e,n){var r=n===0?t:t.cloneNode(!0);e.insertBefore(r,e.firstChild)}),this},K.prototype.wrapAll=function(e){if(!this.elements.length)return this;var t;if(typeof e==`string`&&e.trim().indexOf(`<`)===0){var n=document.createElement(`div`);n.innerHTML=e.trim(),t=n.firstChild}else if(e instanceof K)t=e.elements[0];else if(e&&e.nodeType)t=e;else return this;var r=this.elements[0],i=r.parentNode;return i&&(i.insertBefore(t,r),this.elements.forEach(function(e){t.appendChild(e)})),this},K.prototype.appendTo=function(e){var t=e instanceof K?e.elements[0]:e;return t&&this.elements.forEach(function(e){t.appendChild(e)}),this},K.prototype.prependTo=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.firstChild;return this.elements.forEach(function(e){t.insertBefore(e,n),n=e}),this},K.prototype.insertBefore=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode;return n&&this.elements.forEach(function(e){n.insertBefore(e,t)}),this},K.prototype.insertAfter=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode,r=t.nextSibling;return n&&this.elements.forEach(function(e){n.insertBefore(e,r),r=e}),this},K.prototype.replaceWith=function(e){var t=[];return e instanceof K?t=e.elements.slice():e&&typeof e.length==`number`&&!e.tagName?t=Array.from(e):e&&e.nodeType&&(t=[e]),this.elements.forEach(function(e){var n=e.parentNode;n&&(t.forEach(function(t){n.insertBefore(t,e)}),n.removeChild(e))}),this},K.prototype.insDirOf=function(e,t){return e===-1?this.insertBefore(t.first()):this.insertAfter(t.last())},K.prototype.insAtDirEnd=function(e,t){return e===-1?this.prependTo(t):this.appendTo(t)},K.prototype.children=function(e){var t=[];return this.elements.forEach(function(n){var r;if(!e)r=Array.from(n.children);else if(e===`:first`)r=n.firstElementChild?[n.firstElementChild]:[];else if(e===`:last`)r=n.lastElementChild?[n.lastElementChild]:[];else{var i=/^:eq\((\d+)\)$/.exec(e);if(i){var a=parseInt(i[1],10),o=Array.from(n.children);r=o[a]?[o[a]]:[]}else r=Array.from(n.querySelectorAll(`:scope > `+e))}t.push.apply(t,r)}),new K(t)},K.prototype.find=function(e){var t=[];return this.elements.forEach(function(n){var r=Array.from(n.querySelectorAll(e));t.push.apply(t,r)}),new K(t)},K.prototype.closest=function(e){return new K(this.elements.map(function(t){return t.closest(e)}).filter(Boolean))},K.prototype.contents=function(){var e=[];return this.elements.forEach(function(t){var n=Array.from(t.childNodes);e.push.apply(e,n)}),new K(e)},K.prototype.filter=function(e){return new K(this.elements.filter(function(t,n){return e(n,t)}))},K.prototype.detach=function(){return this.elements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this},K.prototype.remove=function(){return this.elements.forEach(function(e){e.remove()}),this},K.prototype.empty=function(){return this.elements.forEach(function(e){e.innerHTML=``}),this};function dX(e){return(e||``).split(`.`)[0]}K.prototype.on=function(e,t){var n=dX(e);return this.elements.forEach(function(e){e.addEventListener(n,t)}),this},K.prototype.bind=function(e,t,n){var r=this;if(typeof e==`object`){for(var i in e)e.hasOwnProperty(i)&&r.bind(i,e[i]);return this}var a=typeof t==`function`?t:n;return a===!1&&(a=function(e){e.preventDefault()}),(e||``).split(/\s+/).filter(Boolean).forEach(function(e){var t=dX(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},K.prototype.off=function(e,t){var n=dX(e);return this.elements.forEach(function(e){e.removeEventListener(n,t)}),this},K.prototype.unbind=function(e,t){if(e&&e.includes(`.`))this.elements.forEach(function(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.replaceChild(t,e)});else if(e&&t){var n=dX(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},K.prototype.trigger=function(e){var t=new Event(dX(e),{bubbles:!0,cancelable:!0});return this.elements.forEach(function(e){e.dispatchEvent(t)}),this},K.prototype.focus=function(e){return typeof e==`function`?this.on(`focus`,e):(this.elements.forEach(function(e){e.focus&&e.focus()}),this)},K.prototype.blur=function(e){return typeof e==`function`?this.on(`blur`,e):(this.elements.forEach(function(e){e.blur&&e.blur()}),this)},[`mousemove`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`click`,`keydown`,`keypress`,`keyup`,`focusout`,`paste`,`cut`,`copy`,`input`,`load`].forEach(function(e){K.prototype[e]=function(t){return this.on(e,t)}}),K.prototype.next=function(e){return new K(this.elements.map(function(e){return e.nextElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.prev=function(e){return new K(this.elements.map(function(e){return e.previousElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.parent=function(){return new K(this.elements.map(function(e){return e.parentElement}).filter(Boolean))},K.prototype.offset=function(){if(!this.elements[0])return{top:0,left:0};var e=this.elements[0].getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}},K.prototype.width=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.width)||e.getBoundingClientRect().width},K.prototype.height=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.height)||e.getBoundingClientRect().height},K.prototype.outerWidth=function(){return this.elements[0]?this.elements[0].offsetWidth:0},K.prototype.outerHeight=function(){return this.elements[0]?this.elements[0].offsetHeight:0},K.prototype.innerWidth=function(){return this.elements[0]?this.elements[0].clientWidth:0},K.prototype.innerHeight=function(){return this.elements[0]?this.elements[0].clientHeight:0},K.prototype.css=function(e,t){if(t===hX){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):hX}}else this.elements.forEach(function(n){n.style[e]=t});return this},K.prototype.scrollTop=function(e){var t=this.elements[0];return e===hX?t?t===window?window.pageYOffset||document.documentElement.scrollTop:t.scrollTop:0:(t===window?window.scrollTo(window.pageXOffset||0,e):this.elements.forEach(function(t){t.scrollTop=e}),this)},K.prototype.scrollLeft=function(e){var t=this.elements[0];return e===hX?t?t===window?window.pageXOffset||document.documentElement.scrollLeft:t.scrollLeft:0:(t===window?window.scrollTo(e,window.pageYOffset||0):this.elements.forEach(function(t){t.scrollLeft=e}),this)},K.prototype.each=function(e){return this.elements.forEach(function(t,n){e.call(t,n,t)}),this},K.prototype.eq=function(e){return new K([this.elements[e]])},K.prototype.get=function(e){return e===hX?this.elements:e<0?this.elements[this.elements.length+e]:this.elements[e]},K.prototype.add=function(e){var t=this.elements.slice();return e instanceof K?t.push.apply(t,e.elements):Array.isArray(e)?t.push.apply(t,e):e&&e.nodeType&&t.push(e),new K(t)},K.prototype.first=function(){return new K([this.elements[0]])},K.prototype.last=function(){return new K([this.elements[this.elements.length-1]])},K.prototype.index=function(e){if(!e){var t=this.elements[0]&&this.elements[0].parentElement;return t?Array.from(t.children).indexOf(this.elements[0]):-1}var n=e instanceof K?e.elements[0]:e;return this.elements.indexOf(n)},K.prototype.is=function(e){return this.elements.some(function(t){return t.matches(e)})},K.prototype.text=function(e){return e===hX?this.elements.map(function(e){return e.textContent}).join(``):(this.elements.forEach(function(t){t.textContent=e}),this)},K.prototype.val=function(e){var t=this.elements[0];return t?e===hX?t.value===hX?t.textContent:t.value:(this.elements.forEach(function(t){t.value===hX?t.textContent=e:t.value=e}),this):hX};function fX(e){var t=Array.isArray(e)?e:[e].filter(Boolean),n=Object.create(K.prototype);n.elements=t,n.length=t.length;for(var r=0;r<t.length;r++)n[r]=t[r];return n}var pX=function(e,t){var n;if(!e)n=[];else if(e===window||e===document)n=[e];else if(e.nodeType)n=[e];else if(e&&e.current&&e.current.nodeType)n=[e.current];else if(typeof e==`string`&&e[0]===`<`){var r=document.createElement(`div`);r.innerHTML=e.trim(),n=Array.from(r.children)}else if(typeof e==`string`){var i=t instanceof K?t.elements[0]:t||document;n=Array.from(i.querySelectorAll(e))}else n=e instanceof K?e.elements:e.length===hX?[]:Array.from(e);return fX(n)};pX.contains=function(e,t){return e!==t&&e.contains(t)};var mX=pX,hX,gX=`mathquill-command-id`,_X=`mathquill-block-id`,vX=Math.min,yX=Math.max;function bX(){}var xX=[].slice;function SX(e){var t=e.length-1;return function(){var n=xX.call(arguments,0,t),r=xX.call(arguments,t);return e.apply(this,n.concat([r]))}}var CX=SX(function(e,t){return SX(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function wX(e){return SX(function(t,n){return typeof t!=`function`&&(t=CX(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function q(e){var t=xX.call(arguments,1);return function(){return e.apply(this,t)}}function TX(e,t){if(!t)throw Error(`prayer failed: `+e)}var J=(function(e,t,n){function r(e){return typeof e==`object`}function i(e){return typeof e==`function`}function a(){}return function o(s,c){c===n&&(c=s,s=Object);function l(){var e=new u;return i(e.init)&&e.init.apply(e,arguments),e}function u(){}l.Bare=u;var d=a[e]=s[e],f=u[e]=l[e]=l.p=new a,p;return f.constructor=l,l.extend=function(e){return o(l,e)},(l.open=function(e){if(p={},i(e)?p=e.call(l,f,d,l,s):r(e)&&(p=e),r(p))for(var n in p)t.call(p,n)&&(f[n]=p[n]);return i(f.init)||(f.init=s),l})(c)}})(`prototype`,{}.hasOwnProperty),Y=-1,X=1;function EX(e){TX(`a direction was passed`,e===Y||e===X)}var DX=J(function(e){e.parent=0,e[Y]=0,e[X]=0,e.init=function(e,t,n){this.parent=e,this[Y]=t,this[X]=n},this.copy=function(e){return DX(e.parent,e[Y],e[X])}}),OX=J(function(e){e[Y]=0,e[X]=0,e.parent=0;var t=0;function n(){return t+=1}this.byId={},e.init=function(){this.id=n(),OX.byId[this.id]=this,this.ends={},this.ends[Y]=0,this.ends[X]=0},e.dispose=function(){delete OX.byId[this.id]},e.toString=function(){return`{{ MathQuill Node #`+this.id+` }}`},e.jQ=pX(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){var e=pX(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute(`mathquill-command-id`),r=e.getAttribute(`mathquill-block-id`);n&&OX.byId[n].jQadd(e),r&&OX.byId[r].jQadd(e)}for(e=e.firstChild;e;e=e.nextSibling)t(e)}for(var n=0;n<e.length;n+=1)t(e[n]);return e},e.createDir=function(e,t){EX(e);var n=this;return n.jQize(),n.jQ.insDirOf(e,t.jQ),t[e]=n.adopt(t.parent,t[Y],t[X]),n},e.createLeftOf=function(e){return this.createDir(Y,e)},e.selectChildren=function(e,t){return PX(e,t)},e.bubble=wX(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=wX(function(e){return(function t(n){n.eachChild(t),e(n)})(this),this}),e.isEmpty=function(){return this.ends[Y]===0&&this.ends[X]===0},e.isStyleBlock=function(){return!1},e.children=function(){return AX(this.ends[Y],this.ends[X])},e.eachChild=function(){var e=this.children();return e.each.apply(e,arguments),this},e.foldChildren=function(e,t){return this.children().fold(e,t)},e.withDirAdopt=function(e,t,n,r){return AX(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return AX(this,this).adopt(e,t,n),this},e.disown=function(){return AX(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function kX(e,t,n){TX(`a parent is always present`,e),t&&(t[X]!==n&&(t[X]=n),t.parent!==e&&(t.parent=e)),n&&(n[Y]!==t&&(n[Y]=t),n.parent!==e&&(n.parent=e)),TX(`leftward is properly set up`,(function(){return t?t[X]===n&&t.parent===e:e.ends[Y]===n})()),TX(`rightward is properly set up`,(function(){return n?n[Y]===t&&n.parent===e:e.ends[X]===t})())}var AX=J(function(e){e.init=function(e,t,n){if(n===hX&&(n=Y),EX(n),TX(`no half-empty fragments`,!e==!t),this.ends={},e){TX(`withDir is passed to Fragment`,e instanceof OX),TX(`oppDir is passed to Fragment`,t instanceof OX),TX(`withDir and oppDir have the same parent`,e.parent===t.parent),this.ends[n]=e,this.ends[-n]=t;var r=this.fold([],function(e,t){return e.push.apply(e,t.jQ.get()),e});this.jQ=this.jQ.add(r)}},e.jQ=pX(),e.withDirAdopt=function(e,t,n,r){return e===Y?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){kX(e,t,n);var r=this;r.disowned=!1;var i=r.ends[Y];if(!i)return this;var a=r.ends[X];return t||(e.ends[Y]=i),n?n[Y]=a:e.ends[X]=a,r.ends[X][X]=n,r.each(function(n){n[Y]=t,n.parent=e,t&&(t[X]=n),t=n}),r},e.disown=function(){var e=this,t=e.ends[Y];if(!t||e.disowned)return e;e.disowned=!0;var n=e.ends[X],r=t.parent;return kX(r,t[Y],t),kX(r,n,n[X]),t[Y]?t[Y][X]=n[X]:r.ends[Y]=n[X],n[X]?n[X][Y]=t[Y]:r.ends[X]=t[Y],e},e.remove=function(){return this.jQ.remove(),this.each(`postOrder`,`dispose`),this.disown()},e.each=wX(function(e){var t=this,n=t.ends[Y];if(!n)return t;for(;n!==t.ends[X][X]&&e(n)!==!1;n=n[X]);return t}),e.fold=function(e,t){return this.each(function(n){e=t.call(this,e,n)}),e}}),Z={},jX={},MX={},NX=J(DX,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=pX(`<span class="mq-cursor">​</span>`);this.blink=function(){n.toggleClass(`mq-blink`)},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass(`mq-blink`),`intervalId`in this?clearInterval(this.intervalId):(this[X]?this.selection&&this.selection.ends[Y][Y]===this[Y]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[X].jQ.first()):this.jQ.appendTo(this.parent.jQ),this.parent.focus()),this.intervalId=setInterval(this.blink,500),this},e.hide=function(){return`intervalId`in this&&clearInterval(this.intervalId),delete this.intervalId,this.jQ.detach(),this.jQ=pX(),this},e.withDirInsertAt=function(e,t,n,r){var i=this.parent;this.parent=t,this[e]=n,this[-e]=r,i!==t&&i.blur&&i.blur(this)},e.insDirOf=function(e,t){return EX(e),!t||!t.jQ?this:(this.jQ.insDirOf(e,t.jQ),this.withDirInsertAt(e,t.parent,t[e],t),this.parent.jQ.addClass(`mq-hasCursor`),this)},e.insLeftOf=function(e){return this.insDirOf(Y,e)},e.insRightOf=function(e){return this.insDirOf(X,e)},e.insAtDirEnd=function(e,t){return EX(e),this.jQ.insAtDirEnd(e,t.jQ),this.withDirInsertAt(e,t,0,t.ends[e]),t.focus(),this},e.insAtLeftEnd=function(e){return this.insAtDirEnd(Y,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(X,e)},e.jumpUpDown=function(e,t){var n=this;n.upDownCache[e.id]=DX.copy(n);var r=n.upDownCache[t.id];if(r)r[X]?n.insLeftOf(r[X]):n.insAtRightEnd(r.parent);else{var i=n.offset().left;t.seek(i,n)}},e.offset=function(){var e=this,t=e.jQ.removeClass(`mq-cursor`).offset();return e.jQ.addClass(`mq-cursor`),t},e.unwrapGramp=function(){var e=this.parent.parent,t=e.parent,n=e[X],r=this,i=e[Y];if(e.disown().eachChild(function(r){r.isEmpty()||(r.children().adopt(t,i,n).each(function(t){t.jQ.insertBefore(e.jQ.first())}),i=r.ends[X])}),!this[X])if(this[Y])this[X]=this[Y][X];else for(;!this[X];)if(this.parent=this.parent[X],this.parent)this[X]=this.parent.ends[Y];else{this[X]=e[X],this.parent=t;break}this[X]?this.insLeftOf(this[X]):this.insAtRightEnd(t),e.jQ.remove(),e[Y].siblingDeleted&&e[Y].siblingDeleted(r.options,X),e[X].siblingDeleted&&e[X].siblingDeleted(r.options,Y)},e.startSelection=function(){for(var e=this.anticursor=DX.copy(this),t=e.ancestors={},n=e;n.parent;n=n.parent)t[n.parent.id]=n},e.endSelection=function(){delete this.anticursor},e.select=function(){var e=this.anticursor;if(!e||!e.ancestors||this[Y]===e[Y]&&this.parent===e.parent)return!1;for(var t,n=this;n.parent;n=n.parent)if(n.parent.id in e.ancestors){t=n.parent;break}if(!t)return!1;var r=e.ancestors[t.id],i,a,o=X;if(n[Y]!==r){for(var s=n;s;s=s[X])if(s[X]===r[X]){o=Y,i=n,a=r;break}}return o===X&&(i=r,a=n),i instanceof DX&&(i=i[X]),a instanceof DX&&(a=a[Y]),!i||!a?!1:(this.hide().selection=t.selectChildren(i,a),this.insDirOf(o,this.selection.ends[o]),this.selectionChanged(),!0)},e.clearSelection=function(){return this.selection&&(this.selection.clear(),delete this.selection,this.selectionChanged()),this},e.deleteSelection=function(){this.selection&&(this[Y]=this.selection.ends[Y][Y],this[X]=this.selection.ends[X][X],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[Y]=e.ends[Y][Y],this[X]=e.ends[X][X],delete this.selection),e},e.depth=function(){for(var e=this,t=0;e=e.parent;)t+=+(e instanceof tZ);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==hX)return this.depth()+(e||0)>this.options.maxDepth},e.howDeep=function(){for(var e=0,t=this;t=t.parent;)e++;return 1+Math.floor(e/2)},e.tooDeep=function(){var e=this.options.maxDepth;return e&&this.howDeep()>e}}),PX=J(AX,function(e,t){e.init=function(){t.init.apply(this,arguments),this.jQ=this.jQ.wrapAll(`<span class="mq-selection"></span>`).parent()},e.adopt=function(){return this.jQ.replaceWith(this.jQ=this.jQ.children()),t.adopt.apply(this,arguments)},e.clear=function(){var e=this.jQ[0];return e&&this.jQ.replaceWith(e.childNodes),this},e.join=function(e){return this.fold(``,function(t,n){return t+n[e]()})}}),FX=J(function(e){e.init=function(e,t,n){this.id=e.id,this.data={},this.root=e,this.container=t,this.options=n,e.controller=this,this.cursor=e.cursor=NX(e,n)},e.handle=function(e,t){var n=this.options.handlers;if(n&&n.fns[e]){var r=n.APIClasses[this.KIND_OF_MQ](this);t===Y||t===X?n.fns[e](t,r):n.fns[e](r)}};var t=[];this.onNotify=function(e){t.push(e)},e.notify=function(){for(var e=0;e<t.length;e+=1)t[e].apply(this.cursor,arguments);return this}}),IX={},LX=J(),RX={},zX=J(),BX={};function VX(){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:
|
|
327
329
|
|
|
328
330
|
MathQuill = MathQuill.getInterface(1);
|
|
329
331
|
// now MathQuill.MathField() works like it used to
|
|
330
332
|
|
|
331
333
|
See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
|
|
332
|
-
https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)}function
|
|
334
|
+
https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)}function HX(e){return VX(),QZ(e)}HX.prototype=zX.p,HX.VERSION=`v1.2.1-beta.1`,HX.interfaceVersion=function(e){if(e!==1)throw`Only interface version 1 supported. You specified: `+e;return VX=function(){window.console&&console.warn(`You called MathQuill.interfaceVersion(1); to specify the interface version, which will fail in v1.0.0. You can fix this easily by doing this before doing anything else:
|
|
333
335
|
|
|
334
336
|
MathQuill = MathQuill.getInterface(1);
|
|
335
337
|
// now MathQuill.MathField() works like it used to
|
|
336
338
|
|
|
337
339
|
See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
|
|
338
|
-
https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)},rY(),iY},iY.getInterface=sY;var aY=sY.MIN=1,oY=sY.MAX=3;function sY(e){if(!(aY<=e&&e<=oY))throw`Only interface versions between `+aY+` and `+oY+` supported. You specified: `+e;if(e<3&&typeof window<`u`&&!window.jQuery)throw`MathQuill interface version `+e+` requires jQuery 1.5.2+ to be loaded first`;function t(e){if(!e||!e.nodeType)return null;var t=kJ(e).children(`.mq-root-block`).attr(NJ),r=t&&WJ.byId[t].controller;return r?n[r.KIND_OF_MQ](r):null}var n={};t.L=Y,t.R=X,t.saneKeyboardEvents=dY;function r(e,t){for(var r in t&&t.handlers&&(t.handlers={fns:t.handlers,APIClasses:n}),t)if(t.hasOwnProperty(r)){var i=t[r],a=eY[r];e[r]=a?a(i):i}}t.config=function(e){return r($J.p,e),this},t.registerEmbed=function(e,t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw`Embed name must start with letter and be only letters and digits`;nY[e]=t};var i=n.AbstractMathQuill=J(tY,function(t){t.init=function(e){this.__controller=e,this.__options=e.options,this.id=e.id,this.data=e.data},t.parseLatex=function(e){return this.__controller.parseLatex(e)},t.__mathquillify=function(t){var n=this.__controller,r=n.root,i=n.container;n.createTextarea();var a=i.addClass(t).contents().detach();r.jQ=kJ(`<span class="mq-root-block"/>`).attr(NJ,r.id).appendTo(i),this.latex(a.text()),this.revert=function(){var t=i.empty().unbind(`.mathquill`).removeClass(`mq-editable-field mq-math-mode mq-text-mode`).append(a);return e>=3?t[0]:t}},t.config=function(e){return r(this.__options,e),this},t.el=function(){return this.__controller.container[0]},t.text=function(){return this.__controller.exportText()},t.latex=function(e){return arguments.length>0?(this.__controller.renderLatexMath(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()},t.html=function(){return this.__controller.root.jQ.html().replace(/ mathquill-(?:command|block)-id="?\d+"?/g,``).replace(/<span class="?mq-cursor( mq-blink)?"?>.?<\/span>/i,``).replace(/ mq-hasCursor|mq-hasCursor ?/,``).replace(/ class=(""|(?= |>))/g,``)},t.reflow=function(){return this.__controller.root.postOrder(`reflow`),this}});for(var a in t.prototype=i.prototype,n.EditableField=J(i,function(e,t){e.__mathquillify=function(){return t.__mathquillify.apply(this,arguments),this.__controller.editable=!0,this.__controller.delegateMouseEvents(),this.__controller.editablesTextareaEvents(),this},e.focus=function(){return this.__controller.textarea.focus(),this},e.blur=function(){return this.__controller.textarea.blur(),this},e.write=function(e){return this.__controller.writeLatex(e),this.__controller.scrollHoriz(),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this},e.empty=function(){var e=this.__controller.root,t=this.__controller.cursor;return e.eachChild(`postOrder`,`dispose`),e.ends[Y]=e.ends[X]=0,e.jQ.empty(),delete t.selection,t.insAtRightEnd(e),this},e.cmd=function(e){var t=this.__controller.notify(),n=t.cursor;if(/^\\[a-z]+$/i.test(e)&&!n.isTooDeep()){e=e.slice(1);var r=Z[e];r&&(e=r(e),n.selection&&e.replaces(n.replaceSelection()),e.createLeftOf(n.show()),this.__controller.scrollHoriz())}else n.parent.write(n,e);return t.blurred&&n.hide().parent.blur(),this},e.select=function(){var e=this.__controller;for(e.notify(`move`).cursor.insAtRightEnd(e.root);e.cursor[Y];)e.selectLeft();return this},e.clearSelection=function(){return this.__controller.cursor.clearSelection(),this},e.moveToDirEnd=function(e){return this.__controller.notify(`move`).cursor.insAtDirEnd(e,this.__controller.root),this},e.moveToLeftEnd=function(){return this.moveToDirEnd(Y)},e.moveToRightEnd=function(){return this.moveToDirEnd(X)},e.keystroke=function(e){for(var e=e.replace(/^\s+|\s+$/g,``).split(/\s+/),t=0;t<e.length;t+=1)this.__controller.keystroke(e[t],{preventDefault:IJ});return this},e.typedText=function(e){for(var t=0;t<e.length;t+=1)this.__controller.typedText(e.charAt(t));return this},e.dropEmbedded=function(e,t,n){var r=e-kJ(window).scrollLeft(),i=t-kJ(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(kJ(a),e,t),fX().setOptions(n).createLeftOf(this.__controller.cursor)},e.clickAt=function(e,t,n){n||=document.elementFromPoint(e,t);var r=this.__controller,i=r.root;return AJ.contains(i.jQ[0],n)||(n=i.jQ[0]),r.seek(kJ(n),e+pageXOffset,t+pageYOffset),r.blurred&&this.focus(),this},e.ignoreNextMousedown=function(e){return this.__controller.cursor.options.ignoreNextMousedown=e,this}}),t.EditableField=function(){throw`wtf don't call me, I'm 'abstract'`},t.EditableField.prototype=n.EditableField.prototype,QJ)(function(r,i){var a=n[r]=i(n);t[r]=function(n,i){var o=t(n);if(o instanceof a||!n||!n.nodeType)return o;var s=ZJ(a.RootBlock(),kJ(n),$J());return s.KIND_OF_MQ=r,a(s).__mathquillify(i,e)},t[r].prototype=a.prototype})(a,QJ[a]);return t}iY.noConflict=function(){return window.MathQuill=cY,iY};var cY=window.MathQuill;window.MathQuill=iY;function lY(e){for(var t=`moveOutOf deleteOutOf selectOutOf upOutOf downOutOf`.split(` `),n=0;n<t.length;n+=1)(function(t){e[t]=function(e){this.controller.handle(t,e)}})(t[n]);e.reflow=function(){this.controller.handle(`reflow`),this.controller.handle(`edited`),this.controller.handle(`edit`)}}var uY=J(function(e,t,n){function r(e,t){throw e=e?`'`+e+`'`:`EOF`,`Parse Error: `+t+` at `+e}e.init=function(e){this._=e},e.parse=function(e){return this.skip(o)._(``+e,t,r);function t(e,t){return t}},e.or=function(e){VJ(`or is passed a parser`,e instanceof n);var t=this;return n(function(n,r,i){return t._(n,r,a);function a(t){return e._(n,r,i)}})},e.then=function(e){var t=this;return n(function(r,i,a){return t._(r,o,a);function o(t,r){var o=e instanceof n?e:e(r);return VJ(`a parser is returned`,o instanceof n),o._(t,i,a)}})},e.many=function(){var e=this;return n(function(t,n,r){for(var i=[];e._(t,a,o););return n(t,i);function a(e,n){return t=e,i.push(n),!0}function o(){return!1}})},e.times=function(e,t){arguments.length<2&&(t=e);var r=this;return n(function(n,i,a){for(var o=[],s=!0,c,l=0;l<e;l+=1)if(s=r._(n,u,d),!s)return a(n,c);for(;l<t&&s;l+=1)s=r._(n,u,f);return i(n,o);function u(e,t){return o.push(t),n=e,!0}function d(e,t){return c=t,n=e,!1}function f(e,t){return!1}})},e.result=function(e){return this.then(a(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 a(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)})};var i=this.regex=function(e){VJ(`regexp parser is anchored`,e.toString().charAt(1)===`^`);var t=`expected `+e;return n(function(n,r,i){var a=e.exec(n);if(a){var o=a[0];return r(n.slice(o.length),o)}else return i(n,t)})},a=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=i(/^[a-z]/i),n.letters=i(/^[a-z]*/i),n.digit=i(/^[0-9]/),n.digits=i(/^[0-9]*/),n.whitespace=i(/^\s+/),n.optWhitespace=i(/^\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)});var o=n.eof=n(function(e,t,n){return e?n(e,`expected EOF`):t(e,e)})}),dY=function(){var e={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`};function t(t){var n=t.which||t.keyCode,r=e[n],i,a=[];return t.ctrlKey&&a.push(`Ctrl`),t.originalEvent&&t.originalEvent.metaKey&&a.push(`Meta`),t.altKey&&a.push(`Alt`),t.shiftKey&&a.push(`Shift`),i=r||String.fromCharCode(n),!a.length&&!r?i:(a.push(i),a.join(`-`))}return function(e,n){var r=null,i=null,a=AJ(e),o=AJ(n.container||a),s=IJ,c;function l(e){s=e,clearTimeout(c),c=setTimeout(e)}function u(e){l(function(t){s=IJ,clearTimeout(c),e(t)})}o.bind(`keydown keypress input keyup focusout paste`,function(e){s(e)});function d(e){s(),s=IJ,clearTimeout(c),a.val(e),e&&a[0]&&a[0].select&&a[0].select(),f=!!e}var f=!1;function p(){var e=a[0];return`selectionStart`in e&&e.selectionStart!==e.selectionEnd}function m(){n.keystroke(t(r),r)}function h(e){r=e,i=null,f&&u(function(e){!(e&&e.type===`focusout`)&&a[0]&&a[0].select&&a[0].select()}),m()}function g(e){r&&i&&m(),i=e,l(v)}function _(e){r&&!i&&l(v)}function v(){if(!p()){var e=a.val();e.length===1?(a.val(``),n.typedText(e)):e&&a[0]&&a[0].select&&a[0].select()}}function y(){r=i=null}function b(e){a.focus(),l(x)}function x(){var e=a.val();a.val(``),e&&n.paste(e)}return o.bind({keydown:h,keypress:g,keyup:_,focusout:y,cut:function(){u(function(){n.cut()})},copy:function(){u(function(){n.copy()})},paste:b}),{select:d}}}();ZJ.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),ZJ.open(function(e){e.focusBlurEvents=function(){var e=this,t=e.root,n=e.cursor,r;e.textarea.focus(function(){e.blurred=!1,clearTimeout(r),e.container.addClass(`mq-focused`),n.parent||n.insAtRightEnd(t),n.selection?(n.selection.jQ.removeClass(`mq-blur`),e.selectionChanged()):n.show()}).blur(function(){e.blurred=!0,r=setTimeout(function(){t.postOrder(`intentionalBlur`),n.clearSelection().endSelection(),a()}),kJ(window).bind(`blur`,i)});function i(){clearTimeout(r),n.selection&&n.selection.jQ.addClass(`mq-blur`),a()}function a(){n.hide().parent.blur(),e.container.removeClass(`mq-focused`),kJ(window).unbind(`blur`,i)}e.blurred=!0,n.hide().parent.blur()}}),ZJ.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),WJ.open(function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case`Ctrl-Shift-Backspace`:case`Ctrl-Backspace`:n.ctrlDeleteDir(Y);break;case`Shift-Backspace`:case`Backspace`:n.backspace();break;case`Esc`:case`Tab`:n.escapeDir(X,e,t);return;case`Shift-Tab`:case`Shift-Esc`:n.escapeDir(Y,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[X];)n.selectRight();break;case`Ctrl-Shift-End`:for(;r[X]||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[Y];)n.selectLeft();break;case`Ctrl-Shift-Home`:for(;r[Y]||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[Y])for(;r[Y];)n.selectLeft();else n.selectLeft();case`Shift-Down`:if(r[X])for(;r[X];)n.selectRight();else n.selectRight();case`Ctrl-Up`:break;case`Ctrl-Down`:break;case`Ctrl-Shift-Del`:case`Ctrl-Del`:n.ctrlDeleteDir(X);break;case`Shift-Del`:case`Del`:n.deleteForward();break;case`Meta-A`:case`Ctrl-A`:for(n.notify(`move`).cursor.insAtRightEnd(n.root);r[Y];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){VJ(`overridden or never called on this node`)}}),ZJ.open(function(e){this.onNotify(function(e){(e===`move`||e===`upDown`)&&this.show().clearSelection()}),e.escapeDir=function(e,t,n){HJ(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`)},eY.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){HJ(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(Y)},e.moveRight=function(){return this.moveDir(X)},e.moveUp=function(){return t(this,`up`)},e.moveDown=function(){return t(this,`down`)};function t(e,t){var n=e.notify(`upDown`).cursor,r=t+`Into`,i=t+`OutOf`;return n[X][r]?n.insAtLeftEnd(n[X][r]):n[Y][r]?n.insAtRightEnd(n[Y][r]):n.parent.bubble(function(e){var t=e[i];if(t&&(typeof t==`function`&&(t=e[i](n)),t instanceof WJ&&n.jumpUpDown(e,t),t!==!0))return!1}),e}this.onNotify(function(e){e!==`upDown`&&(this.upDownCache={})}),this.onNotify(function(e){e===`edit`&&this.show().deleteSelection()}),e.deleteDir=function(e){HJ(e);var t=this.cursor,n=t.selection;return this.notify(`edit`),n||(t[e]?t[e].deleteTowards(e,t):t.parent.deleteOutOf(e,t)),t[Y].siblingDeleted&&t[Y].siblingDeleted(t.options,X),t[X].siblingDeleted&&t[X].siblingDeleted(t.options,Y),t.parent.bubble(`reflow`),this},e.ctrlDeleteDir=function(e){HJ(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===Y?KJ(t.parent.ends[Y],t[Y]).remove():KJ(t[X],t.parent.ends[X]).remove(),t.insAtDirEnd(e,t.parent),t[Y].siblingDeleted&&t[Y].siblingDeleted(t.options,X),t[X].siblingDeleted&&t[X].siblingDeleted(t.options,Y),t.parent.bubble(`reflow`),this)},e.backspace=function(){return this.deleteDir(Y)},e.deleteForward=function(){return this.deleteDir(X)},this.onNotify(function(e){e!==`select`&&this.endSelection()}),e.selectDir=function(e){var t=this.notify(`select`).cursor,n=t.selection;HJ(e),t.anticursor||t.startSelection();var r=t[e];r?n&&n.ends[e]===r&&t.anticursor[-e]!==r?r.unselectInto(e,t):r.selectTowards(e,t):t.parent.selectOutOf(e,t),t.clearSelection(),t.select()||t.show()},e.selectLeft=function(){return this.selectDir(Y)},e.selectRight=function(){return this.selectDir(X)}});var fY=/[\\]{2,}/gm,pY=(function(){function e(e){var t=_Y();return e.adopt(t,0,0),t}function t(e){for(var t=e[0]||_Y(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[X],0);return t}var n=uY.string,r=uY.regex,i=uY.letter,a=uY.any,o=uY.optWhitespace,s=uY.succeed,c=uY.fail,l=i.map(function(e){return EY(e)}),u=r(/^[^${}\\_^]/).map(function(e){return Q(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return JJ[e]&&JJ[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=Z[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})();ZJ.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return pY.parse(e).postOrder(`finalizeTree`,$J.p).join(`latex`).trim()},eY.maxDepth=function(e){return typeof e==`number`?e:jJ},e.writeLatex=function(e){var t=this.notify(`edit`).cursor,n=uY.all,r=uY.eof,i=pY.skip(r).or(n.result(!1)).parse(e);return i&&!i.isEmpty()&&i.prepareInsertionAt(t)&&(i.children().adopt(t.parent,t[Y],t[X]),i.jQize().insertBefore(t.jQ),t[Y]=i.ends[X],i.finalizeInsert(t.options,t),i.ends[X][X].siblingCreated&&i.ends[X][X].siblingCreated(t.options,Y),i.ends[Y][Y].siblingCreated&&i.ends[Y][Y].siblingCreated(t.options,X),t.parent.bubble(`reflow`)),this},e.renderLatexMath=function(e){e&&e.replace&&(e=e.replace(fY,`\\`));var t=this.root,n=this.cursor;n.options;var r=t.jQ,i=uY.all,a=uY.eof,o=pY.skip(a).or(i.result(!1)).parse(e);if(t.eachChild(`postOrder`,`dispose`),t.ends[Y]=t.ends[X]=0,o&&o.prepareInsertionAt(n)){o.children().adopt(t,0,0);var s=o.join(`html`);r.html(s),t.jQize(r.children()),t.finalizeInsert(n.options)}else r.empty();delete n.selection,n.insAtRightEnd(t)},e.renderLatexText=function(e){var t=this.root,n=this.cursor;t.jQ.children().slice(1).remove(),t.eachChild(`postOrder`,`dispose`),t.ends[Y]=t.ends[X]=0,delete n.selection,n.show().insAtRightEnd(t);var r=uY.regex,i=uY.string,a=uY.eof,o=uY.all,s=i(`$`).then(pY).skip(i(`$`).or(a)).map(function(e){var t=SY(n);t.createBlocks();var r=t.ends[Y];return e.children().adopt(r,0,0),t}),c=i(`\\$`).result(`$`).or(r(/^[^$]/)).map(Q),l=s.or(c).many().skip(a).or(o.result(!1)).parse(e);if(l){for(var u=0;u<l.length;u+=1)l[u].adopt(t,t.ends[X],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}}),ZJ.open(function(e){$J.p.ignoreNextMousedown=IJ,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind(`mousedown.mathquill`,function(t){var n=kJ(t.target).closest(`.mq-root-block`),r=WJ.byId[n.attr(NJ)||e.attr(NJ)].controller,i=r.cursor;i.blink;var a=r.textareaSpan,o=r.textarea;if(t.preventDefault(),t.target.unselectable=!0,i.options.ignoreNextMousedown(t))return;i.options.ignoreNextMousedown=IJ;function s(e){i.anticursor||i.startSelection(),r.seek(kJ(e.target),e.pageX,e.pageY).cursor.select(),e.target&&kJ(e.target.ownerDocument).unbind(`mousemove`,c)}function c(e){return delete e.target,s(e)}function l(e){!i.selection&&!r.editable&&a.detach(),n.unbind(`mousemove`,s),kJ(e.target.ownerDocument).unbind(`mousemove`,c).unbind(`mouseup`,l)}if(a.parent().length===0)return!1;r.blurred&&(r.editable||n.prepend(a),document.body.focus(),o.focus()),t.preventDefault(),t.target.unselectable=!0,i.show(),r.seek(kJ(t.target),t.pageX,t.pageY).cursor.startSelection(),n.mousemove(s),kJ(t.target.ownerDocument).mousemove(c).mouseup(l)})}}),ZJ.open(function(e){e.seek=function(e,t,n){var r=this.notify(`select`).cursor;if(e){var i=e.attr(NJ)||e.attr(MJ);if(!i){var a=e.parent();i=a.attr(NJ)||a.attr(MJ)}}var o=i&&WJ.byId[i]?WJ.byId[i]:this.root;return r.clearSelection().show(),o.seek(t,r),this.scrollHoriz(),this}}),ZJ.open(function(e){e.scrollHoriz=function(){var e=this.cursor,t=e.selection,n=this.root.jQ[0].getBoundingClientRect();if(t){var r=t.jQ[0].getBoundingClientRect(),i=r.left-(n.left+20),a=r.right-(n.right-20);if(t.ends[Y]===e[X])if(i<0)var o=i;else if(a>0)if(r.left-a<n.left+20)var o=i;else var o=a;else return;else if(a>0)var o=a;else if(i<0)if(r.right-i>n.right-20)var o=a;else var o=i;else return}else{var s=e.jQ[0].getBoundingClientRect().left;if(s>n.right-20)var o=s-(n.right-20);else if(s<n.left+20)var o=s-(n.left+20);else return}this.root.jQ.stop&&typeof this.root.jQ.stop==`function`&&this.root.jQ.stop().animate({scrollLeft:`+=`+o},100)}}),ZJ.open(function(e){$J.p.substituteTextarea=function(){return kJ(`<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />`)[0]},e.createTextarea=function(){var e=this.textareaSpan=kJ(`<span class="mq-textarea"></span>`),t=this.options.substituteTextarea();if(!t.nodeType)throw`substituteTextarea() must return a DOM element, got `+t;t=this.textarea=kJ(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;BY(e.container[0]),e.textareaSelectionTimeout===jJ&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=jJ;var e=``;this.cursor.selection&&(e=this.cursor.selection.join(`latex`),this.options.statelessClipboard&&(e=`$`+e+`$`)),this.selectFn(e)},e.staticMathTextareaEvents=function(){var e=this;e.root;var t=e.cursor,n=e.textarea,r=e.textareaSpan;this.container.prepend(AJ(`<span class="mq-selectable">`).text(`$`+e.exportLatex()+`$`)),e.blurred=!0,n.bind(`cut paste`,!1).bind(`copy`,function(){e.setTextareaSelection()}).focus(function(){e.blurred=!1}).blur(function(){t.selection&&t.selection.clear(),setTimeout(i)});function i(){r.detach(),e.blurred=!0}e.selectFn=function(e){n.val(e),e&&n.select()}},$J.p.substituteKeyboardEvents=dY,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===`
|
|
339
|
-
`)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()}});var mY=J(WJ,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[X].siblingCreated&&n[X].siblingCreated(e,Y),n[Y].siblingCreated&&n[Y].siblingCreated(e,X),n.bubble(`reflow`)},e.prepareInsertionAt=function(e){var t=e.options.maxDepth;if(t!==jJ){var n=e.depth();if(n>t)return!1;this.removeNodesDeeperThan(t-n)}return!0},e.removeNodesDeeperThan=function(e){for(var t=0,n=[[this,t]],r;n.length;)r=n.shift(),r[0].children().each(function(i){var a=+(i instanceof _Y);t=r[1]+a,t<=e?n.push([i,t]):(a?i.children():i).remove()})}}),hY=J(mY,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=pY.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[X],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[Y],0,0),r.jQ.appendTo(n.ends[Y].jQ),n.placeCursor(e),n.prepareInsertionAt(e)),n.finalizeInsert(e.options),n.placeCursor(e)},e.createBlocks=function(){for(var e=this,t=e.numBlocks(),n=e.blocks=Array(t),r=0;r<t;r+=1)(n[r]=_Y()).adopt(e,e.ends[X],0)},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[Y],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 XJ(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[Y]=e.jQ.offset().left,t[X]=t[Y]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[Y])return t.insLeftOf(r);if(e>i[X])return t.insRightOf(r);var a=i[Y];r.eachChild(function(o){var s=n(o);if(e<s[Y])return e-a<s[Y]-e?o[Y]?t.insAtRightEnd(o[Y]):t.insLeftOf(r):t.insAtLeftEnd(o),!1;if(e>s[X])o[X]?a=s[X]:i[X]-e<e-s[X]?t.insRightOf(r):t.insAtRightEnd(o);else return 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=this,t=e.blocks,n=` mathquill-command-id=`+e.id,r=e.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);VJ(`no unmatched angle brackets`,r.join(``)===this.htmlTemplate);for(var i=0,a=r[0];a;i+=1,a=r[i])if(a.slice(-2)===`/>`)r[i]=a.slice(0,-2)+n+`/>`;else if(a.charAt(0)===`<`){VJ(`not an unmatched top-level close tag`,a.charAt(1)!==`/`),r[i]=a.slice(0,-1)+n+`>`;var o=1;do i+=1,a=r[i],VJ(`no missing close tags`,a),a.slice(0,2)===`</`?--o:a.charAt(0)===`<`&&a.slice(-2)!==`/>`&&(o+=1);while(o>0)}return r.join(``).replace(/>&(\d+)/g,function(e,n){return` mathquill-block-id=`+t[n].id+`>`+t[n].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]||``)})}}),gY=J(hY,function(e,t){e.init=function(e,n,r){r||=e&&e.length>1?e.slice(1):e,t.init.call(this,e,n,[r])},e.parser=function(){return uY.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=IJ,e.moveTowards=function(e,t){t.jQ.insDirOf(e,this.jQ),t[-e]=this,t[e]=this[e]},e.deleteTowards=function(e,t){t[e]=this.remove()[e]},e.seek=function(e,t){e-this.jQ.offset().left<this.jQ.outerWidth()/2?t.insLeftOf(this):t.insRightOf(this)},e.latex=function(){return this.ctrlSeq},e.text=function(){return this.textTemplate},e.placeCursor=IJ,e.isEmpty=function(){return!0}}),Q=J(gY,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),$=J(gY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),_Y=J(mY,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[Y]===this.ends[X]&&this.ends[Y]!==0?this.ends[Y].text():this.join(`text`)},e.keystroke=function(e,n,r){if(r.options.spaceBehavesLikeTab&&(e===`Spacebar`||e===`Shift-Spacebar`)){n.preventDefault(),r.escapeDir(e===`Shift-Spacebar`?Y:X,e,n);return}return t.keystroke.apply(this,arguments)},e.moveOutOf=function(e,t,n){!(n&&this.parent[n+`Into`])&&this[e]?t.insAtDirEnd(-e,this[e]):t.insDirOf(e,this.parent)},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[X];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[Y].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[Y];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?EY(e):/^\d$/.test(e)?wY(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?Z[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?Z[`×`](e):(n=qJ[e]||Z[e])?n(e):Q(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,QJ.StaticMath=function(e){return J(e.AbstractMathQuill,function(t,n){this.RootBlock=_Y,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}})};var vY=J(_Y,lY);QJ.MathField=function(e){return J(e.EditableField,function(e,t){this.RootBlock=vY,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=IJ),t.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})};var yY=J(WJ,function(e,t){e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof KJ?this.replacedText=e.remove().jQ.text():typeof e==`string`&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[Y]&&this.ends[Y].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){var n=this;if(t.createLeftOf.call(this,e),n[X].siblingCreated&&n[X].siblingCreated(e.options,Y),n[Y].siblingCreated&&n[Y].siblingCreated(e.options,X),n.bubble(`reflow`),e.insAtRightEnd(n),n.replacedText)for(var r=0;r<n.replacedText.length;r+=1)n.write(e,n.replacedText.charAt(r))},e.parser=function(){var e=this,t=uY.string,n=uY.regex;return uY.optWhitespace.then(t(`{`)).then(n(/^[^}]*/)).skip(t(`}`)).map(function(t){return t.length===0?KJ():(bY(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=hY.prototype.selectTowards,e.deleteTowards=hY.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){if(e.show().deleteSelection(),n!==`$`)e[Y]?(e[Y].appendText(n),this.bubble(`reflow`)):bY(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),Q(`\\$`,`$`).createLeftOf(e);else if(!e[X])e.insRightOf(this);else if(!e[Y])e.insLeftOf(this);else{var r=yY(),i=this.ends[Y];i.disown().jQ.detach(),i.adopt(r,0,0),e.insLeftOf(this),t.createLeftOf.call(r,e)}},e.seek=function(e,t){t.hide();var 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));for(var o=e-t.show().offset().left,s=o&&o<0?Y:X,c=s;t[s]&&o*c>0;)t[s].moveTowards(s,t),c=o,o=e-t.offset().left;if(s*o<-s*c&&t[-s].moveTowards(-s,t),!t.anticursor)this.anticursorPosition=t[Y]&&t[Y].text.length;else if(t.anticursor.parent===this){var l=t[Y]&&t[Y].text.length;if(this.anticursorPosition===l)t.anticursor=UJ.copy(t);else{if(this.anticursorPosition<l){var u=t[Y].splitRight(this.anticursorPosition);t[Y]=u}else var u=t[X].splitRight(this.anticursorPosition-l);t.anticursor=UJ(this,u[Y],u)}}},e.blur=function(e){_Y.prototype.blur.call(this),e&&(this.textContents()===``?(this.remove(),e[Y]===this?e[Y]=this[Y]:e[X]===this&&(e[X]=this[X])):n(this))};function n(e){e.jQ[0].normalize();var t=e.jQ.contents().filter(function(e,t){return t.nodeType===3})[0];t||={data:``},VJ(`only node in TextBlock span is Text node`,t.nodeType===3);var n=bY(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.focus=_Y.prototype.focus}),bY=J(WJ,function(e,t){e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=kJ(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){HJ(t),t===X?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=bY(this.text.slice(e)).adopt(this.parent,this,this[X]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t};function n(e,t){return t.charAt(e===Y?0:-1+t.length)}e.moveTowards=function(e,t){HJ(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):bY(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?e===X?(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){HJ(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=bY(i).createDir(e,t);r[e]=a,t.insDirOf(e,a)}else{var o=this[-e];if(o)o.insTextAtDirEnd(i,e);else{var a=bY(i).createDir(-e,t);a.jQ.insDirOf(-e,t.selection.jQ)}this.text.length===1&&r[-e]===this&&(r[-e]=this[-e])}return this.deleteTowards(e,t)}});Z.text=Z.textnormal=Z.textrm=Z.textup=Z.textmd=yY;function xY(e,t,n){return J(yY,{ctrlSeq:e,htmlTemplate:`<`+t+` `+n+`>&0</`+t+`>`})}Z.em=Z.italic=Z.italics=Z.emph=Z.textit=Z.textsl=xY(`\\textit`,`i`,`class="mq-text-mode"`),Z.strong=Z.bold=Z.textbf=xY(`\\textbf`,`b`,`class="mq-text-mode"`),Z.sf=Z.textsf=xY(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),Z.tt=Z.texttt=xY(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),Z.textsc=xY(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),Z.uppercase=xY(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),Z.lowercase=xY(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`);var SY=J(hY,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[Y].cursor=this.cursor,this.ends[Y].write=function(e,t){t===`$`?this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),Q(`\\$`,`$`).createLeftOf(e.show())):e[X]?e[Y]?_Y.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):_Y.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[Y].latex()+`$`}}),CY=J(vY,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===`$`)SY(e).createLeftOf(e);else{var n;t===`<`?n=`<`:t===`>`&&(n=`>`),Q(t,n).createLeftOf(e)}}});QJ.TextField=function(e){return J(e.EditableField,function(e,t){this.RootBlock=CY,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()}})},qJ[`\\`]=J(hY,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[Y].focus=function(){return this.parent.jQ.addClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.removeClass(`mq-empty`),this},this.ends[Y].blur=function(){return this.parent.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.addClass(`mq-empty`),this},this.ends[Y].write=function(e,t){e.show().deleteSelection(),t.match(/[a-z]/i)?Q(t).createLeftOf(e):(this.parent.renderCommand(e),(t!==`\\`||!this.isEmpty())&&e.parent.write(e,t))},this.ends[Y].keystroke=function(e,n,r){if(e===`Tab`||e===`Enter`||e===`Spacebar`){this.parent.renderCommand(r.cursor),n.preventDefault();return}return 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 kJ(e.target=n).trigger(e),!1}).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return`\\`+this.ends[Y].latex()+` `},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[X]?e.insLeftOf(this[X]):e.insAtRightEnd(this.parent);var t=this.ends[Y].latex();t||=` `;var n=Z[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):(n=yY(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),Z[`∉`]=Z.notin=q($,`\\notin `,`∉`),Z[`≅`]=Z.cong=q($,`\\cong `,`≅`),Z[`≡`]=Z.equiv=q($,`\\equiv `,`≡`),Z[`⊕`]=Z.oplus=q($,`\\oplus `,`⊕`),Z[`⊗`]=Z.otimes=q($,`\\otimes `,`⊗`),Z[`≠`]=Z.ne=Z.neq=q($,`\\ne `,`≠`),Z[`≇`]=Z.ncong=q($,`\\ncong `,`≇`),Z[`∗`]=Z.ast=Z.star=Z.loast=Z.lowast=q($,`\\ast `,`∗`),Z.therefor=Z.therefore=q($,`\\therefore `,`∴`),Z.cuz=Z.because=q($,`\\because `,`∵`),Z.prop=Z.propto=q($,`\\propto `,`∝`),Z[`≈`]=Z.asymp=Z.approx=q($,`\\approx `,`≈`),Z[`≉`]=Z.nasymp=Z.napprox=q($,`\\napprox `,`≉`),Z.isin=Z.in=q($,`\\in `,`∈`),Z.ni=Z.contains=q($,`\\ni `,`∋`),Z.notni=Z.niton=Z.notcontains=Z.doesnotcontain=JJ[`\\not\\ni`]=q($,`\\not\\ni `,`∌`),Z.sub=Z.subset=q($,`\\subset `,`⊂`),Z.sup=Z.supset=Z.superset=q($,`\\supset `,`⊃`),Z.nsub=Z.notsub=Z.nsubset=Z.notsubset=JJ[`\\not\\subset`]=q($,`\\not\\subset `,`⊄`),Z.nsup=Z.notsup=Z.nsupset=Z.notsupset=Z.nsuperset=Z.notsuperset=JJ[`\\not\\supset`]=q($,`\\not\\supset `,`⊅`),Z.sube=Z.subeq=Z.subsete=Z.subseteq=q($,`\\subseteq `,`⊆`),Z.supe=Z.supeq=Z.supsete=Z.supseteq=Z.supersete=Z.superseteq=q($,`\\supseteq `,`⊇`),Z.nsube=Z.nsubeq=Z.notsube=Z.notsubeq=Z.nsubsete=Z.nsubseteq=Z.notsubsete=Z.notsubseteq=JJ[`\\not\\subseteq`]=q($,`\\not\\subseteq `,`⊈`),Z.nsupe=Z.nsupeq=Z.notsupe=Z.notsupeq=Z.nsupsete=Z.nsupseteq=Z.notsupsete=Z.notsupseteq=Z.nsupersete=Z.nsuperseteq=Z.notsupersete=Z.notsuperseteq=JJ[`\\not\\supseteq`]=q($,`\\not\\supseteq `,`⊉`),Z.N=Z.naturals=Z.Naturals=q(Q,`\\mathbb{N}`,`ℕ`),Z.P=Z.primes=Z.Primes=Z.projective=Z.Projective=Z.probability=Z.Probability=q(Q,`\\mathbb{P}`,`ℙ`),Z.Z=Z.integers=Z.Integers=q(Q,`\\mathbb{Z}`,`ℤ`),Z.Q=Z.rationals=Z.Rationals=q(Q,`\\mathbb{Q}`,`ℚ`),Z.R=Z.reals=Z.Reals=q(Q,`\\mathbb{R}`,`ℝ`),Z.C=Z.complex=Z.Complex=Z.complexes=Z.Complexes=Z.complexplane=Z.Complexplane=Z.ComplexPlane=q(Q,`\\mathbb{C}`,`ℂ`),Z.H=Z.Hamiltonian=Z.quaternions=Z.Quaternions=q(Q,`\\mathbb{H}`,`ℍ`),Z.quad=Z.emsp=q(Q,`\\quad `,` `),Z.qquad=q(Q,`\\qquad `,` `),Z.diamond=q(Q,`\\diamond `,`◇`),Z.bigtriangleup=q(Q,`\\bigtriangleup `,`△`),Z.ominus=q(Q,`\\ominus `,`⊖`),Z.uplus=q(Q,`\\uplus `,`⊎`),Z.bigtriangledown=q(Q,`\\bigtriangledown `,`▽`),Z.sqcap=q(Q,`\\sqcap `,`⊓`),Z.triangleleft=q(Q,`\\triangleleft `,`⊲`),Z.sqcup=q(Q,`\\sqcup `,`⊔`),Z.triangleright=q(Q,`\\triangleright `,`⊳`),Z.odot=Z.circledot=q(Q,`\\odot `,`⊙`),Z.bigcirc=q(Q,`\\bigcirc `,`◯`),Z.dagger=q(Q,`\\dagger `,`†`),Z.ddagger=q(Q,`\\ddagger `,`‡`),Z.wr=q(Q,`\\wr `,`≀`),Z.amalg=q(Q,`\\amalg `,`∐`),Z.models=q(Q,`\\models `,`⊨`),Z.prec=q(Q,`\\prec `,`≺`),Z.succ=q(Q,`\\succ `,`≻`),Z.preceq=q(Q,`\\preceq `,`≼`),Z.succeq=q(Q,`\\succeq `,`≽`),Z.simeq=q(Q,`\\simeq `,`≃`),Z.mid=q(Q,`\\mid `,`∣`),Z.ll=q(Q,`\\ll `,`≪`),Z.gg=q(Q,`\\gg `,`≫`),Z.parallel=q(Q,`\\parallel `,`∥`),Z.nparallel=q(Q,`\\nparallel `,`∦`),Z.bowtie=q(Q,`\\bowtie `,`⋈`),Z.sqsubset=q(Q,`\\sqsubset `,`⊏`),Z.sqsupset=q(Q,`\\sqsupset `,`⊐`),Z.smile=q(Q,`\\smile `,`⌣`),Z.sqsubseteq=q(Q,`\\sqsubseteq `,`⊑`),Z.sqsupseteq=q(Q,`\\sqsupseteq `,`⊒`),Z.doteq=q(Q,`\\doteq `,`≐`),Z.frown=q(Q,`\\frown `,`⌢`),Z.vdash=q(Q,`\\vdash `,`⊦`),Z.dashv=q(Q,`\\dashv `,`⊣`),Z.nless=q(Q,`\\nless `,`≮`),Z.ngtr=q(Q,`\\ngtr `,`≯`),Z.longleftarrow=q(Q,`\\longleftarrow `,`←`),Z.longrightarrow=q(Q,`\\longrightarrow `,`→`),Z.Longleftarrow=q(Q,`\\Longleftarrow `,`⇐`),Z.Longrightarrow=q(Q,`\\Longrightarrow `,`⇒`),Z.longleftrightarrow=q(Q,`\\longleftrightarrow `,`↔`),Z.updownarrow=q(Q,`\\updownarrow `,`↕`),Z.Longleftrightarrow=q(Q,`\\Longleftrightarrow `,`⇔`),Z.Updownarrow=q(Q,`\\Updownarrow `,`⇕`),Z.mapsto=q(Q,`\\mapsto `,`↦`),Z.nearrow=q(Q,`\\nearrow `,`↗`),Z.hookleftarrow=q(Q,`\\hookleftarrow `,`↩`),Z.hookrightarrow=q(Q,`\\hookrightarrow `,`↪`),Z.searrow=q(Q,`\\searrow `,`↘`),Z.leftharpoonup=q(Q,`\\leftharpoonup `,`↼`),Z.rightharpoonup=q(Q,`\\rightharpoonup `,`⇀`),Z.swarrow=q(Q,`\\swarrow `,`↙`),Z.leftharpoondown=q(Q,`\\leftharpoondown `,`↽`),Z.rightharpoondown=q(Q,`\\rightharpoondown `,`⇁`),Z.nwarrow=q(Q,`\\nwarrow `,`↖`),Z.ldots=q(Q,`\\ldots `,`…`),Z.cdots=q(Q,`\\cdots `,`⋯`),Z.vdots=q(Q,`\\vdots `,`⋮`),Z.ddots=q(Q,`\\ddots `,`⋱`),Z.surd=q(Q,`\\surd `,`√`),Z.triangle=q(Q,`\\triangle `,`△`),Z.ell=q(Q,`\\ell `,`ℓ`),Z.top=q(Q,`\\top `,`⊤`),Z.flat=q(Q,`\\flat `,`♭`),Z.natural=q(Q,`\\natural `,`♮`),Z.sharp=q(Q,`\\sharp `,`♯`),Z.wp=q(Q,`\\wp `,`℘`),Z.bot=q(Q,`\\bot `,`⊥`),Z.clubsuit=q(Q,`\\clubsuit `,`♣`),Z.diamondsuit=q(Q,`\\diamondsuit `,`♢`),Z.heartsuit=q(Q,`\\heartsuit `,`♡`),Z.spadesuit=q(Q,`\\spadesuit `,`♠`),Z.circledot=q(Q,`\\circledot `,`⊙`),Z.middot=q(Q,`\\middot `,`·`),Z.dottedsquare=q(Q,`\\dottedsquare `,`⬚`),Z.square=q(Q,`\\square `,`⬜`),Z.rectangle=q(Q,`\\rectangle `,`▯`),Z.oint=q(Q,`\\oint `,`∮`),Z.bigcap=q(Q,`\\bigcap `,`∩`),Z.bigcup=q(Q,`\\bigcup `,`∪`),Z.bigsqcup=q(Q,`\\bigsqcup `,`⊔`),Z.bigvee=q(Q,`\\bigvee `,`∨`),Z.bigwedge=q(Q,`\\bigwedge `,`∧`),Z.bigodot=q(Q,`\\bigodot `,`⊙`),Z.bigotimes=q(Q,`\\bigotimes `,`⊗`),Z.bigoplus=q(Q,`\\bigoplus `,`⊕`),Z.biguplus=q(Q,`\\biguplus `,`⊎`),Z.lfloor=q(Q,`\\lfloor `,`⌊`),Z.rfloor=q(Q,`\\rfloor `,`⌋`),Z.lceil=q(Q,`\\lceil `,`⌈`),Z.rceil=q(Q,`\\rceil `,`⌉`),Z.opencurlybrace=Z.lbrace=q(Q,`\\lbrace `,`{`),Z.closecurlybrace=Z.rbrace=q(Q,`\\rbrace `,`}`),Z.lbrack=q(Q,`[`),Z.rbrack=q(Q,`]`),Z.mug=q(Q,`\\mug `,`µg`),Z.mus=q(Q,`\\mus `,`µs`),Z.mum=q(Q,`\\mum `,`µm`),Z.muL=q(Q,`\\muL `,`µL`),Z.slash=q(Q,`/`),Z.vert=q(Q,`|`),Z.perp=Z.perpendicular=q(Q,`\\perp `,`⊥`),Z.nabla=Z.del=q(Q,`\\nabla `,`∇`),Z.hbar=q(Q,`\\hbar `,`ℏ`),Z.AA=Z.Angstrom=Z.angstrom=q(Q,`\\text\\AA `,`Å`),Z.ring=Z.circ=Z.circle=q(Q,`\\circ `,`∘`),Z.bull=Z.bullet=q(Q,`\\bullet `,`•`),Z.setminus=Z.smallsetminus=q(Q,`\\setminus `,`∖`),Z.not=Z[`¬`]=Z.neg=q(Q,`\\neg `,`¬`),Z[`…`]=Z.dots=Z.ellip=Z.hellip=Z.ellipsis=Z.hellipsis=q(Q,`\\dots `,`…`),Z.converges=Z.darr=Z.dnarr=Z.dnarrow=Z.downarrow=q(Q,`\\downarrow `,`↓`),Z.dArr=Z.dnArr=Z.dnArrow=Z.Downarrow=q(Q,`\\Downarrow `,`⇓`),Z.diverges=Z.uarr=Z.uparrow=q(Q,`\\uparrow `,`↑`),Z.uArr=Z.Uparrow=q(Q,`\\Uparrow `,`⇑`),Z.to=q($,`\\to `,`→`),Z.rarr=Z.rightarrow=q(Q,`\\rightarrow `,`→`),Z.implies=q($,`\\Rightarrow `,`⇒`),Z.rArr=Z.Rightarrow=q(Q,`\\Rightarrow `,`⇒`),Z.gets=q($,`\\gets `,`←`),Z.larr=Z.leftarrow=q(Q,`\\leftarrow `,`←`),Z.impliedby=q($,`\\Leftarrow `,`⇐`),Z.lArr=Z.Leftarrow=q(Q,`\\Leftarrow `,`⇐`),Z.harr=Z.lrarr=Z.leftrightarrow=q(Q,`\\leftrightarrow `,`↔`),Z.iff=q($,`\\Leftrightarrow `,`⇔`),Z.hArr=Z.lrArr=Z.Leftrightarrow=q(Q,`\\Leftrightarrow `,`⇔`),Z.Re=Z.Real=Z.real=q(Q,`\\Re `,`ℜ`),Z.Im=Z.imag=Z.image=Z.imagin=Z.imaginary=Z.Imaginary=q(Q,`\\Im `,`ℑ`),Z.part=Z.partial=q(Q,`\\partial `,`∂`),Z.infty=Z.infin=Z.infinity=q(Q,`\\infty `,`∞`),Z.pounds=q(Q,`\\pounds `,`£`),Z.alef=Z.alefsym=Z.aleph=Z.alephsym=q(Q,`\\aleph `,`ℵ`),Z.xist=Z.xists=Z.exist=Z.exists=q(Q,`\\exists `,`∃`),Z.nexists=Z.nexist=q(Q,`\\nexists `,`∄`),Z.and=Z.land=Z.wedge=q($,`\\wedge `,`∧`),Z.or=Z.lor=Z.vee=q($,`\\vee `,`∨`),Z.o=Z.O=Z.empty=Z.emptyset=Z.oslash=Z.Oslash=Z.nothing=Z.varnothing=q($,`\\varnothing `,`∅`),Z.cup=Z.union=q($,`\\cup `,`∪`),Z.cap=Z.intersect=Z.intersection=q($,`\\cap `,`∩`),Z.deg=Z.degree=q(Q,`\\degree `,`°`),Z.ang=Z.angle=q(Q,`\\angle `,`∠`),Z.measuredangle=q(Q,`\\measuredangle `,`m∠`);var wY=J(Q,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[Y]instanceof TY&&e[Y].isItalic!==!1||e[Y]instanceof eX&&e[Y][Y]instanceof TY&&e[Y][Y].isItalic!==!1)?(Z._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),TY=J(gY,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[Y]&&!(this[Y]instanceof TY)&&!(this[Y]instanceof $)&&this[Y].ctrlSeq!==`\\ `&&(e=`*`+e),this[X]&&!(this[X]instanceof $)&&!(this[X]instanceof eX)&&(e+=`*`)),e}});$J.p.autoCommands={_maxLength:0},eY.autoCommands=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(var t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){var a=t[i];if(a.length<2)throw`autocommand "`+a+`" not minimum length of 2`;if(Z[a]===AY)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=FJ(r,a.length)}return n._maxLength=r,n};var EY=J(TY,function(e,t){e.init=function(e){return t.init.call(this,this.letter=e)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments);var n=e.options.autoCommands,r=n._maxLength;if(r>0){for(var i=``,a=this,o=0;a instanceof EY&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[Y],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(var o=1,a=this;o<i.length;o+=1,a=a[Y]);return KJ(a,this).remove(),e[Y]=a[Y],Z[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!==Y&&this[X]instanceof EY||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(t._maxLength!==0){for(var r=this.letter,i=this[Y];i instanceof EY;i=i[Y])r=i.letter+r;for(var a=this[X];a instanceof EY;a=a[X])r+=a.letter;KJ(i[X]||this.parent.ends[Y],a[Y]||this.parent.ends[X]).each(function(e){e.italicize(!0).jQ.removeClass(`mq-first mq-last mq-followed-by-supsub`),e.ctrlSeq=e.letter});outer:for(var o=0,s=i[X]||this.parent.ends[Y];o<r.length;o+=1,s=s[X])for(var c=PJ(t._maxLength,r.length-o);c>0;--c){var l=r.slice(o,o+c);if(t.hasOwnProperty(l)){for(var u=0,d=s;u<c;u+=1,d=d[X]){d.italicize(!1);var f=d}var p=DY.hasOwnProperty(l);if(s.ctrlSeq=(p?`\\`:`\\operatorname{`)+s.ctrlSeq,f.ctrlSeq+=p?` `:`}`,kY.hasOwnProperty(l)&&f[Y][Y][Y].jQ.addClass(`mq-last`),n(s[Y])||s.jQ.addClass(`mq-first`),!n(f[X]))if(f[X]instanceof eX){var m=f[X];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass(`mq-after-operator-name`,!(m[X]instanceof lX))})()}else f.jQ.toggleClass(`mq-last`,!(f[X]instanceof lX));o+=c-1,s=f;continue outer}}}};function n(e){return!e||e instanceof $||e instanceof rX}}),DY={},OY=$J.p.autoOperatorNames={_maxLength:9},kY={limsup:1,liminf:1,projlim:1,injlim:1};(function(){for(var e=`arg deg det dim exp gcd hom inf ker lg ln log max min sup limsup liminf injlim projlim Pr`.split(` `),t=0;t<e.length;t+=1)DY[e[t]]=OY[e[t]]=1;for(var n=`sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth`.split(` `),t=0;t<n.length;t+=1)DY[n[t]]=1;for(var r=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),t=0;t<r.length;t+=1)OY[r[t]]=OY[`arc`+r[t]]=OY[r[t]+`h`]=OY[`ar`+r[t]+`h`]=OY[`arc`+r[t]+`h`]=1;for(var i=`gcf hcf lcm proj span`.split(` `),t=0;t<i.length;t+=1)OY[i[t]]=1})(),eY.autoOperatorNames=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(var t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){var a=t[i];if(a.length<2)throw`"`+a+`" not minimum length of 2`;n[a]=1,r=FJ(r,a.length)}return n._maxLength=r,n};var AY=J(gY,function(e,t){e.init=function(e){this.ctrlSeq=e},e.createLeftOf=function(e){for(var t=this.ctrlSeq,n=0;n<t.length;n+=1)EY(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=_Y(),n=0;n<e.length;n+=1)EY(e.charAt(n)).adopt(t,t.ends[X],0);return uY.succeed(t.children())}});for(var jY in OY)OY.hasOwnProperty(jY)&&(Z[jY]=AY);Z.operatorname=J(hY,function(e){e.createLeftOf=IJ,e.numBlocks=function(){return 1},e.parser=function(){return pY.block.map(function(e){return e.children()})}}),Z.f=J(EY,function(e,t){e.init=function(){gY.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)}}),Z[` `]=Z.space=q(Q,`\\ `,` `),Z[`'`]=Z.prime=q(Q,`'`,`′`),Z[`″`]=Z.dprime=q(Q,`″`,`″`),Z[`"`]=Z.doublePrime=q(Q,`"`,`″`),Z.backslash=q(Q,`\\backslash `,`\\`),qJ[`\\`]||=Z.backslash,Z.$=q(Q,`\\$`,`$`);var MY=J(gY,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}});Z[`@`]=MY,Z[`&`]=q(MY,`\\&`,`&`),Z[`%`]=q(MY,`\\%`,`%`),Z.alpha=Z.beta=Z.gamma=Z.delta=Z.zeta=Z.eta=Z.theta=Z.iota=Z.kappa=Z.mu=Z.nu=Z.xi=Z.rho=Z.sigma=Z.tau=Z.chi=Z.psi=Z.omega=J(TY,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Z.phi=q(TY,`\\phi `,`ϕ`),Z.phiv=Z.varphi=q(TY,`\\varphi `,`φ`),Z.epsilon=q(TY,`\\epsilon `,`ϵ`),Z.epsiv=Z.varepsilon=q(TY,`\\varepsilon `,`ε`),Z.piv=Z.varpi=q(TY,`\\varpi `,`ϖ`),Z.sigmaf=Z.sigmav=Z.varsigma=q(TY,`\\varsigma `,`ς`),Z.thetav=Z.vartheta=Z.thetasym=q(TY,`\\vartheta `,`ϑ`),Z.upsilon=Z.upsi=q(TY,`\\upsilon `,`υ`),Z.gammad=Z.Gammad=Z.digamma=q(TY,`\\digamma `,`ϝ`),Z.kappav=Z.varkappa=q(TY,`\\varkappa `,`ϰ`),Z.rhov=Z.varrho=q(TY,`\\varrho `,`ϱ`),Z.pi=Z.π=q(MY,`\\pi `,`π`),Z.lambda=q(MY,`\\lambda `,`λ`),Z.Upsilon=Z.Upsi=Z.upsih=Z.Upsih=q(gY,`\\Upsilon `,`<var style="font-family: serif">ϒ</var>`),Z.Gamma=Z.Delta=Z.Theta=Z.Lambda=Z.Xi=Z.Pi=Z.Sigma=Z.Phi=Z.Psi=Z.Omega=J(Q,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Z.forall=Z[`∀`]=q(Q,`\\forall `,`∀`);var NY=J(hY,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=pY.parse(this.latex);t.children().adopt(e.parent,e[Y],e[X]),e[Y]=t.ends[X],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[X][X].siblingCreated&&t.ends[X][X].siblingCreated(e.options,Y),t.ends[Y][Y].siblingCreated&&t.ends[Y][Y].siblingCreated(e.options,X),e.parent.bubble(`reflow`)},e.parser=function(){var e=pY.parse(this.latex).children();return uY.succeed(e)}});Z[`¹`]=q(NY,`^1`),Z[`²`]=q(NY,`^2`),Z[`³`]=q(NY,`^3`),Z[`¼`]=q(NY,`\\frac14`),Z[`½`]=q(NY,`\\frac12`),Z[`¾`]=q(NY,`\\frac34`);var PY=J($,function(e){e.init=Q.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){function n(e){if(e[Y]){if(e[Y]instanceof $||/^[,;:\(\[]$/.test(e[Y].ctrlSeq))return``}else if(e.parent&&e.parent.parent&&e.parent.parent.isStyleBlock())return n(e.parent.parent);else return``;return`mq-binary-operator`}if(t!==X)return this.jQ[0].className=n(this),this}});Z[`+`]=q(PY,`+`,`+`),Z[`–`]=Z[`-`]=q(PY,`-`,`−`),Z[`±`]=Z.pm=Z.plusmn=Z.plusminus=q(PY,`\\pm `,`±`),Z.mp=Z.mnplus=Z.minusplus=q(PY,`\\mp `,`∓`),qJ[`*`]=Z.sdot=Z.cdot=q($,`\\cdot `,`·`,`*`);var FY=J($,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===Y&&!this.strict){this.swap(!0),this.bubble(`reflow`);return}t.deleteTowards.apply(this,arguments)}}),IY={ctrlSeq:`\\le `,html:`≤`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`<`,textStrict:`<`},LY={ctrlSeq:`\\ge `,html:`≥`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`>`,textStrict:`>`};Z[`<`]=Z.lt=q(FY,IY,!0),Z[`>`]=Z.gt=q(FY,LY,!0),Z[`≤`]=Z.le=Z.leq=q(FY,IY,!1),Z[`≥`]=Z.ge=Z.geq=q(FY,LY,!1);var RY=J($,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[Y]instanceof FY&&e[Y].strict){e[Y].swap(!1),e[Y].bubble(`reflow`);return}t.createLeftOf.apply(this,arguments)}});Z[`=`]=RY,Z[`×`]=Z.times=q($,`\\times `,`×`,`[x]`),Z[`÷`]=Z.div=Z.divide=Z.divides=q($,`\\div `,`÷`,`[/]`),qJ[`~`]=Z.sim=q($,`\\sim `,`~`,`~`),qJ[`≁`]=Z.nsim=q($,`\\nsim `,`≁`,`≁`),Z.complement=Z[`∁`]=q(Q,`\\complement `,`∁`),Z.nexists=Z[`∄`]=q(Q,`\\nexists `,`∄`),Z.sphericalangle=Z[`∢`]=q(Q,`\\sphericalangle `,`∢`),Z.iint=Z[`∬`]=q(Q,`\\iint `,`∬`),Z.iiint=Z[`∭`]=q(Q,`\\iiint `,`∭`),Z.oiint=Z[`∯`]=q(Q,`\\oiint `,`∯`),Z.oiiint=Z[`∰`]=q(Q,`\\oiiint `,`∰`),Z.backsim=Z[`∽`]=q(Q,`\\backsim `,`∽`),Z.backsimeq=Z[`⋍`]=q(Q,`\\backsimeq `,`⋍`),Z.eqsim=Z[`≂`]=q(Q,`\\eqsim `,`≂`),Z.ncong=Z[`≇`]=q(Q,`\\ncong `,`≇`),Z.approxeq=Z[`≊`]=q(Q,`\\approxeq `,`≊`),Z.bumpeq=Z[`≏`]=q(Q,`\\bumpeq `,`≏`),Z.Bumpeq=Z[`≎`]=q(Q,`\\Bumpeq `,`≎`),Z.doteqdot=Z[`≑`]=q(Q,`\\doteqdot `,`≑`),Z.fallingdotseq=Z[`≒`]=q(Q,`\\fallingdotseq `,`≒`),Z.risingdotseq=Z[`≓`]=q(Q,`\\risingdotseq `,`≓`),Z.eqcirc=Z[`≖`]=q(Q,`\\eqcirc `,`≖`),Z.circeq=Z[`≗`]=q(Q,`\\circeq `,`≗`),Z.triangleq=Z[`≜`]=q(Q,`\\triangleq `,`≜`),Z.leqq=Z[`≦`]=q(Q,`\\leqq `,`≦`),Z.geqq=Z[`≧`]=q(Q,`\\geqq `,`≧`),Z.lneqq=Z[`≨`]=q(Q,`\\lneqq `,`≨`),Z.gneqq=Z[`≩`]=q(Q,`\\gneqq `,`≩`),Z.between=Z[`≬`]=q(Q,`\\between `,`≬`),Z.nleq=Z[`≰`]=q(Q,`\\nleq `,`≰`),Z.ngeq=Z[`≱`]=q(Q,`\\ngeq `,`≱`),Z.lesssim=Z[`≲`]=q(Q,`\\lesssim `,`≲`),Z.gtrsim=Z[`≳`]=q(Q,`\\gtrsim `,`≳`),Z.lessgtr=Z[`≶`]=q(Q,`\\lessgtr `,`≶`),Z.gtrless=Z[`≷`]=q(Q,`\\gtrless `,`≷`),Z.preccurlyeq=Z[`≼`]=q(Q,`\\preccurlyeq `,`≼`),Z.succcurlyeq=Z[`≽`]=q(Q,`\\succcurlyeq `,`≽`),Z.precsim=Z[`≾`]=q(Q,`\\precsim `,`≾`),Z.succsim=Z[`≿`]=q(Q,`\\succsim `,`≿`),Z.nprec=Z[`⊀`]=q(Q,`\\nprec `,`⊀`),Z.nsucc=Z[`⊁`]=q(Q,`\\nsucc `,`⊁`),Z.subsetneq=Z[`⊊`]=q(Q,`\\subsetneq `,`⊊`),Z.supsetneq=Z[`⊋`]=q(Q,`\\supsetneq `,`⊋`),Z.vDash=Z[`⊨`]=q(Q,`\\vDash `,`⊨`),Z.Vdash=Z[`⊩`]=q(Q,`\\Vdash `,`⊩`),Z.Vvdash=Z[`⊪`]=q(Q,`\\Vvdash `,`⊪`),Z.VDash=Z[`⊫`]=q(Q,`\\VDash `,`⊫`),Z.nvdash=Z[`⊬`]=q(Q,`\\nvdash `,`⊬`),Z.nvDash=Z[`⊭`]=q(Q,`\\nvDash `,`⊭`),Z.nVdash=Z[`⊮`]=q(Q,`\\nVdash `,`⊮`),Z.nVDash=Z[`⊯`]=q(Q,`\\nVDash `,`⊯`),Z.vartriangleleft=Z[`⊲`]=q(Q,`\\vartriangleleft `,`⊲`),Z.vartriangleright=Z[`⊳`]=q(Q,`\\vartriangleright `,`⊳`),Z.trianglelefteq=Z[`⊴`]=q(Q,`\\trianglelefteq `,`⊴`),Z.trianglerighteq=Z[`⊵`]=q(Q,`\\trianglerighteq `,`⊵`),Z.multimap=Z[`⊸`]=q(Q,`\\multimap `,`⊸`),Z.Subset=Z[`⋐`]=q(Q,`\\Subset `,`⋐`),Z.Supset=Z[`⋑`]=q(Q,`\\Supset `,`⋑`),Z.Cap=Z[`⋒`]=q(Q,`\\Cap `,`⋒`),Z.Cup=Z[`⋓`]=q(Q,`\\Cup `,`⋓`),Z.pitchfork=Z[`⋔`]=q(Q,`\\pitchfork `,`⋔`),Z.lessdot=Z[`⋖`]=q(Q,`\\lessdot `,`⋖`),Z.gtrdot=Z[`⋗`]=q(Q,`\\gtrdot `,`⋗`),Z.lll=Z[`⋘`]=q(Q,`\\lll `,`⋘`),Z.ggg=Z[`⋙`]=q(Q,`\\ggg `,`⋙`),Z.lesseqgtr=Z[`⋚`]=q(Q,`\\lesseqgtr `,`⋚`),Z.gtreqless=Z[`⋛`]=q(Q,`\\gtreqless `,`⋛`),Z.curlyeqprec=Z[`⋞`]=q(Q,`\\curlyeqprec `,`⋞`),Z.curlyeqsucc=Z[`⋟`]=q(Q,`\\curlyeqsucc `,`⋟`),Z.nsim=Z[`≁`]=q(Q,`\\nsim `,`≁`),Z.lnsim=Z[`⋦`]=q(Q,`\\lnsim `,`⋦`),Z.gnsim=Z[`⋧`]=q(Q,`\\gnsim `,`⋧`),Z.precnsim=Z[`⋨`]=q(Q,`\\precnsim `,`⋨`),Z.succnsim=Z[`⋩`]=q(Q,`\\succnsim `,`⋩`),Z.ntriangleleft=Z[`⋪`]=q(Q,`\\ntriangleleft `,`⋪`),Z.ntriangleright=Z[`⋫`]=q(Q,`\\ntriangleright `,`⋫`),Z.ntrianglelefteq=Z[`⋬`]=q(Q,`\\ntrianglelefteq `,`⋬`),Z.ntrianglerighteq=Z[`⋭`]=q(Q,`\\ntrianglerighteq `,`⋭`),Z.blacksquare=Z[`∎`]=q(Q,`\\blacksquare `,`∎`),Z.colon=Z[`∶`]=q(Q,`\\colon `,`∶`),Z.llcorner=Z[`∟`]=q(Q,`\\llcorner `,`∟`),Z.dotplus=Z[`∔`]=q($,`\\dotplus `,`∔`),Z.nmid=Z[`∤`]=q($,`
|
|
340
|
-
mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`⊻`]=q($,`\\veebar `,`⊻`),Z.barwedge=Z[`⊼`]=q($,`\\barwedge `,`⊼`),Z.ltimes=Z[`⋉`]=q($,`\\ltimes `,`⋉`),Z.rtimes=Z[`⋊`]=q($,`\\rtimes `,`⋊`),Z.leftthreetimes=Z[`⋋`]=q($,`\\leftthreetimes `,`⋋`),Z.rightthreetimes=Z[`⋌`]=q($,`\\rightthreetimes `,`⋌`),Z.curlyvee=Z[`⋎`]=q($,`\\curlyvee `,`⋎`),Z.curlywedge=Z[`⋏`]=q($,`\\curlywedge `,`⋏`),Z.circledcirc=Z[`⊚`]=q($,`\\circledcirc `,`⊚`),Z.circledast=Z[`⊛`]=q($,`\\circledast `,`⊛`),Z.circleddash=Z[`⊝`]=q($,`\\circleddash `,`⊝`),Z.boxplus=Z[`⊞`]=q($,`\\boxplus `,`⊞`),Z.boxminus=Z[`⊟`]=q($,`\\boxminus `,`⊟`),Z.boxtimes=Z[`⊠`]=q($,`\\boxtimes `,`⊠`),Z.boxdot=Z[`⊡`]=q($,`\\boxdot `,`⊡`),Z[`∂`]=Z.partial,Z[`∃`]=Z.exists,Z[`∅`]=Z.varnothing,Z[`∆`]=Z.triangle,Z[`∇`]=Z.nabla,Z[`∈`]=Z.in,Z[`∊`]=Z.in,Z[`∋`]=Z.ni,Z[`∌`]=Z.notni,Z[`∍`]=Z.ni,Z[`∐`]=Z.amalg,Z[`−`]=Z[`-`],Z[`∓`]=Z.mp,Z[`∖`]=Z.setminus,Z[`∘`]=Z.circ,Z[`∙`]=Z.bullet,Z[`∝`]=Z.propto,Z[`∞`]=Z.infty,Z[`∠`]=Z.angle,Z[`∡`]=Z.measuredangle,Z[`∣`]=Z.divides,Z[`∥`]=Z.parallel,Z[`∦`]=Z.nparallel,Z[`∧`]=Z.wedge,Z[`∨`]=Z.vee,Z[`∩`]=Z.cap,Z[`∪`]=Z.cup,Z[`∮`]=Z.oint,Z[`∴`]=Z.therefore,Z[`∵`]=Z.because,Z[`∼`]=Z.sim,Z[`≀`]=Z.wr,Z[`≃`]=Z.simeq,Z[`≍`]=Z.asymp,Z[`≐`]=Z.doteq,Z[`≪`]=Z.ll,Z[`≫`]=Z.gg,Z[`≺`]=Z.prec,Z[`≻`]=Z.succ,Z[`⊂`]=Z.subset,Z[`⊃`]=Z.supset,Z[`⊆`]=Z.subseteq,Z[`⊇`]=Z.supseteq,Z[`⊈`]=Z.nsubseteq,Z[`⊉`]=Z.nsupseteq,Z[`⊏`]=Z.sqsubset,Z[`⊐`]=Z.sqsupset,Z[`⊓`]=Z.sqcap,Z[`⊔`]=Z.sqcup,Z[`⊖`]=Z.ominus,Z[`⊘`]=Z.oslash,Z[`⊙`]=Z.odot,Z[`⊢`]=Z.vdash,Z[`⊣`]=Z.dashv,Z[`⊤`]=Z.top,Z[`⊥`]=Z.bot,Z[`⊧`]=Z.models,Z[`⋀`]=Z.wedge,Z[`⋁`]=Z.vee,Z[`⋂`]=Z.cap,Z[`⋃`]=Z.cup,Z[`⋄`]=Z.diamond,Z[`⋅`]=Z.cdot,Z[`⋆`]=Z.star,Z[`⋈`]=Z.bowtie,Z[`⋮`]=Z.vdots,Z[`⋯`]=Z.cdots,Z[`⋱`]=Z.ddots;var zY,BY=IJ,VY=document.createElement(`div`).style,HY={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},UY;for(var WY in HY)if(WY in VY){UY=WY;break}UY?zY=function(e,t,n){e.css(UY,`scale(`+t+`,`+n+`)`)}:`filter`in VY?(BY=function(e){e.className=e.className},zY=function(e,t,n){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>`);var r=e.children().css(`filter`,`progid:DXImageTransform.Microsoft.Matrix(M11=`+t+`,SizingMethod='auto expand')`);function i(){e.css(`marginRight`,(r.width()-1)*(t-1)/t+`px`)}i();var a=setInterval(i);kJ(window).load(function(){clearTimeout(a),i()})}):zY=function(e,t,n){e.css(`fontSize`,n+`em`)};var GY=J(hY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),KY=J(hY,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 pY.optBlock.then(function(t){return pY.block.map(function(n){var r=qY.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))}}),qY=J(KY,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+`>`,hY.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[Y].latex()+`]{`+this.ends[X].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),JY=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return J(hY,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+`>`)}})},YY=J(hY,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>`)}}),XY=J(hY,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>`)}}),ZY=J(hY,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">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),QY=J(hY,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>`)}}),$Y=function(e,t){return J(gY,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})};Z.mathrm=q(GY,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Z.mathit=q(GY,`\\mathit`,`i`,`class="mq-font"`),Z.mathbf=q(GY,`\\mathbf`,`b`,`class="mq-font"`),Z.mathsf=q(GY,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Z.mathtt=q(GY,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Z.underline=q(GY,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Z.overline=Z.bar=q(JY(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Z.longdiv=q(YY,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Z.overrightarrow=q(JY(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Z.overleftarrow=q(JY(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Z.xleftarrow=q(KY,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Z.xrightarrow=q(KY,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Z.overleftrightarrow=q(GY,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Z.overarc=q(GY,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),Z.dot=J(hY,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">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),Z.addmatrixrow=q(XY,`\\addmatrixrow`,`span`,`+`),Z.addmatrixcol=q(QY,`\\addmatrixcol`,`span`,`+`),Z.ngtr=Z[`≯`]=q($Y(`mq-ngtr`,`≯`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Z.nless=Z[`≮`]=q($Y(`mq-nless`,`≮`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Z.dot=q(ZY,`\\dot`),Z.parallelogram=q($Y(`mq-parallelogram`,`▱`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),Z.textcolor=J(hY,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=uY.optWhitespace,r=uY.string,i=uY.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}}),Z.class=J(hY,function(e,t){e.parser=function(){var e=this,n=uY.string,r=uY.regex;return uY.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}});var eX=J(hY,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(!(!this.replacedFragment&&!e[Y]&&e.options.supSubsRequireOperand))return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=Y;t;t=t===Y&&X)if(this[t]instanceof eX){for(var n=`sub`;n;n=n===`sub`&&`sup`){var r=this[n],i=this[t][n];if(r){if(!i)this[t].addBlock(r.disown());else if(r.isEmpty())var a=UJ(i,0,i.ends[Y]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=UJ(i,o.ends[X],i.ends[Y]);t===Y?o.adopt(i,i.ends[X],0):o.adopt(i,0,i.ends[Y])}this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[Y]===this&&(t===X&&a?a[Y]?e.insRightOf(a[Y]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},$J.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[Y].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 gY?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[Y]&&!e[X]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),_Y.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 gY?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(Y,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.length===1?n:`{`+(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=kJ(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(NJ,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=kJ(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(NJ,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">​</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`]=tX,delete e[n].deleteOutOf,t===`sub`&&kJ(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=this.jQ,t=e.prev();if(t.length){var n=e.children(`.mq-sup`);if(n.length){var r=parseInt(n.css(`font-size`)),i=n.offset().top+n.height()-t.offset().top-.7*r,a=parseInt(n.css(`margin-bottom`));n.css(`margin-bottom`,a+i)}}}});function tX(e){var t=this.parent,n=e;do{if(n[X])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}Z.subscript=Z._=J(eX,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">​</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[Y],this.sub.upOutOf=tX,t.finalizeTree.call(this)}}),Z.superscript=Z.supscript=Z[`^`]=J(eX,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[X],this.sup.downOutOf=tX,t.finalizeTree.call(this)}});var nX=J(hY,function(e,t){e.parser=function(){for(var e=uY.string,t=uY.optWhitespace,n=uY.succeed,r=pY.block,i=this,a=i.blocks=[_Y(),_Y()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[X],0);return t.then(e(`_`).or(e(`^`))).then(function(e){var t=a[e===`_`?0:1];return r.then(function(e){return e.children().adopt(t,t.ends[X],0),n(i)})}).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[Y],this.upInto=this.ends[X],this.ends[Y].upOutOf=this.ends[X],this.ends[X].downOutOf=this.ends[Y]}}),rX=J(nX,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>`;gY.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())+`^`+e(this.ends[X].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(EY(`n`).createLeftOf(e),RY().createLeftOf(e))}});Z[`∑`]=Z.sum=Z.summation=q(rX,`\\sum `,`∑`),Z[`∏`]=Z.prod=Z.product=q(rX,`\\prod `,`∏`),Z.coprod=Z.coproduct=q(rX,`\\coprod `,`∐`),Z[`∫`]=Z.int=Z.integral=J(rX,function(e,t){e.init=function(){gY.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>∫</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">​</span></span></span>`)},e.createLeftOf=hY.p.createLeftOf}),Z.lim=Z.limit=J(nX,function(e,t){e.init=function(){gY.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(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())}});var iX=Z.over=qJ[`/`]=J(Z.frac=Z.dfrac=Z.cfrac=Z.fraction=J(hY,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">​</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[X].upOutOf=this.ends[Y],this.downInto=this.ends[Y].downOutOf=this.ends[X]}}),function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[Y];n&&!(n instanceof $||n instanceof(Z.text||IJ)||n instanceof rX||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[Y];n instanceof rX&&n[X]instanceof eX&&(n=n[X],n[X]instanceof eX&&n[X].ctrlSeq!=n.ctrlSeq&&(n=n[X])),n!==e[Y]&&!e.isTooDeep(1)&&(this.replaces(KJ(n[X]||e.parent.ends[Y],e[Y])),e[Y]=n)}t.createLeftOf.call(this,e)}});Z.underset=J(hY,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[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),Z.overset=J(hY,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[X].upOutOf=this.ends[Y],this.upInto=this.ends[Y].downOutOf=this.ends[X]}});var aX=Z.sqrt=Z[`√`]=J(hY,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">√</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 pY.optBlock.then(function(e){return pY.block.map(function(t){var n=oX();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[X].jQ.parent();zY(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}});Z.hat=J(hY,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(`,`)`]});var oX=Z.nthroot=J(aX,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">√</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[Y].latex()+`]{`+this.ends[X].latex()+`}`}}),sX=J(hY,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)}});Z.vec=q(sX,`\\vec`,`→`,[`vec(`,`)`]),Z.tilde=q(sX,`\\tilde`,`~`,[`tilde(`,`)`]),Z.lrncuberoot=J(aX,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">√</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[Y].latex()+`}`}}),Z.abs=J(hY,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),Z.lrnplaceholder=J(hY,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[Y].latex()}}),Z.lrnexponent=J(hY,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[X].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[Y].latex()+`^`+e}}),Z.lrnsquaredexponent=J(hY,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[Y].latex()+`^2`}}),Z.lrnsubscript=J(hY,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"> </span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[Y].latex()+`_`+this.ends[X].latex()}});function cX(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(`:first`).add(this.jQ.children(`:last`)),this.contentjQ=this.jQ.children(`:eq(1)`)},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css(`fontSize`));zY(this.delimjQs,PJ(1+.2*(e-1),1.2),1.2*e)}}var lX=J(J(hY,cX),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,jJ,[n,r]),this.side=e,this.sides={},this.sides[Y]={ch:n,ctrlSeq:i},this.sides[X]={ch:r,ctrlSeq:a}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-paren`+(this.side===X?` mq-ghost`:``)+`">`+this.sides[Y].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===Y?` mq-ghost`:``)+`">`+this.sides[X].ch+`</span></span>`,t.html.call(this)},e.latex=function(){return`\\left`+this.sides[Y].ctrlSeq+this.ends[Y].latex()+`\\right`+this.sides[X].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof lX&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||uX[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[Y].ch]===n.sides[X].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===Y?0:1).removeClass(`mq-ghost`).html(this.sides[this.side].ch)},e.createLeftOf=function(e){if(!this.replacedFragment){var n=e.options;if(this.sides[Y].ch===`|`)var r=this.matchBrack(n,X,e[X])||this.matchBrack(n,Y,e[Y])||this.matchBrack(n,0,e.parent.parent);else var r=this.matchBrack(n,-this.side,e[-this.side])||this.matchBrack(n,-this.side,e.parent.parent)}if(r){var i=this.side=-r.side;this.closeOpposing(r),r===e.parent.parent&&e[i]&&KJ(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble(`reflow`)}else r=this,i=r.side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(KJ(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===Y?e.insAtLeftEnd(r.ends[Y]):e.insRightOf(r)},e.placeCursor=IJ,e.unwrap=function(){this.ends[Y].children().disown().adopt(this.parent,this,this[X]).jQ.insertAfter(this.jQ),this.remove()},e.deleteSide=function(e,t,n){var r=this.parent,i=this[e],a=r.ends[e];if(e===this.side){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}var o=n.options,s=!this.side;if(this.side=-e,this.matchBrack(o,e,this.ends[Y].ends[this.side])){this.closeOpposing(this.ends[Y].ends[this.side]);var c=this.ends[Y].ends[e];this.unwrap(),c.siblingCreated&&c.siblingCreated(n.options,e),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r)}else{if(this.matchBrack(o,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else if(t&&s){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}else this.sides[e]={ch:uX[this.sides[this.side].ch],ctrlSeq:uX[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===Y?0:1).addClass(`mq-ghost`).html(this.sides[e].ch);if(i){var c=this.ends[Y].ends[e];KJ(i,a,-e).disown().withDirAdopt(-e,this.ends[Y],c,0).jQ.insAtDirEnd(e,this.ends[Y].jQ.removeClass(`mq-empty`)),c.siblingCreated&&c.siblingCreated(n.options,e),n.insDirOf(-e,i)}else t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[Y])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[Y].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===Y)).removeClass(`mq-ghost`),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),uX={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"⟨":`⟩`,"⟩":`⟨`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function dX(e,t){var t=t||e,n=uX[e],r=uX[t];qJ[e]=q(lX,Y,e,n,t,r),qJ[n]=q(lX,X,e,n,t,r)}dX(`(`),dX(`[`),dX(`{`,`\\{`),Z.langle=q(lX,Y,`⟨`,`⟩`,`\\langle `,`\\rangle `),Z.rangle=q(lX,X,`⟨`,`⟩`,`\\langle `,`\\rangle `),qJ[`|`]=q(lX,Y,`|`,`|`,`|`,`|`),Z.lVert=q(lX,Y,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.rVert=q(lX,X,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.left=J(hY,function(e){e.parser=function(){var e=uY.regex,t=uY.string;uY.succeed;var n=uY.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=`⟨`,r+=` `),r==`\\lVert`&&(i=`∥`,r+=` `),pY.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t=e.charAt(0)===`\\`?e.slice(1):e;e==`\\rangle`&&(t=`⟩`,e+=` `),e==`\\rVert`&&(t=`∥`,e+=` `);var n=lX(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n})})})}}),Z.right=J(hY,function(e){e.parser=function(){return uY.fail(`unmatched \\right`)}}),Z.choose=J(Z.binom=Z.binomial=J(J(hY,cX),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(`,`,`,`)`]}),function(e){e.createLeftOf=iX.prototype.createLeftOf}),Z.editable=Z.MathQuillMathField=J(hY,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=uY.string,r=uY.regex,i=uY.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=ZJ(this.ends[Y],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),lY(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[Y].controller))},e.latex=function(){return this.ends[Y].latex()},e.text=function(){return this.ends[Y].text()}});var fX=Z.embed=J(gY,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=uY.string,n=uY.regex,r=uY.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(nY[i](t))})})}});Z.MathQuillResponseContainer=J(hY,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[Y].text()}}),Z.MathQuillResponseContainerIcon=J(hY,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[Y].text()}});var pX=Z.matrix=J(hY,function(e,t){var n=J(_Y,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=this,t=e.blocks=[],r,i,a=0;this.htmlTemplate.replace(/&\d+/g,function(o,s){var c=e.htmlTemplate.substring(0,s).match(/<tr[^>]*>/gi).length-1;i=r===c?i+1:0,t[a]=n(i,c),t[a].adopt(e,e.ends[X],0),r=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&&zY(n,PJ(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e=this.getMatrixName(),t=`\\begin{`+e+`}`,n,i,a;for(a=0;a<this.blocks.length;a++)n=this.blocks[a].row,i!==void 0&&(i===n?t+=r.column:t+=r.row),i=n,t+=this.blocks[a].latex();return t+=`\\end{`+e+`}`,t},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){var n=`<span class="mq-matrix mq-non-leaf">`+o(this.parentheses.left);n+=`<table class="mq-non-leaf">`,e=Math.min(e,this.maximum.rows),t=Math.min(t,this.maximum.columns);for(var r=0,i=0;i<e;i++){n+=`<tr>`;for(var a=0;a<t;a++)n+=`<td>&`+r+`</td>`,r++;n+=`</tr>`}return n+=`</table>`,n+=o(this.parentheses.right)+`</span>`,n;function o(e){return e?`<span class="mq-paren mq-scaled">`+e+`</span>`:``}},e.htmlTemplate=e.generateHtmlTemplate(1,1),e.parser=function(){var e=uY.regex,t=this,i=this.getMatrixName(),a=RegExp(`^(.*?)\\\\end{`+i+`}`),o=RegExp(`\\\\end{`+i+`}`);return e(a).then(function(e){var i=e.replace(o,``),a=[],s=i.split(r.row),c=Math.min(s.length,t.maximum.rows),l=0,u,d;for(d=0;d<c;d++)u=s[d].split(r.column),l=Math.max(l,u.length);for(l=Math.min(l,t.maximum.columns),d=0;d<c;d++){u=s[d].split(r.column);for(var e=0;e<l;e++){var f=n(e,d);pY.parse(u[e]||` `).children().adopt(f,f.ends[X],0),a.push(f)}}t.htmlTemplate=t.generateHtmlTemplate(c,l),t.blocks=a;for(var d=0;d<a.length;d+=1)a[d].adopt(t,t.ends[X],0);return uY.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=WJ.byId[e.first().attr(NJ)],n=WJ.byId[e.last().attr(NJ)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=WJ.byId[kJ(this).attr(NJ)],a=e.eq(t+1),o=kJ(this).closest(`tr`).next(`tr`),s=kJ(this).closest(`tr`).index(),c=kJ(this).index(),l;if(a.length){var u=WJ.byId[a.attr(NJ)];n[X]=u,u[Y]=n}if(l=o.length?o.find(`td`).eq(c):r.find(`td`).eq(c+1),l.length){var d=WJ.byId[l.attr(NJ)];n.downOutOf=d,d.upOutOf=n}n.column=c,n.row=s,i.push(n)}),this.ends[Y]=t,this.ends[X]=n,t&&t[Y]&&delete t[Y],n&&n[X]&&delete n[X],this.blocks=i},e.deleteCell=function(e){var t=e.jQ.closest(`tr`),n=e.jQ.index(),r=t.index(),i=t.find(`td`).not(e.jQ),a=this.jQ.find(`tr`).not(t).map(function(){return kJ(this).find(`td`)[n]}),o=this.jQ.find(`td`).length===1,s;function c(){return WJ.byId[kJ(this).attr(NJ)].isEmpty()}return i.filter(c).length===i.length&&a.length&&(i.remove(),e.jQ.remove(),t.remove(),this.finalizeTree()),a.filter(c).length===a.length&&i.length&&(a.remove(),e.jQ.remove(),this.finalizeTree()),o||(r=Math.min(r,this.jQ.find(`tr`).length-1),n=Math.min(n,this.jQ.find(`tr`).eq(r).find(`td`).length-1),s=WJ.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(NJ)]),s},e.addRow=function(e){if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(var t=e.find(`td`).length,r=kJ(`<tr></tr>`),i,a,o=0;o<t;o++)i=n(),i.parent=this,i.jQ=kJ(`<td class="mq-empty">`).attr(NJ,i.id),r.append(i.jQ),a||=i;return r.insertAfter(e),a}},e.addColumn=function(e){if(!(e.closest(`tr`).find(`td`).length>=this.maximum.columns)){var t=e.index(),r=e.closest(`tr`).index(),i=this,a,o=[];return this.jQ.find(`tr`).each(function(){a=n(),a.parent=i,a.jQ=kJ(`<td class="mq-empty">`).attr(NJ,a.id),a.jQ.insertAfter(kJ(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`)}}});Z.pmatrix=J(pX,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Z.bmatrix=J(pX,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Z.Bmatrix=J(pX,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Z.vmatrix=J(pX,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Z.Vmatrix=J(pX,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var mX=sY(3);for(var hX in mX)(function(e,t){typeof t==`function`?(iY[e]=function(){return rY(),t.apply(this,arguments)},iY[e].prototype=t.prototype):iY[e]=t})(hX,mX[hX]);var gX=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},_X;typeof window<`u`&&(_X=iY.getInterface(3),_X&&_X.registerEmbed&&gX(_X));var vX=e=>`&.mq-math-mode ${e}, & .mq-math-mode ${e}`,yX={"&.mq-editable-field .mq-cursor, & .mq-editable-field .mq-cursor":{borderLeftColor:`currentColor`},"&.mq-editable-field:not(.mq-focused), & .mq-editable-field:not(.mq-focused)":{borderColor:VL()},[[`.mq-overline .mq-overline-inner`,`.mq-overarrow`,`.mq-overarrow .mq-overarrow-inner`,`.mq-overleftrightarrow .mq-overleftrightarrow-inner`,`.mq-overarc`,`.mq-longdiv .mq-longdiv-inner`].map(vX).join(`, `)]:{borderTopColor:`currentColor`},[[`.mq-underline`,`.mq-xarrow .mq-xarrow-over`].map(vX).join(`, `)]:{borderBottomColor:`currentColor`},[vX(`.mq-abs`)]:{borderLeftColor:`currentColor`,borderRightColor:`currentColor`},[vX(`.mq-matrix td.mq-empty`)]:{borderColor:`currentColor`}},bX={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`}},xX={"& .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`}},SX={"& .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`}},CX={"& *":{...bX,...xX,"& .mq-math-mode .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-longdiv-inner .mq-empty":{padding:`0 !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`}}},wX={mqInkStyles:yX,commonMqFontStyles:bX,longdivStyles:xX,supsubStyles:SX,commonMqKeyboardStyles:CX},TX=g(`math-input:mq:input`),EX=I(`span`)(yX),DX=class extends w.Component{static propTypes={className:m.string,onClick:m.func,onChange:m.func,latex:m.string,onFocus:m.func,onBlur:m.func,language:m.string};componentDidMount(){if(!_X)throw Error(`MQ is not defined - but component has mounted?`);this.mathField=_X.MathField(this.input,{handlers:{edit:this.onInputEdit.bind(this)}}),this.updateLatex(),EJ(this.input,this.props.language)}componentDidUpdate(){this.updateLatex(),EJ(this.input,this.props.language)}updateLatex(){if(!this.mathField)return;let{latex:e}=this.props;e!=null&&this.mathField.latex(e)}clear(){return this.mathField.latex(``),``}blur(){TX(`blur mathfield`),this.mathField.blur()}focus(){TX(`focus mathfield...`),this.mathField.focus()}command(e){return TX(`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 TX(`write: `,e),this.mathField.write(e),this.mathField.focus(),this.mathField.latex()}onInputEdit=()=>{TX(`[onInputEdit] ...`);let{onChange:e}=this.props;this.mathField&&e&&e(this.mathField.latex())};refresh=()=>{this.blur(),this.focus()};onKeyPress=e=>{if(Object.keys(this.mathField.__controller.options).indexOf(`ignoreNextMousedown`)<0&&this.refresh(),e.charCode===13){e.preventDefault();return}};onClick=e=>{let{onClick:t}=this.props;this.refresh(),t&&t(e)};shouldComponentUpdate(e){return TX(`next: `,e.latex),TX(`current: `,this.mathField.latex()),e.latex!==this.mathField.latex()}render(){let{onFocus:e,onBlur:t,className:n}=this.props;return(0,P.jsx)(EX,{className:n,onKeyDown:this.onKeyPress,onClick:this.onClick,onFocus:e,onBlur:t,ref:e=>this.input=e})}},OX=g(`pie-lib:math-input:mq:static`),kX=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,AX=/ /g;function jX(e=``){return e.replace(AX,``)}function MX(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var NX=I(`span`)(yX),PX=class extends w.Component{static propTypes={latex:m.string.isRequired,onFocus:m.func,onBlur:m.func,className:m.string,getFieldName:m.func,onSubFieldChange:m.func,onSubFieldFocus:m.func,setInput:m.func,language:m.string};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=w.createRef()}componentDidMount(){this.update(),dJ(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),dJ()}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||this._isProgrammaticUpdate)return;let t=this.props.getFieldName(e,this.mathField.innerFields);if(this.props.onSubFieldChange){let n=e.latex().match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.inputRef?.current&&n&&n?.length)try{e.__controller.cursor.insLeftOf(e.__controller.cursor.parent[-1].parent),e.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}else 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(MX(e)>MX(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.state.previousLatex!==e||this.state.isDeleteKeyPressed)&&this.setState({previousLatex:e,isDeleteKeyPressed:!1})};announceMessage=e=>{this.setState({previousLatex:``}),this.liveRegion&&(this.liveRegion.textContent=e,setTimeout(()=>{this.liveRegion.textContent=``},500))};update=()=>{if(!_X)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=_X.StaticMath(this.inputRef?.current,{handlers:{edit:this.onInputEdit.bind(this)}});try{this._isProgrammaticUpdate=!0,this.mathField.parseLatex(this.props.latex),this.mathField.latex(this.props.latex)}catch{this.mathField.latex(`\\MathQuillMathField[r1]{}`)}finally{this._isProgrammaticUpdate=!1}EJ(this.inputRef?.current,this.props.language)};blur=()=>{OX(`blur mathfield`),this.mathField.blur()};focus=()=>{OX(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=jX(this.mathField.parseLatex(e.latex)),n=(e.latex.match(kX)||[]).length,r=t!==jX(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return OX(`[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,P.jsx)(NX,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},FX=e=>(xl(5-e.length,()=>e.push([])),Sl.apply(null,e)),IX=g(`pie-lib:math-inline:keypad`),LX=cL(`pie`),RX=[uL(),mR()],zX={"& .MuiTouchRipple-root":{color:`rgb(from ${uL()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))`}},BX={"&.Mui-focusVisible":{outline:`2px solid ${eR()}`,outlineOffset:`-2px`,boxShadow:`inset 0 0 0 4px ${LX(`background`,G.WHITE)}`}},VX=I(PX)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:RX,"& .mq-scaled.mq-sqrt-prefix":{transform:`scale(1, 0.9) !important`},"& .mq-sup-only .mq-sup":{marginBottom:`0.9px !important`},"& .mq-empty":{backgroundColor:`${uR()} !important`},"& .mq-overline .mq-overline-inner":{borderTop:`2px solid currentColor`},"& .mq-non-leaf.mq-overline":{borderTop:`none !important`},"& .mq-overarrow":{width:`30px`,marginTop:`0 !important`,borderTop:`2px solid currentColor`,fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`,"&.mq-arrow-both":{top:`0px !important`,"& *":{lineHeight:`1 !important`,borderTop:`none !important`},"&:before":{fontSize:`80%`,left:`calc(-13%) !important`,top:`-0.31em !important`},"&:after":{fontSize:`80% !important`,right:`calc(-13%) !important`,top:`-1.5em`},"&.mq-empty:before":{fontSize:`80%`,left:`calc(-13%)`,top:`-0.26em`},"&.mq-empty:after":{fontSize:`80%`,right:`calc(-13%)`,top:`-0.26em`},"&.mq-empty":{minHeight:`1.4em`}},"&.mq-arrow-right:before":{fontSize:`80%`,right:`calc(-13%) !important`,top:`-0.26em !important`},"& .mq-overarrow-inner":{border:`none !important`},"& .mq-overarrow-inner .mq-overarrow-inner-right":{display:`none !important`}},"& .mq-root-block":{padding:`5px !important`},"& .mq-overarrow.mq-arrow-both.mq-empty:after":{right:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-right.mq-empty:before":{right:`-5px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-both.mq-empty:before":{left:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},"& .mq-overarc":{borderTop:`2px solid currentColor !important`,"& .mq-overline":{borderTop:`none !important`},"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`}}};return e===`\\parallel`?{...t,fontStyle:`italic !important`}:e===`\\overleftrightarrow{\\overline{}}`?{...t,"& .mq-overarrow.mq-arrow-both":{"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`},"&:after":{position:`absolute !important`,top:`0px !important`}}}:t});VX.propTypes={latex:m.string.isRequired};var HX=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},UX=I(`div`)(()=>({...CX,width:`100%`,display:`grid`,gridTemplateRows:`repeat(5, minmax(40px, 60px))`,gridRowGap:`0px`,gridColumnGap:`0px`,gridAutoFlow:`column`,"&.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`}}})),WX=I(IH)(({category:e,isDelete:t,isComma:n,isDot:r})=>({minWidth:`auto`,textTransform:`none`,fontSize:n||r?`200% !important`:`140% !important`,lineHeight:n||r?`100%`:`normal`,color:RX,backgroundColor:e===`operators`?lR():cR(),"&:hover":{backgroundColor:e===`operators`?fR():dR()},...zX,...BX,borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),GX=I(IH)(({category:e})=>({textTransform:`none`,padding:0,margin:0,fontSize:`110% !important`,minWidth:`auto`,borderRadius:0,backgroundColor:e===`operators`?lR():cR(),"&:hover":{backgroundColor:e===`operators`?fR():dR()},...zX,...BX})),KX=I(vF)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?lR():cR(),"&:hover":{backgroundColor:e===`operators`?fR():dR()},borderRadius:0,"& .icon":{height:`30px`}})),qX=class extends w.Component{static propTypes={className:m.string,controlledKeypadMode:m.bool,baseSet:m.array,additionalKeys:m.array,layoutForKeyPad:m.object,onPress:m.func.isRequired,onFocus:m.func,noDecimal:m.bool,setKeypadInteraction:m.func,mode:m.oneOfType([m.string,m.number])};static defaultProps={baseSet:wJ,noDecimal:!1};constructor(e){super(e),this.keypadRef=w.createRef()}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);if(i<0){let n=e.height+e.top-i;t&&(t.style.height=`${n}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)};buttonClick=e=>{IX(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>ml([...FX(e),...FX(t)]);keyIsNotAllowed=e=>{let{noDecimal:t}=this.props;return!!((e.write===`.`&&e.label===`.`||e.write===`,`&&e.label===`,`)&&t)};render(){let{className:e,baseSet:t,additionalKeys:n,layoutForKeyPad:r,onFocus:i,mode:a}=this.props,o=[`non-negative-integers`,`integers`,`decimals`,`fractions`,`item-authoring`,`language`].includes(a),s=o?this.flowKeys([],n||[]):this.flowKeys(t,n||[]),c=s.length%5?1:0,l={gridTemplateColumns:`repeat(${Math.floor(s.length/5)+c}, minmax(min-content, 150px))`,...HX(r)};return(0,P.jsx)(UX,{ref:this.keypadRef,className:[e,a].filter(Boolean).join(` `),style:l,onFocus:i,children:s.map((e,t)=>{let n=this.buttonClick.bind(this,e);if(!e)return(0,P.jsx)(`span`,{},`empty-${t}`);let r={onClick:n,disabled:this.keyIsNotAllowed(e),key:`${e.label||e.latex||e.command}-${t}`,...e.actions||{},...e.extraProps||{}};if(e.latex)return(0,P.jsx)(GX,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:(0,P.jsx)(VX,{latex:e.latex})},r.key);if(e.label)return(0,P.jsx)(WX,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,isDelete:e.label===`⌫`,isComma:e.label===`,`,isDot:e.label===`.`,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:e.label},r.key);{let t=e.icon?e.icon:`div`;return(0,P.jsx)(KX,{tabIndex:`-1`,onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,size:`large`,...e.actions||{},...e.extraProps||{},children:(0,P.jsx)(t,{className:`icon`})},r.key)}})})}},JX=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}},YX=class extends w.Component{static propTypes={className:m.string,controlledKeypadMode:m.bool,mode:m.oneOfType([m.string,m.number]),layoutForKeyPad:m.object,onClick:m.func.isRequired,onFocus:m.func,noDecimal:m.bool,additionalKeys:m.array,setKeypadInteraction:m.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(JX(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s}=this.props,c=uJ(a);return(0,P.jsx)(qX,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:oK(cJ(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},XX=I(`span`)(()=>({display:`inline-flex`,border:`1px solid ${zL()}`,margin:`1px 5px`,cursor:`pointer`,alignItems:`center`,justifyContent:`center`,minWidth:`50px`,minHeight:`36px`,height:`fit-content`})),ZX=I(`div`)(()=>({background:NL(),color:uL(),display:`inline-flex`,borderRight:`2px solid ${zL()}`,boxSizing:`border-box`,overflow:`hidden`,fontSize:`12px`,minHeight:`36px`,height:`100%`,alignItems:`center`,fontFamily:`Symbola, Times New Roman, serif`,padding:`0 2px`})),QX=I(`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`}})),$X=e=>{let{node:t,options:n,selected:r}=e,{attrs:i}=t,{value:a,index:o}=i,s=`R ${parseInt(o)+1}`;return(0,P.jsx)(ww,{className:`math-templated`,"data-selected":r,style:{display:`inline-flex`,minHeight:`36px`,minWidth:`50px`,cursor:`pointer`},children:(0,P.jsxs)(XX,{...i,children:[(0,P.jsx)(ZX,{children:s}),(0,P.jsx)(QX,{children:(0,P.jsx)(PX,{latex:a})})]})})};$X.propTypes={attributes:m.object,value:m.string,keyToDisplay:m.string};var eZ=e=>String(e||``).replace(/-/g,`_`),tZ=e=>e&&e.attrs&&e.attrs.index!=null?String(e.attrs.index):null,nZ=(e,t)=>{let n=0;return e.descendants(e=>{if(e.type&&e.type.name===t){let t=parseInt(tZ(e),10);!Number.isNaN(t)&&t>n&&(n=t)}return!0}),n},rZ=(e,t)=>{let n=[];return e.descendants((e,r)=>{if(e.type&&e.type.name===t){let t=tZ(e);t!=null&&n.push({index:t,pos:r,node:e})}return!0}),n},iZ=(e,t)=>{let n=0;return e.descendants(e=>(e.type&&e.type.name===t&&(n+=1),!0)),n},aZ=({schema:e,typeName:t,index:n})=>{let r=e.nodes[t];return r?r.create({index:String(n),id:String(n),value:``}):null},oZ=(e,t)=>{let n=e.resolve(Math.min(t,e.content.size));return V.near(n,1)},sZ=MS.create({name:`responseArea`,addOptions(){return{maxResponseAreas:null,error:null,options:null,respAreaToolbar:null,onHandleAreaChange:null}},addStorage(){return{lastIndexMap:{}}},addProseMirrorPlugins(){if(!this.options.type)return[];let e=eZ(this.options.type);return[new kf({key:new Mf(`response-area-watcher:${e}`),view:t=>{let{lastIndexMap:n}=this.storage;return n[e]=Math.max(n[e]??0,nZ(t.state.doc,e)),{update:(t,n)=>{let r=t.state;if(n.doc.eq(r.doc))return;let i=rZ(r.doc,e),a=rZ(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=eZ(e);if(iZ(n.doc,a)>=this.options.maxResponseAreas)return!1;let{lastIndexMap:o}=this.storage,s=Math.max(o[a]??0,nZ(n.doc,a))+1,c=aZ({schema:n.schema,typeName:a,index:s});if(!c)return!1;let{selection:l}=n,u=l.from,d=e=>{try{return t.insert(e,c),e}catch{return null}},f=d(u);if(f??=d(t.doc.content.size),f==null)return!1;if([`inline_dropdown`,`explicit_constructed_response`].includes(a))t.setSelection(H.create(t.doc,f));else{let e=f+c.nodeSize;t.setSelection(oZ(t.doc,e))}return r&&(o[a]=s,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(H.create(e.doc,o)),r&&(n.focus(),r(e)),!0}}}}),cZ=tC.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 Rw(e=>(0,P.jsx)(vW,{...e,options:this.options}))}}),lZ=tC.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 Rw(e=>(0,P.jsx)($X,{...e,options:this.options}))}}),uZ=tC.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 Rw(e=>(0,P.jsx)(YG,{...e,options:this.options}))}}),dZ=tC.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 Rw(e=>(0,P.jsx)(XG,{...e,options:this.options}))}}),fZ=Hr(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),pZ=Hr(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),mZ=Hr(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function hZ(e){return Vr(`MuiMenuItem`,e)}var gZ=Hr(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function _Z(e){return Vr(`MuiNativeSelect`,e)}var vZ=Hr(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),yZ=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return y({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`]},_Z,t)},bZ=I(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${vZ.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}}}]})),xZ=I(bZ,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:To,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${vZ.multiple}`]:t.multiple}]}})({}),SZ=I(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${vZ.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}}]})),CZ=I(SZ,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),wZ=w.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=yZ(l);return(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(xZ,{ownerState:l,className:v(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,P.jsx)(CZ,{as:a,ownerState:l,className:u.icon})]})});function TZ(e){return Vr(`MuiSelect`,e)}var EZ=Hr(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function DZ(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 OZ(e){return e==null||typeof e==`string`&&!e.trim()}function kZ(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var AZ=w.createContext(null);function jZ(){return w.useContext(AZ)}var MZ=AZ.Provider,NZ,PZ=I(bZ,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${EZ.select}`]:t.select},{[`&.${EZ.select}`]:t[n.variant]},{[`&.${EZ.error}`]:t.error},{[`&.${EZ.multiple}`]:t.multiple}]}})({[`&.${EZ.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),FZ=I(SZ,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),IZ=I(`input`,{shouldForwardProp:e=>wo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),LZ=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return y({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},TZ,t)},RZ=w.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:y,onBlur:x,onChange:S,onClose:C,onFocus:T,onKeyDown:E,onMouseDown:ee,onOpen:D,open:O,readOnly:te,renderValue:k,required:A,SelectDisplayProps:j={},tabIndex:M,type:ne,value:re,variant:ie=`standard`,...N}=e,[ae,oe]=JN({controlled:re,default:l,name:`Select`}),[se,ce]=JN({controlled:O,default:c,name:`Select`}),le=w.useRef(null),ue=w.useRef(null),[de,fe]=w.useState(null),{current:pe}=w.useRef(O!=null),[me,he]=w.useState(),[ge,_e]=w.useState(null),ve=QN(t,m),ye=w.useCallback(e=>{ue.current=e,e&&fe(e)},[]),be=de?.parentNode;w.useImperativeHandle(ve,()=>({focus:()=>{ue.current.focus()},node:le.current,value:ae}),[ae]);let xe=de!==null&&se;w.useEffect(()=>{if(!xe||!be||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{he(be.clientWidth)});return e.observe(be),()=>{e.disconnect()}},[xe,be,a]),w.useEffect(()=>{c&&se&&de&&!pe&&(he(a?null:be.clientWidth),ue.current.focus())},[de,a]),w.useEffect(()=>{i&&ue.current.focus()},[i]),w.useEffect(()=>{if(!h)return;let e=VN(ue.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&ue.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let Se=(e,t)=>{e?(_e(DZ(t)),D&&D(t)):(_e(null),C&&C(t)),pe||(he(a?null:be.clientWidth),ce(e))},Ce=e=>{ee?.(e),e.button===0&&(e.preventDefault(),ue.current.focus(),Se(!0,e))},we=e=>{Se(!1,e)},Te=w.Children.toArray(o),Ee=e=>{let t=Te.find(t=>t.props.value===e.target.value);t!==void 0&&(oe(t.props.value),S&&S(e,t))},De=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(ae)?ae.slice():[];let t=ae.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),ae!==n&&(oe(n),S)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:y}}),S(i,e)}_||Se(!1,t)}},Oe=e=>{te||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),Se(!0,e)),E?.(e))},ke=e=>{!xe&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:ae,name:y}}),x(e))};delete N[`aria-invalid`];let Ae,je,Me=[],Ne=!1;(uU({value:ae})||d)&&(k?Ae=k(ae):Ne=!0);let Pe=Te.map(e=>{if(!w.isValidElement(e))return null;let t;if(_){if(!Array.isArray(ae))throw Error(b(2));t=ae.some(t=>kZ(t,e.props.value)),t&&Ne&&Me.push(e.props.children)}else t=kZ(ae,e.props.value),t&&Ne&&(je=e.props.children);return w.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:De(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})});Ne&&(Ae=_?Me.length===0?null:Me.reduce((e,t,n)=>(e.push(t),n<Me.length-1&&e.push(`, `),e),[]):je);let Fe=me;!a&&pe&&de&&(Fe=be.clientWidth);let Ie;Ie=M===void 0?u?null:0:M;let Le=j.id||(y?`mui-component-select-${y}`:void 0),Re={...e,variant:ie,value:ae,open:xe,error:f},ze=LZ(Re),Be={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Re):g.slotProps?.paper},Ve={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Re):g.slotProps?.list},He=Ii();return(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(PZ,{as:`div`,ref:ye,tabIndex:Ie,role:`combobox`,"aria-controls":xe?He:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":xe?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Le].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":A?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Oe,onMouseDown:u||te?null:Ce,onBlur:ke,onFocus:T,...j,ownerState:Re,className:v(j.className,ze.select,s),id:Le,children:OZ(Ae)?NZ||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Ae}),(0,P.jsx)(IZ,{"aria-invalid":f,value:Array.isArray(ae)?ae.join(`,`):ae,name:y,ref:le,"aria-hidden":!0,onChange:Ee,tabIndex:-1,disabled:u,className:ze.nativeInput,autoFocus:i,required:A,...N,ownerState:Re}),(0,P.jsx)(FZ,{as:p,className:ze.icon,ownerState:Re}),(0,P.jsx)(MZ,{value:ge,children:(0,P.jsx)(nW,{id:`menu-${y||``}`,anchorEl:be,open:xe,onClose:we,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:He,...Ve},paper:{...Be,style:{minWidth:Fe,...Be==null?null:Be.style}}},children:Pe})})]})}),zZ=IN((0,P.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function BZ(e){return parseInt(e,10)||0}var VZ={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function HZ(e){for(let t in e)return!1;return!0}function UZ(e){return HZ(e)||e.outerHeightStyle===0&&!e.overflowing}var WZ=w.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=w.useRef(o!=null),l=w.useRef(null),u=ZN(t,l),d=w.useRef(null),f=w.useRef(null),p=w.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=HN(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)===`
|
|
341
|
-
`&&(n.value+=` `);let o=a.boxSizing,s=
|
|
342
|
-
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,P.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...VZ.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function GZ(e){return Vr(`MuiInputBase`,e)}var KZ=Hr(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),qZ,JZ=`mui-auto-fill`,YZ=`mui-auto-fill-cancel`,XZ=(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${L(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},ZZ=(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]},QZ=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 y({root:[`root`,`color${L(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${L(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`]},GZ,t)},$Z=I(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:XZ})(Oo(({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`,[`&.${KZ.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%`}}]}))),eQ=I(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:ZZ})(Oo(({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] + .${KZ.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},[`&.${KZ.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:YZ,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:JZ}}},{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`}}]}})),tQ=Eo({[`@keyframes ${JZ}`]:{from:{animationName:JZ}},[`@keyframes ${YZ}`]:{from:{animationName:YZ}}}),nQ=w.forwardRef(function(e,t){let n=ko({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:y={},inputRef:x,margin:S,maxRows:C,minRows:T,multiline:E=!1,name:ee,onBlur:D,onChange:O,onClick:te,onFocus:k,onKeyDown:A,onKeyUp:j,placeholder:M,readOnly:ne,renderSuffix:re,rows:ie,size:N,slotProps:ae={},slots:oe={},startAdornment:se,type:ce=`text`,value:le,...ue}=n,de=y.value==null?le:y.value,{current:fe}=w.useRef(de!=null),pe=w.useRef(),me=w.useCallback(e=>{},[]),he=QN(pe,x,y.ref,me),[ge,_e]=w.useState(!1),ve=QH(),ye=XH({props:n,muiFormControl:ve,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});ye.focused=ve?ve.focused:ge,w.useEffect(()=>{!ve&&d&&ge&&(_e(!1),D&&D())},[ve,d,ge,D]);let be=ve&&ve.onFilled,xe=ve&&ve.onEmpty,Se=w.useCallback(e=>{uU(e)?be&&be():xe&&xe()},[be,xe]);GN(()=>{fe&&Se({value:de})},[de,Se,fe]),GN(()=>{if(!a)return;let e=pe.current;if(!e)return;let t=VN(e),n=dI(t),r=n==null||n===t.body||n===t.documentElement;e===n?ve&&ve.onFocus?ve.onFocus():_e(!0):r&&e.focus()},[a]);let Ce=e=>{k&&k(e),y.onFocus&&y.onFocus(e),ve&&ve.onFocus?ve.onFocus(e):_e(!0)},we=e=>{D&&D(e),y.onBlur&&y.onBlur(e),ve&&ve.onBlur?ve.onBlur(e):_e(!1)},Te=(e,...t)=>{if(!fe){let t=e.target||pe.current;if(t==null)throw Error(b(1));Se({value:t.value})}y.onChange&&y.onChange(e,...t),O&&O(e,...t)};w.useEffect(()=>{Se(pe.current)},[]);let Ee=e=>{pe.current&&e.currentTarget===e.target&&pe.current.focus(),te&&te(e)},De=_,Oe=y;E&&De===`input`&&(Oe=ie?{type:void 0,minRows:ie,maxRows:ie,...Oe}:{type:void 0,maxRows:C,minRows:T,...Oe},De=WZ);let ke=e=>{Se(e.animationName===YZ?pe.current:{value:`x`})};w.useEffect(()=>{ve&&ve.setAdornedStart(!!se)},[ve,se]);let Ae={...n,color:ye.color||`primary`,disabled:ye.disabled,endAdornment:p,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:h,hiddenLabel:ye.hiddenLabel,multiline:E,size:ye.size,startAdornment:se,type:ce},je=QZ(Ae),Me=oe.root||c.Root||$Z,Ne=ae.root||l.root||{},Pe=oe.input||c.Input||eQ;return Oe={...Oe,...ae.input??l.input},(0,P.jsxs)(w.Fragment,{children:[!f&&typeof tQ==`function`&&(qZ||=(0,P.jsx)(tQ,{})),(0,P.jsxs)(Me,{...Ne,ref:t,onClick:Ee,...ue,...!HF(Me)&&{ownerState:{...Ae,...Ne.ownerState}},className:v(je.root,Ne.className,o,ne&&`MuiInputBase-readOnly`),children:[se,(0,P.jsx)(ZH.Provider,{value:null,children:(0,P.jsx)(Pe,{"aria-invalid":ye.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:ye.disabled,id:g,onAnimationStart:ke,name:ee,placeholder:M,readOnly:ne,required:ye.required,rows:ie,value:de,onKeyDown:A,onKeyUp:j,type:ce,...Oe,...!HF(Pe)&&{as:De,ownerState:{...Ae,...Oe.ownerState}},ref:he,className:v(je.input,Oe.className,ne&&`MuiInputBase-readOnly`),onBlur:we,onChange:Te,onFocus:Ce})}),p,re?re({...ye,startAdornment:se}):null]})]})});function rQ(e){return Vr(`MuiInput`,e)}var iQ={...KZ,...Hr(`MuiInput`,[`root`,`underline`,`input`])},aQ=e=>{let{classes:t,disableUnderline:n}=e,r=y({root:[`root`,!n&&`underline`],input:[`input`]},rQ,t);return{...t,...r}},oQ=I($Z,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...XZ(e,t),!n.disableUnderline&&t.underline]}})(Oo(({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`},[`&.${iQ.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${iQ.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(.${iQ.disabled}, .${iQ.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${iQ.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),sQ=I(eQ,{name:`MuiInput`,slot:`Input`,overridesResolver:ZZ})({}),cQ=w.forwardRef(function(e,t){let n=ko({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=aQ(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?D(l??a,m):m;return(0,P.jsx)(nQ,{slots:{root:u.root??i.Root??oQ,input:u.input??i.Input??sQ},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});cQ.muiName=`Input`;function lQ(e){return Vr(`MuiFilledInput`,e)}var uQ={...KZ,...Hr(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},dQ=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=y({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${L(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},lQ,t);return{...t,...c}},fQ=I($Z,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...XZ(e,t),!n.disableUnderline&&t.underline]}})(Oo(({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}},[`&.${uQ.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${uQ.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`},[`&.${uQ.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${uQ.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(.${uQ.disabled}, .${uQ.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${uQ.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Mo()).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}}]}})),pQ=I(eQ,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:ZZ})(Oo(({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}}]}))),mQ=w.forwardRef(function(e,t){let n=ko({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=dQ(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?D(g,u??a):g;return(0,P.jsx)(nQ,{slots:{root:d.root??i.Root??fQ,input:d.input??i.Input??pQ},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});mQ.muiName=`Input`;var hQ,gQ=I(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:To})({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%`}),_Q=I(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:To})(Oo(({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 vQ(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,P.jsx)(gQ,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,P.jsx)(_Q,{ownerState:c,children:s?(0,P.jsx)(`span`,{children:i}):hQ||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function yQ(e){return Vr(`MuiOutlinedInput`,e)}var bQ={...KZ,...Hr(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])},xQ=e=>{let{classes:t}=e,n=y({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},yQ,t);return{...t,...n}},SQ=I($Z,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:XZ})(Oo(({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 .${bQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${bQ.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${bQ.focused} .${bQ.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{[`&.${bQ.focused} .${bQ.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${bQ.error} .${bQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${bQ.disabled} .${bQ.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`}}]}})),CQ=I(vQ,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Oo(({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}})),wQ=I(eQ,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:ZZ})(Oo(({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}}]}))),TQ=w.forwardRef(function(e,t){let n=ko({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=xQ(n),m=QH(),h=XH({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??SQ,v=l.input??r.Input??wQ,[y,b]=OI(`notchedOutline`,{elementType:CQ,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,P.jsxs)(w.Fragment,{children:[o,` `,`*`]}):o}});return(0,P.jsx)(nQ,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,P.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}})});TQ.muiName=`Input`;var EQ=e=>{let{classes:t}=e,n=y({root:[`root`]},TZ,t);return{...t,...n}},DQ={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>To(e)&&e!==`variant`},OQ=I(cQ,DQ)(``),kQ=I(TQ,DQ)(``),AQ=I(mQ,DQ)(``),jQ=w.forwardRef(function(e,t){let n=ko({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=zZ,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:y,onOpen:b,open:x,renderValue:S,SelectDisplayProps:C,variant:T=`outlined`,...E}=n,ee=_?wZ:RZ,O=XH({props:n,muiFormControl:QH(),states:[`variant`,`error`]}),te=O.variant||T,k={...n,variant:te,classes:a},A=EQ(k),{root:j,...M}=A,ne=d||{standard:(0,P.jsx)(OQ,{ownerState:k}),outlined:(0,P.jsx)(kQ,{label:p,ownerState:k}),filled:(0,P.jsx)(AQ,{ownerState:k})}[te],re=QN(t,UF(ne));return(0,P.jsx)(w.Fragment,{children:w.cloneElement(ne,{inputComponent:ee,inputProps:{children:i,error:O.error,IconComponent:l,variant:te,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:y,onOpen:b,open:x,renderValue:S,SelectDisplayProps:{id:u,...C}},...f,classes:f?D(M,f.classes):M,...d?d.props.inputProps:{}},...(g&&_||c)&&te===`outlined`?{notched:!0}:{},ref:re,className:v(ne.props.className,o,A.root),...!d&&{variant:te},...E})})});jQ.muiName=`Select`;function MQ(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var NQ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},PQ=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=y({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},hZ,o);return{...o,...s}},FQ=I($P,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:NQ})(Oo(({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`}},[`&.${gZ.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${gZ.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${gZ.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)}},[`&.${gZ.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gZ.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${fZ.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${fZ.inset}`]:{marginLeft:52},[`& .${mZ.root}`]:{marginTop:0,marginBottom:0},[`& .${mZ.inset}`]:{paddingLeft:36},[`& .${pZ.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,[`& .${pZ.root} svg`]:{fontSize:`1.25rem`}}}]}))),IQ=w.forwardRef(function(e,t){let n=ko({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=jZ(),m=w.useContext(RU),h=w.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=w.useRef(null);GN(()=>{r&&g.current&&MQ(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},y=PQ(n),b=QN(g,t),{root:x,...S}=y,C;return n.disabled||(C=u===void 0?-1:u),(0,P.jsx)(RU.Provider,{value:h,children:(0,P.jsx)(FQ,{ref:b,role:l,tabIndex:C,component:i,focusVisibleClassName:v(y.focusVisible,c),className:v(y.root,d),...f,ownerState:_,classes:S})})}),LQ=()=>{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:RQ,commonMqKeyboardStyles:zQ,longdivStyles:BQ,supsubStyles:VQ}=wX,HQ=g(`@pie-lib:math-toolbar:editor-and-pad`),UQ=/\.|,/g,WQ=I(`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}})),GQ=I(`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`}},"& *":{...RQ,...VQ,...BQ,"& .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`}})),KQ=I(hU)({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`}}),qQ=I(cU)(()=>({backgroundColor:`transparent`})),JQ=I(`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`}})),YQ=I(DX)(({controlledKeypadMode:e})=>({maxWidth:e?`400px`:`500px`,color:uL(),backgroundColor:ML(),padding:`2px`})),XQ=I(IH)({position:`absolute`,right:`12px`,border:`1px solid lightgrey`,color:uL()}),ZQ=I(`hr`)(({theme:e})=>({padding:0,margin:0,height:`1px`,border:`none`,borderBottom:`solid 1px ${e.palette.primary.main}`})),QQ=I(YX)(({mode:e})=>({...zQ,...e===`language`&&{"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),$Q=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}},e$=class extends w.Component{static propTypes={classNames:m.object,keypadMode:m.oneOfType([m.string,m.number]),autoFocus:m.bool,allowAnswerBlock:m.bool,showKeypad:m.bool,controlledKeypad:m.bool,controlledKeypadMode:m.bool,error:m.string,noDecimal:m.bool,hideInput:m.bool,noLatexHandling:m.bool,layoutForKeyPad:m.object,maxResponseAreas:m.number,additionalKeys:m.array,latex:m.string.isRequired,onAnswerBlockAdd:m.func,onFocus:m.func,onBlur:m.func,onChange:m.func.isRequired,setKeypadInteraction:m.func};constructor(e){super(e),this.state={equationEditor:`item-authoring`,addDisabled:!1}}componentDidMount(){this.input&&this.props.autoFocus&&(this.focusTimeout=setTimeout(()=>{this.focusTimeout=void 0,this.input?.focus()},0))}componentWillUnmount(){this.focusTimeout&&clearTimeout(this.focusTimeout)}onClick=e=>{let{noDecimal:t,noLatexHandling:n,onChange:r}=this.props,i=$Q(e);if(HQ(`mathChange: `,i),n){r(i.value);return}t&&(i.value===`.`||i.value===`,`)||i&&(i.type===`clear`?(HQ(`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(dJ(),LQ(),this.updateDisable(!0),n&&(e.indexOf(`.`)!==-1||e.indexOf(`,`)!==-1)&&this.input){this.input.clear(),this.input.write(e.replace(UQ,``));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 HQ(`[shouldComponentUpdate] `,`inputIsDifferent: `,n),!_l(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 HQ(`[render]`,d),(0,P.jsxs)(WQ,{className:e.mathToolbar,children:[(0,P.jsxs)(GQ,{hide:l,children:[a&&(0,P.jsxs)(KQ,{variant:`standard`,children:[(0,P.jsx)(qQ,{id:`equation-editor-label`,children:`Equation Editor`}),(0,P.jsxs)(jQ,{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,P.jsx)(IQ,{value:`non-negative-integers`,children:`Numeric - Non-Negative Integers`}),(0,P.jsx)(IQ,{value:`integers`,children:`Numeric - Integers`}),(0,P.jsx)(IQ,{value:`decimals`,children:`Numeric - Decimals`}),(0,P.jsx)(IQ,{value:`fractions`,children:`Numeric - Fractions`}),(0,P.jsx)(IQ,{value:1,children:`Grade 1 - 2`}),(0,P.jsx)(IQ,{value:3,children:`Grade 3 - 5`}),(0,P.jsx)(IQ,{value:6,children:`Grade 6 - 7`}),(0,P.jsx)(IQ,{value:8,children:`Grade 8 - HS`}),(0,P.jsx)(IQ,{value:`geometry`,children:`Geometry`}),(0,P.jsx)(IQ,{value:`advanced-algebra`,children:`Advanced Algebra`}),(0,P.jsx)(IQ,{value:`statistics`,children:`Statistics`}),(0,P.jsx)(IQ,{value:`item-authoring`,children:`Item Authoring`})]})]}),(0,P.jsx)(JQ,{error:m,children:(0,P.jsx)(YQ,{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,P.jsx)(XQ,{type:`primary`,style:{bottom:h?`320px`:`20px`},onClick:this.onAnswerBlockClick,disabled:g,children:`+ Response Area`}),(0,P.jsx)(ZQ,{}),h&&(0,P.jsx)(QQ,{mode:a?this.state.equationEditor:t,controlledKeypadMode:a,layoutForKeyPad:u,additionalKeys:r,onClick:this.onClick,noDecimal:c,setKeypadInteraction:s})]})}},t$=I(vF)(({hideBackground:e})=>({verticalAlign:`top`,width:`28px`,height:`28px`,color:_L(),...e&&{backgroundColor:cL(`pie`)(`background`,G.WHITE),"&:hover":{backgroundColor:NL()}},"& .MuiIconButton-label":{position:`absolute`,top:`2px`}})),n$=({onClick:e,hideBackground:t})=>(0,P.jsx)(t$,{"aria-label":`Done`,onClick:e,hideBackground:t,size:`large`,children:(0,P.jsx)(sW,{})});n$.propTypes={onClick:m.func,hideBackground:m.bool};var r$=n$,{commonMqFontStyles:i$,longdivStyles:a$,supsubStyles:o$}=wX,s$=g(`@pie-lib:math-toolbar:math-preview`),c$=I(`div`)(({theme:e,isSelected:t})=>({display:`inline-flex`,alignItems:`center`,position:`relative`,"& *":i$,...o$,...a$,"& > .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}`}})),l$=I(`span`)({position:`absolute`,bottom:0,left:0,right:0,top:0}),u$=class extends w.Component{static propTypes={latex:m.string,isSelected:m.bool,onFocus:m.func,onBlur:m.func};componentDidMount(){LQ()}componentDidUpdate(e){this.props.latex!==e.latex&&LQ()}render(){let{isSelected:e,onFocus:t,onBlur:n,latex:r}=this.props;return s$(`[render] latex: `,r),(0,P.jsxs)(c$,{isSelected:e,children:[` `,(0,P.jsx)(l$,{}),(0,P.jsx)(PX,{latex:r,onFocus:t,onBlur:n})]})}},d$=I(`div`)({display:`flex`,width:`100%`,zIndex:8,alignItems:`center`}),f$=class extends w.Component{static propTypes={autoFocus:m.bool,allowAnswerBlock:m.bool,controlledKeypad:m.bool,controlledKeypadMode:m.bool,keypadMode:m.oneOfType([m.string,m.number]),classNames:m.object,error:m.string,maxResponseAreas:m.number,showKeypad:m.bool,noDecimal:m.bool,additionalKeys:m.array,latex:m.string.isRequired,onAnswerBlockAdd:m.func,onChange:m.func,onDone:m.func.isRequired,onFocus:m.func,onBlur:m.func,hideDoneButton:m.bool,keyPadCharacterRef:m.func,setKeypadInteraction:m.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,P.jsx)(p$,{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:_})}},p$=class extends w.Component{static propTypes={classNames:m.object,latex:m.string.isRequired,keypadMode:m.oneOfType([m.string,m.number]),hideInput:m.bool,noLatexHandling:m.bool,layoutForKeyPad:m.object,onChange:m.func.isRequired,onDone:m.func.isRequired,onBlur:m.func,onAnswerBlockAdd:m.func,additionalKeys:m.array,onFocus:m.func,autoFocus:m.bool,noDecimal:m.bool,allowAnswerBlock:m.bool,controlledKeypad:m.bool,controlledKeypadMode:m.bool,showKeypad:m.bool,hideDoneButton:m.bool,hideDoneButtonBackground:m.bool,error:m.any,maxResponseAreas:m.number,keyPadCharacterRef:m.object,setKeypadInteraction:m.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,P.jsxs)(d$,{className:e&&e.toolbar||``,ref:p,children:[(0,P.jsx)(`div`,{}),(0,P.jsx)(e$,{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,P.jsx)(r$,{hideBackground:x,onClick:_})]})}},m$=new Mf(`ensureTextAfterMath`),h$=(e=[])=>e.map(e=>({name:e,latex:e,write:e,label:e})),g$=e=>new kf({key:m$,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}}),_$=(e,t)=>{let n;for(n=t;n>0;n--){let t=e.nodeAt(n);if(t?.type?.name===`text`&&t.textContent!==``)return-1;if(t&&t?.type?.name!==`text`)break}return n},v$=new kf({key:new Mf(`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){let e=_$(a,o);return e===-1?!1:(r(n.tr.delete(e,o)),!0)}if(s&&t.key===`ArrowLeft`&&o>0){let e=_$(a,o);if(e===-1)return!1;let t=n.doc.resolve(e);if(t.nodeAfter||t.nodeBefore){let t=n.doc.resolve(e);return r(n.tr.setSelection(H.create(n.doc,t.pos))),!0}else return r(n.tr.setSelection(V.create(n.doc,o-2))),!0}return!1}}}),y$=tC.create({name:`math`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{latex:{default:``},wrapper:{default:null},html:{default:null}}},addProseMirrorPlugins(){return[g$(this.name),v$]},parseHTML(){return[{tag:`span[data-latex]`,getAttrs:e=>({latex:pV(e.getAttribute(`data-raw`)||e.textContent).unwrapped})},{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=H.create(t.doc,o.$from.pos);t.setSelection(e)}return r(t),_W(n,!0),!0}}},renderHTML({HTMLAttributes:e}){return e.html?[`span`,{"data-type":`mathml`,dangerouslySetInnerHTML:{__html:e.html}}]:[`span`,{"data-latex":``,"data-raw":e.latex},fV(e.latex,e.wrapper)]},addNodeView(){return Rw(e=>(0,P.jsx)(b$,{...e,options:this.options}))}}),b$=e=>{let{node:t,updateAttributes:n,editor:r,selected:i,options:a,getPos:o}=e,[s,c]=(0,w.useState)(i),l=(0,w.useRef)(null),u=(0,w.useRef)(null),d=(0,w.useRef)(Date.now()),[f,p]=(0,w.useState)({top:0,left:0}),{math:m={}}=a||{},{keypadMode:h,controlledKeypadMode:g=!0,customKeys:_=[],keyPadCharacterRef:v,setKeypadInteraction:y}=m,b=t.attrs.latex||``,x=e=>{n({latex:e})},S=(e,{moveCursorAfterNode:i=!0}={})=>{if(n({latex:e}),c(!1),i&&typeof o==`function`){let e=o(),{doc:n}=r.state,i=V.create(n,e+t.nodeSize),a=r.state.tr.setSelection(i);r.view.dispatch(a)}r.commands.focus()};return(0,w.useEffect)(()=>{if(!i)return;let{selection:e}=r.state;e.node?.type?.name===`math`&&c(!0)},[i,r]),(0,w.useEffect)(()=>{_W(r,i||s)},[r,s,i]),(0,w.useEffect)(()=>{if(!r||!s){p({top:0,left:0});return}let e=()=>{if(!l.current)return;let{from:e}=r.state.selection,t=r.view.coordsAtPos(e),n=u.current?.getBoundingClientRect?.(),i=n?.height?n.top:t.top,a=n?.width?n.left:t.left,o=n?.height?n.bottom:t.bottom??t.top,s=l.current.offsetHeight,c=l.current.offsetWidth,d=window.innerHeight-(o+0)>=s?o+0:i-s-0,f=a;d=Math.max(8,Math.min(d,window.innerHeight-s-8)),f=Math.max(8,Math.min(f,window.innerWidth-c-8));let m=(r._tiptapContainerEl||document.body).getBoundingClientRect();p({top:d-m.top,left:f-m.left})};e();let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))};return t=requestAnimationFrame(()=>{t=null,e()}),window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{t!==null&&cancelAnimationFrame(t),window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}},[r,s]),(0,w.useEffect)(()=>{let e=performance.now(),n=n=>{if(n?.timeStamp<e)return;let i=n?.target,a=(document.querySelectorAll?.(`[id^="equation-editor-select"][id*="listbox"], [aria-labelledby="equation-editor-label"][role="listbox"]`)||[]).length>0,o=!!(i?.id&&i.id.includes(`equation-editor-select`))||!!i?.closest?.(`[id*="equation-editor-select"]`),s=!!i?.closest?.(`.math-node-${d.current}`);if(l.current&&!l.current.contains(i)&&!i?.closest?.(`[data-inline-node]`)&&!a&&!o&&!s){c(!1);let e=!!r?.view?.dom?.contains(i);S(t.attrs.latex,{moveCursorAfterNode:!e})}};return s?document.addEventListener(`click`,n):document.removeEventListener(`click`,n),()=>document.removeEventListener(`click`,n)},[r,s,t]),(0,P.jsxs)(ww,{className:`math-node-${d.current}`,style:{display:`inline-flex`,cursor:`pointer`,margin:`0 4px`},"data-selected":i,children:[(0,P.jsx)(`div`,{ref:u,onClick:()=>c(!0),contentEditable:!1,children:(0,P.jsx)(u$,{latex:b})}),s&&rw.createPortal((0,P.jsx)(`div`,{ref:l,"data-toolbar-for":r.instanceId,style:{position:`absolute`,top:`${f.top}px`,left:`${f.left}px`,zIndex:1e3,background:oW,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,P.jsx)(f$,{latex:b,autoFocus:!0,onChange:x,onDone:S,keypadMode:h,controlledKeypadMode:g,additionalKeys:h$(_),keyPadCharacterRef:v,setKeypadInteraction:y})}),r?._tiptapContainerEl||document.body)]})};function x$(e){return Vr(`MuiLinearProgress`,e)}Hr(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var S$=4,C$=rr`
|
|
340
|
+
https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)},VX(),HX},HX.getInterface=GX;var UX=GX.MIN=1,WX=GX.MAX=3;function GX(e){if(!(UX<=e&&e<=WX))throw`Only interface versions between `+UX+` and `+WX+` supported. You specified: `+e;if(e<3&&typeof window<`u`&&!window.jQuery)throw`MathQuill interface version `+e+` requires jQuery 1.5.2+ to be loaded first`;function t(e){if(!e||!e.nodeType)return null;var t=pX(e).children(`.mq-root-block`).attr(_X),r=t&&OX.byId[t].controller;return r?n[r.KIND_OF_MQ](r):null}var n={};t.L=Y,t.R=X,t.saneKeyboardEvents=YX;function r(e,t){for(var r in t&&t.handlers&&(t.handlers={fns:t.handlers,APIClasses:n}),t)if(t.hasOwnProperty(r)){var i=t[r],a=RX[r];e[r]=a?a(i):i}}t.config=function(e){return r(LX.p,e),this},t.registerEmbed=function(e,t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw`Embed name must start with letter and be only letters and digits`;BX[e]=t};var i=n.AbstractMathQuill=J(zX,function(t){t.init=function(e){this.__controller=e,this.__options=e.options,this.id=e.id,this.data=e.data},t.parseLatex=function(e){return this.__controller.parseLatex(e)},t.__mathquillify=function(t){var n=this.__controller,r=n.root,i=n.container;n.createTextarea();var a=i.addClass(t).contents().detach();r.jQ=pX(`<span class="mq-root-block"/>`).attr(_X,r.id).appendTo(i),this.latex(a.text()),this.revert=function(){var t=i.empty().unbind(`.mathquill`).removeClass(`mq-editable-field mq-math-mode mq-text-mode`).append(a);return e>=3?t[0]:t}},t.config=function(e){return r(this.__options,e),this},t.el=function(){return this.__controller.container[0]},t.text=function(){return this.__controller.exportText()},t.latex=function(e){return arguments.length>0?(this.__controller.renderLatexMath(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()},t.html=function(){return this.__controller.root.jQ.html().replace(/ mathquill-(?:command|block)-id="?\d+"?/g,``).replace(/<span class="?mq-cursor( mq-blink)?"?>.?<\/span>/i,``).replace(/ mq-hasCursor|mq-hasCursor ?/,``).replace(/ class=(""|(?= |>))/g,``)},t.reflow=function(){return this.__controller.root.postOrder(`reflow`),this}});for(var a in t.prototype=i.prototype,n.EditableField=J(i,function(e,t){e.__mathquillify=function(){return t.__mathquillify.apply(this,arguments),this.__controller.editable=!0,this.__controller.delegateMouseEvents(),this.__controller.editablesTextareaEvents(),this},e.focus=function(){return this.__controller.textarea.focus(),this},e.blur=function(){return this.__controller.textarea.blur(),this},e.write=function(e){return this.__controller.writeLatex(e),this.__controller.scrollHoriz(),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this},e.empty=function(){var e=this.__controller.root,t=this.__controller.cursor;return e.eachChild(`postOrder`,`dispose`),e.ends[Y]=e.ends[X]=0,e.jQ.empty(),delete t.selection,t.insAtRightEnd(e),this},e.cmd=function(e){var t=this.__controller.notify(),n=t.cursor;if(/^\\[a-z]+$/i.test(e)&&!n.isTooDeep()){e=e.slice(1);var r=Z[e];r&&(e=r(e),n.selection&&e.replaces(n.replaceSelection()),e.createLeftOf(n.show()),this.__controller.scrollHoriz())}else n.parent.write(n,e);return t.blurred&&n.hide().parent.blur(),this},e.select=function(){var e=this.__controller;for(e.notify(`move`).cursor.insAtRightEnd(e.root);e.cursor[Y];)e.selectLeft();return this},e.clearSelection=function(){return this.__controller.cursor.clearSelection(),this},e.moveToDirEnd=function(e){return this.__controller.notify(`move`).cursor.insAtDirEnd(e,this.__controller.root),this},e.moveToLeftEnd=function(){return this.moveToDirEnd(Y)},e.moveToRightEnd=function(){return this.moveToDirEnd(X)},e.keystroke=function(e){for(var e=e.replace(/^\s+|\s+$/g,``).split(/\s+/),t=0;t<e.length;t+=1)this.__controller.keystroke(e[t],{preventDefault:bX});return this},e.typedText=function(e){for(var t=0;t<e.length;t+=1)this.__controller.typedText(e.charAt(t));return this},e.dropEmbedded=function(e,t,n){var r=e-pX(window).scrollLeft(),i=t-pX(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(pX(a),e,t),XZ().setOptions(n).createLeftOf(this.__controller.cursor)},e.clickAt=function(e,t,n){n||=document.elementFromPoint(e,t);var r=this.__controller,i=r.root;return mX.contains(i.jQ[0],n)||(n=i.jQ[0]),r.seek(pX(n),e+pageXOffset,t+pageYOffset),r.blurred&&this.focus(),this},e.ignoreNextMousedown=function(e){return this.__controller.cursor.options.ignoreNextMousedown=e,this}}),t.EditableField=function(){throw`wtf don't call me, I'm 'abstract'`},t.EditableField.prototype=n.EditableField.prototype,IX)(function(r,i){var a=n[r]=i(n);t[r]=function(n,i){var o=t(n);if(o instanceof a||!n||!n.nodeType)return o;var s=FX(a.RootBlock(),pX(n),LX());return s.KIND_OF_MQ=r,a(s).__mathquillify(i,e)},t[r].prototype=a.prototype})(a,IX[a]);return t}HX.noConflict=function(){return window.MathQuill=KX,HX};var KX=window.MathQuill;window.MathQuill=HX;function qX(e){for(var t=`moveOutOf deleteOutOf selectOutOf upOutOf downOutOf`.split(` `),n=0;n<t.length;n+=1)(function(t){e[t]=function(e){this.controller.handle(t,e)}})(t[n]);e.reflow=function(){this.controller.handle(`reflow`),this.controller.handle(`edited`),this.controller.handle(`edit`)}}var JX=J(function(e,t,n){function r(e,t){throw e=e?`'`+e+`'`:`EOF`,`Parse Error: `+t+` at `+e}e.init=function(e){this._=e},e.parse=function(e){return this.skip(o)._(``+e,t,r);function t(e,t){return t}},e.or=function(e){TX(`or is passed a parser`,e instanceof n);var t=this;return n(function(n,r,i){return t._(n,r,a);function a(t){return e._(n,r,i)}})},e.then=function(e){var t=this;return n(function(r,i,a){return t._(r,o,a);function o(t,r){var o=e instanceof n?e:e(r);return TX(`a parser is returned`,o instanceof n),o._(t,i,a)}})},e.many=function(){var e=this;return n(function(t,n,r){for(var i=[];e._(t,a,o););return n(t,i);function a(e,n){return t=e,i.push(n),!0}function o(){return!1}})},e.times=function(e,t){arguments.length<2&&(t=e);var r=this;return n(function(n,i,a){for(var o=[],s=!0,c,l=0;l<e;l+=1)if(s=r._(n,u,d),!s)return a(n,c);for(;l<t&&s;l+=1)s=r._(n,u,f);return i(n,o);function u(e,t){return o.push(t),n=e,!0}function d(e,t){return c=t,n=e,!1}function f(e,t){return!1}})},e.result=function(e){return this.then(a(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 a(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)})};var i=this.regex=function(e){TX(`regexp parser is anchored`,e.toString().charAt(1)===`^`);var t=`expected `+e;return n(function(n,r,i){var a=e.exec(n);if(a){var o=a[0];return r(n.slice(o.length),o)}else return i(n,t)})},a=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=i(/^[a-z]/i),n.letters=i(/^[a-z]*/i),n.digit=i(/^[0-9]/),n.digits=i(/^[0-9]*/),n.whitespace=i(/^\s+/),n.optWhitespace=i(/^\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)});var o=n.eof=n(function(e,t,n){return e?n(e,`expected EOF`):t(e,e)})}),YX=function(){var e={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`};function t(t){var n=t.which||t.keyCode,r=e[n],i,a=[];return t.ctrlKey&&a.push(`Ctrl`),t.originalEvent&&t.originalEvent.metaKey&&a.push(`Meta`),t.altKey&&a.push(`Alt`),t.shiftKey&&a.push(`Shift`),i=r||String.fromCharCode(n),!a.length&&!r?i:(a.push(i),a.join(`-`))}return function(e,n){var r=null,i=null,a=mX(e),o=mX(n.container||a),s=bX,c;function l(e){s=e,clearTimeout(c),c=setTimeout(e)}function u(e){l(function(t){s=bX,clearTimeout(c),e(t)})}o.bind(`keydown keypress input keyup focusout paste`,function(e){s(e)});function d(e){s(),s=bX,clearTimeout(c),a.val(e),e&&a[0]&&a[0].select&&a[0].select(),f=!!e}var f=!1;function p(){var e=a[0];return`selectionStart`in e&&e.selectionStart!==e.selectionEnd}function m(){n.keystroke(t(r),r)}function h(e){r=e,i=null,f&&u(function(e){!(e&&e.type===`focusout`)&&a[0]&&a[0].select&&a[0].select()}),m()}function g(e){r&&i&&m(),i=e,l(v)}function _(e){r&&!i&&l(v)}function v(){if(!p()){var e=a.val();e.length===1?(a.val(``),n.typedText(e)):e&&a[0]&&a[0].select&&a[0].select()}}function y(){r=i=null}function b(e){a.focus(),l(x)}function x(){var e=a.val();a.val(``),e&&n.paste(e)}return o.bind({keydown:h,keypress:g,keyup:_,focusout:y,cut:function(){u(function(){n.cut()})},copy:function(){u(function(){n.copy()})},paste:b}),{select:d}}}();FX.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),FX.open(function(e){e.focusBlurEvents=function(){var e=this,t=e.root,n=e.cursor,r;e.textarea.focus(function(){e.blurred=!1,clearTimeout(r),e.container.addClass(`mq-focused`),n.parent||n.insAtRightEnd(t),n.selection?(n.selection.jQ.removeClass(`mq-blur`),e.selectionChanged()):n.show()}).blur(function(){e.blurred=!0,r=setTimeout(function(){t.postOrder(`intentionalBlur`),n.clearSelection().endSelection(),a()}),pX(window).bind(`blur`,i)});function i(){clearTimeout(r),n.selection&&n.selection.jQ.addClass(`mq-blur`),a()}function a(){n.hide().parent.blur(),e.container.removeClass(`mq-focused`),pX(window).unbind(`blur`,i)}e.blurred=!0,n.hide().parent.blur()}}),FX.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),OX.open(function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case`Ctrl-Shift-Backspace`:case`Ctrl-Backspace`:n.ctrlDeleteDir(Y);break;case`Shift-Backspace`:case`Backspace`:n.backspace();break;case`Esc`:case`Tab`:n.escapeDir(X,e,t);return;case`Shift-Tab`:case`Shift-Esc`:n.escapeDir(Y,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[X];)n.selectRight();break;case`Ctrl-Shift-End`:for(;r[X]||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[Y];)n.selectLeft();break;case`Ctrl-Shift-Home`:for(;r[Y]||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[Y])for(;r[Y];)n.selectLeft();else n.selectLeft();case`Shift-Down`:if(r[X])for(;r[X];)n.selectRight();else n.selectRight();case`Ctrl-Up`:break;case`Ctrl-Down`:break;case`Ctrl-Shift-Del`:case`Ctrl-Del`:n.ctrlDeleteDir(X);break;case`Shift-Del`:case`Del`:n.deleteForward();break;case`Meta-A`:case`Ctrl-A`:for(n.notify(`move`).cursor.insAtRightEnd(n.root);r[Y];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){TX(`overridden or never called on this node`)}}),FX.open(function(e){this.onNotify(function(e){(e===`move`||e===`upDown`)&&this.show().clearSelection()}),e.escapeDir=function(e,t,n){EX(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`)},RX.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){EX(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(Y)},e.moveRight=function(){return this.moveDir(X)},e.moveUp=function(){return t(this,`up`)},e.moveDown=function(){return t(this,`down`)};function t(e,t){var n=e.notify(`upDown`).cursor,r=t+`Into`,i=t+`OutOf`;return n[X][r]?n.insAtLeftEnd(n[X][r]):n[Y][r]?n.insAtRightEnd(n[Y][r]):n.parent.bubble(function(e){var t=e[i];if(t&&(typeof t==`function`&&(t=e[i](n)),t instanceof OX&&n.jumpUpDown(e,t),t!==!0))return!1}),e}this.onNotify(function(e){e!==`upDown`&&(this.upDownCache={})}),this.onNotify(function(e){e===`edit`&&this.show().deleteSelection()}),e.deleteDir=function(e){EX(e);var t=this.cursor,n=t.selection;return this.notify(`edit`),n||(t[e]?t[e].deleteTowards(e,t):t.parent.deleteOutOf(e,t)),t[Y].siblingDeleted&&t[Y].siblingDeleted(t.options,X),t[X].siblingDeleted&&t[X].siblingDeleted(t.options,Y),t.parent.bubble(`reflow`),this},e.ctrlDeleteDir=function(e){EX(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===Y?AX(t.parent.ends[Y],t[Y]).remove():AX(t[X],t.parent.ends[X]).remove(),t.insAtDirEnd(e,t.parent),t[Y].siblingDeleted&&t[Y].siblingDeleted(t.options,X),t[X].siblingDeleted&&t[X].siblingDeleted(t.options,Y),t.parent.bubble(`reflow`),this)},e.backspace=function(){return this.deleteDir(Y)},e.deleteForward=function(){return this.deleteDir(X)},this.onNotify(function(e){e!==`select`&&this.endSelection()}),e.selectDir=function(e){var t=this.notify(`select`).cursor,n=t.selection;EX(e),t.anticursor||t.startSelection();var r=t[e];r?n&&n.ends[e]===r&&t.anticursor[-e]!==r?r.unselectInto(e,t):r.selectTowards(e,t):t.parent.selectOutOf(e,t),t.clearSelection(),t.select()||t.show()},e.selectLeft=function(){return this.selectDir(Y)},e.selectRight=function(){return this.selectDir(X)}});var XX=/[\\]{2,}/gm,ZX=(function(){function e(e){var t=tZ();return e.adopt(t,0,0),t}function t(e){for(var t=e[0]||tZ(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[X],0);return t}var n=JX.string,r=JX.regex,i=JX.letter,a=JX.any,o=JX.optWhitespace,s=JX.succeed,c=JX.fail,l=i.map(function(e){return uZ(e)}),u=r(/^[^${}\\_^]/).map(function(e){return Q(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return MX[e]&&MX[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=Z[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})();FX.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return ZX.parse(e).postOrder(`finalizeTree`,LX.p).join(`latex`).trim()},RX.maxDepth=function(e){return typeof e==`number`?e:hX},e.writeLatex=function(e){var t=this.notify(`edit`).cursor,n=JX.all,r=JX.eof,i=ZX.skip(r).or(n.result(!1)).parse(e);return i&&!i.isEmpty()&&i.prepareInsertionAt(t)&&(i.children().adopt(t.parent,t[Y],t[X]),i.jQize().insertBefore(t.jQ),t[Y]=i.ends[X],i.finalizeInsert(t.options,t),i.ends[X][X].siblingCreated&&i.ends[X][X].siblingCreated(t.options,Y),i.ends[Y][Y].siblingCreated&&i.ends[Y][Y].siblingCreated(t.options,X),t.parent.bubble(`reflow`)),this},e.renderLatexMath=function(e){e&&e.replace&&(e=e.replace(XX,`\\`));var t=this.root,n=this.cursor;n.options;var r=t.jQ,i=JX.all,a=JX.eof,o=ZX.skip(a).or(i.result(!1)).parse(e);if(t.eachChild(`postOrder`,`dispose`),t.ends[Y]=t.ends[X]=0,o&&o.prepareInsertionAt(n)){o.children().adopt(t,0,0);var s=o.join(`html`);r.html(s),t.jQize(r.children()),t.finalizeInsert(n.options)}else r.empty();delete n.selection,n.insAtRightEnd(t)},e.renderLatexText=function(e){var t=this.root,n=this.cursor;t.jQ.children().slice(1).remove(),t.eachChild(`postOrder`,`dispose`),t.ends[Y]=t.ends[X]=0,delete n.selection,n.show().insAtRightEnd(t);var r=JX.regex,i=JX.string,a=JX.eof,o=JX.all,s=i(`$`).then(ZX).skip(i(`$`).or(a)).map(function(e){var t=oZ(n);t.createBlocks();var r=t.ends[Y];return e.children().adopt(r,0,0),t}),c=i(`\\$`).result(`$`).or(r(/^[^$]/)).map(Q),l=s.or(c).many().skip(a).or(o.result(!1)).parse(e);if(l){for(var u=0;u<l.length;u+=1)l[u].adopt(t,t.ends[X],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}}),FX.open(function(e){LX.p.ignoreNextMousedown=bX,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind(`mousedown.mathquill`,function(t){var n=pX(t.target).closest(`.mq-root-block`),r=OX.byId[n.attr(_X)||e.attr(_X)].controller,i=r.cursor;i.blink;var a=r.textareaSpan,o=r.textarea;if(t.preventDefault(),t.target.unselectable=!0,i.options.ignoreNextMousedown(t))return;i.options.ignoreNextMousedown=bX;function s(e){i.anticursor||i.startSelection(),r.seek(pX(e.target),e.pageX,e.pageY).cursor.select(),e.target&&pX(e.target.ownerDocument).unbind(`mousemove`,c)}function c(e){return delete e.target,s(e)}function l(e){!i.selection&&!r.editable&&a.detach(),n.unbind(`mousemove`,s),pX(e.target.ownerDocument).unbind(`mousemove`,c).unbind(`mouseup`,l)}if(a.parent().length===0)return!1;r.blurred&&(r.editable||n.prepend(a),document.body.focus(),o.focus()),t.preventDefault(),t.target.unselectable=!0,i.show(),r.seek(pX(t.target),t.pageX,t.pageY).cursor.startSelection(),n.mousemove(s),pX(t.target.ownerDocument).mousemove(c).mouseup(l)})}}),FX.open(function(e){e.seek=function(e,t,n){var r=this.notify(`select`).cursor;if(e){var i=e.attr(_X)||e.attr(gX);if(!i){var a=e.parent();i=a.attr(_X)||a.attr(gX)}}var o=i&&OX.byId[i]?OX.byId[i]:this.root;return r.clearSelection().show(),o.seek(t,r),this.scrollHoriz(),this}}),FX.open(function(e){e.scrollHoriz=function(){var e=this.cursor,t=e.selection,n=this.root.jQ[0].getBoundingClientRect();if(t){var r=t.jQ[0].getBoundingClientRect(),i=r.left-(n.left+20),a=r.right-(n.right-20);if(t.ends[Y]===e[X])if(i<0)var o=i;else if(a>0)if(r.left-a<n.left+20)var o=i;else var o=a;else return;else if(a>0)var o=a;else if(i<0)if(r.right-i>n.right-20)var o=a;else var o=i;else return}else{var s=e.jQ[0].getBoundingClientRect().left;if(s>n.right-20)var o=s-(n.right-20);else if(s<n.left+20)var o=s-(n.left+20);else return}this.root.jQ.stop&&typeof this.root.jQ.stop==`function`&&this.root.jQ.stop().animate({scrollLeft:`+=`+o},100)}}),FX.open(function(e){LX.p.substituteTextarea=function(){return pX(`<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />`)[0]},e.createTextarea=function(){var e=this.textareaSpan=pX(`<span class="mq-textarea"></span>`),t=this.options.substituteTextarea();if(!t.nodeType)throw`substituteTextarea() must return a DOM element, got `+t;t=this.textarea=pX(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;wZ(e.container[0]),e.textareaSelectionTimeout===hX&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=hX;var e=``;this.cursor.selection&&(e=this.cursor.selection.join(`latex`),this.options.statelessClipboard&&(e=`$`+e+`$`)),this.selectFn(e)},e.staticMathTextareaEvents=function(){var e=this;e.root;var t=e.cursor,n=e.textarea,r=e.textareaSpan;this.container.prepend(mX(`<span class="mq-selectable">`).text(`$`+e.exportLatex()+`$`)),e.blurred=!0,n.bind(`cut paste`,!1).bind(`copy`,function(){e.setTextareaSelection()}).focus(function(){e.blurred=!1}).blur(function(){t.selection&&t.selection.clear(),setTimeout(i)});function i(){r.detach(),e.blurred=!0}e.selectFn=function(e){n.val(e),e&&n.select()}},LX.p.substituteKeyboardEvents=YX,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===`
|
|
341
|
+
`)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()}});var QX=J(OX,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[X].siblingCreated&&n[X].siblingCreated(e,Y),n[Y].siblingCreated&&n[Y].siblingCreated(e,X),n.bubble(`reflow`)},e.prepareInsertionAt=function(e){var t=e.options.maxDepth;if(t!==hX){var n=e.depth();if(n>t)return!1;this.removeNodesDeeperThan(t-n)}return!0},e.removeNodesDeeperThan=function(e){for(var t=0,n=[[this,t]],r;n.length;)r=n.shift(),r[0].children().each(function(i){var a=+(i instanceof tZ);t=r[1]+a,t<=e?n.push([i,t]):(a?i.children():i).remove()})}}),$X=J(QX,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=ZX.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[X],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[Y],0,0),r.jQ.appendTo(n.ends[Y].jQ),n.placeCursor(e),n.prepareInsertionAt(e)),n.finalizeInsert(e.options),n.placeCursor(e)},e.createBlocks=function(){for(var e=this,t=e.numBlocks(),n=e.blocks=Array(t),r=0;r<t;r+=1)(n[r]=tZ()).adopt(e,e.ends[X],0)},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[Y],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 PX(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[Y]=e.jQ.offset().left,t[X]=t[Y]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[Y])return t.insLeftOf(r);if(e>i[X])return t.insRightOf(r);var a=i[Y];r.eachChild(function(o){var s=n(o);if(e<s[Y])return e-a<s[Y]-e?o[Y]?t.insAtRightEnd(o[Y]):t.insLeftOf(r):t.insAtLeftEnd(o),!1;if(e>s[X])o[X]?a=s[X]:i[X]-e<e-s[X]?t.insRightOf(r):t.insAtRightEnd(o);else return 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=this,t=e.blocks,n=` mathquill-command-id=`+e.id,r=e.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);TX(`no unmatched angle brackets`,r.join(``)===this.htmlTemplate);for(var i=0,a=r[0];a;i+=1,a=r[i])if(a.slice(-2)===`/>`)r[i]=a.slice(0,-2)+n+`/>`;else if(a.charAt(0)===`<`){TX(`not an unmatched top-level close tag`,a.charAt(1)!==`/`),r[i]=a.slice(0,-1)+n+`>`;var o=1;do i+=1,a=r[i],TX(`no missing close tags`,a),a.slice(0,2)===`</`?--o:a.charAt(0)===`<`&&a.slice(-2)!==`/>`&&(o+=1);while(o>0)}return r.join(``).replace(/>&(\d+)/g,function(e,n){return` mathquill-block-id=`+t[n].id+`>`+t[n].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]||``)})}}),eZ=J($X,function(e,t){e.init=function(e,n,r){r||=e&&e.length>1?e.slice(1):e,t.init.call(this,e,n,[r])},e.parser=function(){return JX.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=bX,e.moveTowards=function(e,t){t.jQ.insDirOf(e,this.jQ),t[-e]=this,t[e]=this[e]},e.deleteTowards=function(e,t){t[e]=this.remove()[e]},e.seek=function(e,t){e-this.jQ.offset().left<this.jQ.outerWidth()/2?t.insLeftOf(this):t.insRightOf(this)},e.latex=function(){return this.ctrlSeq},e.text=function(){return this.textTemplate},e.placeCursor=bX,e.isEmpty=function(){return!0}}),Q=J(eZ,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),$=J(eZ,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),tZ=J(QX,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[Y]===this.ends[X]&&this.ends[Y]!==0?this.ends[Y].text():this.join(`text`)},e.keystroke=function(e,n,r){if(r.options.spaceBehavesLikeTab&&(e===`Spacebar`||e===`Shift-Spacebar`)){n.preventDefault(),r.escapeDir(e===`Shift-Spacebar`?Y:X,e,n);return}return t.keystroke.apply(this,arguments)},e.moveOutOf=function(e,t,n){!(n&&this.parent[n+`Into`])&&this[e]?t.insAtDirEnd(-e,this[e]):t.insDirOf(e,this.parent)},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[X];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[Y].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[Y];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?uZ(e):/^\d$/.test(e)?cZ(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?Z[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?Z[`×`](e):(n=jX[e]||Z[e])?n(e):Q(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}});LX.p.mouseEvents=!0,IX.StaticMath=function(e){return J(e.AbstractMathQuill,function(t,n){this.RootBlock=tZ,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}})};var nZ=J(tZ,qX);IX.MathField=function(e){return J(e.EditableField,function(e,t){this.RootBlock=nZ,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=bX),t.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})};var rZ=J(OX,function(e,t){e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof AX?this.replacedText=e.remove().jQ.text():typeof e==`string`&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[Y]&&this.ends[Y].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){var n=this;if(t.createLeftOf.call(this,e),n[X].siblingCreated&&n[X].siblingCreated(e.options,Y),n[Y].siblingCreated&&n[Y].siblingCreated(e.options,X),n.bubble(`reflow`),e.insAtRightEnd(n),n.replacedText)for(var r=0;r<n.replacedText.length;r+=1)n.write(e,n.replacedText.charAt(r))},e.parser=function(){var e=this,t=JX.string,n=JX.regex;return JX.optWhitespace.then(t(`{`)).then(n(/^[^}]*/)).skip(t(`}`)).map(function(t){return t.length===0?AX():(iZ(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=$X.prototype.selectTowards,e.deleteTowards=$X.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){if(e.show().deleteSelection(),n!==`$`)e[Y]?(e[Y].appendText(n),this.bubble(`reflow`)):iZ(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),Q(`\\$`,`$`).createLeftOf(e);else if(!e[X])e.insRightOf(this);else if(!e[Y])e.insLeftOf(this);else{var r=rZ(),i=this.ends[Y];i.disown().jQ.detach(),i.adopt(r,0,0),e.insLeftOf(this),t.createLeftOf.call(r,e)}},e.seek=function(e,t){t.hide();var 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));for(var o=e-t.show().offset().left,s=o&&o<0?Y:X,c=s;t[s]&&o*c>0;)t[s].moveTowards(s,t),c=o,o=e-t.offset().left;if(s*o<-s*c&&t[-s].moveTowards(-s,t),!t.anticursor)this.anticursorPosition=t[Y]&&t[Y].text.length;else if(t.anticursor.parent===this){var l=t[Y]&&t[Y].text.length;if(this.anticursorPosition===l)t.anticursor=DX.copy(t);else{if(this.anticursorPosition<l){var u=t[Y].splitRight(this.anticursorPosition);t[Y]=u}else var u=t[X].splitRight(this.anticursorPosition-l);t.anticursor=DX(this,u[Y],u)}}},e.blur=function(e){tZ.prototype.blur.call(this),e&&(this.textContents()===``?(this.remove(),e[Y]===this?e[Y]=this[Y]:e[X]===this&&(e[X]=this[X])):n(this))};function n(e){e.jQ[0].normalize();var t=e.jQ.contents().filter(function(e,t){return t.nodeType===3})[0];t||={data:``},TX(`only node in TextBlock span is Text node`,t.nodeType===3);var n=iZ(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.focus=tZ.prototype.focus}),iZ=J(OX,function(e,t){e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=pX(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){EX(t),t===X?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=iZ(this.text.slice(e)).adopt(this.parent,this,this[X]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t};function n(e,t){return t.charAt(e===Y?0:-1+t.length)}e.moveTowards=function(e,t){EX(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):iZ(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?e===X?(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){EX(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=iZ(i).createDir(e,t);r[e]=a,t.insDirOf(e,a)}else{var o=this[-e];if(o)o.insTextAtDirEnd(i,e);else{var a=iZ(i).createDir(-e,t);a.jQ.insDirOf(-e,t.selection.jQ)}this.text.length===1&&r[-e]===this&&(r[-e]=this[-e])}return this.deleteTowards(e,t)}});Z.text=Z.textnormal=Z.textrm=Z.textup=Z.textmd=rZ;function aZ(e,t,n){return J(rZ,{ctrlSeq:e,htmlTemplate:`<`+t+` `+n+`>&0</`+t+`>`})}Z.em=Z.italic=Z.italics=Z.emph=Z.textit=Z.textsl=aZ(`\\textit`,`i`,`class="mq-text-mode"`),Z.strong=Z.bold=Z.textbf=aZ(`\\textbf`,`b`,`class="mq-text-mode"`),Z.sf=Z.textsf=aZ(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),Z.tt=Z.texttt=aZ(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),Z.textsc=aZ(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),Z.uppercase=aZ(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),Z.lowercase=aZ(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`);var oZ=J($X,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[Y].cursor=this.cursor,this.ends[Y].write=function(e,t){t===`$`?this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),Q(`\\$`,`$`).createLeftOf(e.show())):e[X]?e[Y]?tZ.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):tZ.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[Y].latex()+`$`}}),sZ=J(nZ,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===`$`)oZ(e).createLeftOf(e);else{var n;t===`<`?n=`<`:t===`>`&&(n=`>`),Q(t,n).createLeftOf(e)}}});IX.TextField=function(e){return J(e.EditableField,function(e,t){this.RootBlock=sZ,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()}})},jX[`\\`]=J($X,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[Y].focus=function(){return this.parent.jQ.addClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.removeClass(`mq-empty`),this},this.ends[Y].blur=function(){return this.parent.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.addClass(`mq-empty`),this},this.ends[Y].write=function(e,t){e.show().deleteSelection(),t.match(/[a-z]/i)?Q(t).createLeftOf(e):(this.parent.renderCommand(e),(t!==`\\`||!this.isEmpty())&&e.parent.write(e,t))},this.ends[Y].keystroke=function(e,n,r){if(e===`Tab`||e===`Enter`||e===`Spacebar`){this.parent.renderCommand(r.cursor),n.preventDefault();return}return 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 pX(e.target=n).trigger(e),!1}).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return`\\`+this.ends[Y].latex()+` `},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[X]?e.insLeftOf(this[X]):e.insAtRightEnd(this.parent);var t=this.ends[Y].latex();t||=` `;var n=Z[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):(n=rZ(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),Z[`∉`]=Z.notin=q($,`\\notin `,`∉`),Z[`≅`]=Z.cong=q($,`\\cong `,`≅`),Z[`≡`]=Z.equiv=q($,`\\equiv `,`≡`),Z[`⊕`]=Z.oplus=q($,`\\oplus `,`⊕`),Z[`⊗`]=Z.otimes=q($,`\\otimes `,`⊗`),Z[`≠`]=Z.ne=Z.neq=q($,`\\ne `,`≠`),Z[`≇`]=Z.ncong=q($,`\\ncong `,`≇`),Z[`∗`]=Z.ast=Z.star=Z.loast=Z.lowast=q($,`\\ast `,`∗`),Z.therefor=Z.therefore=q($,`\\therefore `,`∴`),Z.cuz=Z.because=q($,`\\because `,`∵`),Z.prop=Z.propto=q($,`\\propto `,`∝`),Z[`≈`]=Z.asymp=Z.approx=q($,`\\approx `,`≈`),Z[`≉`]=Z.nasymp=Z.napprox=q($,`\\napprox `,`≉`),Z.isin=Z.in=q($,`\\in `,`∈`),Z.ni=Z.contains=q($,`\\ni `,`∋`),Z.notni=Z.niton=Z.notcontains=Z.doesnotcontain=MX[`\\not\\ni`]=q($,`\\not\\ni `,`∌`),Z.sub=Z.subset=q($,`\\subset `,`⊂`),Z.sup=Z.supset=Z.superset=q($,`\\supset `,`⊃`),Z.nsub=Z.notsub=Z.nsubset=Z.notsubset=MX[`\\not\\subset`]=q($,`\\not\\subset `,`⊄`),Z.nsup=Z.notsup=Z.nsupset=Z.notsupset=Z.nsuperset=Z.notsuperset=MX[`\\not\\supset`]=q($,`\\not\\supset `,`⊅`),Z.sube=Z.subeq=Z.subsete=Z.subseteq=q($,`\\subseteq `,`⊆`),Z.supe=Z.supeq=Z.supsete=Z.supseteq=Z.supersete=Z.superseteq=q($,`\\supseteq `,`⊇`),Z.nsube=Z.nsubeq=Z.notsube=Z.notsubeq=Z.nsubsete=Z.nsubseteq=Z.notsubsete=Z.notsubseteq=MX[`\\not\\subseteq`]=q($,`\\not\\subseteq `,`⊈`),Z.nsupe=Z.nsupeq=Z.notsupe=Z.notsupeq=Z.nsupsete=Z.nsupseteq=Z.notsupsete=Z.notsupseteq=Z.nsupersete=Z.nsuperseteq=Z.notsupersete=Z.notsuperseteq=MX[`\\not\\supseteq`]=q($,`\\not\\supseteq `,`⊉`),Z.N=Z.naturals=Z.Naturals=q(Q,`\\mathbb{N}`,`ℕ`),Z.P=Z.primes=Z.Primes=Z.projective=Z.Projective=Z.probability=Z.Probability=q(Q,`\\mathbb{P}`,`ℙ`),Z.Z=Z.integers=Z.Integers=q(Q,`\\mathbb{Z}`,`ℤ`),Z.Q=Z.rationals=Z.Rationals=q(Q,`\\mathbb{Q}`,`ℚ`),Z.R=Z.reals=Z.Reals=q(Q,`\\mathbb{R}`,`ℝ`),Z.C=Z.complex=Z.Complex=Z.complexes=Z.Complexes=Z.complexplane=Z.Complexplane=Z.ComplexPlane=q(Q,`\\mathbb{C}`,`ℂ`),Z.H=Z.Hamiltonian=Z.quaternions=Z.Quaternions=q(Q,`\\mathbb{H}`,`ℍ`),Z.quad=Z.emsp=q(Q,`\\quad `,` `),Z.qquad=q(Q,`\\qquad `,` `),Z.diamond=q(Q,`\\diamond `,`◇`),Z.bigtriangleup=q(Q,`\\bigtriangleup `,`△`),Z.ominus=q(Q,`\\ominus `,`⊖`),Z.uplus=q(Q,`\\uplus `,`⊎`),Z.bigtriangledown=q(Q,`\\bigtriangledown `,`▽`),Z.sqcap=q(Q,`\\sqcap `,`⊓`),Z.triangleleft=q(Q,`\\triangleleft `,`⊲`),Z.sqcup=q(Q,`\\sqcup `,`⊔`),Z.triangleright=q(Q,`\\triangleright `,`⊳`),Z.odot=Z.circledot=q(Q,`\\odot `,`⊙`),Z.bigcirc=q(Q,`\\bigcirc `,`◯`),Z.dagger=q(Q,`\\dagger `,`†`),Z.ddagger=q(Q,`\\ddagger `,`‡`),Z.wr=q(Q,`\\wr `,`≀`),Z.amalg=q(Q,`\\amalg `,`∐`),Z.models=q(Q,`\\models `,`⊨`),Z.prec=q(Q,`\\prec `,`≺`),Z.succ=q(Q,`\\succ `,`≻`),Z.preceq=q(Q,`\\preceq `,`≼`),Z.succeq=q(Q,`\\succeq `,`≽`),Z.simeq=q(Q,`\\simeq `,`≃`),Z.mid=q(Q,`\\mid `,`∣`),Z.ll=q(Q,`\\ll `,`≪`),Z.gg=q(Q,`\\gg `,`≫`),Z.parallel=q(Q,`\\parallel `,`∥`),Z.nparallel=q(Q,`\\nparallel `,`∦`),Z.bowtie=q(Q,`\\bowtie `,`⋈`),Z.sqsubset=q(Q,`\\sqsubset `,`⊏`),Z.sqsupset=q(Q,`\\sqsupset `,`⊐`),Z.smile=q(Q,`\\smile `,`⌣`),Z.sqsubseteq=q(Q,`\\sqsubseteq `,`⊑`),Z.sqsupseteq=q(Q,`\\sqsupseteq `,`⊒`),Z.doteq=q(Q,`\\doteq `,`≐`),Z.frown=q(Q,`\\frown `,`⌢`),Z.vdash=q(Q,`\\vdash `,`⊦`),Z.dashv=q(Q,`\\dashv `,`⊣`),Z.nless=q(Q,`\\nless `,`≮`),Z.ngtr=q(Q,`\\ngtr `,`≯`),Z.longleftarrow=q(Q,`\\longleftarrow `,`←`),Z.longrightarrow=q(Q,`\\longrightarrow `,`→`),Z.Longleftarrow=q(Q,`\\Longleftarrow `,`⇐`),Z.Longrightarrow=q(Q,`\\Longrightarrow `,`⇒`),Z.longleftrightarrow=q(Q,`\\longleftrightarrow `,`↔`),Z.updownarrow=q(Q,`\\updownarrow `,`↕`),Z.Longleftrightarrow=q(Q,`\\Longleftrightarrow `,`⇔`),Z.Updownarrow=q(Q,`\\Updownarrow `,`⇕`),Z.mapsto=q(Q,`\\mapsto `,`↦`),Z.nearrow=q(Q,`\\nearrow `,`↗`),Z.hookleftarrow=q(Q,`\\hookleftarrow `,`↩`),Z.hookrightarrow=q(Q,`\\hookrightarrow `,`↪`),Z.searrow=q(Q,`\\searrow `,`↘`),Z.leftharpoonup=q(Q,`\\leftharpoonup `,`↼`),Z.rightharpoonup=q(Q,`\\rightharpoonup `,`⇀`),Z.swarrow=q(Q,`\\swarrow `,`↙`),Z.leftharpoondown=q(Q,`\\leftharpoondown `,`↽`),Z.rightharpoondown=q(Q,`\\rightharpoondown `,`⇁`),Z.nwarrow=q(Q,`\\nwarrow `,`↖`),Z.ldots=q(Q,`\\ldots `,`…`),Z.cdots=q(Q,`\\cdots `,`⋯`),Z.vdots=q(Q,`\\vdots `,`⋮`),Z.ddots=q(Q,`\\ddots `,`⋱`),Z.surd=q(Q,`\\surd `,`√`),Z.triangle=q(Q,`\\triangle `,`△`),Z.ell=q(Q,`\\ell `,`ℓ`),Z.top=q(Q,`\\top `,`⊤`),Z.flat=q(Q,`\\flat `,`♭`),Z.natural=q(Q,`\\natural `,`♮`),Z.sharp=q(Q,`\\sharp `,`♯`),Z.wp=q(Q,`\\wp `,`℘`),Z.bot=q(Q,`\\bot `,`⊥`),Z.clubsuit=q(Q,`\\clubsuit `,`♣`),Z.diamondsuit=q(Q,`\\diamondsuit `,`♢`),Z.heartsuit=q(Q,`\\heartsuit `,`♡`),Z.spadesuit=q(Q,`\\spadesuit `,`♠`),Z.circledot=q(Q,`\\circledot `,`⊙`),Z.middot=q(Q,`\\middot `,`·`),Z.dottedsquare=q(Q,`\\dottedsquare `,`⬚`),Z.square=q(Q,`\\square `,`⬜`),Z.rectangle=q(Q,`\\rectangle `,`▯`),Z.oint=q(Q,`\\oint `,`∮`),Z.bigcap=q(Q,`\\bigcap `,`∩`),Z.bigcup=q(Q,`\\bigcup `,`∪`),Z.bigsqcup=q(Q,`\\bigsqcup `,`⊔`),Z.bigvee=q(Q,`\\bigvee `,`∨`),Z.bigwedge=q(Q,`\\bigwedge `,`∧`),Z.bigodot=q(Q,`\\bigodot `,`⊙`),Z.bigotimes=q(Q,`\\bigotimes `,`⊗`),Z.bigoplus=q(Q,`\\bigoplus `,`⊕`),Z.biguplus=q(Q,`\\biguplus `,`⊎`),Z.lfloor=q(Q,`\\lfloor `,`⌊`),Z.rfloor=q(Q,`\\rfloor `,`⌋`),Z.lceil=q(Q,`\\lceil `,`⌈`),Z.rceil=q(Q,`\\rceil `,`⌉`),Z.opencurlybrace=Z.lbrace=q(Q,`\\lbrace `,`{`),Z.closecurlybrace=Z.rbrace=q(Q,`\\rbrace `,`}`),Z.lbrack=q(Q,`[`),Z.rbrack=q(Q,`]`),Z.mug=q(Q,`\\mug `,`µg`),Z.mus=q(Q,`\\mus `,`µs`),Z.mum=q(Q,`\\mum `,`µm`),Z.muL=q(Q,`\\muL `,`µL`),Z.slash=q(Q,`/`),Z.vert=q(Q,`|`),Z.perp=Z.perpendicular=q(Q,`\\perp `,`⊥`),Z.nabla=Z.del=q(Q,`\\nabla `,`∇`),Z.hbar=q(Q,`\\hbar `,`ℏ`),Z.AA=Z.Angstrom=Z.angstrom=q(Q,`\\text\\AA `,`Å`),Z.ring=Z.circ=Z.circle=q(Q,`\\circ `,`∘`),Z.bull=Z.bullet=q(Q,`\\bullet `,`•`),Z.setminus=Z.smallsetminus=q(Q,`\\setminus `,`∖`),Z.not=Z[`¬`]=Z.neg=q(Q,`\\neg `,`¬`),Z[`…`]=Z.dots=Z.ellip=Z.hellip=Z.ellipsis=Z.hellipsis=q(Q,`\\dots `,`…`),Z.converges=Z.darr=Z.dnarr=Z.dnarrow=Z.downarrow=q(Q,`\\downarrow `,`↓`),Z.dArr=Z.dnArr=Z.dnArrow=Z.Downarrow=q(Q,`\\Downarrow `,`⇓`),Z.diverges=Z.uarr=Z.uparrow=q(Q,`\\uparrow `,`↑`),Z.uArr=Z.Uparrow=q(Q,`\\Uparrow `,`⇑`),Z.to=q($,`\\to `,`→`),Z.rarr=Z.rightarrow=q(Q,`\\rightarrow `,`→`),Z.implies=q($,`\\Rightarrow `,`⇒`),Z.rArr=Z.Rightarrow=q(Q,`\\Rightarrow `,`⇒`),Z.gets=q($,`\\gets `,`←`),Z.larr=Z.leftarrow=q(Q,`\\leftarrow `,`←`),Z.impliedby=q($,`\\Leftarrow `,`⇐`),Z.lArr=Z.Leftarrow=q(Q,`\\Leftarrow `,`⇐`),Z.harr=Z.lrarr=Z.leftrightarrow=q(Q,`\\leftrightarrow `,`↔`),Z.iff=q($,`\\Leftrightarrow `,`⇔`),Z.hArr=Z.lrArr=Z.Leftrightarrow=q(Q,`\\Leftrightarrow `,`⇔`),Z.Re=Z.Real=Z.real=q(Q,`\\Re `,`ℜ`),Z.Im=Z.imag=Z.image=Z.imagin=Z.imaginary=Z.Imaginary=q(Q,`\\Im `,`ℑ`),Z.part=Z.partial=q(Q,`\\partial `,`∂`),Z.infty=Z.infin=Z.infinity=q(Q,`\\infty `,`∞`),Z.pounds=q(Q,`\\pounds `,`£`),Z.alef=Z.alefsym=Z.aleph=Z.alephsym=q(Q,`\\aleph `,`ℵ`),Z.xist=Z.xists=Z.exist=Z.exists=q(Q,`\\exists `,`∃`),Z.nexists=Z.nexist=q(Q,`\\nexists `,`∄`),Z.and=Z.land=Z.wedge=q($,`\\wedge `,`∧`),Z.or=Z.lor=Z.vee=q($,`\\vee `,`∨`),Z.o=Z.O=Z.empty=Z.emptyset=Z.oslash=Z.Oslash=Z.nothing=Z.varnothing=q($,`\\varnothing `,`∅`),Z.cup=Z.union=q($,`\\cup `,`∪`),Z.cap=Z.intersect=Z.intersection=q($,`\\cap `,`∩`),Z.deg=Z.degree=q(Q,`\\degree `,`°`),Z.ang=Z.angle=q(Q,`\\angle `,`∠`),Z.measuredangle=q(Q,`\\measuredangle `,`m∠`);var cZ=J(Q,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[Y]instanceof lZ&&e[Y].isItalic!==!1||e[Y]instanceof RZ&&e[Y][Y]instanceof lZ&&e[Y][Y].isItalic!==!1)?(Z._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),lZ=J(eZ,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[Y]&&!(this[Y]instanceof lZ)&&!(this[Y]instanceof $)&&this[Y].ctrlSeq!==`\\ `&&(e=`*`+e),this[X]&&!(this[X]instanceof $)&&!(this[X]instanceof RZ)&&(e+=`*`)),e}});LX.p.autoCommands={_maxLength:0},RX.autoCommands=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(var t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){var a=t[i];if(a.length<2)throw`autocommand "`+a+`" not minimum length of 2`;if(Z[a]===mZ)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=yX(r,a.length)}return n._maxLength=r,n};var uZ=J(lZ,function(e,t){e.init=function(e){return t.init.call(this,this.letter=e)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments);var n=e.options.autoCommands,r=n._maxLength;if(r>0){for(var i=``,a=this,o=0;a instanceof uZ&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[Y],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(var o=1,a=this;o<i.length;o+=1,a=a[Y]);return AX(a,this).remove(),e[Y]=a[Y],Z[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!==Y&&this[X]instanceof uZ||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(t._maxLength!==0){for(var r=this.letter,i=this[Y];i instanceof uZ;i=i[Y])r=i.letter+r;for(var a=this[X];a instanceof uZ;a=a[X])r+=a.letter;AX(i[X]||this.parent.ends[Y],a[Y]||this.parent.ends[X]).each(function(e){e.italicize(!0).jQ.removeClass(`mq-first mq-last mq-followed-by-supsub`),e.ctrlSeq=e.letter});outer:for(var o=0,s=i[X]||this.parent.ends[Y];o<r.length;o+=1,s=s[X])for(var c=vX(t._maxLength,r.length-o);c>0;--c){var l=r.slice(o,o+c);if(t.hasOwnProperty(l)){for(var u=0,d=s;u<c;u+=1,d=d[X]){d.italicize(!1);var f=d}var p=dZ.hasOwnProperty(l);if(s.ctrlSeq=(p?`\\`:`\\operatorname{`)+s.ctrlSeq,f.ctrlSeq+=p?` `:`}`,pZ.hasOwnProperty(l)&&f[Y][Y][Y].jQ.addClass(`mq-last`),n(s[Y])||s.jQ.addClass(`mq-first`),!n(f[X]))if(f[X]instanceof RZ){var m=f[X];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass(`mq-after-operator-name`,!(m[X]instanceof qZ))})()}else f.jQ.toggleClass(`mq-last`,!(f[X]instanceof qZ));o+=c-1,s=f;continue outer}}}};function n(e){return!e||e instanceof $||e instanceof VZ}}),dZ={},fZ=LX.p.autoOperatorNames={_maxLength:9},pZ={limsup:1,liminf:1,projlim:1,injlim:1};(function(){for(var e=`arg deg det dim exp gcd hom inf ker lg ln log max min sup limsup liminf injlim projlim Pr`.split(` `),t=0;t<e.length;t+=1)dZ[e[t]]=fZ[e[t]]=1;for(var n=`sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth`.split(` `),t=0;t<n.length;t+=1)dZ[n[t]]=1;for(var r=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),t=0;t<r.length;t+=1)fZ[r[t]]=fZ[`arc`+r[t]]=fZ[r[t]+`h`]=fZ[`ar`+r[t]+`h`]=fZ[`arc`+r[t]+`h`]=1;for(var i=`gcf hcf lcm proj span`.split(` `),t=0;t<i.length;t+=1)fZ[i[t]]=1})(),RX.autoOperatorNames=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(var t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){var a=t[i];if(a.length<2)throw`"`+a+`" not minimum length of 2`;n[a]=1,r=yX(r,a.length)}return n._maxLength=r,n};var mZ=J(eZ,function(e,t){e.init=function(e){this.ctrlSeq=e},e.createLeftOf=function(e){for(var t=this.ctrlSeq,n=0;n<t.length;n+=1)uZ(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=tZ(),n=0;n<e.length;n+=1)uZ(e.charAt(n)).adopt(t,t.ends[X],0);return JX.succeed(t.children())}});for(var hZ in fZ)fZ.hasOwnProperty(hZ)&&(Z[hZ]=mZ);Z.operatorname=J($X,function(e){e.createLeftOf=bX,e.numBlocks=function(){return 1},e.parser=function(){return ZX.block.map(function(e){return e.children()})}}),Z.f=J(uZ,function(e,t){e.init=function(){eZ.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)}}),Z[` `]=Z.space=q(Q,`\\ `,` `),Z[`'`]=Z.prime=q(Q,`'`,`′`),Z[`″`]=Z.dprime=q(Q,`″`,`″`),Z[`"`]=Z.doublePrime=q(Q,`"`,`″`),Z.backslash=q(Q,`\\backslash `,`\\`),jX[`\\`]||=Z.backslash,Z.$=q(Q,`\\$`,`$`);var gZ=J(eZ,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}});Z[`@`]=gZ,Z[`&`]=q(gZ,`\\&`,`&`),Z[`%`]=q(gZ,`\\%`,`%`),Z.alpha=Z.beta=Z.gamma=Z.delta=Z.zeta=Z.eta=Z.theta=Z.iota=Z.kappa=Z.mu=Z.nu=Z.xi=Z.rho=Z.sigma=Z.tau=Z.chi=Z.psi=Z.omega=J(lZ,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Z.phi=q(lZ,`\\phi `,`ϕ`),Z.phiv=Z.varphi=q(lZ,`\\varphi `,`φ`),Z.epsilon=q(lZ,`\\epsilon `,`ϵ`),Z.epsiv=Z.varepsilon=q(lZ,`\\varepsilon `,`ε`),Z.piv=Z.varpi=q(lZ,`\\varpi `,`ϖ`),Z.sigmaf=Z.sigmav=Z.varsigma=q(lZ,`\\varsigma `,`ς`),Z.thetav=Z.vartheta=Z.thetasym=q(lZ,`\\vartheta `,`ϑ`),Z.upsilon=Z.upsi=q(lZ,`\\upsilon `,`υ`),Z.gammad=Z.Gammad=Z.digamma=q(lZ,`\\digamma `,`ϝ`),Z.kappav=Z.varkappa=q(lZ,`\\varkappa `,`ϰ`),Z.rhov=Z.varrho=q(lZ,`\\varrho `,`ϱ`),Z.pi=Z.π=q(gZ,`\\pi `,`π`),Z.lambda=q(gZ,`\\lambda `,`λ`),Z.Upsilon=Z.Upsi=Z.upsih=Z.Upsih=q(eZ,`\\Upsilon `,`<var style="font-family: serif">ϒ</var>`),Z.Gamma=Z.Delta=Z.Theta=Z.Lambda=Z.Xi=Z.Pi=Z.Sigma=Z.Phi=Z.Psi=Z.Omega=J(Q,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Z.forall=Z[`∀`]=q(Q,`\\forall `,`∀`);var _Z=J($X,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=ZX.parse(this.latex);t.children().adopt(e.parent,e[Y],e[X]),e[Y]=t.ends[X],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[X][X].siblingCreated&&t.ends[X][X].siblingCreated(e.options,Y),t.ends[Y][Y].siblingCreated&&t.ends[Y][Y].siblingCreated(e.options,X),e.parent.bubble(`reflow`)},e.parser=function(){var e=ZX.parse(this.latex).children();return JX.succeed(e)}});Z[`¹`]=q(_Z,`^1`),Z[`²`]=q(_Z,`^2`),Z[`³`]=q(_Z,`^3`),Z[`¼`]=q(_Z,`\\frac14`),Z[`½`]=q(_Z,`\\frac12`),Z[`¾`]=q(_Z,`\\frac34`);var vZ=J($,function(e){e.init=Q.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){function n(e){if(e[Y]){if(e[Y]instanceof $||/^[,;:\(\[]$/.test(e[Y].ctrlSeq))return``}else if(e.parent&&e.parent.parent&&e.parent.parent.isStyleBlock())return n(e.parent.parent);else return``;return`mq-binary-operator`}if(t!==X)return this.jQ[0].className=n(this),this}});Z[`+`]=q(vZ,`+`,`+`),Z[`–`]=Z[`-`]=q(vZ,`-`,`−`),Z[`±`]=Z.pm=Z.plusmn=Z.plusminus=q(vZ,`\\pm `,`±`),Z.mp=Z.mnplus=Z.minusplus=q(vZ,`\\mp `,`∓`),jX[`*`]=Z.sdot=Z.cdot=q($,`\\cdot `,`·`,`*`);var yZ=J($,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===Y&&!this.strict){this.swap(!0),this.bubble(`reflow`);return}t.deleteTowards.apply(this,arguments)}}),bZ={ctrlSeq:`\\le `,html:`≤`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`<`,textStrict:`<`},xZ={ctrlSeq:`\\ge `,html:`≥`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`>`,textStrict:`>`};Z[`<`]=Z.lt=q(yZ,bZ,!0),Z[`>`]=Z.gt=q(yZ,xZ,!0),Z[`≤`]=Z.le=Z.leq=q(yZ,bZ,!1),Z[`≥`]=Z.ge=Z.geq=q(yZ,xZ,!1);var SZ=J($,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[Y]instanceof yZ&&e[Y].strict){e[Y].swap(!1),e[Y].bubble(`reflow`);return}t.createLeftOf.apply(this,arguments)}});Z[`=`]=SZ,Z[`×`]=Z.times=q($,`\\times `,`×`,`[x]`),Z[`÷`]=Z.div=Z.divide=Z.divides=q($,`\\div `,`÷`,`[/]`),jX[`~`]=Z.sim=q($,`\\sim `,`~`,`~`),jX[`≁`]=Z.nsim=q($,`\\nsim `,`≁`,`≁`),Z.complement=Z[`∁`]=q(Q,`\\complement `,`∁`),Z.nexists=Z[`∄`]=q(Q,`\\nexists `,`∄`),Z.sphericalangle=Z[`∢`]=q(Q,`\\sphericalangle `,`∢`),Z.iint=Z[`∬`]=q(Q,`\\iint `,`∬`),Z.iiint=Z[`∭`]=q(Q,`\\iiint `,`∭`),Z.oiint=Z[`∯`]=q(Q,`\\oiint `,`∯`),Z.oiiint=Z[`∰`]=q(Q,`\\oiiint `,`∰`),Z.backsim=Z[`∽`]=q(Q,`\\backsim `,`∽`),Z.backsimeq=Z[`⋍`]=q(Q,`\\backsimeq `,`⋍`),Z.eqsim=Z[`≂`]=q(Q,`\\eqsim `,`≂`),Z.ncong=Z[`≇`]=q(Q,`\\ncong `,`≇`),Z.approxeq=Z[`≊`]=q(Q,`\\approxeq `,`≊`),Z.bumpeq=Z[`≏`]=q(Q,`\\bumpeq `,`≏`),Z.Bumpeq=Z[`≎`]=q(Q,`\\Bumpeq `,`≎`),Z.doteqdot=Z[`≑`]=q(Q,`\\doteqdot `,`≑`),Z.fallingdotseq=Z[`≒`]=q(Q,`\\fallingdotseq `,`≒`),Z.risingdotseq=Z[`≓`]=q(Q,`\\risingdotseq `,`≓`),Z.eqcirc=Z[`≖`]=q(Q,`\\eqcirc `,`≖`),Z.circeq=Z[`≗`]=q(Q,`\\circeq `,`≗`),Z.triangleq=Z[`≜`]=q(Q,`\\triangleq `,`≜`),Z.leqq=Z[`≦`]=q(Q,`\\leqq `,`≦`),Z.geqq=Z[`≧`]=q(Q,`\\geqq `,`≧`),Z.lneqq=Z[`≨`]=q(Q,`\\lneqq `,`≨`),Z.gneqq=Z[`≩`]=q(Q,`\\gneqq `,`≩`),Z.between=Z[`≬`]=q(Q,`\\between `,`≬`),Z.nleq=Z[`≰`]=q(Q,`\\nleq `,`≰`),Z.ngeq=Z[`≱`]=q(Q,`\\ngeq `,`≱`),Z.lesssim=Z[`≲`]=q(Q,`\\lesssim `,`≲`),Z.gtrsim=Z[`≳`]=q(Q,`\\gtrsim `,`≳`),Z.lessgtr=Z[`≶`]=q(Q,`\\lessgtr `,`≶`),Z.gtrless=Z[`≷`]=q(Q,`\\gtrless `,`≷`),Z.preccurlyeq=Z[`≼`]=q(Q,`\\preccurlyeq `,`≼`),Z.succcurlyeq=Z[`≽`]=q(Q,`\\succcurlyeq `,`≽`),Z.precsim=Z[`≾`]=q(Q,`\\precsim `,`≾`),Z.succsim=Z[`≿`]=q(Q,`\\succsim `,`≿`),Z.nprec=Z[`⊀`]=q(Q,`\\nprec `,`⊀`),Z.nsucc=Z[`⊁`]=q(Q,`\\nsucc `,`⊁`),Z.subsetneq=Z[`⊊`]=q(Q,`\\subsetneq `,`⊊`),Z.supsetneq=Z[`⊋`]=q(Q,`\\supsetneq `,`⊋`),Z.vDash=Z[`⊨`]=q(Q,`\\vDash `,`⊨`),Z.Vdash=Z[`⊩`]=q(Q,`\\Vdash `,`⊩`),Z.Vvdash=Z[`⊪`]=q(Q,`\\Vvdash `,`⊪`),Z.VDash=Z[`⊫`]=q(Q,`\\VDash `,`⊫`),Z.nvdash=Z[`⊬`]=q(Q,`\\nvdash `,`⊬`),Z.nvDash=Z[`⊭`]=q(Q,`\\nvDash `,`⊭`),Z.nVdash=Z[`⊮`]=q(Q,`\\nVdash `,`⊮`),Z.nVDash=Z[`⊯`]=q(Q,`\\nVDash `,`⊯`),Z.vartriangleleft=Z[`⊲`]=q(Q,`\\vartriangleleft `,`⊲`),Z.vartriangleright=Z[`⊳`]=q(Q,`\\vartriangleright `,`⊳`),Z.trianglelefteq=Z[`⊴`]=q(Q,`\\trianglelefteq `,`⊴`),Z.trianglerighteq=Z[`⊵`]=q(Q,`\\trianglerighteq `,`⊵`),Z.multimap=Z[`⊸`]=q(Q,`\\multimap `,`⊸`),Z.Subset=Z[`⋐`]=q(Q,`\\Subset `,`⋐`),Z.Supset=Z[`⋑`]=q(Q,`\\Supset `,`⋑`),Z.Cap=Z[`⋒`]=q(Q,`\\Cap `,`⋒`),Z.Cup=Z[`⋓`]=q(Q,`\\Cup `,`⋓`),Z.pitchfork=Z[`⋔`]=q(Q,`\\pitchfork `,`⋔`),Z.lessdot=Z[`⋖`]=q(Q,`\\lessdot `,`⋖`),Z.gtrdot=Z[`⋗`]=q(Q,`\\gtrdot `,`⋗`),Z.lll=Z[`⋘`]=q(Q,`\\lll `,`⋘`),Z.ggg=Z[`⋙`]=q(Q,`\\ggg `,`⋙`),Z.lesseqgtr=Z[`⋚`]=q(Q,`\\lesseqgtr `,`⋚`),Z.gtreqless=Z[`⋛`]=q(Q,`\\gtreqless `,`⋛`),Z.curlyeqprec=Z[`⋞`]=q(Q,`\\curlyeqprec `,`⋞`),Z.curlyeqsucc=Z[`⋟`]=q(Q,`\\curlyeqsucc `,`⋟`),Z.nsim=Z[`≁`]=q(Q,`\\nsim `,`≁`),Z.lnsim=Z[`⋦`]=q(Q,`\\lnsim `,`⋦`),Z.gnsim=Z[`⋧`]=q(Q,`\\gnsim `,`⋧`),Z.precnsim=Z[`⋨`]=q(Q,`\\precnsim `,`⋨`),Z.succnsim=Z[`⋩`]=q(Q,`\\succnsim `,`⋩`),Z.ntriangleleft=Z[`⋪`]=q(Q,`\\ntriangleleft `,`⋪`),Z.ntriangleright=Z[`⋫`]=q(Q,`\\ntriangleright `,`⋫`),Z.ntrianglelefteq=Z[`⋬`]=q(Q,`\\ntrianglelefteq `,`⋬`),Z.ntrianglerighteq=Z[`⋭`]=q(Q,`\\ntrianglerighteq `,`⋭`),Z.blacksquare=Z[`∎`]=q(Q,`\\blacksquare `,`∎`),Z.colon=Z[`∶`]=q(Q,`\\colon `,`∶`),Z.llcorner=Z[`∟`]=q(Q,`\\llcorner `,`∟`),Z.dotplus=Z[`∔`]=q($,`\\dotplus `,`∔`),Z.nmid=Z[`∤`]=q($,`
|
|
342
|
+
mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`⊻`]=q($,`\\veebar `,`⊻`),Z.barwedge=Z[`⊼`]=q($,`\\barwedge `,`⊼`),Z.ltimes=Z[`⋉`]=q($,`\\ltimes `,`⋉`),Z.rtimes=Z[`⋊`]=q($,`\\rtimes `,`⋊`),Z.leftthreetimes=Z[`⋋`]=q($,`\\leftthreetimes `,`⋋`),Z.rightthreetimes=Z[`⋌`]=q($,`\\rightthreetimes `,`⋌`),Z.curlyvee=Z[`⋎`]=q($,`\\curlyvee `,`⋎`),Z.curlywedge=Z[`⋏`]=q($,`\\curlywedge `,`⋏`),Z.circledcirc=Z[`⊚`]=q($,`\\circledcirc `,`⊚`),Z.circledast=Z[`⊛`]=q($,`\\circledast `,`⊛`),Z.circleddash=Z[`⊝`]=q($,`\\circleddash `,`⊝`),Z.boxplus=Z[`⊞`]=q($,`\\boxplus `,`⊞`),Z.boxminus=Z[`⊟`]=q($,`\\boxminus `,`⊟`),Z.boxtimes=Z[`⊠`]=q($,`\\boxtimes `,`⊠`),Z.boxdot=Z[`⊡`]=q($,`\\boxdot `,`⊡`),Z[`∂`]=Z.partial,Z[`∃`]=Z.exists,Z[`∅`]=Z.varnothing,Z[`∆`]=Z.triangle,Z[`∇`]=Z.nabla,Z[`∈`]=Z.in,Z[`∊`]=Z.in,Z[`∋`]=Z.ni,Z[`∌`]=Z.notni,Z[`∍`]=Z.ni,Z[`∐`]=Z.amalg,Z[`−`]=Z[`-`],Z[`∓`]=Z.mp,Z[`∖`]=Z.setminus,Z[`∘`]=Z.circ,Z[`∙`]=Z.bullet,Z[`∝`]=Z.propto,Z[`∞`]=Z.infty,Z[`∠`]=Z.angle,Z[`∡`]=Z.measuredangle,Z[`∣`]=Z.divides,Z[`∥`]=Z.parallel,Z[`∦`]=Z.nparallel,Z[`∧`]=Z.wedge,Z[`∨`]=Z.vee,Z[`∩`]=Z.cap,Z[`∪`]=Z.cup,Z[`∮`]=Z.oint,Z[`∴`]=Z.therefore,Z[`∵`]=Z.because,Z[`∼`]=Z.sim,Z[`≀`]=Z.wr,Z[`≃`]=Z.simeq,Z[`≍`]=Z.asymp,Z[`≐`]=Z.doteq,Z[`≪`]=Z.ll,Z[`≫`]=Z.gg,Z[`≺`]=Z.prec,Z[`≻`]=Z.succ,Z[`⊂`]=Z.subset,Z[`⊃`]=Z.supset,Z[`⊆`]=Z.subseteq,Z[`⊇`]=Z.supseteq,Z[`⊈`]=Z.nsubseteq,Z[`⊉`]=Z.nsupseteq,Z[`⊏`]=Z.sqsubset,Z[`⊐`]=Z.sqsupset,Z[`⊓`]=Z.sqcap,Z[`⊔`]=Z.sqcup,Z[`⊖`]=Z.ominus,Z[`⊘`]=Z.oslash,Z[`⊙`]=Z.odot,Z[`⊢`]=Z.vdash,Z[`⊣`]=Z.dashv,Z[`⊤`]=Z.top,Z[`⊥`]=Z.bot,Z[`⊧`]=Z.models,Z[`⋀`]=Z.wedge,Z[`⋁`]=Z.vee,Z[`⋂`]=Z.cap,Z[`⋃`]=Z.cup,Z[`⋄`]=Z.diamond,Z[`⋅`]=Z.cdot,Z[`⋆`]=Z.star,Z[`⋈`]=Z.bowtie,Z[`⋮`]=Z.vdots,Z[`⋯`]=Z.cdots,Z[`⋱`]=Z.ddots;var CZ,wZ=bX,TZ=document.createElement(`div`).style,EZ={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},DZ;for(var OZ in EZ)if(OZ in TZ){DZ=OZ;break}DZ?CZ=function(e,t,n){e.css(DZ,`scale(`+t+`,`+n+`)`)}:`filter`in TZ?(wZ=function(e){e.className=e.className},CZ=function(e,t,n){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>`);var r=e.children().css(`filter`,`progid:DXImageTransform.Microsoft.Matrix(M11=`+t+`,SizingMethod='auto expand')`);function i(){e.css(`marginRight`,(r.width()-1)*(t-1)/t+`px`)}i();var a=setInterval(i);pX(window).load(function(){clearTimeout(a),i()})}):CZ=function(e,t,n){e.css(`fontSize`,n+`em`)};var kZ=J($X,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),AZ=J($X,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 ZX.optBlock.then(function(t){return ZX.block.map(function(n){var r=jZ.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))}}),jZ=J(AZ,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+`>`,$X.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[Y].latex()+`]{`+this.ends[X].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),MZ=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return J($X,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+`>`)}})},NZ=J($X,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>`)}}),PZ=J($X,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>`)}}),FZ=J($X,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">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),IZ=J($X,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>`)}}),LZ=function(e,t){return J(eZ,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})};Z.mathrm=q(kZ,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Z.mathit=q(kZ,`\\mathit`,`i`,`class="mq-font"`),Z.mathbf=q(kZ,`\\mathbf`,`b`,`class="mq-font"`),Z.mathsf=q(kZ,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Z.mathtt=q(kZ,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Z.underline=q(kZ,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Z.overline=Z.bar=q(MZ(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Z.longdiv=q(NZ,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Z.overrightarrow=q(MZ(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Z.overleftarrow=q(MZ(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Z.xleftarrow=q(AZ,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Z.xrightarrow=q(AZ,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Z.overleftrightarrow=q(kZ,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Z.overarc=q(kZ,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),Z.dot=J($X,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">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),Z.addmatrixrow=q(PZ,`\\addmatrixrow`,`span`,`+`),Z.addmatrixcol=q(IZ,`\\addmatrixcol`,`span`,`+`),Z.ngtr=Z[`≯`]=q(LZ(`mq-ngtr`,`≯`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Z.nless=Z[`≮`]=q(LZ(`mq-nless`,`≮`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Z.dot=q(FZ,`\\dot`),Z.parallelogram=q(LZ(`mq-parallelogram`,`▱`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),Z.textcolor=J($X,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=JX.optWhitespace,r=JX.string,i=JX.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}}),Z.class=J($X,function(e,t){e.parser=function(){var e=this,n=JX.string,r=JX.regex;return JX.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}});var RZ=J($X,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(!(!this.replacedFragment&&!e[Y]&&e.options.supSubsRequireOperand))return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=Y;t;t=t===Y&&X)if(this[t]instanceof RZ){for(var n=`sub`;n;n=n===`sub`&&`sup`){var r=this[n],i=this[t][n];if(r){if(!i)this[t].addBlock(r.disown());else if(r.isEmpty())var a=DX(i,0,i.ends[Y]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=DX(i,o.ends[X],i.ends[Y]);t===Y?o.adopt(i,i.ends[X],0):o.adopt(i,0,i.ends[Y])}this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[Y]===this&&(t===X&&a?a[Y]?e.insRightOf(a[Y]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},LX.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[Y].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 eZ?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[Y]&&!e[X]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),tZ.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 eZ?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(Y,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.length===1?n:`{`+(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=pX(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(_X,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=pX(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(_X,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">​</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`]=zZ,delete e[n].deleteOutOf,t===`sub`&&pX(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=this.jQ,t=e.prev();if(t.length){var n=e.children(`.mq-sup`);if(n.length){var r=parseInt(n.css(`font-size`)),i=n.offset().top+n.height()-t.offset().top-.7*r,a=parseInt(n.css(`margin-bottom`));n.css(`margin-bottom`,a+i)}}}});function zZ(e){var t=this.parent,n=e;do{if(n[X])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}Z.subscript=Z._=J(RZ,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">​</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[Y],this.sub.upOutOf=zZ,t.finalizeTree.call(this)}}),Z.superscript=Z.supscript=Z[`^`]=J(RZ,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[X],this.sup.downOutOf=zZ,t.finalizeTree.call(this)}});var BZ=J($X,function(e,t){e.parser=function(){for(var e=JX.string,t=JX.optWhitespace,n=JX.succeed,r=ZX.block,i=this,a=i.blocks=[tZ(),tZ()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[X],0);return t.then(e(`_`).or(e(`^`))).then(function(e){var t=a[e===`_`?0:1];return r.then(function(e){return e.children().adopt(t,t.ends[X],0),n(i)})}).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[Y],this.upInto=this.ends[X],this.ends[Y].upOutOf=this.ends[X],this.ends[X].downOutOf=this.ends[Y]}}),VZ=J(BZ,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>`;eZ.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())+`^`+e(this.ends[X].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(uZ(`n`).createLeftOf(e),SZ().createLeftOf(e))}});Z[`∑`]=Z.sum=Z.summation=q(VZ,`\\sum `,`∑`),Z[`∏`]=Z.prod=Z.product=q(VZ,`\\prod `,`∏`),Z.coprod=Z.coproduct=q(VZ,`\\coprod `,`∐`),Z[`∫`]=Z.int=Z.integral=J(VZ,function(e,t){e.init=function(){eZ.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>∫</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">​</span></span></span>`)},e.createLeftOf=$X.p.createLeftOf}),Z.lim=Z.limit=J(BZ,function(e,t){e.init=function(){eZ.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(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())}});var HZ=Z.over=jX[`/`]=J(Z.frac=Z.dfrac=Z.cfrac=Z.fraction=J($X,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">​</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[X].upOutOf=this.ends[Y],this.downInto=this.ends[Y].downOutOf=this.ends[X]}}),function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[Y];n&&!(n instanceof $||n instanceof(Z.text||bX)||n instanceof VZ||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[Y];n instanceof VZ&&n[X]instanceof RZ&&(n=n[X],n[X]instanceof RZ&&n[X].ctrlSeq!=n.ctrlSeq&&(n=n[X])),n!==e[Y]&&!e.isTooDeep(1)&&(this.replaces(AX(n[X]||e.parent.ends[Y],e[Y])),e[Y]=n)}t.createLeftOf.call(this,e)}});Z.underset=J($X,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[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),Z.overset=J($X,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[X].upOutOf=this.ends[Y],this.upInto=this.ends[Y].downOutOf=this.ends[X]}});var UZ=Z.sqrt=Z[`√`]=J($X,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">√</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 ZX.optBlock.then(function(e){return ZX.block.map(function(t){var n=WZ();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[X].jQ.parent();CZ(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}});Z.hat=J($X,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(`,`)`]});var WZ=Z.nthroot=J(UZ,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">√</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[Y].latex()+`]{`+this.ends[X].latex()+`}`}}),GZ=J($X,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)}});Z.vec=q(GZ,`\\vec`,`→`,[`vec(`,`)`]),Z.tilde=q(GZ,`\\tilde`,`~`,[`tilde(`,`)`]),Z.lrncuberoot=J(UZ,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">√</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[Y].latex()+`}`}}),Z.abs=J($X,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),Z.lrnplaceholder=J($X,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[Y].latex()}}),Z.lrnexponent=J($X,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[X].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[Y].latex()+`^`+e}}),Z.lrnsquaredexponent=J($X,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[Y].latex()+`^2`}}),Z.lrnsubscript=J($X,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"> </span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[Y].latex()+`_`+this.ends[X].latex()}});function KZ(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(`:first`).add(this.jQ.children(`:last`)),this.contentjQ=this.jQ.children(`:eq(1)`)},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css(`fontSize`));CZ(this.delimjQs,vX(1+.2*(e-1),1.2),1.2*e)}}var qZ=J(J($X,KZ),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,hX,[n,r]),this.side=e,this.sides={},this.sides[Y]={ch:n,ctrlSeq:i},this.sides[X]={ch:r,ctrlSeq:a}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-paren`+(this.side===X?` mq-ghost`:``)+`">`+this.sides[Y].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===Y?` mq-ghost`:``)+`">`+this.sides[X].ch+`</span></span>`,t.html.call(this)},e.latex=function(){return`\\left`+this.sides[Y].ctrlSeq+this.ends[Y].latex()+`\\right`+this.sides[X].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof qZ&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||JZ[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[Y].ch]===n.sides[X].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===Y?0:1).removeClass(`mq-ghost`).html(this.sides[this.side].ch)},e.createLeftOf=function(e){if(!this.replacedFragment){var n=e.options;if(this.sides[Y].ch===`|`)var r=this.matchBrack(n,X,e[X])||this.matchBrack(n,Y,e[Y])||this.matchBrack(n,0,e.parent.parent);else var r=this.matchBrack(n,-this.side,e[-this.side])||this.matchBrack(n,-this.side,e.parent.parent)}if(r){var i=this.side=-r.side;this.closeOpposing(r),r===e.parent.parent&&e[i]&&AX(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble(`reflow`)}else r=this,i=r.side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(AX(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===Y?e.insAtLeftEnd(r.ends[Y]):e.insRightOf(r)},e.placeCursor=bX,e.unwrap=function(){this.ends[Y].children().disown().adopt(this.parent,this,this[X]).jQ.insertAfter(this.jQ),this.remove()},e.deleteSide=function(e,t,n){var r=this.parent,i=this[e],a=r.ends[e];if(e===this.side){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}var o=n.options,s=!this.side;if(this.side=-e,this.matchBrack(o,e,this.ends[Y].ends[this.side])){this.closeOpposing(this.ends[Y].ends[this.side]);var c=this.ends[Y].ends[e];this.unwrap(),c.siblingCreated&&c.siblingCreated(n.options,e),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r)}else{if(this.matchBrack(o,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else if(t&&s){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}else this.sides[e]={ch:JZ[this.sides[this.side].ch],ctrlSeq:JZ[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===Y?0:1).addClass(`mq-ghost`).html(this.sides[e].ch);if(i){var c=this.ends[Y].ends[e];AX(i,a,-e).disown().withDirAdopt(-e,this.ends[Y],c,0).jQ.insAtDirEnd(e,this.ends[Y].jQ.removeClass(`mq-empty`)),c.siblingCreated&&c.siblingCreated(n.options,e),n.insDirOf(-e,i)}else t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[Y])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[Y].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===Y)).removeClass(`mq-ghost`),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),JZ={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"⟨":`⟩`,"⟩":`⟨`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function YZ(e,t){var t=t||e,n=JZ[e],r=JZ[t];jX[e]=q(qZ,Y,e,n,t,r),jX[n]=q(qZ,X,e,n,t,r)}YZ(`(`),YZ(`[`),YZ(`{`,`\\{`),Z.langle=q(qZ,Y,`⟨`,`⟩`,`\\langle `,`\\rangle `),Z.rangle=q(qZ,X,`⟨`,`⟩`,`\\langle `,`\\rangle `),jX[`|`]=q(qZ,Y,`|`,`|`,`|`,`|`),Z.lVert=q(qZ,Y,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.rVert=q(qZ,X,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.left=J($X,function(e){e.parser=function(){var e=JX.regex,t=JX.string;JX.succeed;var n=JX.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=`⟨`,r+=` `),r==`\\lVert`&&(i=`∥`,r+=` `),ZX.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t=e.charAt(0)===`\\`?e.slice(1):e;e==`\\rangle`&&(t=`⟩`,e+=` `),e==`\\rVert`&&(t=`∥`,e+=` `);var n=qZ(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n})})})}}),Z.right=J($X,function(e){e.parser=function(){return JX.fail(`unmatched \\right`)}}),Z.choose=J(Z.binom=Z.binomial=J(J($X,KZ),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(`,`,`,`)`]}),function(e){e.createLeftOf=HZ.prototype.createLeftOf}),Z.editable=Z.MathQuillMathField=J($X,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=JX.string,r=JX.regex,i=JX.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=FX(this.ends[Y],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),qX(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[Y].controller))},e.latex=function(){return this.ends[Y].latex()},e.text=function(){return this.ends[Y].text()}});var XZ=Z.embed=J(eZ,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=JX.string,n=JX.regex,r=JX.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(BX[i](t))})})}});Z.MathQuillResponseContainer=J($X,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[Y].text()}}),Z.MathQuillResponseContainerIcon=J($X,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[Y].text()}});var ZZ=Z.matrix=J($X,function(e,t){var n=J(tZ,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=this,t=e.blocks=[],r,i,a=0;this.htmlTemplate.replace(/&\d+/g,function(o,s){var c=e.htmlTemplate.substring(0,s).match(/<tr[^>]*>/gi).length-1;i=r===c?i+1:0,t[a]=n(i,c),t[a].adopt(e,e.ends[X],0),r=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&&CZ(n,vX(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e=this.getMatrixName(),t=`\\begin{`+e+`}`,n,i,a;for(a=0;a<this.blocks.length;a++)n=this.blocks[a].row,i!==void 0&&(i===n?t+=r.column:t+=r.row),i=n,t+=this.blocks[a].latex();return t+=`\\end{`+e+`}`,t},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){var n=`<span class="mq-matrix mq-non-leaf">`+o(this.parentheses.left);n+=`<table class="mq-non-leaf">`,e=Math.min(e,this.maximum.rows),t=Math.min(t,this.maximum.columns);for(var r=0,i=0;i<e;i++){n+=`<tr>`;for(var a=0;a<t;a++)n+=`<td>&`+r+`</td>`,r++;n+=`</tr>`}return n+=`</table>`,n+=o(this.parentheses.right)+`</span>`,n;function o(e){return e?`<span class="mq-paren mq-scaled">`+e+`</span>`:``}},e.htmlTemplate=e.generateHtmlTemplate(1,1),e.parser=function(){var e=JX.regex,t=this,i=this.getMatrixName(),a=RegExp(`^(.*?)\\\\end{`+i+`}`),o=RegExp(`\\\\end{`+i+`}`);return e(a).then(function(e){var i=e.replace(o,``),a=[],s=i.split(r.row),c=Math.min(s.length,t.maximum.rows),l=0,u,d;for(d=0;d<c;d++)u=s[d].split(r.column),l=Math.max(l,u.length);for(l=Math.min(l,t.maximum.columns),d=0;d<c;d++){u=s[d].split(r.column);for(var e=0;e<l;e++){var f=n(e,d);ZX.parse(u[e]||` `).children().adopt(f,f.ends[X],0),a.push(f)}}t.htmlTemplate=t.generateHtmlTemplate(c,l),t.blocks=a;for(var d=0;d<a.length;d+=1)a[d].adopt(t,t.ends[X],0);return JX.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=OX.byId[e.first().attr(_X)],n=OX.byId[e.last().attr(_X)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=OX.byId[pX(this).attr(_X)],a=e.eq(t+1),o=pX(this).closest(`tr`).next(`tr`),s=pX(this).closest(`tr`).index(),c=pX(this).index(),l;if(a.length){var u=OX.byId[a.attr(_X)];n[X]=u,u[Y]=n}if(l=o.length?o.find(`td`).eq(c):r.find(`td`).eq(c+1),l.length){var d=OX.byId[l.attr(_X)];n.downOutOf=d,d.upOutOf=n}n.column=c,n.row=s,i.push(n)}),this.ends[Y]=t,this.ends[X]=n,t&&t[Y]&&delete t[Y],n&&n[X]&&delete n[X],this.blocks=i},e.deleteCell=function(e){var t=e.jQ.closest(`tr`),n=e.jQ.index(),r=t.index(),i=t.find(`td`).not(e.jQ),a=this.jQ.find(`tr`).not(t).map(function(){return pX(this).find(`td`)[n]}),o=this.jQ.find(`td`).length===1,s;function c(){return OX.byId[pX(this).attr(_X)].isEmpty()}return i.filter(c).length===i.length&&a.length&&(i.remove(),e.jQ.remove(),t.remove(),this.finalizeTree()),a.filter(c).length===a.length&&i.length&&(a.remove(),e.jQ.remove(),this.finalizeTree()),o||(r=Math.min(r,this.jQ.find(`tr`).length-1),n=Math.min(n,this.jQ.find(`tr`).eq(r).find(`td`).length-1),s=OX.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(_X)]),s},e.addRow=function(e){if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(var t=e.find(`td`).length,r=pX(`<tr></tr>`),i,a,o=0;o<t;o++)i=n(),i.parent=this,i.jQ=pX(`<td class="mq-empty">`).attr(_X,i.id),r.append(i.jQ),a||=i;return r.insertAfter(e),a}},e.addColumn=function(e){if(!(e.closest(`tr`).find(`td`).length>=this.maximum.columns)){var t=e.index(),r=e.closest(`tr`).index(),i=this,a,o=[];return this.jQ.find(`tr`).each(function(){a=n(),a.parent=i,a.jQ=pX(`<td class="mq-empty">`).attr(_X,a.id),a.jQ.insertAfter(pX(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`)}}});Z.pmatrix=J(ZZ,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Z.bmatrix=J(ZZ,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Z.Bmatrix=J(ZZ,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Z.vmatrix=J(ZZ,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Z.Vmatrix=J(ZZ,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var QZ=GX(3);for(var $Z in QZ)(function(e,t){typeof t==`function`?(HX[e]=function(){return VX(),t.apply(this,arguments)},HX[e].prototype=t.prototype):HX[e]=t})($Z,QZ[$Z]);var eQ=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},tQ;typeof window<`u`&&(tQ=HX.getInterface(3),tQ&&tQ.registerEmbed&&eQ(tQ));var nQ=e=>`&.mq-math-mode ${e}, & .mq-math-mode ${e}`,rQ={"&.mq-editable-field .mq-cursor, & .mq-editable-field .mq-cursor":{borderLeftColor:`currentColor`},"&.mq-editable-field:not(.mq-focused), & .mq-editable-field:not(.mq-focused)":{borderColor:Tz()},[[`.mq-overline .mq-overline-inner`,`.mq-overarrow`,`.mq-overarrow .mq-overarrow-inner`,`.mq-overleftrightarrow .mq-overleftrightarrow-inner`,`.mq-overarc`,`.mq-longdiv .mq-longdiv-inner`].map(nQ).join(`, `)]:{borderTopColor:`currentColor`},[[`.mq-underline`,`.mq-xarrow .mq-xarrow-over`].map(nQ).join(`, `)]:{borderBottomColor:`currentColor`},[nQ(`.mq-abs`)]:{borderLeftColor:`currentColor`,borderRightColor:`currentColor`},[nQ(`.mq-matrix td.mq-empty`)]:{borderColor:`currentColor`}},iQ={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`}},aQ={"& .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`}},oQ={"& .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`}},sQ={"& *":{...iQ,...aQ,"& .mq-math-mode .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-longdiv-inner .mq-empty":{padding:`0 !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`}}},cQ={mqInkStyles:rQ,commonMqFontStyles:iQ,longdivStyles:aQ,supsubStyles:oQ,commonMqKeyboardStyles:sQ},lQ=g(`math-input:mq:input`),uQ=I(`span`)(rQ),dQ=class extends w.Component{static propTypes={className:m.string,onClick:m.func,onChange:m.func,latex:m.string,onFocus:m.func,onBlur:m.func,language:m.string};componentDidMount(){if(!tQ)throw Error(`MQ is not defined - but component has mounted?`);this.mathField=tQ.MathField(this.input,{handlers:{edit:this.onInputEdit.bind(this)}}),this.updateLatex(),uX(this.input,this.props.language)}componentDidUpdate(){this.updateLatex(),uX(this.input,this.props.language)}updateLatex(){if(!this.mathField)return;let{latex:e}=this.props;e!=null&&this.mathField.latex(e)}clear(){return this.mathField.latex(``),``}blur(){lQ(`blur mathfield`),this.mathField.blur()}focus(){lQ(`focus mathfield...`),this.mathField.focus()}command(e){return lQ(`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 lQ(`write: `,e),this.mathField.write(e),this.mathField.focus(),this.mathField.latex()}onInputEdit=()=>{lQ(`[onInputEdit] ...`);let{onChange:e}=this.props;this.mathField&&e&&e(this.mathField.latex())};refresh=()=>{this.blur(),this.focus()};onKeyPress=e=>{if(Object.keys(this.mathField.__controller.options).indexOf(`ignoreNextMousedown`)<0&&this.refresh(),e.charCode===13){e.preventDefault();return}};onClick=e=>{let{onClick:t}=this.props;this.refresh(),t&&t(e)};shouldComponentUpdate(e){return lQ(`next: `,e.latex),lQ(`current: `,this.mathField.latex()),e.latex!==this.mathField.latex()}render(){let{onFocus:e,onBlur:t,className:n}=this.props;return(0,P.jsx)(uQ,{className:n,onKeyDown:this.onKeyPress,onClick:this.onClick,onFocus:e,onBlur:t,ref:e=>this.input=e})}},fQ=g(`pie-lib:math-input:mq:static`),pQ=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,mQ=/ /g;function hQ(e=``){return e.replace(mQ,``)}function gQ(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var _Q=I(`span`)(rQ),vQ=class extends w.Component{static propTypes={latex:m.string.isRequired,onFocus:m.func,onBlur:m.func,className:m.string,getFieldName:m.func,onSubFieldChange:m.func,onSubFieldFocus:m.func,setInput:m.func,language:m.string};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=w.createRef()}componentDidMount(){this.update(),YY(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),YY()}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||this._isProgrammaticUpdate)return;let t=this.props.getFieldName(e,this.mathField.innerFields);if(this.props.onSubFieldChange){let n=e.latex().match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.inputRef?.current&&n&&n?.length)try{e.__controller.cursor.insLeftOf(e.__controller.cursor.parent[-1].parent),e.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}else 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(gQ(e)>gQ(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.state.previousLatex!==e||this.state.isDeleteKeyPressed)&&this.setState({previousLatex:e,isDeleteKeyPressed:!1})};announceMessage=e=>{this.setState({previousLatex:``}),this.liveRegion&&(this.liveRegion.textContent=e,setTimeout(()=>{this.liveRegion.textContent=``},500))};update=()=>{if(!tQ)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=tQ.StaticMath(this.inputRef?.current,{handlers:{edit:this.onInputEdit.bind(this)}});try{this._isProgrammaticUpdate=!0,this.mathField.parseLatex(this.props.latex),this.mathField.latex(this.props.latex)}catch{this.mathField.latex(`\\MathQuillMathField[r1]{}`)}finally{this._isProgrammaticUpdate=!1}uX(this.inputRef?.current,this.props.language)};blur=()=>{fQ(`blur mathfield`),this.mathField.blur()};focus=()=>{fQ(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=hQ(this.mathField.parseLatex(e.latex)),n=(e.latex.match(pQ)||[]).length,r=t!==hQ(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return fQ(`[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,P.jsx)(_Q,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},yQ=e=>(xl(5-e.length,()=>e.push([])),Sl.apply(null,e)),bQ=g(`pie-lib:math-inline:keypad`),xQ=KR(`pie`),SQ=[JR(),Qz()],CQ={"& .MuiTouchRipple-root":{color:`rgb(from ${JR()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))`}},wQ={"&.Mui-focusVisible":{outline:`2px solid ${Rz()}`,outlineOffset:`-2px`,boxShadow:`inset 0 0 0 4px ${xQ(`background`,G.WHITE)}`}},TQ=I(vQ)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:SQ,"& .mq-scaled.mq-sqrt-prefix":{transform:`scale(1, 0.9) !important`},"& .mq-sup-only .mq-sup":{marginBottom:`0.9px !important`},"& .mq-empty":{backgroundColor:`${Jz()} !important`},"& .mq-overline .mq-overline-inner":{borderTop:`2px solid currentColor`},"& .mq-non-leaf.mq-overline":{borderTop:`none !important`},"& .mq-overarrow":{width:`30px`,marginTop:`0 !important`,borderTop:`2px solid currentColor`,fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`,"&.mq-arrow-both":{top:`0px !important`,"& *":{lineHeight:`1 !important`,borderTop:`none !important`},"&:before":{fontSize:`80%`,left:`calc(-13%) !important`,top:`-0.31em !important`},"&:after":{fontSize:`80% !important`,right:`calc(-13%) !important`,top:`-1.5em`},"&.mq-empty:before":{fontSize:`80%`,left:`calc(-13%)`,top:`-0.26em`},"&.mq-empty:after":{fontSize:`80%`,right:`calc(-13%)`,top:`-0.26em`},"&.mq-empty":{minHeight:`1.4em`}},"&.mq-arrow-right:before":{fontSize:`80%`,right:`calc(-13%) !important`,top:`-0.26em !important`},"& .mq-overarrow-inner":{border:`none !important`},"& .mq-overarrow-inner .mq-overarrow-inner-right":{display:`none !important`}},"& .mq-root-block":{padding:`5px !important`},"& .mq-overarrow.mq-arrow-both.mq-empty:after":{right:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-right.mq-empty:before":{right:`-5px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-both.mq-empty:before":{left:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},"& .mq-overarc":{borderTop:`2px solid currentColor !important`,"& .mq-overline":{borderTop:`none !important`},"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`}}};return e===`\\parallel`?{...t,fontStyle:`italic !important`}:e===`\\overleftrightarrow{\\overline{}}`?{...t,"& .mq-overarrow.mq-arrow-both":{"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`},"&:after":{position:`absolute !important`,top:`0px !important`}}}:t});TQ.propTypes={latex:m.string.isRequired};var EQ=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},DQ=I(`div`)(()=>({...sQ,width:`100%`,display:`grid`,gridTemplateRows:`repeat(5, minmax(40px, 60px))`,gridRowGap:`0px`,gridColumnGap:`0px`,gridAutoFlow:`column`,"&.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`}}})),OQ=I(bW)(({category:e,isDelete:t,isComma:n,isDot:r})=>({minWidth:`auto`,textTransform:`none`,fontSize:n||r?`200% !important`:`140% !important`,lineHeight:n||r?`100%`:`normal`,color:SQ,backgroundColor:e===`operators`?qz():Kz(),"&:hover":{backgroundColor:e===`operators`?Xz():Yz()},...CQ,...wQ,borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),kQ=I(bW)(({category:e})=>({textTransform:`none`,padding:0,margin:0,fontSize:`110% !important`,minWidth:`auto`,borderRadius:0,backgroundColor:e===`operators`?qz():Kz(),"&:hover":{backgroundColor:e===`operators`?Xz():Yz()},...CQ,...wQ})),AQ=I(vF)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?qz():Kz(),"&:hover":{backgroundColor:e===`operators`?Xz():Yz()},borderRadius:0,"& .icon":{height:`30px`}})),jQ=class extends w.Component{static propTypes={className:m.string,controlledKeypadMode:m.bool,baseSet:m.array,additionalKeys:m.array,layoutForKeyPad:m.object,onPress:m.func.isRequired,onFocus:m.func,noDecimal:m.bool,setKeypadInteraction:m.func,mode:m.oneOfType([m.string,m.number])};static defaultProps={baseSet:cX,noDecimal:!1};constructor(e){super(e),this.keypadRef=w.createRef()}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);if(i<0){let n=e.height+e.top-i;t&&(t.style.height=`${n}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)};buttonClick=e=>{bQ(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>ml([...yQ(e),...yQ(t)]);keyIsNotAllowed=e=>{let{noDecimal:t}=this.props;return!!((e.write===`.`&&e.label===`.`||e.write===`,`&&e.label===`,`)&&t)};render(){let{className:e,baseSet:t,additionalKeys:n,layoutForKeyPad:r,onFocus:i,mode:a}=this.props,o=[`non-negative-integers`,`integers`,`decimals`,`fractions`,`item-authoring`,`language`].includes(a),s=o?this.flowKeys([],n||[]):this.flowKeys(t,n||[]),c=s.length%5?1:0,l={gridTemplateColumns:`repeat(${Math.floor(s.length/5)+c}, minmax(min-content, 150px))`,...EQ(r)};return(0,P.jsx)(DQ,{ref:this.keypadRef,className:[e,a].filter(Boolean).join(` `),style:l,onFocus:i,children:s.map((e,t)=>{let n=this.buttonClick.bind(this,e);if(!e)return(0,P.jsx)(`span`,{},`empty-${t}`);let r={onClick:n,disabled:this.keyIsNotAllowed(e),key:`${e.label||e.latex||e.command}-${t}`,...e.actions||{},...e.extraProps||{}};if(e.latex)return(0,P.jsx)(kQ,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:(0,P.jsx)(TQ,{latex:e.latex})},r.key);if(e.label)return(0,P.jsx)(OQ,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,isDelete:e.label===`⌫`,isComma:e.label===`,`,isDot:e.label===`.`,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:e.label},r.key);{let t=e.icon?e.icon:`div`;return(0,P.jsx)(AQ,{tabIndex:`-1`,onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,size:`large`,...e.actions||{},...e.extraProps||{},children:(0,P.jsx)(t,{className:`icon`})},r.key)}})})}},MQ=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}},NQ=class extends w.Component{static propTypes={className:m.string,controlledKeypadMode:m.bool,mode:m.oneOfType([m.string,m.number]),layoutForKeyPad:m.object,onClick:m.func.isRequired,onFocus:m.func,noDecimal:m.bool,additionalKeys:m.array,setKeypadInteraction:m.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(MQ(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s}=this.props,c=JY(a);return(0,P.jsx)(jQ,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:Wq(KY(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},PQ=I(`span`)(()=>({display:`inline-flex`,border:`1px solid ${Cz()}`,margin:`1px 5px`,cursor:`pointer`,alignItems:`center`,justifyContent:`center`,minWidth:`50px`,minHeight:`36px`,height:`fit-content`})),FQ=I(`div`)(()=>({background:_z(),color:JR(),display:`inline-flex`,borderRight:`2px solid ${Cz()}`,boxSizing:`border-box`,overflow:`hidden`,fontSize:`12px`,minHeight:`36px`,height:`100%`,alignItems:`center`,fontFamily:`Symbola, Times New Roman, serif`,padding:`0 2px`})),IQ=I(`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`}})),LQ=e=>{let{node:t,options:n,selected:r}=e,{attrs:i}=t,{value:a,index:o}=i,s=`R ${parseInt(o)+1}`;return(0,P.jsx)(ww,{className:`math-templated`,"data-selected":r,style:{display:`inline-flex`,minHeight:`36px`,minWidth:`50px`,cursor:`pointer`},children:(0,P.jsxs)(PQ,{...i,children:[(0,P.jsx)(FQ,{children:s}),(0,P.jsx)(IQ,{children:(0,P.jsx)(vQ,{latex:a})})]})})};LQ.propTypes={attributes:m.object,value:m.string,keyToDisplay:m.string};var RQ=e=>String(e||``).replace(/-/g,`_`),zQ=e=>e&&e.attrs&&e.attrs.index!=null?String(e.attrs.index):null,BQ=(e,t)=>{let n=0;return e.descendants(e=>{if(e.type&&e.type.name===t){let t=parseInt(zQ(e),10);!Number.isNaN(t)&&t>n&&(n=t)}return!0}),n},VQ=(e,t)=>{let n=[];return e.descendants((e,r)=>{if(e.type&&e.type.name===t){let t=zQ(e);t!=null&&n.push({index:t,pos:r,node:e})}return!0}),n},HQ=(e,t)=>{let n=0;return e.descendants(e=>(e.type&&e.type.name===t&&(n+=1),!0)),n},UQ=({schema:e,typeName:t,index:n})=>{let r=e.nodes[t];return r?r.create({index:String(n),id:String(n),value:``}):null},WQ=(e,t)=>{let n=e.resolve(Math.min(t,e.content.size));return V.near(n,1)},GQ=MS.create({name:`responseArea`,addOptions(){return{maxResponseAreas:null,error:null,options:null,respAreaToolbar:null,onHandleAreaChange:null}},addStorage(){return{lastIndexMap:{}}},addProseMirrorPlugins(){if(!this.options.type)return[];let e=RQ(this.options.type);return[new kf({key:new Mf(`response-area-watcher:${e}`),view:t=>{let{lastIndexMap:n}=this.storage;return n[e]=Math.max(n[e]??0,BQ(t.state.doc,e)),{update:(t,n)=>{let r=t.state;if(n.doc.eq(r.doc))return;let i=VQ(r.doc,e),a=VQ(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=RQ(e);if(HQ(n.doc,a)>=this.options.maxResponseAreas)return!1;let{lastIndexMap:o}=this.storage,s=Math.max(o[a]??0,BQ(n.doc,a))+1,c=UQ({schema:n.schema,typeName:a,index:s});if(!c)return!1;let{selection:l}=n,u=l.from,d=e=>{try{return t.insert(e,c),e}catch{return null}},f=d(u);if(f??=d(t.doc.content.size),f==null)return!1;if([`inline_dropdown`,`explicit_constructed_response`].includes(a))t.setSelection(H.create(t.doc,f));else{let e=f+c.nodeSize;t.setSelection(WQ(t.doc,e))}return r&&(o[a]=s,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(H.create(e.doc,o)),r&&(n.focus(),r(e)),!0}}}}),KQ=tC.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 Rw(e=>(0,P.jsx)(nK,{...e,options:this.options}))}}),qQ=tC.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 Rw(e=>(0,P.jsx)(LQ,{...e,options:this.options}))}}),JQ=tC.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 Rw(e=>(0,P.jsx)(Nq,{...e,options:this.options}))}}),YQ=tC.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 Rw(e=>(0,P.jsx)(Pq,{...e,options:this.options}))}}),XQ=Hr(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),ZQ=Hr(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),QQ=Hr(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function $Q(e){return Vr(`MuiMenuItem`,e)}var e$=Hr(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function t$(e){return Vr(`MuiNativeSelect`,e)}var n$=Hr(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),r$=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return y({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`]},t$,t)},i$=I(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${n$.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}}}]})),a$=I(i$,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:To,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${n$.multiple}`]:t.multiple}]}})({}),o$=I(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${n$.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}}]})),s$=I(o$,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),c$=w.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=r$(l);return(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(a$,{ownerState:l,className:v(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,P.jsx)(s$,{as:a,ownerState:l,className:u.icon})]})});function l$(e){return Vr(`MuiSelect`,e)}var u$=Hr(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function d$(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 f$(e){return e==null||typeof e==`string`&&!e.trim()}function p$(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var m$=w.createContext(null);function h$(){return w.useContext(m$)}var g$=m$.Provider,_$,v$=I(i$,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${u$.select}`]:t.select},{[`&.${u$.select}`]:t[n.variant]},{[`&.${u$.error}`]:t.error},{[`&.${u$.multiple}`]:t.multiple}]}})({[`&.${u$.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),y$=I(o$,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),b$=I(`input`,{shouldForwardProp:e=>wo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),x$=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return y({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},l$,t)},S$=w.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:y,onBlur:x,onChange:S,onClose:C,onFocus:T,onKeyDown:E,onMouseDown:ee,onOpen:D,open:O,readOnly:te,renderValue:k,required:A,SelectDisplayProps:j={},tabIndex:M,type:ne,value:re,variant:ie=`standard`,...ae}=e,[oe,se]=JN({controlled:re,default:l,name:`Select`}),[ce,le]=JN({controlled:O,default:c,name:`Select`}),ue=w.useRef(null),de=w.useRef(null),[fe,pe]=w.useState(null),{current:me}=w.useRef(O!=null),[he,ge]=w.useState(),[_e,ve]=w.useState(null),N=QN(t,m),ye=w.useCallback(e=>{de.current=e,e&&pe(e)},[]),be=fe?.parentNode;w.useImperativeHandle(N,()=>({focus:()=>{de.current.focus()},node:ue.current,value:oe}),[oe]);let xe=fe!==null&&ce;w.useEffect(()=>{if(!xe||!be||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ge(be.clientWidth)});return e.observe(be),()=>{e.disconnect()}},[xe,be,a]),w.useEffect(()=>{c&&ce&&fe&&!me&&(ge(a?null:be.clientWidth),de.current.focus())},[fe,a]),w.useEffect(()=>{i&&de.current.focus()},[i]),w.useEffect(()=>{if(!h)return;let e=VN(de.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&de.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let Se=(e,t)=>{e?(ve(d$(t)),D&&D(t)):(ve(null),C&&C(t)),me||(ge(a?null:be.clientWidth),le(e))},Ce=e=>{ee?.(e),e.button===0&&(e.preventDefault(),de.current.focus(),Se(!0,e))},we=e=>{Se(!1,e)},Te=w.Children.toArray(o),Ee=e=>{let t=Te.find(t=>t.props.value===e.target.value);t!==void 0&&(se(t.props.value),S&&S(e,t))},De=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(oe)?oe.slice():[];let t=oe.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),oe!==n&&(se(n),S)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:y}}),S(i,e)}_||Se(!1,t)}},Oe=e=>{te||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),Se(!0,e)),E?.(e))},ke=e=>{!xe&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:oe,name:y}}),x(e))};delete ae[`aria-invalid`];let Ae,je,Me=[],Ne=!1;(JW({value:oe})||d)&&(k?Ae=k(oe):Ne=!0);let Pe=Te.map(e=>{if(!w.isValidElement(e))return null;let t;if(_){if(!Array.isArray(oe))throw Error(b(2));t=oe.some(t=>p$(t,e.props.value)),t&&Ne&&Me.push(e.props.children)}else t=p$(oe,e.props.value),t&&Ne&&(je=e.props.children);return w.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:De(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})});Ne&&(Ae=_?Me.length===0?null:Me.reduce((e,t,n)=>(e.push(t),n<Me.length-1&&e.push(`, `),e),[]):je);let Fe=he;!a&&me&&fe&&(Fe=be.clientWidth);let Ie;Ie=M===void 0?u?null:0:M;let Le=j.id||(y?`mui-component-select-${y}`:void 0),Re={...e,variant:ie,value:oe,open:xe,error:f},ze=x$(Re),Be={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Re):g.slotProps?.paper},Ve={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Re):g.slotProps?.list},He=Ii();return(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(v$,{as:`div`,ref:ye,tabIndex:Ie,role:`combobox`,"aria-controls":xe?He:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":xe?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Le].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":A?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Oe,onMouseDown:u||te?null:Ce,onBlur:ke,onFocus:T,...j,ownerState:Re,className:v(j.className,ze.select,s),id:Le,children:f$(Ae)?_$||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Ae}),(0,P.jsx)(b$,{"aria-invalid":f,value:Array.isArray(oe)?oe.join(`,`):oe,name:y,ref:ue,"aria-hidden":!0,onChange:Ee,tabIndex:-1,disabled:u,className:ze.nativeInput,autoFocus:i,required:A,...ae,ownerState:Re}),(0,P.jsx)(y$,{as:p,className:ze.icon,ownerState:Re}),(0,P.jsx)(g$,{value:_e,children:(0,P.jsx)(BG,{id:`menu-${y||``}`,anchorEl:be,open:xe,onClose:we,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:He,...Ve},paper:{...Be,style:{minWidth:Fe,...Be==null?null:Be.style}}},children:Pe})})]})}),C$=IN((0,P.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function w$(e){return parseInt(e,10)||0}var T$={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function E$(e){for(let t in e)return!1;return!0}function D$(e){return E$(e)||e.outerHeightStyle===0&&!e.overflowing}var O$=w.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=w.useRef(o!=null),l=w.useRef(null),u=ZN(t,l),d=w.useRef(null),f=w.useRef(null),p=w.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=HN(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)===`
|
|
343
|
+
`&&(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=YN(()=>{let e=l.current,t=p();if(!e||!t||D$(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=w.useCallback(()=>{let e=l.current,t=p();if(!e||!t||D$(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=w.useRef(-1);return ni(()=>{let e=LN(h),t=l?.current;if(!t)return;let n=HN(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]),ni(()=>{h()}),(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
344
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,P.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...T$.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function k$(e){return Vr(`MuiInputBase`,e)}var A$=Hr(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),j$,M$=`mui-auto-fill`,N$=`mui-auto-fill-cancel`,P$=(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${L(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},F$=(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]},I$=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 y({root:[`root`,`color${L(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${L(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`]},k$,t)},L$=I(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:P$})(Oo(({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`,[`&.${A$.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%`}}]}))),R$=I(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:F$})(Oo(({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] + .${A$.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},[`&.${A$.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:N$,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:M$}}},{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`}}]}})),z$=Eo({[`@keyframes ${M$}`]:{from:{animationName:M$}},[`@keyframes ${N$}`]:{from:{animationName:N$}}}),B$=w.forwardRef(function(e,t){let n=ko({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:y={},inputRef:x,margin:S,maxRows:C,minRows:T,multiline:E=!1,name:ee,onBlur:D,onChange:O,onClick:te,onFocus:k,onKeyDown:A,onKeyUp:j,placeholder:M,readOnly:ne,renderSuffix:re,rows:ie,size:ae,slotProps:oe={},slots:se={},startAdornment:ce,type:le=`text`,value:ue,...de}=n,fe=y.value==null?ue:y.value,{current:pe}=w.useRef(fe!=null),me=w.useRef(),he=w.useCallback(e=>{},[]),ge=QN(me,x,y.ref,he),[_e,ve]=w.useState(!1),N=IW(),ye=PW({props:n,muiFormControl:N,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});ye.focused=N?N.focused:_e,w.useEffect(()=>{!N&&d&&_e&&(ve(!1),D&&D())},[N,d,_e,D]);let be=N&&N.onFilled,xe=N&&N.onEmpty,Se=w.useCallback(e=>{JW(e)?be&&be():xe&&xe()},[be,xe]);GN(()=>{pe&&Se({value:fe})},[fe,Se,pe]),GN(()=>{if(!a)return;let e=me.current;if(!e)return;let t=VN(e),n=dI(t),r=n==null||n===t.body||n===t.documentElement;e===n?N&&N.onFocus?N.onFocus():ve(!0):r&&e.focus()},[a]);let Ce=e=>{k&&k(e),y.onFocus&&y.onFocus(e),N&&N.onFocus?N.onFocus(e):ve(!0)},we=e=>{D&&D(e),y.onBlur&&y.onBlur(e),N&&N.onBlur?N.onBlur(e):ve(!1)},Te=(e,...t)=>{if(!pe){let t=e.target||me.current;if(t==null)throw Error(b(1));Se({value:t.value})}y.onChange&&y.onChange(e,...t),O&&O(e,...t)};w.useEffect(()=>{Se(me.current)},[]);let Ee=e=>{me.current&&e.currentTarget===e.target&&me.current.focus(),te&&te(e)},De=_,Oe=y;E&&De===`input`&&(Oe=ie?{type:void 0,minRows:ie,maxRows:ie,...Oe}:{type:void 0,maxRows:C,minRows:T,...Oe},De=O$);let ke=e=>{Se(e.animationName===N$?me.current:{value:`x`})};w.useEffect(()=>{N&&N.setAdornedStart(!!ce)},[N,ce]);let Ae={...n,color:ye.color||`primary`,disabled:ye.disabled,endAdornment:p,error:ye.error,focused:ye.focused,formControl:N,fullWidth:h,hiddenLabel:ye.hiddenLabel,multiline:E,size:ye.size,startAdornment:ce,type:le},je=I$(Ae),Me=se.root||c.Root||L$,Ne=oe.root||l.root||{},Pe=se.input||c.Input||R$;return Oe={...Oe,...oe.input??l.input},(0,P.jsxs)(w.Fragment,{children:[!f&&typeof z$==`function`&&(j$||=(0,P.jsx)(z$,{})),(0,P.jsxs)(Me,{...Ne,ref:t,onClick:Ee,...de,...!HF(Me)&&{ownerState:{...Ae,...Ne.ownerState}},className:v(je.root,Ne.className,o,ne&&`MuiInputBase-readOnly`),children:[ce,(0,P.jsx)(FW.Provider,{value:null,children:(0,P.jsx)(Pe,{"aria-invalid":ye.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:ye.disabled,id:g,onAnimationStart:ke,name:ee,placeholder:M,readOnly:ne,required:ye.required,rows:ie,value:fe,onKeyDown:A,onKeyUp:j,type:le,...Oe,...!HF(Pe)&&{as:De,ownerState:{...Ae,...Oe.ownerState}},ref:ge,className:v(je.input,Oe.className,ne&&`MuiInputBase-readOnly`),onBlur:we,onChange:Te,onFocus:Ce})}),p,re?re({...ye,startAdornment:ce}):null]})]})});function V$(e){return Vr(`MuiInput`,e)}var H$={...A$,...Hr(`MuiInput`,[`root`,`underline`,`input`])},U$=e=>{let{classes:t,disableUnderline:n}=e,r=y({root:[`root`,!n&&`underline`],input:[`input`]},V$,t);return{...t,...r}},W$=I(L$,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...P$(e,t),!n.disableUnderline&&t.underline]}})(Oo(({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`},[`&.${H$.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${H$.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(.${H$.disabled}, .${H$.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${H$.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),G$=I(R$,{name:`MuiInput`,slot:`Input`,overridesResolver:F$})({}),K$=w.forwardRef(function(e,t){let n=ko({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=U$(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?D(l??a,m):m;return(0,P.jsx)(B$,{slots:{root:u.root??i.Root??W$,input:u.input??i.Input??G$},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});K$.muiName=`Input`;function q$(e){return Vr(`MuiFilledInput`,e)}var J$={...A$,...Hr(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},Y$=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=y({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${L(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},q$,t);return{...t,...c}},X$=I(L$,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...P$(e,t),!n.disableUnderline&&t.underline]}})(Oo(({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}},[`&.${J$.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${J$.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`},[`&.${J$.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${J$.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(.${J$.disabled}, .${J$.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${J$.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Mo()).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}}]}})),Z$=I(R$,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:F$})(Oo(({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}}]}))),Q$=w.forwardRef(function(e,t){let n=ko({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=Y$(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?D(g,u??a):g;return(0,P.jsx)(B$,{slots:{root:d.root??i.Root??X$,input:d.input??i.Input??Z$},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});Q$.muiName=`Input`;var $$,e1=I(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:To})({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%`}),t1=I(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:To})(Oo(({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 n1(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,P.jsx)(e1,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,P.jsx)(t1,{ownerState:c,children:s?(0,P.jsx)(`span`,{children:i}):$$||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function r1(e){return Vr(`MuiOutlinedInput`,e)}var i1={...A$,...Hr(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])},a1=e=>{let{classes:t}=e,n=y({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},r1,t);return{...t,...n}},o1=I(L$,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:P$})(Oo(({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 .${i1.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${i1.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${i1.focused} .${i1.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{[`&.${i1.focused} .${i1.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${i1.error} .${i1.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${i1.disabled} .${i1.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`}}]}})),s1=I(n1,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Oo(({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}})),c1=I(R$,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:F$})(Oo(({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}}]}))),l1=w.forwardRef(function(e,t){let n=ko({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=a1(n),m=IW(),h=PW({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??o1,v=l.input??r.Input??c1,[y,b]=OI(`notchedOutline`,{elementType:s1,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,P.jsxs)(w.Fragment,{children:[o,` `,`*`]}):o}});return(0,P.jsx)(B$,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,P.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}})});l1.muiName=`Input`;var u1=e=>{let{classes:t}=e,n=y({root:[`root`]},l$,t);return{...t,...n}},d1={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>To(e)&&e!==`variant`},f1=I(K$,d1)(``),p1=I(l1,d1)(``),m1=I(Q$,d1)(``),h1=w.forwardRef(function(e,t){let n=ko({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=C$,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:y,onOpen:b,open:x,renderValue:S,SelectDisplayProps:C,variant:T=`outlined`,...E}=n,ee=_?c$:S$,O=PW({props:n,muiFormControl:IW(),states:[`variant`,`error`]}),te=O.variant||T,k={...n,variant:te,classes:a},A=u1(k),{root:j,...M}=A,ne=d||{standard:(0,P.jsx)(f1,{ownerState:k}),outlined:(0,P.jsx)(p1,{label:p,ownerState:k}),filled:(0,P.jsx)(m1,{ownerState:k})}[te],re=QN(t,UF(ne));return(0,P.jsx)(w.Fragment,{children:w.cloneElement(ne,{inputComponent:ee,inputProps:{children:i,error:O.error,IconComponent:l,variant:te,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:y,onOpen:b,open:x,renderValue:S,SelectDisplayProps:{id:u,...C}},...f,classes:f?D(M,f.classes):M,...d?d.props.inputProps:{}},...(g&&_||c)&&te===`outlined`?{notched:!0}:{},ref:re,className:v(ne.props.className,o,A.root),...!d&&{variant:te},...E})})});h1.muiName=`Select`;function g1(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var _1=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},v1=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=y({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},$Q,o);return{...o,...s}},y1=I($P,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:_1})(Oo(({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`}},[`&.${e$.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${e$.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${e$.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)}},[`&.${e$.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${e$.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${XQ.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${XQ.inset}`]:{marginLeft:52},[`& .${QQ.root}`]:{marginTop:0,marginBottom:0},[`& .${QQ.inset}`]:{paddingLeft:36},[`& .${ZQ.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,[`& .${ZQ.root} svg`]:{fontSize:`1.25rem`}}}]}))),b1=w.forwardRef(function(e,t){let n=ko({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=h$(),m=w.useContext(SG),h=w.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=w.useRef(null);GN(()=>{r&&g.current&&g1(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},y=v1(n),b=QN(g,t),{root:x,...S}=y,C;return n.disabled||(C=u===void 0?-1:u),(0,P.jsx)(SG.Provider,{value:h,children:(0,P.jsx)(y1,{ref:b,role:l,tabIndex:C,component:i,focusVisibleClassName:v(y.focusVisible,c),className:v(y.root,d),...f,ownerState:_,classes:S})})}),x1=()=>{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:S1,commonMqKeyboardStyles:C1,longdivStyles:w1,supsubStyles:T1}=cQ,E1=g(`@pie-lib:math-toolbar:editor-and-pad`),D1=/\.|,/g,O1=I(`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}})),k1=I(`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`}},"& *":{...S1,...T1,...w1,"& .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`}})),A1=I($W)({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`}}),j1=I(KW)(()=>({backgroundColor:`transparent`})),M1=I(`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`}})),N1=I(dQ)(({controlledKeypadMode:e})=>({maxWidth:e?`400px`:`500px`,color:JR(),backgroundColor:gz(),padding:`2px`})),P1=I(bW)({position:`absolute`,right:`12px`,border:`1px solid lightgrey`,color:JR()}),F1=I(`hr`)(({theme:e})=>({padding:0,margin:0,height:`1px`,border:`none`,borderBottom:`solid 1px ${e.palette.primary.main}`})),I1=I(NQ)(({mode:e})=>({...C1,...e===`language`&&{"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),L1=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}},R1=class extends w.Component{static propTypes={classNames:m.object,keypadMode:m.oneOfType([m.string,m.number]),autoFocus:m.bool,allowAnswerBlock:m.bool,showKeypad:m.bool,controlledKeypad:m.bool,controlledKeypadMode:m.bool,error:m.string,noDecimal:m.bool,hideInput:m.bool,noLatexHandling:m.bool,layoutForKeyPad:m.object,maxResponseAreas:m.number,additionalKeys:m.array,latex:m.string.isRequired,onAnswerBlockAdd:m.func,onFocus:m.func,onBlur:m.func,onChange:m.func.isRequired,setKeypadInteraction:m.func};constructor(e){super(e),this.state={equationEditor:`item-authoring`,addDisabled:!1}}componentDidMount(){this.input&&this.props.autoFocus&&(this.focusTimeout=setTimeout(()=>{this.focusTimeout=void 0,this.input?.focus()},0))}componentWillUnmount(){this.focusTimeout&&clearTimeout(this.focusTimeout)}onClick=e=>{let{noDecimal:t,noLatexHandling:n,onChange:r}=this.props,i=L1(e);if(E1(`mathChange: `,i),n){r(i.value);return}t&&(i.value===`.`||i.value===`,`)||i&&(i.type===`clear`?(E1(`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(YY(),x1(),this.updateDisable(!0),n&&(e.indexOf(`.`)!==-1||e.indexOf(`,`)!==-1)&&this.input){this.input.clear(),this.input.write(e.replace(D1,``));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 E1(`[shouldComponentUpdate] `,`inputIsDifferent: `,n),!_l(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 E1(`[render]`,d),(0,P.jsxs)(O1,{className:e.mathToolbar,children:[(0,P.jsxs)(k1,{hide:l,children:[a&&(0,P.jsxs)(A1,{variant:`standard`,children:[(0,P.jsx)(j1,{id:`equation-editor-label`,children:`Equation Editor`}),(0,P.jsxs)(h1,{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,P.jsx)(b1,{value:`non-negative-integers`,children:`Numeric - Non-Negative Integers`}),(0,P.jsx)(b1,{value:`integers`,children:`Numeric - Integers`}),(0,P.jsx)(b1,{value:`decimals`,children:`Numeric - Decimals`}),(0,P.jsx)(b1,{value:`fractions`,children:`Numeric - Fractions`}),(0,P.jsx)(b1,{value:1,children:`Grade 1 - 2`}),(0,P.jsx)(b1,{value:3,children:`Grade 3 - 5`}),(0,P.jsx)(b1,{value:6,children:`Grade 6 - 7`}),(0,P.jsx)(b1,{value:8,children:`Grade 8 - HS`}),(0,P.jsx)(b1,{value:`geometry`,children:`Geometry`}),(0,P.jsx)(b1,{value:`advanced-algebra`,children:`Advanced Algebra`}),(0,P.jsx)(b1,{value:`statistics`,children:`Statistics`}),(0,P.jsx)(b1,{value:`item-authoring`,children:`Item Authoring`})]})]}),(0,P.jsx)(M1,{error:m,children:(0,P.jsx)(N1,{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,P.jsx)(P1,{type:`primary`,style:{bottom:h?`320px`:`20px`},onClick:this.onAnswerBlockClick,disabled:g,children:`+ Response Area`}),(0,P.jsx)(F1,{}),h&&(0,P.jsx)(I1,{mode:a?this.state.equationEditor:t,controlledKeypadMode:a,layoutForKeyPad:u,additionalKeys:r,onClick:this.onClick,noDecimal:c,setKeypadInteraction:s})]})}},z1=I(vF)(({hideBackground:e})=>({verticalAlign:`top`,width:`28px`,height:`28px`,color:tz(),...e&&{backgroundColor:KR(`pie`)(`background`,G.WHITE),"&:hover":{backgroundColor:_z()}},"& .MuiIconButton-label":{position:`absolute`,top:`2px`}})),B1=({onClick:e,hideBackground:t})=>(0,P.jsx)(z1,{"aria-label":`Done`,onClick:e,hideBackground:t,size:`large`,children:(0,P.jsx)(GG,{})});B1.propTypes={onClick:m.func,hideBackground:m.bool};var V1=B1,{commonMqFontStyles:H1,longdivStyles:U1,supsubStyles:W1}=cQ,G1=g(`@pie-lib:math-toolbar:math-preview`),K1=I(`div`)(({theme:e,isSelected:t})=>({display:`inline-flex`,alignItems:`center`,position:`relative`,"& *":H1,...W1,...U1,"& > .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}`}})),q1=I(`span`)({position:`absolute`,bottom:0,left:0,right:0,top:0}),J1=class extends w.Component{static propTypes={latex:m.string,isSelected:m.bool,onFocus:m.func,onBlur:m.func};componentDidMount(){x1()}componentDidUpdate(e){this.props.latex!==e.latex&&x1()}render(){let{isSelected:e,onFocus:t,onBlur:n,latex:r}=this.props;return G1(`[render] latex: `,r),(0,P.jsxs)(K1,{isSelected:e,children:[` `,(0,P.jsx)(q1,{}),(0,P.jsx)(vQ,{latex:r,onFocus:t,onBlur:n})]})}},Y1=I(`div`)({display:`flex`,width:`100%`,zIndex:8,alignItems:`center`}),X1=class extends w.Component{static propTypes={autoFocus:m.bool,allowAnswerBlock:m.bool,controlledKeypad:m.bool,controlledKeypadMode:m.bool,keypadMode:m.oneOfType([m.string,m.number]),classNames:m.object,error:m.string,maxResponseAreas:m.number,showKeypad:m.bool,noDecimal:m.bool,additionalKeys:m.array,latex:m.string.isRequired,onAnswerBlockAdd:m.func,onChange:m.func,onDone:m.func.isRequired,onFocus:m.func,onBlur:m.func,hideDoneButton:m.bool,keyPadCharacterRef:m.func,setKeypadInteraction:m.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,P.jsx)(Z1,{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:_})}},Z1=class extends w.Component{static propTypes={classNames:m.object,latex:m.string.isRequired,keypadMode:m.oneOfType([m.string,m.number]),hideInput:m.bool,noLatexHandling:m.bool,layoutForKeyPad:m.object,onChange:m.func.isRequired,onDone:m.func.isRequired,onBlur:m.func,onAnswerBlockAdd:m.func,additionalKeys:m.array,onFocus:m.func,autoFocus:m.bool,noDecimal:m.bool,allowAnswerBlock:m.bool,controlledKeypad:m.bool,controlledKeypadMode:m.bool,showKeypad:m.bool,hideDoneButton:m.bool,hideDoneButtonBackground:m.bool,error:m.any,maxResponseAreas:m.number,keyPadCharacterRef:m.object,setKeypadInteraction:m.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,P.jsxs)(Y1,{className:e&&e.toolbar||``,ref:p,children:[(0,P.jsx)(`div`,{}),(0,P.jsx)(R1,{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,P.jsx)(V1,{hideBackground:x,onClick:_})]})}},Q1=new Mf(`ensureTextAfterMath`),$1=(e=[])=>e.map(e=>({name:e,latex:e,write:e,label:e})),e0=e=>new kf({key:Q1,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}}),t0=(e,t)=>{let n;for(n=t;n>0;n--){let t=e.nodeAt(n);if(t?.type?.name===`text`&&t.textContent!==``)return-1;if(t&&t?.type?.name!==`text`)break}return n},n0=new kf({key:new Mf(`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){let e=t0(a,o);return e===-1?!1:(r(n.tr.delete(e,o)),!0)}if(s&&t.key===`ArrowLeft`&&o>0){let e=t0(a,o);if(e===-1)return!1;let t=n.doc.resolve(e);if(t.nodeAfter||t.nodeBefore){let t=n.doc.resolve(e);return r(n.tr.setSelection(H.create(n.doc,t.pos))),!0}else return r(n.tr.setSelection(V.create(n.doc,o-2))),!0}return!1}}}),r0=tC.create({name:`math`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{latex:{default:``},wrapper:{default:null},html:{default:null}}},addProseMirrorPlugins(){return[e0(this.name),n0]},parseHTML(){return[{tag:`span[data-latex]`,getAttrs:e=>({latex:ZH(e.getAttribute(`data-raw`)||e.textContent).unwrapped})},{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=H.create(t.doc,o.$from.pos);t.setSelection(e)}return r(t),tK(n,!0),!0}}},renderHTML({HTMLAttributes:e}){return e.html?[`span`,{"data-type":`mathml`,dangerouslySetInnerHTML:{__html:e.html}}]:[`span`,{"data-latex":``,"data-raw":e.latex},XH(e.latex,e.wrapper)]},addNodeView(){return Rw(e=>(0,P.jsx)(i0,{...e,options:this.options}))}}),i0=e=>{let{node:t,updateAttributes:n,editor:r,selected:i,options:a,getPos:o}=e,[s,c]=(0,w.useState)(i),l=(0,w.useRef)(null),u=(0,w.useRef)(null),d=(0,w.useRef)(Date.now()),[f,p]=(0,w.useState)({top:0,left:0}),{math:m={}}=a||{},{keypadMode:h,controlledKeypadMode:g=!0,customKeys:_=[],keyPadCharacterRef:v,setKeypadInteraction:y}=m,b=t.attrs.latex||``,x=e=>{n({latex:e})},S=(e,{moveCursorAfterNode:i=!0}={})=>{if(n({latex:e}),c(!1),i&&typeof o==`function`){let e=o(),{doc:n}=r.state,i=V.create(n,e+t.nodeSize),a=r.state.tr.setSelection(i);r.view.dispatch(a)}r.commands.focus()};return(0,w.useEffect)(()=>{if(!i)return;let{selection:e}=r.state;e.node?.type?.name===`math`&&c(!0)},[i,r]),(0,w.useEffect)(()=>{tK(r,i||s)},[r,s,i]),(0,w.useEffect)(()=>{if(!r||!s){p({top:0,left:0});return}let e=()=>{if(!l.current)return;let{from:e}=r.state.selection,t=r.view.coordsAtPos(e),n=u.current?.getBoundingClientRect?.(),i=n?.height?n.top:t.top,a=n?.width?n.left:t.left,o=n?.height?n.bottom:t.bottom??t.top,s=l.current.offsetHeight,c=l.current.offsetWidth,d=window.innerHeight-(o+0)>=s?o+0:i-s-0,f=a;d=Math.max(8,Math.min(d,window.innerHeight-s-8)),f=Math.max(8,Math.min(f,window.innerWidth-c-8));let m=(r._tiptapContainerEl||document.body).getBoundingClientRect();p({top:d-m.top,left:f-m.left})};e();let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))};return t=requestAnimationFrame(()=>{t=null,e()}),window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{t!==null&&cancelAnimationFrame(t),window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}},[r,s]),(0,w.useEffect)(()=>{let e=performance.now(),n=n=>{if(n?.timeStamp<e)return;let i=n?.target,a=(document.querySelectorAll?.(`[id^="equation-editor-select"][id*="listbox"], [aria-labelledby="equation-editor-label"][role="listbox"]`)||[]).length>0,o=!!(i?.id&&i.id.includes(`equation-editor-select`))||!!i?.closest?.(`[id*="equation-editor-select"]`),s=!!i?.closest?.(`.math-node-${d.current}`);if(l.current&&!l.current.contains(i)&&!i?.closest?.(`[data-inline-node]`)&&!a&&!o&&!s){c(!1);let e=!!r?.view?.dom?.contains(i);S(t.attrs.latex,{moveCursorAfterNode:!e})}};return s?document.addEventListener(`click`,n):document.removeEventListener(`click`,n),()=>document.removeEventListener(`click`,n)},[r,s,t]),(0,P.jsxs)(ww,{className:`math-node-${d.current}`,style:{display:`inline-flex`,cursor:`pointer`,margin:`0 4px`},"data-selected":i,children:[(0,P.jsx)(`div`,{ref:u,onClick:()=>c(!0),contentEditable:!1,children:(0,P.jsx)(J1,{latex:b})}),s&&rw.createPortal((0,P.jsx)(`div`,{ref:l,"data-toolbar-for":r.instanceId,style:{position:`absolute`,top:`${f.top}px`,left:`${f.left}px`,zIndex:1e3,background:WG,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,P.jsx)(X1,{latex:b,autoFocus:!0,onChange:x,onDone:S,keypadMode:h,controlledKeypadMode:g,additionalKeys:$1(_),keyPadCharacterRef:v,setKeypadInteraction:y})}),r?._tiptapContainerEl||document.body)]})};function a0(e){return Vr(`MuiLinearProgress`,e)}Hr(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var o0=4,s0=rr`
|
|
343
345
|
0% {
|
|
344
346
|
left: -35%;
|
|
345
347
|
right: 100%;
|
|
@@ -354,9 +356,9 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
354
356
|
left: 100%;
|
|
355
357
|
right: -90%;
|
|
356
358
|
}
|
|
357
|
-
`,
|
|
358
|
-
animation: ${
|
|
359
|
-
`,
|
|
359
|
+
`,c0=typeof s0==`string`?null:nr`
|
|
360
|
+
animation: ${s0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
361
|
+
`,l0=rr`
|
|
360
362
|
0% {
|
|
361
363
|
left: -200%;
|
|
362
364
|
right: 100%;
|
|
@@ -371,9 +373,9 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
371
373
|
left: 107%;
|
|
372
374
|
right: -8%;
|
|
373
375
|
}
|
|
374
|
-
`,
|
|
375
|
-
animation: ${
|
|
376
|
-
`,
|
|
376
|
+
`,u0=typeof l0==`string`?null:nr`
|
|
377
|
+
animation: ${l0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
378
|
+
`,d0=rr`
|
|
377
379
|
0% {
|
|
378
380
|
opacity: 1;
|
|
379
381
|
background-position: 0 -23px;
|
|
@@ -388,10 +390,10 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
388
390
|
opacity: 1;
|
|
389
391
|
background-position: -200px -23px;
|
|
390
392
|
}
|
|
391
|
-
`,
|
|
392
|
-
animation: ${
|
|
393
|
-
`,k$=e=>{let{classes:t,variant:n,color:r}=e;return y({root:[`root`,`color${L(r)}`,n],dashed:[`dashed`,`dashedColor${L(r)}`],bar1:[`bar`,`bar1`,`barColor${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${L(r)}`,n===`buffer`&&`color${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},x$,t)},A$=(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),j$=I(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${L(n.color)}`],t[n.variant]]}})(Oo(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{backgroundColor:A$(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)`}}]}))),M$=I(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${L(n.color)}`]]}})(Oo(({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(Mo()).map(([t])=>{let n=A$(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),O$||{animation:`${D$} 3s infinite linear`}),N$=I(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(Oo(({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(Mo()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${S$}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${S$}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:w$||{animation:`${C$} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),P$=I(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(Oo(({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(Mo()).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(Mo()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:A$(e,t),transition:`transform .${S$}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:E$||{animation:`${T$} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),F$=w.forwardRef(function(e,t){let n=ko({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=k$(l),d=Oi(),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,P.jsxs)(j$,{className:v(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,P.jsx)(M$,{className:u.dashed,ownerState:l}):null,(0,P.jsx)(N$,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,P.jsx)(P$,{className:u.bar2,ownerState:l,style:p.bar2})]})}),I$=(e,t)=>{if(!e||!t)return null;let n=null;return e.state.doc.descendants((e,r)=>{if(n!==null)return!1;if(e.type.name===`imageUploadNode`&&e.attrs.nodeKey===t)return n=[e,r],!1}),n},L$=()=>`img-${Date.now()}-${Math.random().toString(36).slice(2)}`,R$=g(`@pie-lib:editable-html:image:insert-image-handler`),z$=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,this.nodeKey=this.node?.attrs?.nodeKey||null}resolveNodePos(){let e=I$(this.editor,this.nodeKey);return e?e[1]:this.nodeKey?null:this.nodePos}cancel(){R$(`insert cancelled`);try{this.deleteNode(),this.onFinish(!1)}catch{}finally{this.editor._insertingImage=!1}}updateNode(e){let t=this.resolveNodePos();if(t===null){R$(`[updateNode] node is gone, dropping update: `,e);return}let{state:n,view:r}=this.editor,{tr:i}=n,a=n.doc.nodeAt(t);if(a){let n=i.setNodeMarkup(t,void 0,{...a.attrs,...e});r.dispatch(n)}}deleteNode(){let e=this.resolveNodePos();if(e===null)return;let{state:t,view:n}=this.editor,{tr:r}=t,i=t.doc.nodeAt(e)||this.node,a=r.delete(e,e+i.nodeSize);n.dispatch(a)}done(e,t){R$(`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,R$(`[fileChosen] file: `,e);let t=new FileReader;t.onload=()=>{let e=t.result;this.updateNode({src:e})},t.readAsDataURL(e)}progress(e,t,n){R$(`progress: `,e,t,n),this.updateNode({percent:e})}getChosenFile(){return this.chosenFile}};function B$(e){return Vr(`MuiDialogContent`,e)}Hr(`MuiDialogContent`,[`root`,`dividers`]);function V$(e){return Vr(`MuiDialogTitle`,e)}var H$=Hr(`MuiDialogTitle`,[`root`]),U$=e=>{let{classes:t,dividers:n}=e;return y({root:[`root`,n&&`dividers`]},B$,t)},W$=I(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Oo(({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:{[`.${H$.root} + &`]:{paddingTop:0}}}]}))),G$=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=U$(o);return(0,P.jsx)(W$,{className:v(s.root,r),ownerState:o,ref:t,...a})}),K$=IN((0,P.jsx)(`path`,{d:`M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z`}),`ArrowBackIos`);function q$(e){return Vr(`MuiFormHelperText`,e)}var J$=Hr(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),Y$,X$=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return y({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${L(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},q$,t)},Z$=I(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${L(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Oo(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${J$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${J$.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}}]}))),Q$=w.forwardRef(function(e,t){let n=ko({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=XH({props:n,muiFormControl:QH(),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};delete h.ownerState;let g=X$(h);return(0,P.jsx)(Z$,{as:a,className:v(g.root,i),ref:t,...p,ownerState:h,children:r===` `?Y$||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})});function $$(e){return Vr(`MuiTextField`,e)}Hr(`MuiTextField`,[`root`]);var e1={standard:cQ,filled:mQ,outlined:TQ},t1=e=>{let{classes:t}=e;return y({root:[`root`]},$$,t)},n1=I(hU,{name:`MuiTextField`,slot:`Root`})({}),r1=w.forwardRef(function(e,t){let n=ko({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:y,label:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onFocus:ee,placeholder:D,required:O=!1,rows:te,select:k=!1,SelectProps:A,slots:j={},slotProps:M={},type:ne,value:re,variant:ie=`outlined`,...N}=n,ae={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:C,required:O,select:k,variant:ie},oe=t1(ae),se=Ii(m),ce=p&&se?`${se}-helper-text`:void 0,le=b&&se?`${se}-label`:void 0,ue=e1[ie],de={slots:j,slotProps:{input:_,inputLabel:h,htmlInput:g,formHelperText:d,select:A,...M}},fe={},pe=de.slotProps.inputLabel;ie===`outlined`&&(pe&&pe.shrink!==void 0&&(fe.notched=pe.shrink),fe.label=b),k&&((!A||!A.native)&&(fe.id=void 0),fe[`aria-describedby`]=void 0);let[me,he]=OI(`root`,{elementType:n1,shouldForwardComponentProp:!0,externalForwardedProps:{...de,...N},ownerState:ae,className:v(oe.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:ie}}),[ge,_e]=OI(`input`,{elementType:ue,externalForwardedProps:de,additionalProps:fe,ownerState:ae}),[ve,ye]=OI(`inputLabel`,{elementType:cU,externalForwardedProps:de,ownerState:ae}),[be,xe]=OI(`htmlInput`,{elementType:`input`,externalForwardedProps:de,ownerState:ae}),[Se,Ce]=OI(`formHelperText`,{elementType:Q$,externalForwardedProps:de,ownerState:ae}),[we,Te]=OI(`select`,{elementType:jQ,externalForwardedProps:de,ownerState:ae}),Ee=(0,P.jsx)(ge,{"aria-describedby":ce,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:C,name:w,rows:te,maxRows:x,minRows:S,type:ne,value:re,id:se,inputRef:y,onBlur:T,onChange:E,onFocus:ee,placeholder:D,inputProps:xe,slots:{input:j.htmlInput?be:void 0},..._e});return(0,P.jsxs)(me,{...he,children:[b!=null&&b!==``&&(0,P.jsx)(ve,{htmlFor:se,id:le,...ye,children:b}),k?(0,P.jsx)(we,{"aria-describedby":ce,id:se,labelId:le,value:re,input:Ee,...Te,children:a}):Ee,p&&(0,P.jsx)(Se,{id:ce,...Ce,children:p})]})});function i1(e){return Vr(`MuiDialogActions`,e)}Hr(`MuiDialogActions`,[`root`,`spacing`]);var a1=e=>{let{classes:t,disableSpacing:n}=e;return y({root:[`root`,!n&&`spacing`]},i1,t)},o1=I(`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}}}]}),s1=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=a1(o);return(0,P.jsx)(o1,{className:v(s.root,r),ownerState:o,ref:t,...a})});function c1(e){return Vr(`MuiDialog`,e)}var l1=Hr(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),u1=w.createContext({}),d1=I(FI,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),f1=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return y({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${L(n)}`],paper:[`paper`,`paperScroll${L(n)}`,`paperWidth${L(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},c1,t)},p1=I(GI,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),m1=I(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${L(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`}}}]}),h1=I(YI,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${L(n.scroll)}`],t[`paperWidth${L(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Oo(({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)`,[`&.${l1.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}`,[`&.${l1.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,[`&.${l1.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),g1=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialog`}),r=So(),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:y,PaperComponent:b=YI,PaperProps:x={},role:S=`dialog`,scroll:C=`paper`,slots:T={},slotProps:E={},TransitionComponent:ee=jI,transitionDuration:D=i,TransitionProps:O,...te}=n,k={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:C},A=f1(k),j=w.useRef(),M=e=>{j.current=e.target===e.currentTarget},ne=e=>{g&&g(e),j.current&&(j.current=null,_&&_(e,`backdropClick`))},re=Ii(o),ie=w.useMemo(()=>({titleId:re}),[re]),N={slots:{transition:ee,...T},slotProps:{transition:O,paper:x,backdrop:l,...E}},[ae,oe]=OI(`root`,{elementType:p1,shouldForwardComponentProp:!0,externalForwardedProps:N,ownerState:k,className:v(A.root,d),ref:t}),[se,ce]=OI(`backdrop`,{elementType:d1,shouldForwardComponentProp:!0,externalForwardedProps:N,ownerState:k,className:A.backdrop}),[le,ue]=OI(`paper`,{elementType:h1,shouldForwardComponentProp:!0,externalForwardedProps:N,ownerState:k,className:A.paper,additionalProps:{elevation:24,role:S,"aria-describedby":a,"aria-labelledby":re,"aria-modal":s,tabIndex:-1,[fI]:``}}),[de,fe]=OI(`container`,{elementType:m1,externalForwardedProps:N,ownerState:k,className:A.container}),[pe,me]=OI(`transition`,{elementType:jI,externalForwardedProps:N,ownerState:k,additionalProps:{appear:!0,in:y,timeout:D,role:`presentation`}});return(0,P.jsx)(ae,{closeAfterTransition:!0,slots:{backdrop:se},slotProps:{backdrop:{transitionDuration:D,as:c,...ce}},disableEscapeKeyDown:f,onClose:_,open:y,onClick:ne,...oe,...te,children:(0,P.jsx)(pe,{...me,children:(0,P.jsx)(de,{onMouseDown:M,...fe,children:(0,P.jsx)(le,{as:b,...ue,children:(0,P.jsx)(u1.Provider,{value:ie,children:u})})})})})}),_1=class extends w.Component{static propTypes={onDone:m.func.isRequired,alt:m.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,P.jsxs)(g1,{open:!0,disablePortal:!0,onClose:this.closeDialog,id:`text-dialog`,hideBackdrop:!0,disableScrollLock:!0,onEntered:this.handleOverflow,children:[(0,P.jsx)(G$,{children:(0,P.jsxs)(`div`,{style:{display:`flex`},children:[(0,P.jsx)(K$,{style:{paddingTop:`6px`}}),(0,P.jsx)(r1,{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,P.jsx)(s1,{children:(0,P.jsx)(IH,{onClick:this.onDone,children:`Done`})})]})}},v1=I(`button`,{shouldForwardProp:e=>![`active`,`disabled`,`extraStyles`].includes(e)})(({active:e,disabled:t})=>({color:e?uL():dL(),display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:t?`not-allowed`:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:t?dL():uL()},"&:focus":{outline:`2px solid ${$L()}`},...t&&{opacity:.7}})),y1=g(`pie-elements:editable-html:raw-button`);(class extends w.Component{static propTypes={onClick:m.func.isRequired,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,active:m.bool,disabled:m.bool,extraStyles:m.object};constructor(e){super(e)}onClick=e=>{y1(`[onClick]`),e.preventDefault();let{onClick:t}=this.props;t(e)};onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){y1(`[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,P.jsx)(v1,{style:r,active:e,disabled:n,onMouseDown:this.onClick,onKeyDown:this.onKeyDown,"aria-label":i,"aria-pressed":e,tabIndex:0,children:t})}});var b1=class extends w.Component{static propTypes={onToggle:m.func.isRequired,mark:m.string,label:m.string.isRequired,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,active:m.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,P.jsx)(v1,{active:t,onMouseDown:this.onToggle,"aria-pressed":t,onKeyDown:this.onKeyDown,"aria-label":n,tabIndex:0,children:e})}},x1=g(`@pie-lib:editable-html:plugins:image:image-toolbar`),S1=I(`div`)(({theme:e})=>({paddingLeft:e.spacing.unit,display:`flex`,alignItems:`center`})),C1=I(`span`,{shouldForwardProp:e=>![`disabled`,`hasAlignmentButtons`].includes(e)})(({disabled:e,hasAlignmentButtons:t})=>({...e&&{opacity:.5},...t&&{borderLeft:`1px solid grey`,paddingLeft:8,marginLeft:4}})),w1=({alignment:e,active:t,onClick:n})=>(0,P.jsx)(b1,{active:t,onToggle:()=>n(e),label:e,children:e});w1.propTypes={alignment:m.string.isRequired,active:m.bool.isRequired,onClick:m.func.isRequired};var T1=class extends w.Component{static propTypes={onChange:m.func.isRequired,alignment:m.string,alt:m.string,imageLoaded:m.bool,disableImageAlignmentButtons:m.bool};onAltTextDone=e=>{x1(`[onAltTextDone]: alt:`,e),this.props.onChange({alt:e},!0)};onAlignmentClick=e=>{x1(`[onAlignmentClick]: alignment:`,e),this.props.onChange({alignment:e})};renderDialog=()=>{let{alt:e}=this.props,t=document.createElement(`div`),n=(0,P.jsx)(_1,{alt:e,onDone:this.onAltTextDone});rw.render(n,t),document.body.appendChild(t)};render(){let{alignment:e,imageLoaded:t,disableImageAlignmentButtons:n}=this.props;return(0,P.jsxs)(S1,{children:[!n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(w1,{alignment:`left`,active:e===`left`,onClick:this.onAlignmentClick}),(0,P.jsx)(w1,{alignment:`center`,active:e===`center`,onClick:this.onAlignmentClick}),(0,P.jsx)(w1,{alignment:`right`,active:e===`right`,onClick:this.onAlignmentClick})]}),(0,P.jsx)(C1,{disabled:!t,hasAlignmentButtons:!n,onMouseDown:e=>t&&this.renderDialog(e),children:`Alt text`})]})}};g(`@pie-lib:editable-html:plugins:image:component`);var E1=I(F$,{shouldForwardProp:e=>e!==`hideProgress`})(({hideProgress:e})=>({position:`absolute`,left:`0`,width:`fit-content`,top:`0%`,transition:`opacity 200ms linear`,...e&&{opacity:0}})),D1=I(`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}})),O1=I(`div`)(({theme:e})=>({position:`relative`,width:`fit-content`,display:`flex`,alignItems:`center`,"&&:hover > .resize":{display:`block`}})),k1=I(`img`,{shouldForwardProp:e=>e!==`active`})(({theme:e,active:t})=>({border:t?`solid 1px ${e.palette.primary.main}`:`solid 1px transparent`})),A1=I(`div`)(({theme:e})=>({backgroundColor:e.palette.primary.main,cursor:`col-resize`,height:`35px`,width:`5px`,borderRadius:8,marginLeft:`5px`,marginRight:`10px`,display:`none`})),j1=e=>e?`${e}px`:`calc(20px)`;function M1(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,w.useMemo)(()=>f+t.nodeSize===p,[f,p,t.nodeSize]),[h,g]=(0,w.useState)(!1),_=(0,w.useRef)(t),v=(0,w.useRef)(null),y=(0,w.useRef)(null),b=(0,w.useRef)(null),x=(0,w.useCallback)(e=>{let t=e/v.current.naturalWidth*4;return parseInt(t.toFixed(0)*25,10)},[]),S=(0,w.useCallback)(()=>{let e=I$(n,_.current.attrs.nodeKey);return e?e[1]:null},[n]),C=(0,w.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,w.useCallback)(()=>{if(!t.attrs.width||!v.current||!v.current.naturalWidth)return;let e=x(t.attrs.width);t.attrs.resizePercent!==e&&C({resizePercent:e})},[t.attrs.width,t.attrs.resizePercent,x,C]);(0,w.useEffect)(()=>{_.current={...t,pos:d}},[t,d]),(0,w.useEffect)(()=>{o?m&&n.isEditable&&(!String(t.attrs?.src??``).trim()&&s.imageHandling?.insertImageRequested&&s.imageHandling.insertImageRequested(n,[t,d],e=>new z$(n,[t,d],e)),g(o)):g(o)},[m,o,n.isEditable]),(0,w.useEffect)(()=>{T();let e=y?.current;return e&&n.isEditable&&e.addEventListener(`mousedown`,k,!1),()=>{e&&e.removeEventListener(`mousedown`,k,!1)}},[]),(0,w.useEffect)(()=>{T()});let E=(0,w.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};_l(i,{width:t.attrs.width,height:t.attrs.height})||C(i)}},[t.attrs.width,t.attrs.height,c,l,C]),ee=(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},D=(0,w.useCallback)(e=>{let t=v.current;if(!t)return;let n=e.target.getBoundingClientRect(),r={width:t.naturalWidth,height:t.naturalHeight},i=ee(r,{width:e.clientX-n.left,height:e.clientY-n.top});i.width>50&&i.height>50&&i.width<=700&&i.height<=900&&(t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,C({width:i.width,height:i.height}))},[n,C]),O=(0,w.useCallback)(e=>{C(e)},[n,C]),te=(0,w.useCallback)(()=>{window.removeEventListener(`mousemove`,D),window.removeEventListener(`mouseup`,te)},[D]),k=(0,w.useCallback)(()=>{window.addEventListener(`mousemove`,D),window.addEventListener(`mouseup`,te)},[D,te]),A={width:j1(t.attrs.width),height:j1(t.attrs.height),objectFit:`contain`},j={left:`flex-start`,center:`center`,right:`flex-end`}[t.attrs.alignment]||`flex-start`;return(0,P.jsxs)(ww,{children:[(0,P.jsxs)(D1,{onFocus:i,loading:!t.attrs.loaded,pendingDelete:t.attrs.deleteStatus===`pending`,style:{justifyContent:j},children:[(0,P.jsx)(E1,{mode:`determinate`,value:t.attrs.percent||0,hideProgress:t.attrs.loaded}),(0,P.jsxs)(O1,{onDragStart:e=>e.preventDefault(),children:[(0,P.jsx)(k1,{...r,active:o&&t.attrs.loaded,draggable:!1,ref:v,src:t.attrs.src,style:A,onLoad:E,alt:t.attrs.alt}),(0,P.jsx)(A1,{ref:y,className:`resize`,style:{display:n.isEditable?void 0:`none`}})]})]}),h&&n._tiptapContainerEl&&rw.createPortal((0,P.jsx)(`div`,{ref:b,style:{zIndex:20,background:oW,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,P.jsx)(hW,{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,P.jsx)(T1,{disableImageAlignmentButtons:s.imageHandling?.disableImageAlignmentButtons,alt:t.attrs.alt,imageLoaded:t.attrs.loaded,alignment:t.attrs.alignment||`left`,onChange:O})})}),n._tiptapContainerEl)]})}M1.propTypes={node:m.object.isRequired,editor:m.object.isRequired,attributes:m.object,onFocus:m.func,maxImageWidth:m.number,maxImageHeight:m.number};var N1=tC.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`,Sb(e,{"data-type":`image-upload-node`})]},addNodeView(){return Rw(e=>(0,P.jsx)(M1,{...e,options:this.options}))},addCommands(){return{setImageUploadNode:()=>({commands:e})=>e.insertContent({type:this.name,attrs:{nodeKey:L$()}})}},addProseMirrorPlugins(){let e=this.editor,t=this.options;return[new kf({props:{handlePaste(n,r){let i=Array.from(r.clipboardData?.items||[]).find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();if(!a)return!1;let o=t?.imageHandling?.insertImageRequested,s=L$(),c=new FileReader;return c.onload=()=>{let t=c.result;if(typeof t!=`string`||(e.commands.insertContent({type:`imageUploadNode`,attrs:{src:t,loaded:!o,nodeKey:s}}),!o))return;let n=I$(e,s);n&&o(e,n,t=>{let r;return r=new z$(e,n,e=>{e||r?.updateNode({loaded:!0}),t(e)},!0),r.fileChosen(a),r})},c.readAsDataURL(a),!0}}})]}});function P1(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function F1(e,t,n,r={},i=()=>{}){let{ease:a=P1,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 I1={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function L1(e){let{onChange:t,...n}=e,r=w.useRef(),i=w.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return GN(()=>{let e=RN(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=UN(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),w.useEffect(()=>{a(),t(r.current)},[t]),(0,P.jsx)(`div`,{style:I1,...n,ref:i})}var R1=IN((0,P.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),z1=IN((0,P.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function B1(e){return Vr(`MuiTabScrollButton`,e)}var V1=Hr(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),H1=e=>{let{classes:t,orientation:n,disabled:r}=e;return y({root:[`root`,n,r&&`disabled`]},B1,t)},U1=I($P,{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,[`&.${V1.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),W1=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Oi(),d={isRtl:u,...n},f=H1(d),p=i.StartScrollButtonIcon??R1,m=i.EndScrollButtonIcon??z1,h=LU({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=LU({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,P.jsx)(U1,{component:`div`,className:v(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,P.jsx)(p,{...h}):(0,P.jsx)(m,{...g})})});function G1(e){return Vr(`MuiTabs`,e)}var K1=Hr(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),q1=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,J1=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Y1=(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}}},X1=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return y({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`]},G1,c)},Z1=I(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${K1.scrollButtons}`]:t.scrollButtons},{[`& .${K1.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Oo(({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:{[`& .${K1.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),Q1=I(`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`}}]}),$1=I(`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`}}]}),e0=I(`span`,{name:`MuiTabs`,slot:`Indicator`})(Oo(({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}}]}))),t0=I(L1)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),n0={},r0=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiTabs`}),r=So(),i=Oi(),{"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:y,slots:b={},slotProps:x={},TabIndicatorProps:S={},TabScrollButtonProps:C={},textColor:T=`primary`,value:E,variant:ee=`standard`,visibleScrollbar:D=!1,...O}=n,te=ee===`scrollable`,k=h===`vertical`,A=k?`scrollTop`:`scrollLeft`,j=k?`top`:`left`,M=k?`bottom`:`right`,ne=k?`clientHeight`:`clientWidth`,re=k?`height`:`width`,ie={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:k,scrollButtons:_,textColor:T,variant:ee,visibleScrollbar:D,fixed:!te,hideScrollbar:te&&!D,scrollableX:te&&!k,scrollableY:te&&k,centered:c&&!te,scrollButtonsHideMobile:!f},N=X1(ie),ae=LU({elementType:b.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:ie}),oe=LU({elementType:b.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:ie}),[se,ce]=w.useState(!1),[le,ue]=w.useState(n0),[de,fe]=w.useState(!1),[pe,me]=w.useState(!1),[he,ge]=w.useState(!1),[_e,ve]=w.useState({overflow:`hidden`,scrollbarWidth:0}),ye=new Map,be=w.useRef(null),xe=w.useRef(null),Se={slots:b,slotProps:{indicator:S,scrollButtons:C,...x}},Ce=()=>{let e=be.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&&E!==!1){let e=xe.current.children;if(e.length>0){let t=e[ye.get(E)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},we=XN(()=>{let{tabsMeta:e,tabMeta:t}=Ce(),n=0,r;k?(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,[re]:t?t[re]:0};if(typeof le[r]!=`number`||typeof le[re]!=`number`)ue(a);else{let e=Math.abs(le[r]-a[r]),t=Math.abs(le[re]-a[re]);(e>=1||t>=1)&&ue(a)}}),Te=(e,{animation:t=!0}={})=>{t?F1(A,be.current,e,{duration:r.transitions.duration.standard}):be.current[A]=e},Ee=e=>{let t=be.current[A];k?t+=e:t+=e*(i?-1:1),Te(t)},De=()=>{let e=be.current[ne],t=0,n=Array.from(xe.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[ne]>e){r===0&&(t=e);break}t+=i[ne]}return t},Oe=()=>{Ee(-1*De())},ke=()=>{Ee(De())},[Ae,{onChange:je,...Me}]=OI(`scrollbar`,{className:v(N.scrollableX,N.hideScrollbar),elementType:t0,shouldForwardComponentProp:!0,externalForwardedProps:Se,ownerState:ie}),Ne=w.useCallback(e=>{je?.(e),ve({overflow:null,scrollbarWidth:e})},[je]),[Pe,Fe]=OI(`scrollButtons`,{className:v(N.scrollButtons,C.className),elementType:W1,externalForwardedProps:Se,ownerState:ie,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:b.startScrollButtonIcon||b.StartScrollButtonIcon,EndScrollButtonIcon:b.endScrollButtonIcon||b.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:ae,endScrollButtonIcon:oe}}}),Ie=()=>{let e={};e.scrollbarSizeListener=te?(0,P.jsx)(Ae,{...Me,onChange:Ne}):null;let t=te&&(_===`auto`&&(de||pe)||_===!0);return e.scrollButtonStart=t?(0,P.jsx)(Pe,{direction:i?`right`:`left`,onClick:Oe,disabled:!de,...Fe}):null,e.scrollButtonEnd=t?(0,P.jsx)(Pe,{direction:i?`left`:`right`,onClick:ke,disabled:!pe,...Fe}):null,e},Le=XN(e=>{let{tabsMeta:t,tabMeta:n}=Ce();if(!(!n||!t)){if(n[j]<t[j]){let r=t[A]+(n[j]-t[j]);Te(r,{animation:e})}else if(n[M]>t[M]){let r=t[A]+(n[M]-t[M]);Te(r,{animation:e})}}}),Re=XN(()=>{te&&_!==!1&&ge(!he)});w.useEffect(()=>{let e=RN(()=>{be.current&&we()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Re()},r=UN(be.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(xe.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(xe.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[we,Re]),w.useEffect(()=>{let e=Array.from(xe.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&te&&_!==!1){let n=e[0],r=e[t-1],i={root:be.current,threshold:.99},a=new IntersectionObserver(e=>{fe(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{me(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[te,_,he,l?.length]),w.useEffect(()=>{ce(!0)},[]),w.useEffect(()=>{we()}),w.useEffect(()=>{Le(n0!==le)},[Le,le]),w.useImperativeHandle(s,()=>({updateIndicator:we,updateScrollButtons:Re}),[we,Re]);let[ze,Be]=OI(`indicator`,{className:v(N.indicator,S.className),elementType:e0,externalForwardedProps:Se,ownerState:ie,additionalProps:{style:le}}),Ve=(0,P.jsx)(ze,{...Be}),He=0,Ue=w.Children.map(l,e=>{if(!w.isValidElement(e))return null;let t=e.props.value===void 0?He:e.props.value;ye.set(t,He);let n=t===E;return He+=1,w.cloneElement(e,{fullWidth:ee===`fullWidth`,indicator:n&&!se&&Ve,selected:n,selectionFollowsFocus:y,onChange:m,textColor:T,value:t,...He===1&&E===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),We=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=xe.current,n=dI(VN(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(),Y1(t,n,J1);break;case a:e.preventDefault(),Y1(t,n,q1);break;case`Home`:e.preventDefault(),Y1(t,null,q1);break;case`End`:e.preventDefault(),Y1(t,null,J1);break;default:break}},Ge=Ie(),[Ke,qe]=OI(`root`,{ref:t,className:v(N.root,u),elementType:Z1,externalForwardedProps:{...Se,...O,component:d},ownerState:ie}),[Je,Ye]=OI(`scroller`,{ref:be,className:N.scroller,elementType:Q1,externalForwardedProps:Se,ownerState:ie,additionalProps:{style:{overflow:_e.overflow,[k?`margin${i?`Left`:`Right`}`:`marginBottom`]:D?void 0:-_e.scrollbarWidth}}}),[Xe,Ze]=OI(`list`,{ref:xe,className:v(N.list,N.flexContainer),elementType:$1,externalForwardedProps:Se,ownerState:ie,getSlotProps:e=>({...e,onKeyDown:t=>{We(t),e.onKeyDown?.(t)}})});return(0,P.jsxs)(Ke,{...qe,children:[Ge.scrollButtonStart,Ge.scrollbarSizeListener,(0,P.jsxs)(Je,{...Ye,children:[(0,P.jsx)(Xe,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Ze,children:Ue}),se&&Ve]}),Ge.scrollButtonEnd]})});function i0(e){return Vr(`MuiTab`,e)}var a0=Hr(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),o0=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return y({root:[`root`,a&&o&&`labelIcon`,`textColor${L(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},i0,t)},s0=I($P,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${L(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${a0.iconWrapper}`]:t.iconWrapper},{[`& .${a0.icon}`]:t.icon}]}})(Oo(({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:{[`& > .${a0.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${a0.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${a0.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${a0.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${a0.selected}`]:{opacity:1},[`&.${a0.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${a0.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${a0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${a0.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${a0.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)}}]}))),c0=w.forwardRef(function(e,t){let n=ko({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:y=!1,...b}=n,x={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:y},S=o0(x),C=s&&u&&w.isValidElement(s)?w.cloneElement(s,{className:v(S.icon,s.props.className)}):s;return(0,P.jsxs)(s0,{focusRipple:!a,className:v(S.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:x,tabIndex:m?0:-1,...b,children:[c===`top`||c===`start`?(0,P.jsxs)(w.Fragment,{children:[C,u]}):(0,P.jsxs)(w.Fragment,{children:[u,C]}),l]})}),l0=e=>{let{classes:t}=e;return y({root:[`root`]},V$,t)},u0=I(zo,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),d0=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=l0(o),{titleId:c=i}=w.useContext(u1);return(0,P.jsx)(u0,{component:`h2`,className:v(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function f0(e){return Vr(`MuiDialogContentText`,e)}Hr(`MuiDialogContentText`,[`root`]);var p0=e=>{let{classes:t}=e,n=y({root:[`root`]},f0,t);return{...t,...n}},m0=I(zo,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiDialogContentText`,slot:`Root`})({}),h0=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogContentText`}),{children:r,className:i,...a}=n,o=p0(a);return(0,P.jsx)(m0,{component:`p`,variant:`body1`,color:`textSecondary`,ref:t,ownerState:a,className:v(o.root,i),...n,classes:o})}),g0=g(`@pie-lib:editable-html:plugins:media:dialog`),_0=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},v0=e=>e&&/(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(e),y0=e=>e&&/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)/.test(e),b0=e=>{if(!e)return!1;let t=/^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;return e.match(t)&&e.match(t)[2]},x0=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(``),g0(e)})}catch{t(``)}}),S0={video:`Video`,audio:`Audio`},C0={uploadFile:`upload-file`,insertUrl:`insert-url`},w0=I(g1)(({theme:e})=>({"& .MuiDialog-paper":{minWidth:`500px`}})),T0=I(G$)(({theme:e})=>({padding:0})),E0=I(`div`)(({theme:e})=>({display:`flex`,flexDirection:`space-between`})),D0=I(`div`)(({theme:e})=>({marginTop:e.spacing(1.5)})),O0=I(`input`)(({theme:e})=>({})),k0=I(zo)(({theme:e})=>({marginTop:e.spacing(1.5),color:e.palette.error.main})),A0=I(vF)(({theme:e})=>({marginLeft:e.spacing(1.5)})),j0=class extends w.Component{static propTypes={open:m.bool,edit:m.bool,disablePortal:m.bool,handleClose:m.func,uploadSoundSupport:m.shape({add:m.func,delete:m.func}),type:m.string,src:m.string,url:m.string,urlToUse:m.string,starts:m.number,ends:m.number,height:m.number,width:m.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?C0.uploadFile:C0.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=_0(e),a=v0(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=>{b0(e)&&x0(e).then(t=>{this.handleStateChange({urlToUse:t,invalid:!t,url:e})}).catch(g0)};checkVideo=e=>{if(_0(e)){let t=`https://youtube.com/embed/${e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)[2]}`;g0(`is youtube`),this.handleStateChange({urlToUse:t,url:e,invalid:!1})}if(v0(e)){let t=`https://player.vimeo.com/video/${e.replace(/.*vimeo.com\/(.*)/g,`$1`)}`;g0(`is vimeo`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}if(y0(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`;g0(`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===C0.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(g0(`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=_0(u),_=m===C0.insertUrl,v=m===C0.uploadFile,y=_?s||u==null:!h.url||h.scheduled,b=i?.add&&i?.delete&&n!==`video`;return(0,P.jsxs)(w0,{disablePortal:t,open:e,onClose:()=>this.handleDone(!1),"aria-labelledby":`form-dialog-title`,children:[(0,P.jsxs)(d0,{id:`form-dialog-title`,children:[`Insert `,S0[n]]}),(0,P.jsx)(G$,{children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(E0,{children:(0,P.jsxs)(r0,{indicatorColor:`primary`,value:m,onChange:(e,t)=>{this.setState({tabValue:t})},children:[b?(0,P.jsx)(c0,{value:C0.uploadFile,label:`Upload file`}):null,(0,P.jsx)(c0,{value:C0.insertUrl,label:n===`video`?`Insert YouTube, Vimeo, or Google Drive URL`:`Insert SoundCloud URL`})]})}),_&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(r1,{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,P.jsxs)(T0,{children:[(0,P.jsx)(h0,{children:`Video Properties`}),(0,P.jsx)(r1,{autoFocus:!0,margin:`dense`,id:`width`,label:`Width`,type:`number`,placeholder:`Width`,value:l,onChange:this.changeHandler(`width`)}),(0,P.jsx)(r1,{autoFocus:!0,margin:`dense`,id:`height`,label:`Height`,type:`number`,placeholder:`Height`,value:o,onChange:this.changeHandler(`height`)})]}),f&&(0,P.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,P.jsx)(w.Fragment,{children:(0,P.jsxs)(T0,{children:[(0,P.jsx)(r1,{autoFocus:!0,margin:`dense`,id:`starts`,label:`Starts`,type:`number`,placeholder:`Starts`,value:c,onChange:this.changeHandler(`starts`)}),g&&(0,P.jsx)(r1,{autoFocus:!0,margin:`dense`,id:`ends`,label:`Ends`,type:`number`,placeholder:`Ends`,value:a,onChange:this.changeHandler(`ends`)})]})})]}),v&&(0,P.jsx)(D0,{children:(0,P.jsxs)(`div`,{children:[h.url?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(E0,{children:[(0,P.jsx)(`audio`,{controls:`controls`,controlsList:`nodownload`,children:(0,P.jsx)(`source`,{type:d,src:h.url})}),(0,P.jsx)(A0,{"aria-label":`delete`,onClick:this.handleRemoveFile,children:(0,P.jsx)(yF,{})})]}),!h.scheduled&&h.loading?(0,P.jsx)(zo,{variant:`subheading`,children:`Loading...`}):null,h.scheduled?(0,P.jsx)(zo,{variant:`subheading`,children:`Waiting for Upload to finish, then inserting item...`}):null]}):h.loading?null:(0,P.jsx)(O0,{accept:`audio/*`,onChange:this.handleUploadFile,type:`file`}),!!h.error&&(0,P.jsx)(k0,{variant:`caption`,children:h.error})]})})]})}),(0,P.jsxs)(s1,{children:[(0,P.jsx)(IH,{onClick:()=>this.handleDone(!1),color:`primary`,children:`Cancel`}),(0,P.jsx)(IH,{disabled:y,onClick:()=>this.handleDone(!0),color:`primary`,children:r?`Update`:`Insert`})]})]})}},M0=I(`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)`})),N0=I(`span`)(({theme:e})=>({cursor:`pointer`,flex:3,border:`solid ${e.palette.common.black}`,textAlign:`right`,borderWidth:`0 2px 0 0`,marginRight:`5px`,paddingRight:`5px`})),P0=I(`span`)({cursor:`pointer`}),F0=class extends w.Component{static propTypes={onEdit:m.func,hideEdit:m.bool,onRemove:m.func};render(){let{hideEdit:e,onEdit:t,onRemove:n}=this.props;return(0,P.jsxs)(M0,{children:[e?null:(0,P.jsx)(N0,{onClick:t,children:`Edit Settings`}),(0,P.jsx)(P0,{onClick:n,children:`Remove`})]})}},I0=tC.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`,Sb({"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 Rw(e=>(0,P.jsx)(z0,{...e,options:this.options}))}}),L0=()=>{document.querySelectorAll(`.insert-media-dialog`).forEach(e=>e.remove())},R0=e=>{let t=document.createElement(`div`),{type:n,callback:r,options:i,...a}=e,o=document.body.style.overflow;L0(),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,P.jsx)(j0,{...a,uploadSoundSupport:i.uploadSoundSupport,type:n,disablePortal:!0,open:!0,handleClose:s});rw.render(c,t),document.body.appendChild(t)};function z0({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,w.useEffect)(()=>{o||R0({...t.attrs,options:i,edit:!0,callback:(t,i)=>{t?n(i):r(),e.chain().focus().run()}})},[]),(0,P.jsxs)(ww,{"data-type":a,style:{width:s,height:c},children:[l===`audio`?(0,P.jsx)(`audio`,{controls:!0,controlsList:`nodownload`,children:(0,P.jsx)(`source`,{type:`audio/mp3`,src:o})}):(0,P.jsx)(`iframe`,{src:o,allowFullScreen:!0,frameBorder:`0`,width:s,height:c}),(0,P.jsx)(F0,{onEdit:()=>{R0({...t.attrs,options:i,edit:!0,callback:(t,r)=>{t&&n(r),e.chain().focus().run()}})},onRemove:r})]})}function B0(e){return Vr(`MuiListItem`,e)}Hr(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var V0=Hr(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function H0(e){return Vr(`MuiListItemSecondaryAction`,e)}Hr(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var U0=e=>{let{disableGutters:t,classes:n}=e;return y({root:[`root`,t&&`disableGutters`]},H0,n)},W0=I(`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}}]}),G0=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=w.useContext(RU),o={...n,disableGutters:a.disableGutters},s=U0(o);return(0,P.jsx)(W0,{className:v(s.root,r),ownerState:o,ref:t,...i})});G0.muiName=`ListItemSecondaryAction`;var K0=(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]},q0=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return y({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},B0,n)},J0=I(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:K0})(Oo(({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:{[`& > .${V0.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}}]}))),Y0=I(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),X0=w.forwardRef(function(e,t){let n=ko({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:y={},...b}=n,x=w.useContext(RU),S=w.useMemo(()=>({dense:f||x.dense||!1,alignItems:r,disableGutters:p}),[r,x.dense,f,p]),C=w.useRef(null),T=w.Children.toArray(i),E=T.length&&zN(T[T.length-1],[`ListItemSecondaryAction`]),ee={...n,alignItems:r,dense:S.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:E},D=q0(ee),O=QN(C,t),[te,k]=OI(`secondaryAction`,{elementType:G0,externalForwardedProps:{slots:y,slotProps:_},ownerState:ee,className:D.secondaryAction}),A=y.root||s.Root||J0,j=_.root||c.root||{},M={className:v(D.root,j.className,a),...b},ne=o||`li`;return E?(ne=!M.component&&!o?`div`:ne,l===`li`&&(ne===`li`?ne=`div`:M.component===`li`&&(M.component=`div`)),(0,P.jsx)(RU.Provider,{value:S,children:(0,P.jsxs)(Y0,{as:l,className:v(D.container,u),ref:O,ownerState:ee,...d,children:[(0,P.jsx)(A,{...j,...!HF(A)&&{as:ne,ownerState:{...ee,...j.ownerState}},...M,children:T}),T.pop()]})})):(0,P.jsx)(RU.Provider,{value:S,children:(0,P.jsxs)(A,{...j,as:ne,ref:O,...!HF(A)&&{ownerState:{...ee,...j.ownerState}},...M,children:[T,g&&(0,P.jsx)(te,{...k,children:g})]})})}),Z0=()=>{document.querySelectorAll(`.insert-css-dialog`).forEach(e=>e.remove())},Q0=({editor:e,callback:t,opts:n,selectedText:r,parentNode:i})=>{let a=e.options.element,o=document.createElement(`div`),{selection:s}=e.state;Z0(),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,P.jsxs)(`div`,{style:{background:`white`,height:500,padding:20,overflow:`hidden`,display:`flex`,flexFlow:`column`},children:[(0,P.jsx)(`h2`,{children:`Please choose a css class`}),f&&(0,P.jsxs)(`div`,{children:[`The current parent has this class `,f]}),(0,P.jsx)(HU,{component:`nav`,style:{overflow:`scroll`},children:n.names.map((e,t)=>(0,P.jsxs)(X0,{button:!0,onClick:()=>d(e),children:[(0,P.jsx)(`div`,{style:{marginRight:20},children:e}),(0,P.jsx)(`div`,{dangerouslySetInnerHTML:{__html:p(e)}})]},`rule-${t}`))})]});rw.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)}})},$0=wS.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`)||``;if(!t)return!1;if((this.options&&this.options.classes||[]).length>0){let e=this.options.classes.find(e=>t.includes(e));return e?{class:e}:!1}return{class:t}}}]},renderHTML({HTMLAttributes:e}){return[`span`,Sb(e),0]},addCommands(){return{setCSSClass:e=>({commands:t})=>t.setMark(this.name,{class:e}),unsetCSSClass:()=>({commands:e})=>e.unsetMark(this.name),openCSSClassDialog:()=>({editor:e})=>{Q0({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()}})}}}}),e2=bO.extend({content:`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`}),t2=tC.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`,Sb(e),0]},addCommands(){return{toggleHeadingParagraph:()=>({commands:e,editor:t})=>t.isActive(`headingParagraph`)?e.setNode(`paragraph`):e.setNode(`headingParagraph`,{"data-heading":`heading1`})}}}),n2=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`},r2=IN((0,P.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`),i2=IN((0,P.jsx)(`path`,{d:`M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z`}),`FormatItalic`),a2=IN((0,P.jsx)(`path`,{d:`M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z`}),`FormatStrikethrough`),o2=IN((0,P.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`),s2=IN((0,P.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`),c2=IN((0,P.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`),l2=IN((0,P.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`),u2=IN((0,P.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`),d2=IN((0,P.jsx)(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),f2=IN((0,P.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`),p2=IN((0,P.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`),m2=IN((0,P.jsx)(`path`,{d:`M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z`}),`FormatQuote`),h2=IN((0,P.jsx)(`path`,{d:`M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3zM8 17H6v-2h2zm0-4H6v-2h2zm0-4H6V7h2zm10 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V7h2z`}),`Theaters`),g2=IN((0,P.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`),_2=IN((0,P.jsx)(`path`,{d:`M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z`}),`BorderAll`),v2=I(`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`})),y2=()=>(0,P.jsx)(v2,{children:`+ Response Area`}),b2={characters:[[`á`,`é`,`í`,`ó`,`ú`],[`Á`,`É`,`Í`,`Ó`,`Ú`],[`—`,`«`,`»`,`ñ`,`ü`],[`-`,`¿`,`¡`,`Ñ`,`Ü`]]},x2={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:` `},{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:` `},{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:` `},{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:` `},{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:`—`}]]},S2=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),C2=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),w2=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),T2=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),E2=({editor:e,onChange:t})=>{let[n,r]=(0,w.useState)(!1),i;switch(!0){case e.isActive({textAlign:`right`}):i=(0,P.jsx)(C2,{});break;case e.isActive({textAlign:`center`}):i=(0,P.jsx)(w2,{});break;case e.isActive({textAlign:`justify`}):i=(0,P.jsx)(T2,{});break;default:i=(0,P.jsx)(S2,{});break}let a=t=>{let n=t.currentTarget?.getAttribute(`value`);n&&e.commands.setTextAlign(n),r(!1)};return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!n)},children:[i,(0,P.jsx)(`span`,{style:{marginLeft:`5px`,fontSize:`8px`},"aria-hidden":`true`,children:`▼`})]}),(0,P.jsx)(RR,{in:n,timeout:`auto`,unmountOnExit:!0,style:{position:`absolute`},children:(0,P.jsxs)(HU,{component:`div`,disablePadding:!0,style:{background:`#fff`,display:`flex`,flexDirection:`row`,padding:0},children:[(0,P.jsx)(X0,{button:!0,type:`submit`,value:`left`,"aria-label":`Align text left`,onClick:a,children:(0,P.jsx)(S2,{})}),(0,P.jsx)(X0,{button:!0,type:`submit`,value:`center`,"aria-label":`Align text center`,onClick:a,children:(0,P.jsx)(w2,{})}),(0,P.jsx)(X0,{button:!0,type:`submit`,value:`right`,"aria-label":`Align text right`,onClick:a,children:(0,P.jsx)(C2,{})}),(0,P.jsx)(X0,{button:!0,type:`submit`,value:`justify`,"aria-label":`Justify text`,onClick:a,children:(0,P.jsx)(T2,{})})]})})]})},D2=I(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans, Arial, sans-serif`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,whiteSpace:`nowrap`})),O2=()=>(0,P.jsx)(D2,{children:`CSS`}),k2=I(`path`)({fill:`grey`,"&:hover":{fill:`black`}}),A2=e=>t=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(e,{...t})}),j2=A2(e=>(0,P.jsx)(k2,{...e,d:`M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z`})),M2=A2(e=>(0,P.jsx)(k2,{...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`})),N2=A2(e=>(0,P.jsx)(k2,{...e,d:`M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z`})),P2=A2(e=>(0,P.jsx)(k2,{...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`})),F2=A2(e=>(0,P.jsx)(k2,{...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`})),I2=`bottom`,L2=`right`,R2=`left`,z2=`auto`,B2=[`top`,I2,L2,R2],V2=`start`,H2=`clippingParents`,U2=`viewport`,W2=`popper`,G2=`reference`,K2=B2.reduce(function(e,t){return e.concat([t+`-`+V2,t+`-end`])},[]),q2=[].concat(B2,[z2]).reduce(function(e,t){return e.concat([t,t+`-`+V2,t+`-end`])},[]),J2=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Y2(e){return e?(e.nodeName||``).toLowerCase():null}function X2(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Z2(e){return e instanceof X2(e).Element||e instanceof Element}function Q2(e){return e instanceof X2(e).HTMLElement||e instanceof HTMLElement}function $2(e){return typeof ShadowRoot>`u`?!1:e instanceof X2(e).ShadowRoot||e instanceof ShadowRoot}function e4(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];!Q2(i)||!Y2(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 t4(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},{});!Q2(r)||!Y2(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var n4={name:`applyStyles`,enabled:!0,phase:`write`,fn:e4,effect:t4,requires:[`computeStyles`]};function r4(e){return e.split(`-`)[0]}var i4=Math.max,a4=Math.min,o4=Math.round;function s4(){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 c4(){return!/^((?!chrome|android).)*safari/i.test(s4())}function l4(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Q2(e)&&(i=e.offsetWidth>0&&o4(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&o4(r.height)/e.offsetHeight||1);var o=(Z2(e)?X2(e):window).visualViewport,s=!c4()&&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 u4(e){var t=l4(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 d4(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$2(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function f4(e){return X2(e).getComputedStyle(e)}function p4(e){return[`table`,`td`,`th`].indexOf(Y2(e))>=0}function m4(e){return((Z2(e)?e.ownerDocument:e.document)||window.document).documentElement}function h4(e){return Y2(e)===`html`?e:e.assignedSlot||e.parentNode||($2(e)?e.host:null)||m4(e)}function g4(e){return!Q2(e)||f4(e).position===`fixed`?null:e.offsetParent}function _4(e){var t=/firefox/i.test(s4());if(/Trident/i.test(s4())&&Q2(e)&&f4(e).position===`fixed`)return null;var n=h4(e);for($2(n)&&(n=n.host);Q2(n)&&[`html`,`body`].indexOf(Y2(n))<0;){var r=f4(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 v4(e){for(var t=X2(e),n=g4(e);n&&p4(n)&&f4(n).position===`static`;)n=g4(n);return n&&(Y2(n)===`html`||Y2(n)===`body`&&f4(n).position===`static`)?t:n||_4(e)||t}function y4(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function b4(e,t,n){return i4(e,a4(t,n))}function x4(e,t,n){var r=b4(e,t,n);return r>n?n:r}function S4(){return{top:0,right:0,bottom:0,left:0}}function C4(e){return Object.assign({},S4(),e)}function w4(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var T4=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,C4(typeof e==`number`?w4(e,B2):e)};function E4(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=r4(n.placement),c=y4(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=T4(i.padding,n),d=u4(a),f=c===`y`?`top`:R2,p=c===`y`?I2:L2,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=v4(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=b4(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function D4(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)||d4(t.elements.popper,r)&&(t.elements.arrow=r))}var O4={name:`arrow`,enabled:!0,phase:`main`,fn:E4,effect:D4,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function k4(e){return e.split(`-`)[1]}var A4={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function j4(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:o4(n*i)/i||0,y:o4(r*i)/i||0}}function M4(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=R2,b=`top`,x=window;if(l){var S=v4(n),C=`clientHeight`,w=`clientWidth`;if(S===X2(n)&&(S=m4(n),f4(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=I2;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=L2;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var ee=Object.assign({position:s},l&&A4),D=u===!0?j4({x:p,y:h},X2(n)):{x:p,y:h};if(p=D.x,h=D.y,c){var O;return Object.assign({},ee,(O={},O[b]=v?`0`:``,O[y]=_?`0`:``,O.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,O))}return Object.assign({},ee,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function N4(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:r4(t.placement),variation:k4(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,M4(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,M4(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 P4={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:N4,data:{}},F4={passive:!0};function I4(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=X2(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,F4)}),s&&c.addEventListener(`resize`,n.update,F4),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,F4)}),s&&c.removeEventListener(`resize`,n.update,F4)}}var L4={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:I4,data:{}},R4={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function z4(e){return e.replace(/left|right|bottom|top/g,function(e){return R4[e]})}var B4={start:`end`,end:`start`};function V4(e){return e.replace(/start|end/g,function(e){return B4[e]})}function H4(e){var t=X2(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function U4(e){return l4(m4(e)).left+H4(e).scrollLeft}function W4(e,t){var n=X2(e),r=m4(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=c4();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+U4(e),y:c}}function G4(e){var t=m4(e),n=H4(e),r=e.ownerDocument?.body,i=i4(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=i4(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+U4(e),s=-n.scrollTop;return f4(r||t).direction===`rtl`&&(o+=i4(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function K4(e){var t=f4(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function q4(e){return[`html`,`body`,`#document`].indexOf(Y2(e))>=0?e.ownerDocument.body:Q2(e)&&K4(e)?e:q4(h4(e))}function J4(e,t){t===void 0&&(t=[]);var n=q4(e),r=n===e.ownerDocument?.body,i=X2(n),a=r?[i].concat(i.visualViewport||[],K4(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(J4(h4(a)))}function Y4(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X4(e,t){var n=l4(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 Z4(e,t,n){return t===`viewport`?Y4(W4(e,n)):Z2(t)?X4(t,n):Y4(G4(m4(e)))}function Q4(e){var t=J4(h4(e)),n=[`absolute`,`fixed`].indexOf(f4(e).position)>=0&&Q2(e)?v4(e):e;return Z2(n)?t.filter(function(e){return Z2(e)&&d4(e,n)&&Y2(e)!==`body`}):[]}function $4(e,t,n,r){var i=t===`clippingParents`?Q4(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Z4(e,n,r);return t.top=i4(i.top,t.top),t.right=a4(i.right,t.right),t.bottom=a4(i.bottom,t.bottom),t.left=i4(i.left,t.left),t},Z4(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 e3(e){var t=e.reference,n=e.element,r=e.placement,i=r?r4(r):null,a=r?k4(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 I2:c={x:o,y:t.y+t.height};break;case L2:c={x:t.x+t.width,y:s};break;case R2:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?y4(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case V2: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 t3(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?H2:s,l=n.rootBoundary,u=l===void 0?U2:l,d=n.elementContext,f=d===void 0?W2:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=C4(typeof g==`number`?w4(g,B2):g),v=f===`popper`?G2:W2,y=e.rects.popper,b=e.elements[m?v:f],x=$4(Z2(b)?b:b.contextElement||m4(e.elements.popper),c,u,o),S=l4(e.elements.reference),C=e3({reference:S,element:y,strategy:`absolute`,placement:i}),w=Y4(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},ee=e.modifiersData.offset;if(f===`popper`&&ee){var D=ee[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]+=D[n]*t})}return E}function n3(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?q2:c,u=k4(r),d=u?s?K2:K2.filter(function(e){return k4(e)===u}):B2,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]=t3(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[r4(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function r3(e){if(r4(e)===`auto`)return[];var t=z4(e);return[V4(e),t,V4(t)]}function i3(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||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=r4(g)===g,v=c||(_||!m?[z4(g)]:r3(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(r4(n)===`auto`?n3(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],ee=r4(E),D=k4(E)===V2,O=[`top`,I2].indexOf(ee)>=0,te=O?`width`:`height`,k=t3(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=O?D?L2:R2:D?I2:`top`;b[te]>x[te]&&(A=z4(A));var j=z4(A),M=[];if(a&&M.push(k[ee]<=0),s&&M.push(k[A]<=0,k[j]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,re=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`},ie=ne;ie>0&&re(ie)!==`break`;ie--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var a3={name:`flip`,enabled:!0,phase:`main`,fn:i3,requiresIfExists:[`offset`],data:{_skip:!1}};function o3(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 s3(e){return[`top`,L2,I2,R2].some(function(t){return e[t]>=0})}function c3(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=t3(t,{elementContext:`reference`}),s=t3(t,{altBoundary:!0}),c=o3(o,r),l=o3(s,i,a),u=s3(c),d=s3(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 l3={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:c3};function u3(e,t,n){var r=r4(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 d3(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=q2.reduce(function(e,n){return e[n]=u3(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 f3={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:d3};function p3(e){var t=e.state,n=e.name;t.modifiersData[n]=e3({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var m3={name:`popperOffsets`,enabled:!0,phase:`read`,fn:p3,data:{}};function h3(e){return e===`x`?`y`:`x`}function g3(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=t3(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=r4(t.placement),v=k4(t.placement),y=!v,b=y4(_),x=h3(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),ee=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(S){if(a){var O=b===`y`?`top`:R2,te=b===`y`?I2:L2,k=b===`y`?`height`:`width`,A=S[b],j=A+g[O],M=A-g[te],ne=p?-w[k]/2:0,re=v===`start`?C[k]:w[k],ie=v===`start`?-w[k]:-C[k],N=t.elements.arrow,ae=p&&N?u4(N):{width:0,height:0},oe=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:S4(),se=oe[O],ce=oe[te],le=b4(0,C[k],ae[k]),ue=y?C[k]/2-ne-le-se-E.mainAxis:re-le-se-E.mainAxis,de=y?-C[k]/2+ne+le+ce+E.mainAxis:ie+le+ce+E.mainAxis,fe=t.elements.arrow&&v4(t.elements.arrow),pe=fe?b===`y`?fe.clientTop||0:fe.clientLeft||0:0,me=ee?.[b]??0,he=A+ue-me-pe,ge=A+de-me,_e=b4(p?a4(j,he):j,A,p?i4(M,ge):M);S[b]=_e,D[b]=_e-A}if(s){var ve=b===`x`?`top`:R2,ye=b===`x`?I2:L2,be=S[x],xe=x===`y`?`height`:`width`,Se=be+g[ve],Ce=be-g[ye],we=[`top`,R2].indexOf(_)!==-1,Te=ee?.[x]??0,Ee=we?Se:be-C[xe]-w[xe]-Te+E.altAxis,De=we?be+C[xe]+w[xe]-Te-E.altAxis:Ce,Oe=p&&we?x4(Ee,be,De):b4(p?Ee:Se,be,p?De:Ce);S[x]=Oe,D[x]=Oe-be}t.modifiersData[r]=D}}var _3={name:`preventOverflow`,enabled:!0,phase:`main`,fn:g3,requiresIfExists:[`offset`]};function v3(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function y3(e){return e===X2(e)||!Q2(e)?H4(e):v3(e)}function b3(e){var t=e.getBoundingClientRect(),n=o4(t.width)/e.offsetWidth||1,r=o4(t.height)/e.offsetHeight||1;return n!==1||r!==1}function x3(e,t,n){n===void 0&&(n=!1);var r=Q2(t),i=Q2(t)&&b3(t),a=m4(t),o=l4(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Y2(t)!==`body`||K4(a))&&(s=y3(t)),Q2(t)?(c=l4(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=U4(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function S3(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 C3(e){var t=S3(e);return J2.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function w3(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function T3(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 E3={placement:`bottom`,modifiers:[],strategy:`absolute`};function D3(){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 O3(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?E3:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},E3,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:Z2(e)?J4(e):e.contextElement?J4(e.contextElement):[],popper:J4(t)};var s=C3(T3([].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(D3(t,n)){i.rects={reference:x3(t,v4(n),i.options.strategy===`fixed`),popper:u4(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:w3(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!D3(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 k3=O3({defaultModifiers:[L4,m3,P4,n4,f3,a3,_3,O4,l3]});function A3(e){return Vr(`MuiPopper`,e)}Hr(`MuiPopper`,[`root`]);function j3(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 M3(e){return typeof e==`function`?e():e}function N3(e){return e.nodeType!==void 0}var P3=e=>{let{classes:t}=e;return y({root:[`root`]},A3,t)},F3={},I3=w.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=w.useRef(null),_=ZN(g,t),v=w.useRef(null),y=ZN(v,u),b=w.useRef(y);ni(()=>{b.current=y},[y]),w.useImperativeHandle(u,()=>v.current,[]);let x=j3(c,i),[S,C]=w.useState(x),[T,E]=w.useState(M3(n));w.useEffect(()=>{v.current&&v.current.forceUpdate()}),w.useEffect(()=>{n&&E(M3(n))},[n]),ni(()=>{if(!T||!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=k3(T,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)}},[T,a,o,s,l,x]);let ee={placement:S};p!==null&&(ee.TransitionProps=p);let D=P3(e),O=f.root??`div`;return(0,P.jsx)(O,{...LU({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(ee):r})}),L3=I(w.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=F3,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=w.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=M3(n);S=e&&N3(e)?BN(e).body:BN(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,T=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,P.jsx)(SI,{disablePortal:o,container:S,children:(0,P.jsx)(I3,{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:T,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),R3=I(w.forwardRef(function(e,t){let n=Oi(),{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}=ko({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,P.jsx)(L3,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})}))({background:`#fff`,padding:`10px`,pointerEvents:`none`,zIndex:99999}),z3=I(zo)({fontSize:50,textAlign:`center`}),B3=({children:e,...t})=>(0,P.jsx)(R3,{id:`mouse-over-popover`,open:!0,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableRestoreFocus:!0,disableAutoFocus:!0,...t,children:(0,P.jsx)(z3,{children:e})}),V3=({letter:e})=>(0,P.jsx)(`div`,{style:{fontSize:`24px`,lineHeight:`24px`},children:e});V3.propTypes={letter:m.string};function H3({editor:e,opts:t,onClose:n}){if(!t?.characters?.length)return null;let r=(0,w.useRef)(null),i=(0,w.useRef)(n),[a,o]=(0,w.useState)({top:0,left:0}),[s,c]=(0,w.useState)(null);i.current=n;let l=(0,w.useMemo)(()=>{if(!t)return b2;switch(!0){case t.language===`spanish`:return b2;case t.language===`special`:return x2;default:return t}},[t]),u=(0,w.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,w.useEffect)(()=>()=>{d()},[]),(0,w.useEffect)(()=>{if(!e)return;let t=e.options.element,n=e.view.dom,a=()=>{if(!r.current)return;let n=t.getBoundingClientRect(),{from:i}=e.state.selection,a=e.view.coordsAtPos(i),s=r.current.offsetHeight,c=r.current.offsetWidth,l=window.innerHeight-(n.bottom+60)>=s||n.top<s+80?n.bottom+60:n.top-s-20,u=a.left;l=Math.max(8,Math.min(l,window.innerHeight-s-8)),u=Math.max(8,Math.min(u,window.innerWidth-c-8)),o({top:l,left:u})};a();let s=null,c=()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,a()}))};window.addEventListener(`scroll`,c,!0),window.addEventListener(`resize`,c);let l=e=>{r.current&&!r.current.contains(e.target)&&!n.contains(e.target)&&i.current()},u=setTimeout(()=>{document.addEventListener(`click`,l)});return()=>{clearTimeout(u),s!==null&&cancelAnimationFrame(s),window.removeEventListener(`scroll`,c,!0),window.removeEventListener(`resize`,c),document.removeEventListener(`click`,l)}},[e]);let f=(e,t)=>c({anchorEl:e.currentTarget,el:t});return(0,P.jsxs)(P.Fragment,{children:[rw.createPortal((0,P.jsx)(`div`,{ref:r,className:`insert-character-dialog`,"data-toolbar-for":e.instanceId,style:{visibility:a.top===0&&a.left===0?`hidden`:`initial`,position:`fixed`,top:`${a.top}px`,left:`${a.left}px`,maxWidth:`500px`,zIndex:1e3},children:(0,P.jsx)(`div`,{children:(0,P.jsx)(p$,{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:hl(e,`name`)||e,write:hl(e,`write`)||e,label:hl(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&&rw.createPortal((0,P.jsxs)(B3,{onClose:d,anchorEl:s.anchorEl,children:[(0,P.jsx)(`div`,{children:s.el.label}),(0,P.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.description}),(0,P.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.unicode})]}),document.body)]})}H3.propTypes={editor:m.object,opts:m.object,onClose:m.func.isRequired};var{translator:U3}=_H,W3=()=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),G3=()=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),K3=()=>(0,P.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`},"aria-hidden":`true`,focusable:`false`,children:(0,P.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 q3({editor:e,classes:t,activePlugins:n,toolbarOpts:r,responseAreaProps:i,onChange:a,autoWidthToolbar:o,hasFocus:s,language:c}){let[l,u]=(0,w.useState)(!1),d=(0,w.useRef)(null),f=r??{},p=gw({editor:e,selector:e=>{let{selection:t}=e.editor?.state||{},n;if(!e.editor?.commandManager)return{};t instanceof H&&(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,toolbarOpened:e.editor?._toolbarOpened??!1,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}}}),m=!!o,h=p.hideDefaultToolbar&&p.currentNode?.type?.name===`drag_in_the_blank`,g=f.alwaysVisible||s&&!p.toolbarOpened&&(!p.hideDefaultToolbar||h);(0,w.useLayoutEffect)(()=>{d.current?.toggleAttribute(`inert`,!g)},[g]);let _=v(t.toolbar,aW,{[t.toolbarWithNoDone]:!0,[t.toolbarTop]:f.position===`top`,[t.toolbarRight]:f.alignment===`right`,[t.focused]:g,[t.autoWidth]:m,[t.fullWidth]:!m,[t.hidden]:f.isHidden===!0}),y=f.minWidth===void 0?{}:{minWidth:f.minWidth},b=e=>{e.preventDefault()},x=e=>U3.t(`editableHtml.buttons.${e}`,{lng:c}),S=(0,w.useMemo)(()=>[{icon:(0,P.jsx)(s2,{}),label:x(`insertTable`),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,P.jsx)(j2,{}),label:x(`addTableRow`),onClick:e=>e.chain().focus().addRowAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(M2,{}),label:x(`removeTableRow`),onClick:e=>e.chain().focus().deleteRow().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(N2,{}),label:x(`addTableColumn`),onClick:e=>e.chain().focus().addColumnAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(P2,{}),label:x(`removeTableColumn`),onClick:e=>e.chain().focus().deleteColumn().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(F2,{}),label:x(`removeTable`),onClick:e=>e.chain().focus().deleteTable().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(_2,{}),label:x(`tableBorders`),toggle:!0,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,P.jsx)(r2,{}),label:x(`bold`),toggle:!0,onClick:e=>e.chain().focus().toggleBold().run(),hidden:()=>!n?.includes(`bold`),isActive:e=>e.isBold,isDisabled:e=>!e.canBold},{icon:(0,P.jsx)(i2,{}),label:x(`italic`),toggle:!0,onClick:e=>e.chain().focus().toggleItalic().run(),hidden:()=>!n?.includes(`italic`),isActive:e=>e.isItalic,isDisabled:e=>!e.canItalic},{icon:(0,P.jsx)(a2,{}),label:x(`strikethrough`),toggle:!0,onClick:e=>e.chain().focus().toggleStrike().run(),hidden:()=>!n?.includes(`strikethrough`),isActive:e=>e.isStrike,isDisabled:e=>!e.canStrike},{icon:(0,P.jsx)(o2,{}),label:x(`code`),toggle:!0,onClick:e=>e.chain().focus().toggleCode().run(),hidden:()=>!n?.includes(`code`),isActive:e=>e.isCode,isDisabled:e=>!e.canCode},{icon:(0,P.jsx)(u2,{}),label:x(`underline`),toggle:!0,onClick:e=>e.chain().focus().toggleUnderline().run(),hidden:()=>!n?.includes(`underline`),isActive:e=>e.isUnderline},{icon:(0,P.jsx)(G3,{}),label:x(`subscript`),toggle:!0,onClick:e=>e.chain().focus().toggleSubscript().run(),hidden:()=>!n?.includes(`subscript`),isActive:e=>e.isSubScript},{icon:(0,P.jsx)(W3,{}),label:x(`superscript`),toggle:!0,onClick:e=>e.chain().focus().toggleSuperscript().run(),hidden:()=>!n?.includes(`superscript`),isActive:e=>e.isSuperScript},{icon:(0,P.jsx)(f2,{}),label:x(`insertImage`),hidden:()=>!n?.includes(`image`),onClick:e=>e.chain().focus().setImageUploadNode().run()},{icon:(0,P.jsx)(h2,{}),label:x(`insertVideo`),hidden:()=>!n?.includes(`video`),onClick:e=>e.chain().focus().insertMedia({type:`video`}).run()},{icon:(0,P.jsx)(g2,{}),label:x(`insertAudio`),hidden:()=>!n?.includes(`audio`),onClick:e=>e.chain().focus().insertMedia({type:`audio`,tag:`audio`}).run()},{icon:(0,P.jsx)(O2,{}),label:x(`cssClasses`),hidden:()=>!n?.includes(`css`),onClick:e=>e.commands.openCSSClassDialog()},{icon:(0,P.jsx)(m2,{}),label:x(`blockquote`),toggle:!0,hidden:()=>!n?.includes(`blockquote`),onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isBlockquote},{icon:(0,P.jsx)(K3,{}),label:x(`heading`),toggle:!0,hidden:()=>!n?.includes(`h3`),onClick:e=>e.chain().focus().toggleHeadingParagraph().run(),isActive:e=>e.isHeadingParagraph},{icon:(0,P.jsx)(d2,{}),label:x(`insertMath`),hidden:()=>!n?.includes(`math`),onClick:e=>e.chain().focus().insertMath(``).run()},{icon:(0,P.jsx)(V3,{letter:`ñ`}),label:x(`spanishCharacters`),hidden:()=>!n?.includes(`languageCharacters`),onClick:()=>u(b2)},{icon:(0,P.jsx)(V3,{letter:`€`}),label:x(`specialCharacters`),hidden:()=>n?.filter(e=>e===`languageCharacters`).length!==2,onClick:()=>u(x2)},{icon:(0,P.jsx)(E2,{editor:e}),label:x(`textAlignment`),hidden:()=>!n?.includes(`text-align`),onClick:()=>{}},{icon:(0,P.jsx)(c2,{}),label:x(`bulletedList`),toggle:!0,hidden:()=>!n?.includes(`bulleted-list`),onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isBulletList},{icon:(0,P.jsx)(l2,{}),label:x(`numberedList`),toggle:!0,hidden:()=>!n?.includes(`numbered-list`),onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isOrderedList},{icon:(0,P.jsx)(RH,{}),label:U3.t(`common:undo`,{lng:c}),hidden:()=>!n?.includes(`undo`),onClick:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.canUndo},{icon:(0,P.jsx)(p2,{}),label:U3.t(`graphing.redo`,{lng:c}),hidden:()=>!n?.includes(`redo`),onClick:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.canRedo}],[n,e,c]);return(0,P.jsxs)(`div`,{ref:d,className:_,style:{...y},onMouseDown:b,children:[h&&(0,P.jsx)(`div`,{className:t.defaultToolbar,role:`toolbar`,tabIndex:-1,"aria-label":U3.t(`editableHtml.responseAreaToolbar`,{lng:c}),children:(0,P.jsx)(`div`,{className:t.buttonsContainer,children:(0,P.jsx)(`button`,{type:`button`,className:t.button,onClick:t=>{t.preventDefault(),e.chain().focus().deleteSelection().run(),a?.(e.getHTML())},"aria-label":`Delete response area`,title:`Delete response area`,children:(0,P.jsx)(yF,{})})})}),!p.hideDefaultToolbar&&(0,P.jsxs)(`div`,{className:t.defaultToolbar,role:`toolbar`,tabIndex:-1,"aria-label":U3.t(`editableHtml.toolbar`,{lng:c}),children:[(0,P.jsx)(`div`,{className:t.buttonsContainer,children:S.filter(e=>!e.hidden?.(p)).map((n,r)=>{let i=n.isDisabled?.(p),a=n.isActive?.(p);return(0,P.jsx)(`button`,{type:`button`,disabled:i,"aria-label":n.label,title:n.label,"aria-pressed":n.toggle?!!a:void 0,onClick:t=>{t.preventDefault(),n.onClick(e)},className:v(t.button,{[t.active]:a}),children:n.icon},r)})}),n?.includes(`responseArea`)&&(0,P.jsx)(`button`,{type:`button`,"aria-label":`Insert response area`,title:`Insert response area`,onClick:()=>{e.chain().focus().insertResponseArea(i.type).run()},className:t.button,children:(0,P.jsx)(y2,{})}),f.showDone&&(0,P.jsx)(dW,{language:c,onClick:()=>{a?.(e.getHTML()),e.commands.blur()}})]}),l&&(0,P.jsx)(H3,{editor:e,opts:{...l,renderPopOver:(e,t)=>console.log(`Show popover`,t),closePopOver:()=>console.log(`Close popover`)},onClose:()=>u(!1)})]})}var J3=e=>{So();let t={defaultToolbar:`defaultToolbar`,buttonsContainer:`buttonsContainer`,button:`toolbarButton`,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,P.jsx)(Y3,{children:(0,P.jsx)(q3,{...e,classes:t})})},Y3=I(`div`)(()=>({height:0,overflow:`visible`,"& .defaultToolbar":{display:`flex`,width:`100%`,justifyContent:`space-between`},"& .buttonsContainer":{alignItems:`center`,display:`flex`,width:`100%`},"& .toolbarButton":{color:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:uL()},"&:focus":{outline:`2px solid ${$L()}`}},"& .active":{color:uL()},"& .disabled":{opacity:.7,cursor:`not-allowed`,"& :hover":{color:dL()}},"& .isActive":{background:`var(--purple)`,color:`var(--white)`},"& .toolbar":{position:`relative`,top:`5px`,zIndex:20,cursor:`pointer`,justifyContent:`space-between`,background:oW,minWidth:`280px`,margin: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":{position:`absolute`,top:`-45px`},"& .toolbarRight":{right:0},"& .fullWidth":{width:`fit-content`,minWidth:`100%`},"& .hidden":{visibility:`hidden`},"& .autoWidth":{width:`fit-content`},"& .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`}})),X3=I(`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:uL(),backgroundColor:ML()},'& table:not([border="1"]) tr':{borderTop:`1px solid ${WL()}`},"& td, th":{padding:`.6em 1em`,textAlign:`center`},'& table:not([border="1"]) td, th':{border:`1px solid ${WL()}`},...n&&{border:`2px solid ${e.palette.error.main} !important`}})),Z3=I(`div`,{shouldForwardProp:e=>![`disableScrollbar`,`highlightShape`].includes(e)})(({theme:e,disableScrollbar:t,highlightShape:n})=>({position:`relative`,padding:`0px`,overflowY:`auto`,color:uL(),backgroundColor:n?e.palette.action.selected:ML(),...t&&{"&::-webkit-scrollbar":{display:`none`},scrollbarWidth:`none`,"-ms-overflow-style":`none`}})),Q3=I(`div`,{shouldForwardProp:e=>e!==`noPadding`})(({noPadding:e})=>({padding:e?0:`10px 8px`}));function $3(e){let[t,n]=(0,w.useState)(null),[r,i]=(0,w.useState)(!1),a=(0,w.useRef)(null),{editor:o,disabled:s,children:c,disableScrollbar:l,activePlugins:u,toolbarOpts:d,responseAreaProps:f,autoFocus:p,minWidth:m,width:h,maxWidth:g,minHeight:_,height:v,maxHeight:y,highlightShape:b,ref:x}=e;(0,w.useEffect)(()=>{o&&a.current&&(o._tiptapContainerEl=a.current)},[o,a.current]),(0,w.useEffect)(()=>{o&&p&&Promise.resolve().then(()=>{o.commands.focus(`end`)})},[o,p]),(0,w.useEffect)(()=>{if(e.adjustWidthForLimit){let t=document.createElement(`p`);t.style.visibility=`hidden`,t.style.position=`absolute`,t.style.whiteSpace=`nowrap`,t.textContent=`W`.repeat(e.charactersLimit);let r=window.getComputedStyle(a.current);[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`letterSpacing`,`wordSpacing`,`textTransform`,`lineHeight`].forEach(e=>{t.style[e]=r[e]}),document.body.appendChild(t),n(`${t.offsetWidth+27}px`),t.remove()}},[e.adjustWidthForLimit,e.charactersLimit]);let S=(0,w.useMemo)(()=>({width:n2(t||h),minWidth:n2(m),maxWidth:n2(g),height:n2(v),minHeight:n2(_),maxHeight:n2(y)}),[t,m,h,g,_,v,y]);return(0,P.jsxs)(X3,{noBorder:d&&d.noBorder,error:d&&d.error,className:e.className,style:{width:S.width,minWidth:S.minWidth,maxWidth:S.maxWidth},ref:a,onFocus:e=>{e.currentTarget.contains(e.target)&&i(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||i(!1)},children:[(0,P.jsx)(Z3,{disableScrollbar:l,highlightShape:b,children:(0,P.jsx)(Q3,{noPadding:d&&d.noPadding,children:c})}),o&&(0,P.jsx)(J3,{editor:o,responseAreaProps:f,toolbarOpts:d,activePlugins:u,onChange:e.onChange,autoWidthToolbar:e.autoWidthToolbar,hasFocus:r,language:e.language})]})}var e6=g(`@pie-lib:editable-html:plugins`),t6=[`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`],n6={"text-align":`textAlign`,"bulleted-list":`ul_list`,"numbered-list":`ol_list`},r6=t6.filter(e=>![`responseArea`,`h3`,`blockquote`].includes(e)),i6=(e,t,n)=>{e6(`[buildPlugins] opts: `,n),e||=r6;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=!gl(n.extraCSSRules),c=n?.languageCharacters||[];return fl([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)])},a6={position:`bottom`,alignment:`left`,alwaysVisible:!1,showDone:!0,doneOn:`blur`},o6={options:{},respAreaToolbar:()=>{},onHandleAreaChange:()=>{}},s6=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`table`,`video`,`audio`,`responseArea`,`superscript`,`subscript`,`css`,`h3`,`undo`,`redo`],c6={bold:`bold`,italic:`italic`,underline:`underline`,strikethrough:`strike`,superscript:`superscript`,subscript:`subscript`,"bulleted-list":`bulletList`,"numbered-list":`orderedList`,table:`table`},l6={"--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),
|
|
394
|
-
0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)`},u6=(e,t,n)=>({role:`textbox`,"data-pie-editor":`true`,class:`mathjax_ignore`,spellcheck:e?`true`:`false`,autocorrect:e?`on`:`off`,autocapitalize:e?`on`:`off`,...t&&{"aria-label":t},...n&&{"aria-labelledby":n}}),d6=[`aria-label`,`aria-labelledby`],f6=e=>{let{showParagraphs:t,separateParagraphs:n}=e.pluginProps||{},[r,i]=(0,w.useState)([]),[a,o]=(0,w.useState)(!1),{toolbarOpts:s}=e,c=(0,w.useCallback)(e=>{i(t=>{let n=t.filter(t=>t.pos!==e);return n.length===0&&o(!1),n})},[i]),l={...a6,...s},u=(0,w.useCallback)(t=>{let n=t.getHTML();e.markup!==n&&e.onChange?.(n),l.doneOn===`blur`&&e.onDone?.(n)},[e.markup,e.onChange,e.onDone,l.doneOn]),d=(0,w.useMemo)(()=>({...o6,...e.responseAreaProps,onInlineDropdownToolbarClose:u}),[e.responseAreaProps,u]),f=(0,w.useMemo)(()=>{let{customPlugins:t,...n}=e.pluginProps||{};t||=[];let r=(e.activePlugins||s6)?.filter(e=>{let t=n6[e]||e,r=n[t]||{};return!r||!r.disabled});return i6(r,t,{math:{},textAlign:e.textAlign,html:{},extraCSSRules:e.extraCSSRules||{},image:{...e.imageSupport},toolbar:{},table:{},responseArea:{type:d.type},languageCharacters:e.languageCharactersProps,keyPadCharacterRef:{},setKeypadInteraction:{},media:{}})},[e,d.type]),p=(0,w.useRef)(null);p.current={plainText:e.pluginProps?.pasteFormatting?.disabled===!0,formatting:f.map(e=>c6[e]).filter(Boolean)};let m=[lA.configure({types:[`heading`,`paragraph`,`div`,`headingParagraph`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`td`,`th`],alignments:[`left`,`right`,`center`,`justify`]}),oA,KA.configure({settings:()=>p.current}),Sk.configure({limit:e.charactersLimit||1e6}),Xk.configure({trailingNode:{node:`paragraph`,notAfter:[`paragraph`,`div`]},link:{autolink:!1,linkOnPaste:!1}}),e2,ON,t2,kN,AN,fA.configure({placeholder:e.placeholder,showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!0}),wN,qM,DN,EN,sZ.configure(d),cZ.configure(d),uZ.configure(d),dZ.configure(d),lZ.configure(d),y$.configure({toolbarOpts:l,math:e.pluginProps?.math||{}}),cA,sA,dA,N1.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=pl(()=>{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}),I0.configure({uploadSoundSupport:e.uploadSoundSupport}),$0.configure({extraCSSRules:e.extraCSSRules})],h=e.spellCheck!==!1,{ariaLabel:g,ariaLabelledBy:_}=e,v=bw({extensions:m,immediatelyRender:!1,editorProps:{attributes:u6(h,g,_),handleKeyDown(t,n){return e.onKeyDown?e.onKeyDown(n):!1}},editable:!e.disabled,content:YA(e.markup),onUpdate:({editor:t,transaction:n})=>{n.isDone&&e.onChange?.(t.getHTML())},onBlur:({editor:e})=>{e._insertingImage||e._toolbarOpened||e.isActive(`inline_dropdown`)||e.isActive(`explicit_constructed_response`)||!e.schema||u(e)}},[e.charactersLimit]);(0,w.useEffect)(()=>{e.editorRef&&e.editorRef(v)},[e.editorRef,v]),(0,w.useEffect)(()=>{v?.setEditable(!e.disabled)},[e.disabled,v]),(0,w.useEffect)(()=>{if(!v)return;let e=v.options?.editorProps,t=e?.attributes||{},n=u6(h,g,_);if([`spellcheck`,...d6].every(e=>t[e]===n[e]))return;let r=Object.fromEntries(Object.entries(t).filter(([e])=>!d6.includes(e)));v.setOptions({editorProps:{...e,attributes:{...r,...n}}})},[h,g,_,v]),(0,w.useEffect)(()=>{if(!v)return;let t=YA(e.markup);t!==v.getHTML()&&v.commands.setContent(t,{emitUpdate:!1})},[e.markup,v]),(0,w.useEffect)(()=>{Object.entries(l6).forEach(([e,t])=>{document.documentElement.style.setProperty(e,t)})},[]);let y=gw({editor:v,selector:e=>({isFocused:e.editor?.isFocused})}),b=(0,w.useMemo)(()=>{let{minWidth:t,width:n,maxWidth:r,minHeight:i,height:a,maxHeight:o}=e;return{width:n2(n),minWidth:n2(t),maxWidth:n2(r),height:n2(a),minHeight:n2(i),maxHeight:n2(o)}},[e]);return(0,P.jsx)($3,{...e,activePlugins:f,toolbarOpts:l,editorState:y,editor:v,children:v&&(0,P.jsx)(p6,{style:{minHeight:b.minHeight,height:b.height,maxHeight:b.maxHeight},showParagraph:t&&!t.disabled,separateParagraph:n&&!n.disabled,editor:v})})},p6=I(pw,{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[data-placeholder].is-empty:only-child, & div[data-placeholder].is-empty:only-child":{position:`relative`},"& p[data-placeholder].is-empty:only-child::before, & div[data-placeholder].is-empty:only-child::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`}}}})),m6=f6,h6=(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=h6(e,t,r),e=e.nextSibling;return r},g6=(e,t,n)=>{let r=h6(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},_6=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]},v6=e=>{let t=document.createElement(`SPAN`);return e.surroundContents(t),t},y6=e=>{if(e.startContainer===e.endContainer)return[v6(e)];let[t]=_6(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);let r=v6(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);let a=v6(i);return[r,...t.map(e=>{let t=document.createElement(`SPAN`);return e.parentNode.insertBefore(t,e),t.appendChild(e),t}),a]},b6=(e,t)=>{let n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);let[,r]=_6(n),[,i]=_6(e),a=r.length;return{quote:i,start:a,end:a+i.length}},x6=(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()},S6=()=>{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()},C6=e=>e.length>=20||e.search(/\n|\r|\r\n/)!==-1,w6=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),T6=e=>document.querySelector(`[data-ann-id='${e}']`),E6=I(iL)(({annotationType:e})=>({"& .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:zL()},...e===`negative`&&{"&::before":{borderRightColor:`rgb(255, 204, 238) !important`}},...e===`positive`&&{"&::before":{borderRightColor:`rgb(153, 255, 153) !important`}}}})),D6=I(`div`)(({theme:e,annotationType:t})=>({width:`200px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:cL(`pie`)(`background`,G.WHITE),color:cL(`pie`)(`text`,e.palette.text.primary),border:`4px solid ${zL()}`,"& .MuiInputBase-root":{color:`inherit`},...(t===`negative`||t===`positive`)&&{position:`relative`,boxShadow:`0 0 0 1px #757575`,"&::after":{content:`""`,position:`absolute`,inset:0,border:`1px solid #757575`,pointerEvents:`none`}},...t===`negative`&&{borderColor:`rgb(255, 204, 238) !important`},...t===`positive`&&{borderColor:`rgb(153, 255, 153) !important`}})),O6=I(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${zL()}`})),k6=I(`div`)(({theme:e,variant:t,annotationType:n})=>({flexGrow:1,width:`28%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,"&:not(:nth-child(3n))":{borderRight:`1px solid ${zL()}`},"&:hover":{backgroundColor:NL()},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}},...t===`typeChange`&&n===`negative`&&{"&:hover":{backgroundColor:`rgb(153, 255, 153) !important`,color:e.palette.text.primary}},...t===`typeChange`&&n===`positive`&&{"&:hover":{backgroundColor:`rgb(255, 204, 238) !important`,color:e.palette.text.primary}}})),A6=class extends w.Component{static propTypes={anchorEl:m.object,open:m.bool,offset:m.number,value:m.string,type:m.string,onClose:m.func,onDelete:m.func,onSave:m.func,onTypeChange:m.func};constructor(e){super(e),this.state={value:e.value},this.editorId=vH(`annotation-editor`)}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,P.jsx)(E6,{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,P.jsxs)(D6,{annotationType:i,children:[(0,P.jsx)(r1,{id:this.editorId,style:{padding:`2px 5px`,width:`95%`},autoFocus:!0,multiline:!0,rows:1,maxRows:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),(0,P.jsxs)(O6,{children:[(0,P.jsx)(k6,{onClick:n,children:`Delete`}),(0,P.jsx)(k6,{variant:`typeChange`,annotationType:i,onClick:this.handleTypeChange,children:i===`negative`?`Green`:`Pink`}),(0,P.jsx)(k6,{onClick:this.handleSave,children:`Save`})]})]})})}},j6=I(iL)({"& .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:VL()}}}),M6=I(`div`)(({theme:e})=>({width:`300px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:cL(`pie`)(`background`,G.WHITE),color:cL(`pie`)(`text`,e.palette.text.primary),border:`2px solid ${VL()}`})),N6=I(`div`)({display:`flex`,flexWrap:`wrap`}),P6=I(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${zL()}`})),F6=I(`div`)(({theme:e,variant:t})=>({width:`22%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,borderBottom:`1px solid ${zL()}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${zL()}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:NL()},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}}})),I6=class extends w.Component{static propTypes={anchorEl:m.object,open:m.bool,annotations:m.array,isNewAnnotation:m.bool,onClose:m.func,onDelete:m.func,onEdit:m.func,onWrite:m.func,onAnnotate:m.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,P.jsx)(j6,{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,P.jsxs)(M6,{children:[(0,P.jsx)(N6,{children:t.map((e,t)=>(0,P.jsx)(F6,{variant:e.type,onClick:()=>r(e),children:e.label},`annotation-${t}`))}),(0,P.jsxs)(P6,{children:[(0,P.jsx)(F6,{onClick:i,children:`Cancel`}),(0,P.jsx)(F6,{style:{pointerEvents:`none`}}),n?(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(F6,{variant:`positive`,onClick:()=>s(`positive`),children:`Write`}),(0,P.jsx)(F6,{variant:`negative`,onClick:()=>s(`negative`),children:`Write`})]}):(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(F6,{onClick:o,children:`Delete`}),(0,P.jsx)(F6,{onClick:a,children:`Edit`})]})]})]})})}};function L6(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function R6(e,t){return!e||L6(e)?e:L6(e.default)?e.default:t&&L6(e[t])?e[t]:t&&L6(e[t]?.default)?e[t].default:e}var z6=R6(vU,`InputContainer`)||R6(H6.InputContainer,`InputContainer`),B6=iW,V6=B6.default,H6=V6&&typeof V6==`object`?V6:B6,{translator:U6}=_H,W6=I(`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`}}),G6=I(`div`)({width:`230px`}),K6=I(`div`)({position:`relative`,overflowX:`hidden`,display:`flex`}),q6=I(z6)(({theme:e})=>({paddingTop:e.spacing(2),marginBottom:e.spacing(2),marginTop:e.spacing(2),width:`100%`})),J6=`
|
|
393
|
+
`,f0=typeof d0==`string`?null:nr`
|
|
394
|
+
animation: ${d0} 3s infinite linear;
|
|
395
|
+
`,p0=e=>{let{classes:t,variant:n,color:r}=e;return y({root:[`root`,`color${L(r)}`,n],dashed:[`dashed`,`dashedColor${L(r)}`],bar1:[`bar`,`bar1`,`barColor${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${L(r)}`,n===`buffer`&&`color${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},a0,t)},m0=(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),h0=I(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${L(n.color)}`],t[n.variant]]}})(Oo(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Mo()).map(([t])=>({props:{color:t},style:{backgroundColor:m0(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)`}}]}))),g0=I(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${L(n.color)}`]]}})(Oo(({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(Mo()).map(([t])=>{let n=m0(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),f0||{animation:`${d0} 3s infinite linear`}),_0=I(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(Oo(({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(Mo()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${o0}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${o0}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:c0||{animation:`${s0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),v0=I(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(Oo(({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(Mo()).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(Mo()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:m0(e,t),transition:`transform .${o0}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:u0||{animation:`${l0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),y0=w.forwardRef(function(e,t){let n=ko({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=p0(l),d=Oi(),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,P.jsxs)(h0,{className:v(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,P.jsx)(g0,{className:u.dashed,ownerState:l}):null,(0,P.jsx)(_0,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,P.jsx)(v0,{className:u.bar2,ownerState:l,style:p.bar2})]})}),b0=(e,t)=>{if(!e||!t)return null;let n=null;return e.state.doc.descendants((e,r)=>{if(n!==null)return!1;if(e.type.name===`imageUploadNode`&&e.attrs.nodeKey===t)return n=[e,r],!1}),n},x0=()=>`img-${Date.now()}-${Math.random().toString(36).slice(2)}`,S0=g(`@pie-lib:editable-html:image:insert-image-handler`),C0=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,this.nodeKey=this.node?.attrs?.nodeKey||null}resolveNodePos(){let e=b0(this.editor,this.nodeKey);return e?e[1]:this.nodeKey?null:this.nodePos}cancel(){S0(`insert cancelled`);try{this.deleteNode(),this.onFinish(!1)}catch{}finally{this.editor._insertingImage=!1}}updateNode(e){let t=this.resolveNodePos();if(t===null){S0(`[updateNode] node is gone, dropping update: `,e);return}let{state:n,view:r}=this.editor,{tr:i}=n,a=n.doc.nodeAt(t);if(a){let n=i.setNodeMarkup(t,void 0,{...a.attrs,...e});r.dispatch(n)}}deleteNode(){let e=this.resolveNodePos();if(e===null)return;let{state:t,view:n}=this.editor,{tr:r}=t,i=t.doc.nodeAt(e)||this.node,a=r.delete(e,e+i.nodeSize);n.dispatch(a)}done(e,t){S0(`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,S0(`[fileChosen] file: `,e);let t=new FileReader;t.onload=()=>{let e=t.result;this.updateNode({src:e})},t.readAsDataURL(e)}progress(e,t,n){S0(`progress: `,e,t,n),this.updateNode({percent:e})}getChosenFile(){return this.chosenFile}};function w0(e){return Vr(`MuiDialogContent`,e)}Hr(`MuiDialogContent`,[`root`,`dividers`]);function T0(e){return Vr(`MuiDialogTitle`,e)}var E0=Hr(`MuiDialogTitle`,[`root`]),D0=e=>{let{classes:t,dividers:n}=e;return y({root:[`root`,n&&`dividers`]},w0,t)},O0=I(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Oo(({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:{[`.${E0.root} + &`]:{paddingTop:0}}}]}))),k0=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=D0(o);return(0,P.jsx)(O0,{className:v(s.root,r),ownerState:o,ref:t,...a})}),A0=IN((0,P.jsx)(`path`,{d:`M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z`}),`ArrowBackIos`);function j0(e){return Vr(`MuiFormHelperText`,e)}var M0=Hr(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),N0,P0=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return y({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${L(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},j0,t)},F0=I(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${L(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Oo(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${M0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${M0.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}}]}))),I0=w.forwardRef(function(e,t){let n=ko({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=PW({props:n,muiFormControl:IW(),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};delete h.ownerState;let g=P0(h);return(0,P.jsx)(F0,{as:a,className:v(g.root,i),ref:t,...p,ownerState:h,children:r===` `?N0||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})});function L0(e){return Vr(`MuiTextField`,e)}Hr(`MuiTextField`,[`root`]);var R0={standard:K$,filled:Q$,outlined:l1},z0=e=>{let{classes:t}=e;return y({root:[`root`]},L0,t)},B0=I($W,{name:`MuiTextField`,slot:`Root`})({}),V0=w.forwardRef(function(e,t){let n=ko({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:y,label:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onFocus:ee,placeholder:D,required:O=!1,rows:te,select:k=!1,SelectProps:A,slots:j={},slotProps:M={},type:ne,value:re,variant:ie=`outlined`,...ae}=n,oe={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:C,required:O,select:k,variant:ie},se=z0(oe),ce=Ii(m),le=p&&ce?`${ce}-helper-text`:void 0,ue=b&&ce?`${ce}-label`:void 0,de=R0[ie],fe={slots:j,slotProps:{input:_,inputLabel:h,htmlInput:g,formHelperText:d,select:A,...M}},pe={},me=fe.slotProps.inputLabel;ie===`outlined`&&(me&&me.shrink!==void 0&&(pe.notched=me.shrink),pe.label=b),k&&((!A||!A.native)&&(pe.id=void 0),pe[`aria-describedby`]=void 0);let[he,ge]=OI(`root`,{elementType:B0,shouldForwardComponentProp:!0,externalForwardedProps:{...fe,...ae},ownerState:oe,className:v(se.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:ie}}),[_e,ve]=OI(`input`,{elementType:de,externalForwardedProps:fe,additionalProps:pe,ownerState:oe}),[N,ye]=OI(`inputLabel`,{elementType:KW,externalForwardedProps:fe,ownerState:oe}),[be,xe]=OI(`htmlInput`,{elementType:`input`,externalForwardedProps:fe,ownerState:oe}),[Se,Ce]=OI(`formHelperText`,{elementType:I0,externalForwardedProps:fe,ownerState:oe}),[we,Te]=OI(`select`,{elementType:h1,externalForwardedProps:fe,ownerState:oe}),Ee=(0,P.jsx)(_e,{"aria-describedby":le,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:C,name:w,rows:te,maxRows:x,minRows:S,type:ne,value:re,id:ce,inputRef:y,onBlur:T,onChange:E,onFocus:ee,placeholder:D,inputProps:xe,slots:{input:j.htmlInput?be:void 0},...ve});return(0,P.jsxs)(he,{...ge,children:[b!=null&&b!==``&&(0,P.jsx)(N,{htmlFor:ce,id:ue,...ye,children:b}),k?(0,P.jsx)(we,{"aria-describedby":le,id:ce,labelId:ue,value:re,input:Ee,...Te,children:a}):Ee,p&&(0,P.jsx)(Se,{id:le,...Ce,children:p})]})});function H0(e){return Vr(`MuiDialogActions`,e)}Hr(`MuiDialogActions`,[`root`,`spacing`]);var U0=e=>{let{classes:t,disableSpacing:n}=e;return y({root:[`root`,!n&&`spacing`]},H0,t)},W0=I(`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}}}]}),G0=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=U0(o);return(0,P.jsx)(W0,{className:v(s.root,r),ownerState:o,ref:t,...a})});function K0(e){return Vr(`MuiDialog`,e)}var q0=Hr(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),J0=w.createContext({}),Y0=I(FI,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),X0=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return y({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${L(n)}`],paper:[`paper`,`paperScroll${L(n)}`,`paperWidth${L(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},K0,t)},Z0=I(GI,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),Q0=I(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${L(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`}}}]}),$0=I(YI,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${L(n.scroll)}`],t[`paperWidth${L(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Oo(({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)`,[`&.${q0.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}`,[`&.${q0.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,[`&.${q0.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),e2=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialog`}),r=So(),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:y,PaperComponent:b=YI,PaperProps:x={},role:S=`dialog`,scroll:C=`paper`,slots:T={},slotProps:E={},TransitionComponent:ee=jI,transitionDuration:D=i,TransitionProps:O,...te}=n,k={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:C},A=X0(k),j=w.useRef(),M=e=>{j.current=e.target===e.currentTarget},ne=e=>{g&&g(e),j.current&&(j.current=null,_&&_(e,`backdropClick`))},re=Ii(o),ie=w.useMemo(()=>({titleId:re}),[re]),ae={slots:{transition:ee,...T},slotProps:{transition:O,paper:x,backdrop:l,...E}},[oe,se]=OI(`root`,{elementType:Z0,shouldForwardComponentProp:!0,externalForwardedProps:ae,ownerState:k,className:v(A.root,d),ref:t}),[ce,le]=OI(`backdrop`,{elementType:Y0,shouldForwardComponentProp:!0,externalForwardedProps:ae,ownerState:k,className:A.backdrop}),[ue,de]=OI(`paper`,{elementType:$0,shouldForwardComponentProp:!0,externalForwardedProps:ae,ownerState:k,className:A.paper,additionalProps:{elevation:24,role:S,"aria-describedby":a,"aria-labelledby":re,"aria-modal":s,tabIndex:-1,[fI]:``}}),[fe,pe]=OI(`container`,{elementType:Q0,externalForwardedProps:ae,ownerState:k,className:A.container}),[me,he]=OI(`transition`,{elementType:jI,externalForwardedProps:ae,ownerState:k,additionalProps:{appear:!0,in:y,timeout:D,role:`presentation`}});return(0,P.jsx)(oe,{closeAfterTransition:!0,slots:{backdrop:ce},slotProps:{backdrop:{transitionDuration:D,as:c,...le}},disableEscapeKeyDown:f,onClose:_,open:y,onClick:ne,...se,...te,children:(0,P.jsx)(me,{...he,children:(0,P.jsx)(fe,{onMouseDown:M,...pe,children:(0,P.jsx)(ue,{as:b,...de,children:(0,P.jsx)(J0.Provider,{value:ie,children:u})})})})})}),t2=class extends w.Component{static propTypes={onDone:m.func.isRequired,alt:m.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,P.jsxs)(e2,{open:!0,disablePortal:!0,onClose:this.closeDialog,id:`text-dialog`,hideBackdrop:!0,disableScrollLock:!0,onEntered:this.handleOverflow,children:[(0,P.jsx)(k0,{children:(0,P.jsxs)(`div`,{style:{display:`flex`},children:[(0,P.jsx)(A0,{style:{paddingTop:`6px`}}),(0,P.jsx)(V0,{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,P.jsx)(G0,{children:(0,P.jsx)(bW,{onClick:this.onDone,children:`Done`})})]})}},n2=I(`button`,{shouldForwardProp:e=>![`active`,`disabled`,`extraStyles`].includes(e)})(({active:e,disabled:t})=>({color:e?JR():YR(),display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:t?`not-allowed`:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:t?YR():JR()},"&:focus":{outline:`2px solid ${Lz()}`},...t&&{opacity:.7}})),r2=g(`pie-elements:editable-html:raw-button`);(class extends w.Component{static propTypes={onClick:m.func.isRequired,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,active:m.bool,disabled:m.bool,extraStyles:m.object};constructor(e){super(e)}onClick=e=>{r2(`[onClick]`),e.preventDefault();let{onClick:t}=this.props;t(e)};onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){r2(`[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,P.jsx)(n2,{style:r,active:e,disabled:n,onMouseDown:this.onClick,onKeyDown:this.onKeyDown,"aria-label":i,"aria-pressed":e,tabIndex:0,children:t})}});var i2=class extends w.Component{static propTypes={onToggle:m.func.isRequired,mark:m.string,label:m.string.isRequired,children:m.oneOfType([m.arrayOf(m.node),m.node]).isRequired,active:m.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,P.jsx)(n2,{active:t,onMouseDown:this.onToggle,"aria-pressed":t,onKeyDown:this.onKeyDown,"aria-label":n,tabIndex:0,children:e})}},a2=g(`@pie-lib:editable-html:plugins:image:image-toolbar`),o2=I(`div`)(({theme:e})=>({paddingLeft:e.spacing.unit,display:`flex`,alignItems:`center`})),s2=I(`span`,{shouldForwardProp:e=>![`disabled`,`hasAlignmentButtons`].includes(e)})(({disabled:e,hasAlignmentButtons:t})=>({...e&&{opacity:.5},...t&&{borderLeft:`1px solid grey`,paddingLeft:8,marginLeft:4}})),c2=({alignment:e,active:t,onClick:n})=>(0,P.jsx)(i2,{active:t,onToggle:()=>n(e),label:e,children:e});c2.propTypes={alignment:m.string.isRequired,active:m.bool.isRequired,onClick:m.func.isRequired};var l2=class extends w.Component{static propTypes={onChange:m.func.isRequired,alignment:m.string,alt:m.string,imageLoaded:m.bool,disableImageAlignmentButtons:m.bool};onAltTextDone=e=>{a2(`[onAltTextDone]: alt:`,e),this.props.onChange({alt:e},!0)};onAlignmentClick=e=>{a2(`[onAlignmentClick]: alignment:`,e),this.props.onChange({alignment:e})};renderDialog=()=>{let{alt:e}=this.props,t=document.createElement(`div`),n=(0,P.jsx)(t2,{alt:e,onDone:this.onAltTextDone});rw.render(n,t),document.body.appendChild(t)};render(){let{alignment:e,imageLoaded:t,disableImageAlignmentButtons:n}=this.props;return(0,P.jsxs)(o2,{children:[!n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(c2,{alignment:`left`,active:e===`left`,onClick:this.onAlignmentClick}),(0,P.jsx)(c2,{alignment:`center`,active:e===`center`,onClick:this.onAlignmentClick}),(0,P.jsx)(c2,{alignment:`right`,active:e===`right`,onClick:this.onAlignmentClick})]}),(0,P.jsx)(s2,{disabled:!t,hasAlignmentButtons:!n,onMouseDown:e=>t&&this.renderDialog(e),children:`Alt text`})]})}};g(`@pie-lib:editable-html:plugins:image:component`);var u2=I(y0,{shouldForwardProp:e=>e!==`hideProgress`})(({hideProgress:e})=>({position:`absolute`,left:`0`,width:`fit-content`,top:`0%`,transition:`opacity 200ms linear`,...e&&{opacity:0}})),d2=I(`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}})),f2=I(`div`)(({theme:e})=>({position:`relative`,width:`fit-content`,display:`flex`,alignItems:`center`,"&&:hover > .resize":{display:`block`}})),p2=I(`img`,{shouldForwardProp:e=>e!==`active`})(({theme:e,active:t})=>({border:t?`solid 1px ${e.palette.primary.main}`:`solid 1px transparent`})),m2=I(`div`)(({theme:e})=>({backgroundColor:e.palette.primary.main,cursor:`col-resize`,height:`35px`,width:`5px`,borderRadius:8,marginLeft:`5px`,marginRight:`10px`,display:`none`})),h2=e=>e?`${e}px`:`calc(20px)`;function g2(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,w.useMemo)(()=>f+t.nodeSize===p,[f,p,t.nodeSize]),[h,g]=(0,w.useState)(!1),_=(0,w.useRef)(t),v=(0,w.useRef)(null),y=(0,w.useRef)(null),b=(0,w.useRef)(null),x=(0,w.useCallback)(e=>{let t=e/v.current.naturalWidth*4;return parseInt(t.toFixed(0)*25,10)},[]),S=(0,w.useCallback)(()=>{let e=b0(n,_.current.attrs.nodeKey);return e?e[1]:null},[n]),C=(0,w.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,w.useCallback)(()=>{if(!t.attrs.width||!v.current||!v.current.naturalWidth)return;let e=x(t.attrs.width);t.attrs.resizePercent!==e&&C({resizePercent:e})},[t.attrs.width,t.attrs.resizePercent,x,C]);(0,w.useEffect)(()=>{_.current={...t,pos:d}},[t,d]),(0,w.useEffect)(()=>{o?m&&n.isEditable&&(!String(t.attrs?.src??``).trim()&&s.imageHandling?.insertImageRequested&&s.imageHandling.insertImageRequested(n,[t,d],e=>new C0(n,[t,d],e)),g(o)):g(o)},[m,o,n.isEditable]),(0,w.useEffect)(()=>{T();let e=y?.current;return e&&n.isEditable&&e.addEventListener(`mousedown`,k,!1),()=>{e&&e.removeEventListener(`mousedown`,k,!1)}},[]),(0,w.useEffect)(()=>{T()});let E=(0,w.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};_l(i,{width:t.attrs.width,height:t.attrs.height})||C(i)}},[t.attrs.width,t.attrs.height,c,l,C]),ee=(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},D=(0,w.useCallback)(e=>{let t=v.current;if(!t)return;let n=e.target.getBoundingClientRect(),r={width:t.naturalWidth,height:t.naturalHeight},i=ee(r,{width:e.clientX-n.left,height:e.clientY-n.top});i.width>50&&i.height>50&&i.width<=700&&i.height<=900&&(t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,C({width:i.width,height:i.height}))},[n,C]),O=(0,w.useCallback)(e=>{C(e)},[n,C]),te=(0,w.useCallback)(()=>{window.removeEventListener(`mousemove`,D),window.removeEventListener(`mouseup`,te)},[D]),k=(0,w.useCallback)(()=>{window.addEventListener(`mousemove`,D),window.addEventListener(`mouseup`,te)},[D,te]),A={width:h2(t.attrs.width),height:h2(t.attrs.height),objectFit:`contain`},j={left:`flex-start`,center:`center`,right:`flex-end`}[t.attrs.alignment]||`flex-start`;return(0,P.jsxs)(ww,{children:[(0,P.jsxs)(d2,{onFocus:i,loading:!t.attrs.loaded,pendingDelete:t.attrs.deleteStatus===`pending`,style:{justifyContent:j},children:[(0,P.jsx)(u2,{mode:`determinate`,value:t.attrs.percent||0,hideProgress:t.attrs.loaded}),(0,P.jsxs)(f2,{onDragStart:e=>e.preventDefault(),children:[(0,P.jsx)(p2,{...r,active:o&&t.attrs.loaded,draggable:!1,ref:v,src:t.attrs.src,style:A,onLoad:E,alt:t.attrs.alt}),(0,P.jsx)(m2,{ref:y,className:`resize`,style:{display:n.isEditable?void 0:`none`}})]})]}),h&&n._tiptapContainerEl&&rw.createPortal((0,P.jsx)(`div`,{ref:b,style:{zIndex:20,background:WG,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,P.jsx)($G,{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,P.jsx)(l2,{disableImageAlignmentButtons:s.imageHandling?.disableImageAlignmentButtons,alt:t.attrs.alt,imageLoaded:t.attrs.loaded,alignment:t.attrs.alignment||`left`,onChange:O})})}),n._tiptapContainerEl)]})}g2.propTypes={node:m.object.isRequired,editor:m.object.isRequired,attributes:m.object,onFocus:m.func,maxImageWidth:m.number,maxImageHeight:m.number};var _2=tC.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`,Sb(e,{"data-type":`image-upload-node`})]},addNodeView(){return Rw(e=>(0,P.jsx)(g2,{...e,options:this.options}))},addCommands(){return{setImageUploadNode:()=>({commands:e})=>e.insertContent({type:this.name,attrs:{nodeKey:x0()}})}},addProseMirrorPlugins(){let e=this.editor,t=this.options;return[new kf({props:{handlePaste(n,r){let i=Array.from(r.clipboardData?.items||[]).find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();if(!a)return!1;let o=t?.imageHandling?.insertImageRequested,s=x0(),c=new FileReader;return c.onload=()=>{let t=c.result;if(typeof t!=`string`||(e.commands.insertContent({type:`imageUploadNode`,attrs:{src:t,loaded:!o,nodeKey:s}}),!o))return;let n=b0(e,s);n&&o(e,n,t=>{let r;return r=new C0(e,n,e=>{e||r?.updateNode({loaded:!0}),t(e)},!0),r.fileChosen(a),r})},c.readAsDataURL(a),!0}}})]}});function v2(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function y2(e,t,n,r={},i=()=>{}){let{ease:a=v2,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 b2={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function x2(e){let{onChange:t,...n}=e,r=w.useRef(),i=w.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return GN(()=>{let e=RN(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=UN(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),w.useEffect(()=>{a(),t(r.current)},[t]),(0,P.jsx)(`div`,{style:b2,...n,ref:i})}var S2=IN((0,P.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),C2=IN((0,P.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function w2(e){return Vr(`MuiTabScrollButton`,e)}var T2=Hr(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),E2=e=>{let{classes:t,orientation:n,disabled:r}=e;return y({root:[`root`,n,r&&`disabled`]},w2,t)},D2=I($P,{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,[`&.${T2.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),O2=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Oi(),d={isRtl:u,...n},f=E2(d),p=i.StartScrollButtonIcon??S2,m=i.EndScrollButtonIcon??C2,h=xG({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=xG({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,P.jsx)(D2,{component:`div`,className:v(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,P.jsx)(p,{...h}):(0,P.jsx)(m,{...g})})});function k2(e){return Vr(`MuiTabs`,e)}var A2=Hr(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),j2=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,M2=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,N2=(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}}},P2=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return y({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`]},k2,c)},F2=I(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${A2.scrollButtons}`]:t.scrollButtons},{[`& .${A2.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Oo(({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:{[`& .${A2.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),I2=I(`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`}}]}),L2=I(`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`}}]}),R2=I(`span`,{name:`MuiTabs`,slot:`Indicator`})(Oo(({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}}]}))),z2=I(x2)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),B2={},V2=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiTabs`}),r=So(),i=Oi(),{"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:y,slots:b={},slotProps:x={},TabIndicatorProps:S={},TabScrollButtonProps:C={},textColor:T=`primary`,value:E,variant:ee=`standard`,visibleScrollbar:D=!1,...O}=n,te=ee===`scrollable`,k=h===`vertical`,A=k?`scrollTop`:`scrollLeft`,j=k?`top`:`left`,M=k?`bottom`:`right`,ne=k?`clientHeight`:`clientWidth`,re=k?`height`:`width`,ie={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:k,scrollButtons:_,textColor:T,variant:ee,visibleScrollbar:D,fixed:!te,hideScrollbar:te&&!D,scrollableX:te&&!k,scrollableY:te&&k,centered:c&&!te,scrollButtonsHideMobile:!f},ae=P2(ie),oe=xG({elementType:b.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:ie}),se=xG({elementType:b.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:ie}),[ce,le]=w.useState(!1),[ue,de]=w.useState(B2),[fe,pe]=w.useState(!1),[me,he]=w.useState(!1),[ge,_e]=w.useState(!1),[ve,N]=w.useState({overflow:`hidden`,scrollbarWidth:0}),ye=new Map,be=w.useRef(null),xe=w.useRef(null),Se={slots:b,slotProps:{indicator:S,scrollButtons:C,...x}},Ce=()=>{let e=be.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&&E!==!1){let e=xe.current.children;if(e.length>0){let t=e[ye.get(E)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},we=XN(()=>{let{tabsMeta:e,tabMeta:t}=Ce(),n=0,r;k?(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,[re]:t?t[re]:0};if(typeof ue[r]!=`number`||typeof ue[re]!=`number`)de(a);else{let e=Math.abs(ue[r]-a[r]),t=Math.abs(ue[re]-a[re]);(e>=1||t>=1)&&de(a)}}),Te=(e,{animation:t=!0}={})=>{t?y2(A,be.current,e,{duration:r.transitions.duration.standard}):be.current[A]=e},Ee=e=>{let t=be.current[A];k?t+=e:t+=e*(i?-1:1),Te(t)},De=()=>{let e=be.current[ne],t=0,n=Array.from(xe.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[ne]>e){r===0&&(t=e);break}t+=i[ne]}return t},Oe=()=>{Ee(-1*De())},ke=()=>{Ee(De())},[Ae,{onChange:je,...Me}]=OI(`scrollbar`,{className:v(ae.scrollableX,ae.hideScrollbar),elementType:z2,shouldForwardComponentProp:!0,externalForwardedProps:Se,ownerState:ie}),Ne=w.useCallback(e=>{je?.(e),N({overflow:null,scrollbarWidth:e})},[je]),[Pe,Fe]=OI(`scrollButtons`,{className:v(ae.scrollButtons,C.className),elementType:O2,externalForwardedProps:Se,ownerState:ie,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:b.startScrollButtonIcon||b.StartScrollButtonIcon,EndScrollButtonIcon:b.endScrollButtonIcon||b.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:oe,endScrollButtonIcon:se}}}),Ie=()=>{let e={};e.scrollbarSizeListener=te?(0,P.jsx)(Ae,{...Me,onChange:Ne}):null;let t=te&&(_===`auto`&&(fe||me)||_===!0);return e.scrollButtonStart=t?(0,P.jsx)(Pe,{direction:i?`right`:`left`,onClick:Oe,disabled:!fe,...Fe}):null,e.scrollButtonEnd=t?(0,P.jsx)(Pe,{direction:i?`left`:`right`,onClick:ke,disabled:!me,...Fe}):null,e},Le=XN(e=>{let{tabsMeta:t,tabMeta:n}=Ce();if(!(!n||!t)){if(n[j]<t[j]){let r=t[A]+(n[j]-t[j]);Te(r,{animation:e})}else if(n[M]>t[M]){let r=t[A]+(n[M]-t[M]);Te(r,{animation:e})}}}),Re=XN(()=>{te&&_!==!1&&_e(!ge)});w.useEffect(()=>{let e=RN(()=>{be.current&&we()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Re()},r=UN(be.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(xe.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(xe.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[we,Re]),w.useEffect(()=>{let e=Array.from(xe.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&te&&_!==!1){let n=e[0],r=e[t-1],i={root:be.current,threshold:.99},a=new IntersectionObserver(e=>{pe(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{he(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[te,_,ge,l?.length]),w.useEffect(()=>{le(!0)},[]),w.useEffect(()=>{we()}),w.useEffect(()=>{Le(B2!==ue)},[Le,ue]),w.useImperativeHandle(s,()=>({updateIndicator:we,updateScrollButtons:Re}),[we,Re]);let[ze,Be]=OI(`indicator`,{className:v(ae.indicator,S.className),elementType:R2,externalForwardedProps:Se,ownerState:ie,additionalProps:{style:ue}}),Ve=(0,P.jsx)(ze,{...Be}),He=0,Ue=w.Children.map(l,e=>{if(!w.isValidElement(e))return null;let t=e.props.value===void 0?He:e.props.value;ye.set(t,He);let n=t===E;return He+=1,w.cloneElement(e,{fullWidth:ee===`fullWidth`,indicator:n&&!ce&&Ve,selected:n,selectionFollowsFocus:y,onChange:m,textColor:T,value:t,...He===1&&E===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),We=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=xe.current,n=dI(VN(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(),N2(t,n,M2);break;case a:e.preventDefault(),N2(t,n,j2);break;case`Home`:e.preventDefault(),N2(t,null,j2);break;case`End`:e.preventDefault(),N2(t,null,M2);break;default:break}},Ge=Ie(),[Ke,qe]=OI(`root`,{ref:t,className:v(ae.root,u),elementType:F2,externalForwardedProps:{...Se,...O,component:d},ownerState:ie}),[Je,Ye]=OI(`scroller`,{ref:be,className:ae.scroller,elementType:I2,externalForwardedProps:Se,ownerState:ie,additionalProps:{style:{overflow:ve.overflow,[k?`margin${i?`Left`:`Right`}`:`marginBottom`]:D?void 0:-ve.scrollbarWidth}}}),[Xe,Ze]=OI(`list`,{ref:xe,className:v(ae.list,ae.flexContainer),elementType:L2,externalForwardedProps:Se,ownerState:ie,getSlotProps:e=>({...e,onKeyDown:t=>{We(t),e.onKeyDown?.(t)}})});return(0,P.jsxs)(Ke,{...qe,children:[Ge.scrollButtonStart,Ge.scrollbarSizeListener,(0,P.jsxs)(Je,{...Ye,children:[(0,P.jsx)(Xe,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Ze,children:Ue}),ce&&Ve]}),Ge.scrollButtonEnd]})});function H2(e){return Vr(`MuiTab`,e)}var U2=Hr(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),W2=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return y({root:[`root`,a&&o&&`labelIcon`,`textColor${L(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},H2,t)},G2=I($P,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${L(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${U2.iconWrapper}`]:t.iconWrapper},{[`& .${U2.icon}`]:t.icon}]}})(Oo(({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:{[`& > .${U2.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${U2.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${U2.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${U2.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${U2.selected}`]:{opacity:1},[`&.${U2.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${U2.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${U2.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${U2.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${U2.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)}}]}))),K2=w.forwardRef(function(e,t){let n=ko({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:y=!1,...b}=n,x={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:y},S=W2(x),C=s&&u&&w.isValidElement(s)?w.cloneElement(s,{className:v(S.icon,s.props.className)}):s;return(0,P.jsxs)(G2,{focusRipple:!a,className:v(S.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:x,tabIndex:m?0:-1,...b,children:[c===`top`||c===`start`?(0,P.jsxs)(w.Fragment,{children:[C,u]}):(0,P.jsxs)(w.Fragment,{children:[u,C]}),l]})}),q2=e=>{let{classes:t}=e;return y({root:[`root`]},T0,t)},J2=I(zo,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),Y2=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=q2(o),{titleId:c=i}=w.useContext(J0);return(0,P.jsx)(J2,{component:`h2`,className:v(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function X2(e){return Vr(`MuiDialogContentText`,e)}Hr(`MuiDialogContentText`,[`root`]);var Z2=e=>{let{classes:t}=e,n=y({root:[`root`]},X2,t);return{...t,...n}},Q2=I(zo,{shouldForwardProp:e=>To(e)||e===`classes`,name:`MuiDialogContentText`,slot:`Root`})({}),$2=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiDialogContentText`}),{children:r,className:i,...a}=n,o=Z2(a);return(0,P.jsx)(Q2,{component:`p`,variant:`body1`,color:`textSecondary`,ref:t,ownerState:a,className:v(o.root,i),...n,classes:o})}),e4=g(`@pie-lib:editable-html:plugins:media:dialog`),t4=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},n4=e=>e&&/(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(e),r4=e=>e&&/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)/.test(e),i4=e=>{if(!e)return!1;let t=/^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;return e.match(t)&&e.match(t)[2]},a4=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(``),e4(e)})}catch{t(``)}}),o4={video:`Video`,audio:`Audio`},s4={uploadFile:`upload-file`,insertUrl:`insert-url`},c4=I(e2)(({theme:e})=>({"& .MuiDialog-paper":{minWidth:`500px`}})),l4=I(k0)(({theme:e})=>({padding:0})),u4=I(`div`)(({theme:e})=>({display:`flex`,flexDirection:`space-between`})),d4=I(`div`)(({theme:e})=>({marginTop:e.spacing(1.5)})),f4=I(`input`)(({theme:e})=>({})),p4=I(zo)(({theme:e})=>({marginTop:e.spacing(1.5),color:e.palette.error.main})),m4=I(vF)(({theme:e})=>({marginLeft:e.spacing(1.5)})),h4=class extends w.Component{static propTypes={open:m.bool,edit:m.bool,disablePortal:m.bool,handleClose:m.func,uploadSoundSupport:m.shape({add:m.func,delete:m.func}),type:m.string,src:m.string,url:m.string,urlToUse:m.string,starts:m.number,ends:m.number,height:m.number,width:m.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?s4.uploadFile:s4.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=t4(e),a=n4(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=>{i4(e)&&a4(e).then(t=>{this.handleStateChange({urlToUse:t,invalid:!t,url:e})}).catch(e4)};checkVideo=e=>{if(t4(e)){let t=`https://youtube.com/embed/${e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)[2]}`;e4(`is youtube`),this.handleStateChange({urlToUse:t,url:e,invalid:!1})}if(n4(e)){let t=`https://player.vimeo.com/video/${e.replace(/.*vimeo.com\/(.*)/g,`$1`)}`;e4(`is vimeo`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}if(r4(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`;e4(`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===s4.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(e4(`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=t4(u),_=m===s4.insertUrl,v=m===s4.uploadFile,y=_?s||u==null:!h.url||h.scheduled,b=i?.add&&i?.delete&&n!==`video`;return(0,P.jsxs)(c4,{disablePortal:t,open:e,onClose:()=>this.handleDone(!1),"aria-labelledby":`form-dialog-title`,children:[(0,P.jsxs)(Y2,{id:`form-dialog-title`,children:[`Insert `,o4[n]]}),(0,P.jsx)(k0,{children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(u4,{children:(0,P.jsxs)(V2,{indicatorColor:`primary`,value:m,onChange:(e,t)=>{this.setState({tabValue:t})},children:[b?(0,P.jsx)(K2,{value:s4.uploadFile,label:`Upload file`}):null,(0,P.jsx)(K2,{value:s4.insertUrl,label:n===`video`?`Insert YouTube, Vimeo, or Google Drive URL`:`Insert SoundCloud URL`})]})}),_&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(V0,{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,P.jsxs)(l4,{children:[(0,P.jsx)($2,{children:`Video Properties`}),(0,P.jsx)(V0,{autoFocus:!0,margin:`dense`,id:`width`,label:`Width`,type:`number`,placeholder:`Width`,value:l,onChange:this.changeHandler(`width`)}),(0,P.jsx)(V0,{autoFocus:!0,margin:`dense`,id:`height`,label:`Height`,type:`number`,placeholder:`Height`,value:o,onChange:this.changeHandler(`height`)})]}),f&&(0,P.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,P.jsx)(w.Fragment,{children:(0,P.jsxs)(l4,{children:[(0,P.jsx)(V0,{autoFocus:!0,margin:`dense`,id:`starts`,label:`Starts`,type:`number`,placeholder:`Starts`,value:c,onChange:this.changeHandler(`starts`)}),g&&(0,P.jsx)(V0,{autoFocus:!0,margin:`dense`,id:`ends`,label:`Ends`,type:`number`,placeholder:`Ends`,value:a,onChange:this.changeHandler(`ends`)})]})})]}),v&&(0,P.jsx)(d4,{children:(0,P.jsxs)(`div`,{children:[h.url?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(u4,{children:[(0,P.jsx)(`audio`,{controls:`controls`,controlsList:`nodownload`,children:(0,P.jsx)(`source`,{type:d,src:h.url})}),(0,P.jsx)(m4,{"aria-label":`delete`,onClick:this.handleRemoveFile,children:(0,P.jsx)(yF,{})})]}),!h.scheduled&&h.loading?(0,P.jsx)(zo,{variant:`subheading`,children:`Loading...`}):null,h.scheduled?(0,P.jsx)(zo,{variant:`subheading`,children:`Waiting for Upload to finish, then inserting item...`}):null]}):h.loading?null:(0,P.jsx)(f4,{accept:`audio/*`,onChange:this.handleUploadFile,type:`file`}),!!h.error&&(0,P.jsx)(p4,{variant:`caption`,children:h.error})]})})]})}),(0,P.jsxs)(G0,{children:[(0,P.jsx)(bW,{onClick:()=>this.handleDone(!1),color:`primary`,children:`Cancel`}),(0,P.jsx)(bW,{disabled:y,onClick:()=>this.handleDone(!0),color:`primary`,children:r?`Update`:`Insert`})]})]})}},g4=I(`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)`})),_4=I(`span`)(({theme:e})=>({cursor:`pointer`,flex:3,border:`solid ${e.palette.common.black}`,textAlign:`right`,borderWidth:`0 2px 0 0`,marginRight:`5px`,paddingRight:`5px`})),v4=I(`span`)({cursor:`pointer`}),y4=class extends w.Component{static propTypes={onEdit:m.func,hideEdit:m.bool,onRemove:m.func};render(){let{hideEdit:e,onEdit:t,onRemove:n}=this.props;return(0,P.jsxs)(g4,{children:[e?null:(0,P.jsx)(_4,{onClick:t,children:`Edit Settings`}),(0,P.jsx)(v4,{onClick:n,children:`Remove`})]})}},b4=tC.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`,Sb({"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 Rw(e=>(0,P.jsx)(C4,{...e,options:this.options}))}}),x4=()=>{document.querySelectorAll(`.insert-media-dialog`).forEach(e=>e.remove())},S4=e=>{let t=document.createElement(`div`),{type:n,callback:r,options:i,...a}=e,o=document.body.style.overflow;x4(),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,P.jsx)(h4,{...a,uploadSoundSupport:i.uploadSoundSupport,type:n,disablePortal:!0,open:!0,handleClose:s});rw.render(c,t),document.body.appendChild(t)};function C4({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,w.useEffect)(()=>{o||S4({...t.attrs,options:i,edit:!0,callback:(t,i)=>{t?n(i):r(),e.chain().focus().run()}})},[]),(0,P.jsxs)(ww,{"data-type":a,style:{width:s,height:c},children:[l===`audio`?(0,P.jsx)(`audio`,{controls:!0,controlsList:`nodownload`,children:(0,P.jsx)(`source`,{type:`audio/mp3`,src:o})}):(0,P.jsx)(`iframe`,{src:o,allowFullScreen:!0,frameBorder:`0`,width:s,height:c}),(0,P.jsx)(y4,{onEdit:()=>{S4({...t.attrs,options:i,edit:!0,callback:(t,r)=>{t&&n(r),e.chain().focus().run()}})},onRemove:r})]})}function w4(e){return Vr(`MuiListItem`,e)}Hr(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var T4=Hr(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function E4(e){return Vr(`MuiListItemSecondaryAction`,e)}Hr(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var D4=e=>{let{disableGutters:t,classes:n}=e;return y({root:[`root`,t&&`disableGutters`]},E4,n)},O4=I(`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}}]}),k4=w.forwardRef(function(e,t){let n=ko({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=w.useContext(SG),o={...n,disableGutters:a.disableGutters},s=D4(o);return(0,P.jsx)(O4,{className:v(s.root,r),ownerState:o,ref:t,...i})});k4.muiName=`ListItemSecondaryAction`;var A4=(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]},j4=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return y({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},w4,n)},M4=I(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:A4})(Oo(({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:{[`& > .${T4.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}}]}))),N4=I(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),P4=w.forwardRef(function(e,t){let n=ko({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:y={},...b}=n,x=w.useContext(SG),S=w.useMemo(()=>({dense:f||x.dense||!1,alignItems:r,disableGutters:p}),[r,x.dense,f,p]),C=w.useRef(null),T=w.Children.toArray(i),E=T.length&&zN(T[T.length-1],[`ListItemSecondaryAction`]),ee={...n,alignItems:r,dense:S.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:E},D=j4(ee),O=QN(C,t),[te,k]=OI(`secondaryAction`,{elementType:k4,externalForwardedProps:{slots:y,slotProps:_},ownerState:ee,className:D.secondaryAction}),A=y.root||s.Root||M4,j=_.root||c.root||{},M={className:v(D.root,j.className,a),...b},ne=o||`li`;return E?(ne=!M.component&&!o?`div`:ne,l===`li`&&(ne===`li`?ne=`div`:M.component===`li`&&(M.component=`div`)),(0,P.jsx)(SG.Provider,{value:S,children:(0,P.jsxs)(N4,{as:l,className:v(D.container,u),ref:O,ownerState:ee,...d,children:[(0,P.jsx)(A,{...j,...!HF(A)&&{as:ne,ownerState:{...ee,...j.ownerState}},...M,children:T}),T.pop()]})})):(0,P.jsx)(SG.Provider,{value:S,children:(0,P.jsxs)(A,{...j,as:ne,ref:O,...!HF(A)&&{ownerState:{...ee,...j.ownerState}},...M,children:[T,g&&(0,P.jsx)(te,{...k,children:g})]})})}),F4=()=>{document.querySelectorAll(`.insert-css-dialog`).forEach(e=>e.remove())},I4=({editor:e,callback:t,opts:n,selectedText:r,parentNode:i})=>{let a=e.options.element,o=document.createElement(`div`),{selection:s}=e.state;F4(),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,P.jsxs)(`div`,{style:{background:`white`,height:500,padding:20,overflow:`hidden`,display:`flex`,flexFlow:`column`},children:[(0,P.jsx)(`h2`,{children:`Please choose a css class`}),f&&(0,P.jsxs)(`div`,{children:[`The current parent has this class `,f]}),(0,P.jsx)(EG,{component:`nav`,style:{overflow:`scroll`},children:n.names.map((e,t)=>(0,P.jsxs)(P4,{button:!0,onClick:()=>d(e),children:[(0,P.jsx)(`div`,{style:{marginRight:20},children:e}),(0,P.jsx)(`div`,{dangerouslySetInnerHTML:{__html:p(e)}})]},`rule-${t}`))})]});rw.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)}})},L4=wS.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`)||``;if(!t)return!1;if((this.options&&this.options.classes||[]).length>0){let e=this.options.classes.find(e=>t.includes(e));return e?{class:e}:!1}return{class:t}}}]},renderHTML({HTMLAttributes:e}){return[`span`,Sb(e),0]},addCommands(){return{setCSSClass:e=>({commands:t})=>t.setMark(this.name,{class:e}),unsetCSSClass:()=>({commands:e})=>e.unsetMark(this.name),openCSSClassDialog:()=>({editor:e})=>{I4({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()}})}}}}),R4=bO.extend({content:`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`}),z4=tC.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`,Sb(e),0]},addCommands(){return{toggleHeadingParagraph:()=>({commands:e,editor:t})=>t.isActive(`headingParagraph`)?e.setNode(`paragraph`):e.setNode(`headingParagraph`,{"data-heading":`heading1`})}}}),B4=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`},V4=IN((0,P.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`),H4=IN((0,P.jsx)(`path`,{d:`M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z`}),`FormatItalic`),U4=IN((0,P.jsx)(`path`,{d:`M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z`}),`FormatStrikethrough`),W4=IN((0,P.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`),G4=IN((0,P.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`),K4=IN((0,P.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`),q4=IN((0,P.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`),J4=IN((0,P.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`),Y4=IN((0,P.jsx)(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),X4=IN((0,P.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`),Z4=IN((0,P.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`),Q4=IN((0,P.jsx)(`path`,{d:`M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z`}),`FormatQuote`),$4=IN((0,P.jsx)(`path`,{d:`M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3zM8 17H6v-2h2zm0-4H6v-2h2zm0-4H6V7h2zm10 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V7h2z`}),`Theaters`),e3=IN((0,P.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`),t3=IN((0,P.jsx)(`path`,{d:`M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z`}),`BorderAll`),n3=I(`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`})),r3=()=>(0,P.jsx)(n3,{children:`+ Response Area`}),i3={characters:[[`á`,`é`,`í`,`ó`,`ú`],[`Á`,`É`,`Í`,`Ó`,`Ú`],[`—`,`«`,`»`,`ñ`,`ü`],[`-`,`¿`,`¡`,`Ñ`,`Ü`]]},a3={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:` `},{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:` `},{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:` `},{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:` `},{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:`—`}]]},o3=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),s3=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),c3=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),l3=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),u3=({editor:e,onChange:t})=>{let[n,r]=(0,w.useState)(!1),i;switch(!0){case e.isActive({textAlign:`right`}):i=(0,P.jsx)(s3,{});break;case e.isActive({textAlign:`center`}):i=(0,P.jsx)(c3,{});break;case e.isActive({textAlign:`justify`}):i=(0,P.jsx)(l3,{});break;default:i=(0,P.jsx)(o3,{});break}let a=t=>{let n=t.currentTarget?.getAttribute(`value`);n&&e.commands.setTextAlign(n),r(!1)};return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!n)},children:[i,(0,P.jsx)(`span`,{style:{marginLeft:`5px`,fontSize:`8px`},"aria-hidden":`true`,children:`▼`})]}),(0,P.jsx)(SB,{in:n,timeout:`auto`,unmountOnExit:!0,style:{position:`absolute`},children:(0,P.jsxs)(EG,{component:`div`,disablePadding:!0,style:{background:`#fff`,display:`flex`,flexDirection:`row`,padding:0},children:[(0,P.jsx)(P4,{button:!0,type:`submit`,value:`left`,"aria-label":`Align text left`,onClick:a,children:(0,P.jsx)(o3,{})}),(0,P.jsx)(P4,{button:!0,type:`submit`,value:`center`,"aria-label":`Align text center`,onClick:a,children:(0,P.jsx)(c3,{})}),(0,P.jsx)(P4,{button:!0,type:`submit`,value:`right`,"aria-label":`Align text right`,onClick:a,children:(0,P.jsx)(s3,{})}),(0,P.jsx)(P4,{button:!0,type:`submit`,value:`justify`,"aria-label":`Justify text`,onClick:a,children:(0,P.jsx)(l3,{})})]})})]})},d3=I(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans, Arial, sans-serif`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,whiteSpace:`nowrap`})),f3=()=>(0,P.jsx)(d3,{children:`CSS`}),p3=I(`path`)({fill:`grey`,"&:hover":{fill:`black`}}),m3=e=>t=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(e,{...t})}),h3=m3(e=>(0,P.jsx)(p3,{...e,d:`M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z`})),g3=m3(e=>(0,P.jsx)(p3,{...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`})),_3=m3(e=>(0,P.jsx)(p3,{...e,d:`M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z`})),v3=m3(e=>(0,P.jsx)(p3,{...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`})),y3=m3(e=>(0,P.jsx)(p3,{...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`})),b3=`bottom`,x3=`right`,S3=`left`,C3=`auto`,w3=[`top`,b3,x3,S3],T3=`start`,E3=`clippingParents`,D3=`viewport`,O3=`popper`,k3=`reference`,A3=w3.reduce(function(e,t){return e.concat([t+`-`+T3,t+`-end`])},[]),j3=[].concat(w3,[C3]).reduce(function(e,t){return e.concat([t,t+`-`+T3,t+`-end`])},[]),M3=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function N3(e){return e?(e.nodeName||``).toLowerCase():null}function P3(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function F3(e){return e instanceof P3(e).Element||e instanceof Element}function I3(e){return e instanceof P3(e).HTMLElement||e instanceof HTMLElement}function L3(e){return typeof ShadowRoot>`u`?!1:e instanceof P3(e).ShadowRoot||e instanceof ShadowRoot}function R3(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];!I3(i)||!N3(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 z3(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},{});!I3(r)||!N3(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var B3={name:`applyStyles`,enabled:!0,phase:`write`,fn:R3,effect:z3,requires:[`computeStyles`]};function V3(e){return e.split(`-`)[0]}var H3=Math.max,U3=Math.min,W3=Math.round;function G3(){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 K3(){return!/^((?!chrome|android).)*safari/i.test(G3())}function q3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&I3(e)&&(i=e.offsetWidth>0&&W3(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&W3(r.height)/e.offsetHeight||1);var o=(F3(e)?P3(e):window).visualViewport,s=!K3()&&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 J3(e){var t=q3(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 Y3(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L3(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function X3(e){return P3(e).getComputedStyle(e)}function Z3(e){return[`table`,`td`,`th`].indexOf(N3(e))>=0}function Q3(e){return((F3(e)?e.ownerDocument:e.document)||window.document).documentElement}function $3(e){return N3(e)===`html`?e:e.assignedSlot||e.parentNode||(L3(e)?e.host:null)||Q3(e)}function e6(e){return!I3(e)||X3(e).position===`fixed`?null:e.offsetParent}function t6(e){var t=/firefox/i.test(G3());if(/Trident/i.test(G3())&&I3(e)&&X3(e).position===`fixed`)return null;var n=$3(e);for(L3(n)&&(n=n.host);I3(n)&&[`html`,`body`].indexOf(N3(n))<0;){var r=X3(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 n6(e){for(var t=P3(e),n=e6(e);n&&Z3(n)&&X3(n).position===`static`;)n=e6(n);return n&&(N3(n)===`html`||N3(n)===`body`&&X3(n).position===`static`)?t:n||t6(e)||t}function r6(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function i6(e,t,n){return H3(e,U3(t,n))}function a6(e,t,n){var r=i6(e,t,n);return r>n?n:r}function o6(){return{top:0,right:0,bottom:0,left:0}}function s6(e){return Object.assign({},o6(),e)}function c6(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var l6=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,s6(typeof e==`number`?c6(e,w3):e)};function u6(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=V3(n.placement),c=r6(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=l6(i.padding,n),d=J3(a),f=c===`y`?`top`:S3,p=c===`y`?b3:x3,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=n6(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=i6(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function d6(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)||Y3(t.elements.popper,r)&&(t.elements.arrow=r))}var f6={name:`arrow`,enabled:!0,phase:`main`,fn:u6,effect:d6,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function p6(e){return e.split(`-`)[1]}var m6={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function h6(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:W3(n*i)/i||0,y:W3(r*i)/i||0}}function g6(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=S3,b=`top`,x=window;if(l){var S=n6(n),C=`clientHeight`,w=`clientWidth`;if(S===P3(n)&&(S=Q3(n),X3(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=b3;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=x3;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var ee=Object.assign({position:s},l&&m6),D=u===!0?h6({x:p,y:h},P3(n)):{x:p,y:h};if(p=D.x,h=D.y,c){var O;return Object.assign({},ee,(O={},O[b]=v?`0`:``,O[y]=_?`0`:``,O.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,O))}return Object.assign({},ee,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function _6(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:V3(t.placement),variation:p6(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,g6(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,g6(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 v6={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:_6,data:{}},y6={passive:!0};function b6(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=P3(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,y6)}),s&&c.addEventListener(`resize`,n.update,y6),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,y6)}),s&&c.removeEventListener(`resize`,n.update,y6)}}var x6={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:b6,data:{}},S6={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function C6(e){return e.replace(/left|right|bottom|top/g,function(e){return S6[e]})}var w6={start:`end`,end:`start`};function T6(e){return e.replace(/start|end/g,function(e){return w6[e]})}function E6(e){var t=P3(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function D6(e){return q3(Q3(e)).left+E6(e).scrollLeft}function O6(e,t){var n=P3(e),r=Q3(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=K3();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+D6(e),y:c}}function k6(e){var t=Q3(e),n=E6(e),r=e.ownerDocument?.body,i=H3(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H3(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+D6(e),s=-n.scrollTop;return X3(r||t).direction===`rtl`&&(o+=H3(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function A6(e){var t=X3(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function j6(e){return[`html`,`body`,`#document`].indexOf(N3(e))>=0?e.ownerDocument.body:I3(e)&&A6(e)?e:j6($3(e))}function M6(e,t){t===void 0&&(t=[]);var n=j6(e),r=n===e.ownerDocument?.body,i=P3(n),a=r?[i].concat(i.visualViewport||[],A6(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(M6($3(a)))}function N6(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function P6(e,t){var n=q3(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 F6(e,t,n){return t===`viewport`?N6(O6(e,n)):F3(t)?P6(t,n):N6(k6(Q3(e)))}function I6(e){var t=M6($3(e)),n=[`absolute`,`fixed`].indexOf(X3(e).position)>=0&&I3(e)?n6(e):e;return F3(n)?t.filter(function(e){return F3(e)&&Y3(e,n)&&N3(e)!==`body`}):[]}function L6(e,t,n,r){var i=t===`clippingParents`?I6(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=F6(e,n,r);return t.top=H3(i.top,t.top),t.right=U3(i.right,t.right),t.bottom=U3(i.bottom,t.bottom),t.left=H3(i.left,t.left),t},F6(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 R6(e){var t=e.reference,n=e.element,r=e.placement,i=r?V3(r):null,a=r?p6(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 b3:c={x:o,y:t.y+t.height};break;case x3:c={x:t.x+t.width,y:s};break;case S3:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?r6(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case T3: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 z6(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?E3:s,l=n.rootBoundary,u=l===void 0?D3:l,d=n.elementContext,f=d===void 0?O3:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=s6(typeof g==`number`?c6(g,w3):g),v=f===`popper`?k3:O3,y=e.rects.popper,b=e.elements[m?v:f],x=L6(F3(b)?b:b.contextElement||Q3(e.elements.popper),c,u,o),S=q3(e.elements.reference),C=R6({reference:S,element:y,strategy:`absolute`,placement:i}),w=N6(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},ee=e.modifiersData.offset;if(f===`popper`&&ee){var D=ee[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]+=D[n]*t})}return E}function B6(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?j3:c,u=p6(r),d=u?s?A3:A3.filter(function(e){return p6(e)===u}):w3,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]=z6(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[V3(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function V6(e){if(V3(e)===`auto`)return[];var t=C6(e);return[T6(e),t,T6(t)]}function H6(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||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=V3(g)===g,v=c||(_||!m?[C6(g)]:V6(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(V3(n)===`auto`?B6(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],ee=V3(E),D=p6(E)===T3,O=[`top`,b3].indexOf(ee)>=0,te=O?`width`:`height`,k=z6(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=O?D?x3:S3:D?b3:`top`;b[te]>x[te]&&(A=C6(A));var j=C6(A),M=[];if(a&&M.push(k[ee]<=0),s&&M.push(k[A]<=0,k[j]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,re=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`},ie=ne;ie>0&&re(ie)!==`break`;ie--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var U6={name:`flip`,enabled:!0,phase:`main`,fn:H6,requiresIfExists:[`offset`],data:{_skip:!1}};function W6(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 G6(e){return[`top`,x3,b3,S3].some(function(t){return e[t]>=0})}function K6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=z6(t,{elementContext:`reference`}),s=z6(t,{altBoundary:!0}),c=W6(o,r),l=W6(s,i,a),u=G6(c),d=G6(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 q6={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:K6};function J6(e,t,n){var r=V3(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 Y6(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=j3.reduce(function(e,n){return e[n]=J6(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 X6={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:Y6};function Z6(e){var t=e.state,n=e.name;t.modifiersData[n]=R6({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var Q6={name:`popperOffsets`,enabled:!0,phase:`read`,fn:Z6,data:{}};function $6(e){return e===`x`?`y`:`x`}function e8(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=z6(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=V3(t.placement),v=p6(t.placement),y=!v,b=r6(_),x=$6(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),ee=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(S){if(a){var O=b===`y`?`top`:S3,te=b===`y`?b3:x3,k=b===`y`?`height`:`width`,A=S[b],j=A+g[O],M=A-g[te],ne=p?-w[k]/2:0,re=v===`start`?C[k]:w[k],ie=v===`start`?-w[k]:-C[k],ae=t.elements.arrow,oe=p&&ae?J3(ae):{width:0,height:0},se=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:o6(),ce=se[O],le=se[te],ue=i6(0,C[k],oe[k]),de=y?C[k]/2-ne-ue-ce-E.mainAxis:re-ue-ce-E.mainAxis,fe=y?-C[k]/2+ne+ue+le+E.mainAxis:ie+ue+le+E.mainAxis,pe=t.elements.arrow&&n6(t.elements.arrow),me=pe?b===`y`?pe.clientTop||0:pe.clientLeft||0:0,he=ee?.[b]??0,ge=A+de-he-me,_e=A+fe-he,ve=i6(p?U3(j,ge):j,A,p?H3(M,_e):M);S[b]=ve,D[b]=ve-A}if(s){var N=b===`x`?`top`:S3,ye=b===`x`?b3:x3,be=S[x],xe=x===`y`?`height`:`width`,Se=be+g[N],Ce=be-g[ye],we=[`top`,S3].indexOf(_)!==-1,Te=ee?.[x]??0,Ee=we?Se:be-C[xe]-w[xe]-Te+E.altAxis,De=we?be+C[xe]+w[xe]-Te-E.altAxis:Ce,Oe=p&&we?a6(Ee,be,De):i6(p?Ee:Se,be,p?De:Ce);S[x]=Oe,D[x]=Oe-be}t.modifiersData[r]=D}}var t8={name:`preventOverflow`,enabled:!0,phase:`main`,fn:e8,requiresIfExists:[`offset`]};function n8(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function r8(e){return e===P3(e)||!I3(e)?E6(e):n8(e)}function i8(e){var t=e.getBoundingClientRect(),n=W3(t.width)/e.offsetWidth||1,r=W3(t.height)/e.offsetHeight||1;return n!==1||r!==1}function a8(e,t,n){n===void 0&&(n=!1);var r=I3(t),i=I3(t)&&i8(t),a=Q3(t),o=q3(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((N3(t)!==`body`||A6(a))&&(s=r8(t)),I3(t)?(c=q3(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=D6(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function o8(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 s8(e){var t=o8(e);return M3.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function c8(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function l8(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 u8={placement:`bottom`,modifiers:[],strategy:`absolute`};function d8(){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 f8(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?u8:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},u8,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:F3(e)?M6(e):e.contextElement?M6(e.contextElement):[],popper:M6(t)};var s=s8(l8([].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(d8(t,n)){i.rects={reference:a8(t,n6(n),i.options.strategy===`fixed`),popper:J3(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:c8(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!d8(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 p8=f8({defaultModifiers:[x6,Q6,v6,B3,X6,U6,t8,f6,q6]});function m8(e){return Vr(`MuiPopper`,e)}Hr(`MuiPopper`,[`root`]);function h8(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 g8(e){return typeof e==`function`?e():e}function _8(e){return e.nodeType!==void 0}var v8=e=>{let{classes:t}=e;return y({root:[`root`]},m8,t)},y8={},b8=w.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=w.useRef(null),_=ZN(g,t),v=w.useRef(null),y=ZN(v,u),b=w.useRef(y);ni(()=>{b.current=y},[y]),w.useImperativeHandle(u,()=>v.current,[]);let x=h8(c,i),[S,C]=w.useState(x),[T,E]=w.useState(g8(n));w.useEffect(()=>{v.current&&v.current.forceUpdate()}),w.useEffect(()=>{n&&E(g8(n))},[n]),ni(()=>{if(!T||!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=p8(T,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)}},[T,a,o,s,l,x]);let ee={placement:S};p!==null&&(ee.TransitionProps=p);let D=v8(e),O=f.root??`div`;return(0,P.jsx)(O,{...xG({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(ee):r})}),x8=I(w.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=y8,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=w.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=g8(n);S=e&&_8(e)?BN(e).body:BN(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,T=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,P.jsx)(SI,{disablePortal:o,container:S,children:(0,P.jsx)(b8,{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:T,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),S8=I(w.forwardRef(function(e,t){let n=Oi(),{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}=ko({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,P.jsx)(x8,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})}))({background:`#fff`,padding:`10px`,pointerEvents:`none`,zIndex:99999}),C8=I(zo)({fontSize:50,textAlign:`center`}),w8=({children:e,...t})=>(0,P.jsx)(S8,{id:`mouse-over-popover`,open:!0,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableRestoreFocus:!0,disableAutoFocus:!0,...t,children:(0,P.jsx)(C8,{children:e})}),T8=({letter:e})=>(0,P.jsx)(`div`,{style:{fontSize:`24px`,lineHeight:`24px`},children:e});T8.propTypes={letter:m.string};function E8({editor:e,opts:t,onClose:n}){if(!t?.characters?.length)return null;let r=(0,w.useRef)(null),i=(0,w.useRef)(n),[a,o]=(0,w.useState)({top:0,left:0}),[s,c]=(0,w.useState)(null);i.current=n;let l=(0,w.useMemo)(()=>{if(!t)return i3;switch(!0){case t.language===`spanish`:return i3;case t.language===`special`:return a3;default:return t}},[t]),u=(0,w.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,w.useEffect)(()=>()=>{d()},[]),(0,w.useEffect)(()=>{if(!e)return;let t=e.options.element,n=e.view.dom,a=()=>{if(!r.current)return;let n=t.getBoundingClientRect(),{from:i}=e.state.selection,a=e.view.coordsAtPos(i),s=r.current.offsetHeight,c=r.current.offsetWidth,l=window.innerHeight-(n.bottom+60)>=s||n.top<s+80?n.bottom+60:n.top-s-20,u=a.left;l=Math.max(8,Math.min(l,window.innerHeight-s-8)),u=Math.max(8,Math.min(u,window.innerWidth-c-8)),o({top:l,left:u})};a();let s=null,c=()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,a()}))};window.addEventListener(`scroll`,c,!0),window.addEventListener(`resize`,c);let l=e=>{r.current&&!r.current.contains(e.target)&&!n.contains(e.target)&&i.current()},u=setTimeout(()=>{document.addEventListener(`click`,l)});return()=>{clearTimeout(u),s!==null&&cancelAnimationFrame(s),window.removeEventListener(`scroll`,c,!0),window.removeEventListener(`resize`,c),document.removeEventListener(`click`,l)}},[e]);let f=(e,t)=>c({anchorEl:e.currentTarget,el:t});return(0,P.jsxs)(P.Fragment,{children:[rw.createPortal((0,P.jsx)(`div`,{ref:r,className:`insert-character-dialog`,"data-toolbar-for":e.instanceId,style:{visibility:a.top===0&&a.left===0?`hidden`:`initial`,position:`fixed`,top:`${a.top}px`,left:`${a.left}px`,maxWidth:`500px`,zIndex:1e3},children:(0,P.jsx)(`div`,{children:(0,P.jsx)(Z1,{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:hl(e,`name`)||e,write:hl(e,`write`)||e,label:hl(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&&rw.createPortal((0,P.jsxs)(w8,{onClose:d,anchorEl:s.anchorEl,children:[(0,P.jsx)(`div`,{children:s.el.label}),(0,P.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.description}),(0,P.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.unicode})]}),document.body)]})}E8.propTypes={editor:m.object,opts:m.object,onClose:m.func.isRequired};var{translator:D8}=tW,O8=()=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),k8=()=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,P.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`})}),A8=()=>(0,P.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`},"aria-hidden":`true`,focusable:`false`,children:(0,P.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 j8({editor:e,classes:t,activePlugins:n,toolbarOpts:r,responseAreaProps:i,onChange:a,autoWidthToolbar:o,hasFocus:s,language:c}){let[l,u]=(0,w.useState)(!1),d=(0,w.useRef)(null),f=r??{},p=gw({editor:e,selector:e=>{let{selection:t}=e.editor?.state||{},n;if(!e.editor?.commandManager)return{};t instanceof H&&(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,toolbarOpened:e.editor?._toolbarOpened??!1,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}}}),m=!!o,h=p.hideDefaultToolbar&&p.currentNode?.type?.name===`drag_in_the_blank`,g=f.alwaysVisible||s&&!p.toolbarOpened&&(!p.hideDefaultToolbar||h);(0,w.useLayoutEffect)(()=>{d.current?.toggleAttribute(`inert`,!g)},[g]);let _=v(t.toolbar,UG,{[t.toolbarWithNoDone]:!0,[t.toolbarTop]:f.position===`top`,[t.toolbarRight]:f.alignment===`right`,[t.focused]:g,[t.autoWidth]:m,[t.fullWidth]:!m,[t.hidden]:f.isHidden===!0}),y=f.minWidth===void 0?{}:{minWidth:f.minWidth},b=e=>{e.preventDefault()},x=e=>D8.t(`editableHtml.buttons.${e}`,{lng:c}),S=(0,w.useMemo)(()=>[{icon:(0,P.jsx)(G4,{}),label:x(`insertTable`),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,P.jsx)(h3,{}),label:x(`addTableRow`),onClick:e=>e.chain().focus().addRowAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(g3,{}),label:x(`removeTableRow`),onClick:e=>e.chain().focus().deleteRow().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(_3,{}),label:x(`addTableColumn`),onClick:e=>e.chain().focus().addColumnAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(v3,{}),label:x(`removeTableColumn`),onClick:e=>e.chain().focus().deleteColumn().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(y3,{}),label:x(`removeTable`),onClick:e=>e.chain().focus().deleteTable().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(t3,{}),label:x(`tableBorders`),toggle:!0,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,P.jsx)(V4,{}),label:x(`bold`),toggle:!0,onClick:e=>e.chain().focus().toggleBold().run(),hidden:()=>!n?.includes(`bold`),isActive:e=>e.isBold,isDisabled:e=>!e.canBold},{icon:(0,P.jsx)(H4,{}),label:x(`italic`),toggle:!0,onClick:e=>e.chain().focus().toggleItalic().run(),hidden:()=>!n?.includes(`italic`),isActive:e=>e.isItalic,isDisabled:e=>!e.canItalic},{icon:(0,P.jsx)(U4,{}),label:x(`strikethrough`),toggle:!0,onClick:e=>e.chain().focus().toggleStrike().run(),hidden:()=>!n?.includes(`strikethrough`),isActive:e=>e.isStrike,isDisabled:e=>!e.canStrike},{icon:(0,P.jsx)(W4,{}),label:x(`code`),toggle:!0,onClick:e=>e.chain().focus().toggleCode().run(),hidden:()=>!n?.includes(`code`),isActive:e=>e.isCode,isDisabled:e=>!e.canCode},{icon:(0,P.jsx)(J4,{}),label:x(`underline`),toggle:!0,onClick:e=>e.chain().focus().toggleUnderline().run(),hidden:()=>!n?.includes(`underline`),isActive:e=>e.isUnderline},{icon:(0,P.jsx)(k8,{}),label:x(`subscript`),toggle:!0,onClick:e=>e.chain().focus().toggleSubscript().run(),hidden:()=>!n?.includes(`subscript`),isActive:e=>e.isSubScript},{icon:(0,P.jsx)(O8,{}),label:x(`superscript`),toggle:!0,onClick:e=>e.chain().focus().toggleSuperscript().run(),hidden:()=>!n?.includes(`superscript`),isActive:e=>e.isSuperScript},{icon:(0,P.jsx)(X4,{}),label:x(`insertImage`),hidden:()=>!n?.includes(`image`),onClick:e=>e.chain().focus().setImageUploadNode().run()},{icon:(0,P.jsx)($4,{}),label:x(`insertVideo`),hidden:()=>!n?.includes(`video`),onClick:e=>e.chain().focus().insertMedia({type:`video`}).run()},{icon:(0,P.jsx)(e3,{}),label:x(`insertAudio`),hidden:()=>!n?.includes(`audio`),onClick:e=>e.chain().focus().insertMedia({type:`audio`,tag:`audio`}).run()},{icon:(0,P.jsx)(f3,{}),label:x(`cssClasses`),hidden:()=>!n?.includes(`css`),onClick:e=>e.commands.openCSSClassDialog()},{icon:(0,P.jsx)(Q4,{}),label:x(`blockquote`),toggle:!0,hidden:()=>!n?.includes(`blockquote`),onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isBlockquote},{icon:(0,P.jsx)(A8,{}),label:x(`heading`),toggle:!0,hidden:()=>!n?.includes(`h3`),onClick:e=>e.chain().focus().toggleHeadingParagraph().run(),isActive:e=>e.isHeadingParagraph},{icon:(0,P.jsx)(Y4,{}),label:x(`insertMath`),hidden:()=>!n?.includes(`math`),onClick:e=>e.chain().focus().insertMath(``).run()},{icon:(0,P.jsx)(T8,{letter:`ñ`}),label:x(`spanishCharacters`),hidden:()=>!n?.includes(`languageCharacters`),onClick:()=>u(i3)},{icon:(0,P.jsx)(T8,{letter:`€`}),label:x(`specialCharacters`),hidden:()=>n?.filter(e=>e===`languageCharacters`).length!==2,onClick:()=>u(a3)},{icon:(0,P.jsx)(u3,{editor:e}),label:x(`textAlignment`),hidden:()=>!n?.includes(`text-align`),onClick:()=>{}},{icon:(0,P.jsx)(K4,{}),label:x(`bulletedList`),toggle:!0,hidden:()=>!n?.includes(`bulleted-list`),onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isBulletList},{icon:(0,P.jsx)(q4,{}),label:x(`numberedList`),toggle:!0,hidden:()=>!n?.includes(`numbered-list`),onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isOrderedList},{icon:(0,P.jsx)(SW,{}),label:D8.t(`common:undo`,{lng:c}),hidden:()=>!n?.includes(`undo`),onClick:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.canUndo},{icon:(0,P.jsx)(Z4,{}),label:D8.t(`graphing.redo`,{lng:c}),hidden:()=>!n?.includes(`redo`),onClick:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.canRedo}],[n,e,c]);return(0,P.jsxs)(`div`,{ref:d,className:_,style:{...y},onMouseDown:b,children:[h&&(0,P.jsx)(`div`,{className:t.defaultToolbar,role:`toolbar`,tabIndex:-1,"aria-label":D8.t(`editableHtml.responseAreaToolbar`,{lng:c}),children:(0,P.jsx)(`div`,{className:t.buttonsContainer,children:(0,P.jsx)(`button`,{type:`button`,className:t.button,onClick:t=>{t.preventDefault(),e.chain().focus().deleteSelection().run(),a?.(e.getHTML())},"aria-label":`Delete response area`,title:`Delete response area`,children:(0,P.jsx)(yF,{})})})}),!p.hideDefaultToolbar&&(0,P.jsxs)(`div`,{className:t.defaultToolbar,role:`toolbar`,tabIndex:-1,"aria-label":D8.t(`editableHtml.toolbar`,{lng:c}),children:[(0,P.jsx)(`div`,{className:t.buttonsContainer,children:S.filter(e=>!e.hidden?.(p)).map((n,r)=>{let i=n.isDisabled?.(p),a=n.isActive?.(p);return(0,P.jsx)(`button`,{type:`button`,disabled:i,"aria-label":n.label,title:n.label,"aria-pressed":n.toggle?!!a:void 0,onClick:t=>{t.preventDefault(),n.onClick(e)},className:v(t.button,{[t.active]:a}),children:n.icon},r)})}),n?.includes(`responseArea`)&&(0,P.jsx)(`button`,{type:`button`,"aria-label":`Insert response area`,title:`Insert response area`,onClick:()=>{e.chain().focus().insertResponseArea(i.type).run()},className:t.button,children:(0,P.jsx)(r3,{})}),f.showDone&&(0,P.jsx)(YG,{language:c,onClick:()=>{a?.(e.getHTML()),e.commands.blur()}})]}),l&&(0,P.jsx)(E8,{editor:e,opts:{...l,renderPopOver:(e,t)=>console.log(`Show popover`,t),closePopOver:()=>console.log(`Close popover`)},onClose:()=>u(!1)})]})}var M8=e=>{So();let t={defaultToolbar:`defaultToolbar`,buttonsContainer:`buttonsContainer`,button:`toolbarButton`,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,P.jsx)(N8,{children:(0,P.jsx)(j8,{...e,classes:t})})},N8=I(`div`)(()=>({height:0,overflow:`visible`,"& .defaultToolbar":{display:`flex`,width:`100%`,justifyContent:`space-between`},"& .buttonsContainer":{alignItems:`center`,display:`flex`,width:`100%`},"& .toolbarButton":{color:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:JR()},"&:focus":{outline:`2px solid ${Lz()}`}},"& .active":{color:JR()},"& .disabled":{opacity:.7,cursor:`not-allowed`,"& :hover":{color:YR()}},"& .isActive":{background:`var(--purple)`,color:`var(--white)`},"& .toolbar":{position:`relative`,top:`5px`,zIndex:20,cursor:`pointer`,justifyContent:`space-between`,background:WG,minWidth:`280px`,margin: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":{position:`absolute`,top:`-45px`},"& .toolbarRight":{right:0},"& .fullWidth":{width:`fit-content`,minWidth:`100%`},"& .hidden":{visibility:`hidden`},"& .autoWidth":{width:`fit-content`},"& .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`}})),P8=I(`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:JR(),backgroundColor:gz()},'& table:not([border="1"]) tr':{borderTop:`1px solid ${Oz()}`},"& td, th":{padding:`.6em 1em`,textAlign:`center`},'& table:not([border="1"]) td, th':{border:`1px solid ${Oz()}`},...n&&{border:`2px solid ${e.palette.error.main} !important`}})),F8=I(`div`,{shouldForwardProp:e=>![`disableScrollbar`,`highlightShape`].includes(e)})(({theme:e,disableScrollbar:t,highlightShape:n})=>({position:`relative`,padding:`0px`,overflowY:`auto`,color:JR(),backgroundColor:n?e.palette.action.selected:gz(),...t&&{"&::-webkit-scrollbar":{display:`none`},scrollbarWidth:`none`,"-ms-overflow-style":`none`}})),I8=I(`div`,{shouldForwardProp:e=>e!==`noPadding`})(({noPadding:e})=>({padding:e?0:`10px 8px`}));function L8(e){let[t,n]=(0,w.useState)(null),[r,i]=(0,w.useState)(!1),a=(0,w.useRef)(null),{editor:o,disabled:s,children:c,disableScrollbar:l,activePlugins:u,toolbarOpts:d,responseAreaProps:f,autoFocus:p,minWidth:m,width:h,maxWidth:g,minHeight:_,height:v,maxHeight:y,highlightShape:b,ref:x}=e;(0,w.useEffect)(()=>{o&&a.current&&(o._tiptapContainerEl=a.current)},[o,a.current]),(0,w.useEffect)(()=>{o&&p&&Promise.resolve().then(()=>{o.commands.focus(`end`)})},[o,p]),(0,w.useEffect)(()=>{if(e.adjustWidthForLimit){let t=document.createElement(`p`);t.style.visibility=`hidden`,t.style.position=`absolute`,t.style.whiteSpace=`nowrap`,t.textContent=`W`.repeat(e.charactersLimit);let r=window.getComputedStyle(a.current);[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`letterSpacing`,`wordSpacing`,`textTransform`,`lineHeight`].forEach(e=>{t.style[e]=r[e]}),document.body.appendChild(t),n(`${t.offsetWidth+27}px`),t.remove()}},[e.adjustWidthForLimit,e.charactersLimit]);let S=(0,w.useMemo)(()=>({width:B4(t||h),minWidth:B4(m),maxWidth:B4(g),height:B4(v),minHeight:B4(_),maxHeight:B4(y)}),[t,m,h,g,_,v,y]);return(0,P.jsxs)(P8,{noBorder:d&&d.noBorder,error:d&&d.error,className:e.className,style:{width:S.width,minWidth:S.minWidth,maxWidth:S.maxWidth},ref:a,onFocus:e=>{e.currentTarget.contains(e.target)&&i(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||i(!1)},children:[(0,P.jsx)(F8,{disableScrollbar:l,highlightShape:b,children:(0,P.jsx)(I8,{noPadding:d&&d.noPadding,children:c})}),o&&(0,P.jsx)(M8,{editor:o,responseAreaProps:f,toolbarOpts:d,activePlugins:u,onChange:e.onChange,autoWidthToolbar:e.autoWidthToolbar,hasFocus:r,language:e.language})]})}var R8=g(`@pie-lib:editable-html:plugins`),z8=[`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`],B8={"text-align":`textAlign`,"bulleted-list":`ul_list`,"numbered-list":`ol_list`},V8=z8.filter(e=>![`responseArea`,`h3`,`blockquote`].includes(e)),H8=(e,t,n)=>{R8(`[buildPlugins] opts: `,n),e||=V8;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=!gl(n.extraCSSRules),c=n?.languageCharacters||[];return fl([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)])},U8={position:`bottom`,alignment:`left`,alwaysVisible:!1,showDone:!0,doneOn:`blur`},W8={options:{},respAreaToolbar:()=>{},onHandleAreaChange:()=>{}},G8=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`table`,`video`,`audio`,`responseArea`,`superscript`,`subscript`,`css`,`h3`,`undo`,`redo`],K8={bold:`bold`,italic:`italic`,underline:`underline`,strikethrough:`strike`,superscript:`superscript`,subscript:`subscript`,"bulleted-list":`bulletList`,"numbered-list":`orderedList`,table:`table`},q8={"--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),
|
|
396
|
+
0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)`},J8=(e,t,n)=>({role:`textbox`,"data-pie-editor":`true`,class:`mathjax_ignore`,spellcheck:e?`true`:`false`,autocorrect:e?`on`:`off`,autocapitalize:e?`on`:`off`,...t&&{"aria-label":t},...n&&{"aria-labelledby":n}}),Y8=[`aria-label`,`aria-labelledby`],X8=e=>{let{showParagraphs:t,separateParagraphs:n}=e.pluginProps||{},[r,i]=(0,w.useState)([]),[a,o]=(0,w.useState)(!1),{toolbarOpts:s}=e,c=(0,w.useCallback)(e=>{i(t=>{let n=t.filter(t=>t.pos!==e);return n.length===0&&o(!1),n})},[i]),l={...U8,...s},u=(0,w.useCallback)(t=>{let n=t.getHTML();e.markup!==n&&e.onChange?.(n),l.doneOn===`blur`&&e.onDone?.(n)},[e.markup,e.onChange,e.onDone,l.doneOn]),d=(0,w.useMemo)(()=>({...W8,...e.responseAreaProps,onInlineDropdownToolbarClose:u}),[e.responseAreaProps,u]),f=(0,w.useMemo)(()=>{let{customPlugins:t,...n}=e.pluginProps||{};t||=[];let r=(e.activePlugins||G8)?.filter(e=>{let t=B8[e]||e,r=n[t]||{};return!r||!r.disabled});return H8(r,t,{math:{},textAlign:e.textAlign,html:{},extraCSSRules:e.extraCSSRules||{},image:{...e.imageSupport},toolbar:{},table:{},responseArea:{type:d.type},languageCharacters:e.languageCharactersProps,keyPadCharacterRef:{},setKeypadInteraction:{},media:{}})},[e,d.type]),p=(0,w.useRef)(null);p.current={plainText:e.pluginProps?.pasteFormatting?.disabled===!0,formatting:f.map(e=>K8[e]).filter(Boolean)};let m=[lA.configure({types:[`heading`,`paragraph`,`div`,`headingParagraph`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`td`,`th`],alignments:[`left`,`right`,`center`,`justify`]}),oA,KA.configure({settings:()=>p.current}),Sk.configure({limit:e.charactersLimit||1e6}),Xk.configure({trailingNode:{node:`paragraph`,notAfter:[`paragraph`,`div`]},link:{autolink:!1,linkOnPaste:!1}}),R4,ON,z4,kN,AN,fA.configure({placeholder:e.placeholder,showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!0}),wN,qM,DN,EN,GQ.configure(d),KQ.configure(d),JQ.configure(d),YQ.configure(d),qQ.configure(d),r0.configure({toolbarOpts:l,math:e.pluginProps?.math||{}}),cA,sA,dA,_2.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=pl(()=>{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}),b4.configure({uploadSoundSupport:e.uploadSoundSupport}),L4.configure({extraCSSRules:e.extraCSSRules})],h=e.spellCheck!==!1,{ariaLabel:g,ariaLabelledBy:_}=e,v=bw({extensions:m,immediatelyRender:!1,editorProps:{attributes:J8(h,g,_),handleKeyDown(t,n){return e.onKeyDown?e.onKeyDown(n):!1}},editable:!e.disabled,content:YA(e.markup),onUpdate:({editor:t,transaction:n})=>{n.isDone&&e.onChange?.(t.getHTML())},onBlur:({editor:e})=>{e._insertingImage||e._toolbarOpened||e.isActive(`inline_dropdown`)||e.isActive(`explicit_constructed_response`)||!e.schema||u(e)}},[e.charactersLimit]);(0,w.useEffect)(()=>{e.editorRef&&e.editorRef(v)},[e.editorRef,v]),(0,w.useEffect)(()=>{v?.setEditable(!e.disabled)},[e.disabled,v]),(0,w.useEffect)(()=>{if(!v)return;let e=v.options?.editorProps,t=e?.attributes||{},n=J8(h,g,_);if([`spellcheck`,...Y8].every(e=>t[e]===n[e]))return;let r=Object.fromEntries(Object.entries(t).filter(([e])=>!Y8.includes(e)));v.setOptions({editorProps:{...e,attributes:{...r,...n}}})},[h,g,_,v]),(0,w.useEffect)(()=>{if(!v)return;let t=YA(e.markup);t!==v.getHTML()&&v.commands.setContent(t,{emitUpdate:!1})},[e.markup,v]),(0,w.useEffect)(()=>{Object.entries(q8).forEach(([e,t])=>{document.documentElement.style.setProperty(e,t)})},[]);let y=gw({editor:v,selector:e=>({isFocused:e.editor?.isFocused})}),b=(0,w.useMemo)(()=>{let{minWidth:t,width:n,maxWidth:r,minHeight:i,height:a,maxHeight:o}=e;return{width:B4(n),minWidth:B4(t),maxWidth:B4(r),height:B4(a),minHeight:B4(i),maxHeight:B4(o)}},[e]);return(0,P.jsx)(L8,{...e,activePlugins:f,toolbarOpts:l,editorState:y,editor:v,children:v&&(0,P.jsx)(Z8,{style:{minHeight:b.minHeight,height:b.height,maxHeight:b.maxHeight},showParagraph:t&&!t.disabled,separateParagraph:n&&!n.disabled,editor:v})})},Z8=I(pw,{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[data-placeholder].is-empty:only-child, & div[data-placeholder].is-empty:only-child":{position:`relative`},"& p[data-placeholder].is-empty:only-child::before, & div[data-placeholder].is-empty:only-child::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`}}}})),Q8=X8,$8=(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=$8(e,t,r),e=e.nextSibling;return r},e5=(e,t,n)=>{let r=$8(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},t5=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]},n5=e=>{let t=document.createElement(`SPAN`);return e.surroundContents(t),t},r5=e=>{if(e.startContainer===e.endContainer)return[n5(e)];let[t]=t5(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);let r=n5(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);let a=n5(i);return[r,...t.map(e=>{let t=document.createElement(`SPAN`);return e.parentNode.insertBefore(t,e),t.appendChild(e),t}),a]},i5=(e,t)=>{let n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);let[,r]=t5(n),[,i]=t5(e),a=r.length;return{quote:i,start:a,end:a+i.length}},a5=(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()},o5=()=>{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()},s5=e=>e.length>=20||e.search(/\n|\r|\r\n/)!==-1,c5=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),l5=e=>document.querySelector(`[data-ann-id='${e}']`),u5=I(iL)(({annotationType:e})=>({"& .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:Cz()},...e===`negative`&&{"&::before":{borderRightColor:`rgb(255, 204, 238) !important`}},...e===`positive`&&{"&::before":{borderRightColor:`rgb(153, 255, 153) !important`}}}})),d5=I(`div`)(({theme:e,annotationType:t})=>({width:`200px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:KR(`pie`)(`background`,G.WHITE),color:KR(`pie`)(`text`,e.palette.text.primary),border:`4px solid ${Cz()}`,"& .MuiInputBase-root":{color:`inherit`},...(t===`negative`||t===`positive`)&&{position:`relative`,boxShadow:`0 0 0 1px #757575`,"&::after":{content:`""`,position:`absolute`,inset:0,border:`1px solid #757575`,pointerEvents:`none`}},...t===`negative`&&{borderColor:`rgb(255, 204, 238) !important`},...t===`positive`&&{borderColor:`rgb(153, 255, 153) !important`}})),f5=I(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${Cz()}`})),p5=I(`div`)(({theme:e,variant:t,annotationType:n})=>({flexGrow:1,width:`28%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,"&:not(:nth-child(3n))":{borderRight:`1px solid ${Cz()}`},"&:hover":{backgroundColor:_z()},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}},...t===`typeChange`&&n===`negative`&&{"&:hover":{backgroundColor:`rgb(153, 255, 153) !important`,color:e.palette.text.primary}},...t===`typeChange`&&n===`positive`&&{"&:hover":{backgroundColor:`rgb(255, 204, 238) !important`,color:e.palette.text.primary}}})),m5=class extends w.Component{static propTypes={anchorEl:m.object,open:m.bool,offset:m.number,value:m.string,type:m.string,onClose:m.func,onDelete:m.func,onSave:m.func,onTypeChange:m.func};constructor(e){super(e),this.state={value:e.value},this.editorId=nW(`annotation-editor`)}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,P.jsx)(u5,{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,P.jsxs)(d5,{annotationType:i,children:[(0,P.jsx)(V0,{id:this.editorId,style:{padding:`2px 5px`,width:`95%`},autoFocus:!0,multiline:!0,rows:1,maxRows:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),(0,P.jsxs)(f5,{children:[(0,P.jsx)(p5,{onClick:n,children:`Delete`}),(0,P.jsx)(p5,{variant:`typeChange`,annotationType:i,onClick:this.handleTypeChange,children:i===`negative`?`Green`:`Pink`}),(0,P.jsx)(p5,{onClick:this.handleSave,children:`Save`})]})]})})}},h5=I(iL)({"& .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:Tz()}}}),g5=I(`div`)(({theme:e})=>({width:`300px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:KR(`pie`)(`background`,G.WHITE),color:KR(`pie`)(`text`,e.palette.text.primary),border:`2px solid ${Tz()}`})),_5=I(`div`)({display:`flex`,flexWrap:`wrap`}),v5=I(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${Cz()}`})),y5=I(`div`)(({theme:e,variant:t})=>({width:`22%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,borderBottom:`1px solid ${Cz()}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${Cz()}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:_z()},...t===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}},...t===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,color:e.palette.text.primary,"&:hover":{filter:`brightness(85%)`}}})),b5=class extends w.Component{static propTypes={anchorEl:m.object,open:m.bool,annotations:m.array,isNewAnnotation:m.bool,onClose:m.func,onDelete:m.func,onEdit:m.func,onWrite:m.func,onAnnotate:m.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,P.jsx)(h5,{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,P.jsxs)(g5,{children:[(0,P.jsx)(_5,{children:t.map((e,t)=>(0,P.jsx)(y5,{variant:e.type,onClick:()=>r(e),children:e.label},`annotation-${t}`))}),(0,P.jsxs)(v5,{children:[(0,P.jsx)(y5,{onClick:i,children:`Cancel`}),(0,P.jsx)(y5,{style:{pointerEvents:`none`}}),n?(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(y5,{variant:`positive`,onClick:()=>s(`positive`),children:`Write`}),(0,P.jsx)(y5,{variant:`negative`,onClick:()=>s(`negative`),children:`Write`})]}):(0,P.jsxs)(w.Fragment,{children:[(0,P.jsx)(y5,{onClick:o,children:`Delete`}),(0,P.jsx)(y5,{onClick:a,children:`Edit`})]})]})]})})}};function x5(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function S5(e,t){return!e||x5(e)?e:x5(e.default)?e.default:t&&x5(e[t])?e[t]:t&&x5(e[t]?.default)?e[t].default:e}var C5=S5(nG,`InputContainer`)||S5(E5.InputContainer,`InputContainer`),w5=HG,T5=w5.default,E5=T5&&typeof T5==`object`?T5:w5,{translator:D5}=tW,O5=I(`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`}}),k5=I(`div`)({width:`230px`}),A5=I(`div`)({position:`relative`,overflowX:`hidden`,display:`flex`}),j5=I(C5)(({theme:e})=>({paddingTop:e.spacing(2),marginBottom:e.spacing(2),marginTop:e.spacing(2),width:`100%`})),M5=`
|
|
395
397
|
.sideAnnotation:before {
|
|
396
398
|
position: absolute;
|
|
397
399
|
right: var(--before-right, 100%);
|
|
@@ -404,4 +406,4 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
404
406
|
border-width: var(--before-border-width, 7px);
|
|
405
407
|
border-right-color: var(--before-border-color, rgb(153, 255, 153));
|
|
406
408
|
}
|
|
407
|
-
`;if(!document.getElementById(`annotation-editor-styles`)){let e=document.createElement(`style`);e.id=`annotation-editor-styles`,e.textContent=J6,document.head.appendChild(e)}var Y6=class extends w.Component{static propTypes={text:m.string,comment:m.string,annotations:m.array,predefinedAnnotations:m.array,onChange:m.func.isRequired,onCommentChange:m.func.isRequired,width:m.number,height:m.number,maxHeight:m.string,disabled:m.bool,disabledMath:m.bool,customKeys:m.array,keypadMode:m.string,language:m.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]=g6(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=y6(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=w6(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=w6(a),s=T6(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=w6(r),a=T6(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=w6(r),a=T6(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`)&&x6(t,this.textRef),n&&(n.style.zIndex=``),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),S6()};handleSelection=e=>{let t=window.getSelection();if(e.detail>2){S6();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=b6(e,this.textRef),n=y6(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;(C6(a.label)?this.labelsRef:n[0]).removeChild(r),x6(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,C6(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=T6(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;C6(a)&&C6(e)||!C6(a)&&!C6(e)?(i.innerHTML=a,n&&(i.classList.remove(n),i.classList.add(o),r.forEach(e=>{e.classList.remove(n),e.classList.add(o)}))):C6(a)&&!C6(e)?(r[0].removeChild(i),this.createDOMAnnotation(r,t)):!C6(a)&&C6(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,language:o,width:s,maxHeight:c,onCommentChange:l,predefinedAnnotations:u,text:d}=this.props,{anchorEl:f,annotation:p,openedMenu:m,openedEditor:h,selectionDetails:g}=this.state,_=f&&(f.offsetTop?f.offsetTop:f.offsetParent.offsetTop),v=this.textRef&&_?_-this.textRef.scrollTop-8:0,y=U6.t(`extendedTextEntry.comment`,{lng:o});return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(K6,{children:[(0,P.jsx)(W6,{style:{width:s-34,minHeight:a,maxHeight:c},ref:e=>this.textRef=e,onMouseDown:n?()=>{}:S6,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:d}}),(0,P.jsx)(G6,{ref:e=>this.labelsRef=e})]}),(0,P.jsx)(q6,{label:y,children:(0,P.jsx)(m6,{className:`prompt`,markup:e||``,onChange:l,width:s&&(s+104).toString(),disabled:n,ariaLabel:y,language:o,pluginProps:{math:{disabled:r,customKeys:t,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0}}})}),(0,P.jsx)(I6,{anchorEl:f,open:m&&!n,annotations:u,isNewAnnotation:!!g,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),(0,P.jsx)(A6,{anchorEl:this.textRef,open:h&&!n,offset:v,value:p&&p.label||``,type:p&&p.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType})]})}};function X6(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Z6(e,t){return!e||X6(e)?e:X6(e.default)?e.default:t&&X6(e[t])?e[t]:t&&X6(e[t]?.default)?e[t].default:e}var Q6=Z6(KH,`UiLayout`)||Z6(i8.UiLayout,`UiLayout`),$6=Z6(DU,`PreviewPrompt`)||Z6(i8.PreviewPrompt,`PreviewPrompt`),e8=Z6(wH,`Collapsible`)||Z6(i8.Collapsible,`Collapsible`),t8=Z6(SR,`Feedback`)||Z6(i8.Feedback,`Feedback`),n8=iW,r8=n8.default,i8=r8&&typeof r8==`object`?r8:n8,{translator:a8}=_H,o8=g(`@pie-ui:extended-text-entry`),s8=I(Q6)({backgroundColor:ML(),color:uL()}),c8=I(zo)(({theme:e})=>({width:`100%`,color:uL(),marginBottom:e.spacing(2),fontSize:`inherit`,display:`block`})),l8=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),u8=I(m6)(({theme:e})=>({marginBottom:e.spacing(2),borderRadius:`4px`})),d8=I(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),f8=class extends w.Component{static propTypes={onValueChange:m.func.isRequired,onAnnotationsChange:m.func.isRequired,onCommentChange:m.func.isRequired,model:m.object,session:m.shape({value:m.string,annotations:m.array,comment:m.string}).isRequired};promptId=`ete-prompt-${Math.random().toString(36).slice(2,10)}`;render(){let{model:e,session:t,onAnnotationsChange:n,onCommentChange:r,onValueChange:i}=this.props,{animationsDisabled:a,annotatorMode:o,customKeys:s,dimensions:c,disabled:l,disabledAnnotator:u,equationEditor:d,extraCSSRules:f,feedback:p,mathInput:m,pasteFormattingDisabled:h,playersToolbarPosition:g,predefinedAnnotations:_,prompt:v,spanishInput:y,specialInput:b,spellCheckEnabled:x,teacherInstructions:S}=e,{annotations:C,comment:w,value:T}=t,{width:E,height:ee}=c||{},D=`40vh`,O={position:g===`top`?`top`:`bottom`};o8(`[render] disabled? `,l);let te=(0,P.jsx)($6,{defaultClassName:`teacher-instructions`,prompt:S}),k=[];return y&&k.push({language:`spanish`}),b&&k.push({language:`special`}),(0,P.jsxs)(s8,{extraCSSRules:f,ref:e=>{this.containerRef=e},children:[(0,P.jsx)(d8,{children:a8.t(`extendedTextEntry.constructedResponseQuestion`,{lng:e.language})}),S&&(0,P.jsx)(l8,{children:a?te:(0,P.jsx)(e8,{labels:{hidden:a8.t(`common:showTeacherInstructions`,{lng:e.language}),visible:a8.t(`common:hideTeacherInstructions`,{lng:e.language})},children:te})}),v&&(0,P.jsx)(c8,{component:`span`,id:this.promptId,children:(0,P.jsx)($6,{defaultClassName:`prompt`,prompt:e.prompt})}),o?(0,P.jsx)(Y6,{text:T||``,annotations:C||[],comment:w||``,predefinedAnnotations:_||[],onChange:n,onCommentChange:r,width:E,height:ee,maxHeight:D,disabled:u,disabledMath:!m,customKeys:s,keypadMode:d,language:e.language}):(0,P.jsx)(u8,{className:`response-area-editor`,onChange:i,markup:T||``,maxWidth:E&&E.toString(),minWidth:`100px`,minHeight:ee&&ee.toString(),maxHeight:D,disabled:l,highlightShape:!0,toolbarOpts:O,spellCheck:x,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!m,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},pasteFormatting:{disabled:h===!0}},languageCharactersProps:k,ariaLabelledBy:v?this.promptId:void 0,ariaLabel:a8.t(`extendedTextEntry.response`,{lng:e.language}),language:e.language}),p&&(0,P.jsx)(t8,{correctness:`correct`,feedback:p})]})}},p8=o((e=>{var t=If();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),m8=`commitPendingSession`,h8=new WeakMap;function g8(e,t){let n=h8.get(e);n||(n=new Set,h8.set(e,n)),n.add(t)}function _8(e){return Object.getOwnPropertyDescriptor(e,m8)!==void 0}function v8(e){if(_8(e))return;let t=e[m8];Object.defineProperty(e,m8,{value:()=>{if(typeof t==`function`)try{t.call(e)}catch{}b8(e)},configurable:!0,enumerable:!1,writable:!0})}function y8(e,t,n={}){let r=n.delayMs,i=typeof r==`function`?r:()=>r??0,a=n.maxWaitMs,o=null,s=null,c=!1,l=()=>{o!==null&&(clearTimeout(o),o=null),s!==null&&(clearTimeout(s),s=null)},u=()=>{l(),c&&(c=!1,t())},d={notify(){c=!0,o!==null&&clearTimeout(o),o=setTimeout(u,Math.max(0,i())),a!==void 0&&s===null&&(s=setTimeout(u,Math.max(0,a)))},flush(){if(!c){l();return}try{u()}catch(e){console.warn(`[session-notifier] a committed session-changed dispatch threw`,e)}}};return g8(e,d),v8(e),d}function b8(e){let t=h8.get(e);if(t)for(let e of[...t])e.flush()}var x8=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}},S8=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}},C8=p8(),{translator:w8}=_H,T8=g(`@pie-elements:extended-text-entry`),E8=1500,D8=new DOMParser;function O8(e){if(typeof e==`string`)try{return D8.parseFromString(e,`text/html`).body.textContent}catch{return T8(`tried to parse as dom and failed`,e),e}}function k8(e){let t=O8(e);return t!==void 0&&t.length>0}var A8=class extends HTMLElement{constructor(){super(),this._model=null,this._session=null,this._root=null,this._valueNotifier=y8(this,()=>{this.dispatchEvent(new S8(this.tagName.toLowerCase(),k8(this._session&&this._session.value)))},{delayMs:E8}),this._commentNotifier=y8(this,()=>{this.dispatchEvent(new S8(this.tagName.toLowerCase(),k8(this._session&&this._session.comment)))},{delayMs:E8})}setLangAttribute(){let e=this._model&&typeof this._model.language?this._model.language:``,t=e?e.slice(0,2):`en`;this.setAttribute(`lang`,t)}setRegionLabel(){this.setAttribute(`aria-label`,w8.t(`extendedTextEntry.writtenResponseQuestion`,{lng:this._model?.language}))}set model(e){this._model=e,this.dispatchEvent(new x8(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._valueNotifier.notify(),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new S8(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this._commentNotifier.notify(),this.render()}connectedCallback(){this.setRegionLabel(),this.setAttribute(`role`,`region`),this.render()}render(){if(this._model&&this._session){let e=w.createElement(f8,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),this.setRegionLabel(),this._root||=(0,C8.createRoot)(this),this._root.render(e),queueMicrotask(()=>{dV(this)})}}disconnectedCallback(){b8(this),this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`extended-text-entry-element`)&&customElements.define(`extended-text-entry-element`,A8),A8})();
|
|
409
|
+
`;if(!document.getElementById(`annotation-editor-styles`)){let e=document.createElement(`style`);e.id=`annotation-editor-styles`,e.textContent=M5,document.head.appendChild(e)}var N5=class extends w.Component{static propTypes={text:m.string,comment:m.string,annotations:m.array,predefinedAnnotations:m.array,onChange:m.func.isRequired,onCommentChange:m.func.isRequired,width:m.number,height:m.number,maxHeight:m.string,disabled:m.bool,disabledMath:m.bool,customKeys:m.array,keypadMode:m.string,language:m.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]=e5(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=r5(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=c5(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=c5(a),s=l5(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=c5(r),a=l5(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=c5(r),a=l5(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`)&&a5(t,this.textRef),n&&(n.style.zIndex=``),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),o5()};handleSelection=e=>{let t=window.getSelection();if(e.detail>2){o5();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=i5(e,this.textRef),n=r5(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;(s5(a.label)?this.labelsRef:n[0]).removeChild(r),a5(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=HR(i),s.onclick=!n&&this.handleClick,s.onmouseover=this.handleHover,s.onmouseout=this.handleCancelHover,s5(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=l5(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;s5(a)&&s5(e)||!s5(a)&&!s5(e)?(i.innerHTML=HR(a),n&&(i.classList.remove(n),i.classList.add(o),r.forEach(e=>{e.classList.remove(n),e.classList.add(o)}))):s5(a)&&!s5(e)?(r[0].removeChild(i),this.createDOMAnnotation(r,t)):!s5(a)&&s5(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,language:o,width:s,maxHeight:c,onCommentChange:l,predefinedAnnotations:u,text:d}=this.props,{anchorEl:f,annotation:p,openedMenu:m,openedEditor:h,selectionDetails:g}=this.state,_=f&&(f.offsetTop?f.offsetTop:f.offsetParent.offsetTop),v=this.textRef&&_?_-this.textRef.scrollTop-8:0,y=D5.t(`extendedTextEntry.comment`,{lng:o});return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(A5,{children:[(0,P.jsx)(O5,{style:{width:s-34,minHeight:a,maxHeight:c},ref:e=>this.textRef=e,onMouseDown:n?()=>{}:o5,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:HR(d)}}),(0,P.jsx)(k5,{ref:e=>this.labelsRef=e})]}),(0,P.jsx)(j5,{label:y,children:(0,P.jsx)(Q8,{className:`prompt`,markup:e||``,onChange:l,width:s&&(s+104).toString(),disabled:n,ariaLabel:y,language:o,pluginProps:{math:{disabled:r,customKeys:t,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0}}})}),(0,P.jsx)(b5,{anchorEl:f,open:m&&!n,annotations:u,isNewAnnotation:!!g,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),(0,P.jsx)(m5,{anchorEl:this.textRef,open:h&&!n,offset:v,value:p&&p.label||``,type:p&&p.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType})]})}};function P5(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function F5(e,t){return!e||P5(e)?e:P5(e.default)?e.default:t&&P5(e[t])?e[t]:t&&P5(e[t]?.default)?e[t].default:e}var I5=F5(AW,`UiLayout`)||F5(H5.UiLayout,`UiLayout`),L5=F5(dG,`PreviewPrompt`)||F5(H5.PreviewPrompt,`PreviewPrompt`),R5=F5(cW,`Collapsible`)||F5(H5.Collapsible,`Collapsible`),z5=F5(oB,`Feedback`)||F5(H5.Feedback,`Feedback`),B5=HG,V5=B5.default,H5=V5&&typeof V5==`object`?V5:B5,{translator:U5}=tW,W5=g(`@pie-ui:extended-text-entry`),G5=I(I5)({backgroundColor:gz(),color:JR()}),K5=I(zo)(({theme:e})=>({width:`100%`,color:JR(),marginBottom:e.spacing(2),fontSize:`inherit`,display:`block`})),q5=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),J5=I(Q8)(({theme:e})=>({marginBottom:e.spacing(2),borderRadius:`4px`})),Y5=I(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),X5=class extends w.Component{static propTypes={onValueChange:m.func.isRequired,onAnnotationsChange:m.func.isRequired,onCommentChange:m.func.isRequired,model:m.object,session:m.shape({value:m.string,annotations:m.array,comment:m.string}).isRequired};promptId=`ete-prompt-${Math.random().toString(36).slice(2,10)}`;render(){let{model:e,session:t,onAnnotationsChange:n,onCommentChange:r,onValueChange:i}=this.props,{animationsDisabled:a,annotatorMode:o,customKeys:s,dimensions:c,disabled:l,disabledAnnotator:u,equationEditor:d,extraCSSRules:f,feedback:p,mathInput:m,pasteFormattingDisabled:h,playersToolbarPosition:g,predefinedAnnotations:_,prompt:v,spanishInput:y,specialInput:b,spellCheckEnabled:x,teacherInstructions:S}=e,{annotations:C,comment:w,value:T}=t,{width:E,height:ee}=c||{},D=`40vh`,O={position:g===`top`?`top`:`bottom`};W5(`[render] disabled? `,l);let te=(0,P.jsx)(L5,{defaultClassName:`teacher-instructions`,prompt:S}),k=[];return y&&k.push({language:`spanish`}),b&&k.push({language:`special`}),(0,P.jsxs)(G5,{extraCSSRules:f,ref:e=>{this.containerRef=e},children:[(0,P.jsx)(Y5,{children:U5.t(`extendedTextEntry.constructedResponseQuestion`,{lng:e.language})}),S&&(0,P.jsx)(q5,{children:a?te:(0,P.jsx)(R5,{labels:{hidden:U5.t(`common:showTeacherInstructions`,{lng:e.language}),visible:U5.t(`common:hideTeacherInstructions`,{lng:e.language})},children:te})}),v&&(0,P.jsx)(K5,{component:`span`,id:this.promptId,children:(0,P.jsx)(L5,{defaultClassName:`prompt`,prompt:e.prompt})}),o?(0,P.jsx)(N5,{text:T||``,annotations:C||[],comment:w||``,predefinedAnnotations:_||[],onChange:n,onCommentChange:r,width:E,height:ee,maxHeight:D,disabled:u,disabledMath:!m,customKeys:s,keypadMode:d,language:e.language}):(0,P.jsx)(J5,{className:`response-area-editor`,onChange:i,markup:T||``,maxWidth:E&&E.toString(),minWidth:`100px`,minHeight:ee&&ee.toString(),maxHeight:D,disabled:l,highlightShape:!0,toolbarOpts:O,spellCheck:x,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!m,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},pasteFormatting:{disabled:h===!0}},languageCharactersProps:k,ariaLabelledBy:v?this.promptId:void 0,ariaLabel:U5.t(`extendedTextEntry.response`,{lng:e.language}),language:e.language}),p&&(0,P.jsx)(z5,{correctness:`correct`,feedback:p})]})}},Z5=o((e=>{var t=If();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),Q5=`commitPendingSession`,$5=new WeakMap;function e7(e,t){let n=$5.get(e);n||(n=new Set,$5.set(e,n)),n.add(t)}function t7(e){return Object.getOwnPropertyDescriptor(e,Q5)!==void 0}function n7(e){if(t7(e))return;let t=e[Q5];Object.defineProperty(e,Q5,{value:()=>{if(typeof t==`function`)try{t.call(e)}catch{}i7(e)},configurable:!0,enumerable:!1,writable:!0})}function r7(e,t,n={}){let r=n.delayMs,i=typeof r==`function`?r:()=>r??0,a=n.maxWaitMs,o=null,s=null,c=!1,l=()=>{o!==null&&(clearTimeout(o),o=null),s!==null&&(clearTimeout(s),s=null)},u=()=>{l(),c&&(c=!1,t())},d={notify(){c=!0,o!==null&&clearTimeout(o),o=setTimeout(u,Math.max(0,i())),a!==void 0&&s===null&&(s=setTimeout(u,Math.max(0,a)))},flush(){if(!c){l();return}try{u()}catch(e){console.warn(`[session-notifier] a committed session-changed dispatch threw`,e)}}};return e7(e,d),n7(e),d}function i7(e){let t=$5.get(e);if(t)for(let e of[...t])e.flush()}var a7=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}},o7=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}},s7=Z5(),{translator:c7}=tW,l7=g(`@pie-elements:extended-text-entry`),u7=1500,d7=new DOMParser;function f7(e){if(typeof e==`string`)try{return d7.parseFromString(e,`text/html`).body.textContent}catch{return l7(`tried to parse as dom and failed`,e),e}}function p7(e){let t=f7(e);return t!==void 0&&t.length>0}var m7=class extends HTMLElement{constructor(){super(),this._model=null,this._session=null,this._root=null,this._valueNotifier=r7(this,()=>{this.dispatchEvent(new o7(this.tagName.toLowerCase(),p7(this._session&&this._session.value)))},{delayMs:u7}),this._commentNotifier=r7(this,()=>{this.dispatchEvent(new o7(this.tagName.toLowerCase(),p7(this._session&&this._session.comment)))},{delayMs:u7})}setLangAttribute(){let e=this._model&&typeof this._model.language?this._model.language:``,t=e?e.slice(0,2):`en`;this.setAttribute(`lang`,t)}setRegionLabel(){this.setAttribute(`aria-label`,c7.t(`extendedTextEntry.writtenResponseQuestion`,{lng:this._model?.language}))}set model(e){this._model=e,this.dispatchEvent(new a7(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._valueNotifier.notify(),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new o7(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this._commentNotifier.notify(),this.render()}connectedCallback(){this.setRegionLabel(),this.setAttribute(`role`,`region`),this.render()}render(){if(this._model&&this._session){let e=w.createElement(X5,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),this.setRegionLabel(),this._root||=(0,s7.createRoot)(this),this._root.render(e),queueMicrotask(()=>{YH(this)})}}disconnectedCallback(){i7(this),this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`extended-text-entry-element`)&&customElements.define(`extended-text-entry-element`,m7),m7})();
|